Skip to content

[iOS] Introduce FlutterShell and move thread host and profiler - #195388

Merged
auto-submit[bot] merged 4 commits into
flutter:masterfrom
LouiseHsu:p1-1b-flutter-shell
Nov 5, 2026
Merged

auto-submit[bot] merged 4 commits into
flutter:masterfrom
LouiseHsu:p1-1b-flutter-shell

Conversation

@LouiseHsu

@LouiseHsu LouiseHsu commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

Adds FlutterShell as the shell-backed engine backend.
Part of #112232

Adds FlutterShell as the shell-backed engine backend (-[FlutterEngine backend]) and moves flutter::ThreadHost and flutter::SamplingProfiler into it.

Issue: flutter#112232

Assisted-by: Gemini
@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 Oct 27, 2026
@LouiseHsu LouiseHsu added the CICD Run CI/CD label Oct 27, 2026
@LouiseHsu
LouiseHsu marked this pull request as ready for review October 28, 2026 00:32
@LouiseHsu
LouiseHsu requested a review from a team as a code owner October 28, 2026 00:32
@LouiseHsu
LouiseHsu requested a review from cbracken October 28, 2026 00:32

@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 iOS platform engine by introducing a new FlutterShell class to encapsulate thread host and sampling profiler management, delegating these responsibilities from FlutterEngine. The review feedback identifies several robustness improvements to prevent potential crashes: adding a defensive nil check for the source shell in inheritThreadHostFromShell:, checking that _threadHost is not null before starting the profiler in non-debug builds, and asserting that the backend's thread host is valid before dereferencing it in FlutterEngine's threadHost getter.

@cbracken cbracken left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Overall this looks great. It's so nice to see all this code getting ripped out of FlutterEngine :)

Just a few nits on the test side of things.

@LouiseHsu
LouiseHsu requested a review from cbracken October 30, 2026 22:12

@cbracken cbracken left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Looks great! Ship it! 🚀

LGTM stamp from a Japanese personal seal

@LouiseHsu LouiseHsu added the autosubmit Merge PR when tree becomes green via auto submit App label Nov 5, 2026
@auto-submit
auto-submit Bot added this pull request to the merge queue Nov 5, 2026
Merged via the queue into flutter:master with commit 2082411 Nov 5, 2026
25 checks passed
@flutter-dashboard flutter-dashboard Bot removed the autosubmit Merge PR when tree becomes green via auto submit App label Nov 5, 2026
chingjun added a commit to chingjun/flutter that referenced this pull request Nov 6, 2026
…migration/phase0

PR flutter#196005 had fallen behind master (Cocoon schedules nothing for a PR
GitHub reports as unmergeable). One conflict: shell/platform/darwin/ios/
BUILD.gn, where master's flutter#195388 (FlutterShell) adds //flutter/runtime
to the iOS test deps beside the branch's availability_version_check
dep -- both kept.

Regenerated: shell/platform/darwin/ios/BUILD.bazel (FlutterShell's
sources and the runtime dep), impeller/BUILD.bazel (master re-enabled
RendererTest.CanBlitTextureToBuffer in run_tests.py's sync-validation
list), deps.lock.bzl (Skia a5aacd103e68); the pub lock is unchanged;
gclient synced; converter --check current. Checked: converter 283/283,
Bazel analysis of ci_host_debug_unopt (+tests) and of the root suites
under --config=prebuilt_engine.
auto-submit Bot pushed a commit to flutter/packages that referenced this pull request Nov 6, 2026
Roll Flutter from 3623d2d34543 to 09175cdeac89 (61 revisions)

flutter/flutter@3623d2d...09175cd

