diff options
| author | 2024-08-23 12:54:45 +0000 | |
|---|---|---|
| committer | 2024-08-23 12:54:45 +0000 | |
| commit | 4efab5d7614f1b809ea89c6226d0a0555f79b255 (patch) | |
| tree | 4756963228e2b9a1d6b137afc811abcbf0a5bd3b /libs/gui/BLASTBufferQueue.cpp | |
| parent | 381aea5968566d6a298cf34dfdfa65b7c42d8ac5 (diff) | |
| parent | 1a37b731c88f79f81c4add642b2a06b06d38ea2d (diff) | |
Merge "Fix transactionCallbackThunk lifetime issue" into main
Diffstat (limited to 'libs/gui/BLASTBufferQueue.cpp')
| -rw-r--r-- | libs/gui/BLASTBufferQueue.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/libs/gui/BLASTBufferQueue.cpp b/libs/gui/BLASTBufferQueue.cpp index f065ffa611..1fb59fd8e0 100644 --- a/libs/gui/BLASTBufferQueue.cpp +++ b/libs/gui/BLASTBufferQueue.cpp @@ -356,8 +356,9 @@ static void transactionCallbackThunk(void* context, nsecs_t latchTime, if (context == nullptr) { return; } - sp<BLASTBufferQueue> bq = static_cast<BLASTBufferQueue*>(context); + auto bq = static_cast<BLASTBufferQueue*>(context); bq->transactionCallback(latchTime, presentFence, stats); + bq->decStrong((void*)transactionCallbackThunk); } void BLASTBufferQueue::transactionCallback(nsecs_t /*latchTime*/, const sp<Fence>& /*presentFence*/, @@ -413,8 +414,6 @@ void BLASTBufferQueue::transactionCallback(nsecs_t /*latchTime*/, const sp<Fence BQA_LOGE("No matching SurfaceControls found: mSurfaceControlsWithPendingCallback was " "empty."); } - - decStrong((void*)transactionCallbackThunk); } } |