Commit fa72c7a
authored
fix gaussian blur getting clipped with negative scale (flutter#184037)
Fixes flutter#183884
GaussianBlurFilterContents::GetFilterSourceCoverage decides how much to
expand the bounding rect to account for the applied blur. If given a
matrix with a negative scale, `GetFilterSourceCoverage` would shrink the
bounding rect instead of expanding it - giving the appearance of the
"offset" described in flutter#183884
Added a unittest and golden test to verify the change.
Repro app on MacOS with --enable-impeller at HEAD:
<img width="799" height="626" alt="Screenshot 2026-03-23 at 2 28 06 PM"
src="https://github.com/user-attachments/assets/ed26b264-a1b2-481e-aa54-9be6858b35f5"
/>
Repro app with this change with --enable-impeller:
<img width="799" height="626" alt="Screenshot 2026-03-23 at 2 27 10 PM"
src="https://github.com/user-attachments/assets/2f8edf40-e4da-4833-88ca-1ff6180c25ac"
/>
## Pre-launch Checklist
- [x] I read the [Contributor Guide] and followed the process outlined
there for submitting PRs.
- [x] I read the [AI contribution guidelines] and understand my
responsibilities, or I am not using AI tools.
- [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.1 parent 8ae690c commit fa72c7a
3 files changed
Lines changed: 42 additions & 1 deletion
File tree
- engine/src/flutter/impeller
- display_list
- entity/contents/filters
Lines changed: 20 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1509 | 1509 | | |
1510 | 1510 | | |
1511 | 1511 | | |
| 1512 | + | |
| 1513 | + | |
| 1514 | + | |
| 1515 | + | |
| 1516 | + | |
| 1517 | + | |
| 1518 | + | |
| 1519 | + | |
| 1520 | + | |
| 1521 | + | |
| 1522 | + | |
| 1523 | + | |
| 1524 | + | |
| 1525 | + | |
| 1526 | + | |
| 1527 | + | |
| 1528 | + | |
| 1529 | + | |
| 1530 | + | |
| 1531 | + | |
1512 | 1532 | | |
1513 | 1533 | | |
Lines changed: 2 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
817 | 817 | | |
818 | 818 | | |
819 | 819 | | |
820 | | - | |
| 820 | + | |
| 821 | + | |
821 | 822 | | |
822 | 823 | | |
823 | 824 | | |
| |||
Lines changed: 20 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
229 | 229 | | |
230 | 230 | | |
231 | 231 | | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
232 | 252 | | |
233 | 253 | | |
234 | 254 | | |
| |||
0 commit comments