gralloc: Add allocation support for sRGB formats
Refer to graphics.h for the definition of these new formats.
The HWC doesn't yet support output to these formats.
Change-Id: I14dade3412d262d853d3783ba77d559c76d331bf
(cherry picked from commit 3a63837a3d006aee3d176d379409bf3134f6189b)
diff --git a/libgralloc/gpu.cpp b/libgralloc/gpu.cpp
index aacb18c..2b123dd 100644
--- a/libgralloc/gpu.cpp
+++ b/libgralloc/gpu.cpp
@@ -173,7 +173,7 @@
{
*bufferType = BUFFER_TYPE_VIDEO;
- if (inputFormat < 0x7) {
+ if (inputFormat <= HAL_PIXEL_FORMAT_sRGB_888) {
// RGB formats
*bufferType = BUFFER_TYPE_UI;
} else if ((inputFormat == HAL_PIXEL_FORMAT_R_8) ||