Bug 1456281. Ensure that we don't need to call ComputeInvalidationRegion. r=mstange draft
authorJeff Muizelaar <jmuizelaar@mozilla.com>
Mon, 30 Apr 2018 22:42:51 -0400
changeset 790288 17cb6969152eecb590d8746a0156dceed571a3a9
parent 786949 781457239e63258ea069ccdd16ebaadb6c5fa33b
push id108479
push userbmo:jmuizelaar@mozilla.com
push dateTue, 01 May 2018 21:08:16 +0000
reviewersmstange
bugs1456281
milestone61.0a1
Bug 1456281. Ensure that we don't need to call ComputeInvalidationRegion. r=mstange SVG reflow should make any changed items as invalid so this path of the code should never be hit.
gfx/layers/wr/WebRenderCommandBuilder.cpp
--- a/gfx/layers/wr/WebRenderCommandBuilder.cpp
+++ b/gfx/layers/wr/WebRenderCommandBuilder.cpp
@@ -399,16 +399,19 @@ struct DIGroup
     } else {
       MOZ_RELEASE_ASSERT(imageRect.IsEqualEdges(aData->mImageRect));
       MOZ_RELEASE_ASSERT(mLayerBounds.TopLeft() == aData->mGroupOffset);
       GP("else invalidate: %s\n", aItem->Name());
       aData->mGeometry->MoveBy(shift);
       // this includes situations like reflow changing the position
       aItem->ComputeInvalidationRegion(aBuilder, aData->mGeometry.get(), &combined);
       if (!combined.IsEmpty()) {
+        // All changes to the invalidation region should be handled by SVG
+        // reflow marking the frame as invalid
+        MOZ_RELEASE_ASSERT(false);
         // 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(shift, aData->mGeometry->ComputeInvalidationRegion(), clip,
                                                    geometry ? geometry->ComputeInvalidationRegion() :
                                                    aData->mGeometry->ComputeInvalidationRegion(),
                                                    &combined);