summaryrefslogtreecommitdiffstats
path: root/libs/hwui/renderthread
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/renderthread
parentc237555c6cb89c347acf13eba45b875946473501 (diff)
downloadframeworks_base-ec845a215e343cdb3b2e4c7b6aff7b24beb0236b.zip
frameworks_base-ec845a215e343cdb3b2e4c7b6aff7b24beb0236b.tar.gz
frameworks_base-ec845a215e343cdb3b2e4c7b6aff7b24beb0236b.tar.bz2
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/renderthread')
-rw-r--r--libs/hwui/renderthread/CanvasContext.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/libs/hwui/renderthread/CanvasContext.cpp b/libs/hwui/renderthread/CanvasContext.cpp
index 4129a89..5e6796c 100644
--- a/libs/hwui/renderthread/CanvasContext.cpp
+++ b/libs/hwui/renderthread/CanvasContext.cpp
@@ -150,7 +150,7 @@ void CanvasContext::prepareTree(TreeInfo& info) {
if (mPrefetechedLayers.size() && info.mode == TreeInfo::MODE_FULL) {
info.canvasContext = this;
}
- mAnimationContext->startFrame();
+ mAnimationContext->startFrame(info.mode);
mRootRenderNode->prepareTree(info);
mAnimationContext->runRemainingAnimations(info);