Loading services/surfaceflinger/SurfaceFlinger.cpp +6 −8 Original line number Original line Diff line number Diff line Loading @@ -2449,7 +2449,7 @@ bool SurfaceFlinger::updateLayerSnapshots(VsyncId vsyncId, nsecs_t frameTimeNs, bool newDataLatched = false; bool newDataLatched = false; SFTRACE_NAME("DisplayCallbackAndStatsUpdates"); SFTRACE_NAME("DisplayCallbackAndStatsUpdates"); mustComposite |= applyTransactionsLocked(update.transactions, vsyncId); mustComposite |= applyTransactionsLocked(update.transactions); traverseLegacyLayers([&](Layer* layer) { layer->commitTransaction(); }); traverseLegacyLayers([&](Layer* layer) { layer->commitTransaction(); }); const nsecs_t latchTime = systemTime(); const nsecs_t latchTime = systemTime(); bool unused = false; bool unused = false; Loading Loading @@ -4574,20 +4574,18 @@ void SurfaceFlinger::addTransactionReadyFilters() { } } // For tests only // For tests only bool SurfaceFlinger::flushTransactionQueues(VsyncId vsyncId) { bool SurfaceFlinger::flushTransactionQueues() { mTransactionHandler.collectTransactions(); mTransactionHandler.collectTransactions(); std::vector<TransactionState> transactions = mTransactionHandler.flushTransactions(); std::vector<TransactionState> transactions = mTransactionHandler.flushTransactions(); return applyTransactions(transactions, vsyncId); return applyTransactions(transactions); } } bool SurfaceFlinger::applyTransactions(std::vector<TransactionState>& transactions, bool SurfaceFlinger::applyTransactions(std::vector<TransactionState>& transactions) { VsyncId vsyncId) { Mutex::Autolock lock(mStateLock); Mutex::Autolock lock(mStateLock); return applyTransactionsLocked(transactions, vsyncId); return applyTransactionsLocked(transactions); } } bool SurfaceFlinger::applyTransactionsLocked(std::vector<TransactionState>& transactions, bool SurfaceFlinger::applyTransactionsLocked(std::vector<TransactionState>& transactions) { VsyncId vsyncId) { bool needsTraversal = false; bool needsTraversal = false; // Now apply all transactions. // Now apply all transactions. for (auto& transaction : transactions) { for (auto& transaction : transactions) { Loading services/surfaceflinger/SurfaceFlinger.h +3 −3 Original line number Original line Diff line number Diff line Loading @@ -785,9 +785,9 @@ private: REQUIRES(mStateLock, kMainThreadContext); REQUIRES(mStateLock, kMainThreadContext); // Flush pending transactions that were presented after desiredPresentTime. // Flush pending transactions that were presented after desiredPresentTime. // For test only // 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) bool applyAndCommitDisplayTransactionStatesLocked(std::vector<TransactionState>& transactions) REQUIRES(kMainThreadContext, mStateLock); REQUIRES(kMainThreadContext, mStateLock); Loading Loading @@ -817,7 +817,7 @@ private: static LatchUnsignaledConfig getLatchUnsignaledConfig(); static LatchUnsignaledConfig getLatchUnsignaledConfig(); bool shouldLatchUnsignaled(const layer_state_t&, size_t numStates, bool firstTransaction) const; 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); REQUIRES(mStateLock, kMainThreadContext); uint32_t setDisplayStateLocked(const DisplayState& s) REQUIRES(mStateLock); uint32_t setDisplayStateLocked(const DisplayState& s) REQUIRES(mStateLock); uint32_t addInputWindowCommands(const InputWindowCommands& inputWindowCommands) uint32_t addInputWindowCommands(const InputWindowCommands& inputWindowCommands) Loading services/surfaceflinger/tests/unittests/TestableSurfaceFlinger.h +1 −1 Original line number Original line Diff line number Diff line Loading @@ -536,7 +536,7 @@ public: } } auto flushTransactionQueues() { 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) { auto onTransact(uint32_t code, const Parcel& data, Parcel* reply, uint32_t flags) { Loading Loading
services/surfaceflinger/SurfaceFlinger.cpp +6 −8 Original line number Original line Diff line number Diff line Loading @@ -2449,7 +2449,7 @@ bool SurfaceFlinger::updateLayerSnapshots(VsyncId vsyncId, nsecs_t frameTimeNs, bool newDataLatched = false; bool newDataLatched = false; SFTRACE_NAME("DisplayCallbackAndStatsUpdates"); SFTRACE_NAME("DisplayCallbackAndStatsUpdates"); mustComposite |= applyTransactionsLocked(update.transactions, vsyncId); mustComposite |= applyTransactionsLocked(update.transactions); traverseLegacyLayers([&](Layer* layer) { layer->commitTransaction(); }); traverseLegacyLayers([&](Layer* layer) { layer->commitTransaction(); }); const nsecs_t latchTime = systemTime(); const nsecs_t latchTime = systemTime(); bool unused = false; bool unused = false; Loading Loading @@ -4574,20 +4574,18 @@ void SurfaceFlinger::addTransactionReadyFilters() { } } // For tests only // For tests only bool SurfaceFlinger::flushTransactionQueues(VsyncId vsyncId) { bool SurfaceFlinger::flushTransactionQueues() { mTransactionHandler.collectTransactions(); mTransactionHandler.collectTransactions(); std::vector<TransactionState> transactions = mTransactionHandler.flushTransactions(); std::vector<TransactionState> transactions = mTransactionHandler.flushTransactions(); return applyTransactions(transactions, vsyncId); return applyTransactions(transactions); } } bool SurfaceFlinger::applyTransactions(std::vector<TransactionState>& transactions, bool SurfaceFlinger::applyTransactions(std::vector<TransactionState>& transactions) { VsyncId vsyncId) { Mutex::Autolock lock(mStateLock); Mutex::Autolock lock(mStateLock); return applyTransactionsLocked(transactions, vsyncId); return applyTransactionsLocked(transactions); } } bool SurfaceFlinger::applyTransactionsLocked(std::vector<TransactionState>& transactions, bool SurfaceFlinger::applyTransactionsLocked(std::vector<TransactionState>& transactions) { VsyncId vsyncId) { bool needsTraversal = false; bool needsTraversal = false; // Now apply all transactions. // Now apply all transactions. for (auto& transaction : transactions) { for (auto& transaction : transactions) { Loading
services/surfaceflinger/SurfaceFlinger.h +3 −3 Original line number Original line Diff line number Diff line Loading @@ -785,9 +785,9 @@ private: REQUIRES(mStateLock, kMainThreadContext); REQUIRES(mStateLock, kMainThreadContext); // Flush pending transactions that were presented after desiredPresentTime. // Flush pending transactions that were presented after desiredPresentTime. // For test only // 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) bool applyAndCommitDisplayTransactionStatesLocked(std::vector<TransactionState>& transactions) REQUIRES(kMainThreadContext, mStateLock); REQUIRES(kMainThreadContext, mStateLock); Loading Loading @@ -817,7 +817,7 @@ private: static LatchUnsignaledConfig getLatchUnsignaledConfig(); static LatchUnsignaledConfig getLatchUnsignaledConfig(); bool shouldLatchUnsignaled(const layer_state_t&, size_t numStates, bool firstTransaction) const; 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); REQUIRES(mStateLock, kMainThreadContext); uint32_t setDisplayStateLocked(const DisplayState& s) REQUIRES(mStateLock); uint32_t setDisplayStateLocked(const DisplayState& s) REQUIRES(mStateLock); uint32_t addInputWindowCommands(const InputWindowCommands& inputWindowCommands) uint32_t addInputWindowCommands(const InputWindowCommands& inputWindowCommands) Loading
services/surfaceflinger/tests/unittests/TestableSurfaceFlinger.h +1 −1 Original line number Original line Diff line number Diff line Loading @@ -536,7 +536,7 @@ public: } } auto flushTransactionQueues() { 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) { auto onTransact(uint32_t code, const Parcel& data, Parcel* reply, uint32_t flags) { Loading