diff options
author | Robert Carr <racarr@google.com> | 2020-04-22 15:56:32 -0700 |
---|---|---|
committer | Robert Carr <racarr@google.com> | 2020-04-24 14:42:55 -0700 |
commit | b9cf275b9bf4a5cd2f941c422ee728a4bf155601 (patch) | |
tree | 25f89a319e6f44f327eab345394f659a3059f2c8 /graphics | |
parent | adf530fc264267260aae06231e4be59c74f30a36 (diff) |
BLAST: Two start-up optimizations
1. Avoid a seperate IPC querying in to system-server
to initialize the mUseBLAST flag.
2. Avoid calling property_get_bool with each BufferQueue
creation.
Instead we piggy-back both values inside addWindow return values.
Bug: 152501005
Test: Existing tests pass
Change-Id: If130560a8230f8d399cf7631264d551522939faa
Diffstat (limited to 'graphics')
-rw-r--r-- | graphics/java/android/graphics/BLASTBufferQueue.java | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/graphics/java/android/graphics/BLASTBufferQueue.java b/graphics/java/android/graphics/BLASTBufferQueue.java index 8c6a9371d53b..4c7e960eb0a4 100644 --- a/graphics/java/android/graphics/BLASTBufferQueue.java +++ b/graphics/java/android/graphics/BLASTBufferQueue.java @@ -26,15 +26,17 @@ public final class BLASTBufferQueue { // Note: This field is accessed by native code. private long mNativeObject; // BLASTBufferQueue* - private static native long nativeCreate(long surfaceControl, long width, long height); + private static native long nativeCreate(long surfaceControl, long width, long height, + boolean tripleBufferingEnabled); private static native void nativeDestroy(long ptr); private static native Surface nativeGetSurface(long ptr); private static native void nativeSetNextTransaction(long ptr, long transactionPtr); private static native void nativeUpdate(long ptr, long surfaceControl, long width, long height); /** Create a new connection with the surface flinger. */ - public BLASTBufferQueue(SurfaceControl sc, int width, int height) { - mNativeObject = nativeCreate(sc.mNativeObject, width, height); + public BLASTBufferQueue(SurfaceControl sc, int width, int height, + boolean tripleBufferingEnabled) { + mNativeObject = nativeCreate(sc.mNativeObject, width, height, tripleBufferingEnabled); } public void destroy() { @@ -64,4 +66,3 @@ public final class BLASTBufferQueue { } } } - |