зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1171682 - Disable WebGL in safemode. r=jgilbert
This commit is contained in:
Родитель
f134c090a5
Коммит
5215ca7222
|
@ -894,6 +894,10 @@ WebGLContext::SetDimensions(int32_t signedWidth, int32_t signedHeight)
|
||||||
NS_ENSURE_TRUE(Preferences::GetRootBranch(), NS_ERROR_FAILURE);
|
NS_ENSURE_TRUE(Preferences::GetRootBranch(), NS_ERROR_FAILURE);
|
||||||
|
|
||||||
bool disabled = Preferences::GetBool("webgl.disabled", false);
|
bool disabled = Preferences::GetBool("webgl.disabled", false);
|
||||||
|
|
||||||
|
// TODO: When we have software webgl support we should use that instead.
|
||||||
|
disabled |= gfxPlatform::InSafeMode();
|
||||||
|
|
||||||
if (disabled) {
|
if (disabled) {
|
||||||
GenerateWarning("WebGL creation is disabled, and so disallowed here.");
|
GenerateWarning("WebGL creation is disabled, and so disallowed here.");
|
||||||
return NS_ERROR_FAILURE;
|
return NS_ERROR_FAILURE;
|
||||||
|
|
Загрузка…
Ссылка в новой задаче