Commit 55ed790a authored by Jeff Muizelaar's avatar Jeff Muizelaar
Browse files

Bug 1728246. Avoid calling ComputeVisibility() during fallback. r=mattwoodrow

The only advantage we were getting from this was from GetOpaqueRegion, but
that no longer applies now that GetOpaqueRegion does the calculation directly.

Differential Revision: https://phabricator.services.mozilla.com/D124107
parent efa40c64
Loading
Loading
Loading
Loading
+0 −5
Original line number Diff line number Diff line
@@ -2162,13 +2162,8 @@ WebRenderCommandBuilder::GenerateFallbackData(
                           ? itemBounds
                           : aItem->GetClippedBounds(aDisplayListBuilder);

  // nsDisplayItem::Paint() may refer the variables that come from
  // ComputeVisibility(). So we should call ComputeVisibility() before painting.
  // e.g.: nsDisplayBoxShadowInner uses mPaintRect in Paint() and mPaintRect is
  // computed in nsDisplayBoxShadowInner::ComputeVisibility().
  nsRegion visibleRegion(paintBounds);
  aItem->SetPaintRect(paintBounds);
  aItem->ComputeVisibility(aDisplayListBuilder, &visibleRegion);

  const int32_t appUnitsPerDevPixel =
      aItem->Frame()->PresContext()->AppUnitsPerDevPixel();