No change in functionality. The updates:
* HeaderDoc comments have been added to the major rendering related TUs. However, not all comments are complete. I only documented the stuff I understood. For instance, it isn't clear how/why some subclasses use Attach/Detach while other use ProcessFrame. I intend to document as I go.
* Each package specific subclass is now in its own TU.
* Some subclasses used to be Skia specific. We added an Impeller variant but didn't rename to Skia TU. This has been patched.
This PR addresses an issue where autocompleting a text field, even without direct keyboard input, unexpectedly triggers keydown events. To resolve this, the code now relaxes the casting assumptions to accommodate a wider range of event types, not just keyboard events.
By just adding the following script to the console, and filling the text field using autocomplete, you can see that indeed the fired event is not of type `KeyboardEvent` but `Event`.
```javascript
document.body.addEventListener('keydown', console.log)
```
Fixes https://github.com/flutter/flutter/issues/149968
*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
Move more impeller tests to display list format. This allows our integration tests to also test the display list -> aiks interop and be future compatible with the new canvas backend that removes AIKS.
Part of https://github.com/flutter/flutter/issues/142054
This PR makes the macOS `FlutterCompositor` able to handle multiple views by adding methods `AddView` and `RemoveView`.
These two methods must take place on the main queue (platform thread), which is indeed the case, but extra effort is made to assert so. This is important because, due to the constraint of the macOS system that requires rendering to take place on the platform thread (hence `FlutterThreadSynchronizer`), no locks are needed to avoid race condition between `Add/RemoveView` and presenting.
[C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
Second attempt to reland https://github.com/flutter/engine/pull/52023
Fixes since the previous reland attempt:
* We need to pass the skwasm main JS URI when loading the module so that it can pass that along to the worker. Since the worker uses the workaround to allow a cross script worker, it has trouble locating the main JS URI in relation to itself in a way that actually works for dynamic imports, so passing it along fixes that issue.
* Some of the Google3 tests relied on the relative default canvaskit path. Dynamic module imports seems to not handle relative paths the way we expect, so we do our own URL resolution using the URL constructor before passing it into the dynamic import API. Also cleaned up some of the other relative pathing stuff that we do around the base URI. in flutter.js
Reverts: flutter/engine#53787
Initiated by: jiahaog
Reason for reverting: There are still internal users of these hash functions (b/352191023). Flutter also exports it [here](72f83d3237/packages/flutter/lib/src/painting/basic_types.dart (L58)) so its easy for developers to use them even without importing `dart:ui`. Though it's an easy fix, I'd imagine this to be a breaking change for the OSS ecosystem a
Original PR Author: kevmoo
Reviewed By: {jonahwilliams}
This change reverts the following previous change:
These were deprecated a LONG time ago
Reverts: flutter/engine#53783
Initiated by: jiahaog
Reason for reverting: There are still internal users of these hash functions (b/352191023). Flutter also exports it [here](72f83d3237/packages/flutter/lib/src/painting/basic_types.dart (L58)) so its easy for developers to use them even without importing `dart:ui`. Though it's an easy fix, I'd imagine this to be a breaking change for the OSS ecosystem a
Original PR Author: kevmoo
Reviewed By: {yjbanov}
This change reverts the following previous change:
We moved to dart:core Object functions a while ago
I admit to using this private macro initially without realizing that the documented way to do this is to use the stream the other macro returns. The non-private variant is actually more powerful since it allows for easier customization of the reason for the skip.
No change in functionality. Just removes the use of the private macros.
Fixes https://github.com/flutter/flutter/issues/150973
On a Pixel 7 pro, this speeds up the repeated blur macrobenchmark by 20ms (~65 -> ~45). The mip computation for backdrop filters is especially wasteful, as most of the contents are unused. RIght now, we also need to continually re-generate mips every time we do a texture flip, even if there is only a single blur. This is because the mip level is a property of the texture, which gets reused in the entity pass backdrop.
Experimentally support merging UI and platform thread on Android/iOS. This works by changing the shell holder to set the UI thread to the platform thread. Several shell APIs that post messages from the platform to ui thread were changed to use RunNowOrPostTask to immediately call the UI task if the threads are the same.
Experimentally, this seems to work reasonably well if there are no platform views. On Android with TLHC it works fine either way, while iOS currently takes a big performance hit.
This can be opted into via a Plist:
```
<key>FLTEnableMergedPlatformUIThread</key>
<true/>
```
Or via AndroidManifest.xml:
```
<meta-data
android:name="io.flutter.embedding.android.EnableMergedPlatformUIThread"
android:value="true" />
```
https://github.com/flutter/flutter/issues/150525
My expectation was that all toggles were disabled with OpenGL. But the specification states: "The initial value for each capability with the exception of GL_DITHER is GL_FALSE. The initial value for GL_DITHER is GL_TRUE."
The kind of dithering is implementation dependent and our layered OpenGL implementations choose to do nothing when this is enabled (unless extensions like VK_EXT_legacy_dithering are supported). Since, again, per the spec: "As far as OpenGL layering is concerned, no dithering is technically an acceptable algorithm".
But it does have a cost of older hardware where dithering is supported.
This sets the default to match our other backends and get some performance on hardware that does do dithering.
Tracking bug: https://github.com/flutter/flutter/issues/151473
To resolve engine roll failures starting on roll:
https://github.com/flutter/flutter/pull/151434
Reverts 4 Dart rolls:
- Roll Dart SDK from ffc8bb004a64 to 1679aba20a03 (16 revisions)
(#53761) 998d1fa85578e719607105125169e5a55b9e6f6b
- Roll Dart SDK from 1679aba20a03 to 0ecada960645 (1 revision) (#53767)
0585cb610e02b4831edf3d9a850a3eae21c4b75e
- Roll Dart SDK from 0ecada960645 to 33b65d2fe034 (2 revisions) (#53772)
5bbc45ba606adb1ec5227b52b5fe16c65ce389ff
- Roll Dart SDK from 33b65d2fe034 to 726cb2467f27 (1 revision) (#53776)
4ff005801023f2d70256f69411ead0e550fbf749
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 4.3.3 to 4.3.4.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a href="https://github.com/actions/upload-artifact/releases">actions/upload-artifact's releases</a>.</em></p>
<blockquote>
<h2>v4.3.4</h2>
<h2>What's Changed</h2>
<ul>
<li>Update <code>@âactions/artifact</code> version, bump dependencies by <a href="https://github.com/robherley"><code>@ârobherley</code></a> in <a href="https://redirect.github.com/actions/upload-artifact/pull/584">actions/upload-artifact#584</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a href="https://github.com/actions/upload-artifact/compare/v4.3.3...v4.3.4">https://github.com/actions/upload-artifact/compare/v4.3.3...v4.3.4</a></p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="0b2256b8c0"><code>0b2256b</code></a> Merge pull request <a href="https://redirect.github.com/actions/upload-artifact/issues/584">#584</a> from actions/robherley/bump-pkgs</li>
<li><a href="488dcefb9b"><code>488dcef</code></a> licensed cache</li>
<li><a href="04c51f5766"><code>04c51f5</code></a> ncc</li>
<li><a href="32a9e276a8"><code>32a9e27</code></a> bump <code>@âactions/artifact</code> and npm audit</li>
<li><a href="552bf3722c"><code>552bf37</code></a> new version</li>
<li><a href="79616d2ded"><code>79616d2</code></a> Merge pull request <a href="https://redirect.github.com/actions/upload-artifact/issues/565">#565</a> from actions/eggyhead/use-artifact-v2.1.6</li>
<li>See full diff in <a href="65462800fd...0b2256b8c0">compare view</a></li>
</ul>
</details>
<br />
[](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)
Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`.
---
<details>
<summary>Dependabot commands and options</summary>
<br />
You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
</details>