Skip to content

[Android] HC++ wire up dart platform channel code and integration test.#162751

Merged
auto-submit[bot] merged 13 commits intoflutter:masterfrom
jonahwilliams:hc_pp_test
Feb 7, 2025
Merged

[Android] HC++ wire up dart platform channel code and integration test.#162751
auto-submit[bot] merged 13 commits intoflutter:masterfrom
jonahwilliams:hc_pp_test

Conversation

@jonahwilliams
Copy link
Contributor

@jonahwilliams jonahwilliams commented Feb 5, 2025

Use the PlatformViewController2 to register a platform view, allow the dart side platform view logic to opt into this new platform view. Wires up an integration test with android_engine_test.

@github-actions github-actions bot added platform-android Android applications specifically framework flutter/packages/flutter repository. See also f: labels. engine flutter/engine related. See also e: labels. platform-fuchsia Fuchsia code specifically labels Feb 6, 2025
@jonahwilliams jonahwilliams changed the title [Android] add basic integration test for HCpp [Android] HC++ wire up dart platform channel code and integration test. Feb 6, 2025
@jonahwilliams jonahwilliams marked this pull request as ready for review February 6, 2025 02:20
@github-actions github-actions bot removed the platform-fuchsia Fuchsia code specifically label Feb 6, 2025
@jonahwilliams
Copy link
Contributor Author

@matanlurey question when you get in tomorrow: how do you think I should wire this up to the existing Android engine tests?

This would go under the vulkan shard, but i'd need to update the AndroidManifest configuration just for this one test suite. I think I could put it in its own directory and then just ... do that? Or do you think we should have a separate shard for it.

if (widget.controller.requiresViewComposition) {
if (widget.controller.useNewHybridComposition) {
// TODO(jonahwilliams): make it actually work.
return _PlatformLayerBasedAndroidViewSurface(
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Not sure yet if we need a new surface class

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We will need to configure touch gestures differently. Will do in follow up.

Copy link
Contributor

Choose a reason for hiding this comment

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

Ack

add(NativeDriverSupportPlugin())
}

flutterEngine
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This isn't great and we probably need to fix the registry so that it is shared across controllers.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I have a follow up patch to fix this.

Copy link
Contributor

Choose a reason for hiding this comment

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

Thank you!

Add a TODO/issue.

Copy link
Contributor

@matanlurey matanlurey left a comment

Choose a reason for hiding this comment

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

LGTM, a few small comments.

if (stdout == null) {
foundError(<String>['No stdout produced.']);
continue;
return;
Copy link
Contributor

Choose a reason for hiding this comment

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

I think I had this as a continue so that hypothetically other tests ran, but I am not sure it was worth it.

If this was intentional feel free to ignore.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Talked offline, this is pulled into a closure now so its equivalent code.

}

// Test HCPP Platform Views
androidManifestXml.writeAsStringSync(
Copy link
Contributor

Choose a reason for hiding this comment

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

You'd want to skip this stanza for OpenGLES.

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

add(NativeDriverSupportPlugin())
}

flutterEngine
Copy link
Contributor

Choose a reason for hiding this comment

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

Thank you!

Add a TODO/issue.

///
/// For a convenient way to deflake a test, see `tool/deflake.dart`.
void main() async {
const String goldenPrefix = 'hybrid_composition_2_platform_view';
Copy link
Contributor

Choose a reason for hiding this comment

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

plus_plus instead of 2? or PP. PP is good.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

pp!

if (widget.controller.requiresViewComposition) {
if (widget.controller.useNewHybridComposition) {
// TODO(jonahwilliams): make it actually work.
return _PlatformLayerBasedAndroidViewSurface(
Copy link
Contributor

Choose a reason for hiding this comment

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

Ack

@jonahwilliams jonahwilliams added the autosubmit Merge PR when tree becomes green via auto submit App label Feb 6, 2025
@auto-submit auto-submit bot removed the autosubmit Merge PR when tree becomes green via auto submit App label Feb 7, 2025
@auto-submit
Copy link
Contributor

auto-submit bot commented Feb 7, 2025

autosubmit label was removed for flutter/flutter/162751, because - The status or check suite Google testing has failed. Please fix the issues identified (or deflake) before re-applying this label.

engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Feb 7, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Feb 7, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Feb 8, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Feb 8, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Feb 9, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Feb 9, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Feb 10, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Feb 10, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Feb 10, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Feb 10, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Feb 10, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Feb 11, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Feb 11, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Feb 11, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Feb 11, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Feb 11, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request May 20, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request May 20, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request May 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

engine flutter/engine related. See also e: labels. framework flutter/packages/flutter repository. See also f: labels. platform-android Android applications specifically

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants