summaryrefslogtreecommitdiff
path: root/libs/gui/BufferQueueThreadState.cpp
diff options
context:
space:
mode:
author Dominik Laskowski <domlaskowski@google.com> 2022-01-08 16:22:46 -0800
committer Dominik Laskowski <domlaskowski@google.com> 2022-02-15 16:40:43 -0800
commit9f410f0adfb4f44fa149cbc7589b13ea88007157 (patch)
tree27e2f02c8d4038bb7da892d0db57f6c500274032 /libs/gui/BufferQueueThreadState.cpp
parent99a9750aa273f8f8d6b3d1e076423400ab64e23a (diff)
SF: Avoid allocation on hot path to IF
The number of layer stacks and listeners is small, and the predominant operations are lookup and iteration respectively, so store them on the stack contiguously to avoid hashing/allocation/indirection. Preallocate the WindowInfo and DisplayInfo vectors, since reallocating the former involves copying strings and fiddling with sp<> ref counts. Bug: 185536303 Test: simpleperf Test: WindowInfosListenerTest Change-Id: I5d1d1fc3b2639a4ee5056697e1a3581c11174173
Diffstat (limited to 'libs/gui/BufferQueueThreadState.cpp')
0 files changed, 0 insertions, 0 deletions