Reapply "Make HCPP upgrading work for vd/tlhc (#181024)" (#183310)#183360
Conversation
…ter#183310) This reverts commit b53c2e6.
There was a problem hiding this comment.
Code Review
This pull request reapplies changes to enable HCPP (Hybrid Composition Platform Views) upgrading for Virtual Display and Texture Layer Hybrid Composition platform views. The changes introduce a new --enable-surface-control flag to flutter drive and flutter run which enables this upgrade path. The implementation involves modifications across the tool, framework, and engine to support this dynamic upgrade at runtime. New integration tests are added to verify that legacy platform view creation APIs are correctly upgraded to HCPP mode when the flag is used, and that this process does not cause crashes. My feedback includes a suggestion to improve the internal API design in platform_views.dart for better maintainability.
Note: Security Review did not run due to the size of the PR.
| position: position, | ||
| ); | ||
| if (response is int) { | ||
| (_internals as _TextureAndroidViewControllerInternals).textureId = response; |
There was a problem hiding this comment.
The cast to _TextureAndroidViewControllerInternals here is a bit of a code smell, even though it's safe in the current context. To improve the design and remove the need for a cast, you could consider adding a textureId setter to the _AndroidViewControllerInternals abstract class.
The other internal controller implementations (_HybridAndroidViewControllerInternals and _Hybrid2AndroidViewControllerInternals) would then need to provide an implementation for the setter, which could simply throw an UnimplementedError as they do for the getter.
This would make the code here cleaner:
if (response is int) {
_internals.textureId = response;
} else {
_internals = _Hybrid2AndroidViewControllerInternals();
}flutter/flutter@3f400d7...9e36adb 2026-03-12 engine-flutter-autoroll@skia.org Roll Fuchsia Linux SDK from QD887D4OanteB7UKM... to jJbpv4J_tjW-wuKDq... (flutter/flutter#183584) 2026-03-12 matt.kosarek@canonical.com Adding the SatelliteWindowController interface to `_window.dart` (flutter/flutter#182903) 2026-03-12 engine-flutter-autoroll@skia.org Roll Skia from 0cab3e4ee34b to 46f41493ebf4 (17 revisions) (flutter/flutter#183553) 2026-03-12 engine-flutter-autoroll@skia.org Roll Dart SDK from 8531f7c2bdae to 59be21f25f2d (4 revisions) (flutter/flutter#183547) 2026-03-12 koji.wakamiya@gmail.com [ios][engine] Fix keyboard flicker when switching text fields (flutter/flutter#182661) 2026-03-11 34871572+gmackall@users.noreply.github.com Rename hcpp opt in flag to `enable-hcpp` (flutter/flutter#183151) 2026-03-11 137456488+flutter-pub-roller-bot@users.noreply.github.com Roll pub packages (flutter/flutter#183541) 2026-03-11 97480502+b-luk@users.noreply.github.com Re-enable gpu_test.dart for opengles, but disable specific tests in the file (flutter/flutter#183531) 2026-03-11 jacksongardner@google.com Use CLA-approved email and username for github workflow commits. (flutter/flutter#183540) 2026-03-11 okorohelijah@google.com [integration_test]UIScene Migration (flutter/flutter#182631) 2026-03-11 git@reb0.org ci: Run orchestrator for windows_arm_host_engine on Linux (flutter/flutter#181075) 2026-03-11 mdebbar@google.com [web] Prevent Firefox auto-updates (flutter/flutter#183330) 2026-03-11 koji.wakamiya@gmail.com Add scrollCacheExtent to PageView (flutter/flutter#180411) 2026-03-11 danny@tuppeny.com Remove redundant VS Code code/tests (flutter/flutter#183506) 2026-03-11 danny@tuppeny.com Roll pub packages (flutter/flutter#183527) 2026-03-11 34871572+gmackall@users.noreply.github.com Reapply "Make HCPP upgrading work for vd/tlhc (#181024)" (#183310) (flutter/flutter#183360) 2026-03-11 victorsanniay@gmail.com Add awaits to dev/ callsites (flutter/flutter#183479) 2026-03-11 stuartmorgan@google.com Standardize review timeline guidance (flutter/flutter#183465) 2026-03-11 chingjun@google.com Rename ExecutionModelToString to ExecutionModelToStringName. (flutter/flutter#183461) 2026-03-11 34871572+gmackall@users.noreply.github.com Fix input mirroring in platform views when system language is RTL, and support is set in manifest. (flutter/flutter#183472) 2026-03-11 engine-flutter-autoroll@skia.org Roll Packages from ee460d6 to ecace66 (10 revisions) (flutter/flutter#183517) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/flutter-packages Please CC stuartmorgan@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Packages: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
…r#11233) flutter/flutter@3f400d7...9e36adb 2026-03-12 engine-flutter-autoroll@skia.org Roll Fuchsia Linux SDK from QD887D4OanteB7UKM... to jJbpv4J_tjW-wuKDq... (flutter/flutter#183584) 2026-03-12 matt.kosarek@canonical.com Adding the SatelliteWindowController interface to `_window.dart` (flutter/flutter#182903) 2026-03-12 engine-flutter-autoroll@skia.org Roll Skia from 0cab3e4ee34b to 46f41493ebf4 (17 revisions) (flutter/flutter#183553) 2026-03-12 engine-flutter-autoroll@skia.org Roll Dart SDK from 8531f7c2bdae to 59be21f25f2d (4 revisions) (flutter/flutter#183547) 2026-03-12 koji.wakamiya@gmail.com [ios][engine] Fix keyboard flicker when switching text fields (flutter/flutter#182661) 2026-03-11 34871572+gmackall@users.noreply.github.com Rename hcpp opt in flag to `enable-hcpp` (flutter/flutter#183151) 2026-03-11 137456488+flutter-pub-roller-bot@users.noreply.github.com Roll pub packages (flutter/flutter#183541) 2026-03-11 97480502+b-luk@users.noreply.github.com Re-enable gpu_test.dart for opengles, but disable specific tests in the file (flutter/flutter#183531) 2026-03-11 jacksongardner@google.com Use CLA-approved email and username for github workflow commits. (flutter/flutter#183540) 2026-03-11 okorohelijah@google.com [integration_test]UIScene Migration (flutter/flutter#182631) 2026-03-11 git@reb0.org ci: Run orchestrator for windows_arm_host_engine on Linux (flutter/flutter#181075) 2026-03-11 mdebbar@google.com [web] Prevent Firefox auto-updates (flutter/flutter#183330) 2026-03-11 koji.wakamiya@gmail.com Add scrollCacheExtent to PageView (flutter/flutter#180411) 2026-03-11 danny@tuppeny.com Remove redundant VS Code code/tests (flutter/flutter#183506) 2026-03-11 danny@tuppeny.com Roll pub packages (flutter/flutter#183527) 2026-03-11 34871572+gmackall@users.noreply.github.com Reapply "Make HCPP upgrading work for vd/tlhc (#181024)" (#183310) (flutter/flutter#183360) 2026-03-11 victorsanniay@gmail.com Add awaits to dev/ callsites (flutter/flutter#183479) 2026-03-11 stuartmorgan@google.com Standardize review timeline guidance (flutter/flutter#183465) 2026-03-11 chingjun@google.com Rename ExecutionModelToString to ExecutionModelToStringName. (flutter/flutter#183461) 2026-03-11 34871572+gmackall@users.noreply.github.com Fix input mirroring in platform views when system language is RTL, and support is set in manifest. (flutter/flutter#183472) 2026-03-11 engine-flutter-autoroll@skia.org Roll Packages from ee460d6 to ecace66 (10 revisions) (flutter/flutter#183517) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/flutter-packages Please CC stuartmorgan@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Packages: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
…ter#183310) (flutter#183360) Undo the revert, as it was not the problem. Co-authored-by: Gray Mackall <mackall@google.com> Co-authored-by: Jenn Magder <magder@google.com>
…ter#183310) (flutter#183360) Undo the revert, as it was not the problem. Co-authored-by: Gray Mackall <mackall@google.com> Co-authored-by: Jenn Magder <magder@google.com>
…r#11233) flutter/flutter@3f400d7...9e36adb 2026-03-12 engine-flutter-autoroll@skia.org Roll Fuchsia Linux SDK from QD887D4OanteB7UKM... to jJbpv4J_tjW-wuKDq... (flutter/flutter#183584) 2026-03-12 matt.kosarek@canonical.com Adding the SatelliteWindowController interface to `_window.dart` (flutter/flutter#182903) 2026-03-12 engine-flutter-autoroll@skia.org Roll Skia from 0cab3e4ee34b to 46f41493ebf4 (17 revisions) (flutter/flutter#183553) 2026-03-12 engine-flutter-autoroll@skia.org Roll Dart SDK from 8531f7c2bdae to 59be21f25f2d (4 revisions) (flutter/flutter#183547) 2026-03-12 koji.wakamiya@gmail.com [ios][engine] Fix keyboard flicker when switching text fields (flutter/flutter#182661) 2026-03-11 34871572+gmackall@users.noreply.github.com Rename hcpp opt in flag to `enable-hcpp` (flutter/flutter#183151) 2026-03-11 137456488+flutter-pub-roller-bot@users.noreply.github.com Roll pub packages (flutter/flutter#183541) 2026-03-11 97480502+b-luk@users.noreply.github.com Re-enable gpu_test.dart for opengles, but disable specific tests in the file (flutter/flutter#183531) 2026-03-11 jacksongardner@google.com Use CLA-approved email and username for github workflow commits. (flutter/flutter#183540) 2026-03-11 okorohelijah@google.com [integration_test]UIScene Migration (flutter/flutter#182631) 2026-03-11 git@reb0.org ci: Run orchestrator for windows_arm_host_engine on Linux (flutter/flutter#181075) 2026-03-11 mdebbar@google.com [web] Prevent Firefox auto-updates (flutter/flutter#183330) 2026-03-11 koji.wakamiya@gmail.com Add scrollCacheExtent to PageView (flutter/flutter#180411) 2026-03-11 danny@tuppeny.com Remove redundant VS Code code/tests (flutter/flutter#183506) 2026-03-11 danny@tuppeny.com Roll pub packages (flutter/flutter#183527) 2026-03-11 34871572+gmackall@users.noreply.github.com Reapply "Make HCPP upgrading work for vd/tlhc (#181024)" (#183310) (flutter/flutter#183360) 2026-03-11 victorsanniay@gmail.com Add awaits to dev/ callsites (flutter/flutter#183479) 2026-03-11 stuartmorgan@google.com Standardize review timeline guidance (flutter/flutter#183465) 2026-03-11 chingjun@google.com Rename ExecutionModelToString to ExecutionModelToStringName. (flutter/flutter#183461) 2026-03-11 34871572+gmackall@users.noreply.github.com Fix input mirroring in platform views when system language is RTL, and support is set in manifest. (flutter/flutter#183472) 2026-03-11 engine-flutter-autoroll@skia.org Roll Packages from ee460d6 to ecace66 (10 revisions) (flutter/flutter#183517) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/flutter-packages Please CC stuartmorgan@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Packages: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
Undo the revert, as it was not the problem.