summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author John Reck <jreck@google.com> 2024-05-07 18:59:06 +0000
committer Android (Google) Code Review <android-gerrit@google.com> 2024-05-07 18:59:06 +0000
commit07e07a44b9fe200fa7902dc61aa4a05846d49a8f (patch)
tree2d19845ca88e567410ba18c0a3513065e3d0dccf
parentf0b5c5959acc0203e5d3e6bcd37a0271137b06b9 (diff)
parent54526e9b29556ede6c22a07fad83cc6cc8163915 (diff)
Merge "Apply pending transactions always" into main
-rw-r--r--core/java/android/view/ViewRootImpl.java9
1 files changed, 8 insertions, 1 deletions
diff --git a/core/java/android/view/ViewRootImpl.java b/core/java/android/view/ViewRootImpl.java
index ca8eaf9bccd0..64b3ef1e9f29 100644
--- a/core/java/android/view/ViewRootImpl.java
+++ b/core/java/android/view/ViewRootImpl.java
@@ -4244,7 +4244,14 @@ public final class ViewRootImpl implements ViewParent,
mReportNextDraw = false;
mLastReportNextDrawReason = null;
mActiveSurfaceSyncGroup = null;
- mHasPendingTransactions = false;
+ if (mHasPendingTransactions) {
+ // TODO: We shouldn't ever actually hit this, it means mPendingTransaction wasn't
+ // merged with a sync group or BLASTBufferQueue before making it to this point
+ // But better a one or two frame flicker than steady-state broken from dropping
+ // whatever is in this transaction
+ mPendingTransaction.apply();
+ mHasPendingTransactions = false;
+ }
mSyncBuffer = false;
if (isInWMSRequestedSync()) {
mWmsRequestSyncGroup.markSyncReady();