softbuffer
softbuffer copied to clipboard
Transparency
Right now, softbuffer seems to completely ignore the alpha channel. It would be nice if this was supported.
A transparency hint would be useful in the Wayland backend, as we could tell the compositor about the window content being opaque (using the Xrgb8888 format) and let the compositor apply some optimizations for rendering.
In addition to a way to set this, it would be good to have an API to test if it's supported. On Wayland RGBA and RGBX should always be, but I think this may not be true on others?
What kind of API would be suitable here? A set_alpha() method? supports_alpha()? Maybe there's a better way to name it.
This becomes a lot more complicated if we wanted to support formats other than RGBA/RGBX.