Skip to content

iOS: Drive platform view tests through IOSExternalViewEmbedder - #197263

Merged
cbracken merged 1 commit into
flutter:masterfrom
cbracken:pv-refactor-9
Nov 24, 2026
Merged

cbracken merged 1 commit into
flutter:masterfrom
cbracken:pv-refactor-9

Conversation

@cbracken

Copy link
Copy Markdown
Member

Previously, platform view tests built frames by calling the raster thread methods of FlutterPlatformViewsController directly. In the engine, only IOSExternalViewEmbedder calls those methods, which then forward the calls to the controller.

In following patches, we'll move the raster thread's frame state and frame submission logic out of the controller and into IOSExternalViewEmbedder. This is prefactoring that calls the IOSExternalViewEmbedder methods directly so they keep working while the code migrates.

This is a refactor with no changes to behaviour.

Issue: #112232

Pre-launch Checklist

If you need help, consider asking for advice on the #hackers-new channel on Discord.

If this change needs to override an active code freeze, provide a comment explaining why. The code freeze workflow can be overridden by code reviewers. See pinned issues for any active code freezes with guidance.

Note: The Flutter team is currently trialing the use of Gemini Code Assist for GitHub. Comments from the gemini-code-assist bot should not be taken as authoritative feedback from the Flutter team. If you find its comments useful you can update your code accordingly, but if you are unsure or disagree with the feedback, please feel free to wait for a Flutter team member's review for guidance on which automated comments should be addressed.

@cbracken
cbracken requested a review from a team as a code owner November 23, 2026 22:55
@flutter-dashboard flutter-dashboard Bot added the CICD Run CI/CD label Nov 23, 2026
@cbracken
cbracken requested a review from LouiseHsu November 23, 2026 22:56
@github-actions github-actions Bot added platform-ios iOS applications specifically engine flutter/engine related. See also e: labels. team-ios Owned by iOS platform team labels Nov 23, 2026

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

This pull request refactors the platform views unit tests in "FlutterPlatformViewsTest.mm" to interact with the platform views via an "ExternalViewEmbedder" rather than directly calling methods on "FlutterPlatformViewsController". It introduces a helper function "CreateTestExternalViewEmbedder" in "FlutterPlatformViewsTestHelper" to instantiate an "IOSExternalViewEmbedder" for the tests. There are no review comments to evaluate, and I have no additional feedback to provide.

LouiseHsu
LouiseHsu previously approved these changes Nov 23, 2026
@LouiseHsu LouiseHsu added the autosubmit Merge PR when tree becomes green via auto submit App label Nov 23, 2026
@auto-submit auto-submit Bot removed the autosubmit Merge PR when tree becomes green via auto submit App label Nov 23, 2026
@auto-submit

auto-submit Bot commented Nov 23, 2026

Copy link
Copy Markdown
Contributor

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

Previously, platform view tests built frames by calling the raster
thread methods of `FlutterPlatformViewsController` directly. In the
engine, only `IOSExternalViewEmbedder` calls those methods, which then
forward the calls to the controller.

In following patches, we'll move the raster thread's frame state and
frame submission logic out of the controller and into
`IOSExternalViewEmbedder`. This is prefactoring that calls the
`IOSExternalViewEmbedder` methods directly so they keep working while
the code migrates.

This is a refactor with no changes to behaviour.

Issue: flutter#112232
@github-actions github-actions Bot added the tool Affects the "flutter" command-line tool. See also t: labels. label Nov 24, 2026
@LouiseHsu
LouiseHsu self-requested a review November 24, 2026 00:16
@flutter-dashboard

Copy link
Copy Markdown

Golden file changes have been found for this pull request. Click here to view and triage (e.g. because this is an intentional change).

If you are still iterating on this change and are not ready to resolve the images on the Flutter Gold dashboard, consider marking this PR as a draft pull request above. You will still be able to view image results on the dashboard, commenting will be silenced, and the check will not try to resolve itself until marked ready for review.

For more guidance, visit Writing a golden file test for package:flutter.

Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing.

Changes reported for pull request #197263 at sha 0bac77c

