Animator refactoring & fixes

 Tweaks animators to have less unnecessary refcounting

 Pull animator management out into seperate class

 More control to tweak animator lifecycle, such as doing
 Java-side handling of start delay by attaching but not
 starting the animator

Change-Id: I4ff8207580ca11fb38f45ef0007b406e0097281c
diff --git a/libs/hwui/TreeInfo.h b/libs/hwui/TreeInfo.h
index 249e525..083100e 100644
--- a/libs/hwui/TreeInfo.h
+++ b/libs/hwui/TreeInfo.h
@@ -79,6 +79,17 @@
         , errorHandler(NULL)
     {}
 
+    explicit TreeInfo(TraversalMode mode, const TreeInfo& clone)
+        : mode(mode)
+        , frameTimeMs(clone.frameTimeMs)
+        , animationHook(clone.animationHook)
+        , prepareTextures(mode == MODE_FULL)
+        , damageAccumulator(clone.damageAccumulator)
+        , renderState(clone.renderState)
+        , renderer(clone.renderer)
+        , errorHandler(clone.errorHandler)
+    {}
+
     const TraversalMode mode;
     nsecs_t frameTimeMs;
     AnimationHook* animationHook;