Loading libs/hwui/RenderNode.cpp +7 −2 Original line number Diff line number Diff line Loading @@ -215,7 +215,10 @@ void RenderNode::prepareTreeImpl(TreeInfo& info) { if (info.mode == TreeInfo::MODE_FULL) { pushStagingPropertiesChanges(info); } uint32_t animatorDirtyMask = mAnimatorManager.animate(info); uint32_t animatorDirtyMask = 0; if (CC_LIKELY(info.runAnimations)) { animatorDirtyMask = mAnimatorManager.animate(info); } prepareLayer(info, animatorDirtyMask); if (info.mode == TreeInfo::MODE_FULL) { pushStagingDisplayListChanges(info); Loading @@ -230,7 +233,9 @@ void RenderNode::pushStagingPropertiesChanges(TreeInfo& info) { // Push the animators first so that setupStartValueIfNecessary() is called // before properties() is trampled by stagingProperties(), as they are // required by some animators. if (CC_LIKELY(info.runAnimations)) { mAnimatorManager.pushStaging(info); } if (mDirtyPropertyFields) { mDirtyPropertyFields = 0; damageSelf(info); Loading libs/hwui/TreeInfo.h +8 −0 Original line number Diff line number Diff line Loading @@ -65,6 +65,7 @@ public: , frameTimeMs(0) , animationHook(NULL) , prepareTextures(mode == MODE_FULL) , runAnimations(true) , damageAccumulator(NULL) , renderState(renderState) , renderer(NULL) Loading @@ -76,6 +77,7 @@ public: , frameTimeMs(clone.frameTimeMs) , animationHook(clone.animationHook) , prepareTextures(mode == MODE_FULL) , runAnimations(clone.runAnimations) , damageAccumulator(clone.damageAccumulator) , renderState(clone.renderState) , renderer(clone.renderer) Loading @@ -88,6 +90,12 @@ public: // TODO: Remove this? Currently this is used to signal to stop preparing // textures if we run out of cache space. bool prepareTextures; // TODO: buildLayer uses this to suppress running any animations, but this // should probably be refactored somehow. The reason this is done is // because buildLayer is not setup for injecting the animationHook, as well // as this being otherwise wasted work as all the animators will be // re-evaluated when the frame is actually drawn bool runAnimations; // Must not be null during actual usage DamageAccumulator* damageAccumulator; Loading libs/hwui/renderthread/CanvasContext.cpp +1 −0 Original line number Diff line number Diff line Loading @@ -257,6 +257,7 @@ void CanvasContext::buildLayer(RenderNode* node) { info.frameTimeMs = mRenderThread.timeLord().frameTimeMs(); info.damageAccumulator = &mDamageAccumulator; info.renderer = mCanvas; info.runAnimations = false; node->prepareTree(info); SkRect ignore; mDamageAccumulator.finish(&ignore); Loading Loading
libs/hwui/RenderNode.cpp +7 −2 Original line number Diff line number Diff line Loading @@ -215,7 +215,10 @@ void RenderNode::prepareTreeImpl(TreeInfo& info) { if (info.mode == TreeInfo::MODE_FULL) { pushStagingPropertiesChanges(info); } uint32_t animatorDirtyMask = mAnimatorManager.animate(info); uint32_t animatorDirtyMask = 0; if (CC_LIKELY(info.runAnimations)) { animatorDirtyMask = mAnimatorManager.animate(info); } prepareLayer(info, animatorDirtyMask); if (info.mode == TreeInfo::MODE_FULL) { pushStagingDisplayListChanges(info); Loading @@ -230,7 +233,9 @@ void RenderNode::pushStagingPropertiesChanges(TreeInfo& info) { // Push the animators first so that setupStartValueIfNecessary() is called // before properties() is trampled by stagingProperties(), as they are // required by some animators. if (CC_LIKELY(info.runAnimations)) { mAnimatorManager.pushStaging(info); } if (mDirtyPropertyFields) { mDirtyPropertyFields = 0; damageSelf(info); Loading
libs/hwui/TreeInfo.h +8 −0 Original line number Diff line number Diff line Loading @@ -65,6 +65,7 @@ public: , frameTimeMs(0) , animationHook(NULL) , prepareTextures(mode == MODE_FULL) , runAnimations(true) , damageAccumulator(NULL) , renderState(renderState) , renderer(NULL) Loading @@ -76,6 +77,7 @@ public: , frameTimeMs(clone.frameTimeMs) , animationHook(clone.animationHook) , prepareTextures(mode == MODE_FULL) , runAnimations(clone.runAnimations) , damageAccumulator(clone.damageAccumulator) , renderState(clone.renderState) , renderer(clone.renderer) Loading @@ -88,6 +90,12 @@ public: // TODO: Remove this? Currently this is used to signal to stop preparing // textures if we run out of cache space. bool prepareTextures; // TODO: buildLayer uses this to suppress running any animations, but this // should probably be refactored somehow. The reason this is done is // because buildLayer is not setup for injecting the animationHook, as well // as this being otherwise wasted work as all the animators will be // re-evaluated when the frame is actually drawn bool runAnimations; // Must not be null during actual usage DamageAccumulator* damageAccumulator; Loading
libs/hwui/renderthread/CanvasContext.cpp +1 −0 Original line number Diff line number Diff line Loading @@ -257,6 +257,7 @@ void CanvasContext::buildLayer(RenderNode* node) { info.frameTimeMs = mRenderThread.timeLord().frameTimeMs(); info.damageAccumulator = &mDamageAccumulator; info.renderer = mCanvas; info.runAnimations = false; node->prepareTree(info); SkRect ignore; mDamageAccumulator.finish(&ignore); Loading