diff options
author | Huihong Luo <huisinro@google.com> | 2021-06-24 10:04:32 -0700 |
---|---|---|
committer | Huihong Luo <huisinro@google.com> | 2021-06-24 11:10:06 -0700 |
commit | 4df4151bc0b45208bb0318dca2f03b8ff036a1ce (patch) | |
tree | c863bde09315c25664e2a1b12d5b417b739a710f /libs/hwui/renderthread/CanvasContext.h | |
parent | ef1bb2c9fab128b2a9ee869f295b41954629b98f (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 'libs/hwui/renderthread/CanvasContext.h')
-rw-r--r-- | libs/hwui/renderthread/CanvasContext.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libs/hwui/renderthread/CanvasContext.h b/libs/hwui/renderthread/CanvasContext.h index a61c2bfd5c01..3279ccb8e597 100644 --- a/libs/hwui/renderthread/CanvasContext.h +++ b/libs/hwui/renderthread/CanvasContext.h @@ -206,7 +206,7 @@ public: ASurfaceControlStats* stats); void setASurfaceTransactionCallback( - const std::function<void(int64_t, int64_t, int64_t)>& callback) { + const std::function<bool(int64_t, int64_t, int64_t)>& callback) { mASurfaceTransactionCallback = callback; } @@ -317,7 +317,7 @@ private: // If set to true, we expect that callbacks into onSurfaceStatsAvailable bool mExpectSurfaceStats = false; - std::function<void(int64_t, int64_t, int64_t)> mASurfaceTransactionCallback; + std::function<bool(int64_t, int64_t, int64_t)> mASurfaceTransactionCallback; std::function<void()> mPrepareSurfaceControlForWebviewCallback; void cleanupResources(); |