417 Commits

Author SHA1 Message Date
Kate Lovett
285a6acf76 Bump goldctl (flutter/engine#47391)
Related to https://github.com/flutter/flutter/issues/137177

[C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
2023-10-31 16:45:14 +00:00
Nate Bosch
fbb4b6abd9 Update to the latest package:test (flutter/engine#46592)
- Update the pinned version of `test` to the latest published.
- Add support for reading the `source.location` of messages to the JS
  interop library.
- Update `host.dart` to support the new communication pattern with the
  test frame. See https://github.com/dart-lang/test/issues/2065
- Use `Runtime.edge` for the edge browser. We may deprecate or remove
  the constant. Edge is a more appropriate value for this usage.
2023-10-23 19:08:10 +00:00
Victoria Ashworth
ebe2cf39ca Only run web mac tests on macOS 12 (flutter/engine#46965)
Web Mac tests currently fail on macOS 13 (https://github.com/flutter/flutter/issues/136274, https://github.com/flutter/flutter/issues/136279) so we limit CI to only run on macOS 12.

[C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
2023-10-17 14:59:05 +00:00
skia-flutter-autoroll
b5701a2d66 Manual roll Dart SDK from c8143a7c026f to 5844b34768ce (1 revision) (flutter/engine#46909)
Manual roll requested by jacksongardner@google.com

https://dart.googlesource.com/sdk.git/+log/c8143a7c026f..5844b34768ce

2023-10-13 dart-internal-merge@dart-ci-internal.iam.gserviceaccount.com Version 3.3.0-25.0.dev

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/dart-sdk-flutter-engine
Please CC dart-vm-team@google.com,jacksongardner@google.com,jsimmons@google.com on the revert to ensure that a human
is aware of the problem.

To file a bug in Flutter Engine: 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
2023-10-13 21:36:36 +00:00
Jackson Gardner
99de03845c Switch to Chrome For Testing instead of Chromium (flutter/engine#46683)
This switches over to using Chrome for Testing instead of Chromium. This requires some changes from the recipes repo (https://flutter-review.googlesource.com/c/recipes/+/51482) in order to coordinate the change in filestructure on the mac versions.
2023-10-11 21:24:11 +00:00
Daniel Chevalier
94df47fedc [web] Adds Noto Music fallback font (flutter/engine#46720)
Adds `Noto Music` font as a fallback font, and updates DEPS and font definitions after running the font roller script.

### Issues

Fixes: https://github.com/flutter/devtools/issues/6149

----

![](https://media.giphy.com/media/3ohzAv6kdQ4tukSNK8/giphy-downsized.gif)

I used [the developer API](https://developers.google.com/fonts/docs/developer_api?apix_params=%7B%22family%22%3A%5B%22Noto%20Music%22%5D%7D) to make sure the api works with this font.

[C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
2023-10-11 20:46:16 +00:00
Zachary Anderson
0a20e6f0f6 Roll goldctl forward (flutter/engine#46771)
For https://github.com/flutter/flutter/issues/135620
2023-10-11 16:10:05 +00:00
Jackson Gardner
2c58573690 Use dart:_wasm constructs to avoid dependence on WebAssembly.Function (flutter/engine#46388)
Use the newly exposed functionality in `dart:_wasm` to fix up two different hacks we have:
1) When creating an image from an image source, use `wasm:import` instead of `@Native` and pass the image source directly as an externref. (Direct wasm binding instead of a JS interop shim, yay).
2) When binding the surface callback, previously we were wrapping the callback in a JS function, and then using `WebAssembly.Function` to create a wasm function wrapper around that. Now, we can create a `WasmFuncRef` that is a direct reference to a dart function and pass that over. Now there are no intermediary JavaScript layers when skwasm calls back to us, and we no longer are dependent on the type reflection flag in Chrome.

This fixes https://github.com/flutter/flutter/issues/134556
2023-09-29 20:52:36 +00:00
Jackson Gardner
7f3c15c543 Update CI to Chrome 117 (flutter/engine#45842) 2023-09-19 16:27:49 +00:00
Michael Goderbauer
efc22ee283 Enable private field promotion (flutter/engine#45722)
New feature in upcoming Dart 3.2. See https://github.com/dart-lang/language/issues/2020. Feature is enabled by bumping the min SDK version to 3.2.

Part of https://github.com/flutter/flutter/issues/134476.
2023-09-14 21:02:03 +00:00
godofredoc
c9ce9f7fd5 Update webdriver imports. (flutter/engine#45816)
This is to be able to update the webdriver dependency.

[C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
2023-09-14 18:26:42 +00:00
Stephen Adams
182847ec84 [web] More efficient fallback font selection (flutter/engine#44526)
The PR improves the code size and runtime performance of fallback font selection.

### Performance improvements

Initialization of the data structures to support fallback font selection has been moved from creating the FallbackFontManager (first frame) to the first use, i.e. the first frame actually needing a fallback font.

The numbers reported below are for a lightly edited version of the counter demo that appends to the counter about ~300 missing code points that need ~25 fallback fonts to cover the missing code points. Timings taken from a few profiles on my performance workstation.

|  |  Before | After  | 
| --- | ---: | ---: |
| FallbackFontManager() |~100ms | <2ms |
| First need | 0ms | 12ms |
| Subsequent need | 20-30ms | <1ms |

### Size improvements

|  |  Before | After  | Δ |
| --- | ---: | ---: | ---: |
| main.dart.js | 1586405 | 1477319 | -109086 (-6.87%) |
| brotli -9 | 427304 | 401611 | -25693 (-6.01%) |

### Algorithm notes

#### Startup

The old algorithm built an interval tree from the code point ranges of the ~140 fallback fonts and uses the interval tree to build a list of fonts that support each missing code point. The new algorithm uses a binary search map that directly produces the list of fonts. There are fewer binary search ranges (~22k) than the aggregate ranges for all the fonts (~26k).
Most of the startup time gain comes from using a data unpacks directly into a useful form rather than needing processing to build an interval tree (~12ms vs ~100ms).

#### Running

The runtime for font selection is greatly improved for several reasons

- The code point space is partitioned into components so that code point counting can be batched.
- When a font is selected, the counts are updated incrementally rather than being recomputed.
- The counts are held in fields of the NotoFont and component objects rather than in Maps or Sets.

Batching, incremental update and avoiding hash tables are roughly multiplicative in effect.

## Issues

- https://github.com/flutter/flutter/issues/131440

*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-08-31 22:42:20 +00:00
Jackson Gardner
69b2747ca3 Skwasm platform views (flutter/engine#43011)
This implements platform views in Skwasm. There are a number of substantial changes rolled up in this change, including:
* Reworked the rendering system to use multiple canvases with a single WebGL context, via ImageBitmap rendering.
* Reworked our object management and bindings to use the `__externref_t` construct in C code.
* Upgraded emscripten to a much newer version
* Generified skwasm's scene builder to be able to work with any renderer that can produce `ImageBitmap` objects from Pictures, and whose `Canvas`, `Picture` and `ImageFilter` objects conform to `SceneCanvas`/`ScenePicture`/`SceneImageFilter`

For platform views themselves, most stuff is implemented except for clipping. I plan on doing that in a subsequent change.
2023-08-28 16:29:14 +00:00
Ian Hickson
9881f4846b Make web tests start with an empty title (flutter/engine#43846)
Fixes https://github.com/flutter/flutter/issues/39159
2023-08-23 03:22:59 +00:00
Matan Lurey
ee235383f8 Update web_ui/** to explicitly pass --local-engine-host to the flutter tool. (flutter/engine#44613)
Partial work towards https://github.com/flutter/flutter/issues/132245.
2023-08-14 21:09:22 +00:00
Mouad Debbar
dc0147d3d3 [web] Silence pub get when it's successful (flutter/engine#44445)
In the spirit of keeping the happy path's output as clean as possible, let's hide the many lines printed by `pub get` even when it's successful.

If `pub get` fails, its output will be printed on the terminal.
2023-08-07 22:38:03 +00:00
Jackson Gardner
12c34f4b33 Roll Chrome to 115 (flutter/engine#44076)
Update the version of Chrome we use for unit tests to 115.
2023-07-28 15:03:05 +00:00
David Iglesias
1d2593d09f [web] Preserve canvaskit variant during tests. (flutter/engine#43868)
A ~~simpler~~ very similar version of https://github.com/flutter/engine/pull/43854

* Makes it harder for users to accidentally remove default configuration values, while still allowing them to do so if needed (configuration is now overridden with a subset of values, rather than passing a full configuration object).
  * Moves `merge` from the configuration object and into the override method.
* Removes a test-only configuration option:
  * `window._flutter_canvaskit_variant_for_test_only`

[C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
2023-07-26 05:04:16 +00:00
Mouad Debbar
d205cf6af6 [web] Preserve correct CanvasKit Variant during test initialization (flutter/engine#43854)
At some point, we started setting `useColorEmoji` to true in our tests, but we were doing it in a way that resets all other configurations to their defaults. This caused the `canvasKitVariant` config to be lost and always set to the default `auto`.

This PR fixes the issue and adds tests to:

1. Make sure that the CanvasKit suite always runs with a specific variant (not `auto`).
2. Make sure the given CanvasKit variant makes it all the way through to the tests.

The test harness uses a backdoor (a global JS property on `window`) to communicate which canvaskit variant it's using. The test then compares that with `configuration.canvasKitVariant` to make sure they match. If they don't match, then the configuration was lost somewhere on the way.

Fixes https://github.com/flutter/flutter/issues/130993
2023-07-20 18:06:24 +00:00
Konstantin Scheglov
327e2a3d85 Fix prefer_final_in_for_each (flutter/engine#42899)
Context: https://dart-review.googlesource.com/c/sdk/+/309821
2023-06-15 20:57:43 -07:00
Jackson Gardner
6fdcec7af7 Bump Chrome version to 114 for testing (flutter/engine#42623) 2023-06-07 17:55:20 +00:00
Jackson Gardner
aa7b3fcf98 Only use 8 cores for web test compilation. (flutter/engine#42321) 2023-05-25 19:14:06 +00:00
Mouad Debbar
7b3b362623 [web] Cleaner output on LUCI (flutter/engine#41989)
Using ansi colors in LUCI results in output that looks like:
```
00:00 +0: loading flutter_tester_emulation_golden_test.dart                                                                                                                                            
00:01 +0: loading flutter_tester_emulation_golden_test.dart                                                                                                                                            
00:02 +0: loading flutter_tester_emulation_golden_test.dart
```

This PR disables colors on LUCI so that we get clean output that's easily scannable and searchable.
2023-05-12 21:50:22 +00:00
Jackson Gardner
3c85b2e565 Implement text rendering in Skwasm (flutter/engine#41832)
This implements full text rendering with the Skwasm renderer.

The font fallback logic has been refactored to decouple the font fallback manager from any CanvasKit-specific types and functions.

A chunk of CanvasKit text rendering tests have been ported over to the renderer-agnostic `ui` tests.

Fixes https://github.com/flutter/flutter/issues/126339
2023-05-09 23:37:21 +00: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
Jackson Gardner
28d9e0df0f Improve Wasm Debugging. (flutter/engine#41054)
Improve Wasm Debugging.
2023-04-12 00:52:04 +00:00
Jackson Gardner
439141c38d Skwasm scene (flutter/engine#40330)
Skwasm scene
2023-04-10 17:38:57 +00:00
Mouad Debbar
5d30f3f043 [web] Make 'Noto Color Emoji' opt-in (flutter/engine#40990)
[web] Make 'Noto Color Emoji' opt-in
2023-04-07 16:54:22 +00:00
Jackson Gardner
1f7f52ffac Fail the run_suite_step if any test failures are detected. (flutter/engine#40834)
We need to throw if the `run_suite_step` encounters any test failures.
2023-04-03 18:02:31 -07:00
Harry Terkelsen
8f9c5e83dd Switch from Noto Emoji to Noto Color Emoji and update font data (flutter/engine#40666) 2023-03-29 14:12:25 -07:00
Jackson Gardner
77dadc582f Forward stdout and stderr from dart2wasm when verbose. (flutter/engine#40731)
Forward stdout and stderr from dart2wasm when verbose.
2023-03-29 00:46:05 +00:00
Harry Terkelsen
e8d9ea46c2 Revert "Revert "Reland "Default the CanvasKit base URL to local artifacts. (#40293)" (#40470)" (#40700)" (flutter/engine#40717)
This reverts commit aee0a1a6db53cfdada6d00fe50a94c3216950bb6.
2023-03-28 17:21:10 -07:00
Kevin Chisholm
aee0a1a6db Revert "Reland "Default the CanvasKit base URL to local artifacts. (#40293)" (#40470)" (flutter/engine#40700)
Revert "Reland "Default the CanvasKit base URL to local artifacts.""
2023-03-28 04:49:13 +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
Jackson Gardner
82886d52b3 Web test reorganization (flutter/engine#39984)
Web test reorganization
2023-03-28 00:08:48 +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
Harry Terkelsen
888d56a309 Reland "Default the CanvasKit base URL to local artifacts. (#40293)" (flutter/engine#40470)
This reverts commit d56b53d0c6006873499ba75dcc0bf478834a1b64.
2023-03-24 11:41:33 -07:00
Zachary Anderson
b4c1aaaf1c Revert "[web] Turn on CanvasKit Chromium (#40459)" (flutter/engine#40495)
Revert "[web] Turn on CanvasKit Chromium"
2023-03-21 18:18:51 +00:00
Mouad Debbar
a32e3ab927 [web] Turn on CanvasKit Chromium (flutter/engine#40459)
[web] Turn on CanvasKit Chromium
2023-03-21 16:23:09 +00:00
Zachary Anderson
d56b53d0c6 Revert "Default the CanvasKit base URL to local artifacts. (#40293)" (flutter/engine#40415)
Revert "Default the CanvasKit base URL to local artifacts."
2023-03-18 04:33:12 +00:00
Harry Terkelsen
d9e8942c04 Default the CanvasKit base URL to local artifacts. (flutter/engine#40293) 2023-03-17 14:36:11 -07:00
Jackson Gardner
5508a04de1 Output web test artifacts to out directory. (flutter/engine#40355)
Output web test artifacts to out directory.
2023-03-16 22:19:55 +00:00
Mouad Debbar
fe97e51d19 [web][felt] Add 'archive' target + 'profile' mode (flutter/engine#40060)
[web][felt] Add 'archive' target + 'profile' mode
2023-03-07 21:31:31 +00:00
godofredoc
bc2611e03c Web engine build config cleanup. (flutter/engine#40064)
Web engine build config cleanup.
2023-03-04 00:28:18 +00:00
Jackson Gardner
a3dc9e77fb Skwasm Renderer - initial implementation (flutter/engine#39072)
Skwasm Renderer - initial implementation
2023-03-02 00:01:04 +00:00
Mouad Debbar
2c378412f2 [web] Copy everything under the local canvaskit folder (flutter/engine#39799)
* [web] Copy everything under the local canvaskit folder

* Update compile_tests_step.dart
2023-02-23 15:06:18 +00:00
Yegor
543f998577 [web] consolidate network code into httpFetch (flutter/engine#39657)
* consolidate network code into httpFetch

* make HTTP test cross-browser friendly; fix copypasta
2023-02-16 00:02:02 +00:00
Jackson Gardner
43e7f9beeb Bump to Chrome 111. (flutter/engine#39525) 2023-02-10 01:05:10 +00:00
Jackson Gardner
6f7fd98f68 Remove uses of --full-dart-sdk from the engine_v2 builders. (flutter/engine#39297)
Also, do not produce host-specific web_sdk artifacts in the builders.
2023-01-31 23:01:00 +00:00