@flutter-dashboard flutter-dashboard Bot added the will affect goldens Changes to golden files label Nov 24, 2026
@cbracken
cbracken added this pull request to the merge queue Nov 24, 2026
Merged via the queue into flutter:master with commit b17b232 Nov 24, 2026
20 of 21 checks passed
@cbracken
cbracken deleted the pv-refactor-9 branch November 24, 2026 05:43
auto-submit Bot pushed a commit to flutter/packages that referenced this pull request Nov 24, 2026
flutter/flutter@98744d3...b75c5b3

2026-11-24 [email protected] Roll Skia from 89e364b13f05 to 2140958ee284 (3 revisions) (flutter/flutter#197287)
2026-11-24 [email protected] Roll Skia from f82f3efc0461 to 89e364b13f05 (6 revisions) (flutter/flutter#197284)
2026-11-24 [email protected] Roll Dart SDK from 10aef26c73f5 to 87f515c52de9 (1 revision) (flutter/flutter#197279)
2026-11-24 [email protected] iOS: Drive platform view tests through IOSExternalViewEmbedder (flutter/flutter#197263)
2026-11-24 [email protected] Fix null check crash in flushSemantics from a stale ancestor geometry cache (flutter/flutter#192724)
2026-11-24 [email protected] [Impeller] Fix Windows build with MSVC 14.52: std::modf is [[nodiscard]] (flutter/flutter#193413)
2026-11-24 [email protected] [web] Preserve fill rules from path operations (flutter/flutter#195971)
2026-11-24 [email protected] Regenerate tool_test_durations.json (flutter/flutter#197261)
2026-11-24 [email protected] Roll Skia from 694af434cadd to f82f3efc0461 (4 revisions) (flutter/flutter#197258)
2026-11-24 [email protected] Increase number of 'Linux tool_integration_tests' subshards (flutter/flutter#197262)
2026-11-24 [email protected] Run tool_integration_tests app tests in one subshard instead of all of them (flutter/flutter#197264)
2026-11-24 [email protected] [flutter_tools] Pass featureFlags in localizations_test.dart (flutter/flutter#197269)
2026-11-23 [email protected] Fix Orca flat review in Linux accessibility (flutter/flutter#196338)
2026-11-23 [email protected] [flutter tools] Pass --client-id=flutter-analyze to the analysis server (flutter/flutter#197227)
2026-11-23 [email protected] [Flutter GPU] Expose the maximum render target size (flutter/flutter#196640)
2026-11-23 [email protected] iOS: Don't clear raster thread state in platform views reset (flutter/flutter#197025)
2026-11-23 [email protected] iOS: Composite platform views from layers in tests (flutter/flutter#197021)
2026-11-23 [email protected] [flutter_tools] Harden extension diagnostics models and RPC failure handling (flutter/flutter#196233)
2026-11-23 [email protected] [flutter_tools] Support standalone UI packages in gen-l10n (flutter/flutter#194500)
2026-11-23 [email protected] [flutter_tools] Consolidate ToolDependencies.bootstrap builders and require extension managers (flutter/flutter#196388)
2026-11-23 [email protected] Roll Skia from 31b19bdc8195 to 694af434cadd (2 revisions) (flutter/flutter#197239)
2026-11-23 [email protected] Roll Dart SDK from df632229552e to 10aef26c73f5 (1 revision) (flutter/flutter#197234)
2026-11-23 [email protected] [macOS] Fix back buffer cache returning a wrong-size surface (Impeller null deref in Canvas::SetupRenderPass) (flutter/flutter#192522)
2026-11-23 [email protected] Add Settings::frame_built_callback for UI frame build timings (flutter/flutter#197213)

If this roll has caused a breakage, revert this CL and set the roller
to dry run mode using the controls here:
https://autoroll.skia.org/r/flutter-packages
Please CC [email protected],[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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CICD Run CI/CD engine flutter/engine related. See also e: labels. platform-ios iOS applications specifically team-ios Owned by iOS platform team tool Affects the "flutter" command-line tool. See also t: labels. will affect goldens Changes to golden files

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants