diff options
author | 2024-09-11 22:20:26 +0000 | |
---|---|---|
committer | 2024-09-17 23:47:44 +0000 | |
commit | 6affbdb94fb86697e92503770ac0dcaea2a16dc0 (patch) | |
tree | 178f0f5cdade64128b2770b4b1874d2515831361 /include/input/Resampler.h | |
parent | e2bb18735b214e773c0039581a1fa1771f442c71 (diff) |
Update Resampler_test.cpp to consider RESAMPLE_LATENCY
Updated Resampler_test.cpp to consider RESAMPLE_LATENCY because the
parameter was unused in Resampler.cpp
Bug: 297226446
Flag: EXEMPT refactor
Test: TEST=libinput_tests; m $TEST && $ANDROID_HOST_OUT/nativetest64/$TEST/$TEST --gtest_filter="ResamplerTest*"
Change-Id: I965264e88bede4be74025f61bcd4ef8d235dc4c8
Diffstat (limited to 'include/input/Resampler.h')
-rw-r--r-- | include/input/Resampler.h | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/include/input/Resampler.h b/include/input/Resampler.h index 2892137ae7..67d92bd3ad 100644 --- a/include/input/Resampler.h +++ b/include/input/Resampler.h @@ -35,9 +35,9 @@ struct Resampler { virtual ~Resampler() = default; /** - * Tries to resample motionEvent at resampleTime. The provided resampleTime must be greater than + * Tries to resample motionEvent at frameTime. The provided frameTime must be greater than * the latest sample time of motionEvent. It is not guaranteed that resampling occurs at - * resampleTime. Interpolation may occur is futureSample is available. Otherwise, motionEvent + * frameTime. Interpolation may occur is futureSample is available. Otherwise, motionEvent * may be resampled by another method, or not resampled at all. Furthermore, it is the * implementer's responsibility to guarantee the following: * - If resampling occurs, a single additional sample should be added to motionEvent. That is, @@ -45,15 +45,14 @@ struct Resampler { * samples by the end of the resampling. No other field of motionEvent should be modified. * - If resampling does not occur, then motionEvent must not be modified in any way. */ - virtual void resampleMotionEvent(std::chrono::nanoseconds resampleTime, - MotionEvent& motionEvent, + virtual void resampleMotionEvent(std::chrono::nanoseconds frameTime, MotionEvent& motionEvent, const InputMessage* futureSample) = 0; }; class LegacyResampler final : public Resampler { public: /** - * Tries to resample `motionEvent` at `resampleTime` by adding a resampled sample at the end of + * Tries to resample `motionEvent` at `frameTime` by adding a resampled sample at the end of * `motionEvent` with eventTime equal to `resampleTime` and pointer coordinates determined by * linear interpolation or linear extrapolation. An earlier `resampleTime` will be used if * extrapolation takes place and `resampleTime` is too far in the future. If `futureSample` is @@ -61,7 +60,7 @@ public: * data, LegacyResampler will extrapolate. Otherwise, no resampling takes place and * `motionEvent` is unmodified. */ - void resampleMotionEvent(std::chrono::nanoseconds resampleTime, MotionEvent& motionEvent, + void resampleMotionEvent(std::chrono::nanoseconds frameTime, MotionEvent& motionEvent, const InputMessage* futureSample) override; private: |