Closed Bug 1717297 Opened 3 years ago Closed 3 years ago

Make WebGL canvas opaque when possible

Categories

(Core :: Graphics: WebRender, enhancement)

enhancement

Tracking

()

RESOLVED INVALID

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

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?

Flags: needinfo?(robert.mader)
Severity: -- → S4

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.

Flags: needinfo?(robert.mader)

Closing this, as there's nothing actionable atm.

Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: