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

Commit 1d4f7a28 authored by Courtney Goeltzenleuchter's avatar Courtney Goeltzenleuchter
Browse files

Default dataspace must be UNKNOWN for compatibility

The first iteration of getColorSpaceAttribute would
cause the dataSpace to become HAL_DATASPACE_SRGB_LINEAR.
While technically correct, that's not what applications
are expecting. This change makes sure that we only
change the default if the application specifically asked
for the change. That keeps us backward compatible
behavior-wise.
Test: logcat and verify that we do not see SRGB_LINEAR
Bug: 37946330

Change-Id: I3265f53d2ff431405e7cf40e04e8422a63afeb62
parent bd32a5d7
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -505,9 +505,11 @@ static EGLBoolean getColorSpaceAttribute(egl_display_ptr dp, const EGLint* attri
                if (!found) {
                    return false;
                }
                // Only change the dataSpace from default if the application
                // has explicitly set the color space with a EGL_GL_COLORSPACE_KHR attribute.
                dataSpace = modifyBufferDataspace(dataSpace, colorSpace);
            }
        }
        dataSpace = modifyBufferDataspace(dataSpace, colorSpace);
    }
    return true;
}