Merge "Replace sRGB_888 with sRGB_X_8888" into klp-dev

This commit is contained in:
Jesse Hall 2013-08-16 21:50:22 +00:00 committed by Android (Google) Code Review
commit a33b62cc47

View File

@ -380,14 +380,14 @@ static int modifyFormatColorspace(int fmt, EGLint colorspace) {
if (colorspace == EGL_GL_COLORSPACE_LINEAR_KHR) {
switch (fmt) {
case HAL_PIXEL_FORMAT_sRGB_A_8888: return HAL_PIXEL_FORMAT_RGBA_8888;
case HAL_PIXEL_FORMAT_sRGB_888: return HAL_PIXEL_FORMAT_RGB_888;
case HAL_PIXEL_FORMAT_sRGB_X_8888: return HAL_PIXEL_FORMAT_RGBX_8888;
}
} else if (colorspace == EGL_GL_COLORSPACE_SRGB_KHR) {
switch (fmt) {
case HAL_PIXEL_FORMAT_RGBA_8888: return HAL_PIXEL_FORMAT_sRGB_A_8888;
case HAL_PIXEL_FORMAT_RGBX_8888: return HAL_PIXEL_FORMAT_sRGB_A_8888;
case HAL_PIXEL_FORMAT_RGBX_8888: return HAL_PIXEL_FORMAT_sRGB_X_8888;
// TODO: this should go away once drivers stop using BGRA EGLConfigs
case HAL_PIXEL_FORMAT_BGRA_8888: return HAL_PIXEL_FORMAT_sRGB_A_8888;
case HAL_PIXEL_FORMAT_RGB_888: return HAL_PIXEL_FORMAT_sRGB_888;
}
}
return fmt;