Bug 832383 - Ensure color fill rect stays inside screen bounds. r=mwu
authorDiego Wilson <dwilson@codeaurora.org>
Mon, 29 Apr 2013 16:51:51 -0700
changeset 141870 f52a8c803f263f9ee6f850f465b86c13f14c8491
parent 141869 5feac049908f2a910002c2ef98c8a237aea2870f
child 141871 a49d9292b321b3e9922329cb24c9ed31bba10951
push id2579
push userakeybl@mozilla.com
push dateMon, 24 Jun 2013 18:52:47 +0000
treeherdermozilla-beta@b69b7de8a05a [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmwu
bugs832383
milestone23.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 832383 - Ensure color fill rect stays inside screen bounds. r=mwu
widget/gonk/HwcComposer2D.cpp
--- a/widget/gonk/HwcComposer2D.cpp
+++ b/widget/gonk/HwcComposer2D.cpp
@@ -161,26 +161,26 @@ PrepareLayerRects(nsIntRect aVisible, co
     }
 
     gfxMatrix inverse(aTransform);
     inverse.Invert();
     gfxRect crop = inverse.TransformBounds(visibleRectScreen);
 
     //clip to buffer size
     crop.IntersectRect(crop, aBufferRect);
-    crop.RoundOut();
+    crop.Round();
 
     if (crop.IsEmpty()) {
         LOGD("Skip layer");
         return false;
     }
 
     //propagate buffer clipping back to visible rect
     visibleRectScreen = aTransform.TransformBounds(crop);
-    visibleRectScreen.RoundOut();
+    visibleRectScreen.Round();
 
     // Map from layer space to buffer space
     crop -= aBufferRect.TopLeft();
 
     aSourceCrop->left = crop.x;
     aSourceCrop->top  = crop.y;
     aSourceCrop->right  = crop.x + crop.width;
     aSourceCrop->bottom = crop.y + crop.height;
@@ -219,17 +219,17 @@ PrepareVisibleRegion(const nsIntRegion& 
     bool isVisible = false;
     while (const nsIntRect* visibleRect = rect.Next()) {
         hwc_rect_t visibleRectScreen;
         gfxRect screenRect;
 
         screenRect.IntersectRect(gfxRect(*visibleRect), aBufferRect);
         screenRect = aTransform.TransformBounds(screenRect);
         screenRect.IntersectRect(screenRect, aClip);
-        screenRect.RoundIn();
+        screenRect.Round();
         if (screenRect.IsEmpty()) {
             continue;
         }
         visibleRectScreen.left = screenRect.x;
         visibleRectScreen.top  = screenRect.y;
         visibleRectScreen.right  = screenRect.XMost();
         visibleRectScreen.bottom = screenRect.YMost();
         aVisibleRegionScreen->push_back(visibleRectScreen);