Bug 893301. Don't use new textures content on b2g. r=bjacob,nical
authorNicholas Cameron <ncameron@mozilla.com>
Fri, 06 Dec 2013 07:39:22 +1300
changeset 174716 10932f3a0ba0933ffc45cd9c86fa6aa3eb1a8835
parent 174715 0e796e3648153bde5b56d2c745c45fbfc94617e6
child 174717 8f49fff73d6ee5b216005b2370c919791a04434a
push id445
push userffxbld
push dateMon, 10 Mar 2014 22:05:19 +0000
treeherdermozilla-release@dc38b741b04e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbjacob, nical
bugs893301
milestone28.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 893301. Don't use new textures content on b2g. r=bjacob,nical
gfx/layers/client/ContentClient.cpp
--- a/gfx/layers/client/ContentClient.cpp
+++ b/gfx/layers/client/ContentClient.cpp
@@ -45,40 +45,47 @@ ContentClient::CreateContentClient(Compo
   if (backend != LAYERS_OPENGL &&
       backend != LAYERS_D3D9 &&
       backend != LAYERS_D3D11 &&
       backend != LAYERS_BASIC) {
     return nullptr;
   }
 
   bool useDoubleBuffering = false;
+  bool useDeprecatedTextures = true;
+  // XXX We need support for gralloc with non-deprecated textures content before
+  // we can use them with FirefoxOS (bug 946720). We need the same locking for
+  // Windows.
+#if !defined(MOZ_WIDGET_GONK) && !defined(XP_WIN)
+  useDeprecatedTextures = gfxPlatform::GetPlatform()->UseDeprecatedTextures();
+#endif
 
 #ifdef XP_WIN
   if (backend == LAYERS_D3D11) {
     useDoubleBuffering = !!gfxWindowsPlatform::GetPlatform()->GetD2DDevice();
   } else
 #endif
   {
     useDoubleBuffering = LayerManagerComposite::SupportsDirectTexturing() ||
                          backend == LAYERS_BASIC;
   }
 
   if (useDoubleBuffering || PR_GetEnv("MOZ_FORCE_DOUBLE_BUFFERING")) {
-    if (gfxPlatform::GetPlatform()->UseDeprecatedTextures()) {
+    if (useDeprecatedTextures) {
       return new DeprecatedContentClientDoubleBuffered(aForwarder);
     } else {
       return new ContentClientDoubleBuffered(aForwarder);
     }
   }
 #ifdef XP_MACOSX
   if (backend == LAYERS_OPENGL) {
     return new ContentClientIncremental(aForwarder);
   }
 #endif
-  if (gfxPlatform::GetPlatform()->UseDeprecatedTextures()) {
+  if (useDeprecatedTextures) {
     return new DeprecatedContentClientSingleBuffered(aForwarder);
   } else {
     return new ContentClientSingleBuffered(aForwarder);
   }
 }
 
 // We pass a null pointer for the ContentClient Forwarder argument, which means
 // this client will not have a ContentHost on the other side.