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

Commit 2a7dbb41 authored by Robert Carr's avatar Robert Carr Committed by Dan Stoza
Browse files

SF: Force empty sync transactions to apply anyway

Following the change to not flush transactions in the screen shot
path, this enables the use of empty synchronous transactions as a
flush mechanism for previous asynchronous transactions.

Bug: 27098060
Change-Id: I282fdfffb72db148edcbf1ded65b15816fc714a2
parent 80bc52ae
Loading
Loading
Loading
Loading
+7 −0
Original line number Original line Diff line number Diff line
@@ -2165,6 +2165,13 @@ void SurfaceFlinger::setTransactionState(
        }
        }
    }
    }


    // If a synchronous transaction is explicitly requested without any changes,
    // force a transaction anyway. This can be used as a flush mechanism for
    // previous async transactions.
    if (transactionFlags == 0 && (flags & eSynchronous)) {
        transactionFlags = eTransactionNeeded;
    }

    if (transactionFlags) {
    if (transactionFlags) {
        // this triggers the transaction
        // this triggers the transaction
        setTransactionFlags(transactionFlags);
        setTransactionFlags(transactionFlags);
+7 −0
Original line number Original line Diff line number Diff line
@@ -2181,6 +2181,13 @@ void SurfaceFlinger::setTransactionState(
        }
        }
    }
    }


    // If a synchronous transaction is explicitly requested without any changes,
    // force a transaction anyway. This can be used as a flush mechanism for
    // previous async transactions.
    if (transactionFlags == 0 && (flags & eSynchronous)) {
        transactionFlags = eTransactionNeeded;
    }

    if (transactionFlags) {
    if (transactionFlags) {
        // this triggers the transaction
        // this triggers the transaction
        setTransactionFlags(transactionFlags);
        setTransactionFlags(transactionFlags);