summaryrefslogtreecommitdiff
path: root/libs/input/PointerController.cpp
diff options
context:
space:
mode:
author Riddle Hsu <riddlehsu@google.com> 2024-05-15 16:19:33 +0800
committer Riddle Hsu <riddlehsu@google.com> 2024-05-15 17:10:41 +0800
commitc0c15eb59c018a455f3a86cf9b0c23e6eb90e345 (patch)
treeaacfd09a61362727cea4000ae820bef22a034938 /libs/input/PointerController.cpp
parentb972663f6daf3cb60874e1169c3e080e735bc8b6 (diff)
Reduce unnecessary overhead of always-true predicate lambda
Currently compiler always generates new class as $$ExternalSyntheticLambda* on every invocation place. And a new instance will be always created on invocation no matter whether the lambda is capturing arguments or not. By using an explicit shared instance, it can reduce synthetic class and method generation. Also reduce 4 instructions per invocation: new-instance, invoke-direct, check-cast, invoke-static. Bug: 163976519 Test: CtsWindowManagerDeviceActivity Change-Id: I71a89713d64f0605faf6045ba44389a8eb47f3d5
Diffstat (limited to 'libs/input/PointerController.cpp')
0 files changed, 0 insertions, 0 deletions