From cc0297c2b2167e652842891a5913749df30156f0 Mon Sep 17 00:00:00 2001 From: Vishnu Nair Date: Thu, 28 Jan 2021 11:50:29 -0800 Subject: [PATCH] Add enable backpressure layer flag Test: presubmit Bug: 176967609 Change-Id: I1875f1d4098154fac55d48e1f68babc3eed5a8ff --- core/java/android/view/SurfaceControl.java | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/core/java/android/view/SurfaceControl.java b/core/java/android/view/SurfaceControl.java index 9932b2a473dc7..76e40363d8abf 100644 --- a/core/java/android/view/SurfaceControl.java +++ b/core/java/android/view/SurfaceControl.java @@ -416,6 +416,15 @@ public final class SurfaceControl implements Parcelable { */ public static final int SECURE = 0x00000080; + + /** + * Queue up BufferStateLayer buffers instead of dropping the oldest buffer when this flag is + * set. This blocks the client until all the buffers have been presented. If the buffers + * have presentation timestamps, then we may drop buffers. + * @hide + */ + public static final int ENABLE_BACKPRESSURE = 0x00000100; + /** * Surface creation flag: Creates a surface where color components are interpreted * as "non pre-multiplied" by their alpha channel. Of course this flag is