Open Bug 1729237 Opened 4 years ago Updated 1 year ago

Don't use nsDisplayItem::GetBuildingRect within WebRenderCommandBuilder

Categories

(Core :: Graphics: WebRender, task, P2)

task

Tracking

()

People

(Reporter: mattwoodrow, Assigned: jrmuizel)

References

(Blocks 2 open bugs)

Details

There's also a usage of GetUntransformedPaintRect, which should be the same value.

Here's some of the plan:

mozilla::layers::WebRenderCommandBuilder::BuildWrMaskImage:

  • Add a visible/building rect to nsDisplayMasksAndClipPaths

mozilla::layers::DetectContainerLayerPropertiesBoundsChange and mozilla::layers::Grouper::PaintContainerItem

  • Add a building rect to transforms, filters and masks

mozilla::layers::WebRenderCommandBuilder::GenerateFallbackData:

  • Drop the use of GetBuildingRect() for invalidation reasons because we don't have to worry about items using it to change their painting
  • What about getting a reasonable visible region for an arbitrary item? Walk up the frame tree/asr tree to find out how we're clipped

(In reply to Jeff Muizelaar [:jrmuizel] from comment #1)

  • What about getting a reasonable visible region for an arbitrary item? Walk up the frame tree/asr tree to find out how we're clipped

If we attached a building rectangle to ASRs, then the combination of those plus the children building rectangle on any transform ancestors should be sufficient (just need to pick which of the two ancestor chains to use).

We could also consider grabbing, and clipping to, that same rectangle in nsDisplayList::Paint, just so that we test the values it computes (via reftest-snapshot).

Severity: -- → S3
Priority: -- → P2
You need to log in before you can comment on or make changes to this bug.