This repository was archived by the owner on Feb 25, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 6k
Break dependency cycle of FlutterViewController <-> FlutterPlatformView #52271
Merged
Conversation
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
36251cd to
554bfa5
Compare
jmagman
commented
Apr 19, 2024
| // handle gesture sequence. | ||
| // We always override the change type to "cancelled". | ||
| [((FlutterViewController*)_flutterViewController.get()) forceTouchesCancelled:touches]; | ||
| [_flutterViewController.get() forceTouchesCancelled:touches]; |
Member
Author
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(Removing FlutterViewController here)
554bfa5 to
c632ba2
Compare
jmagman
commented
Apr 22, 2024
| - (FlutterRestorationPlugin*)restorationPlugin; | ||
| // Send touches to the Flutter Engine while forcing the change type to be cancelled. | ||
| // The `phase`s in `touches` are ignored. | ||
| - (void)forceTouchesCancelled:(NSSet*)touches; |
Member
Author
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Moved to FlutterViewResponder.h
hellohuanlin
approved these changes
Apr 22, 2024
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/flutter
that referenced
this pull request
Apr 22, 2024
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/flutter
that referenced
this pull request
Apr 22, 2024
auto-submit bot
pushed a commit
to flutter/flutter
that referenced
this pull request
Apr 23, 2024
…147190) flutter/engine@a4b71f0...33c828f 2024-04-22 skia-flutter-autoroll@skia.org Roll Skia from eb29b46236e6 to 3b32e3280b67 (1 revision) (flutter/engine#52298) 2024-04-22 magder@google.com Break dependency cycle of FlutterViewController <-> FlutterPlatformView (flutter/engine#52271) 2024-04-22 chris@bracken.jp [et] Lookup output filesystem path, not label (flutter/engine#52248) 2024-04-22 skia-flutter-autoroll@skia.org Roll Skia from 975859a96f8f to eb29b46236e6 (9 revisions) (flutter/engine#52297) 2024-04-22 1961493+harryterkelsen@users.noreply.github.com [canvaskit] Add configuration for maximum canvases (flutter/engine#51735) 2024-04-22 120297255+PurplePolyhedron@users.noreply.github.com Fix link in BlendMode.saturation (flutter/engine#52156) 2024-04-22 magder@google.com Refactor and migrate FlutterUndoManagerPlugin to ARC (flutter/engine#52234) 2024-04-22 skia-flutter-autoroll@skia.org Roll Fuchsia Linux SDK from Rr9lFiKCPhMXDGa89... to L533ubzhjWwW7jxbc... (flutter/engine#52293) 2024-04-22 skia-flutter-autoroll@skia.org Roll Dart SDK from 0a83dd7e61b1 to 0ed66a4d77cb (1 revision) (flutter/engine#52294) Also rolling transitive DEPS: fuchsia/sdk/core/linux-amd64 from Rr9lFiKCPhMX to L533ubzhjWwW If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/flutter-engine-flutter-autoroll Please CC jsimmons@google.com,rmistry@google.com,zra@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Flutter: 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
9 tasks
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Trying to migrate the iOS embedder MRC to ARC, I'm attempting to break some dependency cycles so it's easier to migrate the "leaf" dependencies to ARC, working my way up.
The cycle is:
FlutterViewController->FlutterView->FlutterPlatformView-> (Before this PR)FlutterViewControllerFlutterViewControllerdepends on many other large MRC classes, like FlutterEngine., so I'd like to pull that one out soFlutterView,FlutterPlatformView, andFlutterOverlayViewcan be migrated to ARC in a smaller PR.FlutterPlatformViewonly depends onFlutterViewControllerin this one place, casting aUIViewControllerand calling-forceTouchesCancelled:.engine/shell/platform/darwin/ios/framework/Source/FlutterPlatformViews.mm
Line 1201 in 55670b7
Instead, move
-forceTouchesCancelled:to the existingFlutterViewResponderprotocol with the other touch events, whichFlutterViewControlleralready implements. The cast can then be removed, breaking the cycle.Clean up all the imports.
Part of flutter/flutter#137801, though this doesn't actually migrate anything to ARC.