Bug 1493616. Make sure we invalidate the entire area of the item r=mstange
authorJeff Muizelaar <jmuizelaar@mozilla.com>
Wed, 10 Oct 2018 01:16:39 +0000
changeset 440378 6a8e290867331e18b0178b1f55ca026f813da6d5
parent 440377 b85ace8c5339f5f24e7d104b4a8146dc92bb694d
child 440379 a6de39c7149c9fe6d4c4f60349abbcda15d54bbf
push id70655
push userjmuizelaar@mozilla.com
push dateWed, 10 Oct 2018 02:29:32 +0000
treeherderautoland@6a8e29086733 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmstange
bugs1493616
milestone64.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 1493616. Make sure we invalidate the entire area of the item r=mstange Differential Revision: https://phabricator.services.mozilla.com/D8125
gfx/layers/wr/WebRenderCommandBuilder.cpp
--- a/gfx/layers/wr/WebRenderCommandBuilder.cpp
+++ b/gfx/layers/wr/WebRenderCommandBuilder.cpp
@@ -470,43 +470,32 @@ struct DIGroup
       GP("else invalidate: %s\n", aItem->Name());
       // this includes situations like reflow changing the position
       aItem->ComputeInvalidationRegion(aBuilder, aData->mGeometry.get(), &combined);
       if (!combined.IsEmpty()) {
         // There might be no point in doing this elaborate tracking here to get
         // smaller areas
         InvalidateRect(aData->mRect.Intersect(imageRect)); // invalidate the old area -- in theory combined should take care of this
         UniquePtr<nsDisplayItemGeometry> geometry(aItem->AllocateGeometry(aBuilder));
-        aData->mClip.AddOffsetAndComputeDifference(nsPoint(), aData->mGeometry->ComputeInvalidationRegion(), clip,
-                                                   geometry ? geometry->ComputeInvalidationRegion() :
-                                                   aData->mGeometry->ComputeInvalidationRegion(),
-                                                   &combined);
-        IntRect transformedRect = ToDeviceSpace(combined.GetBounds(), aMatrix, appUnitsPerDevPixel, mLayerBounds.TopLeft());
-        IntRect invalidRect = transformedRect.Intersect(imageRect);
-        GP("combined not empty: mRect %d %d %d %d\n", invalidRect.x, invalidRect.y, invalidRect.width, invalidRect.height);
         // invalidate the invalidated area.
-        InvalidateRect(invalidRect);
 
         aData->mGeometry = std::move(geometry);
 
         combined = clip.ApplyNonRoundedIntersection(aData->mGeometry->ComputeInvalidationRegion());
-        transformedRect = ToDeviceSpace(combined.GetBounds(), aMatrix, appUnitsPerDevPixel, mLayerBounds.TopLeft());
+        IntRect transformedRect = ToDeviceSpace(combined.GetBounds(), aMatrix, appUnitsPerDevPixel, mLayerBounds.TopLeft());
         aData->mRect = transformedRect.Intersect(imageRect);
+        InvalidateRect(aData->mRect);
 
         // CGC invariant broken
         if (!mInvalidRect.Contains(aData->mRect)) {
           gfxCriticalError() << "CGC-" <<
             "-" << aData->mRect.x <<
             "-" << aData->mRect.y <<
             "-" << aData->mRect.width <<
             "-" << aData->mRect.height <<
-            "," << invalidRect.x <<
-            "-" << invalidRect.y <<
-            "-" << invalidRect.width <<
-            "-" << invalidRect.height <<
             "-ib";
         }
 
         aData->mInvalid = true;
         aData->mInvalidRegion = true;
       } else {
         if (aData->mClip != clip) {
           UniquePtr<nsDisplayItemGeometry> geometry(aItem->AllocateGeometry(aBuilder));