diff options
author | Mathias Agopian <mathias@google.com> | 2013-07-26 14:49:50 -0700 |
---|---|---|
committer | Mathias Agopian <mathias@google.com> | 2013-07-26 15:43:33 -0700 |
commit | c2414bb0989763641ca57cf72c11ef6d86565a23 (patch) | |
tree | 241ef0d78bc4fccaa73167f64a79e9ab33d94cf4 /libs/ui | |
parent | dd533712f8dd21c0dadfd5ce8a0ad85aa3e96ada (diff) | |
download | frameworks_native-c2414bb0989763641ca57cf72c11ef6d86565a23.zip frameworks_native-c2414bb0989763641ca57cf72c11ef6d86565a23.tar.gz frameworks_native-c2414bb0989763641ca57cf72c11ef6d86565a23.tar.bz2 |
get rid of HAL pixelformats 5551 and 4444
Change-Id: I39409103144c1ba09078c4ddc323a58987fb09ea
Diffstat (limited to 'libs/ui')
-rw-r--r-- | libs/ui/PixelFormat.cpp | 38 |
1 files changed, 14 insertions, 24 deletions
diff --git a/libs/ui/PixelFormat.cpp b/libs/ui/PixelFormat.cpp index 15e99ab..d2d103a 100644 --- a/libs/ui/PixelFormat.cpp +++ b/libs/ui/PixelFormat.cpp @@ -23,42 +23,32 @@ namespace android { ssize_t bytesPerPixel(PixelFormat format) { switch (format) { - case HAL_PIXEL_FORMAT_RGBA_8888: - case HAL_PIXEL_FORMAT_RGBX_8888: - case HAL_PIXEL_FORMAT_BGRA_8888: + case PIXEL_FORMAT_RGBA_8888: + case PIXEL_FORMAT_RGBX_8888: + case PIXEL_FORMAT_BGRA_8888: return 4; - case HAL_PIXEL_FORMAT_RGB_888: + case PIXEL_FORMAT_RGB_888: return 3; - case HAL_PIXEL_FORMAT_RGB_565: - case HAL_PIXEL_FORMAT_RGBA_5551: - case HAL_PIXEL_FORMAT_RGBA_4444: + case PIXEL_FORMAT_RGB_565: + case PIXEL_FORMAT_RGBA_5551: + case PIXEL_FORMAT_RGBA_4444: return 2; - case HAL_PIXEL_FORMAT_YCbCr_422_SP: - case HAL_PIXEL_FORMAT_YCbCr_422_I: - case HAL_PIXEL_FORMAT_YCrCb_420_SP: - case HAL_PIXEL_FORMAT_YV12: - return 1; } return BAD_VALUE; } ssize_t bitsPerPixel(PixelFormat format) { switch (format) { - case HAL_PIXEL_FORMAT_RGBA_8888: - case HAL_PIXEL_FORMAT_RGBX_8888: - case HAL_PIXEL_FORMAT_BGRA_8888: + case PIXEL_FORMAT_RGBA_8888: + case PIXEL_FORMAT_RGBX_8888: + case PIXEL_FORMAT_BGRA_8888: return 32; - case HAL_PIXEL_FORMAT_RGB_888: + case PIXEL_FORMAT_RGB_888: return 24; - case HAL_PIXEL_FORMAT_RGB_565: - case HAL_PIXEL_FORMAT_RGBA_5551: - case HAL_PIXEL_FORMAT_RGBA_4444: - case HAL_PIXEL_FORMAT_YCbCr_422_SP: - case HAL_PIXEL_FORMAT_YCbCr_422_I: + case PIXEL_FORMAT_RGB_565: + case PIXEL_FORMAT_RGBA_5551: + case PIXEL_FORMAT_RGBA_4444: return 16; - case HAL_PIXEL_FORMAT_YCrCb_420_SP: - case HAL_PIXEL_FORMAT_YV12: - return 12; } return BAD_VALUE; } |