Backed out changeset c8700e65f41b (bug 1284440) for causing graphic issues (bug 1285243). r=backout
authorSebastian Hengst <archaeopteryx@coole-files.de>
Thu, 07 Jul 2016 17:30:10 +0200
changeset 346101 63cc31d6cc1c8089590461016ce0b4a2fb77ecbc
parent 346100 4764b9f8e6d4ef9823237f01ca3901759ce8daeb
child 346109 94cce4e79310565ff5b169f890842499ea713f8a
child 346138 2c1fb7644cd9d1bdc17050d5742f1624caf03d09
child 346193 5eee8c97b40876ba9b529d70bd6ccec249fc5dce
push id1230
push userjlund@mozilla.com
push dateMon, 31 Oct 2016 18:13:35 +0000
treeherdermozilla-release@5e06e3766db2 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbackout
bugs1284440, 1285243
milestone50.0a1
backs outc8700e65f41b9a7ead1047848e06d1eddd62564d
first release with
nightly linux32
63cc31d6cc1c / 50.0a1 / 20160707083343 / files
nightly linux64
63cc31d6cc1c / 50.0a1 / 20160707083343 / files
nightly mac
63cc31d6cc1c / 50.0a1 / 20160707083343 / files
nightly win32
63cc31d6cc1c / 50.0a1 / 20160707083343 / files
nightly win64
63cc31d6cc1c / 50.0a1 / 20160707083343 / 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 c8700e65f41b (bug 1284440) for causing graphic issues (bug 1285243). r=backout MozReview-Commit-ID: 3tWcNPLSV9f
gfx/layers/basic/BasicCompositor.cpp
--- a/gfx/layers/basic/BasicCompositor.cpp
+++ b/gfx/layers/basic/BasicCompositor.cpp
@@ -616,20 +616,16 @@ BasicCompositor::BeginFrame(const nsIntR
   if (!aOpaqueRegion.IsEmpty()) {
     LayoutDeviceIntRegion clearRegion = mInvalidRegion;
     clearRegion.SubOut(LayoutDeviceIntRegion::FromUnknownRegion(aOpaqueRegion));
     clearRect = clearRegion.GetBounds();
   } else {
     clearRect = mInvalidRect;
   }
 
-  // Prevent CreateRenderTargetForWindow from clearing unwanted area.
-  gfxUtils::ClipToRegion(mDrawTarget,
-                         mInvalidRegion.ToUnknownRegion());
-
   // Setup an intermediate render target to buffer all compositing. We will
   // copy this into mDrawTarget (the widget), and/or mTarget in EndFrame()
   RefPtr<CompositingRenderTarget> target =
     CreateRenderTargetForWindow(mInvalidRect,
                                 clearRect,
                                 bufferMode);
   if (!target) {
     if (!mTarget) {
@@ -638,20 +634,18 @@ BasicCompositor::BeginFrame(const nsIntR
     return;
   }
   SetRenderTarget(target);
 
   // We only allocate a surface sized to the invalidated region, so we need to
   // translate future coordinates.
   mRenderTarget->mDrawTarget->SetTransform(Matrix::Translation(-mRenderTarget->GetOrigin()));
 
-  if (mRenderTarget->mDrawTarget != mDrawTarget) {
-    gfxUtils::ClipToRegion(mRenderTarget->mDrawTarget,
-                           mInvalidRegion.ToUnknownRegion());
-  }
+  gfxUtils::ClipToRegion(mRenderTarget->mDrawTarget,
+                         mInvalidRegion.ToUnknownRegion());
 
   if (aRenderBoundsOut) {
     *aRenderBoundsOut = rect;
   }
 
   if (aClipRectIn) {
     mRenderTarget->mDrawTarget->PushClipRect(Rect(*aClipRectIn));
   } else {
@@ -676,20 +670,17 @@ BasicCompositor::EndFrame()
     float b = float(rand()) / RAND_MAX;
     // We're still clipped to mInvalidRegion, so just fill the bounds.
     mRenderTarget->mDrawTarget->FillRect(
       IntRectToRect(mInvalidRegion.GetBounds()).ToUnknownRect(),
       ColorPattern(Color(r, g, b, 0.2f)));
   }
 
   // Pop aInvalidregion
-  mDrawTarget->PopClip();
-  if (mRenderTarget->mDrawTarget != mDrawTarget) {
-    mRenderTarget->mDrawTarget->PopClip();
-  }
+  mRenderTarget->mDrawTarget->PopClip();
 
   if (mTarget || mRenderTarget->mDrawTarget != mDrawTarget) {
     // Note: Most platforms require us to buffer drawing to the widget surface.
     // That's why we don't draw to mDrawTarget directly.
     RefPtr<SourceSurface> source;
     if (mRenderTarget->mDrawTarget != mDrawTarget) {
       source = mWidget->EndBackBufferDrawing();
     } else {