summaryrefslogtreecommitdiff
path: root/opengl/libagl/array.cpp
diff options
context:
space:
mode:
author Vishnu Nair <vishnun@google.com> 2019-07-30 11:29:31 -0700
committer Vishnu Nair <vishnun@google.com> 2019-07-30 11:30:43 -0700
commit8406fd785b80ab2fb2b7418ef6e973aace93df92 (patch)
tree9f2ff6b1e246e00ccdb0af886e2cd66bd96c4db9 /opengl/libagl/array.cpp
parent61eba0db9dc4a16ed37fd9f091b02abc65803985 (diff)
Fix locking issues with proto dumps
Proto dumps are generated from: - binder threads when generating bugreports or triggering dumpstate - main thread when mLayerStats is enabled - tracing thread when winscope tracing is enabled. The binder thread reads current state while the other threads reads drawing state. The writeToProto function accesses a mix of current and drawing states. mPendingState should only be accessed with the mStateLock held and the visible regions should be read from the main or tracing threads. This causes some invalid access issues. To make the locking requirements clear, this change 1. moves drawing specific data to a new function 2. copies mPendingState so we can dump the copy safely in main thread 3. dumps drawing data from binder threads by posting a message onto the main thread Bug: 138318680 Test: adb shell dumpsys SurfaceFlinger, winscope Change-Id: I8bb93e9b9f81faec59585b770eb7ba0fbcd9b51b
Diffstat (limited to 'opengl/libagl/array.cpp')
0 files changed, 0 insertions, 0 deletions