Bug 1450249. blob-invalidation: Round the bounds. r=mstange draft
authorJeff Muizelaar <jmuizelaar@mozilla.com>
Thu, 29 Mar 2018 18:26:48 -0400
changeset 776884 d689df4e6f49f8ce04042408adce72db62f8e3ba
parent 776883 ac2a749537595eda3b5d048ef379ac40e3241029
push id105029
push userbmo:jmuizelaar@mozilla.com
push dateTue, 03 Apr 2018 21:31:58 +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
@@ -530,17 +530,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);
       }