diff options
author | 2022-08-16 11:49:27 -0700 | |
---|---|---|
committer | 2022-08-16 11:49:27 -0700 | |
commit | 91192c8103e78895c57d9da1fc04c8695898580f (patch) | |
tree | 9a4deff758bed03ccc5ff838dc55f467c303d762 /libs/ui/Gralloc2.cpp | |
parent | 896cdca96956b6f14e262380b34a0b04e1214b50 (diff) | |
parent | a7459772bbc558b8b13df09de8b0cea156d81870 (diff) |
DO NOT MERGE - Merge Android 13
Bug: 242648940
Merged-In: Ia3eae81cc26b28b0d25dc5f5c6cd04ec8c1bafdf
Change-Id: Icd8e5ea85bfed76d58c81368d94dd1f6101fc087
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; } |