diff options
| author | 2018-12-20 16:35:38 -0800 | |
|---|---|---|
| committer | 2019-01-08 16:42:54 -0800 | |
| commit | e14cb784b4384379f21e1369fbc4a44e9a7df068 (patch) | |
| tree | 228e2a89d1ace8cfd75450a10a4941456bdab8ae | |
| parent | 32cae4a1a95d8b8d4c09c70b3b6fd7f53cbce374 (diff) | |
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
| -rw-r--r-- | libs/nativewindow/include/android/hardware_buffer.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/libs/nativewindow/include/android/hardware_buffer.h b/libs/nativewindow/include/android/hardware_buffer.h index 03545a68ca..2796c75f04 100644 --- a/libs/nativewindow/include/android/hardware_buffer.h +++ b/libs/nativewindow/include/android/hardware_buffer.h @@ -208,6 +208,17 @@ enum AHardwareBuffer_UsageFlags { */ 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. * |