Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/web_ui/dev/goldens_lock.yaml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
repository: https://github.com/flutter/goldens.git
revision: 57327a39aba333794a092d4e72777bb37102f8ba
revision: f1e5b87249f54998e23a34788e19ec864358e50b
8 changes: 4 additions & 4 deletions lib/web_ui/lib/src/engine/html/scene_builder.dart
Original file line number Diff line number Diff line change
Expand Up @@ -563,9 +563,9 @@ class SurfaceSceneBuilder implements ui.SceneBuilder {
}
}

// TODO(yjbanov): in HTML the blur looks too aggressive. The current
// implementation was copied from the existing backdrop-filter
// but probably needs a revision.
// HTML only supports a single radius, but Flutter ImageFilter supports separate
// horizontal and vertical radii. The best approximation we can provide is to
// average the two radii together for a single compromise value.
String _imageFilterToCss(EngineImageFilter filter) {
return 'blur(${math.max(filter.sigmaX, filter.sigmaY) * 2}px)';
return 'blur(${(filter.sigmaX + filter.sigmaY) / 2}px)';
}