summaryrefslogtreecommitdiff
path: root/cmds/cmd/cmd.cpp
diff options
context:
space:
mode:
author Patrick Williams <pdwilliams@google.com> 2023-07-12 13:47:28 -0500
committer Android Build Coastguard Worker <android-build-coastguard-worker@google.com> 2023-08-30 17:54:21 +0000
commit56cd9b79ceac33602079e07efcf8cd56ef2afca7 (patch)
treec62535b156aa8b8ee2f521fd8dae0bb27fc90c91 /cmds/cmd/cmd.cpp
parenta0faf61fb8f629f416559936dd50ba259befa158 (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 (cherry picked from commit acd2258a5492a9e289fd7f4b8ea90543d6843a23) (cherry picked from commit e8a7ab25b2f2f17571279a2c2bf2ea0dff66c8e6) (cherry picked from https://googleplex-android-review.googlesource.com/q/commit:82f3463d449eb13e28c5dbffeee16e10721c71d2) Merged-In: Ib39ba935727df0bc1ab4030bcfe8301de7e64805 Change-Id: Ib39ba935727df0bc1ab4030bcfe8301de7e64805
Diffstat (limited to 'cmds/cmd/cmd.cpp')
0 files changed, 0 insertions, 0 deletions