diff options
author | Theodore Dubois <tbodt@google.com> | 2022-12-12 10:49:08 -0800 |
---|---|---|
committer | Theodore Dubois <tbodt@google.com> | 2022-12-12 10:50:28 -0800 |
commit | 46fd7e6077c4380ee65d136bd312782a306e1314 (patch) | |
tree | d1dc92f5de9ca5468d074d0fcba9be60d43f8e22 | |
parent | 6474272267e967ca2a53ec617afd2582fd7c8093 (diff) | |
download | libhardware-46fd7e6077c4380ee65d136bd312782a306e1314.tar.gz |
Support HAL_PIXEL_FORMAT_BLOB in default gralloc
Test: manual, ran scrcpy with codec2's blob allocator
Change-Id: I647ed5b0e9df4920e4a02686185956aa71ee806e
-rw-r--r-- | modules/gralloc/gralloc.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/modules/gralloc/gralloc.cpp b/modules/gralloc/gralloc.cpp index 87bda975..f7ea01cf 100644 --- a/modules/gralloc/gralloc.cpp +++ b/modules/gralloc/gralloc.cpp @@ -224,7 +224,11 @@ static int gralloc_alloc(alloc_device_t* dev, case HAL_PIXEL_FORMAT_RAW16: bytesPerPixel = 2; break; + case HAL_PIXEL_FORMAT_BLOB: + bytesPerPixel = 1; + break; default: + ALOGE("gralloc_alloc bad format %d", format); return -EINVAL; } |