--- a/gfx/layers/opengl/CompositorOGL.cpp
+++ b/gfx/layers/opengl/CompositorOGL.cpp
@@ -2018,16 +2018,20 @@ CompositorOGL::GetTemporaryTexture(GLenu
mTexturePool = new PerUnitTexturePoolOGL(gl());
}
return mTexturePool->GetTexture(aTarget, aUnit);
}
bool
CompositorOGL::SupportsTextureDirectMapping()
{
+ if (!gfxPrefs::AllowTextureDirectMapping()) {
+ return false;
+ }
+
if (mGLContext) {
mGLContext->MakeCurrent();
return mGLContext->IsExtensionSupported(gl::GLContext::APPLE_client_storage) &&
mGLContext->IsExtensionSupported(gl::GLContext::APPLE_texture_range);
}
return false;
}
--- a/gfx/thebes/gfxPrefs.h
+++ b/gfx/thebes/gfxPrefs.h
@@ -508,16 +508,22 @@ private:
// Disable surface sharing due to issues with compatible FBConfigs on
// NVIDIA drivers as described in bug 1193015.
DECL_GFX_PREF(Live, "gfx.use-glx-texture-from-pixmap", UseGLXTextureFromPixmap, bool, false);
DECL_GFX_PREF(Once, "gfx.use-iosurface-textures", UseIOSurfaceTextures, bool, false);
DECL_GFX_PREF(Once, "gfx.use-mutex-on-present", UseMutexOnPresent, bool, false);
DECL_GFX_PREF(Once, "gfx.use-surfacetexture-textures", UseSurfaceTextureTextures, bool, false);
+#if defined(RELEASE_OR_BETA)
+ DECL_GFX_PREF(Once, "gfx.allow-texture-direct-mapping", AllowTextureDirectMapping, bool, false);
+#else
+ DECL_GFX_PREF(Once, "gfx.allow-texture-direct-mapping", AllowTextureDirectMapping, bool, true);
+#endif
+
DECL_GFX_PREF(Live, "gfx.vsync.collect-scroll-transforms", CollectScrollTransforms, bool, false);
DECL_GFX_PREF(Once, "gfx.vsync.compositor.unobserve-count", CompositorUnobserveCount, int32_t, 10);
DECL_GFX_PREF(Once, "gfx.webrender.all", WebRenderAll, bool, false);
DECL_GFX_PREF(Once, "gfx.webrender.all.qualified", WebRenderAllQualified, bool, false);
DECL_GFX_PREF(Live, "gfx.webrender.blob-images", WebRenderBlobImages, bool, true);
DECL_GFX_PREF(Live, "gfx.webrender.blob.invalidation", WebRenderBlobInvalidation, bool, false);
DECL_GFX_PREF(Live, "gfx.webrender.dl.dump-parent", WebRenderDLDumpParent, bool, false);