gralloc1.0: Add 10bit RGB formats

Add support for 10bit RGBA formats which were missed at some
places.

Change-Id: I812f8266c8525b181f61d647dfc62fba9df12147
Crs-fixed: 2030340
This commit is contained in:
Arun Kumar K.R
2017-04-06 15:59:33 -07:00
parent 4e303642ec
commit b97ca30f61
4 changed files with 26 additions and 3 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2011-2016, The Linux Foundation. All rights reserved.
* Copyright (c) 2011-2017, The Linux Foundation. All rights reserved.
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
@@ -109,6 +109,14 @@ uint32_t GetBppForUncompressedRGB(int format) {
case HAL_PIXEL_FORMAT_RGBX_8888:
case HAL_PIXEL_FORMAT_BGRA_8888:
case HAL_PIXEL_FORMAT_BGRX_8888:
case HAL_PIXEL_FORMAT_RGBA_1010102:
case HAL_PIXEL_FORMAT_ARGB_2101010:
case HAL_PIXEL_FORMAT_RGBX_1010102:
case HAL_PIXEL_FORMAT_XRGB_2101010:
case HAL_PIXEL_FORMAT_BGRA_1010102:
case HAL_PIXEL_FORMAT_ABGR_2101010:
case HAL_PIXEL_FORMAT_BGRX_1010102:
case HAL_PIXEL_FORMAT_XBGR_2101010:
bpp = 4;
break;
case HAL_PIXEL_FORMAT_RGB_888:
@@ -121,7 +129,7 @@ uint32_t GetBppForUncompressedRGB(int format) {
bpp = 2;
break;
default:
ALOGE("Error : %s New format request", __FUNCTION__);
ALOGE("Error : %s New format request = 0x%x", __FUNCTION__, format);
break;
}