Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RUMM-2689 SR Flush buffered motion event positions periodically #1108

Conversation

mariusc83
Copy link
Collaborator

@mariusc83 mariusc83 commented Oct 27, 2022

What does this PR do?

Before for each intercepted gesture in SR we were buffering all the gesture MotionEvents as TouchData.Position from the moment we received the MotionEvent.ACTION_DOWN until the moment we received the MotionEvent.ACTION_UP.
If the gesture was long enough this approach could create some glitches in the player (if you have a fragments view pager the gesture could start playing after half of the new fragment became visible already). In order to avoid this we will flush the buffer every 160 ms, equivalent to 16 frames. This is a heuristically determined value and probably we will adjust it during dogfooding.

Motivation

What inspired you to submit this pull request?

Additional Notes

Anything else we should know when reviewing?

Review checklist (to be filled by reviewers)

  • Feature or bugfix MUST have appropriate tests (unit, integration, e2e)
  • Make sure you discussed the feature or bugfix with the maintaining team in an Issue
  • Make sure each commit and the PR mention the Issue number (cf the CONTRIBUTING doc)

@mariusc83 mariusc83 self-assigned this Oct 27, 2022
@xgouchet xgouchet added the size-small This PR is small sized label Oct 27, 2022
@mariusc83 mariusc83 marked this pull request as ready for review October 27, 2022 08:29
@mariusc83 mariusc83 requested a review from a team as a code owner October 27, 2022 08:29
@mariusc83 mariusc83 merged commit 88cba28 into feature/sdkv2 Oct 28, 2022
@mariusc83 mariusc83 deleted the mconstantin/rumm-2689/sr-flush-touch-positions-every-n-milliseconds branch October 28, 2022 07:33
@xgouchet xgouchet added this to the 1.16.0 milestone Dec 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size-small This PR is small sized
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants