Support HAL_PIXEL_FORMAT_BLOB in default gralloc

Test: manual, ran scrcpy with codec2's blob allocator
Change-Id: I647ed5b0e9df4920e4a02686185956aa71ee806e
This commit is contained in:
Theodore Dubois
2022-12-12 10:49:08 -08:00
parent 6474272267
commit 46fd7e6077

View File

@@ -224,7 +224,11 @@ static int gralloc_alloc(alloc_device_t* dev,
case HAL_PIXEL_FORMAT_RAW16: case HAL_PIXEL_FORMAT_RAW16:
bytesPerPixel = 2; bytesPerPixel = 2;
break; break;
case HAL_PIXEL_FORMAT_BLOB:
bytesPerPixel = 1;
break;
default: default:
ALOGE("gralloc_alloc bad format %d", format);
return -EINVAL; return -EINVAL;
} }