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

Commit d1262ccb authored by Huihong Luo's avatar Huihong Luo Committed by Automerger Merge Worker
Browse files

Merge "Reset pending commands" into udc-dev am: f447b2cc

parents ce5ea63b f447b2cc
Loading
Loading
Loading
Loading
+1 −12
Original line number Diff line number Diff line
@@ -329,14 +329,6 @@ void AidlComposer::registerCallback(HWC2::ComposerCallback& callback) {
    }
}

void AidlComposer::resetCommands(Display display) {
    mMutex.lock_shared();
    if (auto writer = getWriter(display)) {
        writer->get().reset();
    }
    mMutex.unlock_shared();
}

Error AidlComposer::executeCommands(Display display) {
    mMutex.lock_shared();
    auto error = execute(display);
@@ -1054,9 +1046,8 @@ Error AidlComposer::execute(Display display) {
        return Error::BAD_DISPLAY;
    }

    const auto& commands = writer->get().getPendingCommands();
    auto commands = writer->get().takePendingCommands();
    if (commands.empty()) {
        writer->get().reset();
        return Error::NONE;
    }

@@ -1088,8 +1079,6 @@ Error AidlComposer::execute(Display display) {
        }
    }

    writer->get().reset();

    return error;
}

+0 −4
Original line number Diff line number Diff line
@@ -72,10 +72,6 @@ public:

    void registerCallback(HWC2::ComposerCallback& callback) override;

    // Reset all pending commands in the command buffer. Useful if you want to
    // skip a frame but have already queued some commands.
    void resetCommands(Display) override;

    // Explicitly flush all pending commands in the command buffer.
    Error executeCommands(Display) override;

+0 −4
Original line number Diff line number Diff line
@@ -110,10 +110,6 @@ public:

    virtual void registerCallback(HWC2::ComposerCallback& callback) = 0;

    // Reset all pending commands in the command buffer. Useful if you want to
    // skip a frame but have already queued some commands.
    virtual void resetCommands(Display) = 0;

    // Explicitly flush all pending commands in the command buffer.
    virtual Error executeCommands(Display) = 0;

+0 −4
Original line number Diff line number Diff line
@@ -293,10 +293,6 @@ void HidlComposer::registerCallback(const sp<IComposerCallback>& callback) {
    }
}

void HidlComposer::resetCommands(Display) {
    mWriter.reset();
}

Error HidlComposer::executeCommands(Display) {
    return execute();
}
+0 −4
Original line number Diff line number Diff line
@@ -174,10 +174,6 @@ public:

    void registerCallback(HWC2::ComposerCallback& callback) override;

    // Reset all pending commands in the command buffer. Useful if you want to
    // skip a frame but have already queued some commands.
    void resetCommands(Display) override;

    // Explicitly flush all pending commands in the command buffer.
    Error executeCommands(Display) override;

Loading