summaryrefslogtreecommitdiff
path: root/libs/hwui/AnimationContext.h
diff options
context:
space:
mode:
authorJohn Reck <jreck@google.com>2014-09-05 15:23:38 -0700
committerJohn Reck <jreck@google.com>2014-09-05 15:23:38 -0700
commitec845a215e343cdb3b2e4c7b6aff7b24beb0236b (patch)
tree270a6f8ff4a8c6c03c207ebc6fca85168efc25b8 /libs/hwui/AnimationContext.h
parentc237555c6cb89c347acf13eba45b875946473501 (diff)
Fix race condition
Bug: 17372309 AnimationContext::startFrame() happens both with and without the UI thread lock. Pass the TraversalMode into it so that ThreadedRenderer's subclass can correctly decide when it is safe to push over mPendingAnimatingRenderNodes, as doing so outside of the lock is Very Bad. Change-Id: Ife5dd3a2b46b0a207cd9234c159a674afdbf5efd
Diffstat (limited to 'libs/hwui/AnimationContext.h')
-rw-r--r--libs/hwui/AnimationContext.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/libs/hwui/AnimationContext.h b/libs/hwui/AnimationContext.h
index 9b3d5f486464..909ed36a2127 100644
--- a/libs/hwui/AnimationContext.h
+++ b/libs/hwui/AnimationContext.h
@@ -20,6 +20,7 @@
#include <utils/RefBase.h>
#include <utils/StrongPointer.h>
+#include "TreeInfo.h"
#include "renderthread/TimeLord.h"
#include "utils/Macros.h"
@@ -30,7 +31,6 @@ class AnimationContext;
class AnimationListener;
class BaseRenderNodeAnimator;
class RenderNode;
-class TreeInfo;
/*
* AnimationHandle is several classes merged into one.
@@ -90,7 +90,7 @@ public:
// Marks the start of a frame, which will update the frame time and move all
// next frame animations into the current frame
- ANDROID_API virtual void startFrame();
+ ANDROID_API virtual void startFrame(TreeInfo::TraversalMode mode);
// Runs any animations still left in mCurrentFrameAnimations that were not run
// as part of the standard RenderNode:prepareTree pass.