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

Commit 08e97225 authored by Doris Liu's avatar Doris Liu Committed by android-build-merger
Browse files

Merge \\"Make sure VD animation push staging happens only in MODE_FULL\\" into...

Merge \\"Make sure VD animation push staging happens only in MODE_FULL\\" into nyc-mr1-dev am: 41fb3028
am: 42ba9da4

Change-Id: Ia83aeafe76349f083ed3c030ed69799e82e10fb9
parents 68c0b05e 42ba9da4
Loading
Loading
Loading
Loading
+9 −1
Original line number Diff line number Diff line
@@ -255,7 +255,6 @@ public:

    void runVectorDrawableAnimators(AnimationContext* context) {
        for (auto it = mVectorDrawableAnimators.begin(); it != mVectorDrawableAnimators.end();) {
            (*it)->pushStaging(*context);
            if ((*it)->animate(*context)) {
                it = mVectorDrawableAnimators.erase(it);
            } else {
@@ -264,6 +263,12 @@ public:
        }
    }

    void pushStagingVectorDrawableAnimators(AnimationContext* context) {
        for (auto& anim : mVectorDrawableAnimators) {
            anim->pushStaging(*context);
        }
    }

    void destroy() {
        for (auto& renderNode : mPendingAnimatingRenderNodes) {
            renderNode->animators().endAllStagingAnimators();
@@ -328,6 +333,9 @@ public:
        // already ran in each RenderNode. Note that these animators don't damage the RenderNodes.
        // The damaging is done in prepareTree as needed after checking whether a VD has been
        // modified.
        if (mode == TreeInfo::MODE_FULL) {
            mRootNode->pushStagingVectorDrawableAnimators(this);
        }
        mRootNode->runVectorDrawableAnimators(this);
    }