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

Commit e5769db8 authored by Mathias Agopian's avatar Mathias Agopian Committed by The Android Automerger
Browse files

we were mistakenly optimizing out SF's main transactions in some cases

due to a typo, SF's main transaction was conditional to having a
display transaction.

more correct fix for 6970310

Bug: 6970310
Change-Id: Iafd8c4e02afa5db829cc1c65950cfcc74754c6af
parent 741fac3f
Loading
Loading
Loading
Loading
+29 −26
Original line number Diff line number Diff line
@@ -891,8 +891,7 @@ void SurfaceFlinger::handleTransactionLocked(uint32_t transactionFlags)
     * (perform the transaction for each of them if needed)
     */

    const bool layersNeedTransaction = transactionFlags & eTraversalNeeded;
    if (layersNeedTransaction) {
    if (transactionFlags & eTraversalNeeded) {
        for (size_t i=0 ; i<count ; i++) {
            const sp<LayerBase>& layer = currentLayers[i];
            uint32_t trFlags = layer->getTransactionFlags(eTransactionNeeded);
@@ -905,7 +904,7 @@ void SurfaceFlinger::handleTransactionLocked(uint32_t transactionFlags)
    }

    /*
     * Perform our own transaction if needed
     * Perform display own transactions if needed
     */

    if (transactionFlags & eDisplayTransactionNeeded) {
@@ -978,6 +977,11 @@ void SurfaceFlinger::handleTransactionLocked(uint32_t transactionFlags)
                }
            }
        }
    }

    /*
     * Perform our own transaction if needed
     */

    if (currentLayers.size() > mDrawingState.layersSortedByZ.size()) {
        // layers have been added
@@ -1005,7 +1009,6 @@ void SurfaceFlinger::handleTransactionLocked(uint32_t transactionFlags)
            }
        }
    }
    }

    commitTransaction();
}