1012 Commits

Author SHA1 Message Date
Casey Hillers
e331048fc7 Revert "Remove GN staging flag for save layer bounds" (flutter/engine#42026)
Reverts flutter/engine#41940

See b/282115120

This caused a golden failure on Google Testing where a rectangular avatar became circular.
2023-05-14 17:01:17 +00:00
lauren n. liberda
998f826cb9 allow supplying custom gn args in gn wrapper (flutter/engine#41794)
allows to supply gn args that do not have their cli switches (yet), like this:
```sh
python3 ./tools/gn --gn-args 'use_default_linux_sysroot=false'
```

*List which issues are fixed by this PR. You must list at least one issue.*
https://github.com/flutter/flutter/issues/126197

*If you had to change anything in the [flutter/tests] repo, include a link to the migration guide as per the [breaking change policy].*

[C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
2023-05-11 20:13:50 +00:00
Michael Ludwig
c80779a479 Remove GN staging flag for save layer bounds (flutter/engine#41940)
See skbug.com/12083, skbug.com/12303.

SkCanvas::saveLayer() calls with an SkColorFilter that affects transparent black will now fill out to the bounds of the clip before the layer, which prevents leaking internal layer allocation decisions in the final rendering.

[C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
2023-05-11 19:51:48 +00:00
Michael Ludwig
3d9ad5fccb Remove staging flag (flutter/engine#41843)
Unit tests have been fixed by @flar, so the staging flag can be removed.

Unlocks progress on https://skbug.com/9283

[C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
2023-05-09 19:32:10 +00:00
godofredoc
8cd97026b0 Allow default out_dir for fuchsia symbols upload. (flutter/engine#41776)
This also allows passing target files as relative to the src folder. This is required for migrating the fuchsia builds to engine_v2.

[C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
2023-05-05 17:36:20 +00:00
Michael Ludwig
4a82a1b867 Add temporary staging GN arg for Skia roll (flutter/engine#41743)
In order to enable the new behavior, dl_imagefilter_unittests need to be
updated to reflect new bounds mapping values. This requires an atomic PR
to disable the legacy arg and update after skia rolls.

Required to land https://skia-review.googlesource.com/c/skia/+/693058
and progress on https://skbug.com/9283

## 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.
- [ ] I read and followed the [Flutter Style Guide] and the [C++,
Objective-C, Java style guides].
- [x] 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 Hixie said the PR is test-exempt. See [testing the engine]
for instructions on writing and running engine tests.
- [x] I updated/added relevant documentation (doc comments with `///`).
- [x] I signed the [CLA].
- [ ] 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
[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
2023-05-04 13:38:01 -07:00
Jackson Gardner
5189eda98b Populate fallback fonts from CIPD in tests (flutter/engine#41656)
This fixes https://github.com/flutter/flutter/issues/85793

The script that generates the font fallback data also rolls a package to CIPD with these files and updates the DEPS to download those files from CIPD. This makes sure that these tests are hermetic.
2023-05-04 05:12:54 +00:00
Ian McKellar
cc02c8d27e [fuchsia] fix run_integration_test.sh (flutter/engine#41668)
This updates the `fx serve` check to reflect the current state of
Fuchsia's package serving.
2023-05-03 09:44:37 +10:00
Tim Maffett
bebb813709 Fixes font-subset to not drop GSUB/GPOS/GDEF tables for variable fonts where they are needed Fixes #125704 (flutter/engine#41592)
This PR fixes font-subset to check to see if a font is a variable font
with variable font axes before additionally dropping the GSUB/GPOS/GDEF
tables. These tables were being forced dropped in all cases (even though
harfbuzz had been modified to always keep them). I made the change only
drop the tables for variable fonts to preserve the previous behavior in
the most possible cases.

This PR fixes
[#125704](https://github.com/flutter/flutter/issues/125704).

To see the bug (or verify it is fixed) in the live web examples below
you must select the font variations Fill->1 and Weight->100.
(See issue [#125704](https://github.com/flutter/flutter/issues/125704)
for more details).

The issue [#125704](https://github.com/flutter/flutter/issues/125704)
includes examples of the font-subset being used (and breaking) the
variable fonts, as well as example of the `--no-tree-shake-icons` being
used where the fonts do not break.

Additionally, I have created an additional [live
example](https://timmaffett.github.io/material_symbols_icons_showing_tree_shake_fixed/)
where this PR has been applied to font-subset and icon tree shaking is
still taking place.

(Example w/ icon tree-shaking using the broken font-subset for icon tree
shaking is found
[here](https://timmaffett.github.io/material_symbols_icons_showing_tree_shake_bug/)
).

In the example build output below note that the non-variable fonts
"CupertinoIcons.ttf" and "MaterialIcons-Regular.otf" have the same size
savings as before the change, but the variable fonts
"MaterialSymbolsSharp[FILL,GRAD,opsz,wght].ttf",
"MaterialSymbolsOutlined[FILL,GRAD,opsz,wght].ttf", and
"MaterialSymbolsRounded[FILL,GRAD,opsz,wght].ttf" now have a much more
reasonable saving of ~2% because every icon in the font is included in
the example. The previous extra ~30% savings was from having the GSUB
table removed. The 30% size savings for a tree-shaking for a case where
*every* icon is used in the example probably should have been suspect..
lol.

Output of build using fixed font-subset.exe [live fix
example](https://timmaffett.github.io/material_symbols_icons_showing_tree_shake_fixed/)
:
```console
flutter build web --release --web-renderer canvaskit --base-href "/material_symbols_icons_showing_tree_shake_fixed/"

Font asset "CupertinoIcons.ttf" was tree-shaken, reducing it from 283452 to 1236 bytes (99.6% reduction). Tree-shaking can be disabled by providing the
--no-tree-shake-icons flag when building your app.
Font asset "MaterialIcons-Regular.otf" was tree-shaken, reducing it from 1645184 to 10808 bytes (99.3% reduction). Tree-shaking can be disabled by providing the
--no-tree-shake-icons flag when building your app.
Font asset "MaterialSymbolsSharp[FILL,GRAD,opsz,wght].ttf" was tree-shaken, reducing it from 5848492 to 5683212 bytes (2.8% reduction). Tree-shaking can be disabled by
providing the --no-tree-shake-icons flag when building your app.
Font asset "MaterialSymbolsOutlined[FILL,GRAD,opsz,wght].ttf" was tree-shaken, reducing it from 6944756 to 6779476 bytes (2.4% reduction). Tree-shaking can be disabled
by providing the --no-tree-shake-icons flag when building your app.
Font asset "MaterialSymbolsRounded[FILL,GRAD,opsz,wght].ttf" was tree-shaken, reducing it from 9361824 to 9196544 bytes (1.8% reduction). Tree-shaking can be disabled
by providing the --no-tree-shake-icons flag when building your app.
Compiling lib\main.dart for the Web...                             79.5s
```

BEFORE font-subset fix [live bug example
here](https://timmaffett.github.io/material_symbols_icons_showing_tree_shake_bug/):
```console
flutter build web --release --web-renderer canvaskit --base-href "/material_symbols_icons_showing_tree_shake_bug/"

Font asset "CupertinoIcons.ttf" was tree-shaken, reducing it from 283452 to 1236 bytes (99.6% reduction). Tree-shaking
can be disabled by providing the --no-tree-shake-icons flag when building your app.
Font asset "MaterialSymbolsSharp[FILL,GRAD,opsz,wght].ttf" was tree-shaken, reducing it from 5848492 to 4079548 bytes
(30.2% reduction). Tree-shaking can be disabled by providing the --no-tree-shake-icons flag when building your app.
Font asset "MaterialSymbolsOutlined[FILL,GRAD,opsz,wght].ttf" was tree-shaken, reducing it from 6944756 to 4781576 bytes(31.1% reduction). Tree-shaking can be disabled by providing the --no-tree-shake-icons flag when building your app.
Font asset "MaterialIcons-Regular.otf" was tree-shaken, reducing it from 1645184 to 10808 bytes (99.3% reduction).
Tree-shaking can be disabled by providing the --no-tree-shake-icons flag when building your app.
Font asset "MaterialSymbolsRounded[FILL,GRAD,opsz,wght].ttf" was tree-shaken, reducing it from 9361824 to 6397020 bytes
(31.7% reduction). Tree-shaking can be disabled by providing the --no-tree-shake-icons flag when building your app.
Compiling lib\main.dart for the Web...                             63.8s
```
2023-05-01 13:49:41 -07:00
Jason Simmons
60f214c194 Exclude Skia's Vello directory from the license crawl (flutter/engine#41617) 2023-04-29 17:33:06 +00:00
Jason Simmons
4e818387cc Manual roll of Dart SDK from e8b86b073413 to 823a69e2a34d (flutter/engine#41614)
Requires a change to an analyzer script due to a deprecated API
2023-04-29 16:43:09 +00:00
M-A
1074fd7f89 fuchsia: do not read version_history.json (flutter/engine#41585)
Otherwise this causes GN to read JSON files that are irrelevant.

Co-authored-by: Marc-Antoine Ruel <maruel@google.com>
2023-04-28 09:54:28 -07:00
Zachary Anderson
c8c65d837a Download and use the goma client from cipd (flutter/engine#41488)
In https://github.com/flutter/flutter/issues/125361 we discovered that a
new version of clang can require updating goma in order for goma to work
properly. This PR adds a dependency on CIPD goma to the DEPS file so
that we can update it for use in local builds when needed. Since CI does
its own management of the goma client and the compiler proxy, and since
goma can only be used by Googlers, the DEPS file download is guarded
behind the `use_cipd_goma` gclient var. To use it one would update the
engine `.gclient` file to be something like:
```
~/flutter/engine/src $ cat ../.gclient
solutions = [
  {
    "managed": False,
    "name": "src/flutter",
    "url": "git@github.com:zanderso/engine.git",
    "custom_deps": {},
    "custom_vars": {
      "use_cipd_goma": True,
    },
    "deps_file": "DEPS",
    "safesync_url": "",
  },
]
```

I'll update the wiki with these instructions after this PR lands.
2023-04-26 11:30:07 -07:00
Alexander Aprelev
ee5279217a Roll dart, zlib, emscripten, tweak license script for rolled zlib (flutter/engine#41299)
Changes since last dart roll
```
1f224df52be Version 3.1.0-15.0.dev
3c284a0c95c Revert "Reland "[VM] Begin supporting Perfetto file recorder""
754aca00499 Bump github/codeql-action from 2.2.11 to 2.2.12
7c8e61104f6 Bump actions/checkout from 3.5.0 to 3.5.2
f9f1030959d (origin/base) [infra] DEPS and test dart-lang/native packages
b04b0844067 [vm/win7] Dynamically load functions for unwinding instructions.
a6ebd6fa8e9 Bump tools to 545d7e1c73ce21b8c91f638021f9d487d324a501
c4795a75508 [vm, compiler] Don't do safepoint transitions in generated code under TSAN.
2fcf9754032 Version 3.1.0-14.0.dev
393b1016292 Version 3.1.0-13.0.dev
39fc15a0b4c (origin/lkgr) [analysis_server] Add missing declaration semantic token modifier on classes/constructors
609db33dc7a Issue 51985. Quick fix to add missing pattern case to switch expression/pattern.
8fa08ae80b6 Add 'Convert to if-case statement' quick assist.
17d92f90d0b offer wildcard suggestions for destructured record fields
3149f813bbf [dartdev] Update --enable-analytics to re-enable unified analytics
eee509140dd Add dependency overrides for pkg/analyzer
3069c4f3e2b [analysis_server] Add missing "constructor" semantic token modifiers on constructor declarations
9834f87c542 [dart2js] Fix noSuchMethod override handling.
639a6f06ef9 Simplify several non-terminals to use regex-like grammar operators
f88e3bd77c5 Issue 51903. Test fixes for ParserErrorCode.VAR_AND_TYPE
f4d42303ad2 [analysis_server] Handle completion in whitespace after string values
70762f0de0e [ANTLR] Transform recursive definition of onParts to use iteration ...
453647022f6 [analysis_server] Don't fail on invalid/complex setters in LSP code completion
a565638b910 Issue 51689. Report when 'super' is used as a standalone expression, not as a receiver of an invocation.
b78d89ce0c7 Fix DynamicTypeImpl to InterfaceTypeImpl cast exception in AddTypeAnnotation, when ambiguous SetOrMapLiteral.
bd9c7a46e2b Roll zlib to 14dd4c4455602c9b71a1a89b5cafd1f4030d2e3f
18b5ecdfc99 [vm] Cleanup dead code around TypeArgumentClassFinder
9d4d48949c0 Add a top-level variable strict-inference test case
8df1b888771 [VM/Service] Create JSONBase64String class
b4aa83b0b7f [VM/Service] Rename JSONStream::AppendSerializedObject to JSONStream::AppendBytes
4cd9c9c6666 Reland "[VM] Begin supporting Perfetto file recorder"
fa3a72fa7e5 [cfe/ffi] Error on compound constructors
```
2023-04-19 04:12:20 +00:00
Chinmay Garde
0ff0e83877 Fix warning about angle_build_all being unread on Mac builds. (flutter/engine#41176) 2023-04-14 10:51:58 -07:00
Jackson Gardner
ef11c9d3ae Only set dart_include_wasm_opt when we are actually building the dart sdk. (flutter/engine#41175)
Only set `dart_include_wasm_opt` when we are actually building the dart sdk.
2023-04-14 04:08:29 +00:00
Zachary Anderson
34f107bb41 [Impeller] Fix the cmake example build. (flutter/engine#41148)
[Impeller] Fix the cmake example build.
2023-04-14 03:13:20 +00:00
Mouad Debbar
f97827234f [web] Use the right encoder flags for CanvasKit (flutter/engine#41124)
[web] Use the right encoder flags for CanvasKit
2023-04-12 21:11:05 +00:00
Jackson Gardner
28d9e0df0f Improve Wasm Debugging. (flutter/engine#41054)
Improve Wasm Debugging.
2023-04-12 00:52:04 +00:00
Chris Bracken
3bf49d72e4 Support disabling backtrace support (flutter/engine#40980)
This adds a gn flag (--backtrace, --no-backtrace) that defaults to
enabling backtraces, which drives a gn variable `enable_backtrace` which
is defaulted true for debug builds.

Backtrace collection is supported on Windows, and on POSIX-like
operating systems via execinfo.h. execinfo support exists in Android,
macOS/iOS, and in glibc and uclibc on Linux. musl libc notably does not
include execinfo support, so this provides an escape hatch to build with
backtrace_stub.cc for situations in which compile time support doesn't
exist.

Proposed as an alternative to
https://github.com/flutter/engine/pull/40958 by @selfisekai.

Issue: https://github.com/flutter/flutter/issues/124285
2023-04-06 17:21:34 -07:00
Dan Field
567701279a Exit early on invalid gn CPU argument combos for simulators (flutter/engine#40903)
Exit early on invalid gn CPU argument combos for simulators
2023-04-04 01:38:04 +00:00
Zachary Anderson
afe2be4024 Clean up gn script goma logic a bit (flutter/engine#40817) 2023-03-31 08:23:33 -07:00
Chinmay Garde
a2447839a0 [Impeller] Enable playgrounds using a runtime instead of a build time flag. (flutter/engine#40729)
[Impeller] Enable playgrounds using a runtime instead of a build time flag.
2023-03-29 06:27:22 +00:00
Michael Goderbauer
a508065bbc Reland "Post 3.0 lint sync (#40394)" (flutter/engine#40688)
Reland "Post 3.0 lint sync (#40394)"
2023-03-28 03:25:02 +00:00
Brandon DeRosier
9e9590a68f Revert "Post 3.0 lint sync (#40394)" (flutter/engine#40687)
This reverts commit 8ba209121d2671b0d202d9731fe67ec5eb1529b4.
2023-03-27 15:45:59 -07:00
Michael Goderbauer
8ba209121d Post 3.0 lint sync (flutter/engine#40394)
Post 3.0 lint sync
2023-03-27 17:15:08 +00:00
gaaclarke
142803bf72 [Impeller] Adds golden image tests. (flutter/engine#40366)
Added golden image tests to impeller
2023-03-24 16:42:28 -07:00
Jason Simmons
33f403f945 Roll HarfBuzz to version 7.1.0 (flutter/engine#40131)
Roll HarfBuzz to version 7.1.0
2023-03-21 03:10:06 +00:00
Michael Goderbauer
9258a58a33 add final class modifiers to fix dart roll (flutter/engine#40434) 2023-03-20 10:10:55 -07:00
Chinmay Garde
e2b5c56bff [Impeller] Add flags to enable the Vulkan and OpenGL ES backends. (flutter/engine#40422)
[Impeller] Add flags to enable the Vulkan and OpenGL ES backends.
2023-03-18 09:12:23 +00:00
Mouad Debbar
c7b040ec98 [web] Remove image codecs from Canvaskit Chromium (flutter/engine#40309)
[web] Remove image codecs from Canvaskit Chromium
2023-03-17 19:14:49 +00:00
Kevin Lubick
9c9d5b9b66 Use skia_enable_ganesh instead of legacy GN arg (flutter/engine#40382) 2023-03-17 11:03:10 -07:00
Michael Goderbauer
1986d84d6e replace some ._() constructors with class modifiers (flutter/engine#40328)
replace some ._() constructors with class modifiers
2023-03-17 16:18:49 +00:00
Zachary Anderson
d39891c432 Un-bitrot impeller_unittests; disable failing tests; disable non-metal backends (flutter/engine#40339) 2023-03-16 19:34:57 -07:00
Michael Goderbauer
dcc4b1b535 Reland: Bump lower Dart SDK constraints to 3.0 (flutter/engine#40318)
* WIP

Bump to 3.0.0-0

* fix lints

* drop web_ui

* opt pointer_converter.dart out of dart 3

* Revert "drop web_ui"

This reverts commit b97a015d5cd0d7e0380a4231be4c31aad36671f1.
2023-03-16 08:07:39 -07:00
Zachary Anderson
32b3e66d7c Revert "Bump lower Dart SDK constraints to 3.0 (#40178)" (flutter/engine#40317)
Revert "Bump lower Dart SDK constraints to 3.0"
2023-03-15 18:53:00 +00:00
Michael Goderbauer
828f3deb86 Bump lower Dart SDK constraints to 3.0 (flutter/engine#40178)
Bump lower Dart SDK constraints to 3.0
2023-03-15 17:57:04 +00:00
Michael Goderbauer
bd58dd7222 Bump pubspecs to unblock Dart SDK roller (flutter/engine#40297)
Bump pubspecs to unblock Dart SDK roller
2023-03-15 06:46:22 +00:00
Dan Field
91c580c261 Let local users specify malioc path via environment (flutter/engine#40256)
Let local users specify malioc path via environment
2023-03-13 22:16:24 +00:00
Zachary Anderson
46decf5844 Add GN arguments that disable building host artifacts (flutter/engine#40242) 2023-03-11 19:38:43 -08:00
Jackson Gardner
299c8369a7 Find the emsdk by relative path so that this works with the monorepo. (flutter/engine#40207)
Find the emsdk by relative path so that this works with the monorepo.
2023-03-10 14:56:21 +00:00
Jackson Gardner
e35bbd1b89 Flip this flag to false, so that in-tree builds will not attempt to (flutter/engine#40195)
Do not include wasm-opt with in-tree dart sdk build
2023-03-10 01:03:01 +00:00
Adam Perry
e9942f8f52 Reland "[fuchsia] Remove component framework v1 support. (#39732)" (flutter/engine#40198)
Previously reverted in #40104, this should now be safe to reland as
the last dependency has been deleted internally.

This reverts commit 9369c1ed1f33cfdad25ebe9cb809d6b5d6941159.
2023-03-09 15:05:45 -08:00
Adam Perry
9369c1ed1f Revert "[fuchsia] Remove component framework v1 support. (#39732)" (flutter/engine#40104)
This reverts commit 181ee0e750727f4ef54e9b8421b264a333a0bdfc.
2023-03-07 10:53:16 -08:00
LongCatIsLooong
48c413ae2f Add new test font (flutter/engine#39809)
Add new test font
2023-03-03 21:38:01 +00:00
Adam Perry
181ee0e750 [fuchsia] Remove component framework v1 support. (flutter/engine#39732)
There are no longer any CMX-based components outside of prebuilts
which are run by existing flutter runner prebuilts.
2023-03-01 20:07:03 -08:00
Jackson Gardner
a3dc9e77fb Skwasm Renderer - initial implementation (flutter/engine#39072)
Skwasm Renderer - initial implementation
2023-03-02 00:01:04 +00:00
Xilai Zhang
97d8b0a936 [gn + codesign] add metadata for path ops (flutter/engine#39698)
[gn + codesign] add metadata for path ops
2023-02-28 00:14:15 +00:00
Jackson Gardner
3d9c2fcfc9 Remove unused flag skia_canvaskit_enable_particles (flutter/engine#39925)
Remove unused flag `skia_canvaskit_enable_particles`
2023-02-27 22:21:57 +00:00
Jason Simmons
5f09e0fdf0 Remove Libtxt and Minikin (flutter/engine#39499) 2023-02-13 17:16:04 +00:00