27884 Commits

Author SHA1 Message Date
Chinmay Garde
3a10aabff9 [Impeller] Remove implicit calls to glGetError in opt modes. (flutter/engine#54016)
This many explicit calls are all but useless unless you are doing bringup. And we do that in unopt modes anyway. Having this on in even the debug and profile opt modes was turning out to be pretty egregious.
2024-07-22 17:16:02 +00:00
auto-submit[bot]
508890ef88 Reverts "[Impeller] enable ahb swapchain on emulators. (#54019)" (flutter/engine#54022)
Reverts: flutter/engine#54019
Initiated by: jonahwilliams
Reason for reverting: does not work on CI emulators
Original PR Author: jonahwilliams

Reviewed By: {chinmaygarde}

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

This works now that the backpressure issue is fixed. Maybe the wait semaphore didn't work, but the CPU wait on the fence does.
2024-07-22 16:51:47 +00:00
Jonah Williams
dd16661b5c [Impeller] enable ahb swapchain on emulators. (flutter/engine#54019)
Fixes  https://github.com/flutter/flutter/issues/147533

This works now that the backpressure issue is fixed. Maybe the wait semaphore didn't work, but the CPU wait on the fence does.
2024-07-22 15:50:19 +00:00
Jonah Williams
0e9b328fc2 [Impeller] detect max cull rect on bounds. (flutter/engine#54013)
Fixes https://github.com/flutter/flutter/issues/151785

if the bounds given to impeller SaveLayer is kMaxCullRect, treat this as unbounded.
2024-07-20 17:29:28 +00:00
Jonah Williams
5c954b9cfe [Impeller] try disabling backpressure in AHB swapchain. (flutter/engine#54012)
Enabling the ahb backpressure has increased frame times - probably because this is now WAI and delaying the HB readyness. Lets try disabling it before we back out the AHB swapchain again.

See https://flutter-flutter-perf.skia.org/e/?begin=1721400948&end=1721487348&queries=device_type%3DPixel_7_Pro%26sub_result%3D90th_percentile_frame_rasterizer_time_millis%26sub_result%3D99th_percentile_frame_rasterizer_time_millis%26sub_result%3Daverage_frame_rasterizer_time_millis%26sub_result%3Dworst_frame_rasterizer_time_millis%26test%3Dnew_gallery_impeller__transition_perf&selected=commit%3D41656%26name%3D%252Carch%253Dintel%252Cbranch%253Dmaster%252Cconfig%253Ddefault%252Cdevice_type%253DPixel_7_Pro%252Cdevice_version%253Dnone%252Chost_type%253Dlinux%252Csub_result%253D90th_percentile_frame_rasterizer_time_millis%252Ctest%253Dnew_gallery_impeller__transition_perf%252C

Test: this is all benchmark performance we're testing.
2024-07-20 17:21:25 +00:00
Chris Bracken
a03068b535 [iOS] Eliminate --clang-dir flag (flutter/engine#54008)
This is only ever used for gen_snapshot_arm64 where the value will only
ever be 'clang_x64'. If we were to migrate builds to arm64 hosts, the
gen_snapshot_x64 target would be broken as the script stands today.

This flag is never passed by recipe infra or outside callers, and can
thus be safely inlined. The same refactoring was performed for
generating universal gen_snapshots in #53954.

A followup patch will update the location where this gen_snapshot binary
is generated (and adds an arm64 host binary build), and the merged
universal gen_snapshot_${target_cpu} will be written to the root output
directory.

This is minor pre-factoring to simplify the followup patch, which
migrates to universal binaries for iOS.

Issue: https://github.com/flutter/flutter/issues/101138
Issue: https://github.com/flutter/flutter/issues/69157
2024-07-19 17:31:38 -07:00
Chris Bracken
89811b3627 Move !is_android to build_engine_artifacts declaration (flutter/engine#54006)
The `//flutter/build/archives:artifacts` target is used to build a zip
archive (artifacts.zip) of host tools such as flutter_tester, the Dart
kernel compiler, the impellerc shader compiler, and other tooling that
is bundled in debug-mode host builds.

This moves the `!is_android` to the definition of
`build_engine_artifacts`. This is required because of the way that we
produce 32-bit arm gen_snapshot for Android on Windows hosts, which
relies on the regular x64 host toolchain due to us having no 32-bit arm
toolchain for Windows. As such, `current_toolchain == host_toolchain` on
that platform.

```
build_engine_artifacts =
    flutter_build_engine_artifacts &&
    (current_toolchain == host_toolchain ||
     (is_linux && !is_chromeos && current_cpu != "arm") || is_mac || is_win)
```

On iOS builds, we don't have this issue since `current_toolchain` will
be one of:
* `//build/toolchain/mac:ios_clang_arm`
* `//build/toolchain/mac:ios_clang_arm_sim`
* `//build/toolchain/mac:ios_clang_x64_sim`

Whereas `host_toolchain` will be one of:
* `//build/toolchain/mac:clang_arm64`
* `//build/toolchain/mac:clang_x64`

This patch also adds documentation to clarify the purpose of this target
and where related artifacts are produced so that future readers don't
need to do a deep dive into our build plumbing to figure this out.

While the target itself is primarily intended for producing host
binaries, one target binary (gen_snapshot) is bundled into the same
archive bundle as the host tools. This should be refactored such that
just like iOS and Android, they are bundled into their own
target-platform-specific archive, and the tool code accordingly updated
to pull these down into the appropriate cache directory.

As a side-note, on macOS we do rely on this archive target for the host
tools, but the bundled gen_snapshot is unused -- instead, one produced
by the //flutter/sky/tools/create_macos_gen_snapshots.py script used.
This should be fixe in a followup patch.

Related: https://github.com/flutter/flutter/issues/38935

Identified while trying to resolve:
Issue: https://github.com/flutter/flutter/issues/101138
Issue: https://github.com/flutter/flutter/issues/69157

## 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-07-19 13:34:28 -07:00
Zachary Anderson
63d8e2bbe6 [et] Plumb -j to ninja (flutter/engine#54005)
Also computes a better `-j` when RBE is enabled.

Fixes https://github.com/flutter/flutter/issues/147667
2024-07-19 20:28:47 +00:00
Jonah Williams
7b3144290f [Impeller] re-enable AHB swapchain. (flutter/engine#53978)
Fixes https://github.com/flutter/flutter/issues/148139

Block on the CPU rather than immediately beginning encoding. Seems to fix the synchronization issues that we knew about. We need to find a way to use AHB swapchains, as it seems like correct synchronization via either SurfaceView or a SurfaceControl hierarchy will require exposing our rendering as a SurfaceTransaction.
2024-07-19 20:05:12 +00:00
Harry Terkelsen
9e797d1461 [canvaskit] Decode images using <img> tag decoding (flutter/engine#53201)
Prefer to decode images using the browser API rather than with CanvasKit to avoid jank when decoding.

Part of deprecating the HTML renderer: https://github.com/flutter/flutter/issues/145954

[C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
2024-07-19 17:41:05 +00:00
auto-submit[bot]
7b931a25de Reverts "Reverts "Drop deprecated hash_code functions (#54000)" (#54002)" (flutter/engine#54004)
Reverts: flutter/engine#54002
Initiated by: kevmoo
Reason for reverting: the issue in google 3 has been fixed.
Original PR Author: auto-submit[bot]

Reviewed By: {fluttergithubbot}

This change reverts the following previous change:
Reverts: flutter/engine#54000
Initiated by: chingjun
Reason for reverting: Broke Google Testing.

See b/352191023 for more details.
Original PR Author: kevmoo

Reviewed By: {jonahwilliams}

This change reverts the following previous change:
Fixes https://github.com/flutter/flutter/issues/151679
2024-07-19 14:54:29 +00:00
auto-submit[bot]
b23bc03d6d Reverts "Drop deprecated hash_code functions (#54000)" (flutter/engine#54002)
Reverts: flutter/engine#54000
Initiated by: chingjun
Reason for reverting: Broke Google Testing.

See b/352191023 for more details.
Original PR Author: kevmoo

Reviewed By: {jonahwilliams}

This change reverts the following previous change:
Fixes https://github.com/flutter/flutter/issues/151679
2024-07-19 05:33:47 +00:00
Chris Bracken
08c30a87bd Upgrade third_party/pyyaml to 03c67afd452cdff45b41bfe65e19a2fb5b80a0e8 (flutter/engine#54001)
We were using a very old version of this library that broke with
Python3.12. This updates to a Python 3.12 compatible SHA.

The specific breakage at the former commit was that
`collections.Hashable` was deprecated and moved to
`collections.abc.Hashable` in Python 3.7. It was removed in Python 3.8.
For anyone on newer versions of Python3, such as Python 3.9.6 which
ships with macOS 15 Sequoia, this is broken.

The error on versions of Python newer than 3.8 is:
```
________ running 'python3 src/flutter/tools/pub_get_offline.py' in '/Users/chris/Developer/flutter/engine'
Traceback (most recent call last):
  File "/Users/chris/Developer/flutter/engine/src/flutter/tools/pub_get_offline.py", line 167, in <module>
    sys.exit(main())
             ^^^^^^
  File "/Users/chris/Developer/flutter/engine/src/flutter/tools/pub_get_offline.py", line 157, in main
    if not package_uses_workspace_resolution(package):
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/chris/Developer/flutter/engine/src/flutter/tools/pub_get_offline.py", line 76, in package_uses_workspace_resolution
    return yaml.safe_load(pubspec_file).get('resolution') == 'workspace'
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/chris/Developer/flutter/engine/src/flutter/tools/../third_party/pyyaml/lib3/yaml/__init__.py", line 75, in load
    return loader.get_single_data()
           ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/chris/Developer/flutter/engine/src/flutter/tools/../third_party/pyyaml/lib3/yaml/constructor.py", line 37, in get_single_data
    return self.construct_document(node)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/chris/Developer/flutter/engine/src/flutter/tools/../third_party/pyyaml/lib3/yaml/constructor.py", line 46, in construct_document
    for dummy in generator:
  File "/Users/chris/Developer/flutter/engine/src/flutter/tools/../third_party/pyyaml/lib3/yaml/constructor.py", line 398, in construct_yaml_map
    value = self.construct_mapping(node)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/chris/Developer/flutter/engine/src/flutter/tools/../third_party/pyyaml/lib3/yaml/constructor.py", line 204, in construct_mapping
    return super().construct_mapping(node, deep=deep)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/chris/Developer/flutter/engine/src/flutter/tools/../third_party/pyyaml/lib3/yaml/constructor.py", line 126, in construct_mapping
    if not isinstance(key, collections.Hashable):
                           ^^^^^^^^^^^^^^^^^^^^
AttributeError: module 'collections' has no attribute 'Hashable'
Error: Command 'python3 src/flutter/tools/pub_get_offline.py' returned non-zero exit status 1 in /Users/chris/Developer/flutter/engine
```


## 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-07-18 20:17:31 -07:00
Robert Ancell
7855b2c857 Don't leak binary messenger in tests (flutter/engine#53985)
Looks like the original code was just copied around. Should have no
effect on the tests other than making it easier to detect other leaks.
2024-07-19 14:36:32 +12:00
Kevin Moore
fdd23ed3f2 Drop deprecated hash_code functions (flutter/engine#54000)
Fixes https://github.com/flutter/flutter/issues/151679
2024-07-19 02:11:17 +00:00
Robert Ancell
4a63063be6 Renamed plugin classes to handler (flutter/engine#53736)
The Linux embedder had a number of handlers for Flutter channels that
were named plugin/handler/manager. Rename these all to handler to be
consistent and reduce confusion with Flutter plugins (which these don't
use the infrastructure for).
2024-07-19 12:44:41 +12:00
Jackson Gardner
f4bab93f77 [skwasm] Combine offset and transform properly. (flutter/engine#53967)
Our treatment of the interaction between offset and transform was incorrect. Modified our platform view unit tests to cover more cases of nested offsets and transforms.
2024-07-18 21:44:08 +00:00
Matan Lurey
767eb5b265 Gracefully fail when gn desc returns no targets. (flutter/engine#53999)
Closes https://github.com/flutter/flutter/issues/151990.

This is just a nice QOL change, since the `//` format we're using is not "native" to GN or Ninja.
2024-07-18 21:44:06 +00:00
Bruno Leroux
42ec2e55c5 [Android] Call restartInput selectively on clear (flutter/engine#53662)
## Description

This PR restricts the call to `restartInput` which was added in https://github.com/flutter/engine/pull/49829.
The restart is called when input action is null, DONE, or NONE.

## Related Issue

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

## Tests

Updates 1 test, adds 3 tests.
2024-07-18 20:27:33 +00:00
Zachary Anderson
441fb4562c Fix race in image_filter_test.dart (flutter/engine#53996)
Fixes https://github.com/flutter/flutter/issues/151973
2024-07-18 17:47:05 +00:00
skia-flutter-autoroll
aa48f15670 Roll Dart SDK from 7b3c16ac1cf9 to 0f61238a27b0 (1 revision) (flutter/engine#53995)
https://dart.googlesource.com/sdk.git/+log/7b3c16ac1cf9..0f61238a27b0

2024-07-18 dart-internal-merge@dart-ci-internal.iam.gserviceaccount.com Version 3.6.0-55.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,zra@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-07-18 17:33:08 +00:00
Matan Lurey
50e4e12c2e Add a "pub workspace" to the root of the engine repository (flutter/engine#53539)
... and use it in `engine_tool` to prove everything is working, i.e. on CI and elsewhere.

Partial work towards https://github.com/flutter/flutter/issues/147883.
Supersedes and closes https://github.com/flutter/engine/pull/51782 (which was a prototype).

See also:
- https://flutter.dev/go/pub-workspace, the design doc on the feature.
- https://github.com/dart-lang/pub-dev/pull/7762, an example PR.

I'll probably end up moving the inline docs in `pubspec.yaml` to a `docs/*.md` once that's a thing.
2024-07-18 16:18:09 +00:00
skia-flutter-autoroll
fd4eaf4fda Roll Skia from 9d391088f52c to 939e1dac9815 (1 revision) (flutter/engine#53990)
https://skia.googlesource.com/skia.git/+log/9d391088f52c..939e1dac9815

2024-07-18 michaelludwig@google.com [graphite] Snap non-AA stroke rects

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,kjlubick@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 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-07-18 15:25:01 +00:00
skia-flutter-autoroll
453c616fbd Roll Dart SDK from 1597fa7cb445 to 7b3c16ac1cf9 (1 revision) (flutter/engine#53988)
https://dart.googlesource.com/sdk.git/+log/1597fa7cb445..7b3c16ac1cf9

2024-07-18 dart-internal-merge@dart-ci-internal.iam.gserviceaccount.com Version 3.6.0-54.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,zra@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-07-18 13:03:27 +00:00
Robert Ancell
dde01765c9 Use glBlitFramebuffer when rendering (flutter/engine#53080)
This is much faster than using a shader which is not required currently
(we are not doing any transformations).
2024-07-18 16:02:39 +12:00
skia-flutter-autoroll
095683b513 Roll Skia from c670953cacb0 to 9d391088f52c (1 revision) (flutter/engine#53981)
https://skia.googlesource.com/skia.git/+log/c670953cacb0..9d391088f52c

2024-07-17 brianosman@google.com Update stroker code to use SkPoint idiomatically

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,kjlubick@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 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-07-18 03:37:21 +00:00
skia-flutter-autoroll
59354c265a Roll Dart SDK from 9b9ca1ff944d to 1597fa7cb445 (1 revision) (flutter/engine#53983)
https://dart.googlesource.com/sdk.git/+log/9b9ca1ff944d..1597fa7cb445

2024-07-17 dart-internal-merge@dart-ci-internal.iam.gserviceaccount.com Version 3.6.0-53.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,zra@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-07-18 01:39:10 +00:00
skia-flutter-autoroll
3546761dad Roll Fuchsia Linux SDK from C_ze_BbJWtfB9GdOA... to PefNEmf1_cZtEGlZc... (flutter/engine#53982)
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 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-07-18 01:35:25 +00:00
skia-flutter-autoroll
38a5868dbf Roll Skia from e7844530e828 to c670953cacb0 (1 revision) (flutter/engine#53979)
https://skia.googlesource.com/skia.git/+log/e7844530e828..c670953cacb0

2024-07-17 skia-autoroll@skia-public.iam.gserviceaccount.com Roll skcms from bc467ef5ef35 to 2395877dc55f (1 revision)

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,kjlubick@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 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-07-18 00:05:23 +00:00
Jim Graham
2d58c39615 [Impeller] Convert basic AIKS golden tests to use DisplayList (flutter/engine#53969)
Converts several AIKS golden tests to use DisplayList as the mechanism.

In order to convert some of the tests, new factory methods were added to DlColor and tested with new unit tests (an earlier golden test conversion PR had a version of this as well).

Also, a new DisplayList record op was created for ClipOval to handle the AIKS clipping golden tests, but this new recording op is not used from Flutter `ui` code (no plumbing to call it from `lib/ui/painting` or to convert any other DisplayList call to use the new record). An earlier attempt to add the new recording op caused a large number of golden changes upstream so this version will only be used for internal tests and support to use it from apps will follow in more targeted PRs to better manage golden changes. This PR should not result in any changes to goldens outside of internal engine tests.
2024-07-17 23:11:55 +00:00
skia-flutter-autoroll
4f9e912bef Roll Skia from 546120aeaa44 to e7844530e828 (1 revision) (flutter/engine#53976)
https://skia.googlesource.com/skia.git/+log/546120aeaa44..e7844530e828

2024-07-17 brianosman@google.com Remove legacy tangent code from path stroker

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,kjlubick@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 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-07-17 22:17:11 +00:00
Chris Bracken
b3ef1d38e9 Add doc comments to build/archives/BUILD.gn (flutter/engine#53973)
The existing comment on gen_snapshot is unclear. Adds comments where
they were missing. Saves future readers some digging through git blame.

## 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.
- [ ] 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-07-17 14:44:36 -07:00
skia-flutter-autoroll
200f231572 Roll Dart SDK from d679a4c98193 to 9b9ca1ff944d (1 revision) (flutter/engine#53975)
https://dart.googlesource.com/sdk.git/+log/d679a4c98193..9b9ca1ff944d

2024-07-17 dart-internal-merge@dart-ci-internal.iam.gserviceaccount.com Version 3.6.0-52.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,zra@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-07-17 21:29:47 +00:00
skia-flutter-autoroll
43d518ddf2 Roll Skia from 5efad82d5387 to 546120aeaa44 (5 revisions) (flutter/engine#53972)
https://skia.googlesource.com/skia.git/+log/5efad82d5387..546120aeaa44

2024-07-17 robertphillips@google.com [graphite] Rearrange code in PaintParamsKeyTest
2024-07-17 kjlubick@google.com Generate HLSL outputs as part of the CheckGeneratedFiles job
2024-07-17 bungeman@google.com Define TestRegistry
2024-07-17 bungeman@google.com Put AndroidBlendModesGM in anonymous namespace
2024-07-17 bungeman@google.com Explicilty list SkOSFile_ios.h in gn build

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,kjlubick@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 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-07-17 20:38:04 +00:00
skia-flutter-autoroll
4777d3429e Roll Skia from 485bf4ff886b to 5efad82d5387 (1 revision) (flutter/engine#53968)
https://skia.googlesource.com/skia.git/+log/485bf4ff886b..5efad82d5387

2024-07-17 bungeman@google.com Remove AnimCodecPlayerGM

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,kjlubick@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 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-07-17 19:20:36 +00:00
Chris Bracken
0362798caa [macOS] Archive universal gen_snapshot binaries (flutter/engine#53962)
In #53524, we started producing universal `gen_snapshot_arm64` and `gen_snapshot_x64` binaries. This migrates away from bundling `gen_snapshot` binaries with x64-only host architecture to universal binaries that bundle both x64 and arm64 host architectures.

Also adds a dependency on `flutter/lib/snapshot:create_macos_gen_snapshots` to the profile build, where it was previously missing. Presumably, `gen_snapshot` was being built as a side-effect of one of the other targets.

Issue: https://github.com/flutter/flutter/issues/101138
Issue: https://github.com/flutter/flutter/issues/69157

[C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
2024-07-17 19:06:16 +00:00
Chris Bracken
55adc66829 Clean up create_macos_gen_snapshots.py options (flutter/engine#53954)
This patch updates `create_macos_gen_snapshots.py` to take the path to
the input `gen_snapshot` binaries rather than just the path to the
buildroot, and hardcoding the binary names and buildroot-relative paths
internally.

This has a couple advantages:
* Those grepping the source for gen_snapshot to see where it's bundled
will immediately find it in the recipe JSON as a parameter to this
script.
* In future (the next patch I send out) we can pass different input
paths that point to gen_snapshot binaries that are universal binaries.
The current binaries are single-architecture x64 host binaries.

This is a refactoring with no semantic change, therefore no tests have
changed.

Background
----------

`create_macos_gen_snapshot.py` is used to:
* Generate a named copy of gen_snapshot for the specified target
architecture: e.g. gen_snapshot_arm64, gen_snapshot_x64
* Strip bitcode, if present. Today, bitcode is no longer enabled by
default.
* Create a zip archive containing the (two) gen_snapshot binaries and
bundle with an entitlements.txt file.

Issue: https://github.com/flutter/flutter/issues/151848

This is refactoring to support:
Issue: https://github.com/flutter/flutter/issues/101138
Issue: https://github.com/flutter/flutter/issues/69157

## 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've dealt with this script more than any one person should ever
have to deal with such a thing in one lifetime.
- [ ] 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-07-17 09:40:13 -07:00
skia-flutter-autoroll
6fdd08930a Roll Dart SDK from 7368b1d084b0 to d679a4c98193 (3 revisions) (flutter/engine#53961)
https://dart.googlesource.com/sdk.git/+log/7368b1d084b0..d679a4c98193

2024-07-17 dart-internal-merge@dart-ci-internal.iam.gserviceaccount.com Version 3.6.0-51.0.dev
2024-07-17 dart-internal-merge@dart-ci-internal.iam.gserviceaccount.com Version 3.6.0-50.0.dev
2024-07-17 dart-internal-merge@dart-ci-internal.iam.gserviceaccount.com Version 3.6.0-49.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,zra@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-07-17 16:34:52 +00:00
skia-flutter-autoroll
73fd4f5883 Roll Skia from 7ebcb7ea944e to def61bdd977a (1 revision) (flutter/engine#53959)
https://skia.googlesource.com/skia.git/+log/7ebcb7ea944e..def61bdd977a

2024-07-17 robertphillips@google.com [graphite] Add YUV image shader to Precompilation system

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,nicolettep@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 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-07-17 14:24:29 +00:00
skia-flutter-autoroll
beacc7d0dd Roll Skia from 80dde3f27830 to d19c61e55ea6 (3 revisions) (flutter/engine#53956)
https://skia.googlesource.com/skia.git/+log/80dde3f27830..d19c61e55ea6

2024-07-17 skia-autoroll@skia-public.iam.gserviceaccount.com Roll SK Tool from 298c34c0e789 to 35f1db95b279
2024-07-17 skia-autoroll@skia-public.iam.gserviceaccount.com Roll Skia Infra from 736d19678782 to 298c34c0e789 (8 revisions)
2024-07-17 skia-autoroll@skia-public.iam.gserviceaccount.com Roll Dawn from 16be0748ef57 to 50a01de3a8ed (22 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,nicolettep@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 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-07-17 07:18:24 +00:00
David Iglesias
1960bc9b52 [web] Set touch-action:none in embedded views. (flutter/engine#53945)
This PR adds `touch-action:none` to `flutter-view` elements, so the browser lets the flutter engine fully handle all touch gestures.

This fix is more delicate than the first approach, which broke some merged taps when accessibility/semantics are enabled. 

## Issues

* Found while testing: https://github.com/flutter/flutter/issues/130950
* "More correct" fix for: https://github.com/flutter/engine/pull/53647

## Demos

* Flutter scroll: https://dit-multiview-scroll.web.app
* Semantics: https://dit-tests.web.app
* Scrollable platform views: https://dit-multiview-tests.web.app

[C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
2024-07-17 02:08:37 +00:00
skia-flutter-autoroll
0f762f543a Roll Skia from d1478885de20 to 4c50b51875d4 (4 revisions) (flutter/engine#53953)
https://skia.googlesource.com/skia.git/+log/d1478885de20..4c50b51875d4

2024-07-16 skia-autoroll@skia-public.iam.gserviceaccount.com Roll vulkan-deps from 99f840c7c7ad to 472fd6a2d49e (11 revisions)
2024-07-16 brianosman@google.com Disable advanced blend equation for ANGLE + Intel
2024-07-16 michaelludwig@google.com [graphite] Snap filled non-aa rectangles to pixel coordinates
2024-07-16 jvanverth@google.com [graphite] Enable yuv_make_color_space GM.

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,nicolettep@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 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-07-17 00:28:37 +00:00
skia-flutter-autoroll
11f22a85d3 Manual roll Dart SDK from b44d99ea2bf4 to 7368b1d084b0 (12 revisions) (flutter/engine#53949)
Manual roll requested by asiva@google.com

https://dart.googlesource.com/sdk.git/+log/b44d99ea2bf4..7368b1d084b0

2024-07-16 dart-internal-merge@dart-ci-internal.iam.gserviceaccount.com
Version 3.6.0-48.0.dev
2024-07-16 dart-internal-merge@dart-ci-internal.iam.gserviceaccount.com
Version 3.6.0-47.0.dev
2024-07-16 dart-internal-merge@dart-ci-internal.iam.gserviceaccount.com
Version 3.6.0-46.0.dev
2024-07-16 dart-internal-merge@dart-ci-internal.iam.gserviceaccount.com
Version 3.6.0-45.0.dev
2024-07-16 dart-internal-merge@dart-ci-internal.iam.gserviceaccount.com
Version 3.6.0-44.0.dev
2024-07-15 dart-internal-merge@dart-ci-internal.iam.gserviceaccount.com
Version 3.6.0-43.0.dev
2024-07-15 dart-internal-merge@dart-ci-internal.iam.gserviceaccount.com
Version 3.6.0-42.0.dev
2024-07-15 dart-internal-merge@dart-ci-internal.iam.gserviceaccount.com
Version 3.6.0-41.0.dev
2024-07-15 dart-internal-merge@dart-ci-internal.iam.gserviceaccount.com
Version 3.6.0-40.0.dev
2024-07-13 dart-internal-merge@dart-ci-internal.iam.gserviceaccount.com
Version 3.6.0-39.0.dev
2024-07-13 dart-internal-merge@dart-ci-internal.iam.gserviceaccount.com
Version 3.6.0-38.0.dev
2024-07-12 dart-internal-merge@dart-ci-internal.iam.gserviceaccount.com
Version 3.6.0-37.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 asiva@google.com,dart-vm-team@google.com,zra@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-07-16 16:33:15 -07:00
Brandon DeRosier
fc18d5bc59 [Impeller] Use depth transform in framebuffer blend entities. (flutter/engine#53951)
\Without this the depth always ends up being a very large z depth of 0.5, which can cause clips to be ignored.
2024-07-16 23:17:17 +00:00
Chris Bracken
22116874ea [macOS] Eliminate archive_gen_snapshot target (flutter/engine#53948)
This target produced an unused zipfile named `gen_snapshot.zip` containing the `gen_snapshot_${target_arch}` binary for the current build's target architecture.

The macOS recipe JSON produces the real `gen_snapshot.zip` that gets uploaded to the cloud bucket and pulled down by the tool. See: 29a474fe3e/ci/builders/mac_host_engine.json (L555-L592)

The recipe did, however, rely on the `archive_gen_snapshot` rule to ensure that the underlying `gen_snapshot` targets were actually built. See, for example:
29a474fe3e/ci/builders/mac_host_engine.json (L45)

A few benefits:
* Eliminates an unnecessary zip operation.
* Eliminates confusion from grepping for gen_snapshot.zip and finding the wrong location in the source.
* Grepping for create_macos_gen_snapshots will turn up the usage in the JSON build file.

[C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
2024-07-16 21:44:06 +00:00
Chris Bracken
1125840b1d [iOS] Delete gen_snapshot_armv7 support (flutter/engine#53947)
We dropped support for armv7 iOS devices in:
* Framework: flutter/flutter#97342.
* Buildroot: flutter/buildroot#569
* Engine: https://github.com/flutter/engine/pull/32664
* Recipes:
  * https://flutter-review.googlesource.com/c/recipes/+/29060
  * https://flutter-review.googlesource.com/c/recipes/+/29060 (revert)
  * https://flutter-review.googlesource.com/c/recipes/+/29582 (reland)
* Issue: flutter/flutter#97345

This eliminates the code (and an unused flag) to deal with producing zip archives including components for the armv7 architecture.

[C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
2024-07-16 21:16:14 +00:00
skia-flutter-autoroll
ef0bd672df Roll Skia from f9422e08a793 to d1478885de20 (3 revisions) (flutter/engine#53946)
https://skia.googlesource.com/skia.git/+log/f9422e08a793..d1478885de20

2024-07-16 nathanasanchez@google.com [Graphite][SkSL] Use std430 for storage buffers in Vulkan
2024-07-16 nathanasanchez@google.com [Graphite][SkSL] Conditionally force std430 array stride
2024-07-16 nathanasanchez@google.com [SkSL] Add mirrored SPIR-V storage class enum

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,nicolettep@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 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-07-16 21:08:13 +00:00
Yegor
27f1487a70 [web] fix unexpected scrolling in semantics (flutter/engine#53922)
Always mark scrollable containers with `role="group"` to prevent the browser from merging all child elements into one giant string. Default to `preventScroll` to true across the web engine code, because it's a better default for Flutter than otherwise.

Fixes https://github.com/flutter/flutter/issues/130950
2024-07-16 21:04:39 +00:00
Gray Mackall
29a474fe3e More logs for Android unsatisfiedLinkError (flutter/engine#53920)
See https://github.com/flutter/flutter/issues/83596#issuecomment-2140605278, there are two cases:
1. IO issue
2. The directory doesn't exist

Narrow down by including in the logs if the directory exists or not.

[C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
2024-07-16 20:12:03 +00:00
skia-flutter-autoroll
b5c34fcc09 Roll Fuchsia Linux SDK from VlZIUknh6dnA23owe... to C_ze_BbJWtfB9GdOA... (flutter/engine#53941)
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 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-07-16 18:18:14 +00:00