26526 Commits

Author SHA1 Message Date
Tong Mu
b4580a4a88 [macOS] Move to new present callback (flutter/engine#51436)
Migrates the macOS embedder to the new present callback which includes a `view_id` value.

Not much can be tested, since this doesn't change any features, nor add any features without the ability to add a view. But I added a test to verify that rendering to an unknown view is a graceful no-op.

Design doc: https://flutter.dev/go/multi-view-embedder-apis

Part of https://github.com/flutter/flutter/issues/144810
Part of https://github.com/flutter/flutter/issues/142845

[C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
2024-03-29 20:00:05 +00:00
LongCatIsLooong
cddc8f5910 Turn struct half leading in canvaskit kitchensink test back on (flutter/engine#50707)
Undo https://github.com/flutter/engine/pull/50617

[C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
2024-03-29 18:50:35 +00:00
Matan Lurey
42daa3bb56 Add a minimal example of using package:test. (flutter/engine#51726)
Work towards https://github.com/flutter/flutter/issues/133569.

This PR is a proof of concept that shows we're able to use `package:test` in `flutter/engine` instead of `package:litetest`.

I think it also shows that, if we're going to continue to vend dependencies this way, we might want to re-think our strategy in terms of using `pub` as a management tool - it's quite unwieldy already. For example, here is every `pubspec.yaml` file in the repo:

```sh
$ find . -name 'pubspec.yaml' -exec sh -c 'echo "$0 $(wc -l < "$0")"' {} \;

# Some files omitted in third_party or similar.
./impeller/tessellator/dart/pubspec.yaml       11
./tools/const_finder/pubspec.yaml       35
./tools/api_check/pubspec.yaml       90
./tools/build_bucket_golden_scraper/pubspec.yaml       47
./tools/licenses/pubspec.yaml       53
./tools/path_ops/dart/pubspec.yaml       26
./tools/engine_tool/pubspec.yaml       76
./tools/dir_contents_diff/pubspec.yaml       19
./tools/compare_goldens/pubspec.yaml        3
./tools/golden_tests_harvester/pubspec.yaml       55
./tools/gen_web_locale_keymap/pubspec.yaml       37
./tools/githooks/pubspec.yaml       63
./tools/android_lint/pubspec.yaml       35
./tools/clang_tidy/pubspec.yaml       76
./tools/pkg/engine_repo_tools/pubspec.yaml       41
./tools/pkg/process_fakes/pubspec.yaml       36
./tools/pkg/engine_build_configs/pubspec.yaml       73
./tools/pkg/git_repo_tools/pubspec.yaml       60
./tools/header_guard_check/pubspec.yaml       70
./sky/packages/sky_engine/pubspec.yaml        8
./shell/vmservice/pubspec.yaml        8
./ci/pubspec.yaml       57
./testing/benchmark/pubspec.yaml       77
./testing/skia_gold_client/pubspec.yaml       66
./testing/pkg_test_demo/pubspec.yaml      116
./testing/smoke_test_failure/pubspec.yaml       31
./testing/dart/pubspec.yaml       71
./testing/android_background_image/pubspec.yaml       22
./testing/litetest/pubspec.yaml       33
./testing/symbols/pubspec.yaml       24
./testing/scenario_app/pubspec.yaml       67
./web_sdk/web_engine_tester/pubspec.yaml       14
./web_sdk/web_test_utils/pubspec.yaml       22
./web_sdk/pubspec.yaml       60
./lib/snapshot/pubspec.yaml        8
./lib/gpu/pubspec.yaml       14
./lib/web_ui/pubspec.yaml       60
./flutter_frontend_server/pubspec.yaml       39
```

I'll file a follow-up issue to discuss pub-package management in the engine.
2024-03-29 18:44:04 +00:00
Matan Lurey
55c4543094 Implement .engine-release.version files for engine Skia Gold tests (flutter/engine#51739)
Work towards https://github.com/flutter/flutter/issues/144835.

Doc (_sorry, internal only_): [go/flutter-engine-goldens-workflow](http://goto.google.com/flutter-engine-goldens-workflow).

This implements the majority of the proposed workflow, that is, optionally having a plain-text version at the root of the directory, and using it to apply a unique suffix we can review in release branches. As it stands, this is a NO-OP outside of tests (it will have no impact, and can be ignored).

What's missing before using this feature in release branches:

- Optimization work with the infra team (not sure if blocking or not):
  https://github.com/flutter/flutter/issues/145842
- A dry-run of this with the release team to make sure it works as intended

@gaaclarke As implemented, I _think_ we don't need anything special for [`dir_contents_diff`](286169bb52/tools/dir_contents_diff), but maybe I'm wrong - I think only the _test_ names are being changed, not the names on disk.

/cc @zanderso as well.
2024-03-29 17:36:08 +00:00
Mouad Debbar
01ea911472 [web] Use viewId for text editing (flutter/engine#51099)
Handle `viewId` for text fields.

Part of https://github.com/flutter/flutter/issues/137344
2024-03-29 16:50:01 +00:00
Jonah Williams
2b1bbfe870 [Impeller] generate mip level N from N-1 in Vulkan backend. (flutter/engine#51749)
Uses the mipmap implementation from https://vulkan-tutorial.com/Generating_Mipmaps .

Today we generate all mip levels from mip level 0, which results in lost data. Instead we need to use the previous mip level
2024-03-29 16:11:42 +00:00
skia-flutter-autoroll
1cb98980dc Roll Skia from 94c0af1297ae to a12e40efacea (3 revisions) (flutter/engine#51776)
https://skia.googlesource.com/skia.git/+log/94c0af1297ae..a12e40efacea

2024-03-29 double1kai@gmail.com fix indentation in SkBlitMask_opts.h
2024-03-29 kjlubick@google.com Remove deprecated hasMipMaps from GrBackendSurface
2024-03-29 skia-autoroll@skia-public.iam.gserviceaccount.com Roll SK Tool from 33ace26e29f4 to dc19502e745f

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

To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry
To file a bug in Flutter: 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
2024-03-29 14:48:14 +00:00
skia-flutter-autoroll
60c49a50c4 Roll Skia from 6042ad386bcf to b2a01ae03cdf (4 revisions) (flutter/engine#51772)
https://skia.googlesource.com/skia.git/+log/6042ad386bcf..b2a01ae03cdf

2024-03-29 skia-autoroll@skia-public.iam.gserviceaccount.com Roll Skia Infra from d9a2f3150285 to 33ace26e29f4 (9 revisions)
2024-03-29 skia-autoroll@skia-public.iam.gserviceaccount.com Roll Dawn from 8220ee868483 to 2126889e45aa (11 revisions)
2024-03-29 skia-autoroll@skia-public.iam.gserviceaccount.com Roll SwiftShader from f0178b3c40e7 to ff61926fcedb (2 revisions)
2024-03-29 skia-autoroll@skia-public.iam.gserviceaccount.com Roll vulkan-deps from 61c7aa9a8478 to f91c2fe47c47 (8 revisions)

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

To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry
To file a bug in Flutter: 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
2024-03-29 06:28:19 +00:00
skia-flutter-autoroll
f9ff74ce1f Roll Fuchsia Linux SDK from uzI3wnbEGlZ_dtO0Z... to 3vgfbp1vjXkdMZ09m... (flutter/engine#51767)
If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/fuchsia-linux-sdk-flutter-engine
Please CC jacksongardner@google.com,rmistry@google.com,zra@google.com on the revert to ensure that a human
is aware of the problem.

To file a bug in Flutter: 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
2024-03-29 03:01:21 +00:00
Jackson Gardner
b27ae53b79 [skwasm] Fix toString methods on Paint and ImageFilter/ColorFilter (flutter/engine#51766)
This fixes https://github.com/flutter/flutter/issues/141639

Most of this was previously unimplemented. It turns out the reason for the hang described in the github issue was that there was a typo in the name of the `getMiterLimit` C function, so if the client actually called that method the Wasm module failed to compile, as it couldn't find an import with the misspelled name.
2024-03-29 02:06:18 +00:00
John McCutchan
e5289fdce1 Reland https://github.com/flutter/engine/pull/51391 (flutter/engine#51764) 2024-03-29 01:45:16 +00:00
Loïc Sharma
a01206ad39 Add completion callback to Shell::AddView (flutter/engine#51659)
In the future, `FlutterEngineAddView` will be added to the embedder API to allow embedders to add views. `FlutterEngineAddView` will accept a callback that notifies the embedder once the view has been added.

This embedder API will be powered by `Shell::AddView`. This change adds a completion callback to `Shell::AddView` to prepare for the embedder API.

Design doc: https://flutter.dev/go/multi-view-embedder-apis

Part of https://github.com/flutter/flutter/issues/144806
Part of https://github.com/flutter/flutter/issues/142845

[C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
2024-03-29 00:39:10 +00:00
Loïc Sharma
ab5a29979c [Windows] Move keyboard initialization (flutter/engine#51758)
Previously the keyboard was initialized after the view is created. This used to be necessary as the keyboard & text input plugins were strongly tied to a view (and would crash in headless modes). This is no longer necessary, and the keyboard can now be initialized normally as part of the engine initialization.

Part of https://github.com/flutter/flutter/issues/142845

[C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
2024-03-29 00:14:12 +00:00
Loïc Sharma
675df6539b [Windows] Don't always stop engine on view destruction (flutter/engine#51681)
Currently destroying a view also shuts down the engine. This makes sense as in single-view world where the view also always owns the engine. However, in a multi-view world the views will share the engine. Destroying one view shouldn't necessarily shut down the engine unless that view owns the engine.

Part of https://github.com/flutter/flutter/issues/142845

[C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
2024-03-29 00:14:10 +00:00
Tong Mu
115ff71db2 [macOS] Group per-view information in FlutterCompositor into a class (flutter/engine#51738)
This PR groups per-view information in `FlutterCompositor` into a private class, `ViewPresenter`. This makes it easier to manage per-view data and write view operations.

Part of https://github.com/flutter/flutter/issues/145874.

Currently, view presenters are never removed once created, since the macOS runner doesn't support removing views. This will be added in the future.

[C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
2024-03-28 23:57:21 +00:00
Jonah Williams
f4b9b15cf7 [Impeller] dont clamp mipmap level to 0 with Vulkan textures. (flutter/engine#51761)
Mipmaps are not working at all right now with Vulkan. Opening without fix so we see goldens changing.
2024-03-28 23:32:57 +00:00
John McCutchan
7245fef9ad Add et query tests and et test commands (flutter/engine#51605)
- `et query tests` enumerates all test binaries encoded in BUILD.gn
files.
- `et test` builds, then, runs a set of tests in parallel
- Tests
2024-03-28 16:11:24 -07:00
skia-flutter-autoroll
4641eaae83 Roll Skia from e25b0f9006a4 to 6042ad386bcf (1 revision) (flutter/engine#51763)
https://skia.googlesource.com/skia.git/+log/e25b0f9006a4..6042ad386bcf

2024-03-28 bungeman@google.com [fontations] Respect aliasing

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

To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry
To file a bug in Flutter: 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
2024-03-28 22:14:22 +00:00
Matan Lurey
0141f514a4 Test that clangd --check works at HEAD. (flutter/engine#50901)
Closes https://github.com/flutter/flutter/issues/141641.

Basically, this should verify "it's possible to use VSCode+LSC, at least in theory".

I'm open to writing a test, but given it _is_ a test I'm less sure it's valuable. Feel free to push back.
2024-03-28 21:05:24 +00:00
Matan Lurey
68f57a3060 Remove --verbose from clang_tidy execution on CI. (flutter/engine#51760)
Closes https://github.com/flutter/flutter/issues/145926.

This was likely left on by accident (if not, we should utilize `FLUTTER_LOGS_DIR` instead of this flag).

/cc @zanderso
2024-03-28 20:58:54 +00:00
Matan Lurey
a138fbe1e0 Remove Android API v33 tests from CI. (flutter/engine#51751)
Closes https://github.com/flutter/flutter/issues/144064.

From a conversation with @camsim99 on Discord:

> Ah this was to debug that missing emulator issue (https://github.com/flutter/flutter/issues/137947) that Ricardo and I were seeing. We wanted to see if it was specific to the API 34, and if so, escalate the issue internally. @ricardoamador Would you like to keep running the tests with API 33? You mentioned you have found a workaround, and the test runs seem to not have yielded any evidence against API 34.
2024-03-28 20:46:53 +00:00
gaaclarke
03996c0fe2 Reland: [Impeller] adds a plus advanced blend for f16 pixel formats (flutter/engine#51756)
Relands https://github.com/flutter/engine/pull/51589

The fix is in 74397bc171c74d2bfb24e82b47f2aa29d70c1711. I couldn't
figure out how to get a test in the engine to cover it. The test is in
the devicelab.

Here's what I attempted:
```c++
TEST_P(AiksTest, BlendModePlusAlphaColorFilterAlphaWideGamut) {
  if (GetParam() != PlaygroundBackend::kMetal) {
    GTEST_SKIP_("This backend doesn't yet support wide gamut.");
  }
  EXPECT_EQ(GetContext()->GetCapabilities()->GetDefaultColorFormat(),
            PixelFormat::kR16G16B16A16Float);

  Canvas canvas;
  canvas.Scale(GetContentScale());
  canvas.DrawPaint({.color = Color(0.1, 0.2, 0.1, 0.5)});
  canvas.SaveLayer({
      .color_filter = ColorFilter::MakeBlend(BlendMode::kPlus,
                                             Color(Vector4{1, 0, 0, 0.5})),
  });
  Paint paint;
  paint.color = Color(1, 0, 0, 0.5);
  canvas.DrawRect(Rect::MakeXYWH(100, 100, 400, 400), paint);
  paint.color = Color::White();
  canvas.Restore();
  ASSERT_TRUE(OpenPlaygroundHere(canvas.EndRecordingAsPicture()));
}
```

## 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].
- [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 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].
- [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-03-28 13:36:21 -07:00
skia-flutter-autoroll
9d44e65b3f Roll Skia from c0e0b76d6d51 to e25b0f9006a4 (2 revisions) (flutter/engine#51757)
https://skia.googlesource.com/skia.git/+log/c0e0b76d6d51..e25b0f9006a4

2024-03-28 sophiewen@google.com skia: Fix implicit conversion warning
2024-03-28 bungeman@google.com [fontations] Add underline and strikeout metrics

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

To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry
To file a bug in Flutter: 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
2024-03-28 20:02:10 +00:00
Brandon DeRosier
d1a52439ca [Impeller] Optimize away intersect clips that cover the entire pass target. (flutter/engine#51736)
I tested against a few example apps and found this case is actually very common. These full screen/pass clips render nothing to the depth buffer can be particularly troublesome in the presence of backdrop filters (due to clip replay).

While this case doesn't actually result in anything getting written to the depth buffer, we still end up overwriting the entire stencil buffer twice: Once for the preparation draw, and again for the depth buffer transfer/stencil cleanup draw.
2024-03-28 19:56:03 +00:00
Jackson Gardner
6741217138 [skwasm] Use text position affinity when calculating word boundaries. (flutter/engine#51753)
I had failed to take position affinity into account when calculating word boundaries on skwasm. This brings skwasm's behavior in line with canvaskit's.
2024-03-28 19:54:12 +00:00
Mouad Debbar
b0300e2fc2 Prevent solo: true from being committed (flutter/engine#51712)
At some point, we inherited a change from the repo-level `analysis_options.yaml` that [allowed deprecated](https://github.com/flutter/engine/pull/50575) members to be used. We rely on that analyzer error to prevent `solo: true` from being committed in our tests ([example](c935c3ba36/lib/web_ui/test/ui/line_metrics_test.dart (L179)) of one that slipped recently).

This PR overrides the `deprecated_member_use` error to enable it inside the web engine.
2024-03-28 19:31:14 +00:00
skia-flutter-autoroll
92d81bd47b Manual roll Dart SDK from 291217c1d399 to bb65648e20e2 (3 revisions) (flutter/engine#51755)
Manual roll requested by kevinjchisholm@google.com

https://dart.googlesource.com/sdk.git/+log/291217c1d399..bb65648e20e2

2024-03-28 dart-internal-merge@dart-ci-internal.iam.gserviceaccount.com Version 3.4.0-282.0.dev
2024-03-28 dart-internal-merge@dart-ci-internal.iam.gserviceaccount.com Version 3.4.0-281.0.dev
2024-03-27 dart-internal-merge@dart-ci-internal.iam.gserviceaccount.com Version 3.4.0-280.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,kevinjchisholm@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
2024-03-28 19:23:54 +00:00
Tong Mu
e582a0c54e Make EmbedderExternalViewEmbedder present to the correct view (flutter/engine#51719)
This PR connects the view ID provided by the rasterizer to `EmbedderExternalViewEmbedder`'s presenting call (see `embedder_external_view_embedder.cc`).

This PR also contains a refactor (which actually takes the majority of LOC) that moves the specification of view ID from `PrepareFlutterView` to `SubmitFlutterView`.  The `flutter_view_id` parameter in `PrepareFlutterView` was added in https://github.com/flutter/engine/pull/46169. It turns out that we don't need the view ID throughout the preparation phase, so we can delay the specification to submission, which makes it feel cleaner.

### Tests

Existing tests are changed to verify that `SubmitFlutterView` receive the correct view ID.

The feature that `EmbedderExternalViewEmbedder` sends the view ID to the presenting API is not tested for now, because `EmbedderExternalViewEmbedder` is typically tested in `embedder_unittests`, but it requires the embedder API `AddView`. It will be tested in later changes to `EmbedderExternalViewEmbedder`.

[C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
2024-03-28 18:04:48 +00:00
skia-flutter-autoroll
e30193927c Roll Skia from 4e2205aff93b to c0e0b76d6d51 (2 revisions) (flutter/engine#51750)
https://skia.googlesource.com/skia.git/+log/4e2205aff93b..c0e0b76d6d51

2024-03-28 skia-autoroll@skia-public.iam.gserviceaccount.com Manual roll ANGLE from 8e7d33793418 to 21b6899a9c31 (8 revisions)
2024-03-28 robertphillips@google.com Add isOpaque to SkLocalMatrixShader and SkCTMShader

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

To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry
To file a bug in Flutter: 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
2024-03-28 17:12:39 +00:00
skia-flutter-autoroll
e92781620b Roll Skia from 9e3fe3b324b7 to 4e2205aff93b (5 revisions) (flutter/engine#51747)
https://skia.googlesource.com/skia.git/+log/9e3fe3b324b7..4e2205aff93b

2024-03-28 skia-autoroll@skia-public.iam.gserviceaccount.com Manual roll SwiftShader from 0bacc751b4d1 to f0178b3c40e7 (1 revision)
2024-03-28 kjlubick@google.com Remove old mtl files
2024-03-28 double1kai@gmail.com Add vector support for LoongArch in SkBlitRow_opts.h
2024-03-28 double1kai@gmail.com Add vector support for LoongArch in SkSwizzler_opts.inc
2024-03-28 double1kai@gmail.com Add vector support for LoongArch in SkBlitMask_opts.h

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

To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry
To file a bug in Flutter: 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
2024-03-28 15:54:20 +00:00
skia-flutter-autoroll
7e1e02c4c2 Roll Skia from abd1774b901f to 9e3fe3b324b7 (5 revisions) (flutter/engine#51745)
https://skia.googlesource.com/skia.git/+log/abd1774b901f..9e3fe3b324b7

2024-03-28 skia-autoroll@skia-public.iam.gserviceaccount.com Manual roll SwiftShader from bbe6452b420c to 0bacc751b4d1 (1 revision)
2024-03-28 skia-autoroll@skia-public.iam.gserviceaccount.com Manual roll Dawn from 81a2ed3a2849 to 8220ee868483 (18 revisions)
2024-03-28 skia-autoroll@skia-public.iam.gserviceaccount.com Roll SK Tool from a21b7442fbc2 to a55a38974c8b
2024-03-28 skia-autoroll@skia-public.iam.gserviceaccount.com Roll vulkan-deps from 29cd699ff179 to 61c7aa9a8478 (6 revisions)
2024-03-28 robertphillips@google.com Revert "Add FCC, YDZDX, GBR, SMPTE240 color space support"

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

To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry
To file a bug in Flutter: 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
2024-03-28 14:34:23 +00:00
skia-flutter-autoroll
a4da012d7c Roll Skia from cef0d40c5a06 to abd1774b901f (1 revision) (flutter/engine#51744)
https://skia.googlesource.com/skia.git/+log/cef0d40c5a06..abd1774b901f

2024-03-28 robertphillips@google.com [graphite] Handle Precompilation of a drawVertices() call w/o colors

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

To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry
To file a bug in Flutter: 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
2024-03-28 13:02:11 +00:00
skia-flutter-autoroll
3cfdb01e11 Roll Skia from 66241be7c81c to cef0d40c5a06 (1 revision) (flutter/engine#51743)
https://skia.googlesource.com/skia.git/+log/66241be7c81c..cef0d40c5a06

2024-03-28 skia-autoroll@skia-public.iam.gserviceaccount.com Roll Skia Infra from a21b7442fbc2 to d9a2f3150285 (10 revisions)

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

To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry
To file a bug in Flutter: 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
2024-03-28 09:37:06 +00:00
auto-submit[bot]
ebe91c2a5c Reverts "[Impeller] adds a plus advanced blend for f16 pixel formats (#51589)" (flutter/engine#51741)
Reverts: flutter/engine#51589
Initiated by: jonahwilliams
Reason for reverting: draw vertices devicelab test is crashing due to SIGABRT in blend contents

![image](https://github.com/flutter/engine/assets/8975114/8bfaec63-29e9-43c2-8954-181d0ad1c413)

Original PR Author: gaaclarke

Reviewed By: {jonahwilliams}

This change reverts the following previous change:
fixes https://github.com/flutter/flutter/issues/142549

[C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
2024-03-28 05:41:48 +00:00
Jonah Williams
4a3619cc21 [Impeller] correct multisample resolve/store configuration for Vulkan. (flutter/engine#51740)
Added tests for https://github.com/flutter/engine/pull/50374

This makes RenderDoc replays work a whole lot better since all of the offscreen textures aren't cleared with DONT CARE.

Fixes https://github.com/flutter/flutter/issues/142947
2024-03-28 04:17:22 +00:00
Matan Lurey
d29da01928 Remove Impeller/OpenGLES from CI branch for Android e2e tests. (flutter/engine#51734)
We don't intend to make much progress on the Impeller OpenGLES backend in 2024. I won't remove the capability to run these tests locally (the plumbing is already done and doesn't cost anything), but we don't need to have these just sit/flake on CI consuming resources.

Partial work towards https://github.com/flutter/flutter/issues/144064.
2024-03-28 02:44:50 +00:00
skia-flutter-autoroll
956b7e2c9d Roll Fuchsia Linux SDK from Lk8KBU-c97ROj-YHm... to uzI3wnbEGlZ_dtO0Z... (flutter/engine#51737)
If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/fuchsia-linux-sdk-flutter-engine
Please CC jacksongardner@google.com,rmistry@google.com,zra@google.com on the revert to ensure that a human
is aware of the problem.

To file a bug in Flutter: 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
2024-03-28 01:20:55 +00:00
skia-flutter-autoroll
5e041e53d4 Roll Skia from b6160ffc0b96 to 66241be7c81c (16 revisions) (flutter/engine#51733)
https://skia.googlesource.com/skia.git/+log/b6160ffc0b96..66241be7c81c

2024-03-27 hitawala@chromium.org Add FCC, YDZDX, GBR, SMPTE240 color space support
2024-03-27 michaelludwig@google.com [graphite] Track if Device is immutable
2024-03-27 skia-autoroll@skia-public.iam.gserviceaccount.com Roll vulkan-deps from 4f5c3553ddc3 to 29cd699ff179 (5 revisions)
2024-03-27 jvanverth@google.com Reland "[graphite] Update yuv_to_rgb_subset_effect to support Graphite."
2024-03-27 michaelludwig@google.com [graphite] Don't pass Recorder into YUVAProxies
2024-03-27 egdaniel@google.com Move some compressed data utils to shared gpu file.
2024-03-27 egdaniel@google.com Fill in VulkanCaps for compressed formats.
2024-03-27 robertphillips@google.com [graphite] Handle SkClipOp::kDifference-clipShaders in Precompilation
2024-03-27 sunnyps@chromium.org graphite: Explicitly Destroy() Dawn textures in deleteBackendTexture
2024-03-27 kjlubick@google.com Add missing SkUnicode files to public.bzl
2024-03-27 egdaniel@google.com Remove unhelpful assert in backend caps format tables.
2024-03-27 robertphillips@google.com [graphite] Add clipShaders to Precompilation system
2024-03-27 jvanverth@google.com Revert "[graphite] Update yuv_to_rgb_subset_effect to support Graphite."
2024-03-27 skia-autoroll@skia-public.iam.gserviceaccount.com Manual roll Dawn from 3de0f00ef217 to 81a2ed3a2849 (5 revisions)
2024-03-27 nicolettep@google.com [graphite] Add input attachment usage flag to renderable Vulkan texture when importing from AHardwareBuffer
2024-03-27 jvanverth@google.com [graphite] Update yuv_to_rgb_subset_effect to support Graphite.

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

To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry
To file a bug in Flutter: 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
2024-03-28 00:49:56 +00:00
Brandon DeRosier
7f453eb089 [Impeller] Reland: Use the scissor to limit all draws by clip coverage. (flutter/engine#51731)
Reland https://github.com/flutter/engine/pull/51698.

This reverts commit 7922740184.

Attempts to improve https://github.com/flutter/flutter/issues/145274.

Our new clipping technique paints walls on the depth buffer "in front" of the Entities that will be affected by said clips. So when an intersect clip is drawn (the common case), the clip will cover the whole framebuffer.

Depth is divvied up such that deeper clips get drawn _behind_ shallower clips, and so many clips actually don't end up drawing depth across the whole framebuffer. However, if the app does a lot of transitioning from a huge clips to a small clips, a lot of unnecessary depth churn occurs (very common in Flutter -- this happens with both the app bar and floating action button in the counter template, for example).

Since progressively deeper layers in the clip coverage stack always subset their parent layers, we can reduce waste for small intersect clips by setting the scissor to the clip coverage rect instead of drawing the clip to the whole screen.

Note that this change _does not_ help much with huge/fullscreen clips.

Also, we could potentially improve this further by computing much stricter bounds. Rather than just using clip coverage for the scissor, we could intersect it with the union of all draws affected by the clip at the cost of a bit more CPU churn per draw. I don't think that's enough juice for the squeeze though.

Before (`Play/AiksTest.CanRenderNestedClips/Metal`):

https://github.com/flutter/engine/assets/919017/7858400f-793a-4f7b-a0e4-fa3581198beb

After (`Play/AiksTest.CanRenderNestedClips/Metal`):

https://github.com/flutter/engine/assets/919017/b2f7c96d-a820-454d-91df-f5fae4976e91
2024-03-28 00:42:48 +00:00
gaaclarke
d96b1f7e73 [Impeller] adds a plus advanced blend for f16 pixel formats (flutter/engine#51589)
fixes https://github.com/flutter/flutter/issues/142549

[C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
2024-03-27 23:48:24 +00:00
maRci002
79c240e9b5 Platform channel for predictive back in route transitions on android (flutter/engine#49093)
Support for Android's predictive back feature on internal Flutter routes. Reports predictive back gestures to the framework (where supported by the system).
2024-03-27 16:45:47 -07:00
Jonah Williams
95661e25f5 [Impeller] render empty filled paths without crashing. (flutter/engine#51713)
Fixes https://github.com/flutter/flutter/issues/145823

If we try to render a solid filled empty size path, the subpath division code creates an obscene number of vertices that hits overflow errors. Just No-op instead.
2024-03-27 22:34:07 +00:00
Jonah Williams
f874d6c24c [Impeller] use optimal depth attachment, remove useless barrier. (flutter/engine#51723)
We have been transitioning the depth/stencil atttachment to general, even though it can just be in attachment optimal (we never use it as an input attachment).
2024-03-27 22:26:04 +00:00
K Lubick
8387381fb9 Fix skunicode BUILD.gn rules (flutter/engine#51708)
As a result of https://skia-review.googlesource.com/c/skia/+/831801, the
way SkUnicode needs to be compiled has slightly changed. This also rolls
Skia to pick up those changes.

https://skia.googlesource.com/skia.git/+log/5ed91aaa4cff..b6160ffc0b96

2024-03-27 [kjlubick@google.com](mailto:kjlubick@google.com) Break up
Bidi based on ICU or ICU subset into classes to avoid #define
2024-03-27 [double1kai@gmail.com](mailto:double1kai@gmail.com) Add
vector support for LoongArch in SkBitmapProcState_opts.h

## 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].
- [ ] 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

---------

Co-authored-by: skia-flutter-autoroll <skia-flutter-autoroll@skia.org>
2024-03-27 17:15:35 -04:00
auto-submit[bot]
7922740184 Reverts "[Impeller] Use the scissor to limit all draws by clip coverage. (#51698)" (flutter/engine#51728)
Reverts: flutter/engine#51698
Initiated by: bdero
Reason for reverting: Golden breakage on framework tree -- https://flutter-gold.skia.org/search?issue=145855&crs=github&patchsets=4&corpus=flutter
Original PR Author: bdero

Reviewed By: {jonahwilliams}

This change reverts the following previous change:
Attempts to improve https://github.com/flutter/flutter/issues/145274.

Our new clipping technique paints walls on the depth buffer "in front" of the Entities that will be affected by said clips. So when an intersect clip is drawn (the common case), the clip will cover the whole framebuffer.

Depth is divvied up such that deeper clips get drawn _behind_ shallower clips, and so many clips actually don't end up drawing depth across the whole framebuffer. However, if the app does a lot of transitioning from a huge clips to a small clips, a lot of unnecessary depth churn occurs (very common in Flutter -- this happens with both the app bar and floating action button in the counter template, for example).

Since progressively deeper layers in the clip coverage stack always subset their parent layers, we can reduce waste for small intersect clips by setting the scissor to the clip coverage rect instead of drawing the clip to the whole screen.

Note that this change _does not_ help much with huge/fullscreen clips.

Also, we could potentially improve this further by computing much stricter bounds. Rather than just using clip coverage for the scissor, we could intersect it with the union of all draws affected by the clip at the cost of a bit more CPU churn per draw. I don't think that's enough juice for the squeeze though.

Before (`Play/AiksTest.CanRenderNestedClips/Metal`):

https://github.com/flutter/engine/assets/919017/7858400f-793a-4f7b-a0e4-fa3581198beb

After (`Play/AiksTest.CanRenderNestedClips/Metal`):

https://github.com/flutter/engine/assets/919017/b2f7c96d-a820-454d-91df-f5fae4976e91
2024-03-27 20:49:47 +00:00
Jackson Gardner
601cb5058f [Skwasm] Correctly handle paragraphs with empty text. (flutter/engine#51695)
Instead of just returning, if our paragraph builder has empty text, we still need to generate a set of line breaks for skia to use. Otherwise, it will actually cause subtle memory access errors.
2024-03-27 20:18:57 +00:00
skia-flutter-autoroll
d4720260c4 Roll Dart SDK from a600b67424a8 to 291217c1d399 (4 revisions) (flutter/engine#51716)
https://dart.googlesource.com/sdk.git/+log/a600b67424a8..291217c1d399

2024-03-27 dart-internal-merge@dart-ci-internal.iam.gserviceaccount.com Version 3.4.0-279.0.dev
2024-03-27 dart-internal-merge@dart-ci-internal.iam.gserviceaccount.com Version 3.4.0-278.0.dev
2024-03-27 dart-internal-merge@dart-ci-internal.iam.gserviceaccount.com Version 3.4.0-277.0.dev
2024-03-26 dart-internal-merge@dart-ci-internal.iam.gserviceaccount.com Version 3.4.0-276.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 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
2024-03-27 19:17:29 +00:00
auto-submit[bot]
0946357650 Reverts "Fail pre-submit if a negative image is encountered as part of goldctl imgtest add. (#51685)" (flutter/engine#51718)
Reverts: flutter/engine#51685
Initiated by: matanlurey
Reason for reverting: goldctl does not disambiguate negatives from untriaged images (see 9b9adad080/gold-client/cmd/goldctl/cmd_imgtest_test.go (L325)).
Original PR Author: matanlurey

Reviewed By: {mdebbar, gaaclarke}

This change reverts the following previous change:
`flutter/engine`-side fix for https://github.com/flutter/flutter/issues/145043.

- Before this PR, if a negative image was encountered, we'd silently pass pre-submit, merge, and turn the tree red.
- After this PR, a negative image both makes pre and post-submit red.

Added tests, and fixed up some unrelated tests that were accidentally setting `pid` instead of `exitCode`. Oops!

/cc @zanderso and @eyebrowsoffire (current engine sheriff).
2024-03-27 18:58:47 +00:00
Brandon DeRosier
bbbb2e2f6a [Impeller] Use the scissor to limit all draws by clip coverage. (flutter/engine#51698)
Attempts to improve https://github.com/flutter/flutter/issues/145274.

Our new clipping technique paints walls on the depth buffer "in front" of the Entities that will be affected by said clips. So when an intersect clip is drawn (the common case), the clip will cover the whole framebuffer.

Depth is divvied up such that deeper clips get drawn _behind_ shallower clips, and so many clips actually don't end up drawing depth across the whole framebuffer. However, if the app does a lot of transitioning from a huge clips to a small clips, a lot of unnecessary depth churn occurs (very common in Flutter -- this happens with both the app bar and floating action button in the counter template, for example).

Since progressively deeper layers in the clip coverage stack always subset their parent layers, we can reduce waste for small intersect clips by setting the scissor to the clip coverage rect instead of drawing the clip to the whole screen.

Note that this change _does not_ help much with huge/fullscreen clips.

Also, we could potentially improve this further by computing much stricter bounds. Rather than just using clip coverage for the scissor, we could intersect it with the union of all draws affected by the clip at the cost of a bit more CPU churn per draw. I don't think that's enough juice for the squeeze though.

Before (`Play/AiksTest.CanRenderNestedClips/Metal`):

https://github.com/flutter/engine/assets/919017/7858400f-793a-4f7b-a0e4-fa3581198beb

After (`Play/AiksTest.CanRenderNestedClips/Metal`):

https://github.com/flutter/engine/assets/919017/b2f7c96d-a820-454d-91df-f5fae4976e91
2024-03-27 18:29:58 +00:00
Harry Terkelsen
a2f2c59db0 [canvaskit] Fix color filter for dst and dstIn (flutter/engine#51693)
When CanvasKit returns `null` for a ColorFilter, it indicates the
ColorFilter is a no-op, not that an error has occurred. This fixes the
engine to correctly handle when CanvasKit returns a null ColorFilter.

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

## 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].
- [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 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].
- [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-03-27 11:07:55 -07:00