Bug 1450249. blob-invalidation: Round the bounds. r=mstange
authorJeff Muizelaar <jmuizelaar@mozilla.com>
Thu, 29 Mar 2018 18:26:48 -0400
changeset 777148 763909764666b7d617875226e21cce0c8074b959
parent 777147 363cd8bba7744e99cc7de66a9b89a3617551334e
child 777149 6415ccbf739f36f71548540bd92c3b86ab9e1529
push id105088
push userjdescottes@mozilla.com
push dateWed, 04 Apr 2018 10:12:11 +0000
reviewersmstange
bugs1450249
milestone61.0a1
Bug 1450249. blob-invalidation: Round the bounds. r=mstange This fixes a number of reftest failures.
gfx/layers/wr/WebRenderCommandBuilder.cpp
--- a/gfx/layers/wr/WebRenderCommandBuilder.cpp
+++ b/gfx/layers/wr/WebRenderCommandBuilder.cpp
@@ -535,17 +535,20 @@ struct DIGroup
         InvalidateRect(data->mRect);
         iter.Remove();
         delete data;
       } else {
         data->mUsed = false;
       }
     }
 
+    // Round the bounds in a way that matches the existing fallback code
     LayoutDeviceRect bounds = LayoutDeviceRect::FromAppUnits(mGroupBounds, aGrouper->mAppUnitsPerDevPixel);
+    bounds = LayoutDeviceRect(RoundedToInt(bounds));
+
     IntSize size = mGroupBounds.Size().ScaleToNearestPixels(mScale.width, mScale.height, aGrouper->mAppUnitsPerDevPixel);
 
     if (mInvalidRect.IsEmpty()) {
       GP("Not repainting group because it's empty\n");
       GP("End EndGroup\n");
       if (mKey) {
         PushImage(aBuilder, bounds);
       }