Bug 1576499 - Two random cleanups. r=mattwoodrow
authorMarkus Stange <mstange@themasta.com>
Wed, 28 Aug 2019 21:47:47 +0000
changeset 554280 0c2e876254cb9c6a297a3abc5401ddcffc71b944
parent 554279 5857954dc2a1a27fe9bd9f6078677f49f30805b2
child 554281 b80e328a4f866ec09a880e8112f24b61d97e22e0
push id2165
push userffxbld-merge
push dateMon, 14 Oct 2019 16:30:58 +0000
treeherdermozilla-release@0eae18af659f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmattwoodrow
bugs1576499
milestone70.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 1576499 - Two random cleanups. r=mattwoodrow Differential Revision: https://phabricator.services.mozilla.com/D43383
gfx/layers/basic/BasicCompositor.cpp
gfx/layers/opengl/CompositorOGL.cpp
--- a/gfx/layers/basic/BasicCompositor.cpp
+++ b/gfx/layers/basic/BasicCompositor.cpp
@@ -641,18 +641,17 @@ void BasicCompositor::DrawGeometry(
     if (!dest) {
       return;
     }
 
     dest->SetTransform(Matrix::Translation(-aRect.X(), -aRect.Y()));
 
     // Get the bounds post-transform.
     transformBounds = aTransform.TransformAndClipBounds(
-        aRect, Rect(offset.x, offset.y, buffer->GetSize().width,
-                    buffer->GetSize().height));
+        aRect, Rect(mRenderTarget->GetRect()));
     transformBounds.RoundOut();
 
     if (transformBounds.IsEmpty()) {
       return;
     }
 
     newTransform = Matrix();
 
--- a/gfx/layers/opengl/CompositorOGL.cpp
+++ b/gfx/layers/opengl/CompositorOGL.cpp
@@ -1290,17 +1290,17 @@ void CompositorOGL::DrawGeometry(const G
   Rect renderBound(0, 0, size.width, size.height);
   renderBound.IntersectRect(renderBound, Rect(aClipRect));
   renderBound.MoveBy(offset);
 
   Rect destRect = aTransform.TransformAndClipBounds(aRect, renderBound);
 
   // XXX: This doesn't handle 3D transforms. It also doesn't handled rotated
   //      quads. Fix me.
-  mPixelsFilled += destRect.Width() * destRect.Height();
+  mPixelsFilled += destRect.Area();
 
   // Do a simple culling if this rect is out of target buffer.
   // Inflate a small size to avoid some numerical imprecision issue.
   destRect.Inflate(1, 1);
   destRect.MoveBy(-offset);
   renderBound = Rect(0, 0, size.width, size.height);
   if (!renderBound.Intersects(destRect)) {
     return;