Open Bug 1681294 Opened 4 years ago Updated 3 years ago

WebRender is lost when new window creation races with device reset handling

Categories

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

Desktop
All
defect

Tracking

()

ASSIGNED

People

(Reporter: aosmond, Assigned: aosmond)

References

(Blocks 1 open bug)

Details

Due to:

https://searchfox.org/mozilla-central/rev/1843375acbbca68127713e402be222350ac99301/gfx/webrender_bindings/RenderCompositorANGLE.cpp#136

We have a race condition where device reset handling might not complete before a new window is created. This happens in the wild. As a result, the window creation fails, and we disable WebRender.

We don't clear the flag until the last RenderCompositor is destroyed:

https://searchfox.org/mozilla-central/rev/1843375acbbca68127713e402be222350ac99301/gfx/webrender_bindings/RenderThread.cpp#227

This also blocks us recreating the SharedGL context, presumably because we don't want to destroy it until all of the RenderCompositors depending on it are destroyed:

https://searchfox.org/mozilla-central/rev/1843375acbbca68127713e402be222350ac99301/gfx/webrender_bindings/RenderCompositorANGLE.cpp#130

We should handle this race condition. We also need to ensure the SharedGL clearing is available on other platforms as well -- both Linux/Wayland and Android use a shared EGL context, although at the moment, we don't have robustness enabled on either of those configuration.

You need to log in before you can comment on or make changes to this bug.