Bug 1201541 - Use SingleTiledContentClient for non-scrollable layers on Android r=mattwoodrow
☠☠ backed out by fcd8a338f3ad ☠ ☠
authorJames Willcox <snorp@snorp.net>
Thu, 03 Sep 2015 11:43:09 -0500
changeset 296335 5b98866735147c0e24a9a2329de27c8131f4ba5f
parent 296334 719a4fbded105758a45503c2cd8240242d924809
child 296336 4b301ec04c21b339af87dd31b9e298a40c90f80e
push id962
push userjlund@mozilla.com
push dateFri, 04 Dec 2015 23:28:54 +0000
treeherdermozilla-release@23a2d286e80f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmattwoodrow
bugs1201541
milestone43.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 1201541 - Use SingleTiledContentClient for non-scrollable layers on Android r=mattwoodrow
gfx/layers/client/ClientTiledPaintedLayer.cpp
layout/base/FrameLayerBuilder.cpp
--- a/gfx/layers/client/ClientTiledPaintedLayer.cpp
+++ b/gfx/layers/client/ClientTiledPaintedLayer.cpp
@@ -406,22 +406,19 @@ ClientTiledPaintedLayer::EndPaint()
 void
 ClientTiledPaintedLayer::RenderLayer()
 {
   LayerManager::DrawPaintedLayerCallback callback =
     ClientManager()->GetPaintedLayerCallback();
   void *data = ClientManager()->GetPaintedLayerCallbackData();
 
   if (!mContentClient) {
-#if defined(MOZ_B2G) || defined(XP_MACOSX)
     if (mCreationHint == LayerManager::NONE) {
       mContentClient = new SingleTiledContentClient(this, ClientManager());
-    } else
-#endif
-    {
+    } else {
       mContentClient = new MultiTiledContentClient(this, ClientManager());
     }
 
     mContentClient->Connect();
     ClientManager()->AsShadowForwarder()->Attach(mContentClient, this);
     MOZ_ASSERT(mContentClient->GetForwarder());
   }
 
@@ -555,27 +552,23 @@ ClientTiledPaintedLayer::RenderLayer()
   // If we get here, we've done all the high- and low-precision
   // paints we wanted to do, so we can finish the paint and chill.
   EndPaint();
 }
 
 bool
 ClientTiledPaintedLayer::IsOptimizedFor(LayerManager::PaintedLayerCreationHint aHint)
 {
-#if defined(MOZ_B2G) || defined(XP_MACOSX)
   // The only creation hint is whether the layer is scrollable or not, and this
   // is only respected on B2G and OSX, where it's used to determine whether to
   // use a tiled content client or not.
   // There are pretty nasty performance consequences for not using tiles on
   // large, scrollable layers, so we want the layer to be recreated in this
   // situation.
   return aHint == GetCreationHint();
-#else
-  return true;
-#endif
 }
 
 void
 ClientTiledPaintedLayer::PrintInfo(std::stringstream& aStream, const char* aPrefix)
 {
   PaintedLayer::PrintInfo(aStream, aPrefix);
   if (mContentClient) {
     aStream << "\n";
--- a/layout/base/FrameLayerBuilder.cpp
+++ b/layout/base/FrameLayerBuilder.cpp
@@ -2035,19 +2035,16 @@ InvalidateEntirePaintedLayer(PaintedLaye
   ResetScrollPositionForLayerPixelAlignment(aAnimatedGeometryRoot);
 }
 
 LayerManager::PaintedLayerCreationHint
 ContainerState::GetLayerCreationHint(const nsIFrame* aAnimatedGeometryRoot)
 {
   // Check whether the layer will be scrollable. This is used as a hint to
   // influence whether tiled layers are used or not.
-  if (mParameters.mInLowPrecisionDisplayPort) {
-    return LayerManager::SCROLLABLE;
-  }
   nsIFrame* animatedGeometryRootParent = aAnimatedGeometryRoot->GetParent();
   nsIScrollableFrame* scrollable = do_QueryFrame(animatedGeometryRootParent);
   if (scrollable
 #ifdef MOZ_B2G
       && scrollable->WantAsyncScroll()
 #endif
      ) {
     // WantAsyncScroll() returns false when the frame has overflow:hidden,