Skip to content

Fix complex_layout_android__scroll_smoothness by switching to using PointerEvent#66612

Closed
dkwingsmt wants to merge 3 commits intoflutter:masterfrom
dkwingsmt:fix-smoothness-to-using-pointer-event
Closed

Fix complex_layout_android__scroll_smoothness by switching to using PointerEvent#66612
dkwingsmt wants to merge 3 commits intoflutter:masterfrom
dkwingsmt:fix-smoothness-to-using-pointer-event

Conversation

@dkwingsmt
Copy link
Contributor

@dkwingsmt dkwingsmt commented Sep 25, 2020

Description

This PR is a draft since I can not run the test locally due to lack of test devices.

This PR fixes the issue that causes complex_layout_android__scroll_smoothness to not scroll at all by making it dispatch PointerEvent with GestureBinding.handlePointerEvent, and moves the resampling in GestureBinding to handlePointerEvent.

Related Issues

Tests

I added the following tests:

Replace this with a list of the tests that you added as part of this PR. A change in behavior with no test covering it
will likely get reverted accidentally sooner or later. PRs must include tests for all changed/updated/fixed behaviors. See Test Coverage.

Checklist

Before you create this PR, confirm that it meets all requirements listed below by checking the relevant checkboxes ([x]). This will ensure a smooth and quick review process.

  • I read the Contributor Guide and followed the process outlined there for submitting PRs.
  • I signed the CLA.
  • I read and followed the Flutter Style Guide, including Features we expect every widget to implement.
  • I read the Tree Hygiene wiki page, which explains my responsibilities.
  • I updated/added relevant documentation (doc comments with ///).
  • All existing and new tests are passing.
  • The analyzer (flutter analyze --flutter-repo) does not report any problems on my PR.
  • I am willing to follow-up on review comments in a timely manner.

Breaking Change

Did any tests fail when you ran them? Please read Handling breaking changes.

@flutter-dashboard flutter-dashboard bot added the framework flutter/packages/flutter repository. See also f: labels. label Sep 25, 2020
@flutter-dashboard
Copy link

It looks like this pull request may not have tests. Please make sure to add tests before merging. If you need an exemption to this rule, contact Hixie on the #hackers channel in Chat.

Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing.

@dkwingsmt
Copy link
Contributor Author

@CareF I can not run the test locally due to lack of local device. Can you check the PR and see if it's what you mean and if it will work?
+cc @liyuqian

@flutter-dashboard flutter-dashboard bot added the c: contributor-productivity Team-specific productivity, code health, technical debt. label Sep 25, 2020
@CareF
Copy link
Contributor

CareF commented Sep 25, 2020

I'm sorry to directly commit to the PR.. I meant to make a comment with a commit suggestion but I did it wrong way.

I fixed some bugs but it's still not working:
Test with resample on doesn't react to scrolling. I don't yet have time for figuring out why, but moving resampler is more complicated than just move the code block.

Apart from that, I recommend to use handlePointerEventRecord instead of local event generator.

@dkwingsmt
Copy link
Contributor Author

Sure, that's why I LGTM'd your PR.

@liyuqian
Copy link
Contributor

@dkwingsmt : for local testing, you don't need the exact same device model (Moto G4) to reproduce the problem. Any device with 60hz refresh rate should do. If you only have high-end 90hz devices such as Pixel 4, simply check the 59hz input test result.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

c: contributor-productivity Team-specific productivity, code health, technical debt. framework flutter/packages/flutter repository. See also f: labels.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

complex_layout_android__scroll_smoothness generates unexpected numbers

4 participants