summaryrefslogtreecommitdiff
path: root/hwc
diff options
context:
space:
mode:
authorTony Lofthouse <a0741364@ti.com>2012-08-24 16:12:34 -0500
committerJason Simmons <jsimmons@google.com>2012-10-22 16:00:45 -0700
commita41d64f2cc51096c1110f518b948c316bf15943b (patch)
tree3ab92636c8a52e974557485a34bfdfbf1c070435 /hwc
parent4a3fef97a616e47d9b26a8cffa2833f230aba19b (diff)
downloadomap4-aah-a41d64f2cc51096c1110f518b948c316bf15943b.tar.gz
hwc: Add a bits per pixel function for RGB color space
Change-Id: I12d286ffe12c18bc9159a9bd1df65db43b63ac05 Signed-off-by: Tony Lofthouse <a0741364@ti.com> (cherry picked from commit d98182ec972e6083daec80f2271d2678abcc7b28)
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 d715f13..c5bf36d 100644
--- a/hwc/hwc.c
+++ b/hwc/hwc.c
@@ -455,6 +455,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)
{