From 947fee291da572f43c2fcac7d8f3cdc0b3490175 Mon Sep 17 00:00:00 2001 From: Vishnu Nair Date: Tue, 16 Mar 2021 10:05:52 -0700 Subject: Remove legacy disable triple buffering config The config changes the dequeue limit of BQ (setMaxDequeuedBufferCount) from 2 to 1, decreasing the default size of the queue from (3 to 2). Some of the motivations behind this change include: - not applicable in most scenarios since producers in the system override this - breaks async mode, not well tested in other scenarios - simplifying some of the implementation and removes a configuration/flag. Clients can still manually call setMaxDequeuedBufferCount if they wish. Test: presubmit Fixes: 182314340 Change-Id: I724218d14ad106a4b7af69f7eacf97fae3c93923 --- graphics/java/android/graphics/BLASTBufferQueue.java | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'graphics/java') diff --git a/graphics/java/android/graphics/BLASTBufferQueue.java b/graphics/java/android/graphics/BLASTBufferQueue.java index 3aaf11cef17c..4534d36342db 100644 --- a/graphics/java/android/graphics/BLASTBufferQueue.java +++ b/graphics/java/android/graphics/BLASTBufferQueue.java @@ -28,7 +28,7 @@ public final class BLASTBufferQueue { public long mNativeObject; // BLASTBufferQueue* private static native long nativeCreate(String name, long surfaceControl, long width, - long height, int format, boolean tripleBufferingEnabled); + long height, int format); private static native void nativeDestroy(long ptr); private static native Surface nativeGetSurface(long ptr, boolean includeSurfaceControlHandle); private static native void nativeSetNextTransaction(long ptr, long transactionPtr); @@ -53,9 +53,8 @@ public final class BLASTBufferQueue { /** Create a new connection with the surface flinger. */ public BLASTBufferQueue(String name, SurfaceControl sc, int width, int height, - @PixelFormat.Format int format, boolean tripleBufferingEnabled) { - mNativeObject = nativeCreate(name, sc.mNativeObject, width, height, format, - tripleBufferingEnabled); + @PixelFormat.Format int format) { + mNativeObject = nativeCreate(name, sc.mNativeObject, width, height, format); } public void destroy() { -- cgit v1.2.3-59-g8ed1b