diff options
author | Devika Krishnadas <kdevika@google.com> | 2023-12-12 02:15:56 +0000 |
---|---|---|
committer | Devika Krishnadas <kdevika@google.com> | 2023-12-12 02:27:12 +0000 |
commit | bfc9e372fe754a893b0002c662747b878edb8c03 (patch) | |
tree | a7a8368f19449f29f0923c632173a95ebf0912c3 | |
parent | 7f51d90e02b6f19a5af50f61e3984f4f9c4c553b (diff) | |
download | gchips-bfc9e372fe754a893b0002c662747b878edb8c03.tar.gz |
Fix errors in Allocator::isSupported
Bug: 315883761
Test: VtsHalGraphicsAllocatorAidl_TargetTest
Change-Id: I5bcbb2edb38d86e0016e66aff8f9ff5713f162d0
Signed-off-by: Devika Krishnadas <kdevika@google.com>
-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", |