There exist some issues with P3 support in Android O (see b/65162346).
A potential workaround is to dynamically switch between P3 and sRGB, based on the presence of non-sRGB content.
This would involve
- in DirectRenderer::UseRenderPass
- examining all resources from all quads from all render passes
- determining if any of those resources are outside of the sRGB gamut
- setting the render pass color space (P3 or sRGB) based on that
- in NativeViewGLSurfaceEGL
- we receive the color space at initialization and via glResizeCHROMIUM
- currently we just check that the two match
- alternatively we can recreate the surface with the new color space
My suspicion is that this will result in flickering as we recreate the surface, but, we should give it a try.