Bug 1403920 - Use RecomputeVisibility instead of ComputeVisibility to avoid triggering assertion failures. r?mattwoodrow
MozReview-Commit-ID: LPIIM516rZL
--- 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));