diff options
| author | 2023-07-12 13:47:28 -0500 | |
|---|---|---|
| committer | 2023-08-31 13:29:38 +0000 | |
| commit | e11be022b16382382edfe6e24f85b831ed6a0cdf (patch) | |
| tree | 33143a6fe778832f749461306d601ff49e8b1c16 /libs/gui/FrameRateUtils.cpp | |
| parent | 16430ee41075cca09fa93a22edf68f8da0d7e4a8 (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)
Merged-In: Ib39ba935727df0bc1ab4030bcfe8301de7e64805
(cherry picked from commit 16cb723d942232e6b421a5001eb134736e688f7d)
Diffstat (limited to 'libs/gui/FrameRateUtils.cpp')
0 files changed, 0 insertions, 0 deletions