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

Commit a4eb946d authored by Patrick Williams's avatar Patrick Williams
Browse files

Avoid unnecessary copies in updateInputFlinger

Lambda capture values are const by default, preventing a move from occurring despite using std::move. Declaring the lambda "mutable" fixes this.

Bug: 352744079
Flag: EXEMPT refactor
Test: presubmits
Change-Id: I322e8a6c85c810cc90669d043c4f72feb57a97ae
parent 525e783f
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -4021,7 +4021,8 @@ void SurfaceFlinger::updateInputFlinger(VsyncId vsyncId, TimePoint frameTime) {
                                                      inputWindowCommands =
                                                              std::move(mInputWindowCommands),
                                                      inputFlinger = mInputFlinger, this,
                                                      visibleWindowsChanged, vsyncId, frameTime]() {
                                                      visibleWindowsChanged, vsyncId,
                                                      frameTime]() mutable {
        SFTRACE_NAME("BackgroundExecutor::updateInputFlinger");
        if (updateWindowInfo) {
            mWindowInfosListenerInvoker