Closed Bug 1479754 Opened 2 years ago Closed 1 year ago

Hook up the force-first-paint codepath with WebRender

Categories

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

Other Branch
Unspecified
Android
enhancement

Tracking

()

RESOLVED FIXED
mozilla64
Tracking Status
firefox64 --- fixed

People

(Reporter: kats, Assigned: jnicol)

References

(Blocks 1 open bug)

Details

(Whiteboard: [gfx-noted])

Attachments

(1 file)

In order to get WR working on Android, we need to ensure that the force-first-paint codepath is hooked up. With layers, what happens is CompositorBridgeParent::RecvForceIsFirstPaint gets called, and passes the flag to the AsyncCompositionManager, which passes it to the dynamic toolbar during the next composite, in the block at [1]. With WR, there is no AsyncCompositionManager, so we need to replicate this behaviour in some other place.

[1] https://searchfox.org/mozilla-central/rev/033d45ca70ff32acf04286244644d19308c359d5/gfx/layers/composite/AsyncCompositionManager.cpp#999-1033
Note that bug 1472140 moved the calling code around a bit but it doesn't really change the work that needs to be done here.
Assignee: nobody → aosmond
Bug 1498699 will also move the calling code around a bit, but again doesn't really change the work that needs to be done here.

Also assigning this to jnicol since he's more actively looking into this.
Assignee: aosmond → jnicol
When a CompositorBridgeParent receives a force first paint message, it
sets the flag on the AsyncCompositionManager, which notifies the
widget code at the next composite via
UiCompositorControllerParent::NotifyFirstPaint().

With webrender, this is crashing as there is no
AsyncCompositionManager. And even if it weren't crashing, the widget
will never receive the first paint message, so it never uncovers its
content.

This change ensures the widget receives the first message when
webrender is enabled. CompositorBridgeParent will set the flag on its
WebRenderBridgeParent, which will set the flag on the next received
display list. When the WebRenderBridgeParent flushes the corresponding
transaction, it calls UiCompositorcontrollerParent::NotifyFirstPaint,
to ensure the widget code gets the message.
Pushed by jnicol@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/fb372f5f22b3
Hook up the force-first-paint codepath with webrender r=kats
https://hg.mozilla.org/mozilla-central/rev/fb372f5f22b3
Status: NEW → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla64
You need to log in before you can comment on or make changes to this bug.