Open Bug 1433594 Opened 7 years ago Updated 4 months ago

Clean up the WebRenderScrollData tree generated by WebRenderLayerManager

Categories

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

Other Branch
enhancement

Tracking

()

People

(Reporter: kats, Unassigned)

References

(Blocks 1 open bug)

Details

(Whiteboard: [gfx-noted])

Right now the code we have to generate the WebRenderScrollLayerData stuff is mostly a holdover from the days of layers-full WebRender. Now that we have layers-free WR and are building the WR display list from the gecko display list, I have it sort of hacked up to do approximately what we needed it to, but it's kind of a mess.

What we should do is take a look at the HitTestingTree on the APZ side, figure out what is the minimal set of requirements it needs to satisfy in the WR world, and then rewrite the WebRenderScrollData generation stuff in WebRenderLayerManager to be as simple as possible while satisfying those requirements. I suspect that all that we'll really need is a rough tree structure with the scroll metadata in the right place, but there might be a few other things.

The code in question currently occupies most of the WebRenderCommandBuilder::CreateWebRenderCommandsFromDisplayList function at [1], and I expect we can make this function much much simpler as a result of this refactoring.

[1] https://searchfox.org/mozilla-central/rev/38bddf549db0f26d4d7575cf695958ff703a3ed7/gfx/layers/wr/WebRenderCommandBuilder.cpp#108
Depends on: stage-wr-next
Priority: -- → P2
Severity: normal → S3
Blocks: wr-todos
No longer blocks: stage-wr-next
You need to log in before you can comment on or make changes to this bug.