31045 Commits

Author SHA1 Message Date
Jason Simmons
d2215194e3
Update ImageReaderSurfaceProducer.MAX_IMAGES to include the maximum number of retained dequeued images (#174971)
MAX_IMAGES was set to 5 by
7a58dac0b1
in order to fix "client tried to acquire more than maxImages buffers"
warnings from ImageReader_JNI.


696251d25a
then converted lastDequeuedImage into a queue that retains up to
MAX_DEQUEUED_IMAGES in-flight images plus the latest dequeued image.
MAX_DEQUEUED_IMAGES was set to 2, but MAX_IMAGES was only incremented by
1. So the ImageReader_JNI warning may reappear in some cases.

This PR ensures that MAX_IMAGES provides enough capacity in the
ImageReader for the total number of images that may be in use.
2025-09-08 21:40:32 +00:00
Oreofe Solarin
b01f4a5447
Impeller: Convert GLProc name field and GLErrorToString to std::string_view (#173771)
This PR improves the OpenGL error handling and procedure table interface
in the Impeller renderer by changing `const char*` to `std::string_view`
for better memory safety.

### Testing:

Added unit tests to cover `GLErrorToString` return values and
`string_view` behavior

### Issues Fixed #135922

This PR addresses technical debt by improving string handling in the
OpenGL backend, and type safety without breaking existing functionality.

## 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], including [Features
we expect every widget to implement].
- [x] I signed the [CLA].
- [x] I listed at least one issue that this PR fixes in the description
above.
- [x] I updated/added relevant documentation (doc comments with `///`).
- [x] I added new tests to check the change I am making, or this PR is
[test-exempt].
- [x] I followed the [breaking change policy] and added [Data Driven
Fixes] where supported.
- [x] All existing and new tests are passing.
2025-09-08 19:59:20 +00:00
Chinmay Garde
df8e02d5b8
Depend on operator overload synthesis for three-way and equality comparisons. (#174892)
This depends on the implicitly generated `operator!=` from `operator==`
in a few cases (see the exceptions below) and add `operator<=>` in some
of the more obvious instances.

I've tried to be extremely conservative in this first pass. There are a
few more candidates that were not converted because:

* `operator!=` was different from `!operator=.` For instance, if it had
early returns. Not sure how the compiler generated those and didn't want
the behavior or performance characteristics to change.
* They were virtual.
* `operator==` didn't actually compare all struct members. Dubious but I
didn't want to change existing behavior.
* There were template parameters.
2025-09-08 19:15:26 +00:00
Chinmay Garde
f356a80301
Define a concept for UniqueObjectTraits. (#174905)
Earlier, it was just a comment. If you didn't do what the comment said,
you'd get a mysterious compiler error when the template was instantiated
at the point where the trait method was invoked. This would be extremely
far away from where the template was instantiated and typically in
`fml/unique_object.h`.

Now, the exact reason and where a fix would go is printed in the
compiler error. For instance, if I delete the Free method in
`UniqueDirTraits`, I get (among other output):

```
no member named 'Free' in 'fml::internal::os_unix::UniqueDirTraits'
```
2025-09-08 19:15:26 +00:00
hellohuanlin
edbc5ca18e
[ios26]fix host engine compile error (#174723)
## What it does

This adds `-plugin-path` flag to `swiftc` cmd to fix a compile error
related to missing swift plugin. The plugin is under
`mac_host_toolchain_path`, which is only available on macs. However, we
only build mac host engine on macs, so we are good.

## About unit test

This swiftc.py file currently has no test coverage, but it should - I
filed https://github.com/flutter/flutter/issues/174843. However, given
there's a big fire (https://github.com/flutter/flutter/issues/174513)
going on, and we are approaching iOS 26 release, I have to prioritize
that one.

I will manually verify the solution. 

*List which issues are fixed by this PR. You must list at least one
issue. An issue is not required if the PR fixes something trivial like a
typo.*

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


*If you had to change anything in the [flutter/tests] repo, include a
link to the migration guide as per the [breaking change policy].*

## 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], including [Features
we expect every widget to implement].
- [x] I signed the [CLA].
- [x] I listed at least one issue that this PR fixes in the description
above.
- [ ] I updated/added relevant documentation (doc comments with `///`).
- [ ] I added new tests to check the change I am making, or this PR is
[test-exempt].
- [ ] I followed the [breaking change policy] and added [Data Driven
Fixes] where supported.
- [ ] All existing and new tests are passing.

If you need help, consider asking for advice on the #hackers-new channel
on [Discord].

**Note**: The Flutter team is currently trialing the use of [Gemini Code
Assist for
GitHub](https://developers.google.com/gemini-code-assist/docs/review-github-code).
Comments from the `gemini-code-assist` bot should not be taken as
authoritative feedback from the Flutter team. If you find its comments
useful you can update your code accordingly, but if you are unsure or
disagree with the feedback, please feel free to wait for a Flutter team
member's review for guidance on which automated comments should be
addressed.

<!-- Links -->
[Contributor Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#overview
[Tree Hygiene]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md
[test-exempt]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#tests
[Flutter Style Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md
[Features we expect every widget to implement]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md#features-we-expect-every-widget-to-implement
[CLA]: https://cla.developers.google.com/
[flutter/tests]: https://github.com/flutter/tests
[breaking change policy]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#handling-breaking-changes
[Discord]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Chat.md
[Data Driven Fixes]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Data-driven-Fixes.md
2025-09-05 17:45:08 +00:00
gaaclarke
135f367273
Added note about how to compile licenses_cpp (#174947)
fixes https://github.com/flutter/flutter/issues/174942

## 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], including [Features
we expect every widget to implement].
- [x] I signed the [CLA].
- [x] I listed at least one issue that this PR fixes in the description
above.
- [x] I updated/added relevant documentation (doc comments with `///`).
- [x] I added new tests to check the change I am making, or this PR is
[test-exempt].
- [x] I followed the [breaking change policy] and added [Data Driven
Fixes] where supported.
- [x] All existing and new tests are passing.

If you need help, consider asking for advice on the #hackers-new channel
on [Discord].

**Note**: The Flutter team is currently trialing the use of [Gemini Code
Assist for
GitHub](https://developers.google.com/gemini-code-assist/docs/review-github-code).
Comments from the `gemini-code-assist` bot should not be taken as
authoritative feedback from the Flutter team. If you find its comments
useful you can update your code accordingly, but if you are unsure or
disagree with the feedback, please feel free to wait for a Flutter team
member's review for guidance on which automated comments should be
addressed.

<!-- Links -->
[Contributor Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#overview
[Tree Hygiene]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md
[test-exempt]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#tests
[Flutter Style Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md
[Features we expect every widget to implement]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md#features-we-expect-every-widget-to-implement
[CLA]: https://cla.developers.google.com/
[flutter/tests]: https://github.com/flutter/tests
[breaking change policy]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#handling-breaking-changes
[Discord]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Chat.md
[Data Driven Fixes]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Data-driven-Fixes.md
2025-09-05 17:26:10 +00:00
Mouad Debbar
e6af6f9a0c
[web] Minor simplification in flutter.js loader (#174963) 2025-09-05 17:00:20 +00:00
gaaclarke
fd10d21948
deletes the old license checker. (#174719)
This has been replaced by `//engine/src/flutter/tools/licenses_cpp`

## 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], including [Features
we expect every widget to implement].
- [x] I signed the [CLA].
- [x] I listed at least one issue that this PR fixes in the description
above.
- [x] I updated/added relevant documentation (doc comments with `///`).
- [x] I added new tests to check the change I am making, or this PR is
[test-exempt].
- [x] I followed the [breaking change policy] and added [Data Driven
Fixes] where supported.
- [x] All existing and new tests are passing.

If you need help, consider asking for advice on the #hackers-new channel
on [Discord].

**Note**: The Flutter team is currently trialing the use of [Gemini Code
Assist for
GitHub](https://developers.google.com/gemini-code-assist/docs/review-github-code).
Comments from the `gemini-code-assist` bot should not be taken as
authoritative feedback from the Flutter team. If you find its comments
useful you can update your code accordingly, but if you are unsure or
disagree with the feedback, please feel free to wait for a Flutter team
member's review for guidance on which automated comments should be
addressed.

<!-- Links -->
[Contributor Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#overview
[Tree Hygiene]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md
[test-exempt]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#tests
[Flutter Style Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md
[Features we expect every widget to implement]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md#features-we-expect-every-widget-to-implement
[CLA]: https://cla.developers.google.com/
[flutter/tests]: https://github.com/flutter/tests
[breaking change policy]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#handling-breaking-changes
[Discord]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Chat.md
[Data Driven Fixes]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Data-driven-Fixes.md
2025-09-05 16:59:27 +00:00
Pedro Massango
00e428a200
fix(Semantics): Ensure semantics properties take priority over button's (#174473)
Fixes https://github.com/flutter/flutter/issues/157689

Flutter packages PR counterpart:
- https://github.com/flutter/packages/pull/9815



## 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], including [Features
we expect every widget to implement].
- [x] I signed the [CLA].
- [x] I listed at least one issue that this PR fixes in the description
above.
- [x] I updated/added relevant documentation (doc comments with `///`).
- [x] I added new tests to check the change I am making, or this PR is
[test-exempt].
- [x] I followed the [breaking change policy] and added [Data Driven
Fixes] where supported.
- [x] All existing and new tests are passing.

If you need help, consider asking for advice on the #hackers-new channel
on [Discord].

**Note**: The Flutter team is currently trialing the use of [Gemini Code
Assist for
GitHub](https://developers.google.com/gemini-code-assist/docs/review-github-code).
Comments from the `gemini-code-assist` bot should not be taken as
authoritative feedback from the Flutter team. If you find its comments
useful you can update your code accordingly, but if you are unsure or
disagree with the feedback, please feel free to wait for a Flutter team
member's review for guidance on which automated comments should be
addressed.
2025-09-04 21:05:27 +00:00
Mouad Debbar
31aaf38a93
Remove 'terms of use' wording from web_unicode (#174939)
This library isn't used anywhere and will be deleted here:
https://github.com/flutter/flutter/pull/174896

I'm removing the "terms of use" wording to unblock the G3 roll while I
investigate the failures on the full deletion PR.
2025-09-04 18:16:51 +00:00
Victoria Ashworth
baf4de08b4
Prevent potential crash when accessing window in FlutterSceneDelegate (#174873)
Accessing `appDelegate.window` may crash if the AppDelegate doesn't have
the window property. This can happen when using a custom
`UIApplicationDelegate` (and not the `FlutterAppDelegate`).

## 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], including [Features
we expect every widget to implement].
- [x] I signed the [CLA].
- [ ] I listed at least one issue that this PR fixes in the description
above.
- [x] I updated/added relevant documentation (doc comments with `///`).
- [x] I added new tests to check the change I am making, or this PR is
[test-exempt].
- [x] I followed the [breaking change policy] and added [Data Driven
Fixes] where supported.
- [x] All existing and new tests are passing.

If you need help, consider asking for advice on the #hackers-new channel
on [Discord].

**Note**: The Flutter team is currently trialing the use of [Gemini Code
Assist for
GitHub](https://developers.google.com/gemini-code-assist/docs/review-github-code).
Comments from the `gemini-code-assist` bot should not be taken as
authoritative feedback from the Flutter team. If you find its comments
useful you can update your code accordingly, but if you are unsure or
disagree with the feedback, please feel free to wait for a Flutter team
member's review for guidance on which automated comments should be
addressed.

<!-- Links -->
[Contributor Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#overview
[Tree Hygiene]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md
[test-exempt]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#tests
[Flutter Style Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md
[Features we expect every widget to implement]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md#features-we-expect-every-widget-to-implement
[CLA]: https://cla.developers.google.com/
[flutter/tests]: https://github.com/flutter/tests
[breaking change policy]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#handling-breaking-changes
[Discord]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Chat.md
[Data Driven Fixes]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Data-driven-Fixes.md
2025-09-04 18:13:03 +00:00
LongCatIsLooong
251f4a8d5b
Add a viewController property to the ios/macOS FlutterPluginRegistrar protocol (#174168)
#104117

Adds a `viewController` (per
https://github.com/flutter/flutter/issues/104117#issuecomment-3114772381,
presumably because iOS plugins want to presenting new view controllers)
getter that makes the single-view assumption. ~This is a method instead
of a weak + readonly property like the macOS registrar protocol because
existing getters are also methods, e.g.,~
```objc
- (NSObject<FlutterBinaryMessenger>*)messenger;
- (NSObject<FlutterTextureRegistry>*)textures;
```

~Unfortunately swift callers will have to use a preprocess macro and add
different code paths for macOS and iOS.~

#### Single view assumption

I've considered adding a `- (nullable
UIViewController*)viewControllerForViewID: ViewIDType;` method but that
will force plugins to make breaking changes in order to migrate off of
the deprecated `keyWindow` property. Take the text input plugin as an
example, it has to add a `viewID` argument to the `setTextInputClient`
call when establishing a new text input connection, so the text input
plugin knows which view hierarchy to add the text input view to. It is
unclear to me whether more `FlutterPluginRegistrar` changes are needed
to completely get rid of the single-view assumption in the protocol (the
views `FlutterPlatformViewFactory` creates are always added as subviews
to `flutterView` so I guess that interface may have to change in the
future? According to according to [Flutter’s multi-window
status](https://docs.google.com/document/d/13E27tD8_9f6lDgwg3MpGNTV8XIRCZH3ByI-t9kI9IUM/edit?tab=t.0#heading=h.8lxwn1tiky70),
only a `viewForIdentifier` method will be added to registrar), so IMO it
would be a better experience to not introduce the `viewID` concept right
now and force plugins to make break changes, since they may have to make
more breaking changes in the future.

Alternatively, we could also ignore the `viewID` args for now and always
return the view controller of the implicit view in the implementation,
so that plugin authors can use made-up view IDs to get the implicit view
controller. But that's going to make future multiview migrations
difficult since the compiler won't be able to catch unmigrated code if
the plugin is using a bogus view ID.

##  Pre-launch Checklist

- [ ] I read the [Contributor Guide] and followed the process outlined
there for submitting PRs.
- [ ] I read the [Tree Hygiene] wiki page, which explains my
responsibilities.
- [ ] I read and followed the [Flutter Style Guide], including [Features
we expect every widget to implement].
- [ ] I signed the [CLA].
- [ ] I listed at least one issue that this PR fixes in the description
above.
- [ ] I updated/added relevant documentation (doc comments with `///`).
- [ ] I added new tests to check the change I am making, or this PR is
[test-exempt].
- [ ] I followed the [breaking change policy] and added [Data Driven
Fixes] where supported.
- [ ] All existing and new tests are passing.

If you need help, consider asking for advice on the #hackers-new channel
on [Discord].

**Note**: The Flutter team is currently trialing the use of [Gemini Code
Assist for
GitHub](https://developers.google.com/gemini-code-assist/docs/review-github-code).
Comments from the `gemini-code-assist` bot should not be taken as
authoritative feedback from the Flutter team. If you find its comments
useful you can update your code accordingly, but if you are unsure or
disagree with the feedback, please feel free to wait for a Flutter team
member's review for guidance on which automated comments should be
addressed.

<!-- Links -->
[Contributor Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#overview
[Tree Hygiene]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md
[test-exempt]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#tests
[Flutter Style Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md
[Features we expect every widget to implement]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md#features-we-expect-every-widget-to-implement
[CLA]: https://cla.developers.google.com/
[flutter/tests]: https://github.com/flutter/tests
[breaking change policy]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#handling-breaking-changes
[Discord]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Chat.md
[Data Driven Fixes]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Data-driven-Fixes.md
2025-09-04 01:32:32 +00:00
chunhtai
f5ce9117ee
Wires up Android API to set section locale (#173364)
<!--
Thanks for filing a pull request!
Reviewers are typically assigned within a week of filing a request.
To learn more about code review, see our documentation on Tree Hygiene:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md
-->

related https://github.com/flutter/flutter/issues/99600

what still missing:
1. iOS equivalence
2. set application level locale 

internal only doc:
[go/flutter-semantics-language](http://goto.google.com/flutter-semantics-language)


## Pre-launch Checklist

- [ ] I read the [Contributor Guide] and followed the process outlined
there for submitting PRs.
- [ ] I read the [Tree Hygiene] wiki page, which explains my
responsibilities.
- [ ] I read and followed the [Flutter Style Guide], including [Features
we expect every widget to implement].
- [ ] I signed the [CLA].
- [ ] I listed at least one issue that this PR fixes in the description
above.
- [ ] I updated/added relevant documentation (doc comments with `///`).
- [ ] I added new tests to check the change I am making, or this PR is
[test-exempt].
- [ ] I followed the [breaking change policy] and added [Data Driven
Fixes] where supported.
- [ ] All existing and new tests are passing.

If you need help, consider asking for advice on the #hackers-new channel
on [Discord].

**Note**: The Flutter team is currently trialing the use of [Gemini Code
Assist for
GitHub](https://developers.google.com/gemini-code-assist/docs/review-github-code).
Comments from the `gemini-code-assist` bot should not be taken as
authoritative feedback from the Flutter team. If you find its comments
useful you can update your code accordingly, but if you are unsure or
disagree with the feedback, please feel free to wait for a Flutter team
member's review for guidance on which automated comments should be
addressed.

<!-- Links -->
[Contributor Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#overview
[Tree Hygiene]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md
[test-exempt]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#tests
[Flutter Style Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md
[Features we expect every widget to implement]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md#features-we-expect-every-widget-to-implement
[CLA]: https://cla.developers.google.com/
[flutter/tests]: https://github.com/flutter/tests
[breaking change policy]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#handling-breaking-changes
[Discord]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Chat.md
[Data Driven Fixes]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Data-driven-Fixes.md
2025-09-03 23:37:31 +00:00
Chinmay Garde
3a18c9449e
Delete impeller::SPrintF. (#174900)
We have std::format at home.

This is superior for a few reasons. The caller doesn't have to remember
the format string for the type. I believe std::string_views that are not
null terminated are also handled correctly. Also, we don't have to
maintain and test our own SPrintF.
2025-09-03 23:09:14 +00:00
Chinmay Garde
1091786642
Fixup formatting of gn files in the old buildroot. (#174852)
`git ls-files "*.gn*" | xargs ./flutter/third_party/gn/gn format`

We already seem to enforce GN format on pull-requests. These seem to old
files in the buildroot no one has touched in a while.
2025-09-03 17:36:06 +00:00
Jim Graham
dbe229eba7
[Impeller] Fix overdraw in DrawRect geometry (#174735)
Fixes https://github.com/flutter/flutter/issues/174579

Vertex lists for stroked rects were fixed by being more careful about
the creation of the vertices so that they have no inherent overdraw.
These operations continue to use the fastest kNormal vertex mode but no
longer create rendering artifacts due to multiple triangles covering the
same area.
2025-09-02 23:19:36 +00:00
Chinmay Garde
754b93f151
Patch .clang-format files to specify C++20. (#174848)
Clang format will reject valid uses of C++ (like the spaceship operator
definition) because they are not valid C++11. This tweaks how
clang-format treats sources.

I tried to get rid of the redundant .clang-format files but they all
specify other options and don't cascade. So just let the files be and
only updated the version.
2025-09-02 23:02:06 +00:00
Chinmay Garde
c6f2de7aba
Build engine TUs with C++20. (#174471)
The changes:

* Creating a bit-mask with different enum values is now a warning. Fixed
offending instances.
* `char8_t` is a different type. Fixed those instances.
* Disabling modules in Objective-C requires bypassing the driver.
* Aggregate initialization fails when there are other constructors for
structs. Added explicit constructors.
* `gn format` doesn't seem to be run on erstwhile buildroot GN files.
Fixes the formatting. But can back this out since it is technically
unrelated to C++20.
2025-09-02 18:31:21 +00:00
gaaclarke
432cfa62ac
Made emulator check more thorough (#174731)
fixes https://github.com/flutter/flutter/issues/169931

## 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], including [Features
we expect every widget to implement].
- [x] I signed the [CLA].
- [x] I listed at least one issue that this PR fixes in the description
above.
- [x] I updated/added relevant documentation (doc comments with `///`).
- [ ] I added new tests to check the change I am making, or this PR is
[test-exempt].
- [x] I followed the [breaking change policy] and added [Data Driven
Fixes] where supported.
- [x] All existing and new tests are passing.

If you need help, consider asking for advice on the #hackers-new channel
on [Discord].

**Note**: The Flutter team is currently trialing the use of [Gemini Code
Assist for
GitHub](https://developers.google.com/gemini-code-assist/docs/review-github-code).
Comments from the `gemini-code-assist` bot should not be taken as
authoritative feedback from the Flutter team. If you find its comments
useful you can update your code accordingly, but if you are unsure or
disagree with the feedback, please feel free to wait for a Flutter team
member's review for guidance on which automated comments should be
addressed.

<!-- Links -->
[Contributor Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#overview
[Tree Hygiene]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md
[test-exempt]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#tests
[Flutter Style Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md
[Features we expect every widget to implement]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md#features-we-expect-every-widget-to-implement
[CLA]: https://cla.developers.google.com/
[flutter/tests]: https://github.com/flutter/tests
[breaking change policy]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#handling-breaking-changes
[Discord]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Chat.md
[Data Driven Fixes]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Data-driven-Fixes.md

---------

Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
2025-09-02 17:31:02 +00:00
gaaclarke
a889fae0c2
Bind GL_FRAMEBUFFER with glReadPixels for gles2 compatibility (#174668)
fixes https://github.com/flutter/flutter/issues/164459

## 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], including [Features
we expect every widget to implement].
- [x] I signed the [CLA].
- [x] I listed at least one issue that this PR fixes in the description
above.
- [x] I updated/added relevant documentation (doc comments with `///`).
- [x] I added new tests to check the change I am making, or this PR is
[test-exempt].
- [x] I followed the [breaking change policy] and added [Data Driven
Fixes] where supported.
- [x] All existing and new tests are passing.

If you need help, consider asking for advice on the #hackers-new channel
on [Discord].

**Note**: The Flutter team is currently trialing the use of [Gemini Code
Assist for
GitHub](https://developers.google.com/gemini-code-assist/docs/review-github-code).
Comments from the `gemini-code-assist` bot should not be taken as
authoritative feedback from the Flutter team. If you find its comments
useful you can update your code accordingly, but if you are unsure or
disagree with the feedback, please feel free to wait for a Flutter team
member's review for guidance on which automated comments should be
addressed.

<!-- Links -->
[Contributor Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#overview
[Tree Hygiene]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md
[test-exempt]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#tests
[Flutter Style Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md
[Features we expect every widget to implement]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md#features-we-expect-every-widget-to-implement
[CLA]: https://cla.developers.google.com/
[flutter/tests]: https://github.com/flutter/tests
[breaking change policy]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#handling-breaking-changes
[Discord]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Chat.md
[Data Driven Fixes]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Data-driven-Fixes.md
2025-09-02 16:43:27 +00:00
chunhtai
03195e6990
Reapply "Add set semantics enabled API and wire iOS a11y bridge" (#174163)
<!--
Thanks for filing a pull request!
Reviewers are typically assigned within a week of filing a request.
To learn more about code review, see our documentation on Tree Hygiene:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md
-->


Previous pr is reverted due to internal test failure

This is a straight reland, no change from previous. only need to migrate
internal code

fixes https://github.com/flutter/flutter/issues/158399

## Pre-launch Checklist

- [ ] I read the [Contributor Guide] and followed the process outlined
there for submitting PRs.
- [ ] I read the [Tree Hygiene] wiki page, which explains my
responsibilities.
- [ ] I read and followed the [Flutter Style Guide], including [Features
we expect every widget to implement].
- [ ] I signed the [CLA].
- [ ] I listed at least one issue that this PR fixes in the description
above.
- [ ] I updated/added relevant documentation (doc comments with `///`).
- [ ] I added new tests to check the change I am making, or this PR is
[test-exempt].
- [ ] I followed the [breaking change policy] and added [Data Driven
Fixes] where supported.
- [ ] All existing and new tests are passing.

If you need help, consider asking for advice on the #hackers-new channel
on [Discord].

**Note**: The Flutter team is currently trialing the use of [Gemini Code
Assist for
GitHub](https://developers.google.com/gemini-code-assist/docs/review-github-code).
Comments from the `gemini-code-assist` bot should not be taken as
authoritative feedback from the Flutter team. If you find its comments
useful you can update your code accordingly, but if you are unsure or
disagree with the feedback, please feel free to wait for a Flutter team
member's review for guidance on which automated comments should be
addressed.

<!-- Links -->
[Contributor Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#overview
[Tree Hygiene]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md
[test-exempt]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#tests
[Flutter Style Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md
[Features we expect every widget to implement]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md#features-we-expect-every-widget-to-implement
[CLA]: https://cla.developers.google.com/
[flutter/tests]: https://github.com/flutter/tests
[breaking change policy]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#handling-breaking-changes
[Discord]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Chat.md
[Data Driven Fixes]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Data-driven-Fixes.md
2025-08-29 19:29:12 +00:00
Jackson Gardner
c98cc294ba
[impeller] Support partitioned host buffer (#174463)
This change adds support for host buffer that keeps index buffers
separate from other general-purpose data. This is a requirement for
WebGL:
https://registry.khronos.org/webgl/specs/latest/2.0/#BUFFER_OBJECT_BINDING

No current backends use the partitioned implementation, but once I add
WebGL support it will use it to avoid
https://github.com/flutter/flutter/issues/149603
2025-08-29 01:08:47 +00:00
Robert Ancell
99012ee692
Check GTK calls are done on the same thread. (#174488) (#174624)
Resubmitted, as the previous PR had a merge error.

Fixes https://github.com/flutter/flutter/issues/173660
2025-08-29 01:05:21 +00:00
auto-submit[bot]
b94a29ea82
Reverts "[web] Refactor renderers to use the same frontend code (#174588)" (#174672)
<!-- start_original_pr_link -->
Reverts: flutter/flutter#174588
<!-- end_original_pr_link -->
<!-- start_initiating_author -->
Initiated by: harryterkelsen
<!-- end_initiating_author -->
<!-- start_revert_reason -->
Reason for reverting: Skwasm benchmarks and google_sign_in tests are
broken as a result of this PR
<!-- end_revert_reason -->
<!-- start_original_pr_author -->
Original PR Author: harryterkelsen
<!-- end_original_pr_author -->

<!-- start_reviewers -->
Reviewed By: {mdebbar}
<!-- end_reviewers -->

<!-- start_revert_body -->
This change reverts the following previous change:
Refactors the renderer code so both renderers (Skwasm and CanvasKit) use
the same SceneBuilder and platform view embedding code. This change is
discussed in a design doc here:
https://flutter.dev/go/web-renderer-unification

Fixes https://github.com/flutter/flutter/issues/172311
Fixes https://github.com/flutter/flutter/issues/172308
Fixes https://github.com/flutter/flutter/issues/142072

## 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], including [Features
we expect every widget to implement].
- [x] I signed the [CLA].
- [x] I listed at least one issue that this PR fixes in the description
above.
- [x] I updated/added relevant documentation (doc comments with `///`).
- [x] I added new tests to check the change I am making, or this PR is
[test-exempt].
- [x] I followed the [breaking change policy] and added [Data Driven
Fixes] where supported.
- [x] All existing and new tests are passing.

If you need help, consider asking for advice on the #hackers-new channel
on [Discord].

**Note**: The Flutter team is currently trialing the use of [Gemini Code
Assist for
GitHub](https://developers.google.com/gemini-code-assist/docs/review-github-code).
Comments from the `gemini-code-assist` bot should not be taken as
authoritative feedback from the Flutter team. If you find its comments
useful you can update your code accordingly, but if you are unsure or
disagree with the feedback, please feel free to wait for a Flutter team
member's review for guidance on which automated comments should be
addressed.

<!-- Links -->
[Contributor Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#overview
[Tree Hygiene]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md
[test-exempt]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#tests
[Flutter Style Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md
[Features we expect every widget to implement]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md#features-we-expect-every-widget-to-implement
[CLA]: https://cla.developers.google.com/
[flutter/tests]: https://github.com/flutter/tests
[breaking change policy]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#handling-breaking-changes
[Discord]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Chat.md
[Data Driven Fixes]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Data-driven-Fixes.md

<!-- end_revert_body -->

Co-authored-by: auto-submit[bot] <flutter-engprod-team@google.com>
2025-08-28 22:19:47 +00:00
Kostia Sokolovskyi
23e65c0b49
Fix some issues in engine-tool README. (#174512)
- Fixes broken `Note` alert
https://github.com/flutter/flutter/blob/master/engine/src/flutter/tools/engine_tool/README.md#running-a-flutter-app-with-a-local-engine-build
- Fixes a couple of typos

## 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], including [Features
we expect every widget to implement].
- [X] I signed the [CLA].
- [ ] I listed at least one issue that this PR fixes in the description
above.
- [ ] I updated/added relevant documentation (doc comments with `///`).
- [ ] I added new tests to check the change I am making, or this PR is
[test-exempt].
- [X] I followed the [breaking change policy] and added [Data Driven
Fixes] where supported.
- [X] All existing and new tests are passing.

If you need help, consider asking for advice on the #hackers-new channel
on [Discord].

**Note**: The Flutter team is currently trialing the use of [Gemini Code
Assist for
GitHub](https://developers.google.com/gemini-code-assist/docs/review-github-code).
Comments from the `gemini-code-assist` bot should not be taken as
authoritative feedback from the Flutter team. If you find its comments
useful you can update your code accordingly, but if you are unsure or
disagree with the feedback, please feel free to wait for a Flutter team
member's review for guidance on which automated comments should be
addressed.

<!-- Links -->
[Contributor Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#overview
[Tree Hygiene]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md
[test-exempt]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#tests
[Flutter Style Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md
[Features we expect every widget to implement]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md#features-we-expect-every-widget-to-implement
[CLA]: https://cla.developers.google.com/
[flutter/tests]: https://github.com/flutter/tests
[breaking change policy]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#handling-breaking-changes
[Discord]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Chat.md
[Data Driven Fixes]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Data-driven-Fixes.md
2025-08-28 21:31:55 +00:00
Jason Simmons
d721cabe19
Remove the option to disable the merged platform/UI thread on Android and iOS (#174408)
See https://github.com/flutter/flutter/issues/150525 for background on
the migration to a merged platform/UI thread.

The merged platform/UI thread model has been the default option for
nearly a year on the Android and iOS platforms and has been successfully
deployed in major applications. Future versions of the Flutter engine
will require the merged thread model, which provides benefits to
embedders such as synchronous calls between the host platform main
thread and Dart isolates.
2025-08-28 20:01:40 +00:00
Mouad Debbar
b8cd9aff20
[WebParagraph] More plumbing towards making it usable in Flutter apps (#174587)
- Introduce a `WebFontCollection`
([copied](a488d104f2/engine/src/flutter/lib/web_ui/lib/src/engine/text/font_collection.dart)
from the HTML renderer with minor tweaks).
- Teach `CkCanvas.drawParagraph` how to draw a `WebParagraph`.
- Remove several text-related features from CanvasKit/Skia that we don't
need anymore.

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

---------

Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
2025-08-28 18:11:28 +00:00
Harry Terkelsen
111f5a45f0
[web] Refactor renderers to use the same frontend code (#174588)
Refactors the renderer code so both renderers (Skwasm and CanvasKit) use
the same SceneBuilder and platform view embedding code. This change is
discussed in a design doc here:
https://flutter.dev/go/web-renderer-unification

Fixes https://github.com/flutter/flutter/issues/172311
Fixes https://github.com/flutter/flutter/issues/172308
Fixes https://github.com/flutter/flutter/issues/142072

## 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], including [Features
we expect every widget to implement].
- [x] I signed the [CLA].
- [x] I listed at least one issue that this PR fixes in the description
above.
- [x] I updated/added relevant documentation (doc comments with `///`).
- [x] I added new tests to check the change I am making, or this PR is
[test-exempt].
- [x] I followed the [breaking change policy] and added [Data Driven
Fixes] where supported.
- [x] All existing and new tests are passing.

If you need help, consider asking for advice on the #hackers-new channel
on [Discord].

**Note**: The Flutter team is currently trialing the use of [Gemini Code
Assist for
GitHub](https://developers.google.com/gemini-code-assist/docs/review-github-code).
Comments from the `gemini-code-assist` bot should not be taken as
authoritative feedback from the Flutter team. If you find its comments
useful you can update your code accordingly, but if you are unsure or
disagree with the feedback, please feel free to wait for a Flutter team
member's review for guidance on which automated comments should be
addressed.

<!-- Links -->
[Contributor Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#overview
[Tree Hygiene]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md
[test-exempt]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#tests
[Flutter Style Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md
[Features we expect every widget to implement]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md#features-we-expect-every-widget-to-implement
[CLA]: https://cla.developers.google.com/
[flutter/tests]: https://github.com/flutter/tests
[breaking change policy]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#handling-breaking-changes
[Discord]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Chat.md
[Data Driven Fixes]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Data-driven-Fixes.md
2025-08-28 15:27:58 +00:00
gaaclarke
b897fb76a0
Refactored Canvas to disallow null inline contexts. (#174530)
One of the possible explanations for the crash in
https://github.com/flutter/flutter/issues/168210#issuecomment-3130088036
is a null inline pass context. This makes that statically impossible
(barring an allocation problem).

tests: exempt, just a refactor

## 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], including [Features
we expect every widget to implement].
- [x] I signed the [CLA].
- [x] I listed at least one issue that this PR fixes in the description
above.
- [ ] I updated/added relevant documentation (doc comments with `///`).
- [x] I added new tests to check the change I am making, or this PR is
[test-exempt].
- [x] I followed the [breaking change policy] and added [Data Driven
Fixes] where supported.
- [x] All existing and new tests are passing.

If you need help, consider asking for advice on the #hackers-new channel
on [Discord].

**Note**: The Flutter team is currently trialing the use of [Gemini Code
Assist for
GitHub](https://developers.google.com/gemini-code-assist/docs/review-github-code).
Comments from the `gemini-code-assist` bot should not be taken as
authoritative feedback from the Flutter team. If you find its comments
useful you can update your code accordingly, but if you are unsure or
disagree with the feedback, please feel free to wait for a Flutter team
member's review for guidance on which automated comments should be
addressed.

<!-- Links -->
[Contributor Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#overview
[Tree Hygiene]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md
[test-exempt]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#tests
[Flutter Style Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md
[Features we expect every widget to implement]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md#features-we-expect-every-widget-to-implement
[CLA]: https://cla.developers.google.com/
[flutter/tests]: https://github.com/flutter/tests
[breaking change policy]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#handling-breaking-changes
[Discord]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Chat.md
[Data Driven Fixes]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Data-driven-Fixes.md
2025-08-28 05:04:17 +00:00
Jim Graham
066982b537
Revert "Check GTK calls are done on the same thread." (#174604)
Reverts flutter/flutter#174488

It is causing failures in testing:


https://logs.chromium.org/logs/flutter/buildbucket/cr-buildbucket/8705343407724739553/+/u/build_ci_host_release_benchmarks_flutter_build_dart:copy_dart_sdk_flutter_display_list:display_list_benchmarks_flutter_display_list:display_list_builder_benchmarks_flutter_display_list:display_list_region_benchmarks_flutter_display_list:display_list_transform_benchmarks_flutter_fml:fml_benchmarks_flutter_impeller_geometry:geometry_benchmarks_flutter_lib_ui:ui_benchmarks_flutter_shell_common:shell_benchmarks_flutter_shell_testing_flutter_txt:txt_benchmarks_flutter_tools_path_ops_flutter_build_archives:flutter_patched_sdk_flutter:unittests/stdout
2025-08-28 03:42:50 +00:00
Robert Ancell
62fadff87f
Check GTK calls are done on the same thread. (#174488)
Fixes https://github.com/flutter/flutter/issues/173660
2025-08-27 21:35:18 +00:00
Harry Terkelsen
53a4cde961
[web] Raster Pictures at full screen size in Skwasm (#174456)
Skwams currently rasters images at their `cullRect` size, and resizes
the `bitmaprenderer` canvas that will display the bitmap to the
`cullRect` size. It is unclear if the speed-up from the smaller bitmap
creation outweighs the cost of resizing and recreating the
`bitmaprenderer` canvas.

To prepare for the web renderer unification and unify the rasterization
step between the two renderers, this change makes it so Skwasm rasters
the pictures at the full screen size, and no longer needs to resize the
`bitmaprenderer` canvases unless the screen size changes.

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

## 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], including [Features
we expect every widget to implement].
- [x] I signed the [CLA].
- [x] I listed at least one issue that this PR fixes in the description
above.
- [x] I updated/added relevant documentation (doc comments with `///`).
- [x] I added new tests to check the change I am making, or this PR is
[test-exempt].
- [x] I followed the [breaking change policy] and added [Data Driven
Fixes] where supported.
- [x] All existing and new tests are passing.

If you need help, consider asking for advice on the #hackers-new channel
on [Discord].

**Note**: The Flutter team is currently trialing the use of [Gemini Code
Assist for
GitHub](https://developers.google.com/gemini-code-assist/docs/review-github-code).
Comments from the `gemini-code-assist` bot should not be taken as
authoritative feedback from the Flutter team. If you find its comments
useful you can update your code accordingly, but if you are unsure or
disagree with the feedback, please feel free to wait for a Flutter team
member's review for guidance on which automated comments should be
addressed.

<!-- Links -->
[Contributor Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#overview
[Tree Hygiene]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md
[test-exempt]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#tests
[Flutter Style Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md
[Features we expect every widget to implement]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md#features-we-expect-every-widget-to-implement
[CLA]: https://cla.developers.google.com/
[flutter/tests]: https://github.com/flutter/tests
[breaking change policy]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#handling-breaking-changes
[Discord]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Chat.md
[Data Driven Fixes]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Data-driven-Fixes.md
2025-08-27 19:04:10 +00:00
Camille Simon
daadbba856
[Android] Restrict AOT shared library engine flag to trusted paths (#173359)
### Overview

Restricts the `--aot-shared-library-name` flag used for launching
`FlutterFragment`s to only accept paths that point to the application's
internal storage.

### Why restrict the path at all

Currently, when an application launches a `FlutterFragment` with an
`Intent` that passes the `--aot-shared-library-name` flag, the Flutter
engine [will call
`dlopen`](f45a8f8b71/engine/src/flutter/fml/platform/posix/native_library_posix.cc (L14))
on the native code that lives where the passed path points with no
checks. So, if that path points to malicious code, we've got a problem.
See go/flutter-fragment-flag-security-analysis for full context.

By restricting the path to a trusted location, we ensure that the
application developer is either writing their own native code (that we
can assume not to be malicious) or is importing third party code and
manually packaging it with their application code, ensuring that it has
been vetted by the application author (or at least indicating that it
should be vetted).

### Why restrict the path to the application's internal storage

The [native code directory within internal
storage](https://developer.android.com/reference/android/content/pm/ApplicationInfo#nativeLibraryDir)
is where native JNI libraries are stored by default when the AGP
[`useLegacyPackaging`
option](https://developer.android.com/build/releases/past-releases/agp-4-2-0-release-notes#compress-native-libs-dsl)
is set to true, so any compiled native code that's part of an Android
app will live there.

If `useLegacyPackaging` is set to false or the application developer
wishes to reference native code some other way, they can manually
package it within internal storage, which is generally a secure place to
store files for your application needs. Also, as far as I'm aware, this
is the only secure place the application developers could reference
native code *by path* in their application (for example, developers
could put their native code in the `app/src/main/assets` directory, then
copy it into internal storage for reference by path).

_My primary sources:_
https://developer.android.com/ndk/guides/concepts
https://developer.android.com/studio/projects/add-native-code
https://developer.android.com/training/data-storage

### Prior art

Flutter has enforced a similar sort of path restriction for the
`file_selector_android` package; see
https://github.com/flutter/packages/pull/8184. Just like that PR does,
this PR makes sure to canonicalize paths passed to the flag and attempts
to test sneaky partial internal storage paths to mitigate path traversal
attacks.

### Future work

As mentioned in my TODO, the pattern of willy-nilly adding any flags
passed in an `Intent` to launch a `FlutterFragment` is dangerous. We
plan to address this vulnerability in a future PR:
https://github.com/flutter/flutter/issues/172553

### P.S. This PR also renames `application_library_path` to
`application_library_paths`

This is actually a vector of AOT shared library (plural) paths that can
include the one passed with the `--aot-shared-library-name` flag as well
as the fallbacks.

## 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], including [Features
we expect every widget to implement].
- [x] I signed the [CLA].
- [ ] I listed at least one issue that this PR fixes in the description
above.
- [x] I updated/added relevant documentation (doc comments with `///`).
- [x] I added new tests to check the change I am making, or this PR is
[test-exempt].
- [x] I followed the [breaking change policy] and added [Data Driven
Fixes] where supported.
- [x] All existing and new tests are passing.

If you need help, consider asking for advice on the #hackers-new channel
on [Discord].

**Note**: The Flutter team is currently trialing the use of [Gemini Code
Assist for
GitHub](https://developers.google.com/gemini-code-assist/docs/review-github-code).
Comments from the `gemini-code-assist` bot should not be taken as
authoritative feedback from the Flutter team. If you find its comments
useful you can update your code accordingly, but if you are unsure or
disagree with the feedback, please feel free to wait for a Flutter team
member's review for guidance on which automated comments should be
addressed.

<!-- Links -->
[Contributor Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#overview
[Tree Hygiene]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md
[test-exempt]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#tests
[Flutter Style Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md
[Features we expect every widget to implement]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md#features-we-expect-every-widget-to-implement
[CLA]: https://cla.developers.google.com/
[flutter/tests]: https://github.com/flutter/tests
[breaking change policy]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#handling-breaking-changes
[Discord]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Chat.md
[Data Driven Fixes]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Data-driven-Fixes.md
2025-08-27 16:24:28 +00:00
Robert Ancell
515c28da01
Fix lock up when window resized with merged UI and platform threads. (#172893)
Since the present occurs in the same thread as the draw we need to keep
running tasks while we wait for the frame.
2025-08-27 06:26:30 +00:00
Harry Terkelsen
93d5ace65f
[web] Add test that pictures are not rasterized when clipped out (#174452)
Adds a test that checks that pictures are not composited if they are
clipped out (or not in the frame) in the final scene. This is important
to test since we have benchmarks that depend on this behavior being
implemented properly.

Part of the web renderer unification. See
https://github.com/flutter/flutter/issues/172311

## 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], including [Features
we expect every widget to implement].
- [x] I signed the [CLA].
- [x] I listed at least one issue that this PR fixes in the description
above.
- [x] I updated/added relevant documentation (doc comments with `///`).
- [x] I added new tests to check the change I am making, or this PR is
[test-exempt].
- [x] I followed the [breaking change policy] and added [Data Driven
Fixes] where supported.
- [x] All existing and new tests are passing.

If you need help, consider asking for advice on the #hackers-new channel
on [Discord].

**Note**: The Flutter team is currently trialing the use of [Gemini Code
Assist for
GitHub](https://developers.google.com/gemini-code-assist/docs/review-github-code).
Comments from the `gemini-code-assist` bot should not be taken as
authoritative feedback from the Flutter team. If you find its comments
useful you can update your code accordingly, but if you are unsure or
disagree with the feedback, please feel free to wait for a Flutter team
member's review for guidance on which automated comments should be
addressed.

<!-- Links -->
[Contributor Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#overview
[Tree Hygiene]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md
[test-exempt]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#tests
[Flutter Style Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md
[Features we expect every widget to implement]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md#features-we-expect-every-widget-to-implement
[CLA]: https://cla.developers.google.com/
[flutter/tests]: https://github.com/flutter/tests
[breaking change policy]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#handling-breaking-changes
[Discord]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Chat.md
[Data Driven Fixes]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Data-driven-Fixes.md
2025-08-26 19:56:25 +00:00
gaaclarke
4ee281fe80
fixes the vulkan image layout transitions for mipmap generation (#173884)
Speculative fix for https://github.com/flutter/flutter/issues/171252

The image layout transitions were wrong when generating mipmaps where
we'd run into `width <= 1 || height <= 1`. Previously the logic would
short circuit the process of converting everything from Dst->Src,
potentially leaving the mips in a series like [Read, Read, Src, Dst].
Then only the last one would get set to read, so [Read, Read, Src,
Read].

Now instead we group transition them all to Dst, then one by one we
switch them to src, make sure the last one gets set to src, then group
transition them to read. We make sure the loop doesn't break to make
sure everything transitions to src.

While this fixes a hypothetical bug, I couldn't replicate the bug inside
of unit tests because of validations. I couldn't find a mip count /
texture size that would allow me to hit the `break` statement that jonah
added previously. That doesn't mean it couldn't happen on release builds
though. I'm less confident that this fixes the issue after having
written the tests.

This does reduce the number of barriers though, so that's a win.

## 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], including [Features
we expect every widget to implement].
- [x] I signed the [CLA].
- [x] I listed at least one issue that this PR fixes in the description
above.
- [x] I updated/added relevant documentation (doc comments with `///`).
- [x] I added new tests to check the change I am making, or this PR is
[test-exempt].
- [x] I followed the [breaking change policy] and added [Data Driven
Fixes] where supported.
- [x] All existing and new tests are passing.

If you need help, consider asking for advice on the #hackers-new channel
on [Discord].

**Note**: The Flutter team is currently trialing the use of [Gemini Code
Assist for
GitHub](https://developers.google.com/gemini-code-assist/docs/review-github-code).
Comments from the `gemini-code-assist` bot should not be taken as
authoritative feedback from the Flutter team. If you find its comments
useful you can update your code accordingly, but if you are unsure or
disagree with the feedback, please feel free to wait for a Flutter team
member's review for guidance on which automated comments should be
addressed.

<!-- Links -->
[Contributor Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#overview
[Tree Hygiene]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md
[test-exempt]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#tests
[Flutter Style Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md
[Features we expect every widget to implement]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md#features-we-expect-every-widget-to-implement
[CLA]: https://cla.developers.google.com/
[flutter/tests]: https://github.com/flutter/tests
[breaking change policy]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#handling-breaking-changes
[Discord]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Chat.md
[Data Driven Fixes]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Data-driven-Fixes.md
2025-08-26 17:23:10 +00:00
gaaclarke
84f5d2625d
[Impeller] Make sure inline passes always do a clear action. (#174083)
The assumption they could avoid this is no longer valid.

issue: https://github.com/flutter/flutter/issues/171772

## Pre-launch Checklist

- [ ] I read the [Contributor Guide] and followed the process outlined
there for submitting PRs.
- [ ] I read the [Tree Hygiene] wiki page, which explains my
responsibilities.
- [ ] I read and followed the [Flutter Style Guide], including [Features
we expect every widget to implement].
- [ ] I signed the [CLA].
- [ ] I listed at least one issue that this PR fixes in the description
above.
- [ ] I updated/added relevant documentation (doc comments with `///`).
- [ ] I added new tests to check the change I am making, or this PR is
[test-exempt].
- [ ] I followed the [breaking change policy] and added [Data Driven
Fixes] where supported.
- [ ] All existing and new tests are passing.

If you need help, consider asking for advice on the #hackers-new channel
on [Discord].

**Note**: The Flutter team is currently trialing the use of [Gemini Code
Assist for
GitHub](https://developers.google.com/gemini-code-assist/docs/review-github-code).
Comments from the `gemini-code-assist` bot should not be taken as
authoritative feedback from the Flutter team. If you find its comments
useful you can update your code accordingly, but if you are unsure or
disagree with the feedback, please feel free to wait for a Flutter team
member's review for guidance on which automated comments should be
addressed.

<!-- Links -->
[Contributor Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#overview
[Tree Hygiene]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md
[test-exempt]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#tests
[Flutter Style Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md
[Features we expect every widget to implement]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md#features-we-expect-every-widget-to-implement
[CLA]: https://cla.developers.google.com/
[flutter/tests]: https://github.com/flutter/tests
[breaking change policy]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#handling-breaking-changes
[Discord]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Chat.md
[Data Driven Fixes]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Data-driven-Fixes.md
2025-08-26 16:48:12 +00:00
Jing Shao
cb04accbf2
[iOS][Secure Paste] Custom edit menu actions (#171825)
<!--
Thanks for filing a pull request!
Reviewers are typically assigned within a week of filing a request.
To learn more about code review, see our documentation on Tree Hygiene:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md
-->

This PR implements support for custom action items in the native edit
menu on iOS, with changes to both framework and engine. This PR will be
updated incrementally until the full feature is complete.

Phase 1: Add hardcoded custom menu item for iOS edit menu.
Phase 2: Add Framework API for custom iOS context menu items.
Phase 3: Add Optimization, Testing, and Documentation. 

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

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

*If you had to change anything in the [flutter/tests] repo, include a
link to the migration guide as per the [breaking change policy].*

## 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], including [Features
we expect every widget to implement].
- [x] I signed the [CLA].
- [x] I listed at least one issue that this PR fixes in the description
above.
- [x] I updated/added relevant documentation (doc comments with `///`).
- [x] I added new tests to check the change I am making, or this PR is
[test-exempt].
- [ ] I followed the [breaking change policy] and added [Data Driven
Fixes] where supported.
- [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/blob/main/docs/contributing/Tree-hygiene.md#overview
[Tree Hygiene]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md
[test-exempt]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#tests
[Flutter Style Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md
[Features we expect every widget to implement]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md#features-we-expect-every-widget-to-implement
[CLA]: https://cla.developers.google.com/
[flutter/tests]: https://github.com/flutter/tests
[breaking change policy]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#handling-breaking-changes
[Discord]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Chat.md
[Data Driven Fixes]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Data-driven-Fixes.md
2025-08-26 05:11:45 +00:00
Jason Simmons
bd30bc7301
[Impeller] Flush the data written to the device buffer by RoundSuperellipseGeometry (#174316)
Fixes https://github.com/flutter/flutter/issues/174100
2025-08-26 00:11:44 +00:00
Jim Graham
22a5223479
Remove obsolete vulkan_window source files (#174087)
While doing some code surveys to see what surface/context files are
being used, I discovered that these source files defined classes that
were not used anywhere, so deleting them as dead code.
2025-08-26 00:00:12 +00:00
Harry Terkelsen
5550f40956
[web] Migrate non-CanvasKit-specific tests to ui/ (#174396)
There are many tests under `canvaskit/` which test general rendering and
UI primitives and these tests aren't specific to the CanvasKit
implementation details. This change moves them to `ui/` so all renderers
can test against them.

Part of the refactoring to unify CanvasKit and Skwasm rendering
front-ends. See https://github.com/flutter/flutter/issues/172311

## 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], including [Features
we expect every widget to implement].
- [x] I signed the [CLA].
- [x] I listed at least one issue that this PR fixes in the description
above.
- [x] I updated/added relevant documentation (doc comments with `///`).
- [x] I added new tests to check the change I am making, or this PR is
[test-exempt].
- [x] I followed the [breaking change policy] and added [Data Driven
Fixes] where supported.
- [x] All existing and new tests are passing.

If you need help, consider asking for advice on the #hackers-new channel
on [Discord].

**Note**: The Flutter team is currently trialing the use of [Gemini Code
Assist for
GitHub](https://developers.google.com/gemini-code-assist/docs/review-github-code).
Comments from the `gemini-code-assist` bot should not be taken as
authoritative feedback from the Flutter team. If you find its comments
useful you can update your code accordingly, but if you are unsure or
disagree with the feedback, please feel free to wait for a Flutter team
member's review for guidance on which automated comments should be
addressed.

<!-- Links -->
[Contributor Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#overview
[Tree Hygiene]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md
[test-exempt]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#tests
[Flutter Style Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md
[Features we expect every widget to implement]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md#features-we-expect-every-widget-to-implement
[CLA]: https://cla.developers.google.com/
[flutter/tests]: https://github.com/flutter/tests
[breaking change policy]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#handling-breaking-changes
[Discord]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Chat.md
[Data Driven Fixes]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Data-driven-Fixes.md
2025-08-25 23:55:46 +00:00
Jason Simmons
4025fbe44f
Release thread-local resources when submitting a Flutter GPU command buffer (#173663)
Impeller back ends may hold resources (such as Vulkan command pools) in
thread-local storage so they can be reused during a series of
operations. These resources must be freed when they are no longer
useful.

Fixes https://github.com/flutter/flutter/issues/172068
2025-08-25 19:31:08 +00:00
Harry Terkelsen
1110406d58
[web] Refactor LayerScene out of CanvasKit (#174375)
Moves the `LayerSceneBuilder` code out of CanvasKit and into a
higher-level directory under `engine/`. This is in preparation for the
code to be shared between the CanvasKit and Skwasm renderers.

See https://github.com/flutter/flutter/issues/172311

## 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], including [Features
we expect every widget to implement].
- [x] I signed the [CLA].
- [x] I listed at least one issue that this PR fixes in the description
above.
- [x] I updated/added relevant documentation (doc comments with `///`).
- [x] I added new tests to check the change I am making, or this PR is
[test-exempt].
- [x] I followed the [breaking change policy] and added [Data Driven
Fixes] where supported.
- [x] All existing and new tests are passing.

If you need help, consider asking for advice on the #hackers-new channel
on [Discord].

**Note**: The Flutter team is currently trialing the use of [Gemini Code
Assist for
GitHub](https://developers.google.com/gemini-code-assist/docs/review-github-code).
Comments from the `gemini-code-assist` bot should not be taken as
authoritative feedback from the Flutter team. If you find its comments
useful you can update your code accordingly, but if you are unsure or
disagree with the feedback, please feel free to wait for a Flutter team
member's review for guidance on which automated comments should be
addressed.

<!-- Links -->
[Contributor Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#overview
[Tree Hygiene]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md
[test-exempt]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#tests
[Flutter Style Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md
[Features we expect every widget to implement]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md#features-we-expect-every-widget-to-implement
[CLA]: https://cla.developers.google.com/
[flutter/tests]: https://github.com/flutter/tests
[breaking change policy]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#handling-breaking-changes
[Discord]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Chat.md
[Data Driven Fixes]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Data-driven-Fixes.md
2025-08-25 19:18:18 +00:00
Jackson Gardner
3340caed81
[skwasm] Port to DisplayList objects (#172314)
This PR refactors the skwasm renderer to use `DisplayList` objects as
its main model objects instead of using Skia objects directly. Then, at
render time, we dispatch the display list commands to the skia surface.
This is a preparatory step for impeller on web.
* Some build rules were reworked in order to allow `DisplayList` to
compile via emscripten
* Some pieces of the display list library were further refactored to
allow us to compile it without actually building and linking the
impeller shaders. The two major classes that needed to be separated out
were `DlRuntimeEffect` and the text drawing system.
* `SkPath` and `SkImage` are still used as the main model objects in
skwasm. As of right now, `DisplayList` just thinly wraps these objects,
so this is the minimal possible change for now. I will have to refactor
this somewhat further when preparing for actual impeller adoption.
* Several special cased code paths in skwasm were removed, as they are
taken care of by `DisplayList` itself. This includes shadow drawing,
determining when to enable dithering, and determining the right clamp
value for filters.
2025-08-25 16:08:33 +00:00
engine-flutter-autoroll
ddfbad85dc
Roll Dart SDK from 4f9623f024ab to e283a9e88242 (8 revisions) (#174358)
https://dart.googlesource.com/sdk.git/+log/4f9623f024ab..e283a9e88242

2025-08-25 dart-internal-merge@dart-ci-internal.iam.gserviceaccount.com
Version 3.10.0-135.0.dev
2025-08-24 dart-internal-merge@dart-ci-internal.iam.gserviceaccount.com
Version 3.10.0-134.0.dev
2025-08-23 dart-internal-merge@dart-ci-internal.iam.gserviceaccount.com
Version 3.10.0-133.0.dev
2025-08-23 dart-internal-merge@dart-ci-internal.iam.gserviceaccount.com
Version 3.10.0-132.0.dev
2025-08-23 dart-internal-merge@dart-ci-internal.iam.gserviceaccount.com
Version 3.10.0-131.0.dev
2025-08-22 dart-internal-merge@dart-ci-internal.iam.gserviceaccount.com
Version 3.10.0-130.0.dev
2025-08-22 dart-internal-merge@dart-ci-internal.iam.gserviceaccount.com
Version 3.10.0-129.0.dev
2025-08-22 dart-internal-merge@dart-ci-internal.iam.gserviceaccount.com
Version 3.10.0-128.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
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:
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
2025-08-25 10:32:31 +00:00
Harry Terkelsen
7d6d410dd3
[web] Expose rasterizers in Renderer (#174308)
This is a small tweak to the Renderer API that exposes a `Rasterizer`
and a map of `View` to `ViewRasterizer` in the `Renderer`. The
`Renderer` handles creating and disposing the `ViewRasterizer`s in
response to `View`s being created and disposed.

This is a step towards https://github.com/flutter/flutter/issues/172311

## 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], including [Features
we expect every widget to implement].
- [x] I signed the [CLA].
- [x] I listed at least one issue that this PR fixes in the description
above.
- [x] I updated/added relevant documentation (doc comments with `///`).
- [x] I added new tests to check the change I am making, or this PR is
[test-exempt].
- [x] I followed the [breaking change policy] and added [Data Driven
Fixes] where supported.
- [x] All existing and new tests are passing.

If you need help, consider asking for advice on the #hackers-new channel
on [Discord].

**Note**: The Flutter team is currently trialing the use of [Gemini Code
Assist for
GitHub](https://developers.google.com/gemini-code-assist/docs/review-github-code).
Comments from the `gemini-code-assist` bot should not be taken as
authoritative feedback from the Flutter team. If you find its comments
useful you can update your code accordingly, but if you are unsure or
disagree with the feedback, please feel free to wait for a Flutter team
member's review for guidance on which automated comments should be
addressed.

<!-- Links -->
[Contributor Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#overview
[Tree Hygiene]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md
[test-exempt]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#tests
[Flutter Style Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md
[Features we expect every widget to implement]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md#features-we-expect-every-widget-to-implement
[CLA]: https://cla.developers.google.com/
[flutter/tests]: https://github.com/flutter/tests
[breaking change policy]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#handling-breaking-changes
[Discord]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Chat.md
[Data Driven Fixes]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Data-driven-Fixes.md
2025-08-22 23:50:24 +00:00
Hannah Jin
798ff5908e
Update some semantics flags updated to use enum (engine, framework, web) (#170696)
issue: https://github.com/flutter/flutter/issues/166101,


new Updates :
Add new enum Tristate and CheckedState in  for 7 flags.
For CheckState, it used to use 3 bools (hasCheck, isChecked,
isCheckStateMixed) to represent check states, replace them with a
CheckState enum.
For other 6 flags, each has 2 bools (hasXXState and isXX), replace them
with a Tristate enum.

This will be a breaking changes to the SemanticsFlags class , which was
added in April in https://github.com/flutter/flutter/issues/166101 and
https://github.com/flutter/flutter/pull/167771 , will write a breaking
change doc for this PR




## Pre-launch Checklist

- [ ] I read the [Contributor Guide] and followed the process outlined
there for submitting PRs.
- [ ] I read the [Tree Hygiene] wiki page, which explains my
responsibilities.
- [ ] I read and followed the [Flutter Style Guide], including [Features
we expect every widget to implement].
- [ ] I signed the [CLA].
- [ ] I listed at least one issue that this PR fixes in the description
above.
- [ ] I updated/added relevant documentation (doc comments with `///`).
- [ ] I added new tests to check the change I am making, or this PR is
[test-exempt].
- [ ] I followed the [breaking change policy] and added [Data Driven
Fixes] where supported.
- [ ] 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/blob/main/docs/contributing/Tree-hygiene.md#overview
[Tree Hygiene]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md
[test-exempt]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#tests
[Flutter Style Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md
[Features we expect every widget to implement]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md#features-we-expect-every-widget-to-implement
[CLA]: https://cla.developers.google.com/
[flutter/tests]: https://github.com/flutter/tests
[breaking change policy]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#handling-breaking-changes
[Discord]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Chat.md
[Data Driven Fixes]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Data-driven-Fixes.md
2025-08-22 22:38:17 +00:00
Matan Lurey
6c7d6429bd
_downloadArtifacts (Web SDK) uses content-aware hashing in post-submit (#174236)
Towards https://github.com/flutter/flutter/issues/174225.

Will need to get cherry-picked into 3.35 and 3.36.
2025-08-22 19:54:09 +00:00
Jackson Gardner
a24dbd551f
Refactor text and runtime effect to separate skia and impeller implementations. (#174219)
This makes two refactors to the display list architecture:
* The concrete implementations of `DlRuntimeEffect` for skia and
impeller are separated, and the impeller implementation put into the
`impeller/display_list` target. This makes sure that a client can link
against the main `display_list` library without actually pulling in all
of impeller. (This is needed for
https://github.com/flutter/flutter/pull/172314)
* The `DrawTextBlob` and `DrawTextFrame` methods are consolidated into
one `DrawText` call, and that takes a `DlText` object. The `DlText`
object has two implementations, one for skia and one for impeller, and
the impeller one is moved into `impeller/display_list` for the same
reason mentioned above.
2025-08-22 19:53:39 +00:00
Gray Mackall
26bb33b957
[HCPP] Clean up overlay layer when last frame had overlay content and current doesn't (#173881)
Fixes https://github.com/flutter/flutter/issues/173635

My current understanding of the issue is that we are never pushing a new
empty frame for this layer, so the texture gets stuck as shown in the
bug. If we keep track of when we had content last frame, and don't in
the current frame, we can push a single empty frame for that layer when
needed.

See example in
https://github.com/flutter/flutter/issues/173635#issuecomment-3192787040

## 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], including [Features
we expect every widget to implement].
- [x] I signed the [CLA].
- [x] I listed at least one issue that this PR fixes in the description
above.
- [x] I updated/added relevant documentation (doc comments with `///`).
- [x] I added new tests to check the change I am making, or this PR is
[test-exempt].
- [x] I followed the [breaking change policy] and added [Data Driven
Fixes] where supported.
- [x] All existing and new tests are passing.

If you need help, consider asking for advice on the #hackers-new channel
on [Discord].

**Note**: The Flutter team is currently trialing the use of [Gemini Code
Assist for
GitHub](https://developers.google.com/gemini-code-assist/docs/review-github-code).
Comments from the `gemini-code-assist` bot should not be taken as
authoritative feedback from the Flutter team. If you find its comments
useful you can update your code accordingly, but if you are unsure or
disagree with the feedback, please feel free to wait for a Flutter team
member's review for guidance on which automated comments should be
addressed.

<!-- Links -->
[Contributor Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#overview
[Tree Hygiene]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md
[test-exempt]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#tests
[Flutter Style Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md
[Features we expect every widget to implement]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md#features-we-expect-every-widget-to-implement
[CLA]: https://cla.developers.google.com/
[flutter/tests]: https://github.com/flutter/tests
[breaking change policy]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#handling-breaking-changes
[Discord]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Chat.md
[Data Driven Fixes]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Data-driven-Fixes.md

---------

Co-authored-by: Gray Mackall <mackall@google.com>
2025-08-22 16:39:11 +00:00