38396 Commits

Author SHA1 Message Date
Chris Bracken
13c156630a iOS: Make FlutterViewController.engine a strong ref (flutter/engine#56663)
Previously, FlutterViewController.engine was declared as a weak readonly property, but we explicitly declared the `FlutterEngine* _engine` ivar as a strong reference in the implementation. This changes the property declaration to be strong and eliminates the now unnecessary ivar.

There is also no semantic change to FlutterViewController itself, since the `_engine` ivar had been manually declared as a strong reference.

There is no semantic change for users of FlutterViewController.engine since whether a user acquires a strong or weak reference to the engine is determined by whether they declare the pointer to which they assign it as strong or weak.

This also eliminates the need for the `engine` getter, which was only present to prevent a warning that the strong ivar didn't match the weak property declaration.

No changes to tests since this introduces no semantic changes.

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

[C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
2024-11-17 22:41:39 +00:00
Chris Bracken
20e0482db7 iOS: Clean up uses of string literal constants (flutter/engine#56658)
Three changes related to string constants:

1. Uses the kIOSurfaceColorSpace constant, which is a CFStringRef pointing to the string "IOSurfaceColorSpace"

2. Uses the kCVPixelFormatType_32BGRA enum value from the CoreVideo headers (which is equal to 'BGRA') in place of hardcoding the string.

From the headers:
```
kCVPixelFormatType_32BGRA         = 'BGRA',     /* 32 bit BGRA */
```

3. Declares kIOServicePlane as a `constexpr const char*` rather than `static const char*`, this ensures only a single instance is created, rather than one per translation unit into which the header is included. This string is part of IOKit, but see the comment at the top of the header as to why it's apparently needed.

No test changes since there are no semantic changes.

[C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
2024-11-17 22:30:19 +00:00
skia-flutter-autoroll
f04c3db30f Roll Skia from 1086e39c04cf to 4708534db2e7 (1 revision) (flutter/engine#56657)
https://skia.googlesource.com/skia.git/+log/1086e39c04cf..4708534db2e7

2024-11-17 skia-autoroll@skia-public.iam.gserviceaccount.com Roll vulkan-deps from 51c3c8026c91 to a662c37da32d (3 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,jimgraham@google.com,michaelludwig@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-11-17 12:16:41 +00:00
skia-flutter-autoroll
f8d5265568 Roll Fuchsia Linux SDK from c5padahsa9sMecBb3... to K-3yXpPmmu1f0idCa... (flutter/engine#56656)
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 jimgraham@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-11-17 09:52:24 +00:00
skia-flutter-autoroll
4ee419fc9a Roll Skia from b88c7b03a838 to 1086e39c04cf (1 revision) (flutter/engine#56654)
https://skia.googlesource.com/skia.git/+log/b88c7b03a838..1086e39c04cf

2024-11-17 skia-autoroll@skia-public.iam.gserviceaccount.com Manual roll ANGLE from e557b60e8ae5 to 33dc1606ee3b (20 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 brettos@google.com,brianosman@google.com,jimgraham@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-11-17 05:36:38 +00:00
Chris Bracken
9a2c95dc83 iOS: Eliminate FlutterEngine dealloc notification (flutter/engine#56650)
FlutterEngineGroup keeps an array of all live FlutterEngine instances it has created such that after the first engine, it can spawn further engines using the first.

Previously we manually managed this array by adding engines to it upon creation, then having [FlutterEngine dealloc] emit a notification such that FlutterEngineGroup can listen for it, and remove instances from the array upon reception of the notification.

Instead, we now use an NSPointerArray of of weak pointers such that pointers are automatically nilled out by ARC after the last strong reference is collected. This eliminates the need for the manual notification during dealloc.

Unfortunately, NSPointerArray is "clever" and assumes that if the array has not been mutated to store a nil pointer since its last compact call, it must not contain a nil pointer and can thus skip compaction. Under ARC, weak pointers are automatically nilled out when the last strong reference is released, so the above heuristic is no longer valid. We work around the issue by storing a nil pointer before calling compact.

See http://www.openradar.me/15396578 for the radar tracking this bug.

I'm not thrilled with the fact that we're replacing one sort of TODO with another, but the code is much simpler and avoids relying on a trip through the notification center, which seems objectively better.

Issue: https://github.com/flutter/flutter/issues/155943
Issue: https://github.com/flutter/flutter/issues/137801

[C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
2024-11-17 03:50:19 +00:00
skia-flutter-autoroll
74650a44ff Roll Dart SDK from dfa7b3ac976b to 8795a3eaa87b (1 revision) (flutter/engine#56652)
https://dart.googlesource.com/sdk.git/+log/dfa7b3ac976b..8795a3eaa87b

2024-11-16 dart-internal-merge@dart-ci-internal.iam.gserviceaccount.com Version 3.7.0-157.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,jimgraham@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-11-17 01:04:13 +00:00
skia-flutter-autoroll
7cfc48cb95 Roll Skia from f8ec97344733 to b88c7b03a838 (1 revision) (flutter/engine#56651)
https://skia.googlesource.com/skia.git/+log/f8ec97344733..b88c7b03a838

2024-11-16 skia-autoroll@skia-public.iam.gserviceaccount.com Manual roll Dawn from 3f9a21c4d20e to 43b18d23f1be (16 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 brettos@google.com,brianosman@google.com,jimgraham@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-11-16 23:36:33 +00:00
skia-flutter-autoroll
3b30862c42 Roll Dart SDK from d47c22e5f63a to dfa7b3ac976b (1 revision) (flutter/engine#56649)
https://dart.googlesource.com/sdk.git/+log/d47c22e5f63a..dfa7b3ac976b

2024-11-16 dart-internal-merge@dart-ci-internal.iam.gserviceaccount.com Version 3.7.0-156.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,jimgraham@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-11-16 20:53:33 +00:00
hellohuanlin
aae55894be [ios]fix unused variable clang tidy warning (flutter/engine#56637)
Spot another clang-tidy linter failure from: https://github.com/flutter/engine/pull/56631

In release mode, if we remove NSAssert, then weakFlutterEngine is not used at all. This should have been an XCTAssert rather than NSAssert in the first place. 

```
❌ Failures for clang-tidy on /Volumes/Work/s/w/ir/cache/builder/src/flutter/shell/platform/darwin/ios/framework/Source/FlutterTextInputPluginTest.mm:
/Volumes/Work/s/w/ir/cache/builder/src/flutter/shell/platform/darwin/ios/framework/Source/FlutterTextInputPluginTest.mm:239:5: error: Value stored to 'weakFlutterEngine' is never read [clang-analyzer-deadcode.DeadStores,-warnings-as-errors]
  239 |     weakFlutterEngine = flutterEngine;
      |     ^                   ~~~~~~~~~~~~~
/Volumes/Work/s/w/ir/cache/builder/src/flutter/shell/platform/darwin/ios/framework/Source/FlutterTextInputPluginTest.mm:239:5: note: Value stored to 'weakFlutterEngine' is never read
  239 |     weakFlutterEngine = flutterEngine;
      |     ^                   ~~~~~~~~~~~~~
Suppressed 9240 warnings (9111 in non-user code, 129 NOLINT).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
```

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

*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-11-16 17:26:20 +00:00
skia-flutter-autoroll
76abedcd79 Roll Skia from 6b0f264bde33 to f8ec97344733 (1 revision) (flutter/engine#56646)
https://skia.googlesource.com/skia.git/+log/6b0f264bde33..f8ec97344733

2024-11-16 skia-autoroll@skia-public.iam.gserviceaccount.com Roll vulkan-deps from 834044be8e1f to 51c3c8026c91 (6 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 brettos@google.com,brianosman@google.com,jimgraham@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-11-16 11:16:29 +00:00
skia-flutter-autoroll
b7dfbf52ca Roll Fuchsia Linux SDK from UpSQzyXGUhMfedYIh... to c5padahsa9sMecBb3... (flutter/engine#56645)
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 jimgraham@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-11-16 08:28:23 +00:00
skia-flutter-autoroll
75ab0b856b Roll Dart SDK from 77a4ee3266a4 to d47c22e5f63a (1 revision) (flutter/engine#56644)
https://dart.googlesource.com/sdk.git/+log/77a4ee3266a4..d47c22e5f63a

2024-11-16 dart-internal-merge@dart-ci-internal.iam.gserviceaccount.com Version 3.7.0-155.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,jimgraham@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-11-16 07:06:23 +00:00
skia-flutter-autoroll
8e0d659490 Roll Fuchsia Test Scripts from 6FgM4KTbxxmyYoiOs... to OA7UxNZkbxCRfr80A... (flutter/engine#56643)
If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/fuchsia-test-scripts-flutter-engine
Please CC chrome-fuchsia-engprod@google.com,jimgraham@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-11-16 05:33:33 +00:00
Chris Bracken
2a4bfedb9a Backend-specific EmbedderTestBackingStoreProducers (flutter/engine#56638)
Extracts backend-specific subclasses of EmbedderTestBackingStoreProducer for OpenGL, Metal, Software, and Vulkan.

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

[C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
2024-11-16 02:48:31 +00:00
skia-flutter-autoroll
f67d258c32 Roll Dart SDK from eccb15756020 to 77a4ee3266a4 (1 revision) (flutter/engine#56640)
https://dart.googlesource.com/sdk.git/+log/eccb15756020..77a4ee3266a4

2024-11-16 dart-internal-merge@dart-ci-internal.iam.gserviceaccount.com Version 3.7.0-154.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,jimgraham@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-11-16 02:36:34 +00:00
skia-flutter-autoroll
f71656d7ab Roll Skia from 1ef3b910e064 to 6b0f264bde33 (6 revisions) (flutter/engine#56635)
https://skia.googlesource.com/skia.git/+log/1ef3b910e064..6b0f264bde33

2024-11-15 lukasza@chromium.org [rust png] Add new API: `SkColorSpace::MakeCICP`.
2024-11-15 jvanverth@google.com Subset SkImage_Picture objects instead of rendering to Bitmap image.
2024-11-15 skia-autoroll@skia-public.iam.gserviceaccount.com Roll vulkan-deps from 8ec693ec8ed6 to 834044be8e1f (3 revisions)
2024-11-15 kjlubick@google.com Remove duplicated reference to SkSLSampleUsage
2024-11-15 kjlubick@google.com Remove duplicate copy of codegen headers in .gni files
2024-11-15 borenet@google.com [infra] Support running Android tests on hosts other than RPI

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 brettos@google.com,brianosman@google.com,jimgraham@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-11-16 00:22:08 +00:00
Zachary Anderson
abb5c0696f Revert "Remove android_jit_release_x86." (flutter/engine#56634)
Reverts flutter/engine#56548

Failing roll to the framework, the tool is still looking for these
artifacts.
2024-11-15 16:14:47 -08:00
Chris Bracken
2b420dcf9c Move SetRenderTargetType to EmbedderTestCompositor (flutter/engine#56626)
SetRenderTargetType is used to configure the backingstore producer on the compositor, but the backingstore types available to any given compositor are limited to the specific graphics backend in use: Software, GL, Metal, or Vulkan.

This moves SetRenderTargetType to EmbedderTestCompositor and its subclasses and adds RenderTargetType validation. A follow-up patch will refactor EmbedderTestBackingStoreProducer into backend-specific subclasses.

For OpenGL backingstore producers, the egl_context_ from EmbedderTestContext (which is actually set in the EmbedderTestContextGL subclass and should live there, but that's a separate cleanup) is required in SetRenderTargetType, so we now inject it into EmbedderTestCompositor in the constructor so it's available when needed.

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

[C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
2024-11-15 23:28:49 +00:00
skia-flutter-autoroll
8b67ea6d10 Roll Dart SDK from b62dadb14d82 to eccb15756020 (2 revisions) (flutter/engine#56630)
https://dart.googlesource.com/sdk.git/+log/b62dadb14d82..eccb15756020

2024-11-15 dart-internal-merge@dart-ci-internal.iam.gserviceaccount.com Version 3.7.0-153.0.dev
2024-11-15 dart-internal-merge@dart-ci-internal.iam.gserviceaccount.com Version 3.7.0-152.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,jimgraham@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-11-15 22:17:20 +00:00
André Stein
5ae19147fa [TextInput] Add TextInputType.webSearch (#15762) (flutter/engine#56428)
This PR adds the engine part to add `TextInputType.webSearch` that allows to show a keyboard with ready access to a "." key on iOS. On Android this is re-mapped to `url` which shows the same behaviour as `webSearch` on iOS. This fixes issue https://github.com/flutter/flutter/issues/157562.

The flutter PR: https://github.com/flutter/flutter/pull/158323
2024-11-15 21:51:21 +00:00
Mouad Debbar
d27125f326 [web] Send the correct view ID with semantics actions (flutter/engine#56595)
Currently, all semantics actions that we send to the framework contain `viewId: 0`. This leads to issues such as https://github.com/flutter/flutter/issues/158530 because the framework routes the pointer event to the wrong view.

Let's send the correct view ID with semantics actions.

Fixes https://github.com/flutter/flutter/issues/158530
2024-11-15 20:28:59 +00:00
hellohuanlin
453afd650f [macos] early return to suppress clang-tidy warning (flutter/engine#56588)
If we disable the NSAssert during release mode, this code will continue after NSAssert failure, which will then pass a `nil` value into a dictionary (which cannot have a nil value), hence the clang-tidy warning here https://github.com/flutter/engine/pull/53005#issuecomment-2140975126

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

*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-11-15 20:25:17 +00:00
Chinmay Garde
08b52b491b [Impeller] libImpeller: Tinker on the README to cross reference the SDK and the example. (flutter/engine#56623) 2024-11-15 20:21:17 +00:00
巢鹏
2faf5c1ff6 [fuchsia] MaybeRunInitialVsyncCallback should only called once (flutter/engine#56429)
Currently, flutter keeps calling MaybeRunInitialVsyncCallback() until 1
OnNextFrameBegin() called from Fuchsia which maybe problem when display
is off.

Tested manually.

Bug: http://fxbug.dev/376079469

## 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.
2024-11-15 14:05:06 -05:00
Jenn Magder
8e0d6da738 Move mac clangd build from x64 to arm (flutter/engine#56567)
Build and x64 dimension was introduced in https://github.com/flutter/engine/pull/50901, and I blindly copied it into the .ci.yaml in https://github.com/flutter/engine/pull/56014.  However I don't think clangd needs to run on the scarce (and flakier) Intel Macs (37 x64 bots in prod vs 55 arm bots).  Suspect this was copied from clang_tidy #26910

[C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
2024-11-15 18:46:34 +00:00
gaaclarke
11123f1bbf Added assert for opengles thread safety (flutter/engine#56585)
This assert would have blocked the following bug:
https://github.com/flutter/flutter/issues/158535

This shouldn't be landed until
https://github.com/flutter/engine/pull/56573 lands.

## 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.
- [ ] 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-11-15 10:22:46 -08:00
Jonah Williams
d0cf81dfe0 [Impeller] enable OpenGL fallback on Android. (flutter/engine#56591)
Ship impeller OpenGLES on non-vulkan android devices

Fixes https://github.com/flutter/flutter/issues/158361
2024-11-15 16:48:05 +00:00
Jason Simmons
6e15260a8c [Impeller] Maintain separate queues of GLES operations for each thread in the reactor (flutter/engine#56573)
Threads that add operations to the ReactorGLES assume that those operations will be executed serially.

But prior to this change, the ReactorGLES added all operations into one queue.  The reactor would then execute those operations on any thread that can react. This could cause operations that were added to the reactor on the raster thread to be submitted to the GPU on the IO thread (or vice versa).
The reactor does not wait for the GPU to finish execution of those operations.  So other operations added on the raster thread could be submitted by a reaction before the GPU has completed the operation that was submitted on the IO thread.

This PR ensures that operations added to the reactor on a given thread will be executed during a reaction on that same thread.  If the thread can not currently react, then the operations will be queued until the thread enables reactions.

This also adds a call to CommandBuffer::WaitUntilScheduled to ImageDecoderImpeller.  This ensures that the command buffer submitted on the IO thread is flushed before the image is returned.

Fixes https://github.com/flutter/flutter/issues/158535
Fixes https://github.com/flutter/flutter/issues/158388
Fixes https://github.com/flutter/flutter/issues/158390
2024-11-15 16:19:56 +00:00
skia-flutter-autoroll
219838ab5c Roll Dart SDK from abe86ca4eb01 to b62dadb14d82 (2 revisions) (flutter/engine#56615)
https://dart.googlesource.com/sdk.git/+log/abe86ca4eb01..b62dadb14d82

2024-11-15 dart-internal-merge@dart-ci-internal.iam.gserviceaccount.com Version 3.7.0-151.0.dev
2024-11-15 dart-internal-merge@dart-ci-internal.iam.gserviceaccount.com Version 3.7.0-150.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,jimgraham@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-11-15 14:09:33 +00:00
skia-flutter-autoroll
212aa815fc Roll Skia from b730eb340852 to 1ef3b910e064 (4 revisions) (flutter/engine#56613)
https://skia.googlesource.com/skia.git/+log/b730eb340852..1ef3b910e064

2024-11-15 skia-autoroll@skia-public.iam.gserviceaccount.com Roll ANGLE from 924ee1ba78dc to e557b60e8ae5 (9 revisions)
2024-11-15 skia-autoroll@skia-public.iam.gserviceaccount.com Roll Dawn from 205e5feeda01 to 3f9a21c4d20e (11 revisions)
2024-11-15 skia-autoroll@skia-public.iam.gserviceaccount.com Roll Skia Infra from aa41daefb66c to 8b12c3aa2ef9 (9 revisions)
2024-11-15 skia-autoroll@skia-public.iam.gserviceaccount.com Roll SwiftShader from d5c428477411 to 4d3a7b64279f (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 brettos@google.com,brianosman@google.com,jimgraham@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-11-15 08:37:07 +00:00
skia-flutter-autoroll
49a8d7df46 Roll Fuchsia Linux SDK from JkpuAsLzcmYLzf1iX... to UpSQzyXGUhMfedYIh... (flutter/engine#56611)
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 jimgraham@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-11-15 06:49:36 +00:00
skia-flutter-autoroll
e983b621cb Roll Dart SDK from bf0eeb9d929c to abe86ca4eb01 (1 revision) (flutter/engine#56610)
https://dart.googlesource.com/sdk.git/+log/bf0eeb9d929c..abe86ca4eb01

2024-11-15 dart-internal-merge@dart-ci-internal.iam.gserviceaccount.com Version 3.7.0-149.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,jimgraham@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-11-15 06:35:02 +00:00
skia-flutter-autoroll
077658f65d Roll Skia from e5fda8472b21 to b730eb340852 (1 revision) (flutter/engine#56608)
https://skia.googlesource.com/skia.git/+log/e5fda8472b21..b730eb340852

2024-11-15 skia-autoroll@skia-public.iam.gserviceaccount.com Roll vulkan-deps from 1096ec1aabbb to 8ec693ec8ed6 (5 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 brettos@google.com,brianosman@google.com,jimgraham@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-11-15 05:22:14 +00:00
skia-flutter-autoroll
8cce7097fb Roll Skia from 8ff65da4b8bf to e5fda8472b21 (1 revision) (flutter/engine#56603)
https://skia.googlesource.com/skia.git/+log/8ff65da4b8bf..e5fda8472b21

2024-11-15 jlavrova@google.com Adding {empty&unused} SkTypeface_proxy structures

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 brettos@google.com,brianosman@google.com,jimgraham@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-11-15 02:46:29 +00:00
Chris Bracken
9154a5285b Move TestMetalContext/Surface to testing namespace (flutter/engine#56602)
The Metal context/surface code was only in the `flutter` namespace but should have been in `flutter::testing` for consistency with everything else in the `testing` directory.

Also squashes the declarations in the rest of that directory to match the style guide while I've got the macro still handy.

[C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
2024-11-15 02:36:17 +00:00
skia-flutter-autoroll
31c05756d1 Roll Dart SDK from 343b9fc6eafe to bf0eeb9d929c (1 revision) (flutter/engine#56604)
https://dart.googlesource.com/sdk.git/+log/343b9fc6eafe..bf0eeb9d929c

2024-11-14 dart-internal-merge@dart-ci-internal.iam.gserviceaccount.com Version 3.7.0-148.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,jimgraham@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-11-15 01:49:41 +00:00
Chinmay Garde
1c9aa9544f [Impeller] Don't enable KHR_debug on Angle. (flutter/engine#56601)
All it does it log the calls and overwhelms the output for no utility.

<img width="651" alt="Screenshot 2024-11-14 at 3 53 54 PM" src="https://github.com/user-attachments/assets/b2de0d71-6263-4f00-94a0-73a5c0d0135d">
2024-11-15 01:33:32 +00:00
Chinmay Garde
3c5bf78a62 [Impeller] libImpeller: Reset the GL state when transitioning control back to the embedder. (flutter/engine#56597)
Impeller is resilient to OpenGL state being trampled upon when accessing the GL context. But the embedder may not necessarily be. Ideally, we'd be using saving the state and restoring it. But that might be too involved. For now, this sets the GL state to a sane "clean" state.

We could, in theory, do this after each render pass but that unnecessarily increases API traffic. For now, I have added it at the transition of the embedder boundary.
2024-11-15 00:14:23 +00:00
skia-flutter-autoroll
a9426709aa Roll Skia from 8946ea477b42 to 8ff65da4b8bf (2 revisions) (flutter/engine#56600)
https://skia.googlesource.com/skia.git/+log/8946ea477b42..8ff65da4b8bf

2024-11-14 bungeman@google.com Add SkTypeface::getResourceName
2024-11-14 michaelludwig@google.com Handle non-finite scale+translate matrices in invert()

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 brettos@google.com,brianosman@google.com,jimgraham@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-11-15 00:08:39 +00:00
Chinmay Garde
bd53bd0671 [Impeller] Put test components in the testing namespace. (flutter/engine#56594)
Minor change for clarity. I went looking for how we used the recording render pass since it was not in the testing namespace.
2024-11-14 23:52:19 +00:00
Chinmay Garde
6b172110e6 [Impeller] libImpeller: Add a warning about OpenGL state being trampled. (flutter/engine#56599) 2024-11-14 23:40:07 +00:00
Chris Bracken
dfb631ffed Embedder: Refactor EmbedderConfigBuilder by backend (flutter/engine#56598)
Extracts backend-specific code in EmbedderConfigBuilder to separate translation units. In particular, this allows for less conditional header includes, and more specifically, for code relating to the Metal backend to include headers that include Objective-C types -- today we cast these all to void* to avoid declaring them in headers, which requires special handling for ARC.

An alternative approach would have been to extract backend-specific subclasses, but there are test suites such as EmbedderTestMultiBackend that are executed against multiple backends, which currently make that approach impractical, though that should likely be the long-term goal.

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

[C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
2024-11-14 23:24:22 +00:00
Chris Bracken
c74f169f93 Migrate Metal translation units to Obj-C++ (flutter/engine#56592)
Since Metal code frequently uses Objective-C types like id<MTLTexture>
etc. this migrates Metal translation units to Obj-C++. In particular,
this allows transitively including headers that include such types. This
in turn helps with refactoring `EmbedderTest`, `TestMetalContext`,
`TestMetalSurface` to avoid specifying `void*` types in headers and
manually refcounting via ARC bridge casts.

Reformats the source, since Objective-C files are linted to 100 columns
rather than the 80 column limit we impose on C++ files.

This change introduces no semantic changes.

Issue: https://github.com/flutter/flutter/issues/137801
2024-11-14 14:03:01 -08:00
skia-flutter-autoroll
8446ed0f4c Roll Dart SDK from db4d7d52db48 to 343b9fc6eafe (1 revision) (flutter/engine#56590)
https://dart.googlesource.com/sdk.git/+log/db4d7d52db48..343b9fc6eafe

2024-11-14 dart-internal-merge@dart-ci-internal.iam.gserviceaccount.com Version 3.7.0-147.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,jimgraham@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-11-14 21:25:30 +00:00
Chris Bracken
87fbedf2e3 iOS,macOS: Build/test test_metal_surface_unittests (flutter/engine#56586)
Years ago, @chinmaygarde created TestMetalSurface and wrote a unit test
for it in 2866095b584bbdc7d9b24076fcb9d07716d673c9.

And some things that should not have been forgotten were lost. History
became legend. Legend became myth. And for four and a half years, the
test passed out of all knowledge. Until, when chance came, it ensnared a
new bearer. The test came to the creature @cbracken, who took it deep
into the tunnels of the GN build files. And there it consumed him. The
test brought to @cbracken unnatural long life. For 500 hours, it
poisoned his mind. And in the gloom of @cbracken's cave, it waited.
Darkness crept back into the forests of the world. Rumour grew of a
shadow in the East - whispers of a nameless fear. And the Test of Unit
perceived its time had now come.
2024-11-14 13:11:37 -08:00
skia-flutter-autoroll
b04f3c826f Roll Skia from 3222456e63dc to 8946ea477b42 (2 revisions) (flutter/engine#56587)
https://skia.googlesource.com/skia.git/+log/3222456e63dc..8946ea477b42

2024-11-14 borenet@google.com [infra] Remove Pixel7 jobs
2024-11-14 michaelludwig@google.com [skif] Remove SK_USE_LEGACY_BLUR_GRAPHITE guarded code

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 brettos@google.com,brianosman@google.com,jimgraham@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-11-14 21:05:57 +00:00
skia-flutter-autoroll
c1d0ef4838 Roll Skia from 16178bf63de7 to 3222456e63dc (3 revisions) (flutter/engine#56584)
https://skia.googlesource.com/skia.git/+log/16178bf63de7..3222456e63dc

2024-11-14 lukasza@chromium.org [rust png] Explicitly handle missing `PLTE` chunk.
2024-11-14 borenet@google.com [infra] Fixing some OverdueJobSpec alerts
2024-11-14 michaelludwig@google.com [skif] Avoid calculating inverse matrix in blur()

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 brettos@google.com,brianosman@google.com,jimgraham@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-11-14 19:05:15 +00:00
Bruno Leroux
14807a1cb4 [Android] Fix Slider semantics double tap behaviors (flutter/engine#56452)
## Description

Android fix for [[A11y] Double Tap brings the Slider thumb to the center of the widget.](https://github.com/flutter/flutter/issues/156427). Similar to [the iOS engine fix](https://github.com/flutter/engine/pull/56427).

Slider widget doesn't define a Semantics.onTap handler, so a double-click while in accessibility mode defaults to a regular tap down event to which _RenderSlider reacts by changing the slider value.

Adding a onTap callback on the framework side was tried in https://github.com/flutter/flutter/pull/157601 but it breaks one accessibility guideline test, see https://github.com/flutter/flutter/pull/157601#discussion_r1821650120). 

See https://github.com/flutter/flutter/pull/157601#discussion_r1829992890 for the reasoning to make the change at the engine level.

## Related Issue

Android fix for [[A11y] Double Tap brings the Slider thumb to the center of the widget.](https://github.com/flutter/flutter/issues/156427).

## Tests

Adds 1 test.
2024-11-14 17:53:04 +00:00
skia-flutter-autoroll
a1506e865b Roll Dart SDK from a3b6652100c8 to db4d7d52db48 (1 revision) (flutter/engine#56581)
https://dart.googlesource.com/sdk.git/+log/a3b6652100c8..db4d7d52db48

2024-11-14 dart-internal-merge@dart-ci-internal.iam.gserviceaccount.com Version 3.7.0-146.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,jimgraham@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-11-14 17:12:23 +00:00