1498 Commits

Author SHA1 Message Date
Brian Quinlan
13be0415cf Add a dependency on package:web_socket in pkg_demo_test (flutter/engine#52239)
`package:web_socket` is used by newer versions `package:web_socket_channel`.

[C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
2024-04-19 01:35:00 +00:00
gaaclarke
ed0a9bd410 [Impeller] removes advanced plus blending (flutter/engine#52163)
Now that https://github.com/flutter/engine/pull/52019 has landed, we
shouldn't need it anymore.

## 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-04-16 12:33:21 -07:00
Jason Simmons
50771f3ad4 Roll reclient, libpng, and zlib (flutter/engine#52072)
Based on https://github.com/flutter/engine/pull/52067
2024-04-16 18:31:30 +00:00
Jonah Williams
0951e43921 [scenarios] test disabling surface clear. (flutter/engine#52128)
I suspect that the change to clear the surface is the result of the
scenario app instability. just a guess: the screenshots looks like we're
missing the platform view. maybe the clearing of the surface is causing
an extra frame to be pushed. That frame is getting picked up in the
golden due to a race condition that is hard to hit locally


Testing disabling of this functionality in the golden test. If this pass
a real fix involves some sort of hook into the rendering to verify it
has fully completed before screenshotting.
2024-04-15 10:25:20 -07:00
Chinmay Garde
83c02bfc38 Remove intermediate APKs during build process. (flutter/engine#52071)
Found that these intermediates added a non-trivial amount of artifacts to the out directory. Folks run our of space because of the size of intermediates sometimes and this just exacerbates that problem.
2024-04-11 23:21:11 +00:00
Jason Simmons
7b2db7971e Enable gtest-parallel for Impeller unit tests (flutter/engine#52004)
Fixes https://github.com/flutter/flutter/issues/143330
2024-04-10 21:38:02 +00:00
auto-submit[bot]
c0bd2a3ce0 Reverts "Delete engine v1 android embedding (#51229)" (flutter/engine#51996)
Reverts: flutter/engine#51229
Initiated by: gmackall
Reason for reverting: blocking engine->framework roll (I missed some framework code referencing the v1 embedding).
Original PR Author: gmackall

Reviewed By: {matanlurey, reidbaker}

This change reverts the following previous change:
Fixes https://github.com/flutter/flutter/issues/143531

Also fixes a random typo I found

~TODO to test this~ (no more todo):
-~test the framework against this as well, probably with a dummy PR changing the engine commit to my branch if this is possible~ not possible, made a best effort removal of framework code in https://github.com/flutter/flutter/pull/144726.
-~figure out if the old embedding is used in g3 at all~ removed all uses
-~figure out exactly what the ShimPluginRegistry/ShimRegistrar are doing, and if fully deleting them was right~ (see https://github.com/flutter/engine/pull/51229#issuecomment-1981757743)

[C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
2024-04-09 19:13:47 +00:00
Gray Mackall
797e1ad902 Delete engine v1 android embedding (flutter/engine#51229)
Fixes https://github.com/flutter/flutter/issues/143531

Also fixes a random typo I found

TODO to test this:
-test the framework against this as well, probably with a dummy PR changing the engine commit to my branch if this is possible
-figure out if the old embedding is used in g3 at all
-~figure out exactly what the ShimPluginRegistry/ShimRegistrar are doing, and if fully deleting them was right~ (see https://github.com/flutter/engine/pull/51229#issuecomment-1981757743)

[C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
2024-04-09 18:03:17 +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
Zachary Anderson
5f5f524f33 Run local_engine.json builds in prod (flutter/engine#51931)
Finishes part 2 of https://github.com/flutter/flutter/issues/145263.

This required fixing a python script to use the version of Java obtained
through the DEPS file rather than one assumed to exist in the
environment.
2024-04-08 13:01:42 -07:00
Kallen Tu
86f00c760a Add missing_code_block_language_in_doc_comment lint to flutter/engine. (flutter/engine#51944)
Adds this Dartdoc-related lint to the flutter repository, in replacement
of the Dartdoc warning (`missingCodeBlockLanguage`) because it will be
deprecated and removed soon.

flutter/flutter already has this lint as well.

Lint Proposal: https://github.com/dart-lang/linter/issues/4904

## 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-04-08 11:57:12 -07:00
Jason Simmons
209b89244a Use the AOT snapshot built by the Dart SDK for the frontend server (flutter/engine#51943)
Dart will be removing the frontend server JIT snapshot.
(see https://dart.googlesource.com/sdk/+/e6c9eaaf6b63e5d3d0eefd7e95df9d10d9a25569)
2024-04-08 18:38:03 +00:00
Jonah Williams
ac08224a56 [Impeller] reland foreground blend optimizaiton, fix advanced blend optimization. (flutter/engine#51938)
Reverted in https://github.com/flutter/engine/pull/51679 due to https://github.com/flutter/flutter/issues/144109

The foreground blend cases where using the coverage rect to determine the resulting position and UVs. this only worked if the CTM was scale translate, in rotation/skew/perspective cases the coverage rect is incorrect for choosing the texture coordinate position. Instead of positioning w/ coverage, use the snapshot transform which includes the scale/translation and correctly applies other transforms.
2024-04-05 20:03:43 +00:00
auto-submit[bot]
ee494ad4dd Reverts "Manual Dart roll to 0ac840ba1 and update frontend server snapshot filename (#51921)" (flutter/engine#51927)
Reverts: flutter/engine#51921
Initiated by: zanderso
Reason for reverting: This Dart roll is blocking the roll of the engine to the framework. Unblocking the rolls depends on addressing https://github.com/flutter/flutter/issues/146164.
Original PR Author: jason-simmons

Reviewed By: {zanderso, jonahwilliams}

This change reverts the following previous change:
The Dart SDK is now only building an AOT snapshot for the frontend server (see https://dart-review.googlesource.com/c/sdk/+/359100)
2024-04-05 02:27:25 +00:00
Jason Simmons
564fc1e2d4 Manual Dart roll to 0ac840ba1 and update frontend server snapshot filename (flutter/engine#51921)
The Dart SDK is now only building an AOT snapshot for the frontend server (see https://dart-review.googlesource.com/c/sdk/+/359100)
2024-04-04 22:14:02 +00:00
Jason Simmons
84b23fcb89 Generate only one "Frame Request Pending" event for each pending call to BeginFrame (flutter/engine#51857)
Fixes https://github.com/flutter/flutter/issues/145853
2024-04-04 14:33:19 +00:00
Jonah Williams
b951d15850 [scenarios] Use adb to take screenshot, block on screenshot operation. (flutter/engine#51879)
Use the screenshotUtil signal to have the runner take a screenshot with adb. Block the screenshotter until this has completed.
2024-04-03 22:11:22 +00:00
Jonah Williams
958a9aa859 [Impeller] eliminate sub-render pass for blended color + texture vertices. (flutter/engine#51778)
Fixes https://github.com/flutter/flutter/issues/145707

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

If we're drawing vertices with per-color, a non-advanced blend, and a texture (with or without coordinates), use the porter duff shader to perform the blend without creating a sub render pass. IN addition to being more performant, this eliminates any potential rendering bugs caused by overlapping vertices.

This is not yet fixed for advanced blends.
2024-04-03 19:34:57 +00:00
Jonah Williams
483338a49e [scenarios] dont do a weird invalidate on TextView. (flutter/engine#51866)
I am now investigating why this is needed.
2024-04-03 17:18:10 +00:00
Matan Lurey
0619d4193f Use non-deprecated replacements for Android JUnit and test instrumentation (flutter/engine#51854)
Just removing some of the noise of walking through Java files in Android Studio, should be a NO-OP[^1].

- `androidx.test.runner.AndroidJUnit4` -> `androidx.test.ext.junit.runners.AndroidJUnit4`
- `androidx.test.InstrumentationRegistry` -> `androidx.test.platform.app.InstrumentationRegistry`

[^1]: Famous last words.
2024-04-03 04:26:14 +00:00
Michael Goderbauer
b71942aadb Remove outdated deprecated_member_use ignores (flutter/engine#51836)
These are obsolete with https://github.com/flutter/engine/pull/50575.
2024-04-03 02:28:51 +00:00
gaaclarke
75d7c6fc7b [Impeller] fixes PlusAdvanced alpha blending / adds alpha blending tests (flutter/engine#51787)
https://github.com/flutter/engine/pull/51756 had a bug in it when src
alpha was not 1. There was no test coverage for this. I've added the fix
and test coverage for all the blends.

## 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.
- [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-04-02 16:58:35 -07:00
Matan Lurey
d3cc586a58 Do not use adb shell screenrecord during CI runs. (flutter/engine#51848)
This introduced quite a bit of flakiness because the system UI sometimes (???) reappears:

![image](https://github.com/flutter/engine/assets/168174/c74a3b88-0d0c-4d03-894a-19837cb4f383)
2024-04-02 21:08:31 +00:00
Jonah Williams
444c075779 [Impeller] fix plus blend mode in porterduff shader. (flutter/engine#51792)
DrawAtlas already has the optimization in https://github.com/flutter/engine/pull/51778 and so it is still rendering incorrectly with wide gamut.
2024-04-02 20:21:52 +00:00
auto-submit[bot]
0434a4332f Reverts "Replace WindowInsetsController... with adb shell commands (#51843)" (flutter/engine#51847)
Reverts: flutter/engine#51843
Initiated by: matanlurey
Reason for reverting: broke tree because the bottom bar now shows up.
Original PR Author: matanlurey

Reviewed By: {jonahwilliams}

This change reverts the following previous change:
Previously our screenshots looked like this (when they ran correctly):
![image](https://github.com/flutter/engine/assets/168174/14d46a7a-9b60-4c5d-b786-a6cbee823ef9)

Now, sometimes (only on CI unfortunately) they look like this:
![image](https://github.com/flutter/engine/assets/168174/f4e49258-dcde-4864-b622-19c36c52f8b7)

This started happening after https://github.com/flutter/engine/pull/51832, but the change should be future-proof as well even if we disable the screen recording feature.

h/t @reidbaker
2024-04-02 19:32:48 +00:00
Matan Lurey
e124b252ae Replace WindowInsetsController... with adb shell commands (flutter/engine#51843)
Previously our screenshots looked like this (when they ran correctly):

![image](https://github.com/flutter/engine/assets/168174/14d46a7a-9b60-4c5d-b786-a6cbee823ef9)

Now, sometimes (only on CI unfortunately) they look like this:

![image](https://github.com/flutter/engine/assets/168174/f4e49258-dcde-4864-b622-19c36c52f8b7)

This started happening after
https://github.com/flutter/engine/pull/51832, but the change should be
future-proof as well even if we disable the screen recording feature.

h/t @reidbaker
2024-04-02 10:01:59 -07:00
K Lubick
4ec8483024 Use moved GrBackendTexture factories for Skia's Metal backend (flutter/engine#51828)
In https://skia-review.googlesource.com/c/skia/+/833302, Skia moved the
constructors for Metal versions of GrBackendTexture (and other
functions/methods). This updates uses in Flutter to use the new APIs.

## 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.
- [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-04-02 11:49:15 -04:00
Matan Lurey
a70095b10c Run and record adb shell screenrecord during Android scenario app (flutter/engine#51832)
More grasping at straws to solve https://github.com/flutter/flutter/issues/145988.

At some point this could be moved to `--verbose` if it isn't useful.

This will automatically be copied into `${FLUTTER_LOGS_DIR}`, yay!

Example:

https://github.com/flutter/engine/assets/168174/c8caca7a-88ec-4d09-88bd-ebfc531f6512
2024-04-01 22:49:47 +00:00
Matan Lurey
4ae59a2770 Remove tests related to StrictMode that were never running on CI. (flutter/engine#51827)
Closes https://github.com/flutter/flutter/issues/60635 as not planned.
2024-04-01 21:26:58 +00:00
Matan Lurey
9f1dd63dac Remove log statements that did not help. (flutter/engine#51825)
Introduced in https://github.com/flutter/engine/pull/51789, but none of the crashes/hangs on CI seem related to these events, so removing.
2024-04-01 21:19:53 +00:00
Matan Lurey
a16ee1a7ac Remove testing/android_background_image which does not run/exist on CI. (flutter/engine#51815)
I am guessing this just either served it's purpose (https://github.com/flutter/flutter/issues/26654, https://github.com/flutter/flutter/issues/26728) or didn't and was never followed up. I can't find any examples of it running on CI - I suspect if we want a test like this, we're better off just adding it to `scenario_app` versus creating more 1-off Android integration test environments.
2024-04-01 18:59:50 +00:00
Matan Lurey
6969c285f3 Remove unused and untested timeline data branch for scenario_app (flutter/engine#51816)
All of this appears to be completely unused and untested, and I don't see value in fixing it.
2024-04-01 18:06:52 +00:00
Matan Lurey
1fd40fb2e4 Never panic in finally { ... }, check output logs on success only. (flutter/engine#51814)
Work towards https://github.com/flutter/flutter/issues/145988.

Should be a NO-OP in behavior, but hopefully make some of the false negatives less confusing (i.e. getting "missing X outputted files when the test is about to fail anyway".
2024-04-01 17:33:02 +00:00
Zachary Anderson
2512c698ae Prefix non-local build config names with ci/ (flutter/engine#51474)
Part 1 of https://github.com/flutter/flutter/issues/145263

This PR updates the names of builds outside of `local_engine.json` to be
prefixed with the string `ci/` (or `ci\` on Windows). For better or
worse, the "name" field of a build is used to construct a path used as
the source directory of a copy operation (I think the CAS archive
step?). Because of that, changing the name of a build also requires
updating the build output directory of the ninja build.

This PR also adds tests to make sure the naming of these builds remains
consistent.
2024-03-31 12:43:02 -07:00
Matan Lurey
12ad79de4f Add more Java and Dart logging to scenario_app (for now) (flutter/engine#51789)
Work towards https://github.com/flutter/flutter/issues/145988.

... as well as handle `sigTerm` (perhaps would help us actually write out logs? we'll see)
2024-03-30 01:14:23 +00:00
Matan Lurey
61573f8d69 Implement Paint.from(other) for dart:ui. (flutter/engine#51110)
(Tenatively) Closes https://github.com/flutter/flutter/issues/142871.

I personally think this is a reasonable request, and we (framework authors) can make some users happy in a fairly simple way (https://github.com/flutter/flutter/issues/142871, https://github.com/flutter/flutter/issues/40497).

Some questions:

1. Is the web implementation good enough or would we want to "ship" with an optimized impl?
2. Can folks imagine other edge cases to test beyond correctness and deep/immutable copies?
2024-03-29 21:46:05 +00:00
Matan Lurey
e1a5c99a2a Remove the tests for rotate and crop from the Android scenario_app. (flutter/engine#51769)
Closes https://github.com/flutter/flutter/issues/145957.

As @jonahwilliams and @johnmccutchan and I discussed (https://github.com/flutter/flutter/issues/144407), the functionality that was being tested was actually _Android's_ ability to rotate and crop `SurfaceTexture`-backed textures. This same functionality doesn't even exist in the `ImageReader`-based textures (read: modern Android devices):

> Due to an oversight by Android, ImageReader backed surfaces do not respect metadata applied to the surface (rotation & crop). Rotation information is not available at all and crop information is corrupted by the ImageReader (only the width/height is propagated the origin offset is not).

We might decide to re-add this functionality in the Dart `Texture` widget, but given we'll be migrating our plugins to `SurfaceProducer` (again, read: using `ImageTexture` for most Android phones), it's pointless to test this (and isn't even testing Flutter's code).

This reduces our test suite significantly (8 tests down to 2), which should also help with runtime and flakiness.

/cc @zanderso who I'm sure will be stoked.
2024-03-29 20:10:09 +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
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
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
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
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
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
1cc55b8a1c [Impeller] Transform geometry to safe depth ranges instead of forcing discrete depth values. (flutter/engine#51673)
Resolves https://github.com/flutter/flutter/issues/144333. (Specifically, this [follow-up issue](https://github.com/flutter/flutter/issues/144333#issuecomment-2002399870))

When drawing objects with a perspective transform, the rasterizer applies perspective correction for interpolated vertex attributes. By absorbing W and replacing Z with a discrete value, we were essentially removing all perspective information and disabling perspective correction.

Instead, we can manipulate the Entity transform to remap the output Z range to fit within the small depth slices that each Entity is allotted.

The golden draws a clip sandwich:
1. Draw and restore a difference clip _before_ drawing the airplane image. This clip will get drawn to the depth buffer behind the airplane image.
2. Draw an oval clip that applies to the airplane image. This clip will get drawn in front of the airplane image on the depth buffer.
3. Draw the airplane image with a 3D rotation and perspective transform.
4. Draw a semi-translucent blue circle atop all previous draws.

Before:

https://github.com/flutter/engine/assets/919017/c2a7d012-714e-4234-83ac-61c792172f30

After:

https://github.com/flutter/engine/assets/919017/de3b78ff-00bf-4bc9-8821-8e86b9a9e6bf
2024-03-27 17:25:07 +00:00
Matan Lurey
c935c3ba36 Fail pre-submit if a negative image is encountered as part of goldctl imgtest add. (flutter/engine#51685)
`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 16:46:22 +00:00
hellohuanlin
34f5c82ffc [ios]ignore single edge pixel instead of rounding (flutter/engine#51687)
The previous PR https://github.com/flutter/flutter/issues/143420 rounds out the layers and rounds in the platform views. This results in missing pixel on the edge of the intersection when there's fractional coordinate (as shown in the screenshot below), because platform view is below the layers. 

It turns out that we have to round out both platform view and layers, because: 
- rounding in platform view rects will result in missing pixels on the edge of the intersection. 
- rounding in layer rects will result in missing pixels on the edge of the layer that's on top of the platform view. 

This PR simply skips the single (or partial) pixel on the edge, which is a special case, while still preserve the `roundOut` behavior for general non-edge cases. 

Before the fix, notice a very thin gray line cutting through the purple box: 

<img src="https://github.com/flutter/engine/assets/41930132/1482d81a-337e-4841-ac08-eff08bbc71ef" height="500">

Then after the fix, the gray line is gone: 

<img src="https://github.com/flutter/engine/assets/41930132/0eddae69-ab62-4de6-8932-c67cc5aced73" height="500">

*List which issues are fixed by this PR. You must list at least one issue.*

https://github.com/flutter/flutter/issues/143420

*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
2024-03-27 16:46:19 +00:00
hellohuanlin
9c54875efc [ios][platform_view][performance] overlay intersection (flutter/engine#50637)
Address the performance of platform view due to an extra overlay. This overlay was added due to the following rounding problem: 

> For example, if we interleave flutter widget and platform view in a list, and let's say we have a flutter widget (top = 0, bottom = 100.1), and a platform view below that widget (top = 100.1, bottom = 200). They are NOT supposed to be overlapping. However, after rounding out, we will get flutter widget (top = 0, bottom = 101), and platform view (top = 100, bottom 200). This will result in 1 pixel overlap as long as there's a floating point in the coord.

(Quote myself from the discussion below). 

*List which issues are fixed by this PR. You must list at least one issue.*

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

*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
2024-03-21 23:48:34 +00:00
Jason Simmons
762d37fd2e Move //buildtools to //flutter/buildtools (flutter/engine#51526) 2024-03-21 17:06:44 +00:00