Mir

Comment 9 for bug 1666533

Revision history for this message
Gerry Boland (gerboland) wrote : Re: Shell wants api to listen for window pixel_format changes

> In the spirit of glEnable(GL_BLEND), I think we need an extra flag
> that clients must set in order for them to get blended.
Well I was working under the assumption that MirPixelFormat is for that, and I have this working. If a Qt client requests an opaque EGL surface but get one with an alpha channel, the client still specifies that the surface MirPixelFormat has no alpha. In that case Unity8 will not enable blending while compositing that surface.

Back on this topic though:
I'm still confused. Mir clients set the pixel format for the window with

mir_window_spec_set_pixel_format(MirWindowSpec* spec, MirPixelFormat format)

But I do see that clients can allocate pixel buffer(s) with a possibly different pixel format:

void mir_connection_allocate_buffer(
    MirConnection* connection,
    int width, int height,
    MirPixelFormat format,
    MirBufferCallback available_callback, void* available_context);

Android buffers can also have their own pixel formats. And presumably GBM?

So is the buffer pixel format the only value of pixel format I can actually trust? And therefore the window pixel format is useless?