summaryrefslogtreecommitdiff
path: root/libs/ui/Gralloc2.cpp
diff options
context:
space:
mode:
author Xin Li <delphij@google.com> 2024-05-24 08:27:45 -0700
committer Xin Li <delphij@google.com> 2024-05-24 08:27:45 -0700
commit5968781840bb5bead4758c9adb1e41bbea1c24c7 (patch)
treed0c6e21063ef3a2265bd3071e363ddfe9ccf618b /libs/ui/Gralloc2.cpp
parenta99e1cd67b5d2237200bf23b44a03e0eb31e9326 (diff)
parent8bf4487ae52ce8d1797ea58dd0b1109255518ceb (diff)
Merge Android 24Q2 Release (ab/11526283) to aosp-main-future
Bug: 337098550 Merged-In: I8d975b81afd2cde1d543e8bc7e730a6e42393bec Change-Id: I714982d2b0df34afc9f9729deb2636de5d0c7b64
Diffstat (limited to 'libs/ui/Gralloc2.cpp')
-rw-r--r--libs/ui/Gralloc2.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/libs/ui/Gralloc2.cpp b/libs/ui/Gralloc2.cpp
index e9b5decee8..a5aca9912f 100644
--- a/libs/ui/Gralloc2.cpp
+++ b/libs/ui/Gralloc2.cpp
@@ -384,8 +384,8 @@ std::string Gralloc2Allocator::dumpDebugInfo(bool /*less*/) const {
status_t Gralloc2Allocator::allocate(std::string /*requestorName*/, uint32_t width, uint32_t height,
PixelFormat format, uint32_t layerCount, uint64_t usage,
- uint32_t bufferCount, uint32_t* outStride,
- buffer_handle_t* outBufferHandles, bool importBuffers) const {
+ uint32_t* outStride, buffer_handle_t* outBufferHandles,
+ bool importBuffers) const {
IMapper::BufferDescriptorInfo descriptorInfo = {};
descriptorInfo.width = width;
descriptorInfo.height = height;
@@ -400,6 +400,8 @@ status_t Gralloc2Allocator::allocate(std::string /*requestorName*/, uint32_t wid
return error;
}
+ constexpr auto bufferCount = 1;
+
auto ret = mAllocator->allocate(descriptor, bufferCount,
[&](const auto& tmpError, const auto& tmpStride,
const auto& tmpBuffers) {