Skip to content

Conversation

@harryterkelsen
Copy link
Contributor

Fixes the debug build for CanvasKit.

NOTE: We need to build the debug WASM build with -O1 because building with -O0 causes Emscripten to produce a binary that is rejected by Chrome for having functions with too many local variables. Building with -O1 optimizes those locals out.

Pre-launch Checklist

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

@flutter-dashboard
Copy link

It looks like this pull request may not have tests. Please make sure to add tests before merging. If you need an exemption, contact "@test-exemption-reviewer" in the #hackers channel in Discord (don't just cc them here, they won't see it!).

If you are not sure if you need tests, consider this rule of thumb: the purpose of a test is to make sure someone doesn't accidentally revert the fix. Ask yourself, is there anything in your PR that you feel it is important we not accidentally revert back to how it was before your fix?

Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing. The test exemption team is a small volunteer group, so all reviewers should feel empowered to ask for tests, without delegating that responsibility entirely to the test exemption group.

@github-actions github-actions bot added the engine flutter/engine related. See also e: labels. label Jan 24, 2025
Copy link
Contributor

@eyebrowsoffire eyebrowsoffire left a comment

Choose a reason for hiding this comment

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

LGTM. I had a question about some of the flags though.

@harryterkelsen harryterkelsen added this pull request to the merge queue Jan 27, 2025
Merged via the queue into flutter:master with commit 6b8ead4 Jan 27, 2025
173 checks passed
@harryterkelsen harryterkelsen deleted the canvaskit-debug-build branch January 27, 2025 18:58
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Jan 28, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Jan 28, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Jan 28, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Jan 29, 2025
auto-submit bot pushed a commit to flutter/packages that referenced this pull request Jan 30, 2025
Roll Flutter from c1ffaa9 to b007899 (43 revisions)

flutter/flutter@c1ffaa9...b007899

