summaryrefslogtreecommitdiffstats
path: root/libs/hwui/ResourceCache.h
diff options
context:
space:
mode:
authorChris Wren <cwren@android.com>2014-05-21 15:28:10 -0400
committerChris Wren <cwren@android.com>2014-05-23 13:47:01 +0000
commit470c1accf5a54f9844a779eafab74e63c09342b5 (patch)
treef93bd71473310b8283e9059c544369e02065c166 /libs/hwui/ResourceCache.h
parent0e1dc0f5aab427b2ae9d8bbfd3c440490cc7de88 (diff)
downloadframeworks_base-470c1accf5a54f9844a779eafab74e63c09342b5.zip
frameworks_base-470c1accf5a54f9844a779eafab74e63c09342b5.tar.gz
frameworks_base-470c1accf5a54f9844a779eafab74e63c09342b5.tar.bz2
Fix a concurrency bug in the ranking reconsideration.
If we rely on mNotificationList to be sorted, then we cannot allow records to change without a corresponding call to sort. Currently RankingFuture may modify records in a separate thread, while the sort doesn't happen until later. This creates a window for race conditions. Instead, RankingFuture should record operations to be performed on the record that will replayed later, in a transaction along with a sort. We can't simply overwrite the old record completely because another future may be concurrently modifying a different aspect of the record. Two futures that attempt to modify the same aspect will be serialized and the second will overwrite eventually the first. Change-Id: I9223cabdc60f72d8e37e6d8119bea1e0127185c0 (cherry picked from commit 77d3e0d0297caca5358879d36e8ba77710eb8e82)
Diffstat (limited to 'libs/hwui/ResourceCache.h')
0 files changed, 0 insertions, 0 deletions