commit c06e2fc3366dc53695c5982aeee1857f4f91888f
parent 7eb5c9a197006c1e4057623454ba5e12e12ccd9b
Author: Claire Chambers <clchambers@microsoft.com>
Date: Fri, 31 Oct 2025 09:05:41 +0000
Bug 1995855 [wpt PR 55600] - Make software_renderer compute backdrop bounds like skia_renderer., a=testonly
Automatic update from web-platform-tests
Make software_renderer compute backdrop bounds like skia_renderer.
This change is a follow up to
https://chromium-review.googlesource.com/c/chromium/src/+/6818838 which adopted WebKit/Firefox interpretation of the backdrop-filter
spec.
This is the 1st part in a series of changes that will make software
renderer and skia renderer share code, and therefore have less
divergent implementations. The rough roadmap for this is:
(1) Make SW renderer use the fixed bounds calculations of skia
(this change)
(2) Refactor bounds calculations so the two paths share code directly
rather than re-implementing
(3) Investigate and implement using saveLayer() for SW renderer, as it
is now supported on CPU.
(4) If (3) is possible, investigate sharing code between renderers.
This change makes software_renderer comply with that change, and it
additionally fixes numerous software rendering bugs that resulted
from the software renderer calculating bounds incorrectly. By
composing filters similar to skia renderer, edgemode=mirror is now
supported. The backdrop image is now no longer limited to the reduced
area returned by kForward_MapDirection, which made blur be under-
applied, which was very noticeable for smaller elements or large
blurs.
This change also ensures that filter coordinates are always kept in
content space, which was causing SVG filters to break as SVG filters
are being created with cropRects that the software_renderer was not
expecting.
Additionally, 1 step in creating the bitmap for the backdrop
image has been removed. Instead of copying the backdrop and then
cropping, the cropped backdrop is retrieved immediately.
Several viz_ and cc_unittests have been rebaselines. Most are because
of subpixel differences with no visual diff. Substantive changes are
due to crbug.com/41473761, which this change fixed. Previously, the
tests checked for incorrect behavior.
Bug: 431546619, 40916020, 397821732, 41473761
Change-Id: Id040bae0a1344893dd8bd20534fea935c87e40db
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6938092
Reviewed-by: Kyle Charbonneau <kylechar@chromium.org>
Commit-Queue: Claire Chambers <clchambers@microsoft.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Cr-Commit-Position: refs/heads/main@{#1534509}
--
wpt-commits: 7fca02e21a44e3c73d7d7c1f7c18c7c894d6cd6d
wpt-pr: 55600
Diffstat:
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/testing/web-platform/tests/css/filter-effects/backdrop-filter-plus-filter.html b/testing/web-platform/tests/css/filter-effects/backdrop-filter-plus-filter.html
@@ -4,7 +4,7 @@
<link rel="author" href="mailto:masonf@chromium.org">
<link rel="help" href="https://drafts.fxtf.org/filter-effects-2/#BackdropFilterProperty">
<link rel="match" href="backdrop-filter-plus-filter-ref.html">
-<meta name=fuzzy content="maxDifference=0-1; totalPixels=0-298">
+<meta name="fuzzy" content="maxDifference=0-1;totalPixels=0-4000">
<p>Expected: A green box with an overlapping purple box.<br>
The overlapping portion of the boxes should be bright magenta.<br>
diff --git a/testing/web-platform/tests/css/filter-effects/backdrop-filter-transform.html b/testing/web-platform/tests/css/filter-effects/backdrop-filter-transform.html
@@ -1,6 +1,6 @@
<!DOCTYPE html>
<meta charset="utf-8">
-<meta name=fuzzy content="maxDifference=0-127; totalPixels=0-1000">
+<meta name=fuzzy content="maxDifference=0-140; totalPixels=0-1000">
<title>backdrop-filter: backdrop-filter plus transform should be applied correctly</title>
<link rel="author" href="mailto:masonf@chromium.org">
<link rel="help" href="https://drafts.fxtf.org/filter-effects-2/#BackdropFilterProperty">