summaryrefslogtreecommitdiffstats
path: root/hwc
diff options
context:
space:
mode:
authorTony Lofthouse <a0741364@ti.com>2012-08-24 16:12:34 -0500
committerDaniel Levin <dendy@ti.com>2012-11-28 21:16:24 +0200
commit67bd6fdd70ac683519a38d99c5737120a7a821e9 (patch)
treee56f974bf22a84efe3ba52ef2d68ff53b6ccd5ee /hwc
parent44d6a84d3e75264d97c484be69cd47259ddb5199 (diff)
downloadhardware_ti_omap4-67bd6fdd70ac683519a38d99c5737120a7a821e9.tar.gz
hardware_ti_omap4-67bd6fdd70ac683519a38d99c5737120a7a821e9.tar.bz2
hardware_ti_omap4-67bd6fdd70ac683519a38d99c5737120a7a821e9.zip
hwc: Add a bits per pixel function for RGB color space
Change-Id: I12d286ffe12c18bc9159a9bd1df65db43b63ac05 Signed-off-by: Tony Lofthouse <a0741364@ti.com>
Diffstat (limited to 'hwc')
-rw-r--r--hwc/hwc.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/hwc/hwc.c b/hwc/hwc.c
index 05f7932..04ec423 100644
--- a/hwc/hwc.c
+++ b/hwc/hwc.c
@@ -460,6 +460,21 @@ static int is_RGB(IMG_native_handle_t *handle)
return 0;
}
}
+static int get_rgb_bpp(IMG_native_handle_t *handle)
+{
+ switch(handle->iFormat)
+ {
+ case HAL_PIXEL_FORMAT_BGRA_8888:
+ case HAL_PIXEL_FORMAT_BGRX_8888:
+ case HAL_PIXEL_FORMAT_RGBX_8888:
+ case HAL_PIXEL_FORMAT_RGBA_8888:
+ return 32;
+ case HAL_PIXEL_FORMAT_RGB_565:
+ return 16;
+ default:
+ return 0;
+ }
+}
static int is_BGR_format(int format)
{