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

Commit cd5e6384 authored by Rob Carr's avatar Rob Carr Committed by Android (Google) Code Review
Browse files

Merge "SurfaceFlinger: Check frameIsEarly earlier" into sc-dev

parents 8f751f89 a7cda15d
Loading
Loading
Loading
Loading
+0 −6
Original line number Diff line number Diff line
@@ -414,12 +414,6 @@ bool BufferLayer::shouldPresentNow(nsecs_t expectedPresentTime) const {
        return true;
    }

    // If the next planned present time is not current, return and try again later
    if (frameIsEarly(expectedPresentTime)) {
        ATRACE_NAME("frameIsEarly()");
        return false;
    }

    // If this layer doesn't have a frame is shouldn't be presented
    if (!hasFrameUpdate()) {
        return false;
+2 −0
Original line number Diff line number Diff line
@@ -924,6 +924,8 @@ public:

    pid_t getOwnerPid() { return mOwnerPid; }

    virtual bool frameIsEarly(nsecs_t /*expectedPresentTime*/) const { return false; }

    // This layer is not a clone, but it's the parent to the cloned hierarchy. The
    // variable mClonedChild represents the top layer that will be cloned so this
    // layer will be the parent of mClonedChild.
+4 −0
Original line number Diff line number Diff line
@@ -3361,6 +3361,10 @@ bool SurfaceFlinger::transactionIsReadyToBeApplied(
        if (!layer) {
            continue;
        }
        if (layer->frameIsEarly(expectedPresentTime)) {
            ATRACE_NAME("frameIsEarly()");
            return false;
        }

        if (!mScheduler->isVsyncValid(expectedPresentTime, layer->getOwnerUid())) {
            ATRACE_NAME("!isVsyncValidForUid");