summaryrefslogtreecommitdiff
path: root/libs/ui/Gralloc2.cpp
diff options
context:
space:
mode:
author Xin Li <delphij@google.com> 2024-06-17 18:51:25 +0000
committer Gerrit Code Review <noreply-gerritcodereview@google.com> 2024-06-17 18:51:25 +0000
commit579f0c2a2ee68484fa59cf51ea974b5cd0d0a931 (patch)
tree61954eed45f3e97ac0fbc30849f3cdc4e7d34a58 /libs/ui/Gralloc2.cpp
parent1a75b0fd4896fb82f014940a65b0e97c6f7cd21c (diff)
parentfd63570c39c1c327fe015148467401dfb351a965 (diff)
Merge "Merge Android 14 QPR3 to AOSP main" into main
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) {