Replace sRGB_888 with sRGB_X_8888

As sRGB_888 is not defined, replace it with sRGB_X_8888

Change-Id: Ie7e27ffea1ca6ec99de8e746c0f784e5fc9a4e53
(cherry picked from commit b81796dc9a0c4178004ae947e9d756c5cae6967a)
This commit is contained in:
Jesse Hall
2013-09-20 01:39:43 -07:00
committed by Arun Kumar K.R
parent 82fc4b733f
commit fbe96d2b78
2 changed files with 3 additions and 4 deletions

View File

@@ -104,7 +104,7 @@ int AdrenoMemInfo::getStride(int width, int format)
{
int stride = ALIGN(width, 32);
// Currently surface padding is only computed for RGB* surfaces.
if (format <= HAL_PIXEL_FORMAT_sRGB_888) {
if (format <= HAL_PIXEL_FORMAT_sRGB_X_8888) {
// Don't add any additional padding if debug.gralloc.map_fb_memory
// is enabled
char property[PROPERTY_VALUE_MAX];
@@ -118,7 +118,6 @@ int AdrenoMemInfo::getStride(int width, int format)
switch(format)
{
case HAL_PIXEL_FORMAT_RGB_888:
case HAL_PIXEL_FORMAT_sRGB_888:
bpp = 3;
break;
case HAL_PIXEL_FORMAT_RGB_565:
@@ -282,10 +281,10 @@ size_t getBufferSizeAndDimensions(int width, int height, int format,
case HAL_PIXEL_FORMAT_RGBX_8888:
case HAL_PIXEL_FORMAT_BGRA_8888:
case HAL_PIXEL_FORMAT_sRGB_A_8888:
case HAL_PIXEL_FORMAT_sRGB_X_8888:
size = alignedw * alignedh * 4;
break;
case HAL_PIXEL_FORMAT_RGB_888:
case HAL_PIXEL_FORMAT_sRGB_888:
size = alignedw * alignedh * 3;
break;
case HAL_PIXEL_FORMAT_RGB_565: