summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTomasz Figa <tfiga@google.com>2015-09-08 15:27:03 +0900
committerOwen Lin <owenlin@google.com>2015-09-22 14:58:01 +0800
commita56e0e115bd8d4dc4c836bb0d911c4c53ef75912 (patch)
treea495a0919e8dab829ef7afbed1b802802b73c298
parent54b661575f1709d2ed279a4d7f69313231e11d47 (diff)
downloaddrm_gralloc-a56e0e115bd8d4dc4c836bb0d911c4c53ef75912.tar.gz
drm_gralloc: Enable allocation of flexible YUV420 buffers
This patch adds necessary switch cases to enable allocation of flexible YUV420 buffers. They currently always map to NV12 buffers. Change-Id: I57daba972698033240f9086b7badfad75335be2e
-rw-r--r--gralloc_drm.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/gralloc_drm.h b/gralloc_drm.h
index 3ad818f..f92ba5e 100644
--- a/gralloc_drm.h
+++ b/gralloc_drm.h
@@ -66,6 +66,7 @@ static inline int gralloc_drm_get_bpp(int format)
case HAL_PIXEL_FORMAT_YV12:
case HAL_PIXEL_FORMAT_YCbCr_422_SP:
case HAL_PIXEL_FORMAT_YCrCb_420_SP:
+ case HAL_PIXEL_FORMAT_YCbCr_420_888:
bpp = 1;
break;
default:
@@ -91,6 +92,7 @@ static inline void gralloc_drm_align_geometry(int format, int *width, int *heigh
extra_height_div = 1;
break;
case HAL_PIXEL_FORMAT_YCrCb_420_SP:
+ case HAL_PIXEL_FORMAT_YCbCr_420_888:
align_w = 2;
align_h = 2;
extra_height_div = 2;