Bug 1393077 - Part2. Round the offset for the fallback. r=kats draft
authorEthan Lin <ethlin@mozilla.com>
Thu, 31 Aug 2017 18:20:06 +0800
changeset 662972 9cc5b9d15c9730bac278c182d0bbb8d7060e13c4
parent 662971 783a006b683ff4c7172266d805614b53840eec92
child 662973 dc2635f195da1ca7223c3dcfac5ce82ac6cca107
child 662974 1b7755bea7dee49535154015d78db1342f8fb966
push id79260
push userbmo:ethlin@mozilla.com
push dateTue, 12 Sep 2017 09:51:08 +0000
reviewerskats
bugs1393077
milestone57.0a1
Bug 1393077 - Part2. Round the offset for the fallback. r=kats MozReview-Commit-ID: GfTrA7bChuc
gfx/layers/wr/WebRenderLayerManager.cpp
--- a/gfx/layers/wr/WebRenderLayerManager.cpp
+++ b/gfx/layers/wr/WebRenderLayerManager.cpp
@@ -536,20 +536,17 @@ WebRenderLayerManager::GenerateFallbackD
       PixelCastJustification::WebRenderHasUnitResolution);
 
   LayerIntSize imageSize = RoundedToInt(bounds.Size());
   aImageRect = LayerRect(LayerPoint(0, 0), LayerSize(imageSize));
   if (imageSize.width == 0 || imageSize.height == 0) {
     return nullptr;
   }
 
-  aOffset = ViewAs<LayerPixel>(
-      LayoutDevicePoint::FromAppUnits(clippedBounds.TopLeft(), appUnitsPerDevPixel),
-      PixelCastJustification::WebRenderHasUnitResolution);
-
+  aOffset = RoundedToInt(bounds.TopLeft());
   nsRegion invalidRegion;
   nsAutoPtr<nsDisplayItemGeometry> geometry = fallbackData->GetGeometry();
 
   if (geometry) {
     nsRect invalid;
     if (aItem->IsInvalid(invalid)) {
       invalidRegion.OrWith(clippedBounds);
     } else {