diff --git a/dom/canvas/WebGL2Context.cpp b/dom/canvas/WebGL2Context.cpp index 7a695c0c8c04..0ecd60e5569e 100644 --- a/dom/canvas/WebGL2Context.cpp +++ b/dom/canvas/WebGL2Context.cpp @@ -5,10 +5,10 @@ #include "WebGL2Context.h" +#include "gfxPrefs.h" #include "GLContext.h" #include "mozilla/dom/WebGL2RenderingContextBinding.h" #include "mozilla/ArrayUtils.h" -#include "mozilla/Preferences.h" #include "mozilla/Telemetry.h" #include "WebGLBuffer.h" #include "WebGLFormats.h" @@ -37,7 +37,7 @@ WebGL2Context::CreateFormatUsage(gl::GLContext* gl) const /*static*/ bool WebGL2Context::IsSupported() { - return Preferences::GetBool("webgl.enable-prototype-webgl2", false); + return gfxPrefs::WebGL2Enabled(); } /*static*/ WebGL2Context* diff --git a/gfx/thebes/gfxPrefs.h b/gfx/thebes/gfxPrefs.h index abd62ac8901f..7bb41fdc8eb9 100644 --- a/gfx/thebes/gfxPrefs.h +++ b/gfx/thebes/gfxPrefs.h @@ -428,6 +428,7 @@ private: DECL_GFX_PREF(Live, "webgl.enable-draft-extensions", WebGLDraftExtensionsEnabled, bool, false); DECL_GFX_PREF(Live, "webgl.enable-privileged-extensions", WebGLPrivilegedExtensionsEnabled, bool, false); + DECL_GFX_PREF(Once, "webgl.enable-prototype-webgl2", WebGL2Enabled, bool, false); DECL_GFX_PREF(Live, "webgl.force-enabled", WebGLForceEnabled, bool, false); DECL_GFX_PREF(Once, "webgl.force-layers-readback", WebGLForceLayersReadback, bool, false); DECL_GFX_PREF(Live, "webgl.lose-context-on-memory-pressure", WebGLLoseContextOnMemoryPressure, bool, false);