summaryrefslogtreecommitdiff
path: root/libs/ui/Gralloc4.cpp
diff options
context:
space:
mode:
author John Reck <jreck@google.com> 2023-12-08 11:30:37 -0500
committer John Reck <jreck@google.com> 2023-12-14 17:49:59 -0500
commitd727e9c78f799534ea606e3793d50fc73a4566d7 (patch)
tree2abe6c45f46c40daabeb348bc7377eb446c7706c /libs/ui/Gralloc4.cpp
parent1fcaffe2ed5f7312ea0bcbf9abd2d3617bd70bd0 (diff)
Add AHB_allocate2 + get/setDataSpace
Also fix that some ADataSpace enum values were not prefixed with ADATASPACE_* Test: atest AHardwareBufferTest Bug: 315475131 Change-Id: Ie92f416a209501fa8fdc9b3593ea6d3bb68eaa48
Diffstat (limited to 'libs/ui/Gralloc4.cpp')
-rw-r--r--libs/ui/Gralloc4.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/libs/ui/Gralloc4.cpp b/libs/ui/Gralloc4.cpp
index 03ff58a76c..d6970e0477 100644
--- a/libs/ui/Gralloc4.cpp
+++ b/libs/ui/Gralloc4.cpp
@@ -1069,7 +1069,7 @@ std::string Gralloc4Allocator::dumpDebugInfo(bool less) const {
status_t Gralloc4Allocator::allocate(std::string requestorName, uint32_t width, uint32_t height,
android::PixelFormat format, uint32_t layerCount,
- uint64_t usage, uint32_t bufferCount, uint32_t* outStride,
+ uint64_t usage, uint32_t* outStride,
buffer_handle_t* outBufferHandles, bool importBuffers) const {
IMapper::BufferDescriptorInfo descriptorInfo;
if (auto error = sBufferDescriptorInfo(requestorName, width, height, format, layerCount, usage,
@@ -1084,6 +1084,8 @@ status_t Gralloc4Allocator::allocate(std::string requestorName, uint32_t width,
return error;
}
+ constexpr auto bufferCount = 1;
+
if (mAidlAllocator) {
AllocationResult result;
#pragma clang diagnostic push