-
Notifications
You must be signed in to change notification settings - Fork 6k
Add PlatformView support for Fuchsia #19132
Conversation
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 with a few nits
Working on the ShellTest timeout. |
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.
mostly LGTM, with a few nits and one request to make a raw pointer to a shared pointer to clarify the ownership semantics.
}); | ||
} | ||
|
||
flutter::ExternalViewEmbedder* Engine::GetViewEmbedder() { |
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.
can we make this a shared_ptr
?
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.
My next CL is going to move the ExternalViewEmbedder into the engine and make it a shared_ptr there, so it makes sense to just do it now
Can you please rebase to head? I added a recipe change to the Web Engine but needs the most recent code to run. Sorry for the inconvenience. |
@nturgut Sure thing. |
This change allows embedding views provided by fuchsia components into a flutter app running on Fuchsia. This conforms to Flutters idiomatic approach to composite PlatformView alongside other rendered layers. This uses the `view embedder` infrastructure to allow `PlatformViewLayer` to hold fuchsia views. This is meant to eventually supplant the legacy `SceneHost` and `ChildViewLayer` mechanism to embed fuchsia `ChildView`. To see how this will get used check out: https://fuchsia-review.googlesource.com/c/experiences/+/398536/6/examples/hello_experiences/lib/fuchsia_view.dart Includes unittests for platform_view.cc. Note: This change has no impact on the legacy code to embed fuchsia views.
f41d0f0
to
03c6beb
Compare
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 after 2 comments addressed
}); | ||
} | ||
|
||
flutter::ExternalViewEmbedder* Engine::GetViewEmbedder() { |
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.
My next CL is going to move the ExternalViewEmbedder into the engine and make it a shared_ptr there, so it makes sense to just do it now
Same for OnDestroyViewMethodCall to OnDestroyView
Description
This change allows embedding views provided by fuchsia components into
a flutter app running on Fuchsia. This conforms to Flutters idiomatic
approach to composite PlatformView alongside other rendered layers.
This uses the
view embedder
infrastructure to allowPlatformViewLayer
to hold fuchsia views. This is meant to eventually supplant the legacy
SceneHost
andChildViewLayer
mechanism to embed fuchsiaChildView
.To see how this will get used check out:
https://fuchsia-review.googlesource.com/c/experiences/+/398536/6/examples/hello_experiences/lib/fuchsia_view.dart
Note: This change has no impact on the legacy code to embed fuchsia
views.
Tests
Includes unittests for platform_view.cc.