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

Conversation

sanjayc77
Copy link
Contributor

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 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

Note: This change has no impact on the legacy code to embed fuchsia
views.

Tests

Includes unittests for platform_view.cc.

@auto-assign auto-assign bot requested a review from chinmaygarde June 18, 2020 18:33
@arbreng arbreng requested review from arbreng and iskakaushik June 18, 2020 19:08
Copy link
Contributor

@arbreng arbreng left a 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

@sanjayc77
Copy link
Contributor Author

Working on the ShellTest timeout.

Copy link
Contributor

@iskakaushik iskakaushik left a 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() {
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 make this a shared_ptr?

Copy link
Contributor

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

@nturgut
Copy link
Contributor

nturgut commented Jun 24, 2020

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.

@sanjayc77
Copy link
Contributor Author

@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.
@sanjayc77 sanjayc77 force-pushed the fuchsia-view branch 2 times, most recently from f41d0f0 to 03c6beb Compare June 24, 2020 21:58
Copy link
Contributor

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

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
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants