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 [email protected] Roll Fuchsia Linux SDK from QD887D4OanteB7UKM... to jJbpv4J_tjW-wuKDq... (flutter/flutter#183584) 2026-03-12 [email protected] Adding the SatelliteWindowController interface to `_window.dart` (flutter/flutter#182903) 2026-03-12 [email protected] Roll Skia from 0cab3e4ee34b to 46f41493ebf4 (17 revisions) (flutter/flutter#183553) 2026-03-12 [email protected] Roll Dart SDK from 8531f7c2bdae to 59be21f25f2d (4 revisions) (flutter/flutter#183547) 2026-03-12 [email protected] [ios][engine] Fix keyboard flicker when switching text fields (flutter/flutter#182661) 2026-03-11 [email protected] Rename hcpp opt in flag to `enable-hcpp` (flutter/flutter#183151) 2026-03-11 [email protected] Roll pub packages (flutter/flutter#183541) 2026-03-11 [email protected] Re-enable gpu_test.dart for opengles, but disable specific tests in the file (flutter/flutter#183531) 2026-03-11 [email protected] Use CLA-approved email and username for github workflow commits. (flutter/flutter#183540) 2026-03-11 [email protected] [integration_test]UIScene Migration (flutter/flutter#182631) 2026-03-11 [email protected] ci: Run orchestrator for windows_arm_host_engine on Linux (flutter/flutter#181075) 2026-03-11 [email protected] [web] Prevent Firefox auto-updates (flutter/flutter#183330) 2026-03-11 [email protected] Add scrollCacheExtent to PageView (flutter/flutter#180411) 2026-03-11 [email protected] Remove redundant VS Code code/tests (flutter/flutter#183506) 2026-03-11 [email protected] Roll pub packages (flutter/flutter#183527) 2026-03-11 [email protected] Reapply "Make HCPP upgrading work for vd/tlhc (#181024)" (#183310) (flutter/flutter#183360) 2026-03-11 [email protected] Add awaits to dev/ callsites (flutter/flutter#183479) 2026-03-11 [email protected] Standardize review timeline guidance (flutter/flutter#183465) 2026-03-11 [email protected] Rename ExecutionModelToString to ExecutionModelToStringName. (flutter/flutter#183461) 2026-03-11 [email protected] Fix input mirroring in platform views when system language is RTL, and support is set in manifest. (flutter/flutter#183472) 2026-03-11 [email protected] 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 [email protected] 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 [email protected] Roll Fuchsia Linux SDK from QD887D4OanteB7UKM... to jJbpv4J_tjW-wuKDq... (flutter/flutter#183584) 2026-03-12 [email protected] Adding the SatelliteWindowController interface to `_window.dart` (flutter/flutter#182903) 2026-03-12 [email protected] Roll Skia from 0cab3e4ee34b to 46f41493ebf4 (17 revisions) (flutter/flutter#183553) 2026-03-12 [email protected] Roll Dart SDK from 8531f7c2bdae to 59be21f25f2d (4 revisions) (flutter/flutter#183547) 2026-03-12 [email protected] [ios][engine] Fix keyboard flicker when switching text fields (flutter/flutter#182661) 2026-03-11 [email protected] Rename hcpp opt in flag to `enable-hcpp` (flutter/flutter#183151) 2026-03-11 [email protected] Roll pub packages (flutter/flutter#183541) 2026-03-11 [email protected] Re-enable gpu_test.dart for opengles, but disable specific tests in the file (flutter/flutter#183531) 2026-03-11 [email protected] Use CLA-approved email and username for github workflow commits. (flutter/flutter#183540) 2026-03-11 [email protected] [integration_test]UIScene Migration (flutter/flutter#182631) 2026-03-11 [email protected] ci: Run orchestrator for windows_arm_host_engine on Linux (flutter/flutter#181075) 2026-03-11 [email protected] [web] Prevent Firefox auto-updates (flutter/flutter#183330) 2026-03-11 [email protected] Add scrollCacheExtent to PageView (flutter/flutter#180411) 2026-03-11 [email protected] Remove redundant VS Code code/tests (flutter/flutter#183506) 2026-03-11 [email protected] Roll pub packages (flutter/flutter#183527) 2026-03-11 [email protected] Reapply "Make HCPP upgrading work for vd/tlhc (#181024)" (#183310) (flutter/flutter#183360) 2026-03-11 [email protected] Add awaits to dev/ callsites (flutter/flutter#183479) 2026-03-11 [email protected] Standardize review timeline guidance (flutter/flutter#183465) 2026-03-11 [email protected] Rename ExecutionModelToString to ExecutionModelToStringName. (flutter/flutter#183461) 2026-03-11 [email protected] Fix input mirroring in platform views when system language is RTL, and support is set in manifest. (flutter/flutter#183472) 2026-03-11 [email protected] 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 [email protected] 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 <[email protected]> Co-authored-by: Jenn Magder <[email protected]>
…ter#183310) (flutter#183360) Undo the revert, as it was not the problem. Co-authored-by: Gray Mackall <[email protected]> Co-authored-by: Jenn Magder <[email protected]>
…r#11233) flutter/flutter@3f400d7...9e36adb 2026-03-12 [email protected] Roll Fuchsia Linux SDK from QD887D4OanteB7UKM... to jJbpv4J_tjW-wuKDq... (flutter/flutter#183584) 2026-03-12 [email protected] Adding the SatelliteWindowController interface to `_window.dart` (flutter/flutter#182903) 2026-03-12 [email protected] Roll Skia from 0cab3e4ee34b to 46f41493ebf4 (17 revisions) (flutter/flutter#183553) 2026-03-12 [email protected] Roll Dart SDK from 8531f7c2bdae to 59be21f25f2d (4 revisions) (flutter/flutter#183547) 2026-03-12 [email protected] [ios][engine] Fix keyboard flicker when switching text fields (flutter/flutter#182661) 2026-03-11 [email protected] Rename hcpp opt in flag to `enable-hcpp` (flutter/flutter#183151) 2026-03-11 [email protected] Roll pub packages (flutter/flutter#183541) 2026-03-11 [email protected] Re-enable gpu_test.dart for opengles, but disable specific tests in the file (flutter/flutter#183531) 2026-03-11 [email protected] Use CLA-approved email and username for github workflow commits. (flutter/flutter#183540) 2026-03-11 [email protected] [integration_test]UIScene Migration (flutter/flutter#182631) 2026-03-11 [email protected] ci: Run orchestrator for windows_arm_host_engine on Linux (flutter/flutter#181075) 2026-03-11 [email protected] [web] Prevent Firefox auto-updates (flutter/flutter#183330) 2026-03-11 [email protected] Add scrollCacheExtent to PageView (flutter/flutter#180411) 2026-03-11 [email protected] Remove redundant VS Code code/tests (flutter/flutter#183506) 2026-03-11 [email protected] Roll pub packages (flutter/flutter#183527) 2026-03-11 [email protected] Reapply "Make HCPP upgrading work for vd/tlhc (#181024)" (#183310) (flutter/flutter#183360) 2026-03-11 [email protected] Add awaits to dev/ callsites (flutter/flutter#183479) 2026-03-11 [email protected] Standardize review timeline guidance (flutter/flutter#183465) 2026-03-11 [email protected] Rename ExecutionModelToString to ExecutionModelToStringName. (flutter/flutter#183461) 2026-03-11 [email protected] Fix input mirroring in platform views when system language is RTL, and support is set in manifest. (flutter/flutter#183472) 2026-03-11 [email protected] 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 [email protected] 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.