Loading services/surfaceflinger/SurfaceFlinger.cpp +38 −36 Original line number Diff line number Diff line Loading @@ -2553,7 +2553,14 @@ void SurfaceFlinger::initScheduler(DisplayId primaryDisplayId) { void SurfaceFlinger::commitTransaction() { withTracingLock([&]() { withTracingLock([this]() { commitTransactionLocked(); }); mTransactionPending = false; mAnimTransactionPending = false; mTransactionCV.broadcast(); } void SurfaceFlinger::commitTransactionLocked() { if (!mLayersPendingRemoval.isEmpty()) { // Notify removed layers now that they can't be drawn from for (const auto& l : mLayersPendingRemoval) { Loading Loading @@ -2593,11 +2600,6 @@ void SurfaceFlinger::commitTransaction() }); commitOffscreenLayers(); }); mTransactionPending = false; mAnimTransactionPending = false; mTransactionCV.broadcast(); } void SurfaceFlinger::withTracingLock(std::function<void()> lockedOperation) { Loading services/surfaceflinger/SurfaceFlinger.h +10 −4 Original line number Diff line number Diff line Loading @@ -346,9 +346,11 @@ private: static const size_t MAX_LAYERS = 4096; static const int MAX_TRACING_MEMORY = 100 * 1024 * 1024; // 100MB protected: // We're reference counted, never destroy SurfaceFlinger directly virtual ~SurfaceFlinger(); private: /* ------------------------------------------------------------------------ * Internal data structures */ Loading Loading @@ -583,15 +585,19 @@ private: bool transactionIsReadyToBeApplied(int64_t desiredPresentTime, bool useCachedExpectedPresentTime, const Vector<ComposerState>& states); uint32_t setClientStateLocked( uint32_t setDisplayStateLocked(const DisplayState& s) REQUIRES(mStateLock); uint32_t addInputWindowCommands(const InputWindowCommands& inputWindowCommands) REQUIRES(mStateLock); protected: virtual uint32_t setClientStateLocked( const ComposerState& composerState, int64_t desiredPresentTime, int64_t postTime, bool privileged, std::unordered_set<ListenerCallbacks, ListenerCallbacksHash>& listenerCallbacks) REQUIRES(mStateLock); uint32_t setDisplayStateLocked(const DisplayState& s) REQUIRES(mStateLock); uint32_t addInputWindowCommands(const InputWindowCommands& inputWindowCommands) REQUIRES(mStateLock); virtual void commitTransactionLocked(); private: /* ------------------------------------------------------------------------ * Layer management */ Loading Loading
services/surfaceflinger/SurfaceFlinger.cpp +38 −36 Original line number Diff line number Diff line Loading @@ -2553,7 +2553,14 @@ void SurfaceFlinger::initScheduler(DisplayId primaryDisplayId) { void SurfaceFlinger::commitTransaction() { withTracingLock([&]() { withTracingLock([this]() { commitTransactionLocked(); }); mTransactionPending = false; mAnimTransactionPending = false; mTransactionCV.broadcast(); } void SurfaceFlinger::commitTransactionLocked() { if (!mLayersPendingRemoval.isEmpty()) { // Notify removed layers now that they can't be drawn from for (const auto& l : mLayersPendingRemoval) { Loading Loading @@ -2593,11 +2600,6 @@ void SurfaceFlinger::commitTransaction() }); commitOffscreenLayers(); }); mTransactionPending = false; mAnimTransactionPending = false; mTransactionCV.broadcast(); } void SurfaceFlinger::withTracingLock(std::function<void()> lockedOperation) { Loading
services/surfaceflinger/SurfaceFlinger.h +10 −4 Original line number Diff line number Diff line Loading @@ -346,9 +346,11 @@ private: static const size_t MAX_LAYERS = 4096; static const int MAX_TRACING_MEMORY = 100 * 1024 * 1024; // 100MB protected: // We're reference counted, never destroy SurfaceFlinger directly virtual ~SurfaceFlinger(); private: /* ------------------------------------------------------------------------ * Internal data structures */ Loading Loading @@ -583,15 +585,19 @@ private: bool transactionIsReadyToBeApplied(int64_t desiredPresentTime, bool useCachedExpectedPresentTime, const Vector<ComposerState>& states); uint32_t setClientStateLocked( uint32_t setDisplayStateLocked(const DisplayState& s) REQUIRES(mStateLock); uint32_t addInputWindowCommands(const InputWindowCommands& inputWindowCommands) REQUIRES(mStateLock); protected: virtual uint32_t setClientStateLocked( const ComposerState& composerState, int64_t desiredPresentTime, int64_t postTime, bool privileged, std::unordered_set<ListenerCallbacks, ListenerCallbacksHash>& listenerCallbacks) REQUIRES(mStateLock); uint32_t setDisplayStateLocked(const DisplayState& s) REQUIRES(mStateLock); uint32_t addInputWindowCommands(const InputWindowCommands& inputWindowCommands) REQUIRES(mStateLock); virtual void commitTransactionLocked(); private: /* ------------------------------------------------------------------------ * Layer management */ Loading