-
Notifications
You must be signed in to change notification settings - Fork 6k
Decouple PlatformViewsController from FlutterView. #6303
Conversation
|
We found a Contributor License Agreement for you (the sender of this pull request), but were unable to find agreements for all the commit author(s) or Co-authors. If you authored these, maybe you used a different email address in the git commits than was used to sign the CLA (login here to double check)? If these were authored by someone else, then they will need to sign a CLA as well, and confirm that they're okay with these being contributed to Google. |
|
We found a Contributor License Agreement for you (the sender of this pull request), but were unable to find agreements for all the commit author(s) or Co-authors. If you authored these, maybe you used a different email address in the git commits than was used to sign the CLA (login here to double check)? If these were authored by someone else, then they will need to sign a CLA as well, and confirm that they're okay with these being contributed to Google. |
4297acf to
955243f
Compare
|
CLAs look good, thanks! |
955243f to
86e50d8
Compare
|
|
||
| public void attachFlutterView(FlutterView view) { | ||
| if (mFlutterView != null) | ||
| public void attach(Context context, TextureRegistry textureRegistry, BinaryMessenger messenger) { |
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.
nit: Javadoc on this method and detach would be helpful. The params could use the explanations that you've given them where you've declared them as private members.
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.
done
amirh
left a comment
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.
Thorough review :) thanks!
PTAL
|
|
||
| public void attachFlutterView(FlutterView view) { | ||
| if (mFlutterView != null) | ||
| public void attach(Context context, TextureRegistry textureRegistry, BinaryMessenger messenger) { |
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.
done
mklim
left a comment
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.
LGTM
Instead of getting a FlutterView instance, depend on the specific interfaces required by PlatformViewsController (BinaryMessenger, TextureRegistry, and Context). This allows using PlatformViewsControlling in the flutter/embedding code.
| private final PlatformViewRegistryImpl mRegistry; | ||
|
|
||
| private FlutterView mFlutterView; | ||
| // The context of the Activity or Fragment hosting the render target for the Flutter engine. |
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.
FYI - a Fragment isn't a Context. A Context is either an Activity or an Application.
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.
done
| * will be rendered. | ||
| * @param messenger The Flutter application on the other side of this messenger drives this platform views controller. | ||
| */ | ||
| public void attach(Context context, TextureRegistry textureRegistry, BinaryMessenger messenger) { |
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.
We spoke offline about this, but I think it would be helpful to ensure that all "attach" methods we declare throughout the embedding somehow specifies what they attach to. This will avoid ambiguity. For example: "onAttachedToWindow()", "attachToFlutterRenderer()", etc.
I'm not sure what the right name for this one would be. Maybe this is also attaching to a Flutter renderer? Maybe this attaching to a Flutter engine? I'm not sure what the overriding conceptual artifact is, but whatever it is would be helpful.
This is a non-blocking concern. Feel free to merge and improve later, if needed.
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.
Open for concrete suggestions of a better name.
bee485c to
2bc8737
Compare
Decouple PlatformViewsController from FlutterView. Instead of getting a FlutterView instance, depend on the specific interfaces required by PlatformViewsController (BinaryMessenger, TextureRegistry, and Context). This allows using PlatformViewsControlling in the flutter/embedding code.
Decouple PlatformViewsController from FlutterView. Instead of getting a FlutterView instance, depend on the specific interfaces required by PlatformViewsController (BinaryMessenger, TextureRegistry, and Context). This allows using PlatformViewsControlling in the flutter/embedding code.
Decouple PlatformViewsController from FlutterView. Instead of getting a FlutterView instance, depend on the specific interfaces required by PlatformViewsController (BinaryMessenger, TextureRegistry, and Context). This allows using PlatformViewsControlling in the flutter/embedding code.
flutter/engine@a8890fd...5b8e8c3 git log a8890fd..5b8e8c3 --no-merges --oneline 5b8e8c3 Make FlutterStandardCodec handle writing NSData (flutter/engine#6207) 02901b7 Decouple PlatformViewsController from FlutterView. (flutter/engine#6303) cc3009c Revert 'Dart SDK roll for 2018/09/20' 8471862 (flutter/engine#6309) bbdf7c1 Revert "Fix a compilation problem when using iPhoneOS12.0sdk(Xcode10) && clang version 7.0.0." (flutter/engine#6307) dea0921 Roll src/third_party/skia c25f440d537e..358558a4cecc (17 commits) (flutter/engine#6308) d29c7db Add logging if FlutterDartProject fails to load the application kernel snapshot (flutter/engine#6257) 2a1debf Update deprecated subtags from language subtag registry. (flutter/engine#6280) 540cd96 Add Xib splashscreen support (flutter/engine#6289) 05f21e6 Fix a compilation problem when using iPhoneOS12.0sdk(Xcode10) && clang version 7.0.0. (flutter/engine#6279) ca6f103 Roll src/third_party/skia d842557c0724..c25f440d537e (10 commits) (flutter/engine#6304) 3b46705 Roll src/third_party/skia 38ca6d509d9f..d842557c0724 (5 commits) (flutter/engine#6302) 0c166fe Roll src/third_party/skia 05cf051f0252..38ca6d509d9f (1 commits) (flutter/engine#6301) cf0fbad Roll src/third_party/skia 44c6167c4125..05cf051f0252 (4 commits) (flutter/engine#6299) 2ec20aa Remove bottom safe-area padding when keyboard up (flutter/engine#6297) The AutoRoll server is located here: https://autoroll.skia.org/r/flutter-engine-flutter-autoroll Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+/master/autoroll/README.md If the roll is causing failures, please contact the current sheriff, who should be CC'd on the roll, and stop the roller if necessary.
flutter/engine@cc3009c...7648d21 git log cc3009c..7648d21 --no-merges --oneline 7648d21 Dart SDK roll for 2018-09-21 (flutter/engine#6311) 5b8e8c3 Make FlutterStandardCodec handle writing NSData (flutter/engine#6207) 02901b7 Decouple PlatformViewsController from FlutterView. (flutter/engine#6303) The AutoRoll server is located here: https://autoroll.skia.org/r/flutter-engine-flutter-autoroll Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+/master/autoroll/README.md If the roll is causing failures, please contact the current sheriff, who should be CC'd on the roll, and stop the roller if necessary.
flutter/engine@cc3009c...19ac3e1 git log cc3009c..19ac3e1 --no-merges --oneline 19ac3e1 Roll src/third_party/skia 358558a4cecc..11f4994b84e1 (2 commits) (flutter/engine#6312) 7648d21 Dart SDK roll for 2018-09-21 (flutter/engine#6311) 5b8e8c3 Make FlutterStandardCodec handle writing NSData (flutter/engine#6207) 02901b7 Decouple PlatformViewsController from FlutterView. (flutter/engine#6303) The AutoRoll server is located here: https://autoroll.skia.org/r/flutter-engine-flutter-autoroll Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+/master/autoroll/README.md If the roll is causing failures, please contact the current sheriff, who should be CC'd on the roll, and stop the roller if necessary.
flutter/engine@cc3009c...f3a3d0c git log cc3009c..f3a3d0c --no-merges --oneline f3a3d0c Roll src/third_party/skia 11f4994b84e1..175b587a634d (1 commits) (flutter/engine#6313) 19ac3e1 Roll src/third_party/skia 358558a4cecc..11f4994b84e1 (2 commits) (flutter/engine#6312) 7648d21 Dart SDK roll for 2018-09-21 (flutter/engine#6311) 5b8e8c3 Make FlutterStandardCodec handle writing NSData (flutter/engine#6207) 02901b7 Decouple PlatformViewsController from FlutterView. (flutter/engine#6303) The AutoRoll server is located here: https://autoroll.skia.org/r/flutter-engine-flutter-autoroll Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+/master/autoroll/README.md If the roll is causing failures, please contact the current sheriff, who should be CC'd on the roll, and stop the roller if necessary.
flutter/engine@cc3009c...f3a3d0c git log cc3009c..f3a3d0c --no-merges --oneline f3a3d0c Roll src/third_party/skia 11f4994b84e1..175b587a634d (1 commits) (flutter/engine#6313) 19ac3e1 Roll src/third_party/skia 358558a4cecc..11f4994b84e1 (2 commits) (flutter/engine#6312) 7648d21 Dart SDK roll for 2018-09-21 (flutter/engine#6311) 5b8e8c3 Make FlutterStandardCodec handle writing NSData (flutter/engine#6207) 02901b7 Decouple PlatformViewsController from FlutterView. (flutter/engine#6303) The AutoRoll server is located here: https://autoroll.skia.org/r/flutter-engine-flutter-autoroll Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+/master/autoroll/README.md If the roll is causing failures, please contact the current sheriff, who should be CC'd on the roll, and stop the roller if necessary.
Instead of getting a FlutterView instance, depend on the specific interfaces required by
PlatformViewsController (BinaryMessenger, TextureRegistry, and Context).
This allows using PlatformViewsControlling in the flutter/embedding
code.
flutter/flutter#22118