Repository navigation
Reland VelocityTracker update (again) - #138843
Merged
Merged
Conversation
chunhtai
approved these changes
Nov 21, 2023
chunhtai
left a comment
Contributor
There was a problem hiding this comment.
Since this is a reland, RSLGTM
| /// | ||
| /// This value is ignored in non-debug builds. | ||
| @protected | ||
| SamplingClock? get debugSamplingClock => null; |
Contributor
There was a problem hiding this comment.
This should probably be visibleForTesting
| /// Returns null if there is no data on which to base an estimate. | ||
| VelocityEstimate? getVelocityEstimate() { | ||
| // Has user recently moved since last sample? | ||
| if (_sinceLastSample.elapsedMilliseconds > VelocityTracker._assumePointerMoveStoppedMilliseconds) { |
Contributor
There was a problem hiding this comment.
Do we have style guide around using static member in the same class? I think in other class we don't include the class name
Contributor
Author
There was a problem hiding this comment.
The analyzer required it
| final double delta = (sample.time - previousSample.time).inMicroseconds.abs().toDouble() / 1000; | ||
| previousSample = sample; | ||
| if (age > _horizonMilliseconds || delta > _assumePointerMoveStoppedMilliseconds) { | ||
| if (age > _horizonMilliseconds || delta > VelocityTracker._assumePointerMoveStoppedMilliseconds) { |
Contributor
There was a problem hiding this comment.
same as the styling question above, either both _horizonMilliseconds and _assumePointerMoveStoppedMilliseconds prefixed with class name or none
yjbanov
approved these changes
Nov 21, 2023
|
|
||
| test('attach and detach correctly handle gesture', () { | ||
| testWidgets('attach and detach correctly handle gesture', (_) async { | ||
| assert(WidgetsBinding.instance == binding); |
Contributor
There was a problem hiding this comment.
nit: in tests it is more idiomatic to use expect instead of assert, but either will do the job.
eyebrowsoffire
added a commit
that referenced
this pull request
Nov 22, 2023
This reverts commit 3e4e280.
zanderso
pushed a commit
that referenced
this pull request
Nov 22, 2023
Reverts #138843 This has broken the Mac_ios microbenchmarks_ios. Example failure: https://ci.chromium.org/ui/p/flutter/builders/prod/Mac_ios%20microbenchmarks_ios/9339/overview
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/packages
that referenced
this pull request
Nov 22, 2023
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/packages
that referenced
this pull request
Nov 22, 2023
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/packages
that referenced
this pull request
Nov 22, 2023
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/packages
that referenced
this pull request
Nov 22, 2023
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/packages
that referenced
this pull request
Nov 22, 2023
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/packages
that referenced
this pull request
Nov 22, 2023
auto-submit Bot
pushed a commit
to flutter/packages
that referenced
this pull request
Nov 22, 2023
Manual roll requested by [email protected] flutter/flutter@ab721f9...14549b3 2023-11-22 [email protected] make FakeView not send Scene and semantics to the engine (flutter/flutter#138849) 2023-11-22 [email protected] Update the default outline color for `OutlinedButton` (flutter/flutter#138768) 2023-11-22 [email protected] Roll Flutter Engine from c954a64c509b to 342fb003b11f (1 revision) (flutter/flutter#138903) 2023-11-22 [email protected] Roll Packages from c9933fc to 2102327 (3 revisions) (flutter/flutter#138895) 2023-11-22 [email protected] Marks Mac_build_test flutter_gallery__transition_perf_e2e_ios to be unflaky (flutter/flutter#138886) 2023-11-22 [email protected] Roll Flutter Engine from d55b673f895c to c954a64c509b (1 revision) (flutter/flutter#138894) 2023-11-22 [email protected] Add `commandHasTerminal` parameter + apple usage event + `sendException` events for `package:unified_analytics` (flutter/flutter#138806) 2023-11-22 [email protected] Roll Flutter Engine from 6c8f7b566a22 to d55b673f895c (1 revision) (flutter/flutter#138890) 2023-11-22 [email protected] Roll Flutter Engine from dda2499df48a to 6c8f7b566a22 (1 revision) (flutter/flutter#138875) 2023-11-22 [email protected] Roll Flutter Engine from 1ae1d5318257 to dda2499df48a (4 revisions) (flutter/flutter#138872) 2023-11-22 [email protected] Roll Flutter Engine from 7cf9d90d59e1 to 1ae1d5318257 (8 revisions) (flutter/flutter#138861) 2023-11-22 [email protected] Revert "Reland VelocityTracker update (again)" (flutter/flutter#138863) 2023-11-21 [email protected] In `flutter doctor -v`, when JRE is too out-of-date to run `sdkmanager`, print a helpful error message (flutter/flutter#138762) 2023-11-21 [email protected] Roll Flutter Engine from a8e9b8dd562b to 7cf9d90d59e1 (1 revision) (flutter/flutter#138847) 2023-11-21 [email protected] Roll Flutter Engine from 90d1ff04ae02 to a8e9b8dd562b (1 revision) (flutter/flutter#138846) 2023-11-21 [email protected] Reland VelocityTracker update (again) (flutter/flutter#138843) 2023-11-21 [email protected] Roll Flutter Engine from 31799868224d to 90d1ff04ae02 (2 revisions) (flutter/flutter#138844) 2023-11-21 [email protected] Fix M3 Tabs Specs links (flutter/flutter#138808) 2023-11-21 [email protected] Roll Flutter Engine from 0c2de1e8849c to 31799868224d (1 revision) (flutter/flutter#138840) 2023-11-21 [email protected] Roll Flutter Engine from 746697c27569 to 0c2de1e8849c (1 revision) (flutter/flutter#138834) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/flutter-packages Please CC [email protected],[email protected],[email protected] on the revert to ensure that a human is aware of the problem. To file a bug in Packages: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
8 tasks done
auto-submit Bot
pushed a commit
that referenced
this pull request
Nov 29, 2023
This updates the implementation to use the stopwatch from the Clock object and pipes it through to the TestWidgetsFlutterBinding so it will be kept in sync with FakeAsync. Relands #138843 attempted to reland #137381 which attempted to reland #132291 Fixes #97761 1. The original change was reverted due to flakiness it introduced in tests that use fling gestures. * Using a mocked clock through the test binding fixes this now 2. It was reverted a second time because a change at tip of tree broke it, exposing memory leaks, but it was not rebased before landing. * These leaks are now fixed 3. It was reverted a third time, because we were so excellently quick to revert those other times, that we did not notice the broken benchmark that only runs in postsubmit. * The benchmark is now fixed
caseycrogers
pushed a commit
to caseycrogers/flutter
that referenced
this pull request
Dec 29, 2023
This updates the implementation to use the stopwatch from the Clock object and piping it through to the TestWidgetsFlutterBinding so it will be kept in sync with FakeAsync. Relands flutter#137381 which attempted to reland flutter#132291 Fixes flutter#97761 The original change was reverted due to flakiness it introduced in tests that use fling gestures. * flutter#135728 It was reverted again due to a change in the leak tracking tests that broke it.
caseycrogers
pushed a commit
to caseycrogers/flutter
that referenced
this pull request
Dec 29, 2023
Reverts flutter#138843 This has broken the Mac_ios microbenchmarks_ios. Example failure: https://ci.chromium.org/ui/p/flutter/builders/prod/Mac_ios%20microbenchmarks_ios/9339/overview
caseycrogers
pushed a commit
to caseycrogers/flutter
that referenced
this pull request
Dec 29, 2023
This updates the implementation to use the stopwatch from the Clock object and pipes it through to the TestWidgetsFlutterBinding so it will be kept in sync with FakeAsync. Relands flutter#138843 attempted to reland flutter#137381 which attempted to reland flutter#132291 Fixes flutter#97761 1. The original change was reverted due to flakiness it introduced in tests that use fling gestures. * Using a mocked clock through the test binding fixes this now 2. It was reverted a second time because a change at tip of tree broke it, exposing memory leaks, but it was not rebased before landing. * These leaks are now fixed 3. It was reverted a third time, because we were so excellently quick to revert those other times, that we did not notice the broken benchmark that only runs in postsubmit. * The benchmark is now fixed
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/packages
that referenced
this pull request
Feb 16, 2024
creatorpiyush
pushed a commit
to creatorpiyush/packages
that referenced
this pull request
Jun 10, 2026
) Manual roll requested by [email protected] flutter/flutter@ab721f9...14549b3 2023-11-22 [email protected] make FakeView not send Scene and semantics to the engine (flutter/flutter#138849) 2023-11-22 [email protected] Update the default outline color for `OutlinedButton` (flutter/flutter#138768) 2023-11-22 [email protected] Roll Flutter Engine from c954a64c509b to 342fb003b11f (1 revision) (flutter/flutter#138903) 2023-11-22 [email protected] Roll Packages from c9933fc to 2102327 (3 revisions) (flutter/flutter#138895) 2023-11-22 [email protected] Marks Mac_build_test flutter_gallery__transition_perf_e2e_ios to be unflaky (flutter/flutter#138886) 2023-11-22 [email protected] Roll Flutter Engine from d55b673f895c to c954a64c509b (1 revision) (flutter/flutter#138894) 2023-11-22 [email protected] Add `commandHasTerminal` parameter + apple usage event + `sendException` events for `package:unified_analytics` (flutter/flutter#138806) 2023-11-22 [email protected] Roll Flutter Engine from 6c8f7b566a22 to d55b673f895c (1 revision) (flutter/flutter#138890) 2023-11-22 [email protected] Roll Flutter Engine from dda2499df48a to 6c8f7b566a22 (1 revision) (flutter/flutter#138875) 2023-11-22 [email protected] Roll Flutter Engine from 1ae1d5318257 to dda2499df48a (4 revisions) (flutter/flutter#138872) 2023-11-22 [email protected] Roll Flutter Engine from 7cf9d90d59e1 to 1ae1d5318257 (8 revisions) (flutter/flutter#138861) 2023-11-22 [email protected] Revert "Reland VelocityTracker update (again)" (flutter/flutter#138863) 2023-11-21 [email protected] In `flutter doctor -v`, when JRE is too out-of-date to run `sdkmanager`, print a helpful error message (flutter/flutter#138762) 2023-11-21 [email protected] Roll Flutter Engine from a8e9b8dd562b to 7cf9d90d59e1 (1 revision) (flutter/flutter#138847) 2023-11-21 [email protected] Roll Flutter Engine from 90d1ff04ae02 to a8e9b8dd562b (1 revision) (flutter/flutter#138846) 2023-11-21 [email protected] Reland VelocityTracker update (again) (flutter/flutter#138843) 2023-11-21 [email protected] Roll Flutter Engine from 31799868224d to 90d1ff04ae02 (2 revisions) (flutter/flutter#138844) 2023-11-21 [email protected] Fix M3 Tabs Specs links (flutter/flutter#138808) 2023-11-21 [email protected] Roll Flutter Engine from 0c2de1e8849c to 31799868224d (1 revision) (flutter/flutter#138840) 2023-11-21 [email protected] Roll Flutter Engine from 746697c27569 to 0c2de1e8849c (1 revision) (flutter/flutter#138834) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/flutter-packages Please CC [email protected],[email protected],[email protected] on the revert to ensure that a human is aware of the problem. To file a bug in Packages: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
bisor0627
pushed a commit
to bisor0627/packages
that referenced
this pull request
Jun 19, 2026
) Manual roll requested by [email protected] flutter/flutter@ab721f9...14549b3 2023-11-22 [email protected] make FakeView not send Scene and semantics to the engine (flutter/flutter#138849) 2023-11-22 [email protected] Update the default outline color for `OutlinedButton` (flutter/flutter#138768) 2023-11-22 [email protected] Roll Flutter Engine from c954a64c509b to 342fb003b11f (1 revision) (flutter/flutter#138903) 2023-11-22 [email protected] Roll Packages from 62d7e1a to 6d23bed (3 revisions) (flutter/flutter#138895) 2023-11-22 [email protected] Marks Mac_build_test flutter_gallery__transition_perf_e2e_ios to be unflaky (flutter/flutter#138886) 2023-11-22 [email protected] Roll Flutter Engine from d55b673f895c to c954a64c509b (1 revision) (flutter/flutter#138894) 2023-11-22 [email protected] Add `commandHasTerminal` parameter + apple usage event + `sendException` events for `package:unified_analytics` (flutter/flutter#138806) 2023-11-22 [email protected] Roll Flutter Engine from 6c8f7b566a22 to d55b673f895c (1 revision) (flutter/flutter#138890) 2023-11-22 [email protected] Roll Flutter Engine from dda2499df48a to 6c8f7b566a22 (1 revision) (flutter/flutter#138875) 2023-11-22 [email protected] Roll Flutter Engine from 1ae1d5318257 to dda2499df48a (4 revisions) (flutter/flutter#138872) 2023-11-22 [email protected] Roll Flutter Engine from 7cf9d90d59e1 to 1ae1d5318257 (8 revisions) (flutter/flutter#138861) 2023-11-22 [email protected] Revert "Reland VelocityTracker update (again)" (flutter/flutter#138863) 2023-11-21 [email protected] In `flutter doctor -v`, when JRE is too out-of-date to run `sdkmanager`, print a helpful error message (flutter/flutter#138762) 2023-11-21 [email protected] Roll Flutter Engine from a8e9b8dd562b to 7cf9d90d59e1 (1 revision) (flutter/flutter#138847) 2023-11-21 [email protected] Roll Flutter Engine from 90d1ff04ae02 to a8e9b8dd562b (1 revision) (flutter/flutter#138846) 2023-11-21 [email protected] Reland VelocityTracker update (again) (flutter/flutter#138843) 2023-11-21 [email protected] Roll Flutter Engine from 31799868224d to 90d1ff04ae02 (2 revisions) (flutter/flutter#138844) 2023-11-21 [email protected] Fix M3 Tabs Specs links (flutter/flutter#138808) 2023-11-21 [email protected] Roll Flutter Engine from 0c2de1e8849c to 31799868224d (1 revision) (flutter/flutter#138840) 2023-11-21 [email protected] Roll Flutter Engine from 746697c27569 to 0c2de1e8849c (1 revision) (flutter/flutter#138834) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/flutter-packages Please CC [email protected],[email protected],[email protected] on the revert to ensure that a human is aware of the problem. To file a bug in Packages: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This updates the implementation to use the stopwatch from the Clock object and piping it through to the TestWidgetsFlutterBinding so it will be kept in sync with FakeAsync.
Relands #137381 which attempted to reland #132291
Fixes #97761
The original change was reverted due to flakiness it introduced in tests that use fling gestures.
It was reverted again due to a change in the leak tracking tests that broke it.
Pre-launch Checklist
///).If you need help, consider asking for advice on the #hackers-new channel on Discord.