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

Commit c7900120 authored by Ady Abraham's avatar Ady Abraham
Browse files

SF: avoid calling pendingBuffers.insert twice

ag/13806579 accidently added another call to pendingBuffers.insert which
is incorrect.

Bug: 181978893
Test: SF unit tests
Change-Id: I3e7df528f8dcb1ccd8c5a83c51b23b8433a049d3
parent 2f43b20d
Loading
Loading
Loading
Loading
+1 −2
Original line number Original line Diff line number Diff line
@@ -3412,7 +3412,7 @@ bool SurfaceFlinger::transactionIsReadyToBeApplied(
        const auto vsyncId = frameTimelineInfoChanged ? s.frameTimelineInfo.vsyncId : info.vsyncId;
        const auto vsyncId = frameTimelineInfoChanged ? s.frameTimelineInfo.vsyncId : info.vsyncId;
        if (isAutoTimestamp && layer->frameIsEarly(expectedPresentTime, vsyncId)) {
        if (isAutoTimestamp && layer->frameIsEarly(expectedPresentTime, vsyncId)) {
            ATRACE_NAME("frameIsEarly()");
            ATRACE_NAME("frameIsEarly()");
            return false;
            ready = false;
        }
        }


        if (!mScheduler->isVsyncValid(expectedPresentTime, layer->getOwnerUid())) {
        if (!mScheduler->isVsyncValid(expectedPresentTime, layer->getOwnerUid())) {
@@ -3430,7 +3430,6 @@ bool SurfaceFlinger::transactionIsReadyToBeApplied(
            }
            }
            pendingBuffers.insert(s.surface);
            pendingBuffers.insert(s.surface);
        }
        }
        pendingBuffers.insert(s.surface);
    }
    }
    return ready;
    return ready;
}
}