OSDN Git Service

Fix SurfaceViewPositionListener race bugs
authorJohn Reck <jreck@google.com>
Mon, 27 Jun 2016 20:27:23 +0000 (13:27 -0700)
committerJohn Reck <jreck@google.com>
Mon, 27 Jun 2016 20:35:13 +0000 (13:35 -0700)
commit7b570deea65bc7ac417a26ce3e4103bcef30e957
tree6e19b0c299e7bf7da395cddbe5f0d2384af5b28a
parent157c6811de9bec883dfc802481bd07e64ca7ce59
Fix SurfaceViewPositionListener race bugs

Bug: 29628138

1: Make windowPositionLost synchronous as that's
what the Java side was expecting

2: Make the listener ref counted as otherwise
there's a race condition with the GC, which could
end up with use-after-frees

3: Ensure that all position updates are invoked
prior to frame completion

Change-Id: Iedbc017f611ba2878a49b4586612f79249ca2fe3
core/jni/android_view_RenderNode.cpp
libs/hwui/RenderNode.h
libs/hwui/renderthread/CanvasContext.cpp