2026-11-06 [email protected] Roll Skia from ae35b7b2221f to 793b8ac73d4b (3 revisions) (flutter/flutter#196091)
2026-11-06 [email protected] [web] Rasterize scenes at the size passed to `FlutterView.render` (flutter/flutter#196052)
2026-11-06 [email protected] Roll Skia from 4aa043a81e0c to ae35b7b2221f (1 revision) (flutter/flutter#196086)
2026-11-06 [email protected] Roll Fuchsia Linux SDK from Fqe3UlLwAohsPbsCS... to KIc0XZbhLmvDpTluZ... (flutter/flutter#196085)
2026-11-06 [email protected] Allow a zero scale change in InteractiveViewer (flutter/flutter#194949)
2026-11-06 [email protected] Roll Skia from dd5c2553a856 to 4aa043a81e0c (2 revisions) (flutter/flutter#196079)
2026-11-06 [email protected] [web] Keep ImageFilter.blur bounds in equality and description (flutter/flutter#196013)
2026-11-06 [email protected] iOS: Remove unused PlatformViewIOS setup from FlutterPlatformViewsTest (flutter/flutter#196033)
2026-11-06 [email protected] Serialize LoggerTests that mutate the shared Logger (flutter/flutter#196028)
2026-11-06 [email protected] Use reverseDuration for the AnimatedCrossFade size animation (flutter/flutter#194860)
2026-11-05 [email protected] Roll Skia from a5aacd103e68 to dd5c2553a856 (8 revisions) (flutter/flutter#196073)
2026-11-05 [email protected] Fix ListWheelScrollView null check error when it reads itemIndex before content dimensions are set (flutter/flutter#194859)
2026-11-05 [email protected] Allow zero cross axis extent in SliverGridDelegateWithMaxCrossAxisExtent (flutter/flutter#194858)
2026-11-05 [email protected] Revert: Allow color delta tolerance in in-memory fuzzy image comparator (flutter/flutter#196067)
2026-11-05 [email protected] Revert: Mitigate snapshot race in 3D transform test by reducing loop density (flutter/flutter#196066)
2026-11-05 [email protected] Delegate createStream in ResizeImage and ScrollAwareImageProvider (flutter/flutter#194756)
2026-11-05 [email protected] [iOS] Introduce FlutterShell and move thread host and profiler (flutter/flutter#195388)
2026-11-05 [email protected] [web] Support FragmentShader.getImageSampler on CanvasKit and Skwasm (flutter/flutter#195854)
2026-11-05 [email protected] Deprecates setFloat API (flutter/flutter#195505)
2026-11-05 [email protected] [flutter_tools] Remove public GlobalToolContext and globals from runner (flutter/flutter#195561)
2026-11-05 [email protected] Defer TLHC PlatformViewWrapper frame post and avoid initial 1x1 buffer resize (flutter/flutter#195861)
2026-11-05 [email protected] Roll Skia from b5abed66da86 to a5aacd103e68 (17 revisions) (flutter/flutter#196054)
2026-11-05 [email protected] Made `FlutterWindowControllerSizeTest.SizedToContentNotResizable` more robust (flutter/flutter#195845)
2026-11-05 [email protected] Update docs for contributor ladder (flutter/flutter#196011)
2026-11-05 [email protected] [Impeller] Use the transfer stage for the Vulkan readback barrier (flutter/flutter#194991)
2026-11-05 [email protected] Remove Mac mac_unopt builder (flutter/flutter#196027)
2026-11-05 [email protected] Updated Instructions for Determining Gradle Version for `gradle_dists` in CIPD (flutter/flutter#193310)
2026-11-05 [email protected] Move ios_app_with_extensions_test into the tool integration shard (flutter/flutter#195609)
2026-11-05 [email protected] [web] Respect Uint8List view bounds when detecting animated WebP/GIF (flutter/flutter#196010)
2026-11-05 [email protected] Add platform_views_layout to build_tests so iOS/Android build breaks are caught in presubmit (flutter/flutter#192985)
2026-11-05 [email protected] [flutter_tools] Detect macOS TCC permission crashes and provide diagnostic guidance (flutter/flutter#192432)
2026-11-05 [email protected] Roll Packages from 670b30e to 0478162 (15 revisions) (flutter/flutter#196047)
2026-11-05 [email protected] [web] Support Skwasm rendering without bitmap capture (flutter/flutter#195103)
2026-11-05 [email protected] [flutter_tools] Reland fix for local CanvasKit asset paths on Windows (flutter/flutter#195770)
2026-11-05 [email protected] Roll Skia from f96be51af95d to b5abed66da86 (14 revisions) (flutter/flutter#196017)
2026-11-05 [email protected] Split chrome web engine test drone (flutter/flutter#195873)
2026-11-05 [email protected] Roll Dart SDK from c9153304136a to 6623b84628f3 (1 revision) (flutter/flutter#196026)
2026-11-05 [email protected] Roll ICU from 4fe960221710 to a0ea93436c52 (6 revisions) (flutter/flutter#196025)
2026-11-05 [email protected] Add more guidance in README and AGENTS for contributing to flutter_tools (flutter/flutter#195998)
2026-11-05 [email protected] Roll Fuchsia Linux SDK from p0HDXLISPIElJfSz7... to Fqe3UlLwAohsPbsCS... (flutter/flutter#196019)
2026-11-05 [email protected] Roll Dart SDK from e362a23e9738 to c9153304136a (18 revisions) (flutter/flutter#196014)
2026-11-05 [email protected] [Impeller] Fix dilation input bounds when clipping saveLayers (flutter/flutter#195652)
2026-11-05 [email protected] Add `variantOf` to the M3E migration checklist (flutter/flutter#195099)
2026-11-05 [email protected] [flutter_tools] Eliminate globals from remaining subsystem files (flutter/flutter#195555)
2026-11-05 [email protected] Fix gap flipping when dragging variable height reorderable items (flutter/flutter#194478)
2026-11-05 [email protected] [A11y] Send un-merged SemanticsNodes in the same update that first references them (flutter/flutter#195829)
...
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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants