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

Commit 156acee7 authored by Ady Abraham's avatar Ady Abraham
Browse files

SF: flag resync_on_tx depends on vsync_predictor_predicts_within_threshold

vsync_predictor_predicts_within_threshold flag includes a fix 
for the a regression caused by resync_on_tx.

Bug: 425994753
Test: presubmit
Flag: com.android.graphics.surfaceflinger.flags.resync_on_tx
Change-Id: Id3075e84dcc357c505c1586d95408d33645be0b2
parent 1c9af499
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -4832,7 +4832,10 @@ void SurfaceFlinger::setTransactionFlags(uint32_t mask, TransactionSchedule sche
    SFTRACE_INT("mTransactionFlags", transactionFlags);

    if (const bool scheduled = transactionFlags & mask; !scheduled) {
        if (FlagManager::getInstance().resync_on_tx()) { mScheduler->resync(); }
        if (FlagManager::getInstance().resync_on_tx() &&
                FlagManager::getInstance().vsync_predictor_predicts_within_threshold()) {
            mScheduler->resync();
        }
        scheduleCommit(frameHint);
    } else if (frameHint == FrameHint::kActive) {
        // Even if the next frame is already scheduled, we should reset the idle timer