Backed out changeset 643f81697dae (bug 1444447) because it causes graphical corruption in menus, see bug 1444447 comment 25 a=backout
authorAndreea Pavel <apavel@mozilla.com>
Fri, 19 Apr 2019 01:15:25 +0300
changeset 528867 2ccc6648064315964dd23039ad28ebf7d9f82999
parent 528866 b44914767f72367a7e4b01c9fd0ba9258c41570c
child 528872 ce50468eb8b2fa4e48ed70075c144a9b3bf16566
child 528933 63f2f8138861f1df35d280c4a1f3f5591ef9a4a4
push id11265
push userffxbld-merge
push dateMon, 13 May 2019 10:53:39 +0000
treeherdermozilla-beta@77e0fe8dbdd3 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbackout
bugs1444447
milestone68.0a1
backs out643f81697dae477c942c9d73be6eae5e89702200
first release with
nightly linux32
2ccc66480643 / 68.0a1 / 20190418221600 / files
nightly linux64
2ccc66480643 / 68.0a1 / 20190418221600 / files
nightly mac
2ccc66480643 / 68.0a1 / 20190418221600 / files
nightly win32
2ccc66480643 / 68.0a1 / 20190418221600 / files
nightly win64
2ccc66480643 / 68.0a1 / 20190418221600 / 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 643f81697dae (bug 1444447) because it causes graphical corruption in menus, see bug 1444447 comment 25 a=backout
gfx/layers/basic/BasicCompositor.cpp
--- a/gfx/layers/basic/BasicCompositor.cpp
+++ b/gfx/layers/basic/BasicCompositor.cpp
@@ -1055,42 +1055,41 @@ void BasicCompositor::TryToEndRemoteDraw
                                [self]() { self->TryToEndRemoteDrawing(); });
     MessageLoop::current()->PostDelayedTask(runnable.forget(), retryMs);
     return;
   }
 
   if (mRenderTarget->mDrawTarget != mDrawTarget || mFullWindowRenderTarget) {
     RefPtr<SourceSurface> source;
 
-    // Note: Most platforms require us to buffer drawing to the widget
-    // surface. That's why we don't draw to mDrawTarget directly.
-    IntPoint srcOffset = mTarget ? mTargetBounds.TopLeft() : IntPoint();
-    IntPoint dstOffset = mRenderTarget->GetOrigin();
-
     if (mRenderTarget->mDrawTarget != mDrawTarget) {
       source = mWidget->EndBackBufferDrawing();
 
+      // Note: Most platforms require us to buffer drawing to the widget
+      // surface. That's why we don't draw to mDrawTarget directly.
+      nsIntPoint offset = mTarget ? mTargetBounds.TopLeft() : nsIntPoint();
+
       // The source DrawTarget is clipped to the invalidation region, so we have
       // to copy the individual rectangles in the region or else we'll draw
       // blank pixels.
       for (auto iter = mInvalidRegion.RectIter(); !iter.Done(); iter.Next()) {
         const LayoutDeviceIntRect& r = iter.Get();
-        mDrawTarget->CopySurface(source, r.ToUnknownRect() - srcOffset,
-                                 r.TopLeft().ToUnknownPoint() - dstOffset);
+        mDrawTarget->CopySurface(source,
+                                 r.ToUnknownRect() - mRenderTarget->GetOrigin(),
+                                 r.TopLeft().ToUnknownPoint() - offset);
       }
     } else {
       source = mRenderTarget->mDrawTarget->Snapshot();
     }
 
     if (mFullWindowRenderTarget) {
       for (auto iter = mInvalidRegion.RectIter(); !iter.Done(); iter.Next()) {
         const LayoutDeviceIntRect& r = iter.Get();
         mFullWindowRenderTarget->mDrawTarget->CopySurface(
-            source, r.ToUnknownRect() - srcOffset,
-            r.TopLeft().ToUnknownPoint() - dstOffset);
+            source, r.ToUnknownRect(), r.TopLeft().ToUnknownPoint());
       }
 
       mFullWindowRenderTarget->mDrawTarget->Flush();
     }
   }
 
   if (aForceToEnd || !mTarget) {
     mWidget->EndRemoteDrawingInRegion(mDrawTarget, mInvalidRegion);