summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorJeff Brown <jeffbrown@google.com>2012-02-13 20:15:01 -0800
committerJeff Brown <jeffbrown@google.com>2012-02-13 20:34:38 -0800
commit58aedbc9bea13415e2d42cf7c9fe8a7efd243e66 (patch)
treec25651216fd10f0cc3cb36401d499556d041ed7c /include
parent0952c30ac279d5f4cdc032fcbafa372213aa6d86 (diff)
downloadframeworks_base-58aedbc9bea13415e2d42cf7c9fe8a7efd243e66.zip
frameworks_base-58aedbc9bea13415e2d42cf7c9fe8a7efd243e66.tar.gz
frameworks_base-58aedbc9bea13415e2d42cf7c9fe8a7efd243e66.tar.bz2
Fix possible races in vsync infrastructure.
Applications sometimes crashed on exit due to the display event receiver pipe apparently being closed while still a member of the Looper's epoll fd set. This patch fixes a few different possible races related to the display event receiver lifecycle. 1. The receiver used to play a little dance with the Looper, registering and unregistering its callback after each vsync request. This code was a holdover from a time before the surface flinger supported one-shot vsync requests, so we can get rid of it and make things a lot simpler. 2. When the Choreographer is being accessed from outside the UI thread, it needs to take great care that it does not touch the display event receiver. Bad things could happen if the receiver is handling a vsync event on the Looper and the receiver is disposed concurrently. 3. It was possible for the Choreographer to attempt to dispose the receiver while handling a vsync message. Now we defer disposing the receiver for a little while, which is also nice because we may be able to avoid disposing the receiver altogether if we find that we need it again a little while later. Bug: 5974105 Change-Id: I77a158f51b0b689af34d07aee4245b969e6260d6
Diffstat (limited to 'include')
0 files changed, 0 insertions, 0 deletions