Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 792e529d authored by Dan Stoza's avatar Dan Stoza
Browse files

SF: Prevent non-sync transactions from syncing

Clears the sync handle and frame number after registering a deferred
transaction to prevent other non-synchronized transactions from
erroneously getting marked as synchronized.

Also changes the application of pending states such that all valid
pending transactions are applied instead of breaking after the first
one.

Bug: 27061473
Change-Id: I98f0f26e9d9bb0d266563f209e94dfd776d8f8ea
parent e6e69683
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -1000,8 +1000,9 @@ bool Layer::applyPendingStates() {
                // Signal our end of the sync point and then dispose of it
                mRemoteSyncPoints.front()->setTransactionApplied();
                mRemoteSyncPoints.pop_front();
            }
            } else {
                break;
            }
        } else {
            popPendingState();
            stateUpdateAvailable = true;
@@ -1240,6 +1241,8 @@ void Layer::deferTransactionUntil(const sp<IBinder>& handle,
    // request without any other state updates shouldn't actually induce a delay
    mCurrentState.modified = true;
    pushPendingState();
    mCurrentState.handle = nullptr;
    mCurrentState.frameNumber = 0;
    mCurrentState.modified = false;
}