summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYichi Chen <yichichen@google.com>2021-07-05 17:08:58 +0800
committerraylinhsu <raylinhsu@google.com>2021-07-12 09:32:45 +0800
commit4c75a9abaedad698c48772c7d61db12390b63356 (patch)
tree0ef17a98444c2a9974e3c5eeeb9b31e51910041d
parentb2f4f09387df900cdbbf4519265ad17207f6caad (diff)
downloaddisplay-4c75a9abaedad698c48772c7d61db12390b63356.tar.gz
We now consider BLOB as a kind of RAW data with variable lengths. The patch sets its info of PlaneLayoutInfo and PlaneLayoutComponent the same as RAW10. Bug: 192625123 Test: VtsHalGraphicsMapperV4_0TargetTest Test: Open Camera without error log from qdgralloc Change-Id: Idd8c37877a45f22be14a4efac2755f1a9f5e02e4
-rw-r--r--gralloc/gr_buf_mgr.cpp1
-rw-r--r--gralloc/gr_utils.cpp2
2 files changed, 3 insertions, 0 deletions
diff --git a/gralloc/gr_buf_mgr.cpp b/gralloc/gr_buf_mgr.cpp
index 825d20be..1674058c 100644
--- a/gralloc/gr_buf_mgr.cpp
+++ b/gralloc/gr_buf_mgr.cpp
@@ -577,6 +577,7 @@ static Error getComponentSizeAndOffset(int32_t format, PlaneLayoutComponent &com
break;
case static_cast<int32_t>(HAL_PIXEL_FORMAT_RAW12):
case static_cast<int32_t>(HAL_PIXEL_FORMAT_RAW10):
+ case static_cast<int32_t>(HAL_PIXEL_FORMAT_BLOB):
if (comp.type.value == android::gralloc4::PlaneLayoutComponentType_RAW.value) {
comp.offsetInBits = 0;
comp.sizeInBits = -1;
diff --git a/gralloc/gr_utils.cpp b/gralloc/gr_utils.cpp
index 668e7c19..86159a69 100644
--- a/gralloc/gr_utils.cpp
+++ b/gralloc/gr_utils.cpp
@@ -641,6 +641,7 @@ int GetRawPlaneInfo(int32_t format, int32_t width, int32_t height, PlaneLayoutIn
break;
case HAL_PIXEL_FORMAT_RAW12:
case HAL_PIXEL_FORMAT_RAW10:
+ case HAL_PIXEL_FORMAT_BLOB:
step = 0;
break;
default:
@@ -1411,6 +1412,7 @@ int GetYUVPlaneInfo(const BufferInfo &info, int32_t format, int32_t width, int32
case HAL_PIXEL_FORMAT_RAW8:
case HAL_PIXEL_FORMAT_RAW16:
case HAL_PIXEL_FORMAT_RAW12:
+ case HAL_PIXEL_FORMAT_BLOB:
*plane_count = 1;
GetRawPlaneInfo(format, info.width, info.height, plane_info);
break;