Skip to content

Conversation

@jonahwilliams
Copy link
Contributor

@jonahwilliams jonahwilliams commented May 25, 2022

Fixes #104545
Fixes #104229

The ink sparkle is never disposed, leading to a massive saveLayer buildup

@flutter-dashboard flutter-dashboard bot added f: material design flutter/packages/flutter/material repository. framework flutter/packages/flutter repository. See also f: labels. labels May 25, 2022
@flutter-dashboard

This comment was marked as outdated.

@jonahwilliams
Copy link
Contributor Author

Tests updated

@jonahwilliams jonahwilliams requested a review from guidezpl May 25, 2022 00:23
final Finder buttonFinder = find.text('Sparkle!');
await tester.tap(buttonFinder);
await tester.pump();
await tester.pumpAndSettle();
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Im not really sure why this worked before. I think pumpAndSettling past the animation duration still worked since we would continue painting it forever


void _handleStatusChanged(AnimationStatus status) {
if (status == AnimationStatus.completed)
dispose();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we test this?

For example, add some kind of debugHasFeature API on MaterialInkController and assert in a test that once the animation is done the controller doesn't contain this feature anymore?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

MaterialInkController is often implemented, so adding debugHasFeature may be breaking

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

behold

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks I hate it

@dnfield
Copy link
Contributor

dnfield commented May 25, 2022

This should get cherry-picked into stable when it lands.

Copy link
Contributor

@dnfield dnfield left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@fluttergithubbot fluttergithubbot merged commit 680a819 into flutter:master May 25, 2022
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request May 25, 2022
@jonahwilliams jonahwilliams deleted the ensure_ink_sparkle_disposed branch May 25, 2022 15:41
engine-flutter-autoroll added a commit to engine-flutter-autoroll/plugins that referenced this pull request May 25, 2022
dnfield pushed a commit to dnfield/flutter that referenced this pull request Jun 1, 2022
itsjustkevin added a commit that referenced this pull request Jun 2, 2022
* [framework] ensure ink sparkle is disposed (#104569)

* CI

Co-authored-by: Jonah Williams <[email protected]>
Co-authored-by: Kevin Chisholm <[email protected]>
bernard-lee added a commit to bernard-lee/flutter that referenced this pull request Jun 29, 2022
* 'stable' of https://github.com/flutter/flutter: (1203 commits)
  'Update Engine revision to ffe7b86a1e5b5cb63c8385ae1adc759e372ee8f4 for stable release 3.0.3' (flutter#106431)
  [flutter_releases] Removing minor iOS version filter value from ci.yaml (flutter#105059) (flutter#105629)
  [flutter_releases] Flutter stable 3.0.2 Framework Cherrypicks (flutter#105528)
  [framework] ensure ink sparkle is disposed (flutter#104569) (flutter#105144)
  [CP] Fix Flutter doctor crash on Windows caused by bad UTF8 from vswhere.exe (flutter#105153)
  [tool][web] Use 'constructor' instead of 'public field declarations' in flutter.js (Safari 13) (flutter#105162)
  [flutter_releases] Cherrypicks for SliverReorderableList and Slider regressions (flutter#105141)
  'Update Engine revision to caaafc5604ee9172293eb84a381be6aadd660317 for stable release 3.0.1' (flutter#104213)
  [flutter_releases] Flutter stable 2.13.0 Framework Cherrypicks (flutter#103375)
  [flutter_releases] Flutter beta 2.13.0-0.4.pre Framework Cherrypicks (flutter#103101)
  Enforce cpu explicitly for Mac devicelab test beds (flutter#101871) (flutter#102685)
  [flutter_releases] Flutter beta 2.13.0-0.3.pre Framework Cherrypicks (flutter#102620)
  [flutter_releases] Upgrade dwds to 12.1.1 (flutter#101546)
  [flutter_releases] Flutter beta 2.13.0-0.2.pre Framework Cherrypicks (flutter#102193)
  [flutter_releases] Flutter beta 2.12.0-4.1.pre Framework Cherrypicks (flutter#101771)
  [flutter_releases] Cherrypick engine to c341645 (flutter#101608)
  Revert "Refactor `ToggleButtons` (remove `RawMaterialButton`) (flutter#99493)" (flutter#101538)
  [Cherrypick] Partial revert of super params in tools (flutter#101436) (flutter#101527)
  Roll Engine from e7e7ca1 to b48d65e (10 revisions) (flutter#101370)
  [flutter_tools] port bash script to use sysctl not uname on macOS (flutter#101308)
  ...
camsim99 pushed a commit to camsim99/flutter that referenced this pull request Aug 10, 2022
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Aug 30, 2022
engine-flutter-autoroll added a commit to engine-flutter-autoroll/plugins that referenced this pull request Aug 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

f: material design flutter/packages/flutter/material repository. framework flutter/packages/flutter repository. See also f: labels.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Repeatedly triggering material 3 ink sparkle leads to permanent raster slowdown Severe jank observed when enabling useMaterial3 in Flutter 3

3 participants