Open
Description
We need an API to list available pixel formats, and select one. Some considerations:
- We want a way to support transparency: Transparency #17
- The web backend current converts BGRX to RGBA. It would be better if it could use RGBA directly, if an application can render that way.
- It looks like for Android platform #44 we'd have to use RGBX, rather than BGRX.
- For WIP: Attempt to use
IOSurface
on macOS #95, it seems BGRA is supported, but not BGRX. So we need to make sure to set alpha to 255. - Wayland's
wl_shm
can support many formats, but only two are required to be supported by compositors.
So some questions here:
- What formats should be supported?
- We want to offer a format for each platform that can be used efficiently without conversion, at least, and there doesn't seem to be one that can be assumed everywhere, unfortunately.
- There are many formats that could be supported on at least some platforms.
- Do we want to support formats that are not 4 byte per pixel? This will impact the API, which currently uses u32 values for pixels.
- How to we communicate what formats are supported, and what formats are optimal?
- We still want at least one format to work on all platforms, even if it requires conversion on some, right? What formats should be universally supported, then?
Metadata
Metadata
Assignees
Labels
No labels