31527 Commits

Author SHA1 Message Date
chunhtai
6ac6d3ec0f
[web] Makes Tappable semantics behavior adaptive (#182167)
<!--
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
-->

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

mainly change how tappable and other classes work so that it can self
shutoff when the semantics object change

## 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
2026-02-13 00:45:01 +00:00
zhongliugo
7bafe12c4f
[web] Fix scroll event bubbling in iframes (#179703)
Fixes scroll event bubbling when Flutter web is embedded in an
iframe(#156985).

When a scrollable handles a wheel event, it now calls
respond(allowPlatformDefault: false) to signal the engine.

In iframe mode, the engine always calls preventDefault() to block native
scroll chaining, then uses postMessage to explicitly scroll the parent
page only when all scrollables are at boundary

Before change:
https://issue-156985-before.web.app/

After change:
https://issue-156985-after.web.app/
2026-02-12 21:25:13 +00:00
gaaclarke
fd817c7c8a
Made sure no test() declaration happens asynchronously in fragment shader tests (#182306)
fixes https://github.com/flutter/flutter/issues/182305

test exempt: is a test

## 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
2026-02-12 20:43:37 +00:00
b-luk
98d8802897
Increase timeout for tracing_test.dart's "Canvas.saveLayer emits tracing" (#182225)
Potentially addresses #182150.

From
https://github.com/flutter/flutter/issues/182150#issuecomment-3886099639:

From looking at the newly non-quiet failures, the issue is that the
"Canvas.saveLayer emits tracing" test in tracing_tests.dart is timing
out after 30 seconds.

Looking at a sample of this test when it passes (from
https://logs.chromium.org/logs/flutter/buildbucket/cr-buildbucket/8690171468694972273/+/u/test:_test:_Host_Tests_for_host_debug_unopt/stdout),
it took 20, 19, 29, 25, 21, and 23 seconds for 6 different variations
(multithreading enabled/disabled, skia/vulkan/opengles backends). So it
definitely could be running up against the default 30 second test
timeout if a run happens to take a little bit slower.

We can try increasing the timeout for this test.

## 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
2026-02-11 21:05:25 +00:00
Michael Brase
a1b62d3566
Clean up include paths for Fuchsia in the flutter engine (#182031)
This rewrites many of the include paths in Fuchsia engine code to use
the full path of the file. For example:

```diff
-#include "runtime/dart/utils/inlines.h"
+#include "flutter/shell/platform/fuchsia/runtime/dart/utils/inlines.h"
```

I also cleaned up a few unused includes and convered the includes for
the Fuchsia SDK to using angle backets.

## 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.
- [ ] All existing and new tests are passing.
2026-02-11 20:13:35 +00:00
Victoria Ashworth
d0003a62be
Revert "Send statusBarTouch events via dedicated messages (#179643)" (#182223)
This reverts commit f4c83de1bf17e4fb4706122ff9d0a5f9f6ed4308.

See b/482565401.

## 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
2026-02-11 19:42:09 +00:00
Sam Rawlins
bacb47284f
engine: Use a super-parameter in one missed case (#181914)
Work towards https://github.com/dart-lang/sdk/issues/58729

The lint rule will suggest using a super-parameter for a named parameter
even if the positional parameters cannot be super-parameters.
2026-02-11 18:01:19 +00:00
b-luk
9cde519556
Fix incorrect rendering from drawImageNine when running on impeller with opengles (#182179)
The `frag_info.source_rect` passed into
98977409b2/engine/src/flutter/impeller/entity/shaders/texture_fill_strict_src.frag
from
[texture_contents.cc](98977409b2/engine/src/flutter/impeller/entity/contents/texture_contents.cc (L187))
did not account for an inverted y scale (used with an opengles impeller
backend).

This ends up causing the coordinates used to sample the texture in the
fragment shader to be incorrectly clamped. A lot of the y coordinates
end up incorrectly being considered outside of the source_rect, so we
end up with lots of incorrect y values and vertical smearing caused by
the clamping.

The texture_fill_strict_src.frag shader is used primarily by calls to
drawImageNIne. NinePatchConverter calls DrawImageRect with
SourceRectConstraint::kStrict, which uses texture_fill_strict_src.frag.

https://github.com/flutter/flutter/issues/182101 shows a repro case for
this. The golden test issue discussed in
https://github.com/flutter/flutter/pull/181933#issuecomment-3873204657
is also caused by this.

## 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
2026-02-11 18:01:13 +00:00
Ricky van den berg
0b894805c9
[Impeller] Fix VkImageView leak in WrappedTextureSourceVK (#181966)
## Description

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

`WrappedTextureSourceVK` in the embedder delegate path creates a
`VkImageView` every frame via `createImageView()` but never destroys it.
The handle is stored as a raw non-owning `vk::ImageView` and the
destructor is empty, leaking one `VkImageView` per frame (~60/sec on a
typical app).

This switches to `vk::UniqueImageView` for RAII ownership so the image
view is destroyed when the `WrappedTextureSourceVK` is released.

## Why this is safe

The resource lifetime is correct because Impeller's `TrackedObjectsVK`
holds a `shared_ptr` to the `TextureSourceVK` until the GPU fence
signals completion:

1. `RenderPassVK` calls `Track(attachment.texture)` on all render target
textures
2. `CommandBufferVK::Track()` stores `shared_ptr<TextureSourceVK>` in
`TrackedObjectsVK`
3. `TrackedObjectsVK` is cleared only in the fence completion callback,
after the GPU finishes

The `VkImageView` cannot be destroyed while the GPU is still using it.

## Scope

This only affects the **embedder delegate code path** (when `delegate_
!= nullptr` in `GPUSurfaceVulkanImpeller::AcquireFrame`). Android passes
`nullptr` as the delegate and uses `AcquireNextSurface()` instead, so
this change has **no effect on Android, iOS, or standard swapchain
rendering**.

## 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].
- [x] I listed at least one issue that this PR fixes in the description
above.
- [ ] I added a test for the change if applicable. *(See note below)*

**Note on testing:** This is a resource leak fix in a Vulkan code path
that requires a running Vulkan device and embedder delegate. I was
unable to find existing test infrastructure for the embedder delegate
path in `GPUSurfaceVulkanImpeller`. Happy to add a test if reviewers can
point me to the right test harness.

Found while working on Impeller Vulkan support for Linux/Wayland with a
custom embedder.

[Contributor Guide]:
https://github.com/flutter/flutter/blob/master/docs/contributing/Tree-hygiene.md#overview
[Tree Hygiene]:
https://github.com/flutter/flutter/blob/master/docs/contributing/Tree-hygiene.md
[Flutter Style Guide]:
https://github.com/flutter/flutter/blob/master/docs/contributing/Style-guide-for-Flutter-repo.md
2026-02-11 17:40:32 +00:00
walley892
836c295085
Update web ui fragment shader tests (#181877)
Adds a bunch of tests for uniform setting functionality for custom
fragment shaders on the web.

Deletes redundant tests.

Fixes a discovered issue in the uniform offset calculation. We were
previously using the `location`, which is the integer offset of the
uniform, not the offset in floats.
2026-02-11 06:54:08 +00:00
walley892
409d62612b
Add getUniformMatX support for desktop and mobile (#182117)
Adds getUniformMatX and getUniformMatXArray functions to desktop and
mobile.

Also fixes a padding issue with mat3s on Vulkan.
2026-02-11 01:50:35 +00:00
Matt Boetger
b9febd8991
Ensure resize listener is not added if content sizing is not turned on (#182168)
Make sure the resize listener is not added if content sizing is not
enabled. This should ensure that the resize listener is not causing the
flake. While this won't fix the flake if content sizing is enabled -
this test was passing before content sizing was checked in therefore
this should remove any side effect content sizing is having on the test.

Fixes: #179673

## 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.
2026-02-10 23:17:10 +00:00
b-luk
bf279ee4d6
Update linux_unopt CI: Increase timeout and remove --quiet flag (#182162)
Increasing the timeout should let reruns complete if the initial run
fails. Right now reruns make the workflow time out, so reruns don't have
time to complete.

Removing the --quiet flag should help debug what's going wrong.

Helps to deflake/debug #182150

## 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
2026-02-10 23:15:15 +00:00
lllgm
ed1922e4fa
fix(android): add null check for textInputPlugin in FlutterView (#180386)
Prevents NPE in onProvideAutofillVirtualStructure when
attachToEngineAutomatically is false and autofill is triggered before
manual engine attachment.

Added null safety check with early return and debug warning. Maintains
backward compatibility.

Fixes:
flutter/flutter/issues/149792、https://github.com/flutter/flutter/issues/180383

<!--
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
-->

*Replace this paragraph with a description of what this PR is changing
or adding, and why. Consider including before/after screenshots.*

*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.*

*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].

**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
2026-02-10 23:11:24 +00:00
Dominique Martinet
dac6b3e74a
[gn] fix --stripped being disabled for all targets (#181984)
#161546 changed the stripped option with the intent to be true for
android, and false for all other targets, but the check never worked as
intended because parser store_true action default value is False so the
final else was never used.

This fixes the build size increase that was noticed on flutter 3.32 for
linux targets

Fixes #181983

## Pre-launch Checklist

- [x] 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].
- [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].
- [ ] I followed the [breaking change policy] and added [Data Driven
Fixes] where supported.
- [ ] All existing and new tests are passing.
2026-02-10 16:05:13 +00:00
gaaclarke
cbdc962f33
Delete the last remaining skia only fragment shader tests (#182127)
issue https://github.com/flutter/flutter/issues/180764

## 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
2026-02-10 03:42:10 +00:00
Hannah Jin
3e7835eaed
[a11y][android] Set new CheckState APIs for android API 36 (#182113)
android API 36 has some new API for Check state

https://developer.android.com/reference/android/view/accessibility/AccessibilityNodeInfo#setChecked(boolean)


https://developer.android.com/reference/android/view/accessibility/AccessibilityNodeInfo#setChecked(int)

 we need to set them so it will announce the states correctly.
fix https://github.com/flutter/flutter/issues/181321 



## 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
2026-02-10 03:42:09 +00:00
Loïc Sharma
4998122194
Bump Dart to 3.10 (#174066)
This version of Dart supports dot shorthands.

Follow-up to: https://github.com/flutter/flutter/issues/180607

See also:

 * https://flutter.dev/go/flutter-style-updates
 * https://github.com/flutter/flutter/pull/181934
2026-02-10 03:36:10 +00:00
Camille Simon
99c5bd49ce
[Android] Add mechanism for setting Android engine flags via Android manifest (take 2) (#181632)
A continuation of https://github.com/flutter/flutter/pull/177127.
Copying from there:

# Overview

> [!NOTE]  
> This PR is based on conversation & feedback on
go/flutter-android-harden-engine-shell-arguments.

Adds a mechanism for setting Android engine flags via the manifest. If a
flag is specified on the command line and in manifest metadata, the
value specified on the command line will take precedence. Documentation
is added on this mechanism

Additionally, this PR removes the exposure of`--cache-sksl` command line
flag as per
[https://github.com/flutter/flutter/issues/140310#issuecomment-2708459007](https://www.google.com/url?q=https://github.com/flutter/flutter/issues/140310%23issuecomment-2708459007&sa=D&source=docs&ust=1761156167162464&usg=AOvVaw3a8ubXTtv3apknY2-P9dKe).

Additionally, this PR adds documentation for the only two supported ways
of setting engine flags moving forward -- via the command line or
manifest. The `Intent` mechanism will be removed when
https://github.com/flutter/flutter/issues/180686 is completed (intended
to be a follow up to this PR).

As the unit tests in this PR only cover setting flags via manifest in
debug mode, I will follow up this PR with an integration test to test
that flags are appropriately respected/ignored in release mode. See
https://github.com/flutter/flutter/pull/178383 for my currently working
but WIP draft.

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

# Follow up work:

## Add integration test for this new added mechanism
This will land as an immediate follow-up to this PR. WIP in
https://github.com/flutter/flutter/pull/178383.

## Remove support for setting shell arguments via `Intent`
This task will be a follow up to this work + the integration test
landing, and will complete work for
https://github.com/flutter/flutter/issues/172553. See
https://github.com/flutter/flutter/issues/180686 for details.

## 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
2026-02-09 22:03:18 +00:00
qian
94c758fe53
fix build fail for wayland only platform (#182057)
<!--
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 fix build fail on wayland only platform, and i wrap all
X11-specific code with `#ifdef GDK_WINDOWING_X11`

fix issue #182056


## 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
2026-02-09 21:13:00 +00:00
b-luk
c1eef3d292
Adds opengles to engine dart tests (#181933)
Forked from https://github.com/flutter/flutter/pull/180704. See comments
there for more context.

Enables most of the dart tests for opengles. There are some which aren't
passing, which are filtered out in run_tests.py.

Fixes an issue in snapshot_controller_impeller.cc where a returned
GLContextResult is ignored. The returned GLContextResult is potentially
an RAII object, so it must stay in scope for subsequent GL calls.

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

## 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: Aaron Clarke <aaclarke@google.com>
Co-authored-by: gaaclarke <30870216+gaaclarke@users.noreply.github.com>
2026-02-09 20:59:39 +00:00
gaaclarke
5f3a29abac
Add buffer around rerasterized input to fragment shaders to maintain coordinate space when clipped (#181743)
fixes https://github.com/flutter/flutter/issues/181660

This works by changing the rerasterization logic such that we will
rerasterize the output from the blur filter to an image that matches the
dimensions of the input. The undoes the optimization of the clip rect
but standardizes the input to the fragment shader so that it is behaving
as if the input was the same as a backdrop filter without the blur
before hand.

I think there may be opportunities in the future to find a way to make
this more efficient if we could find some way to rerasterize only to the
clipped region but tweak the coordinates in the fragment shader to make
it act like it has a whole image.

## 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
2026-02-07 01:23:50 +00:00
Jason Simmons
3e015d2dab
Manual roll Skia from 39aa2a70213a to 9a983f6c2c06 (#181986)
Includes updates for the renaming of SkDebug to SkLog
2026-02-06 21:04:10 +00:00
Matej Knopp
692dbb71e7
macOS: Implement tooltip window controller (#180895)
This PR implements tooltip windows on macOS.

*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].
- [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
2026-02-05 23:11:19 +00:00
jingweicai
e12f8c282f
perf: web ui loadFontFromList (#181440)
<!--
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
-->

Optimize the loadFontFromList method of SkiaFontCollection. Reduce the
generation of unnecessary FontMgr.

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


## 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.
- [x] All existing and new tests are passing.

Co-authored-by: Mouad Debbar <mdebbar@google.com>
2026-02-05 22:12:40 +00:00
nmarci89
f916dd6887
Implement macOS wide gamut (Display P3) support (#181769)
Adds wide gamut color support to macOS (matching iOS), upgrades the
surface pixel format from 10-bit BGRA10_XR to 16-bit float RGBA16Float
on both iOS and macOS when enabled, and fixes Impeller's blur filter P3
clamping on macOS.

**macOS Wide Gamut Support**
- Added DoesHardwareSupportWideGamut() hardware capability check
(MTLGPUFamilyApple2 or MTLGPUFamilyMac2)
- Wide gamut enabled when both hardware supports it and
FLTEnableWideGamut plist flag is YES
- Dynamic wide gamut switching when windows move between P3 and sRGB
displays
- Added flutter/screenshot method channel on macOS for integration
testing

**RGBA16Float Surface Format (iOS + macOS)**
- macOS IOSurface: kCVPixelFormatType_64RGBAHalf +
MTLPixelFormatRGBA16Float
- iOS CAMetalLayer: MTLPixelFormatRGBA16Float
- Image decoder: always uses kRGBA_F16_SkColorType for all wide gamut
images (previously only transparent images used 16-bit)

**Fix Blur P3 Clamping on macOS**
macOS uses the compositor/embedder path, not GPUSurfaceMetalImpeller, so
UpdateOffscreenLayerPixelFormat was never called. Added the call in
embedder.cc after wrapping the Metal resolve texture.

**Why RGBA16Float over BGRA10_XR?**
BGRA10_XR has only 10 bits per channel — values outside sRGB gamut get
clamped in intermediate render targets (e.g. blur filters). RGBA16Float
has 16 bits per channel with full floating-point range, preventing P3
color clamping in multi-pass rendering.

**Tests**
- 9 new iOS FlutterView unit tests verifying RGBA16Float pixel format
and extended sRGB color space
- Updated macOS FlutterSurfaceManagerTest for RGBA16Float, dynamic
switching, color space, and pixel format verification
- Updated image decoder and Impeller display list tests for
kR16G16B16A16Float
- 11 macOS/iOS integration tests: image, saveLayer, codecImage, none,
blur, drawnImage, container, linearGradient, radialGradient,
conicalGradient, sweepGradient

### Issues
https://github.com/flutter/flutter/issues/164557

## 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.
- [ ] All existing and new tests are passing.
2026-02-05 00:27:27 +00:00
engine-flutter-autoroll
70d9d31880
Roll Skia from d23ecfbfdff9 to 8543ce512d5c (3 revisions) (#181923)
https://skia.googlesource.com/skia.git/+log/d23ecfbfdff9..8543ce512d5c

2026-02-04 robertphillips@google.com [graphite] First whack at making
YCbCr combination method
2026-02-04 thomsmit@google.com [graphite] Fix SDF LCD Atlas Indexing Bug
2026-02-04 kjlubick@google.com Add Bazel-viewer-Mac job to CI

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/skia-flutter-autoroll
Please CC
jmbetancourt@google.com,jsimmons@google.com,kjlubick@google.com on the
revert to ensure that a human
is aware of the problem.

To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry
To file a bug in Flutter:
https://github.com/flutter/flutter/issues/new/choose

To report a problem with the AutoRoller itself, please file a bug:
https://issues.skia.org/issues/new?component=1389291&template=1850622

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
2026-02-04 23:44:09 +00:00
Jason Simmons
6909aaee71
Re-enable AddressSanitizer on the linux_unopt builder (#181741)
ASan had been disabled due to issues that were seen when the LUCI bots
were upgraded to Ubuntu 24. That upgrade was reverted, and ASan can be
run on the current Ubuntu 22 bots.

Fixes https://github.com/flutter/flutter/issues/181639
2026-02-04 23:42:24 +00:00
Reid Baker
2693765e62
Add exception to log message in ContentSizingFlag.java (#181813)
No bug
Gemini code review suggestion on a cp that should instead be made on
master.
https://github.com/flutter/flutter/pull/181732/files#r2747693178 
## 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.
2026-02-04 22:58:15 +00:00
Jason Simmons
f539ad0bfe
In the Web codec tests, skip an undecodable image that is used to test a Skia error handling code path. (#181870)
A recent Skia change added an invalid image file that tests a decoding
failure case (see
https://skia.googlesource.com/skia/+/12cb69b2700acfccee52bacf63321800af8c138c)

That file should be excluded from the set of Skia image assets used by
the Flutter Web codec tests.
2026-02-04 20:13:18 +00:00
Jim Graham
2038d04a91
[Impeller] Fix flattening of very large zoomed curves with tiny stroke widths (#181505)
<!--
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
-->

The computations for how to determine the number of polygon edges to
approximate stroked curves was unduly affected by the stroke width such
that for very large zooms accompanied by very tiny stroke widths, we
rasterized the curve as if it was at a very small scale. The computation
now only increases the polygon edge count based on the stroke width
rather than allowing it to dominate the calculation.

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

<details>
<summary>For reference, the output of the new playground test case
before the fix</summary>

<img width="784" height="732" alt="Screenshot 2026-01-26 at 11 13 33 AM"
src="https://github.com/user-attachments/assets/7cd749a8-eed5-41cb-9ab3-dd438b26f13e"
/>
</details>

## 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
2026-02-04 00:23:32 +00:00
walley892
3dede2fb6e
Organize and update fragment shader uniform tests. (#181822)
Adds more comprehensive testing for setFloat and getUniform* on fragment
shaders.

Deletes redundant tests.

Fixes getUniformVecX indexing errors.
2026-02-03 19:57:28 +00:00
Harry Terkelsen
9b9f9975c7
fix(web_ui): handle non-invertible matrices in ImageFilter.matrix (#181742)
In CanvasKit, `MakeMatrixTransform` returns null if the matrix is
non-invertible (e.g., all zeros or zero scale). Previously, the web
engine assumed this would always return a valid object, leading to a
crash when calling methods like `delete()` or `getOutputBounds()` on the
null result.

This change:
- Updates `MakeMatrixTransform` signature to allow returning null.
- Gracefully handles null filters in `CkMatrixImageFilter` by skipping
the borrow callback.
- Defaults `filterBounds` to `ui.Rect.zero` when the filter is null,
indicating that no content is rendered.
- Adds a comprehensive test suite to ensure non-invertible matrices do
not cause crashes during scene building or painting.

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

## 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
2026-02-03 19:37:26 +00:00
Loïc Sharma
41389b123c
[Web] Fix flt-platform-view comment (#181576) 2026-02-03 18:36:03 +00:00
moko256
50ab28032c
[Android] Add predictive back support for FlutterFragment and FlutterFragmentActivity (#181124)
<!--
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 will wire FlutterFragment up to BackGestureChannel via
FlutterActivityAndFragmentDelegate.

When shouldAutomaticallyHandleOnBackPressed is set to true,
FlutterFragment will handle back gesture events.
Since FlutterFragmentActivity uses FlutterFragment with this property
enabled, it will also handle these events as a result of this PR.

Fixes: #149753

## 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
2026-02-02 16:11:10 +00:00
Jason Simmons
dc2b4c6eb4
[Impeller] Fix type conversion warnings seen on Windows when Impeller GL API wrappers log arguments with function types (#181734)
https://github.com/flutter/flutter/pull/181157 introduced a call to the
glDebugMessageCallback API using a lambda as the argument. On Windows
builds this produces a warning about a nonstandard implicit conversion
when the Impeller GL API wrappers try to log the callback argument.
2026-01-30 22:19:35 +00:00
nmarci89
f8aaee5694
Fix P3-to-sRGB color conversion to operate in linear light (#181720)
<!--
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
-->

### Problem
The P3-to-sRGB color conversion applies an affine matrix directly to
gamma-encoded values in both the C++ engine (`dl_color.cc`) and Dart
(`painting.dart`). This is mathematically incorrect — color space
conversion matrices must operate in linear light. The result is P3
colors that appear nearly identical to sRGB instead of showing the full
gamut difference.
For example, P3 `#1ECAD3` (30/255, 202/255, 211/255) converts to:
- **Old (wrong):** extendedSRGB (-0.12, 0.86, 0.87)
- **New (correct):** extendedSRGB (-0.38, 0.81, 0.84)
The red channel error of 0.26 is clearly visible — colors appear washed
out instead of vivid.

### Fix
Replace the single affine matrix multiply with the correct 3-step
pipeline:
1. **Linearize** — decode gamma via sRGB EOTF
2. **Transform** — apply 3x3 P3-to-sRGB matrix in linear space
3. **Encode** — re-apply gamma via sRGB OETF
Extended range (negative values from out-of-gamut colors) is handled by
mirroring the transfer function.
**C++ (`dl_color.cc`):** Replace affine matrix with `p3ToExtendedSrgb()`
using `double` precision.
**Dart (`painting.dart`):** Replace `_MatrixColorTransform` with
`_P3ToSrgbTransform` and `_SrgbToP3Transform` classes. Also fixes the
sRGB-to-P3 direction.

### Performance
Negligible. The C++ conversion runs once per paint setup in `ReadColor`,
not per frame or per pixel. The Dart conversion runs once per
`Color.withValues()` call.

### Tests
- **C++:** Added `ColorSpaceP3ToExtendedSRGBLinearLight` test in
`dl_color_unittests.cc`
- **Dart:** Added 3 tests in `colors_test.dart`: mid-range
P3→extendedSRGB, P3 green→extendedSRGB, sRGB→P3 round-trip
All new tests fail with the old code and pass with the fix. Existing
tests continue to pass.

## Issue:
https://github.com/flutter/flutter/issues/181717

## 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.
- [ ] All existing and new tests are passing. **New tests pass, can't
run golden tests!**

---------

Co-authored-by: gaaclarke <30870216+gaaclarke@users.noreply.github.com>
2026-01-30 20:53:45 +00:00
Matt Boetger
d143c41e41
Ensure content-sizing resize is run on UI thread (#181686)
While testing with a different add-to-app
https://github.com/flutter/samples/pull/2787, an exception is sometimes
thrown when the resize is attempted because the callback comes from a
different thread. It is expected that the raster thread calls this but
with previous
[testing](https://github.com/mboetger/test-add-to-app/tree/content-sizing)
never caused this exception.

This PR ensures the resize happens on the UI thread. It also a flag to
ensure content sizing is disabled.

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

## 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.
2026-01-30 18:36:08 +00:00
Andrew Marshall
ae0fe0d05c
add ccache support for custom toolchain (#180737)
Add ccache support when building the engine using a custom toolchain.

Fixes #180736

## 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.
2026-01-30 17:19:13 +00:00
Andrew Marshall
f94d0cb3b2
update GLFW to latest and use EGL context creation on linux (#181259)
Updates the GLFW dependency to master and uses the EGL context creation
API on Linux. This allows Linux users to select an OpenGL implementation
when running the impeller playground tests by defining
`__EGL_VENDOR_LIBRARY_FILENAMES`.

For example, running
```
$ impeller_unittests --gtest_filter=Play/AiksTest.ToImageFromImage/OpenGLES
```
gives,  in `description_gles.cc` ,
```
gl_version_string_ // OpenGL ES 3.2 NVIDIA 590.48.01
```

Then running

```
$ __EGL_VENDOR_LIBRARY_FILENAMES=/usr/share/glvnd/egl_vendor.d/50_mesa.json impeller_unittests --gtest_filter=Play/AiksTest.ToImageFromImage/OpenGLES
```

```
gl_version_string_ // OpenGL ES 3.2 Mesa 25.3.3-arch1.3
```

Fixes #181258

## 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.
2026-01-30 17:17:05 +00:00
Andrew Marshall
907bda7d0c
add stacktrace support when requested for host builds (#181264)
Adds support for backtraces when requested in host builds

### Before:

```
Note: Google Test filter = Play/RendererTest.BabysFirstTriangle/OpenGLES
[==========] Running 1 test from 1 test suite.
[----------] Global test environment set-up.
[----------] 1 test from Play/RendererTest
[ RUN      ] Play/RendererTest.BabysFirstTriangle/OpenGLES
...
Segmentation fault         (core dumped) __EGL_VENDOR_LIBRARY_FILENAMES=/usr/share/glvnd/egl_vendor.d/50_mesa.json ./out/host_debug_unopt/exe.unstripped/impeller_unittests --enable_playground --gtest_filter='Play/RendererTest.BabysFirstTriangle/OpenGLES'
```

### After:
```
Note: Google Test filter = Play/RendererTest.BabysFirstTriangle/OpenGLES
[==========] Running 1 test from 1 test suite.
[----------] Global test environment set-up.
[----------] 1 test from Play/RendererTest
[ RUN      ] Play/RendererTest.BabysFirstTriangle/OpenGLES
...
[symbolize_elf.inc : 379] RAW: Unable to get high fd: rc=0, limit=1024
[ERROR:flutter/fml/backtrace.cc(108)] Caught signal SIGSEGV during program execution.
Frame 0: 0x55831f19fbc4 impeller::DeviceBufferGLES::GetBufferData()
Frame 1: 0x55831f186cd3 impeller::BufferBindingsGLES::BindUniformBufferV2()
Frame 2: 0x55831f186b66 impeller::BufferBindingsGLES::BindUniformBufferV3()
Frame 3: 0x55831f1861da impeller::BufferBindingsGLES::BindUniformBuffer()
Frame 4: 0x55831f185fea impeller::BufferBindingsGLES::BindUniformData()
Frame 5: 0x55831f1cb112 impeller::EncodeCommandsInReactor()
...
Segmentation fault         (core dumped) __EGL_VENDOR_LIBRARY_FILENAMES=/usr/share/glvnd/egl_vendor.d/50_mesa.json ./out/host_debug_unopt/exe.unstripped/impeller_unittests --enable_playground --gtest_filter='Play/RendererTest.BabysFirstTriangle/OpenGLES'
```

Fixes #181156

## 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.
2026-01-30 17:13:10 +00:00
Andrew Marshall
1d9d6a9a5e
enable enhanced debugging for GLES playground (#181157)
<!--
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
-->

Enables improved OpenGLES debug support in the playground tests if
[KHR_DEBUG](https://registry.khronos.org/OpenGL/extensions/KHR/KHR_debug.txt)
is available. Only activated on unoptimized builds (where `NDEBUG` is
not defined)

Example: 

Before:
```
[FATAL:flutter/impeller/renderer/backend/gles/proc_table_gles.h(44)] Fatal GL Error GL_INVALID_ENUM(1280) encountered on call to glBindBuffer
```

After:
```
[ERROR:flutter/impeller/playground/backend/gles/playground_impl_gles.cc(146)] GL Error: GL_INVALID_ENUM error generated. Invalid buffer target enum.
[FATAL:flutter/impeller/renderer/backend/gles/proc_table_gles.h(44)] Fatal GL Error GL_INVALID_ENUM(1280) encountered on call to glBindBuffer
```


Closes #179329

## 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.
2026-01-30 17:13:10 +00:00
Jason Simmons
7a8ecd11fa
[Impeller] Ensure that HostBuffers/DeviceBuffers allocated by RendererTest tests are valid for the lifetime of the RenderPass (#181635)
RenderPass holds a list of BufferViews that may hold raw pointers to
DeviceBuffers. HostBuffers and the underlying DeviceBuffers must not be
deleted until the RenderPass is no longer using them.

See https://github.com/flutter/flutter/issues/181287
2026-01-29 21:08:06 +00:00
Jason Simmons
b6f71056ea
[Impeller] Fix off-by-one indices in the SimilarPointPair/SimilarPointTrio functions used by ShadowPathGeometryTest (#181623) 2026-01-29 21:08:06 +00:00
Jason Simmons
72507e2c45
Roll libpng to version 1.6.54 (#181625)
Fixes https://github.com/flutter/flutter/issues/181545
Fixes https://github.com/flutter/flutter/issues/181669
2026-01-29 19:41:10 +00:00
zhongliugo
fc6d13a1b2
[web] Use defensive null check in text editing placeElement (#180795)
Fixes #178619

Uses defensive null check (?.) instead of null assertion (!) when
calling focusWithoutScroll() on focusedFormElement in
GloballyPositionedTextEditingStrategy.placeElement().

This prevents a crash that can occur due to a race condition where
hasAutofillGroup returns true but focusedFormElement is null by the time
it's accessed.
2026-01-29 16:15:43 +00:00
walley892
d2d872c95e
Fixes getUniformX for Vulkan (#181286)
Does what it says on the tin!

This PR adds struct member information to the runtime flatbuffer format.
This allows dart code to introspect structs at runtime.

Also modifies the runtime_stage tests to verify formats for all
supported uniform types.

Bubbles up struct member information to dart, and uses that information
to grab struct members in `getUniformX` related functions. This is
necessary on Vulkan because all uniforms are packaged into a single
struct. Also re-enables tests

## 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.
2026-01-29 16:14:15 +00:00
auto-submit[bot]
da72d5936d
Reverts "[ Tool / Engine ] Cleanup x86 references (#181152)" (#181643)
<!-- start_original_pr_link -->
Reverts: flutter/flutter#181152
<!-- end_original_pr_link -->
<!-- start_initiating_author -->
Initiated by: chingjun
<!-- end_initiating_author -->
<!-- start_revert_reason -->
Reason for reverting: broke internal tests.
<!-- end_revert_reason -->
<!-- start_original_pr_author -->
Original PR Author: bkonyi
<!-- end_original_pr_author -->

<!-- start_reviewers -->
Reviewed By: {mboetger, gaaclarke}
<!-- end_reviewers -->

<!-- start_revert_body -->
This change reverts the following previous change:
Fixes https://github.com/flutter/flutter/issues/170142
<!-- end_revert_body -->

Co-authored-by: auto-submit[bot] <flutter-engprod-team@google.com>
2026-01-29 03:07:48 +00:00
LongCatIsLooong
f4c83de1bf
Send statusBarTouch events via dedicated messages (#179643)
Instead of using fake touch events. 

Before this patch `FlutterViewController` sends two fake touch events
(down and up), at `(0, 0)` to the framework to signal that the status
bar is tapped on iOS. The scaffold widget and the cupertino page
scaffold widget set up gesture detectors to listen for these fake taps,
and scroll the "primary" scrollable container to the top in response.

This messaging mechanism is sometimes ambiguous, as the framework may
interpret that as a pair of regular pointer tap events (for instance in
#177992 the modal barrier claims the tap gesture and as a result the
modal barrier is dismissed by the fake touch events). This PR changes
that to communicate the status bar tap event via a new system channel,
and dispatch the events via `WidgetsBindingObserver`s in the framework.

See also
https://github.com/flutter/flutter/issues/177992#issuecomment-3499913265

Fixes #177992, fixes #175606

It appears that UIKit also has access to the coordinates of the touch
events to determine which scrollable view(s?) to dispatch the scroll to
top event to.
```objc
  * frame #0: 0x00000001032f6520 UIPlayground.debug.dylib`MyScrollViewController.scrollViewShouldScrollToTop(scrollView=0x0000000106014800) at UIScrollView.swift:13:3
    frame #2: 0x00000001867c9300 UIKitCore`-[UIScrollView _scrollToTopIfPossible:] + 316
    frame #3: 0x00000001867c9604 UIKitCore`-[UIScrollView _scrollToTopFromTouchAtScreenLocation:resultHandler:] + 40
    frame #4: 0x0000000186299bbc UIKitCore`__71-[UIWindow _scrollToTopViewsUnderScreenPointIfNecessary:resultHandler:]_block_invoke.358 + 168
    frame #5: 0x000000018629981c UIKitCore`-[UIWindow _scrollToTopViewsUnderScreenPointIfNecessary:resultHandler:] + 1212
    frame #6: 0x000000018581ed8c UIKitCore`-[UIStatusBarManager _handleScrollToTopAtXPosition:] + 192
    frame #7: 0x000000018581eb60 UIKitCore`-[UIStatusBarManager handleTapAction:] + 60
```
Unfortunately that information is not available to user application. The
iOS accessibility bridge currently does create dummy UIScrollViews for
each scrollable in the accessibility tree so may be we can take
advantage of that in the future.

## 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
2026-01-28 21:35:18 +00:00
walley892
e435edfbcd
Account for vec3 padding in Metal (#181563)
Re-landing of https://github.com/flutter/flutter/pull/181340
incorporating https://github.com/flutter/flutter/pull/181550.

Vec3 uniforms on the metal backend are vec4-aligned. This PR accounts
for that padding.

---------

Co-authored-by: gaaclarke <30870216+gaaclarke@users.noreply.github.com>
2026-01-28 20:50:23 +00:00