am a33b62cc: Merge "Replace sRGB_888 with sRGB_X_8888" into klp-dev

* commit 'a33b62cc4700c68a3481d415a55e1a7b688981e1':
  Replace sRGB_888 with sRGB_X_8888
This commit is contained in:
Jesse Hall 2013-08-16 14:53:51 -07:00 committed by Android Git Automerger
commit 5a6b2c530c

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;