Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1293d58a authored by Patrick Williams's avatar Patrick Williams Committed by Android (Google) Code Review
Browse files

Revert "Log fatal if transaction callbacks are called more than once"

This reverts commit fd0c1b4b.

Reason for revert: reverting in favor of ag/24199759 which should fix the root cause

Change-Id: I23dd23954edad3a95899b8d75f5b518c836b302b
parent fd0c1b4b
Loading
Loading
Loading
Loading
+2 −23
Original line number Diff line number Diff line
@@ -1901,29 +1901,8 @@ SurfaceComposerClient::Transaction& SurfaceComposerClient::Transaction::addTrans
        CallbackId::Type callbackType) {
    auto listener = TransactionCompletedListener::getInstance();

    TransactionCompletedCallback callbackWithContext =
            [called = false, callback,
             callbackContext](nsecs_t latchTime, const sp<Fence>& presentFence,
                              const std::vector<SurfaceControlStats>& stats) mutable {
                if (called) {
                    std::stringstream stream;
                    auto it = stats.begin();
                    if (it != stats.end()) {
                        stream << it->surfaceControl->getName();
                        it++;
                    }
                    while (it != stats.end()) {
                        stream << ", " << it->surfaceControl->getName();
                        it++;
                    }
                    LOG_ALWAYS_FATAL("Transaction callback called more than once. SurfaceControls: "
                                     "%s",
                                     stream.str().c_str());
                }
                callback(callbackContext, latchTime, presentFence, stats);
                called = true;
            };

    auto callbackWithContext = std::bind(callback, callbackContext, std::placeholders::_1,
                                         std::placeholders::_2, std::placeholders::_3);
    const auto& surfaceControls =
            mListenerCallbacks[TransactionCompletedListener::getIInstance()].surfaceControls;