Repository navigation
[web] Keep ImageFilter.blur bounds in equality and description - #196013
Merged
auto-submit[bot] merged 6 commits intoNov 6, 2026
Merged
auto-submit[bot] merged 6 commits into
auto-submit[bot] merged 6 commits into
Conversation
…ero-sigma bounds, compose with bounded blur, and render like unbounded blur on web
harryterkelsen
marked this pull request as ready for review
November 5, 2026 00:43
Contributor
There was a problem hiding this comment.
Code Review
This pull request implements support for the bounds parameter in ImageFilter.blur on the Web platform. It updates the ImageFilter.blur factory and EngineBlurImageFilter to accept and utilize the bounds parameter in equality, hash code, and debug description logic. It also adds corresponding unit tests and enables a previously skipped integration test on the Web. There are no review comments, and I have no feedback to provide.
…-imagefilter-blur-in-the-web
mdebbar
approved these changes
Nov 5, 2026
mdebbar
left a comment
Contributor
There was a problem hiding this comment.
LGTM!
It would be nice to have some golden tests for this.
auto-submit Bot
pushed a commit
to flutter/packages
that referenced
this pull request
Nov 6, 2026
Roll Flutter from 3623d2d34543 to 09175cdeac89 (61 revisions) flutter/flutter@3623d2d...09175cd 2026-11-06 [email protected] Roll Skia from ae35b7b2221f to 793b8ac73d4b (3 revisions) (flutter/flutter#196091) 2026-11-06 [email protected] [web] Rasterize scenes at the size passed to `FlutterView.render` (flutter/flutter#196052) 2026-11-06 [email protected] Roll Skia from 4aa043a81e0c to ae35b7b2221f (1 revision) (flutter/flutter#196086) 2026-11-06 [email protected] Roll Fuchsia Linux SDK from Fqe3UlLwAohsPbsCS... to KIc0XZbhLmvDpTluZ... (flutter/flutter#196085) 2026-11-06 [email protected] Allow a zero scale change in InteractiveViewer (flutter/flutter#194949) 2026-11-06 [email protected] Roll Skia from dd5c2553a856 to 4aa043a81e0c (2 revisions) (flutter/flutter#196079) 2026-11-06 [email protected] [web] Keep ImageFilter.blur bounds in equality and description (flutter/flutter#196013) 2026-11-06 [email protected] iOS: Remove unused PlatformViewIOS setup from FlutterPlatformViewsTest (flutter/flutter#196033) 2026-11-06 [email protected] Serialize LoggerTests that mutate the shared Logger (flutter/flutter#196028) 2026-11-06 [email protected] Use reverseDuration for the AnimatedCrossFade size animation (flutter/flutter#194860) 2026-11-05 [email protected] Roll Skia from a5aacd103e68 to dd5c2553a856 (8 revisions) (flutter/flutter#196073) 2026-11-05 [email protected] Fix ListWheelScrollView null check error when it reads itemIndex before content dimensions are set (flutter/flutter#194859) 2026-11-05 [email protected] Allow zero cross axis extent in SliverGridDelegateWithMaxCrossAxisExtent (flutter/flutter#194858) 2026-11-05 [email protected] Revert: Allow color delta tolerance in in-memory fuzzy image comparator (flutter/flutter#196067) 2026-11-05 [email protected] Revert: Mitigate snapshot race in 3D transform test by reducing loop density (flutter/flutter#196066) 2026-11-05 [email protected] Delegate createStream in ResizeImage and ScrollAwareImageProvider (flutter/flutter#194756) 2026-11-05 [email protected] [iOS] Introduce FlutterShell and move thread host and profiler (flutter/flutter#195388) 2026-11-05 [email protected] [web] Support FragmentShader.getImageSampler on CanvasKit and Skwasm (flutter/flutter#195854) 2026-11-05 [email protected] Deprecates setFloat API (flutter/flutter#195505) 2026-11-05 [email protected] [flutter_tools] Remove public GlobalToolContext and globals from runner (flutter/flutter#195561) 2026-11-05 [email protected] Defer TLHC PlatformViewWrapper frame post and avoid initial 1x1 buffer resize (flutter/flutter#195861) 2026-11-05 [email protected] Roll Skia from b5abed66da86 to a5aacd103e68 (17 revisions) (flutter/flutter#196054) 2026-11-05 [email protected] Made `FlutterWindowControllerSizeTest.SizedToContentNotResizable` more robust (flutter/flutter#195845) 2026-11-05 [email protected] Update docs for contributor ladder (flutter/flutter#196011) 2026-11-05 [email protected] [Impeller] Use the transfer stage for the Vulkan readback barrier (flutter/flutter#194991) 2026-11-05 [email protected] Remove Mac mac_unopt builder (flutter/flutter#196027) 2026-11-05 [email protected] Updated Instructions for Determining Gradle Version for `gradle_dists` in CIPD (flutter/flutter#193310) 2026-11-05 [email protected] Move ios_app_with_extensions_test into the tool integration shard (flutter/flutter#195609) 2026-11-05 [email protected] [web] Respect Uint8List view bounds when detecting animated WebP/GIF (flutter/flutter#196010) 2026-11-05 [email protected] Add platform_views_layout to build_tests so iOS/Android build breaks are caught in presubmit (flutter/flutter#192985) 2026-11-05 [email protected] [flutter_tools] Detect macOS TCC permission crashes and provide diagnostic guidance (flutter/flutter#192432) 2026-11-05 [email protected] Roll Packages from 670b30e to 0478162 (15 revisions) (flutter/flutter#196047) 2026-11-05 [email protected] [web] Support Skwasm rendering without bitmap capture (flutter/flutter#195103) 2026-11-05 [email protected] [flutter_tools] Reland fix for local CanvasKit asset paths on Windows (flutter/flutter#195770) 2026-11-05 [email protected] Roll Skia from f96be51af95d to b5abed66da86 (14 revisions) (flutter/flutter#196017) 2026-11-05 [email protected] Split chrome web engine test drone (flutter/flutter#195873) 2026-11-05 [email protected] Roll Dart SDK from c9153304136a to 6623b84628f3 (1 revision) (flutter/flutter#196026) 2026-11-05 [email protected] Roll ICU from 4fe960221710 to a0ea93436c52 (6 revisions) (flutter/flutter#196025) 2026-11-05 [email protected] Add more guidance in README and AGENTS for contributing to flutter_tools (flutter/flutter#195998) 2026-11-05 [email protected] Roll Fuchsia Linux SDK from p0HDXLISPIElJfSz7... to Fqe3UlLwAohsPbsCS... (flutter/flutter#196019) 2026-11-05 [email protected] Roll Dart SDK from e362a23e9738 to c9153304136a (18 revisions) (flutter/flutter#196014) 2026-11-05 [email protected] [Impeller] Fix dilation input bounds when clipping saveLayers (flutter/flutter#195652) 2026-11-05 [email protected] Add `variantOf` to the M3E migration checklist (flutter/flutter#195099) 2026-11-05 [email protected] [flutter_tools] Eliminate globals from remaining subsystem files (flutter/flutter#195555) 2026-11-05 [email protected] Fix gap flipping when dragging variable height reorderable items (flutter/flutter#194478) 2026-11-05 [email protected] [A11y] Send un-merged SemanticsNodes in the same update that first references them (flutter/flutter#195829) ...
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
On the web,
ImageFilter.bluraccepted the optionalboundsargument and then dropped it. As a result, a bounded blur compared equal to the matching unbounded blur, and its description had nobounds:part. Native keepsboundsin==,hashCodeanddebugShortDescription.This PR forwards
boundsfrom the webdart:uiImageFilter.blurtoEngineBlurImageFilter, which now stores it and includes it in==,hashCodeanddebugShortDescription/toString(), in the same format as native_GaussianBlurImageFilter(blur(10.1, 10.1, clamp, bounds: Rect.fromLTRB(...))). Rendering does not change: every web backend still draws an unbounded blur, which is also what the native Skia backend does withbounds. With framework-visible behavior now matching native, 'ImageFilter resolves correctly' inimage_filter_config_test.dartno longer needsskip: kIsWeb.Part of #175899
Behavioral Changes
ImageFilter.blur(..., bounds: r)equality:bounds(and to one with any otherbounds).bounds, andhashCodefollows the same rule. As on native, a layer or widget whose filter changes only inboundsnow counts as changed.ImageFilter.blur(sigmaX: 10.1, sigmaY: 10.1, tileMode: TileMode.clamp, bounds: Rect.fromLTRB(0.1, 0.1, 100.2, 100.2))description:debugShortDescriptionwasblur(10.1, 10.1, clamp).blur(10.1, 10.1, clamp, bounds: Rect.fromLTRB(0.1, 0.1, 100.2, 100.2))(toString()gets theImageFilter.prefix), matching native.boundsbehave exactly as before. Rendered output does not change on any web backend.Where to focus
engine/src/flutter/lib/web_ui/lib/src/engine/primitives/image_filter.dart.boundsis an optional, final field onEngineBlurImageFilterand takes part in==/hashCode/description, mirroring native_GaussianBlurImageFilterfield for field (including the_boundsString()helper).getBackendFilterandfilterBoundsignorebounds, so every backend falls back to an unbounded blur, like the native Skia backend. Passingboundsthrough the renderer, so the Impeller-based skwasm variant can render a true bounded blur, is a separate follow-up. Becauseboundsis final, the existing per-instance backend filter cache (keyed on tile mode) stays valid.test/engine/surface/filters/image_filter_test.dartuses one table-driven test for equality, hash, compose and description, and adds a check that bounded and unbounded blurs report the samefilterBounds. It now callssetUpUnitTests()becausefilterBoundsneeds a renderer. Zero sigmas print as0on dart2js and0.0on dart2wasm, so the expected string is built with0.0.toString().dart:uibehavior. I checked it locally against a rebuilt web SDK on Chrome (JS and Wasm), and on the VM.Pre-launch Checklist
///).If you need help, consider asking for advice on the #hackers-new channel on Discord.
If this change needs to override an active code freeze, provide a comment explaining why. The code freeze workflow can be overridden by code reviewers. See pinned issues for any active code freezes with guidance.
Note: The Flutter team is currently trialing the use of Gemini Code Assist for GitHub. Comments from the
gemini-code-assistbot 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.