summaryrefslogtreecommitdiff
path: root/graphics/java
diff options
context:
space:
mode:
authorVishnu Nair <vishnun@google.com>2021-08-02 23:35:38 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2021-08-02 23:35:38 +0000
commit40ddf958e692bb9147ccafe96a62d993242b7623 (patch)
tree01db0a757f119ef2d25ad4d3836312866ef609c8 /graphics/java
parent308cc9919e1dffde75723a1595aa1547e2295b95 (diff)
parentf13eac9f7e0231f3cfe52dafd4bb3e96893e9f9c (diff)
Merge "SurfaceView: Synchronize destframe updates with SurfaceView size changes" into sc-dev
Diffstat (limited to 'graphics/java')
-rw-r--r--graphics/java/android/graphics/BLASTBufferQueue.java10
1 files changed, 8 insertions, 2 deletions
diff --git a/graphics/java/android/graphics/BLASTBufferQueue.java b/graphics/java/android/graphics/BLASTBufferQueue.java
index 6c1c2ee1ee57..36215ecc1403 100644
--- a/graphics/java/android/graphics/BLASTBufferQueue.java
+++ b/graphics/java/android/graphics/BLASTBufferQueue.java
@@ -33,7 +33,7 @@ public final class BLASTBufferQueue {
private static native Surface nativeGetSurface(long ptr, boolean includeSurfaceControlHandle);
private static native void nativeSetNextTransaction(long ptr, long transactionPtr);
private static native void nativeUpdate(long ptr, long surfaceControl, long width, long height,
- int format);
+ int format, long transactionPtr);
private static native void nativeFlushShadowQueue(long ptr);
private static native void nativeMergeWithNextTransaction(long ptr, long transactionPtr,
long frameNumber);
@@ -92,9 +92,15 @@ public final class BLASTBufferQueue {
* @param width The new width for the buffer.
* @param height The new height for the buffer.
* @param format The new format for the buffer.
+ * @param t Adds destination frame changes to the passed in transaction.
*/
+ public void update(SurfaceControl sc, int width, int height, @PixelFormat.Format int format,
+ SurfaceControl.Transaction t) {
+ nativeUpdate(mNativeObject, sc.mNativeObject, width, height, format, t.mNativeObject);
+ }
+
public void update(SurfaceControl sc, int width, int height, @PixelFormat.Format int format) {
- nativeUpdate(mNativeObject, sc.mNativeObject, width, height, format);
+ nativeUpdate(mNativeObject, sc.mNativeObject, width, height, format, 0);
}
/**