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:
committed by
Arun Kumar K.R
parent
82fc4b733f
commit
fbe96d2b78
@@ -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:
|
||||
|
||||
@@ -173,7 +173,7 @@ void gpu_context_t::getGrallocInformationFromFormat(int inputFormat,
|
||||
{
|
||||
*bufferType = BUFFER_TYPE_VIDEO;
|
||||
|
||||
if (inputFormat <= HAL_PIXEL_FORMAT_sRGB_888) {
|
||||
if (inputFormat <= HAL_PIXEL_FORMAT_sRGB_X_8888) {
|
||||
// RGB formats
|
||||
*bufferType = BUFFER_TYPE_UI;
|
||||
} else if ((inputFormat == HAL_PIXEL_FORMAT_R_8) ||
|
||||
|
||||
Reference in New Issue
Block a user