Backed out changeset 333cd39619fe (bug 1121871) for causing C2 Regressions
authorCarsten "Tomcat" Book <cbook@mozilla.com>
Wed, 18 Feb 2015 09:08:54 +0100
changeset 229562 9696d1c4b3ba3c8dbf937ee7747cb16abefb3603
parent 229561 93ddd99ffd86b5fd925a02b6d83a6e69c57e32b6
child 229569 ac1ad74bcfd1f4591e0ac8c6bb1bd193a36b3fb0
child 229595 c7983f7c97933e6bfa36a736bcf120db6eb76de3
child 229682 95c1fecef4f6f8d3f06f56017a3b67ebdd9fe334
push id28291
push usercbook@mozilla.com
push dateWed, 18 Feb 2015 08:09:11 +0000
treeherdermozilla-central@9696d1c4b3ba [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1121871
milestone38.0a1
backs out333cd39619fef15e2ddde2f831fadd863aecf036
first release with
nightly linux32
9696d1c4b3ba / 38.0a1 / 20150218030228 / files
nightly linux64
9696d1c4b3ba / 38.0a1 / 20150218030228 / files
nightly mac
9696d1c4b3ba / 38.0a1 / 20150218030228 / files
nightly win32
9696d1c4b3ba / 38.0a1 / 20150218030228 / files
nightly win64
9696d1c4b3ba / 38.0a1 / 20150218030228 / files
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
releases
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Backed out changeset 333cd39619fe (bug 1121871) for causing C2 Regressions
gfx/layers/client/ClientTiledPaintedLayer.cpp
--- a/gfx/layers/client/ClientTiledPaintedLayer.cpp
+++ b/gfx/layers/client/ClientTiledPaintedLayer.cpp
@@ -413,30 +413,46 @@ ClientTiledPaintedLayer::RenderLayer()
   }
 
   if (!ClientManager()->IsRepeatTransaction()) {
     // Only paint the mask layer on the first transaction.
     if (GetMaskLayer()) {
       ToClientLayer(GetMaskLayer())->RenderLayer();
     }
 
+    // For more complex cases we need to calculate a bunch of metrics before we
+    // can do the paint.
+    BeginPaint();
+    if (mPaintData.mPaintFinished) {
+      return;
+    }
+
     // In some cases we can take a fast path and just be done with it.
     if (UseFastPath()) {
       TILING_LOG("TILING %p: Taking fast-path\n", this);
       mValidRegion = neededRegion;
+
+      // Make sure that tiles that fall outside of the visible region or outside of the
+      // critical displayport are discarded on the first update. Also make sure that we
+      // only draw stuff inside the critical displayport on the first update.
+      if (!mPaintData.mCriticalDisplayPort.IsEmpty()) {
+        mValidRegion.And(mValidRegion, LayerIntRect::ToUntyped(mPaintData.mCriticalDisplayPort));
+        invalidRegion.And(invalidRegion, LayerIntRect::ToUntyped(mPaintData.mCriticalDisplayPort));
+      }
+
+      if (invalidRegion.IsEmpty()) {
+        EndPaint();
+        return;
+      }
+
+      mContentClient->mTiledBuffer.SetFrameResolution(mPaintData.mResolution);
       mContentClient->mTiledBuffer.PaintThebes(mValidRegion, invalidRegion, callback, data);
       ClientManager()->Hold(this);
       mContentClient->UseTiledLayerBuffer(TiledContentClient::TILED_BUFFER);
-      return;
-    }
-
-    // For more complex cases we need to calculate a bunch of metrics before we
-    // can do the paint.
-    BeginPaint();
-    if (mPaintData.mPaintFinished) {
+      EndPaint();
       return;
     }
 
     // Make sure that tiles that fall outside of the visible region or outside of the
     // critical displayport are discarded on the first update. Also make sure that we
     // only draw stuff inside the critical displayport on the first update.
     mValidRegion.And(mValidRegion, neededRegion);
     if (!mPaintData.mCriticalDisplayPort.IsEmpty()) {