Make WebGL canvas opaque when possible
Categories
(Core :: Graphics: WebRender, enhancement)
Tracking
()
People
(Reporter: rmader, Unassigned)
References
(Blocks 1 open bug)
Details
Attachments
(2 files)
Testing different WebGL demos on https://webglsamples.org/ on Wayland with compositor integration reveals that we currently almost never make WebGL canvases opaque, effectively doubling the blitting bandwidth required in a (system) compositor.
This may be a bug in the sites code, however almost every WebGL canvas I encounter gets composited as not-opaque. It would be great if we could somehow detect cases where we can make the canvas opaque. This should improve performance on all internal or external compositors.
P.S.: to test this on Linux bug 1716044 is required
Reporter | ||
Comment 1•3 years ago
|
||
Comment 2•3 years ago
|
||
I'm not sure how we'd practically detect opaqueness if the canvas is isn't using the alpha: false
context attribute. Do you have anything in mind for how to detect that?
Updated•3 years ago
|
Reporter | ||
Comment 3•3 years ago
|
||
From all I can see it's too late for WebGL :(
I now opened https://github.com/gpuweb/gpuweb/issues/1871 for WebGPU, asking for a MacOS/Wayland/X11/Android style "please composite this assuming the alpha channel is actually all 1, with undefined results if it's not." hint.
Reporter | ||
Comment 4•3 years ago
|
||
Closing this, as there's nothing actionable atm.
Description
•