summaryrefslogtreecommitdiff
path: root/libs/hwui/LayerUpdateQueue.cpp
diff options
context:
space:
mode:
author Abdelrahman Daim <adaim@meta.com> 2024-08-27 06:25:39 -0700
committer Abdelrahman Daim <adaim@meta.com> 2024-09-20 12:49:08 -0700
commitb30a1b4e0e02529181b2877f70b2cb1378596a74 (patch)
treed2d5715ce802f7bca403eb0f391c80561376400d /libs/hwui/LayerUpdateQueue.cpp
parentf824197c243a9dc2f059c4cfbe8e9ac29e104c53 (diff)
Fix race condition in process observer
Summary: There is a race condition in dispatching the changes to the process observer. When a ProcessChangeItem is initialized and retrieved during enqueueProcessChangeItemLocked(), the change information will be set with the handle retrieved. The change item will be processed in the UI thread via a message. However, there could be race condition. When the change item is processed in the UI thread, its actual change information is not yet populated and hence the dispatch will find no changes and do nothing. This diff makes creating the ProcessChangeItem to be atomic so that when the message to process is sent, it will have all the information. Test: Successful build on master Signed-off-by: Abdelrahman Daim <adaim@meta.com> Change-Id: I5e0e5992c41dfd59c23bacdefcd8a294b13fc6be
Diffstat (limited to 'libs/hwui/LayerUpdateQueue.cpp')
0 files changed, 0 insertions, 0 deletions