Support HAL_PIXEL_FORMAT_BLOB in default gralloc
Test: manual, ran scrcpy with codec2's blob allocator
Change-Id: I647ed5b0e9df4920e4a02686185956aa71ee806e
diff --git a/modules/gralloc/gralloc.cpp b/modules/gralloc/gralloc.cpp
index 87bda97..f7ea01c 100644
--- a/modules/gralloc/gralloc.cpp
+++ b/modules/gralloc/gralloc.cpp
@@ -224,7 +224,11 @@
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;
}