Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Commit 25fb06e

Browse files
authored
Use decal TileMode in blur image_filter_test.dart (#45004)
The expected color values appear to match the output of Skia's raster backend's blur. Historically, that doesn't support any tile mode other than decal, so while the `makeBlur()` function defaulted to clamp tiling, the output was decal and thus showed the blur fading to transparent. The test draws a 1x1 green rectangle in the center of a 3x3 image. Clamp tiling would actually cause the output of the blur to just copy the central green color to the remaining 8 pixels. This is the output of Skia's GPU blur. I am working to land changes in Skia that make the raster backend handle all tile modes, which then has it match the existing GPU blur's behavior of a constant output for clamp tiling in this test (so it then fails). Decal tiling appears to be more useful for this test case anyways because it creates per-pixel variations that can be validated against. This is needed to land Skia-side fixes for skbug.com/40039877 and skbug.com/40039025 ## Pre-launch Checklist - [x] I read the [Contributor Guide] and followed the process outlined there for submitting PRs. - [x] I read the [Tree Hygiene] wiki page, which explains my responsibilities. - [x] I read and followed the [Flutter Style Guide] and the [C++, Objective-C, Java style guides]. - [x] I listed at least one issue that this PR fixes in the description above. - [x] I added new tests to check the change I am making or feature I am adding, or Hixie said the PR is test-exempt. See [testing the engine] for instructions on writing and running engine tests. - [x] I updated/added relevant documentation (doc comments with `///`). - [x] I signed the [CLA]. - [x] All existing and new tests are passing. If you need help, consider asking for advice on the #hackers-new channel on [Discord]. <!-- Links --> [Contributor Guide]: https://github.com/flutter/flutter/wiki/Tree-hygiene#overview [Tree Hygiene]: https://github.com/flutter/flutter/wiki/Tree-hygiene [Flutter Style Guide]: https://github.com/flutter/flutter/wiki/Style-guide-for-Flutter-repo [C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style [testing the engine]: https://github.com/flutter/flutter/wiki/Testing-the-engine [CLA]: https://cla.developers.google.com/ [flutter/tests]: https://github.com/flutter/tests [breaking change policy]: https://github.com/flutter/flutter/wiki/Tree-hygiene#handling-breaking-changes [Discord]: https://github.com/flutter/flutter/wiki/Chat
1 parent ac1ad18 commit 25fb06e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

testing/dart/image_filter_test.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ void main() {
176176
test('ImageFilter - blur', () async {
177177
final Paint paint = Paint()
178178
..color = green
179-
..imageFilter = makeBlur(1.0, 1.0);
179+
..imageFilter = makeBlur(1.0, 1.0, TileMode.decal);
180180

181181
final Uint32List bytes = await getBytesForPaint(paint);
182182
checkBytes(bytes, greenCenterBlurred, greenSideBlurred, greenCornerBlurred);

0 commit comments

Comments
 (0)