From cd883bc17a138ffa7392ec6f65a0787e07c503ac Mon Sep 17 00:00:00 2001 From: John Reck Date: Thu, 3 Feb 2022 20:38:26 -0500 Subject: [PATCH] Address ANAPIC feedback Also adds recommended combination for FRONT_BUFFER as that was feedback from implementers Fixes: 217752219 Test: N/A doc only change Change-Id: I086597d14cc7d9d1a0b620b73297aaa3e6288773 --- .../android/hardware/graphics/allocator/IAllocator.aidl | 4 ++-- .../android/hardware/graphics/common/BufferUsage.aidl | 8 ++++++++ 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/graphics/allocator/aidl/android/hardware/graphics/allocator/IAllocator.aidl b/graphics/allocator/aidl/android/hardware/graphics/allocator/IAllocator.aidl index 8c3ca9601e..92dfd4f8ab 100644 --- a/graphics/allocator/aidl/android/hardware/graphics/allocator/IAllocator.aidl +++ b/graphics/allocator/aidl/android/hardware/graphics/allocator/IAllocator.aidl @@ -29,8 +29,8 @@ interface IAllocator { * @param descriptor Properties of the buffers to allocate. This must be * obtained from IMapper::createDescriptor(). * @param count The number of buffers to allocate. - * @return An AllocationResult containing the result of an error, or - * an AllocationError status + * @return An AllocationResult containing the result of the allocation + * @throws AllocationError on failure */ AllocationResult allocate(in byte[] descriptor, in int count); } diff --git a/graphics/common/aidl/android/hardware/graphics/common/BufferUsage.aidl b/graphics/common/aidl/android/hardware/graphics/common/BufferUsage.aidl index 60dfbfb319..17f4684379 100644 --- a/graphics/common/aidl/android/hardware/graphics/common/BufferUsage.aidl +++ b/graphics/common/aidl/android/hardware/graphics/common/BufferUsage.aidl @@ -125,6 +125,14 @@ enum BufferUsage { * presents from SF (such as for panel self-refresh), but for any given * present the buffer must be composited from even if it otherwise appears * to be the same as a previous composition. + * + * If the GPU & HWC supports EGL_SINGLE_BUFFER, then it is recommended that + * FRONT_BUFFER usage is supported for the same formats as supported by + * EGL_SINGLE_BUFFER. In particular, it is recommended that the following + * combination is supported when possible: + * Format = RGBA_8888 + * Usage = FRONT_BUFFER | GPU_RENDER_TARGET | COMPOSER_OVERLAY + * */ FRONT_BUFFER = 1L << 32,