summaryrefslogtreecommitdiff
path: root/libs/hwui/RenderNode.cpp
diff options
context:
space:
mode:
authorJohn Reck <jreck@google.com>2019-06-12 15:01:51 -0700
committerJohn Reck <jreck@google.com>2019-06-12 15:41:50 -0700
commit097e1d333088cb01dddacd235a6e654d4002a2b3 (patch)
tree71da611125f97456dd4e88ac8214b64ccfa67d8e /libs/hwui/RenderNode.cpp
parent471a6643753b3ce9fa7573032c81d4b6fb2b0688 (diff)
Fix setPositionListener race condition
Fixes: 131625115 Test: atest android.view.cts.SystemGestureExclusionRectsTest android.view.cts.SurfaceViewSyncTest android.uirendering.cts.testclasses.SurfaceViewTests Change-Id: Ia357ff6fa5d5fe1e152abc23bbd6d8051cfd7aa7
Diffstat (limited to 'libs/hwui/RenderNode.cpp')
-rw-r--r--libs/hwui/RenderNode.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/libs/hwui/RenderNode.cpp b/libs/hwui/RenderNode.cpp
index e0ed3e4940a8..b73347b233d7 100644
--- a/libs/hwui/RenderNode.cpp
+++ b/libs/hwui/RenderNode.cpp
@@ -264,6 +264,12 @@ void RenderNode::syncProperties() {
}
void RenderNode::pushStagingPropertiesChanges(TreeInfo& info) {
+ if (mPositionListenerDirty) {
+ mPositionListener = std::move(mStagingPositionListener);
+ mStagingPositionListener = nullptr;
+ mPositionListenerDirty = false;
+ }
+
// Push the animators first so that setupStartValueIfNecessary() is called
// before properties() is trampled by stagingProperties(), as they are
// required by some animators.