Loading services/surfaceflinger/SurfaceFlinger.cpp +8 −3 Original line number Diff line number Diff line Loading @@ -3514,7 +3514,7 @@ bool SurfaceFlinger::flushTransactionQueues() { break; } applyTransactionState(states, displays, flags, mPendingInputWindowCommands, desiredPresentTime, postTime, privileged); desiredPresentTime, postTime, privileged, /*isMainThread*/ true); transactionQueue.pop(); } Loading Loading @@ -3601,7 +3601,7 @@ void SurfaceFlinger::applyTransactionState(const Vector<ComposerState>& states, const Vector<DisplayState>& displays, uint32_t flags, const InputWindowCommands& inputWindowCommands, const int64_t desiredPresentTime, const int64_t postTime, bool privileged) { bool privileged, bool isMainThread) { uint32_t transactionFlags = 0; if (flags & eAnimation) { Loading Loading @@ -3665,7 +3665,12 @@ void SurfaceFlinger::applyTransactionState(const Vector<ComposerState>& states, } mPendingSyncInputWindows = mPendingInputWindowCommands.syncInputWindows; while (mTransactionPending || mPendingSyncInputWindows) { // applyTransactionState can be called by either the main SF thread or by // another process through setTransactionState. While a given process may wish // to wait on synchronous transactions, the main SF thread should never // be blocked. Therefore, we only wait if isMainThread is false. while (!isMainThread && (mTransactionPending || mPendingSyncInputWindows)) { status_t err = mTransactionCV.waitRelative(mStateLock, s2ns(5)); if (CC_UNLIKELY(err != NO_ERROR)) { // just in case something goes wrong in SF, return to the Loading services/surfaceflinger/SurfaceFlinger.h +1 −1 Original line number Diff line number Diff line Loading @@ -578,7 +578,7 @@ private: const Vector<DisplayState>& displays, uint32_t flags, const InputWindowCommands& inputWindowCommands, const int64_t desiredPresentTime, const int64_t postTime, bool privileged) REQUIRES(mStateLock); bool privileged, bool isMainThread = false) REQUIRES(mStateLock); bool flushTransactionQueues(); uint32_t getTransactionFlags(uint32_t flags); uint32_t peekTransactionFlags(); Loading Loading
services/surfaceflinger/SurfaceFlinger.cpp +8 −3 Original line number Diff line number Diff line Loading @@ -3514,7 +3514,7 @@ bool SurfaceFlinger::flushTransactionQueues() { break; } applyTransactionState(states, displays, flags, mPendingInputWindowCommands, desiredPresentTime, postTime, privileged); desiredPresentTime, postTime, privileged, /*isMainThread*/ true); transactionQueue.pop(); } Loading Loading @@ -3601,7 +3601,7 @@ void SurfaceFlinger::applyTransactionState(const Vector<ComposerState>& states, const Vector<DisplayState>& displays, uint32_t flags, const InputWindowCommands& inputWindowCommands, const int64_t desiredPresentTime, const int64_t postTime, bool privileged) { bool privileged, bool isMainThread) { uint32_t transactionFlags = 0; if (flags & eAnimation) { Loading Loading @@ -3665,7 +3665,12 @@ void SurfaceFlinger::applyTransactionState(const Vector<ComposerState>& states, } mPendingSyncInputWindows = mPendingInputWindowCommands.syncInputWindows; while (mTransactionPending || mPendingSyncInputWindows) { // applyTransactionState can be called by either the main SF thread or by // another process through setTransactionState. While a given process may wish // to wait on synchronous transactions, the main SF thread should never // be blocked. Therefore, we only wait if isMainThread is false. while (!isMainThread && (mTransactionPending || mPendingSyncInputWindows)) { status_t err = mTransactionCV.waitRelative(mStateLock, s2ns(5)); if (CC_UNLIKELY(err != NO_ERROR)) { // just in case something goes wrong in SF, return to the Loading
services/surfaceflinger/SurfaceFlinger.h +1 −1 Original line number Diff line number Diff line Loading @@ -578,7 +578,7 @@ private: const Vector<DisplayState>& displays, uint32_t flags, const InputWindowCommands& inputWindowCommands, const int64_t desiredPresentTime, const int64_t postTime, bool privileged) REQUIRES(mStateLock); bool privileged, bool isMainThread = false) REQUIRES(mStateLock); bool flushTransactionQueues(); uint32_t getTransactionFlags(uint32_t flags); uint32_t peekTransactionFlags(); Loading