2025-01-29 [email protected] Fix `Tab` linear and elastic animation blink (flutter/flutter#162315)
2025-01-29 [email protected] Pass-through `textInputAction` in `DropdownMenu` (flutter/flutter#162309)
2025-01-29 [email protected] Fix scrollUntilVisible in WidgetTester (flutter/flutter#159582)
2025-01-29 [email protected] Pass-through `maxLines` in `DropdownMenu` (flutter/flutter#161903)
2025-01-29 [email protected] fix: appbar leading width is not square for custom toolbar height (flutter/flutter#161880)
2025-01-29 [email protected] [DisplayList] Don't call Skia Ganesh methods when its not available. (flutter/flutter#162345)
2025-01-29 [email protected] Update README.md to include googler post verification steps (flutter/flutter#162272)
2025-01-29 [email protected] [engine, web] return switch expressions in many places (flutter/flutter#162336)
2025-01-29 [email protected] Update README.md to not have engine link for android (flutter/flutter#162330)
2025-01-29 [email protected] Reland "[ Widget Previews ] Add support for detecting previews and generating code (#161911)"" (flutter/flutter#162337)
2025-01-29 [email protected] Add instructions to download the Gradle wrapper to FGP readme, and add to gitignore (flutter/flutter#162332)
2025-01-29 [email protected] Fix tests to prepare for `--explicit-package-dependencies` and a bug. (flutter/flutter#162289)
2025-01-29 [email protected] Add a currently unused `runs_in_merge_queue` property to `Linux analyze`. (flutter/flutter#162335)
2025-01-28 98614782+auto-submit[bot]@users.noreply.github.com Reverts "[ Widget Previews ] Add support for detecting previews and generating code (#161911)" (flutter/flutter#162327)
2025-01-28 [email protected] Support hot restart for DDC library bundle format (flutter/flutter#162123)
2025-01-28 [email protected] Started adjusting uvs to match pixel snapping. (flutter/flutter#162049)
2025-01-28 [email protected] Refactor code inside flutter.groovy  (flutter/flutter#160250)
2025-01-28 [email protected] Table implements redepth (flutter/flutter#162282)
2025-01-28 [email protected] [ Widget Previews ] Add support for detecting previews and generating code (flutter/flutter#161911)
2025-01-28 [email protected] remove dependency on `Usage` from `Pub` class (flutter/flutter#162279)
2025-01-28 [email protected] Roll Packages from 258f6dc to 02c6fef (6 revisions) (flutter/flutter#162313)
2025-01-28 [email protected] Remove `scenario_app/android` and rename to `ios_scenario_app`. (flutter/flutter#160992)
2025-01-28 [email protected] Apparently it is illegal to use `stderr` in this project. (flutter/flutter#162294)
2025-01-28 [email protected] Fix update_engine_version_test in presence of FLUTTER_PREBUILT_ENGINE_VERSION env vars. (flutter/flutter#162270)
2025-01-28 [email protected] Add missing `properties: ...` and move to presubmit. (flutter/flutter#162170)
2025-01-27 [email protected] [Impeller] make swapchain related external fence/semaphore extensions optional. (flutter/flutter#162205)
2025-01-27 49699333+dependabot[bot]@users.noreply.github.com Bump the all-github-actions group with 2 updates (flutter/flutter#162277)
2025-01-27 [email protected] Don't depend on Dart from FML. (flutter/flutter#162271)
2025-01-27 [email protected] [DisplayList] Move nested canvas enums into their own TU. (flutter/flutter#162037)
2025-01-27 [email protected] Avoid iOS text selection crash by returning nil range (flutter/flutter#161996)
2025-01-27 [email protected] fix `felt` link to point to flutter repo instead of the engine repo (flutter/flutter#161423)
2025-01-27 [email protected] Enable the Android Engine OpenGLES/Vulkan suites. (flutter/flutter#162258)
2025-01-27 [email protected] [canvaskit] Fix debug build for CanvasKit (flutter/flutter#162198)
2025-01-27 [email protected] Roll Packages from 3d3ab7b to 258f6dc (19 revisions) (flutter/flutter#162254)
2025-01-25 [email protected] Pin `customer_testing` to the SHA specified in `tests.version` (flutter/flutter#162048)
2025-01-25 [email protected] Formalize `update_engine_version.{sh|ps1}`. (flutter/flutter#162118)
2025-01-25 [email protected] Rename 'SelectionChangedCause.scribble' to 'SelectionChangedCause.stylusHandwriting' (flutter/flutter#161518)
2025-01-25 [email protected] Don't install xcode when doing `local_engine` web builds on mac. (flutter/flutter#162164)
2025-01-25 [email protected] Force Impeller backend for `android_engine_test`, and test both OpenGLES and Vulkan (flutter/flutter#162089)
2025-01-24 [email protected] [Impeller] when a command pool has many unused buffers, reset with release resources flag. (flutter/flutter#162171)
2025-01-24 [email protected] [web] Remove HTML renderer from framework tests (flutter/flutter#162038)
2025-01-24 [email protected] [Impeller] Skip clip entity replay that cannot impact current clip. (flutter/flutter#162113)
2025-01-24 [email protected] Update Android integration test package for newer AGP (flutter/flutter#161856)

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
...
@harryterkelsen harryterkelsen added the cp: stable cherry pick this pull request to stable release candidate branch label Feb 27, 2025
@flutteractionsbot
Copy link

Failed to create CP due to merge conflicts.
You will need to create the PR manually. See the cherrypick wiki for more info.

harryterkelsen added a commit to harryterkelsen/flutter that referenced this pull request Feb 27, 2025
Fixes the debug build for CanvasKit.

NOTE: We need to build the debug WASM build with `-O1` because building
with `-O0` causes Emscripten to produce a binary that is rejected by
Chrome for having functions with too many local variables. Building with
`-O1` optimizes those locals out.

- [x] I read the [Contributor Guide] and followed the process outlined
there for submitting PRs.
- [x] I read the [Tree Hygiene] wiki page, which explains my
responsibilities.
- [x] I read and followed the [Flutter Style Guide], including [Features
we expect every widget to implement].
- [x] I signed the [CLA].
- [x] I listed at least one issue that this PR fixes in the description
above.
- [x] I updated/added relevant documentation (doc comments with `///`).
- [x] I added new tests to check the change I am making, or this PR is
[test-exempt].
- [x] I followed the [breaking change policy] and added [Data Driven
Fixes] where supported.
- [x] All existing and new tests are passing.

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

<!-- Links -->
[Contributor Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#overview
[Tree Hygiene]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md
[test-exempt]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#tests
[Flutter Style Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md
[Features we expect every widget to implement]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md#features-we-expect-every-widget-to-implement
[CLA]: https://cla.developers.google.com/
[flutter/tests]: https://github.com/flutter/tests
[breaking change policy]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#handling-breaking-changes
[Discord]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Chat.md
[Data Driven Fixes]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Data-driven-Fixes.md
auto-submit bot pushed a commit that referenced this pull request Mar 7, 2025
…wnload (#164341)

## Stable Cherry Pick

Cherry-picks #162198 to stable to fix issue with double-downloading CanvasKit. 

Fixes #163250

Impacted Users: All Flutter Web users
Impact Description: `canvaskit.wasm` (a roughly 5 MB download) is double-downloaded. While some browsers may retrieve the second request from the cache, not all do.
Workaround: None
Risk: Low (a small change to the BUILD flags for CanvasKit that prevents `canvaskit.wasm` from being downloaded twice)
Test Coverage: We don't have a test that checks how many requests there are for `canvaskit.wasm`
Validation Steps: Build and run any Flutter Web app and check the network requests to see that `canvaskit.wasm` is only requested once.
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
androidseb pushed a commit to androidseb/packages that referenced this pull request Jun 8, 2025
Roll Flutter from c1ffaa9 to b007899 (43 revisions)

flutter/flutter@c1ffaa9...b007899

2025-01-29 [email protected] Fix `Tab` linear and elastic animation blink (flutter/flutter#162315)
2025-01-29 [email protected] Pass-through `textInputAction` in `DropdownMenu` (flutter/flutter#162309)
2025-01-29 [email protected] Fix scrollUntilVisible in WidgetTester (flutter/flutter#159582)
2025-01-29 [email protected] Pass-through `maxLines` in `DropdownMenu` (flutter/flutter#161903)
2025-01-29 [email protected] fix: appbar leading width is not square for custom toolbar height (flutter/flutter#161880)
2025-01-29 [email protected] [DisplayList] Don't call Skia Ganesh methods when its not available. (flutter/flutter#162345)
2025-01-29 [email protected] Update README.md to include googler post verification steps (flutter/flutter#162272)
2025-01-29 [email protected] [engine, web] return switch expressions in many places (flutter/flutter#162336)
2025-01-29 [email protected] Update README.md to not have engine link for android (flutter/flutter#162330)
2025-01-29 [email protected] Reland "[ Widget Previews ] Add support for detecting previews and generating code (#161911)"" (flutter/flutter#162337)
2025-01-29 [email protected] Add instructions to download the Gradle wrapper to FGP readme, and add to gitignore (flutter/flutter#162332)
2025-01-29 [email protected] Fix tests to prepare for `--explicit-package-dependencies` and a bug. (flutter/flutter#162289)
2025-01-29 [email protected] Add a currently unused `runs_in_merge_queue` property to `Linux analyze`. (flutter/flutter#162335)
2025-01-28 98614782+auto-submit[bot]@users.noreply.github.com Reverts "[ Widget Previews ] Add support for detecting previews and generating code (#161911)" (flutter/flutter#162327)
2025-01-28 [email protected] Support hot restart for DDC library bundle format (flutter/flutter#162123)
2025-01-28 [email protected] Started adjusting uvs to match pixel snapping. (flutter/flutter#162049)
2025-01-28 [email protected] Refactor code inside flutter.groovy  (flutter/flutter#160250)
2025-01-28 [email protected] Table implements redepth (flutter/flutter#162282)
2025-01-28 [email protected] [ Widget Previews ] Add support for detecting previews and generating code (flutter/flutter#161911)
2025-01-28 [email protected] remove dependency on `Usage` from `Pub` class (flutter/flutter#162279)
2025-01-28 [email protected] Roll Packages from 258f6dc to 02c6fef (6 revisions) (flutter/flutter#162313)
2025-01-28 [email protected] Remove `scenario_app/android` and rename to `ios_scenario_app`. (flutter/flutter#160992)
2025-01-28 [email protected] Apparently it is illegal to use `stderr` in this project. (flutter/flutter#162294)
2025-01-28 [email protected] Fix update_engine_version_test in presence of FLUTTER_PREBUILT_ENGINE_VERSION env vars. (flutter/flutter#162270)
2025-01-28 [email protected] Add missing `properties: ...` and move to presubmit. (flutter/flutter#162170)
2025-01-27 [email protected] [Impeller] make swapchain related external fence/semaphore extensions optional. (flutter/flutter#162205)
2025-01-27 49699333+dependabot[bot]@users.noreply.github.com Bump the all-github-actions group with 2 updates (flutter/flutter#162277)
2025-01-27 [email protected] Don't depend on Dart from FML. (flutter/flutter#162271)
2025-01-27 [email protected] [DisplayList] Move nested canvas enums into their own TU. (flutter/flutter#162037)
2025-01-27 [email protected] Avoid iOS text selection crash by returning nil range (flutter/flutter#161996)
2025-01-27 [email protected] fix `felt` link to point to flutter repo instead of the engine repo (flutter/flutter#161423)
2025-01-27 [email protected] Enable the Android Engine OpenGLES/Vulkan suites. (flutter/flutter#162258)
2025-01-27 [email protected] [canvaskit] Fix debug build for CanvasKit (flutter/flutter#162198)
2025-01-27 [email protected] Roll Packages from 3d3ab7b to 258f6dc (19 revisions) (flutter/flutter#162254)
2025-01-25 [email protected] Pin `customer_testing` to the SHA specified in `tests.version` (flutter/flutter#162048)
2025-01-25 [email protected] Formalize `update_engine_version.{sh|ps1}`. (flutter/flutter#162118)
2025-01-25 [email protected] Rename 'SelectionChangedCause.scribble' to 'SelectionChangedCause.stylusHandwriting' (flutter/flutter#161518)
2025-01-25 [email protected] Don't install xcode when doing `local_engine` web builds on mac. (flutter/flutter#162164)
2025-01-25 [email protected] Force Impeller backend for `android_engine_test`, and test both OpenGLES and Vulkan (flutter/flutter#162089)
2025-01-24 [email protected] [Impeller] when a command pool has many unused buffers, reset with release resources flag. (flutter/flutter#162171)
2025-01-24 [email protected] [web] Remove HTML renderer from framework tests (flutter/flutter#162038)
2025-01-24 [email protected] [Impeller] Skip clip entity replay that cannot impact current clip. (flutter/flutter#162113)
2025-01-24 [email protected] Update Android integration test package for newer AGP (flutter/flutter#161856)

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
...
FMorschel pushed a commit to FMorschel/packages that referenced this pull request Jun 9, 2025
Roll Flutter from c1ffaa9 to b007899 (43 revisions)

flutter/flutter@c1ffaa9...b007899

2025-01-29 [email protected] Fix `Tab` linear and elastic animation blink (flutter/flutter#162315)
2025-01-29 [email protected] Pass-through `textInputAction` in `DropdownMenu` (flutter/flutter#162309)
2025-01-29 [email protected] Fix scrollUntilVisible in WidgetTester (flutter/flutter#159582)
2025-01-29 [email protected] Pass-through `maxLines` in `DropdownMenu` (flutter/flutter#161903)
2025-01-29 [email protected] fix: appbar leading width is not square for custom toolbar height (flutter/flutter#161880)
2025-01-29 [email protected] [DisplayList] Don't call Skia Ganesh methods when its not available. (flutter/flutter#162345)
2025-01-29 [email protected] Update README.md to include googler post verification steps (flutter/flutter#162272)
2025-01-29 [email protected] [engine, web] return switch expressions in many places (flutter/flutter#162336)
2025-01-29 [email protected] Update README.md to not have engine link for android (flutter/flutter#162330)
2025-01-29 [email protected] Reland "[ Widget Previews ] Add support for detecting previews and generating code (#161911)"" (flutter/flutter#162337)
2025-01-29 [email protected] Add instructions to download the Gradle wrapper to FGP readme, and add to gitignore (flutter/flutter#162332)
2025-01-29 [email protected] Fix tests to prepare for `--explicit-package-dependencies` and a bug. (flutter/flutter#162289)
2025-01-29 [email protected] Add a currently unused `runs_in_merge_queue` property to `Linux analyze`. (flutter/flutter#162335)
2025-01-28 98614782+auto-submit[bot]@users.noreply.github.com Reverts "[ Widget Previews ] Add support for detecting previews and generating code (#161911)" (flutter/flutter#162327)
2025-01-28 [email protected] Support hot restart for DDC library bundle format (flutter/flutter#162123)
2025-01-28 [email protected] Started adjusting uvs to match pixel snapping. (flutter/flutter#162049)
2025-01-28 [email protected] Refactor code inside flutter.groovy  (flutter/flutter#160250)
2025-01-28 [email protected] Table implements redepth (flutter/flutter#162282)
2025-01-28 [email protected] [ Widget Previews ] Add support for detecting previews and generating code (flutter/flutter#161911)
2025-01-28 [email protected] remove dependency on `Usage` from `Pub` class (flutter/flutter#162279)
2025-01-28 [email protected] Roll Packages from 258f6dc to 02c6fef (6 revisions) (flutter/flutter#162313)
2025-01-28 [email protected] Remove `scenario_app/android` and rename to `ios_scenario_app`. (flutter/flutter#160992)
2025-01-28 [email protected] Apparently it is illegal to use `stderr` in this project. (flutter/flutter#162294)
2025-01-28 [email protected] Fix update_engine_version_test in presence of FLUTTER_PREBUILT_ENGINE_VERSION env vars. (flutter/flutter#162270)
2025-01-28 [email protected] Add missing `properties: ...` and move to presubmit. (flutter/flutter#162170)
2025-01-27 [email protected] [Impeller] make swapchain related external fence/semaphore extensions optional. (flutter/flutter#162205)
2025-01-27 49699333+dependabot[bot]@users.noreply.github.com Bump the all-github-actions group with 2 updates (flutter/flutter#162277)
2025-01-27 [email protected] Don't depend on Dart from FML. (flutter/flutter#162271)
2025-01-27 [email protected] [DisplayList] Move nested canvas enums into their own TU. (flutter/flutter#162037)
2025-01-27 [email protected] Avoid iOS text selection crash by returning nil range (flutter/flutter#161996)
2025-01-27 [email protected] fix `felt` link to point to flutter repo instead of the engine repo (flutter/flutter#161423)
2025-01-27 [email protected] Enable the Android Engine OpenGLES/Vulkan suites. (flutter/flutter#162258)
2025-01-27 [email protected] [canvaskit] Fix debug build for CanvasKit (flutter/flutter#162198)
2025-01-27 [email protected] Roll Packages from 3d3ab7b to 258f6dc (19 revisions) (flutter/flutter#162254)
2025-01-25 [email protected] Pin `customer_testing` to the SHA specified in `tests.version` (flutter/flutter#162048)
2025-01-25 [email protected] Formalize `update_engine_version.{sh|ps1}`. (flutter/flutter#162118)
2025-01-25 [email protected] Rename 'SelectionChangedCause.scribble' to 'SelectionChangedCause.stylusHandwriting' (flutter/flutter#161518)
2025-01-25 [email protected] Don't install xcode when doing `local_engine` web builds on mac. (flutter/flutter#162164)
2025-01-25 [email protected] Force Impeller backend for `android_engine_test`, and test both OpenGLES and Vulkan (flutter/flutter#162089)
2025-01-24 [email protected] [Impeller] when a command pool has many unused buffers, reset with release resources flag. (flutter/flutter#162171)
2025-01-24 [email protected] [web] Remove HTML renderer from framework tests (flutter/flutter#162038)
2025-01-24 [email protected] [Impeller] Skip clip entity replay that cannot impact current clip. (flutter/flutter#162113)
2025-01-24 [email protected] Update Android integration test package for newer AGP (flutter/flutter#161856)

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cp: stable cherry pick this pull request to stable release candidate branch engine flutter/engine related. See also e: labels.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants