Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Conversation

@amirh
Copy link
Contributor

@amirh amirh commented Sep 21, 2018

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

@googlebot
Copy link

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.
In order to pass this check, please resolve this problem and have the pull request author add another comment and the bot will run again. If the bot doesn't comment, it means it doesn't think anything has changed.

@googlebot
Copy link

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.
In order to pass this check, please resolve this problem and have the pull request author add another comment and the bot will run again. If the bot doesn't comment, it means it doesn't think anything has changed.

@amirh amirh force-pushed the decouple_flutterview branch from 4297acf to 955243f Compare September 21, 2018 18:24
@googlebot
Copy link

CLAs look good, thanks!

@amirh amirh force-pushed the decouple_flutterview branch from 955243f to 86e50d8 Compare September 21, 2018 18:25
@amirh amirh requested review from jason-simmons and mklim and removed request for jason-simmons September 21, 2018 18:26
@amirh
Copy link
Contributor Author

amirh commented Sep 21, 2018

cc @jason-simmons @matthew-carroll


public void attachFlutterView(FlutterView view) {
if (mFlutterView != null)
public void attach(Context context, TextureRegistry textureRegistry, BinaryMessenger messenger) {
Copy link
Contributor

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

Copy link
Contributor Author

@amirh amirh left a 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) {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

Copy link
Contributor

@mklim mklim left a 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.
Copy link
Contributor

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.

Copy link
Contributor Author

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) {
Copy link
Contributor

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.

Copy link
Contributor Author

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.

@amirh amirh force-pushed the decouple_flutterview branch from bee485c to 2bc8737 Compare September 21, 2018 22:33
@amirh amirh merged commit 02901b7 into flutter:master Sep 21, 2018
@amirh amirh deleted the decouple_flutterview branch September 21, 2018 22:40
amirh added a commit to amirh/engine that referenced this pull request Sep 21, 2018
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.
amirh added a commit to amirh/engine that referenced this pull request Sep 21, 2018
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.
amirh added a commit to amirh/engine that referenced this pull request Sep 21, 2018
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.
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Sep 21, 2018
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.
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Sep 22, 2018
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.
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Sep 22, 2018
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.
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Sep 22, 2018
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.
engine-flutter-autoroll added a commit to flutter/flutter that referenced this pull request Sep 22, 2018
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.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants