Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 540dc07e authored by Yeabkal Wubshit's avatar Yeabkal Wubshit
Browse files

Avoid RingBuffer creation on each VelocityTracker#add call

The code used to create a new RingBuffer each time a movement was added
to VelocityTracker. This is expensive, and it showed up as a regression
in our benchmark tests.

With this change, we create a new RingBuffer for a pointerId only if
there is not one already.

Bug: 267211645
Bug: 271935895
Test: atest libinput_tests, benchmark test regression fixed

Change-Id: I47c6dda5741459a1bd84f3f5f46f932c26fda523
parent 3700a8f5
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment