Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e14cb784 authored by Marissa Wall's avatar Marissa Wall
Browse files

blast: Add composer overlay flag to AHardwareBuffer

BLAST allows apps to directly allocate their buffers instead of
going through BufferQueue. BufferQueue typically adds this flag for the
apps. Now apps need the ability to add the flag to the buffer themselves.

Test: atest CtsViewTestCases:android.view.cts.ASurfaceControlTest
Bug: 80477568

Change-Id: Ife4b9b7cea39bf5f852b51cb918737e79fe2029e
parent 32cae4a1
Loading
Loading
Loading
Loading
+11 −0
Original line number Diff line number Diff line
@@ -207,6 +207,17 @@ enum AHardwareBuffer_UsageFlags {
     * AHARDWAREBUFFER_USAGE_GPU_FRAMEBUFFER to avoid this confusion.
     */
    AHARDWAREBUFFER_USAGE_GPU_COLOR_OUTPUT       = AHARDWAREBUFFER_USAGE_GPU_FRAMEBUFFER,
    /**
     * The buffer will be used as a composer HAL overlay layer.
     *
     * This flag is currently only needed when using ASurfaceTransaction_setBuffer
     * to set a buffer. In all other cases, the framework adds this flag
     * internally to buffers that could be presented in a composer overlay.
     * ASurfaceTransaction_setBuffer is special because it uses buffers allocated
     * directly through AHardwareBuffer_allocate instead of buffers allocated
     * by the framework.
     */
    AHARDWAREBUFFER_USAGE_COMPOSER_OVERLAY       = 1ULL << 11,
    /**
     * The buffer is protected from direct CPU access or being read by
     * non-secure hardware, such as video encoders.