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

Commit 9aa7b45e authored by John Reck's avatar John Reck Committed by Android (Google) Code Review
Browse files

Merge "Fix kSkippedFrame setting" into mnc-dev

parents e48f44f5 aef9dc8d
Loading
Loading
Loading
Loading
+5 −2
Original line number Diff line number Diff line
@@ -171,6 +171,7 @@ void CanvasContext::prepareTree(TreeInfo& info, int64_t* uiFrameInfo) {
    }

    if (CC_UNLIKELY(!mNativeWindow.get())) {
        mCurrentFrameInfo->addFlag(FrameInfoFlags::kSkippedFrame);
        info.out.canDrawThisFrame = false;
        return;
    }
@@ -183,6 +184,10 @@ void CanvasContext::prepareTree(TreeInfo& info, int64_t* uiFrameInfo) {
            NATIVE_WINDOW_CONSUMER_RUNNING_BEHIND, &runningBehind);
    info.out.canDrawThisFrame = !runningBehind;

    if (!info.out.canDrawThisFrame) {
        mCurrentFrameInfo->addFlag(FrameInfoFlags::kSkippedFrame);
    }

    if (info.out.hasAnimations || !info.out.canDrawThisFrame) {
        if (!info.out.requiresUiRedraw) {
            // If animationsNeedsRedraw is set don't bother posting for an RT anim
@@ -284,8 +289,6 @@ void CanvasContext::doFrame() {
    prepareTree(info, frameInfo);
    if (info.out.canDrawThisFrame) {
        draw();
    } else {
        mCurrentFrameInfo->addFlag(FrameInfoFlags::kSkippedFrame);
    }
}