Mir

Code review comment for lp:~morphis/mir/force-pixel-format

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

This branch probably doesn't resemble the final fix in any way.

The final fix is probably more to do with passing EGL_RED_SIZE/BLUE_SIZE/GREEN_SIZE to eglChooseConfig in:
  src/platforms/android/server/gl_context.cpp
Any value greater than zero should fix it.

Once we do that it's no longer device-specific. Seems to just be a bug in our Android driver that's been there forever, and we got away with because our previous devices' EGL implementations were buggy in similar ways.

It's worth noting that the offending device appears to be the only device that actually follows the EGL spec correctly and defaults to the lower colour depth when those EGL_ values are omitted...
  https://www.khronos.org/registry/egl/sdk/docs/man/html/eglChooseConfig.xhtml

"EGL_RED_SIZE
Must be followed by a nonnegative integer that indicates the desired size of the red component of the color buffer, in bits. If this value is zero, color buffers with the smallest red component size are preferred. Otherwise, color buffers with the largest red component of at least the specified size are preferred. The default value is zero."

review: Needs Fixing

« Back to merge proposal