summaryrefslogtreecommitdiffstats
path: root/libs/hwui
diff options
context:
space:
mode:
authorJohn Reck <jreck@google.com>2015-07-23 15:33:12 -0700
committerJohn Reck <jreck@google.com>2015-07-23 22:37:21 +0000
commit49dec430e8a38943c5e934c1e31b724bf53c47c4 (patch)
treed75a3266a20b4810f179ffa4fd14c7d939182e6d /libs/hwui
parenta2bf7616044051769df86cf5f0bb4b21dedd5269 (diff)
downloadframeworks_base-49dec430e8a38943c5e934c1e31b724bf53c47c4.zip
frameworks_base-49dec430e8a38943c5e934c1e31b724bf53c47c4.tar.gz
frameworks_base-49dec430e8a38943c5e934c1e31b724bf53c47c4.tar.bz2
Move updateMatrix() call to animateCommon
Bug: 22667315 HWUI internally always assumes that RenderNode->properties() has a fully-baked matrix. However, RenderThread animations violate this and will perform an update of that matrix after they run. This was missing in the fallback scenario where an animation was running on a View that is detached from the tree. If a RenderThread animation is started on an attached view, it becomes detached, and is then re-attached it will crash in the staging properties push. The fix for this is to move the call to updateMatrix from animate() to animateCommon() so that the animateNoDamage() path will similarly perform the necessary matrix update. Change-Id: I4c899a6f68659342a6515f1d7f20d3c4af65caf0
Diffstat (limited to 'libs/hwui')
-rw-r--r--libs/hwui/AnimatorManager.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/libs/hwui/AnimatorManager.cpp b/libs/hwui/AnimatorManager.cpp
index 966959a..0dababd 100644
--- a/libs/hwui/AnimatorManager.cpp
+++ b/libs/hwui/AnimatorManager.cpp
@@ -117,7 +117,6 @@ uint32_t AnimatorManager::animate(TreeInfo& info) {
uint32_t dirty = animateCommon(info);
- mParent.mProperties.updateMatrix();
info.damageAccumulator->pushTransform(&mParent);
mParent.damageSelf(info);
@@ -136,6 +135,7 @@ uint32_t AnimatorManager::animateCommon(TreeInfo& info) {
newEnd = std::remove_if(mAnimators.begin(), mAnimators.end(), functor);
mAnimators.erase(newEnd, mAnimators.end());
mAnimationHandle->notifyAnimationsRan();
+ mParent.mProperties.updateMatrix();
return functor.dirtyMask;
}