Bug 1403920 - Use RecomputeVisibility instead of ComputeVisibility to avoid triggering assertion failures. r?mattwoodrow draft
authorKartikaya Gupta <kgupta@mozilla.com>
Thu, 05 Oct 2017 10:45:55 -0400
changeset 675595 d67f1295f38e11b189e6313b23a08a516b127a67
parent 675508 53bbdaaa2b8c1819061be26101b075c081b23260
child 734649 0e55301e006bbc41d657ec30f17ec141842f60ad
push id83179
push userkgupta@mozilla.com
push dateThu, 05 Oct 2017 15:45:59 +0000
reviewersmattwoodrow
bugs1403920
milestone58.0a1
Bug 1403920 - Use RecomputeVisibility instead of ComputeVisibility to avoid triggering assertion failures. r?mattwoodrow MozReview-Commit-ID: LPIIM516rZL
gfx/layers/wr/WebRenderCommandBuilder.cpp
--- a/gfx/layers/wr/WebRenderCommandBuilder.cpp
+++ b/gfx/layers/wr/WebRenderCommandBuilder.cpp
@@ -402,21 +402,21 @@ WebRenderCommandBuilder::GenerateFallbac
   const DisplayItemClip& clip = aItem->GetClip();
   // Blob images will only draw the visible area of the blob so we don't need to clip
   // them here and can just rely on the webrender clipping.
   if (clip.HasClip() && !gfxPrefs::WebRenderBlobImages()) {
     clippedBounds = itemBounds.Intersect(clip.GetClipRect());
   }
 
   // nsDisplayItem::Paint() may refer the variables that come from ComputeVisibility().
-  // So we should call ComputeVisibility() before painting. e.g.: nsDisplayBoxShadowInner
+  // So we should call RecomputeVisibility() before painting. e.g.: nsDisplayBoxShadowInner
   // uses mVisibleRegion in Paint() and mVisibleRegion is computed in
   // nsDisplayBoxShadowInner::ComputeVisibility().
   nsRegion visibleRegion(clippedBounds);
-  aItem->ComputeVisibility(aDisplayListBuilder, &visibleRegion);
+  aItem->RecomputeVisibility(aDisplayListBuilder, &visibleRegion);
 
   const int32_t appUnitsPerDevPixel = aItem->Frame()->PresContext()->AppUnitsPerDevPixel();
   LayerRect bounds = ViewAs<LayerPixel>(
       LayoutDeviceRect::FromAppUnits(clippedBounds, appUnitsPerDevPixel),
       PixelCastJustification::WebRenderHasUnitResolution);
 
   gfx::Size scale = aSc.GetInheritedScale();
   LayerIntSize paintSize = RoundedToInt(LayerSize(bounds.width * scale.width, bounds.height * scale.height));