diff options
| author | 2016-05-24 11:41:28 -0700 | |
|---|---|---|
| committer | 2016-05-24 14:49:21 -0700 | |
| commit | 2a7dbb4135976b01015d237ac95d5eeb3ed7a85c (patch) | |
| tree | 31ffb7d62c0aebb8293a1dc088e08b7c61686632 | |
| parent | 80bc52aefa56e590f05bc30ff0182d860f00b128 (diff) | |
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
| -rw-r--r-- | services/surfaceflinger/SurfaceFlinger.cpp | 7 | ||||
| -rw-r--r-- | services/surfaceflinger/SurfaceFlinger_hwc1.cpp | 7 |
2 files changed, 14 insertions, 0 deletions
diff --git a/services/surfaceflinger/SurfaceFlinger.cpp b/services/surfaceflinger/SurfaceFlinger.cpp index 466da8cfba..ce63ec290a 100644 --- a/services/surfaceflinger/SurfaceFlinger.cpp +++ b/services/surfaceflinger/SurfaceFlinger.cpp @@ -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) { // this triggers the transaction setTransactionFlags(transactionFlags); diff --git a/services/surfaceflinger/SurfaceFlinger_hwc1.cpp b/services/surfaceflinger/SurfaceFlinger_hwc1.cpp index de46dfa0ff..3572acbf35 100644 --- a/services/surfaceflinger/SurfaceFlinger_hwc1.cpp +++ b/services/surfaceflinger/SurfaceFlinger_hwc1.cpp @@ -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) { // this triggers the transaction setTransactionFlags(transactionFlags); |