diff options
| author | 2023-08-31 02:57:50 +0000 | |
|---|---|---|
| committer | 2023-08-31 02:57:50 +0000 | |
| commit | d80fdc48244e1769a84c46448477754a4cd3b883 (patch) | |
| tree | a6fb29e194455b67f5ebac0b7f11e04e90afa2eb /libs/gui/BufferQueue.cpp | |
| parent | a8ce8fc1d892ba7dcb27961b7bf49cc6433da7bb (diff) | |
Improve updateInputFlinger performance
This change improves the performance of the WindowInfosListenerInvoker work done on SurfaceFlinger's background executor thread. The primary optimization made is not sending a WindowInfosReportedListener with every call to WindowInfosListener.onWindowInfosChanged. Instead, we send a new interface, WindowInfosPublisher, and a unique listener id to listeners when they're added. Listeners call WindowInfosPublisher.ackWindowInfosReceived with their id after processing each update.
From traces taken during development, the new code is a major improvement, taking about 15% of the time spent previously on SurfaceFlinger's background thread for sending window infos. Performance with this change seems roughly in line with the performance in T.
Bug: 290377931
Test: atest WindowInfosListenerTest
Test: atest WindowInfosListenerInvokerTest
Test: manually killing system server and checking valid state on restart
Change-Id: Ib39ba935727df0bc1ab4030bcfe8301de7e64805
(cherry picked from commit acd2258a5492a9e289fd7f4b8ea90543d6843a23)
(cherry picked from commit e8a7ab25b2f2f17571279a2c2bf2ea0dff66c8e6)
Merged-In: Ib39ba935727df0bc1ab4030bcfe8301de7e64805
This reverts commit a8ce8fc1d892ba7dcb27961b7bf49cc6433da7bb.
Change-Id: I3a9a5b5d397d6d37e9b81070a344a0202ce0f927
Diffstat (limited to 'libs/gui/BufferQueue.cpp')
0 files changed, 0 insertions, 0 deletions