diff options
author | 2022-08-16 19:08:21 +0000 | |
---|---|---|
committer | 2022-08-16 19:08:21 +0000 | |
commit | 44732cde9e19a005def5e110140963a5c2e2f5ae (patch) | |
tree | 9a4deff758bed03ccc5ff838dc55f467c303d762 /libs/ui/Gralloc2.cpp | |
parent | 896cdca96956b6f14e262380b34a0b04e1214b50 (diff) | |
parent | 91192c8103e78895c57d9da1fc04c8695898580f (diff) |
Merge "DO NOT MERGE - Merge Android 13"
Diffstat (limited to 'libs/ui/Gralloc2.cpp')
-rw-r--r-- | libs/ui/Gralloc2.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/libs/ui/Gralloc2.cpp b/libs/ui/Gralloc2.cpp index 040a62b542..f23f10a1a9 100644 --- a/libs/ui/Gralloc2.cpp +++ b/libs/ui/Gralloc2.cpp @@ -110,6 +110,15 @@ status_t Gralloc2Mapper::validateBufferDescriptorInfo( descriptorInfo->usage & ~validUsageBits); return BAD_VALUE; } + + // Gralloc2 implementations never understand non-BLOB with GPU_DATA_BUFFER + // and do not reliably reject it. + if (descriptorInfo->usage & BufferUsage::GPU_DATA_BUFFER && + descriptorInfo->format != hardware::graphics::common::V1_1::PixelFormat::BLOB) { + ALOGE("gralloc2 does not support non-BLOB pixel formats with GPU_DATA_BUFFER usage"); + return BAD_VALUE; + } + return NO_ERROR; } |