Loading libs/gui/SurfaceComposerClient.cpp +14 −6 Original line number Diff line number Diff line Loading @@ -425,7 +425,6 @@ SurfaceComposerClient::Transaction& SurfaceComposerClient::Transaction::merge(Tr mComposerStates[kv.first].state.merge(kv.second.state); } } other.mComposerStates.clear(); for (auto const& state : other.mDisplayStates) { ssize_t index = mDisplayStates.indexOf(state); Loading @@ -435,7 +434,6 @@ SurfaceComposerClient::Transaction& SurfaceComposerClient::Transaction::merge(Tr mDisplayStates.editItemAt(static_cast<size_t>(index)).merge(state); } } other.mDisplayStates.clear(); for (const auto& [listener, callbackInfo] : other.mListenerCallbacks) { auto& [callbackIds, surfaceControls] = callbackInfo; Loading @@ -446,17 +444,27 @@ SurfaceComposerClient::Transaction& SurfaceComposerClient::Transaction::merge(Tr .surfaceControls.insert(std::make_move_iterator(surfaceControls.begin()), std::make_move_iterator(surfaceControls.end())); } other.mListenerCallbacks.clear(); mInputWindowCommands.merge(other.mInputWindowCommands); other.mInputWindowCommands.clear(); mContainsBuffer = other.mContainsBuffer; other.mContainsBuffer = false; other.clear(); return *this; } void SurfaceComposerClient::Transaction::clear() { mComposerStates.clear(); mDisplayStates.clear(); mListenerCallbacks.clear(); mInputWindowCommands.clear(); mContainsBuffer = false; mForceSynchronous = 0; mTransactionNestCount = 0; mAnimation = false; mEarlyWakeup = false; mDesiredPresentTime = -1; } void SurfaceComposerClient::doDropReferenceTransaction(const sp<IBinder>& handle, const sp<ISurfaceComposerClient>& client) { sp<ISurfaceComposer> sf(ComposerService::getComposerService()); Loading libs/gui/include/gui/SurfaceComposerClient.h +3 −0 Original line number Diff line number Diff line Loading @@ -331,6 +331,9 @@ public: status_t writeToParcel(Parcel* parcel) const override; status_t readFromParcel(const Parcel* parcel) override; // Clears the contents of the transaction without applying it. void clear(); status_t apply(bool synchronous = false); // Merge another transaction in to this one, clearing other // as if it had been applied. Loading Loading
libs/gui/SurfaceComposerClient.cpp +14 −6 Original line number Diff line number Diff line Loading @@ -425,7 +425,6 @@ SurfaceComposerClient::Transaction& SurfaceComposerClient::Transaction::merge(Tr mComposerStates[kv.first].state.merge(kv.second.state); } } other.mComposerStates.clear(); for (auto const& state : other.mDisplayStates) { ssize_t index = mDisplayStates.indexOf(state); Loading @@ -435,7 +434,6 @@ SurfaceComposerClient::Transaction& SurfaceComposerClient::Transaction::merge(Tr mDisplayStates.editItemAt(static_cast<size_t>(index)).merge(state); } } other.mDisplayStates.clear(); for (const auto& [listener, callbackInfo] : other.mListenerCallbacks) { auto& [callbackIds, surfaceControls] = callbackInfo; Loading @@ -446,17 +444,27 @@ SurfaceComposerClient::Transaction& SurfaceComposerClient::Transaction::merge(Tr .surfaceControls.insert(std::make_move_iterator(surfaceControls.begin()), std::make_move_iterator(surfaceControls.end())); } other.mListenerCallbacks.clear(); mInputWindowCommands.merge(other.mInputWindowCommands); other.mInputWindowCommands.clear(); mContainsBuffer = other.mContainsBuffer; other.mContainsBuffer = false; other.clear(); return *this; } void SurfaceComposerClient::Transaction::clear() { mComposerStates.clear(); mDisplayStates.clear(); mListenerCallbacks.clear(); mInputWindowCommands.clear(); mContainsBuffer = false; mForceSynchronous = 0; mTransactionNestCount = 0; mAnimation = false; mEarlyWakeup = false; mDesiredPresentTime = -1; } void SurfaceComposerClient::doDropReferenceTransaction(const sp<IBinder>& handle, const sp<ISurfaceComposerClient>& client) { sp<ISurfaceComposer> sf(ComposerService::getComposerService()); Loading
libs/gui/include/gui/SurfaceComposerClient.h +3 −0 Original line number Diff line number Diff line Loading @@ -331,6 +331,9 @@ public: status_t writeToParcel(Parcel* parcel) const override; status_t readFromParcel(const Parcel* parcel) override; // Clears the contents of the transaction without applying it. void clear(); status_t apply(bool synchronous = false); // Merge another transaction in to this one, clearing other // as if it had been applied. Loading