Bug 879149 - Don't attempt to use ContentClientIncremental when not using GL layers. r=nrc
authorMatt Woodrow <mwoodrow@mozilla.com>
Fri, 07 Jun 2013 17:10:31 +1200
changeset 145834 c8ee8c7bd5c152b3355502562c0f0f2c1ed25da8
parent 145833 9b142eb80e40f879bf63ba7007c953cae2c76fdf
child 145835 fae75f6635c0a138a8d979b339beaf56a4a346e4
push id2697
push userbbajaj@mozilla.com
push dateMon, 05 Aug 2013 18:49:53 +0000
treeherdermozilla-beta@dfec938c7b63 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersnrc
bugs879149
milestone24.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 879149 - Don't attempt to use ContentClientIncremental when not using GL layers. r=nrc
gfx/layers/basic/BasicCompositor.cpp
gfx/layers/client/ContentClient.cpp
--- a/gfx/layers/basic/BasicCompositor.cpp
+++ b/gfx/layers/basic/BasicCompositor.cpp
@@ -74,17 +74,19 @@ protected:
   IntSize mSize;
 };
 
 TemporaryRef<TextureHost>
 CreateBasicTextureHost(SurfaceDescriptorType aDescriptorType,
                        uint32_t aTextureHostFlags,
                        uint32_t aTextureFlags)
 {
-  MOZ_ASSERT(aDescriptorType == SurfaceDescriptor::TShmem, "We can only support Shmem currently");
+  MOZ_ASSERT(aDescriptorType == SurfaceDescriptor::TShmem ||
+             aDescriptorType == SurfaceDescriptor::TMemoryImage,
+             "We can only support Shmem currently");
   return new TextureSourceBasic();
 }
 
 BasicCompositor::BasicCompositor(nsIWidget *aWidget)
   : mWidget(aWidget)
   , mWidgetSize(-1, -1)
 {
   MOZ_COUNT_CTOR(BasicCompositor);
--- a/gfx/layers/client/ContentClient.cpp
+++ b/gfx/layers/client/ContentClient.cpp
@@ -40,20 +40,22 @@ ContentClient::CreateContentClient(Compo
   {
     useDoubleBuffering = LayerManagerComposite::SupportsDirectTexturing();
   }
 
   if (useDoubleBuffering || PR_GetEnv("MOZ_FORCE_DOUBLE_BUFFERING")) {
     return new ContentClientDoubleBuffered(aForwarder);
   }
 #ifdef XP_MACOSX
-  return new ContentClientIncremental(aForwarder);
-#else
+  if (aForwarder->GetCompositorBackendType() == LAYERS_OPENGL) {
+    return new ContentClientIncremental(aForwarder);
+  }
+#endif
   return new ContentClientSingleBuffered(aForwarder);
-#endif
+
 }
 
 ContentClientBasic::ContentClientBasic(CompositableForwarder* aForwarder,
                                        BasicLayerManager* aManager)
 : ContentClient(aForwarder), ThebesLayerBuffer(ContainsVisibleBounds), mManager(aManager)
 {}
 
 already_AddRefed<gfxASurface>