From 5ee4de588bf761fe39cba368805e2334c80c61c8 Mon Sep 17 00:00:00 2001 From: John Reck Date: Mon, 24 Jan 2022 19:50:21 -0500 Subject: [PATCH] Clarify FRONT_BUFFER requirements Bug: 193558894 Test: N/A Change-Id: I9c22df7b6a7a5facb37ab6fc37f926c484c2792b --- .../hardware/graphics/common/BufferUsage.aidl | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/graphics/common/aidl/android/hardware/graphics/common/BufferUsage.aidl b/graphics/common/aidl/android/hardware/graphics/common/BufferUsage.aidl index 4b5a306881..60dfbfb319 100644 --- a/graphics/common/aidl/android/hardware/graphics/common/BufferUsage.aidl +++ b/graphics/common/aidl/android/hardware/graphics/common/BufferUsage.aidl @@ -107,7 +107,24 @@ enum BufferUsage { /* Bits 28-31 are reserved for vendor usage */ /** - * Buffer is used for front-buffer rendering + * Buffer is used for front-buffer rendering. + * + * To satisfy an allocation with this usage, the resulting buffer + * must operate as equivalent to shared memory for all targets. + * + * For CPU_USAGE_* other than NEVER, this means the buffer must + * "lock in place". The buffers must be directly accessible via mapping. + * + * For GPU_RENDER_TARGET the buffer must behave equivalent to a + * single-buffered EGL surface. For example glFlush must perform + * a flush, same as if the default framebuffer was single-buffered. + * + * For COMPOSER_* the HWC must not perform any caching for this buffer + * when submitted for composition. HWCs do not need to do any form + * of auto-refresh, and they are allowed to cache composition results between + * 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. */ FRONT_BUFFER = 1L << 32,