summaryrefslogtreecommitdiff
path: root/services/surfaceflinger/RegionSamplingThread.cpp
diff options
context:
space:
mode:
author Alec Mouri <alecmouri@google.com> 2022-09-27 00:21:40 +0000
committer Alec Mouri <alecmouri@google.com> 2022-09-27 00:39:34 +0000
commit18c38bb2fd7779acd762baf47894b266c3dcce73 (patch)
tree37a8dab3482751a1a10368de5ed8a86b130d03ce /services/surfaceflinger/RegionSamplingThread.cpp
parenteebf7c3ba2c969ba53cee6af6619112f10e2fefd (diff)
Make uncache buffer transactions oneway.
Buffers that were previously sent to SurfaceFlinger have a death callback attached which sends a transaction to SurfaceFlinger to remove the buffer from SurfaceFlinger's caches for prompt memory cleanup. Originally, this transaction was applied synchronously, which contributes to performance issues when the producer side of a BlastBufferQueue disconnects and destroys all buffers in the queue. This is particularly problematic when: 1. the producer is a media decoder which tend to allocate 20+ buffers, and: 2. the disconnect happens on the UI thread, which is typical when using SurfaceView with RecyclerView for a scrolling list of videos which is a common UX for contemporary social media applications. On some devices, the synchronous binder calls can be more expensive for CPU walltime than freeing the backing memory for the buffers. Marking these transactions as one-way will reduce the risk of UI jank. Bug: 248533454 Test: Test application with SurfaceView scrolling + media playback Change-Id: Ie5c50f2eb6c65f3c8652df84a91c2116327b8c0e
Diffstat (limited to 'services/surfaceflinger/RegionSamplingThread.cpp')
0 files changed, 0 insertions, 0 deletions