351 Commits

Author SHA1 Message Date
Brandon DeRosier
4b87db55c6 Roll Skia to 14f8f6d984ff (flutter/engine#57068)
Resolves https://github.com/flutter/engine/pull/57068.

Set args `skia_use_libpng_decode=true` and `skia_use_rust_png_decode=false`.

https://skia.googlesource.com/skia.git/+log/e78dd0265002..14f8f6d984ff

2024-12-09 kjlubick@google.com Update GN build to allow for rust PNG decoding only
2024-12-09 lukasza@chromium.org [rust png] Update Skia => `png` dependency to version 0.17.15.
2024-12-09 kjlubick@google.com Add placeholder files for jsonreader
2024-12-09 20:29:19 +00:00
Alexander Aprelev
e05a44277f Manual roll dart to 470117150f34d712ee6d8c4558b3c656d973f656 (flutter/engine#56915)
Roll dart to 470117150f34d712ee6d8c4558b3c656d973f656

Changes since last roll

```
470117150f3 Version 3.7.0-208.0.dev
10867627709 CHANGELOG: move AOT invocation bits to the end of the 3.7 section
83863711d3b Migrate NotImportedCompletionPass.
e01bbdfd1f4 Deprecate completions from plugins api.
2a2905228fb Add extension on Completer to simplify code.
05696d50ccf Migrate postfix_completion.dart, statement_completion.dart.
ed49d04e2e0 [analysis_server] Extract some shared code from editableArguments to be used by editArgument
c54255fe9db [element model] migrate `prefer_asserts_in_initializer_lists`
eaf3912b5d6 [deps] rev core, ecosystem, glob, http_multi_server, lints, markdown, package_config, pool, protobuf, pub_semver, shelf, source_maps, source_span, stack_trace, stream_channel, string_scanner, sync_http, term_glyph, test, test_descriptor, test_process, test_reflective_loader, tools, vector_math, watcher, web, web_socket_channel, webdriver, webkit_inspection_protocol, yaml, yaml_edit
11a11259724 Switch boringssl to the pre-generated GN source list.
a635ccf2f57 [analysis_server] Only mark positional arguments as editable if they wouldn't require inserting additional values
619c8511aba [analysis_server] Add tests for formatter language version for legacy protocol
a8f5e64a330 Roll Fuchsia Test Scripts from 6FgM4KTbxxmyYoiOs... to VilXq4eGH5A24wRWA...
623c574b817 [vm] Clean up few isolate fields.
bfb507a3af9 Migrate utilities.dart
06caa3fa11e [DAS] Adds new import with show option
0197beaa8e0 [flow analysis] Remove _typeContains method.
56b6e5b9f60 Json codable no type assumption in custom fromJson
e013a4c9bfa [analysis_server] Add some notes on how to use the CPU Profiler for the analysis server hosted by VS Code
0f723b3ef3c [vm] Fix build on gcc 14.2.0.
```

This is manual roll because dart_boringssl_gen_rev is no longer present
in dart sdk DEPS has to be removed from flutter engine DEPS manually.
2024-12-04 17:03:02 +00:00
Mouad Debbar
2af8c83f84 [web] Support woff2 fonts (flutter/engine#55908)
- Enable support for WOFF2 fonts.
- Add Brotli depndency (increases CK size by ~53KB compressed, including the Brotli dictionary).
- Use split WOFF2 fonts for Emoji.
- Remove the `useColorEmoji` runtime config flag.

Partially based off of https://github.com/flutter/engine/pull/41282
Fixes https://github.com/flutter/flutter/issues/119536
Contributes to https://github.com/flutter/flutter/issues/153974 and opens the door for moving more fonts to WOFF2.
2024-10-21 13:38:22 +00:00
Brandon DeRosier
16acb8258a Remove Impeller Scene 👋 (flutter/engine#55118)
Impeller Scene has been fully rewritten as a Dart library for Flutter: https://pub.dev/packages/flutter_scene
2024-09-12 14:56:08 -07:00
Brandon DeRosier
b19fe31562 Revert "[Impeller] remove scene3d support." (flutter/engine#54502)
Reverts flutter/engine#54453

Not quite ready to remove Impeller Scene yet because I'm still porting
the animation functionality. Keeping it around allows me to switch back
and forth to compare without having to recompile the engine.

Over a month ago I said something like "we can revert this a couple of
weeks from now" in one of the Impeller meetings. But for better or worse
(better, I think), I ended up spending a ton of time trying to make the
PBR good first (which doesn't exist in this C++ version).
2024-08-12 10:28:51 -07:00
Jonah Williams
198d1f1077 [Impeller] remove scene3d support. (flutter/engine#54453)
Now that Flutter GPU is a preview, the technical debt from having an ifdef controlled additional rendering mode can be removed.
2024-08-09 16:38:56 +00:00
Zachary Anderson
93323c6d97 Don't use intel clang on arm64 macs (flutter/engine#54291)
Since gen_snapshot is lipo'd everywhere now, it should be safe to both
build with either arm64 or intel macs, and to use the arm64 native clang
toolchain on arm64 macs instead of the intel toolchain under Rosetta.

Related to https://github.com/flutter/flutter/issues/103386
2024-08-03 16:08:24 -07:00
Zachary Anderson
b8ff0f4901 Split up mac_host_engine builds (flutter/engine#53571)
This PR does a few things. Mainly it makes the builds in
mac_host_engine.json each build fewer targets to increase parallelism
for post-submit and release builds. To ensure that increasing
parallelism doesn't lead to capacity issues, this change also allows the
mac_host_engine.json builds to run on either intel or arm64 macOS hosts.
Finally, when building on an arm64 macOS host to target macOS, this PR
changes the `gn` script to ensure that the arm64 native clang toolchain
will be used.

To keep mac_host_engine.json focused on builds that produce artifacts,
this PR also moves tests from that file into the ill-named
mac_unopt.json. In a subsequent PR, I'll rename all the *_unopt.json
files to *_tests.json or something similar.

The artifacts produced by these builds are passing framework presubmit
checks in https://github.com/flutter/flutter/pull/152345.
2024-07-26 15:39:46 -07:00
Zachary Anderson
1bddf3416d [et] Better RBE defaults (flutter/engine#54059)
This PR adopts some RBE configuration from the way that chromium uses RBE

https://chromium.googlesource.com/chromium/tools/depot_tools.git/+/refs/heads/main/reclient_helper.py

These changes should bias both local and CI builds more towards using the worker pool, which we recently expanded, and should help limit the bandwidth used, which is a bottleneck for build times on a slow connection.
2024-07-24 23:15:56 +00:00
Matan Lurey
0c9f812104 Move impeller-cmake-example to flutter/third_party. (flutter/engine#53589)
... as part of buildmoot.

I _think_ this is all that is needed but am not confident.
2024-06-26 18:59:18 +00:00
Chinmay Garde
b5bc4a3868 Remove the DBC interpreter flag. (flutter/engine#53204)
Cleanup of unused flag.
2024-06-05 23:29:16 +00:00
Chinmay Garde
829947077f Remove --ios-cpu flag. Only the arm64 variant is supported. (flutter/engine#53044)
We don't support 32-bit arm iOS builds anymore. But adding the --ios-cpu=arm64 appends the "_arm" to the out subdirectory. This just causes confusion since the ios_debug_unopt is still arm64.

Just remove the flag that does nothing.
2024-05-28 22:26:16 +00:00
Chinmay Garde
4e5093707f Remove --trace-gn from ./flutter/tools/gn (flutter/engine#52964)
This flag as originally introduced to see if it made the GN step slower. It did not do so in any measurable manner and the default was flipped to true. AFAICT, no one disables and its good to have tracelogs to debug GN slowdowns. Remove the flag.
2024-05-21 19:35:46 +00:00
Chinmay Garde
d746daecc1 [Impeller] Remove unused GN flags. (flutter/engine#52962)
Removes impeller_capture, impeller_use_prebuilt_impellerc, impeller_use_prebuilt_scenec, and impeller_trace_canvas.

Also removes setting these flags from ./flutter/tools/gn.
2024-05-21 19:25:59 +00:00
Chinmay Garde
f20b17a2ae [Impeller] Prepare a SkiaGPU-less iOS build. (flutter/engine#52748)
The size of the LTO build of the engine with the dylib compressed is as follows:

```sh
$ du -k libFlutter*
5236	libFlutter.dylib.tar.gz
4324	libFlutterSlimpeller.dylib.tar.gz
```

Sizes are in KiB. This represents a binary size reduction of 17.41% of the compressed artifacts. The compression ratios will likely differ based on the compression scheme.

Uncompressed, the sizes are:

```sh
$ du -k libFlutter*
16920	libFlutter.dylib
14044	libFlutterSlimpeller.dylib
```

This represents a binary size reduction of 16.99% which is in the same ballpark.

The really mucky bit was backing out the raster cache and persistent cache. I want to clean that up in a later patch so that those TUs are part of a separate submodule.

Opting out of Impeller will lead to a fatal log at startup saying the opt-out is disallowed.

Fixes https://github.com/flutter/flutter/issues/126606
2024-05-13 21:43:47 +00:00
Zachary Anderson
a1257de605 Simplify GN pools, use in more places (flutter/engine#52721)
This PR changes from using a different GN pool for each non-compiler tool, to using one GN pool for everything.

Additionally, since we are no longer linking remotely in any configuration, this PR uses the pool for linking.

ObjC and impellerc tasks also do not (yet) run on RBE, so they are also now governed by the pool.

Needs https://github.com/flutter/buildroot/pull/856
2024-05-10 22:43:23 +00:00
Zachary Anderson
448613ae74 Remove references to goma (flutter/engine#52411)
This removes goma most places except for the arguments to the `gn`
script, which are referenced by recipes. This does not remove goma
capabilities from the GN build entirely. That requires changes in the
buildroot which have to be staged after this change.
2024-04-29 09:40:16 -07:00
Zachary Anderson
c04e13ac47 Remove goma support from impeller-cmake-example (flutter/engine#52390) 2024-04-25 10:05:23 -07:00
Kaylee Lubick
17a78534c6 [skia] Remove no-op GN flag (flutter/engine#52121)
After <https://skia-review.googlesource.com/c/skia/+/826440> this flag
does nothing.

## Pre-launch Checklist

- [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] and the [C++,
Objective-C, Java style guides].
- [ ] I listed at least one issue that this PR fixes in the description
above.
- [x] I added new tests to check the change I am making or feature I am
adding, or the PR is [test-exempt]. See [testing the engine] for
instructions on writing and running engine tests.
- [ ] I updated/added relevant documentation (doc comments with `///`).
- [x] I signed the [CLA].
- [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/wiki/Tree-hygiene#overview
[Tree Hygiene]: https://github.com/flutter/flutter/wiki/Tree-hygiene
[test-exempt]:
https://github.com/flutter/flutter/wiki/Tree-hygiene#tests
[Flutter Style Guide]:
https://github.com/flutter/flutter/wiki/Style-guide-for-Flutter-repo
[C++, Objective-C, Java style guides]:
https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
[testing the engine]:
https://github.com/flutter/flutter/wiki/Testing-the-engine
[CLA]: https://cla.developers.google.com/
[flutter/tests]: https://github.com/flutter/tests
[breaking change policy]:
https://github.com/flutter/flutter/wiki/Tree-hygiene#handling-breaking-changes
[Discord]: https://github.com/flutter/flutter/wiki/Chat
2024-04-23 07:57:59 -04:00
Jason Simmons
595f6bd256 Roll buildroot and set ios_use_simulator variable used by Skia GN scripts (flutter/engine#52101) 2024-04-15 17:54:04 +00:00
Jason Simmons
f745408809 Move the Dart SDK to //flutter/third_party/dart (flutter/engine#51917) 2024-04-09 12:48:09 +00:00
Chinmay Garde
2a07f9e53a Allow creating slimpeller engine variants. (flutter/engine#51824)
Fixes https://github.com/flutter/flutter/issues/144432
2024-04-02 20:21:53 +00:00
Jason Simmons
762d37fd2e Move //buildtools to //flutter/buildtools (flutter/engine#51526) 2024-03-21 17:06:44 +00:00
zijiehe@
1b0240f093 [Fuchsia] Remove the legacy tools/fuchsia/target_api_level file (flutter/engine#51497)
After https://github.com/flutter/buildroot/pull/839, the fuchsia_target_api_level becomes a variable in `build/config/fuchsia/gn_configs.gni`, so the target_api_level file and the related gn-args are obsolete and can be removed.

Since this change will also bring e9c4eebe21 in, add @jason-simmons as one of the reviewers.

Bug: http://b/40935282

[C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
2024-03-19 17:36:14 +00:00
Jim Graham
95ce640b6a Silence gn warning about unused Skia flag (flutter/engine#51464)
This flag was generating an unused warning when running gn. The builds
would still be created and would build fine, but the warning is noise.
2024-03-15 19:20:22 -07:00
K Lubick
14255b337b Remove always-true skia_enable_flutter_defines (flutter/engine#51423)
Now that Flutter owns the list of defines to add to Skia's build, we don't need to toggle it on or off. This allows Skia to delete the setting (https://skia-review.googlesource.com/c/skia/+/826398)

[C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
2024-03-14 18:57:20 +00:00
Matan Lurey
a954d2cfd4 Remove --enable-impeller-{backend} flags (always True). (flutter/engine#51402)
Closes https://github.com/flutter/flutter/issues/142725.
2024-03-13 22:13:29 -07:00
Jonah Williams
674874e613 [Impeller] attempt to get validation errors from CI unittests. (flutter/engine#51341)
Enables Vulkan validation layers for macOS and linux builds, enables macOS validation for macOS builds.

Fixes https://github.com/flutter/flutter/issues/144967

There may still be remaining issues with macOS validation, I need to verify I can reproduce https://github.com/flutter/flutter/issues/143324 . I plan to do that separately
2024-03-13 17:35:58 +00:00
Martin Kustermann
899fc2a7e0 Add fuchsia_gn_sdk GN variable pointing to //flutter/tools/fuchsia/gn-sdk (flutter/engine#51287)
The Dart -> Flutter Engine autoroller seems to be failing atm due to
fuchsia build errors.

The Dart SDK CL in [0] is depending on a fuchsia gn sdk import. The
import path defaults to `//third_party/fuchsia/gn-sdk` in the Dart build
rules.

Though flutter seemingly has it in `//flutter/tools/fuchsia/gn-sdk`
(which was added to DEPS in c274921fa6034e5e133129967c0789ab8c7fc827)

=> This is an attempt to override the default & fix autoroller

[0] https://dart-review.googlesource.com/c/sdk/+/355283/14
2024-03-08 14:49:37 +01:00
Zachary Anderson
0fb043e6f6 [gn] Disable running some python scripts from GN (flutter/engine#51248)
For https://github.com/flutter/flutter/issues/144430
2024-03-07 22:18:12 +00:00
Zachary Anderson
8928d5284c Folds concurrent job calculation into tools/gn (flutter/engine#51193)
Folds the `get_concurrent_jobs.py` script into `tools/gn` and stops calling it with `exec_script()` during GN.

Part of https://github.com/flutter/flutter/issues/144430
2024-03-05 17:57:14 +00:00
Zachary Anderson
1d7737e0a0 Shift git version fetching to tools/gn (flutter/engine#51175)
Avoids GN invoking python scripts that run git commands to determine git
hashes.

Part of https://github.com/flutter/flutter/issues/144430
2024-03-04 18:14:04 -08:00
Zachary Anderson
49b2bad89d Run apple SDK finders as gclient hooks (flutter/engine#50957)
Currently, these scripts run on each invocation of `gn`, and can take
many seconds to run.

This PR shifts them to run as `gclient` hooks instead, so that `gn` will
be faster.

Needs https://github.com/flutter/buildroot/pull/825.
2024-02-29 18:14:31 -08:00
Jason Simmons
e017114099 Move vulkan-deps to //flutter/third_party/vulkan-deps (flutter/engine#51013)
See https://github.com/flutter/flutter/issues/144205
2024-02-27 21:59:00 +00:00
zijiehe@
c274921fa6 [Fuchsia] Use shared gn-sdk from chromium (flutter/engine#50855)
Fuchsia team is working on getting rid of non-versioned libraries and sysroot (see b/40935282), but flutter is using a fairly old version of in-house gn-sdk. It's hard to maintain it anymore.
So this change removes the in-house gn-sdk and replaces it with the gn-sdk from chromium.
This is a prerequisite to select the idk / sdk lib version according to the api-level.

This change contains three parts:
1) Replacing gn-sdk/ with gn-sdk/src/ since the chromium needs a README.chromium in gn-sdk/ folder.
2) Making the existing build rules work with the newer gn-sdk.
3) Drive-by replacing "gtest_runner.shard.cml" with "sys/testing/gtest_runner.shard.cml", it's in fuchsia sdk already.

Bug: [b/40935282](https://issues.chromium.org/issues/40935282?pli=1&authuser=0)

[C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
2024-02-27 17:30:05 +00:00
Zachary Anderson
6ebbce07e7 Make global builds uniquely named per platform (flutter/engine#50764)
This is expected to help with
https://github.com/flutter/flutter/issues/132807
2024-02-20 19:41:40 -08:00
Zachary Anderson
72f4969bfc Initializes RBE in the build config runner (flutter/engine#50543)
Unlike Goma, the local RBE server must be manually started and stopped
between each `ninja` build.

This PR adds the startup and shutdown before and after `ninja` is run in
the build config runner. It also removes the RBE startup logic from the
`gn` script, which was the wrong place for it since there was no
opportunity for it to shutdown the service. Removing this logic from the
`gn` script will not affect CI since the recipes already do the right
startup and shutdown, and logic in the `gn` script skipped the now
deleted section of code.
2024-02-12 09:37:37 -08:00
Chinmay Garde
ecebcc1704 [Impeller] Add --enable-impeller-vulkan-playgrounds to ./flutter/tools/gn (flutter/engine#50477)
One has to manually `gn args` to add this flag (usually on macOS) now.
2024-02-09 22:44:34 +00:00
Zachary Anderson
3874808898 Make .style.yapf and .pylintrc agree on line length (flutter/engine#50510)
For https://github.com/flutter/flutter/issues/143243

yapf and pylint check different things, but occasionally overlap. I
think we'll just have to make them agree when we catch them fighting.
2024-02-09 14:07:57 -08:00
Zachary Anderson
f1a490179b Supports building with RBE on a Windows host. (flutter/engine#49877)
Requires https://github.com/flutter/buildroot/pull/820
2024-02-09 09:22:22 -08:00
Jason Simmons
d174418e2f Remove the skia_fontmgr_factory argument from the Web GN configuration (flutter/engine#50183)
This was removed in Skia (see https://skia.googlesource.com/skia/+/38e85e85079f4140158a8f83c7bbceb7a1ac5ca5)
2024-02-02 22:30:18 +00:00
gaaclarke
c35dbe26fc [Impeller] implemented golden image tests for opengles (flutter/engine#50146)
fixes https://github.com/flutter/flutter/issues/142354

This sets up impeller_golden_tests to run with ANGLE.

[C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
2024-01-31 20:49:40 +00:00
John Stiles
cd6d342e31 Use top-level GN arg for Skottie instead of CanvasKit-specific arg. (flutter/engine#50019)
The GN flag `skia_canvaskit_enable_skottie` is being retired at http://review.skia.org/805336
2024-01-25 03:43:05 +00:00
Zachary Anderson
74eb0981de Relands: Refactors RBE support (flutter/engine#49660)
Relands https://github.com/flutter/engine/pull/49416
2024-01-12 13:25:58 -08:00
auto-submit[bot]
956b0034c5 Reverts "Refactors RBE support" (flutter/engine#49654)
Reverts flutter/engine#49416
Initiated by: zanderso
This change reverts the following previous change:
Original Description:
This PR refactors the RBE build and adds support for mac-hosted builds to use RBE. In particular, configurations files are downloaded from flutter-internal CIPD instead of being included in the repo. The download from CIPD is triggered by the presence of the `use_rbe` flag as a custom var in the `.gclient` file.

This PR also turns on RBE for Linux and macOS builds that do not produce artifacts.

https://github.com/flutter/buildroot/pull/807
2024-01-09 23:34:24 +00:00
Zachary Anderson
8684cf418a Refactors RBE support (flutter/engine#49416)
This PR refactors the RBE build and adds support for mac-hosted builds
to use RBE. In particular, configurations files are downloaded from
flutter-internal CIPD instead of being included in the repo. The
download from CIPD is triggered by the presence of the `use_rbe` flag as
a custom var in the `.gclient` file.

This PR also turns on RBE for Linux and macOS builds that do not produce
artifacts.

https://github.com/flutter/buildroot/pull/807
2024-01-09 14:38:57 -08:00
Zachary Anderson
e24e3b5746 Don't use Skia BUILD.gn files (flutter/engine#47677)
The new `BUILD.gn` files in the Engine tree can't go under
`build/secondary` because Skia still has its own, and they'd be selected
first. So, this PR puts the new `BUILD.gn` files under `flutter/skia`.
2023-11-07 11:12:29 -08:00
Zachary Anderson
70ba5c45fb Reland: Remove the frontend server wrapper (flutter/engine#47010)
Relands https://github.com/flutter/engine/pull/46440 with https://github.com/flutter/engine/pull/46842
2023-10-18 20:32:37 +00:00
Zachary Anderson
35f53fe500 Revert "Remove the frontend server wrapper" (flutter/engine#46863)
Reverts flutter/engine#46440

For b/305121780
2023-10-12 20:42:35 -07:00
Zachary Anderson
23b6f6116f Remove the frontend server wrapper (flutter/engine#46440)
Instead, this PR copies the frontend server from the Dart SDK (whether prebuilt or not) into the location expected by internal engine tests and artifact construction. This PR also consolidates the three GN templates that invoked the frontend server down to one.

Framework presubs: https://github.com/flutter/flutter/pull/135836

Related: https://github.com/flutter/flutter/issues/60007
2023-10-12 15:40:50 +00:00