From 9eb9f6f8cbbbd87d45da8071aa54cb066a797723 Mon Sep 17 00:00:00 2001 From: John Reck Date: Thu, 21 Aug 2014 11:23:05 -0700 Subject: Don't run animators in buildLayer Bug: 17172689 Change-Id: Ib47d589c002543327fa336718440f9f8c95524e0 --- libs/hwui/TreeInfo.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'libs/hwui/TreeInfo.h') diff --git a/libs/hwui/TreeInfo.h b/libs/hwui/TreeInfo.h index 331f1574ff17..74d52a33d45f 100644 --- a/libs/hwui/TreeInfo.h +++ b/libs/hwui/TreeInfo.h @@ -65,6 +65,7 @@ public: , frameTimeMs(0) , animationHook(NULL) , prepareTextures(mode == MODE_FULL) + , runAnimations(true) , damageAccumulator(NULL) , renderState(renderState) , renderer(NULL) @@ -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) @@ -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; -- cgit v1.2.3-59-g8ed1b