Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f2102179 authored by Krzysztof Kosiński's avatar Krzysztof Kosiński
Browse files

Do not strip colorspace attribute for RGB888 surfaces.

Bug: 76088973
Test: Ran an internal test app that draws a solid bar of 50% gray and
1-pixel stripes alternating between black and white to a RGB888 surface.
Verified that the display matches expectations (the stripes and the bar
are approximately the same brightness).

Change-Id: I8682dfcaecf1034d74532b051bdd528b2e5e2870
parent 93649730
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -489,6 +489,9 @@ static EGLBoolean stripAttributes(egl_display_ptr dp, const EGLint* attrib_list,
    bool haveColorSpaceSupport = dp->haveExtension("EGL_KHR_gl_colorspace");
    switch (format) {
        case HAL_PIXEL_FORMAT_RGBA_8888:
        case HAL_PIXEL_FORMAT_RGBX_8888:
        // RGB_888 is never returned by getNativePixelFormat, but is included here for completeness.
        case HAL_PIXEL_FORMAT_RGB_888:
            if (haveColorSpaceSupport) {
                // Spec says:
                //     [fn1] Only OpenGL and OpenGL ES contexts which support sRGB