diff options
author | Devika Krishnadas <kdevika@google.com> | 2023-12-12 17:34:47 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2023-12-12 17:34:47 +0000 |
commit | b3f0912eb7bd661c5ed210d6dc69e7e0c3712e9c (patch) | |
tree | 0cd5751c8557f8ded47b774574fec172c34cc75e | |
parent | fd5b7647c906d2cd1d4e642e08d038eac54a9623 (diff) | |
parent | bfc9e372fe754a893b0002c662747b878edb8c03 (diff) | |
download | gchips-b3f0912eb7bd661c5ed210d6dc69e7e0c3712e9c.tar.gz |
Merge "Fix errors in Allocator::isSupported" into main
-rw-r--r-- | gralloc4/src/aidl/GrallocAllocator.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/gralloc4/src/aidl/GrallocAllocator.cpp b/gralloc4/src/aidl/GrallocAllocator.cpp index 8e82036..2b01b80 100644 --- a/gralloc4/src/aidl/GrallocAllocator.cpp +++ b/gralloc4/src/aidl/GrallocAllocator.cpp @@ -154,12 +154,13 @@ ndk::ScopedAStatus GrallocAllocator::allocate2( return ndk::ScopedAStatus::ok(); } +// TODO(b/315883761): isSupported should return false for unknown-to-HAL usage ndk::ScopedAStatus GrallocAllocator::isSupported( const AidlAllocator::BufferDescriptorInfo& descriptor, bool* result) { buffer_descriptor_t bufferDescriptor = decodeBufferDescriptorInfo(descriptor); int isBufferDescriptorSupported = arm::allocator::common::isSupported(&bufferDescriptor); - *result = isBufferDescriptorSupported; + *result = (isBufferDescriptorSupported == 0); if (isBufferDescriptorSupported) { MALI_GRALLOC_LOGV("Allocation for the given description will not succeed. error %d", |