summaryrefslogtreecommitdiff
path: root/libs/androidfw/AttributeResolution.cpp
diff options
context:
space:
mode:
author Robert Carr <racarr@google.com> 2022-04-21 08:55:51 -0700
committer Rob Carr <racarr@google.com> 2022-05-04 21:51:55 +0000
commit74c760394aacd5a57ba0acade8cb8151ba14678c (patch)
tree89fd74d9674a1dcdaa3abe9be60d8b1eec36192a /libs/androidfw/AttributeResolution.cpp
parenta4a4f42b3a79ef5ec06bae8ef1da696694f1df2f (diff)
SurfaceView: Fix overlocking of mSurfaceLock
mSurfaceLock is used to ensure the Surface object stays valid over the span of the calls to lockCanvas and unlockCanvasAndPost which could come from any thread. In API Level 29 and below, updateSurface was split in to two paths, a first path (which would acquire mSurfaceLock) for when the Surface could be destroyed, and second path for geometry updates only. The consolidation of these two paths in updateSurface created an overlocking of mSurfaceLock, which is now acquired even when mSurface won't be modified. In fact it's acquired whenever the geometry changes. This means an application rendering thread which creates delays between lock and unlock canvas could create undesirable and needless delays on the main UI thread, if the SurfaceView geometry updates. We also have some underlocking, where we aren't actually locking when destroying the SurfaceView. Test: Manual with test app Bug: 206846658 Change-Id: Idc17d111eee7a7365af4e94a156e7c46c7ea8171
Diffstat (limited to 'libs/androidfw/AttributeResolution.cpp')
0 files changed, 0 insertions, 0 deletions