Loading services/surfaceflinger/SurfaceFlinger.cpp +7 −9 Original line number Diff line number Diff line Loading @@ -2334,7 +2334,7 @@ bool SurfaceFlinger::updateLayerSnapshotsLegacy(VsyncId vsyncId, nsecs_t frameTi if (flushTransactions) { needsTraversal |= commitMirrorDisplays(vsyncId); needsTraversal |= commitCreatedLayers(vsyncId, update.layerCreatedStates); needsTraversal |= applyTransactions(update.transactions, vsyncId); needsTraversal |= applyTransactions(update.transactions); } outTransactionsAreEmpty = !needsTraversal; const bool shouldCommit = (getTransactionFlags() & ~eTransactionFlushNeeded) || needsTraversal; Loading Loading @@ -2515,7 +2515,7 @@ bool SurfaceFlinger::updateLayerSnapshots(VsyncId vsyncId, nsecs_t frameTimeNs, bool newDataLatched = false; ATRACE_NAME("DisplayCallbackAndStatsUpdates"); mustComposite |= applyTransactionsLocked(update.transactions, vsyncId); mustComposite |= applyTransactionsLocked(update.transactions); traverseLegacyLayers([&](Layer* layer) { layer->commitTransaction(); }); const nsecs_t latchTime = systemTime(); bool unused = false; Loading Loading @@ -5090,20 +5090,18 @@ void SurfaceFlinger::addTransactionReadyFilters() { } // For tests only bool SurfaceFlinger::flushTransactionQueues(VsyncId vsyncId) { bool SurfaceFlinger::flushTransactionQueues() { mTransactionHandler.collectTransactions(); std::vector<TransactionState> transactions = mTransactionHandler.flushTransactions(); return applyTransactions(transactions, vsyncId); return applyTransactions(transactions); } bool SurfaceFlinger::applyTransactions(std::vector<TransactionState>& transactions, VsyncId vsyncId) { bool SurfaceFlinger::applyTransactions(std::vector<TransactionState>& transactions) { Mutex::Autolock lock(mStateLock); return applyTransactionsLocked(transactions, vsyncId); return applyTransactionsLocked(transactions); } bool SurfaceFlinger::applyTransactionsLocked(std::vector<TransactionState>& transactions, VsyncId vsyncId) { bool SurfaceFlinger::applyTransactionsLocked(std::vector<TransactionState>& transactions) { bool needsTraversal = false; // Now apply all transactions. for (auto& transaction : transactions) { Loading services/surfaceflinger/SurfaceFlinger.h +3 −3 Original line number Diff line number Diff line Loading @@ -814,9 +814,9 @@ private: REQUIRES(mStateLock, kMainThreadContext); // Flush pending transactions that were presented after desiredPresentTime. // For test only bool flushTransactionQueues(VsyncId) REQUIRES(kMainThreadContext); bool flushTransactionQueues() REQUIRES(kMainThreadContext); bool applyTransactions(std::vector<TransactionState>&, VsyncId) REQUIRES(kMainThreadContext); bool applyTransactions(std::vector<TransactionState>&) REQUIRES(kMainThreadContext); bool applyAndCommitDisplayTransactionStatesLocked(std::vector<TransactionState>& transactions) REQUIRES(kMainThreadContext, mStateLock); Loading Loading @@ -854,7 +854,7 @@ private: static LatchUnsignaledConfig getLatchUnsignaledConfig(); bool shouldLatchUnsignaled(const layer_state_t&, size_t numStates, bool firstTransaction) const; bool applyTransactionsLocked(std::vector<TransactionState>& transactions, VsyncId) bool applyTransactionsLocked(std::vector<TransactionState>& transactions) REQUIRES(mStateLock, kMainThreadContext); uint32_t setDisplayStateLocked(const DisplayState& s) REQUIRES(mStateLock); uint32_t addInputWindowCommands(const InputWindowCommands& inputWindowCommands) Loading services/surfaceflinger/tests/unittests/TestableSurfaceFlinger.h +1 −1 Original line number Diff line number Diff line Loading @@ -547,7 +547,7 @@ public: } auto flushTransactionQueues() { return FTL_FAKE_GUARD(kMainThreadContext, mFlinger->flushTransactionQueues(kVsyncId)); return FTL_FAKE_GUARD(kMainThreadContext, mFlinger->flushTransactionQueues()); } auto onTransact(uint32_t code, const Parcel& data, Parcel* reply, uint32_t flags) { Loading Loading
services/surfaceflinger/SurfaceFlinger.cpp +7 −9 Original line number Diff line number Diff line Loading @@ -2334,7 +2334,7 @@ bool SurfaceFlinger::updateLayerSnapshotsLegacy(VsyncId vsyncId, nsecs_t frameTi if (flushTransactions) { needsTraversal |= commitMirrorDisplays(vsyncId); needsTraversal |= commitCreatedLayers(vsyncId, update.layerCreatedStates); needsTraversal |= applyTransactions(update.transactions, vsyncId); needsTraversal |= applyTransactions(update.transactions); } outTransactionsAreEmpty = !needsTraversal; const bool shouldCommit = (getTransactionFlags() & ~eTransactionFlushNeeded) || needsTraversal; Loading Loading @@ -2515,7 +2515,7 @@ bool SurfaceFlinger::updateLayerSnapshots(VsyncId vsyncId, nsecs_t frameTimeNs, bool newDataLatched = false; ATRACE_NAME("DisplayCallbackAndStatsUpdates"); mustComposite |= applyTransactionsLocked(update.transactions, vsyncId); mustComposite |= applyTransactionsLocked(update.transactions); traverseLegacyLayers([&](Layer* layer) { layer->commitTransaction(); }); const nsecs_t latchTime = systemTime(); bool unused = false; Loading Loading @@ -5090,20 +5090,18 @@ void SurfaceFlinger::addTransactionReadyFilters() { } // For tests only bool SurfaceFlinger::flushTransactionQueues(VsyncId vsyncId) { bool SurfaceFlinger::flushTransactionQueues() { mTransactionHandler.collectTransactions(); std::vector<TransactionState> transactions = mTransactionHandler.flushTransactions(); return applyTransactions(transactions, vsyncId); return applyTransactions(transactions); } bool SurfaceFlinger::applyTransactions(std::vector<TransactionState>& transactions, VsyncId vsyncId) { bool SurfaceFlinger::applyTransactions(std::vector<TransactionState>& transactions) { Mutex::Autolock lock(mStateLock); return applyTransactionsLocked(transactions, vsyncId); return applyTransactionsLocked(transactions); } bool SurfaceFlinger::applyTransactionsLocked(std::vector<TransactionState>& transactions, VsyncId vsyncId) { bool SurfaceFlinger::applyTransactionsLocked(std::vector<TransactionState>& transactions) { bool needsTraversal = false; // Now apply all transactions. for (auto& transaction : transactions) { Loading
services/surfaceflinger/SurfaceFlinger.h +3 −3 Original line number Diff line number Diff line Loading @@ -814,9 +814,9 @@ private: REQUIRES(mStateLock, kMainThreadContext); // Flush pending transactions that were presented after desiredPresentTime. // For test only bool flushTransactionQueues(VsyncId) REQUIRES(kMainThreadContext); bool flushTransactionQueues() REQUIRES(kMainThreadContext); bool applyTransactions(std::vector<TransactionState>&, VsyncId) REQUIRES(kMainThreadContext); bool applyTransactions(std::vector<TransactionState>&) REQUIRES(kMainThreadContext); bool applyAndCommitDisplayTransactionStatesLocked(std::vector<TransactionState>& transactions) REQUIRES(kMainThreadContext, mStateLock); Loading Loading @@ -854,7 +854,7 @@ private: static LatchUnsignaledConfig getLatchUnsignaledConfig(); bool shouldLatchUnsignaled(const layer_state_t&, size_t numStates, bool firstTransaction) const; bool applyTransactionsLocked(std::vector<TransactionState>& transactions, VsyncId) bool applyTransactionsLocked(std::vector<TransactionState>& transactions) REQUIRES(mStateLock, kMainThreadContext); uint32_t setDisplayStateLocked(const DisplayState& s) REQUIRES(mStateLock); uint32_t addInputWindowCommands(const InputWindowCommands& inputWindowCommands) Loading
services/surfaceflinger/tests/unittests/TestableSurfaceFlinger.h +1 −1 Original line number Diff line number Diff line Loading @@ -547,7 +547,7 @@ public: } auto flushTransactionQueues() { return FTL_FAKE_GUARD(kMainThreadContext, mFlinger->flushTransactionQueues(kVsyncId)); return FTL_FAKE_GUARD(kMainThreadContext, mFlinger->flushTransactionQueues()); } auto onTransact(uint32_t code, const Parcel& data, Parcel* reply, uint32_t flags) { Loading