summaryrefslogtreecommitdiff
path: root/graphics/java/android
diff options
context:
space:
mode:
authorHuihong Luo <huisinro@google.com>2021-06-24 10:04:32 -0700
committerHuihong Luo <huisinro@google.com>2021-06-24 11:10:06 -0700
commit4df4151bc0b45208bb0318dca2f03b8ff036a1ce (patch)
treec863bde09315c25664e2a1b12d5b417b739a710f /graphics/java/android
parentef1bb2c9fab128b2a9ee869f295b41954629b98f (diff)
Fix a crash caused by transaction
A native transaction passed from webview is sent back to native side, so java side does not manage the life cycle of the transaction. Bug: 191414767 Test: Play a video, switch to another app, wait for 10 seconds Change-Id: I013052c202b445438d6cb6497f5f9a2fc22a2b85
Diffstat (limited to 'graphics/java/android')
-rw-r--r--graphics/java/android/graphics/BLASTBufferQueue.java8
-rw-r--r--graphics/java/android/graphics/HardwareRenderer.java2
2 files changed, 9 insertions, 1 deletions
diff --git a/graphics/java/android/graphics/BLASTBufferQueue.java b/graphics/java/android/graphics/BLASTBufferQueue.java
index 4534d36342db..6c1c2ee1ee57 100644
--- a/graphics/java/android/graphics/BLASTBufferQueue.java
+++ b/graphics/java/android/graphics/BLASTBufferQueue.java
@@ -131,4 +131,12 @@ public final class BLASTBufferQueue {
nativeMergeWithNextTransaction(mNativeObject, t.mNativeObject, frameNumber);
}
+ /**
+ * Merge the transaction passed in to the next transaction in BlastBufferQueue.
+ * @param nativeTransaction native handle passed from native c/c++ code.
+ */
+ public void mergeWithNextTransaction(long nativeTransaction, long frameNumber) {
+ nativeMergeWithNextTransaction(mNativeObject, nativeTransaction, frameNumber);
+ }
+
}
diff --git a/graphics/java/android/graphics/HardwareRenderer.java b/graphics/java/android/graphics/HardwareRenderer.java
index e141d5178570..30d1e0fdb9d8 100644
--- a/graphics/java/android/graphics/HardwareRenderer.java
+++ b/graphics/java/android/graphics/HardwareRenderer.java
@@ -912,7 +912,7 @@ public class HardwareRenderer {
* @param aSurfaceControlNativeObj ASurfaceControl native object handle
* @param frame The id of the frame being drawn.
*/
- void onMergeTransaction(long aSurfaceTranactionNativeObj,
+ boolean onMergeTransaction(long aSurfaceTranactionNativeObj,
long aSurfaceControlNativeObj, long frame);
}