-
Notifications
You must be signed in to change notification settings - Fork 3.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix incorrect rounding in software rendering of feColorMatrix.
This doesn't fix a similar problem in ArithmeticCombineTwoPixels because the fixes there have performance implications, appear wrong, or are wrong for common inputs. Since hue-rotate is defined in terms of a color matrix, some tests involving hue-rotate behave slightly differently. Differential Revision: https://phabricator.services.mozilla.com/D211113 bugzilla-url: https://bugzilla.mozilla.org/show_bug.cgi?id=1897783 gecko-commit: 89be5f4935310003f6d40c515547764c387a583c gecko-reviewers: longsonr
- Loading branch information
1 parent
7c9bf45
commit e45da16
Showing
2 changed files
with
53 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<title>Filter Effects: Test feColorMatrix with negative matrix entries</title> | ||
<link rel="author" title="Toby Cathcart Burn" href="mailto:[email protected]"> | ||
</head> | ||
|
||
<body> | ||
|
||
<p>You should see a cyan colored rectangle.</p> | ||
|
||
<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'> | ||
<rect x='0' y='0' width='100' height='100' fill="#00ffff"></rect> | ||
</svg> | ||
|
||
</body> | ||
|
||
</html> |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<title>Filter Effects: Test feColorMatrix with negative matrix entries</title> | ||
<link rel="author" title="Toby Cathcart Burn" href="mailto:[email protected]"> | ||
<link rel="help" href="http://www.w3.org/TR/filter-effects-1/#feColorMatrixElement"> | ||
<link rel="help" href="http://www.w3.org/TR/filter-effects-1/#element-attrdef-fecolormatrix-type"> | ||
<link rel="match" href="fecolormatrix-negative-ref.html"> | ||
<meta name="assert" content="If the test runs, you should see a cyan(#00ffff) colored rectangle."> | ||
</head> | ||
|
||
<body> | ||
|
||
<p>You should see a cyan colored rectangle.</p> | ||
|
||
<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'> | ||
<defs> | ||
<filter id='invert' color-interpolation-filters='sRGB'> | ||
<feColorMatrix in='SourceGraphic' | ||
values='-1 0 0 0 1 | ||
0 -1 0 0 1 | ||
0 0 -1 0 1 | ||
0 0 0 1 0' result='ef0'> | ||
</feColorMatrix> | ||
<feComposite in='ef0' in2='ef0' operator='arithmetic' k2='255'> | ||
</feComposite> | ||
</filter> | ||
</defs> | ||
|
||
<rect x='0' y='0' width='100' height='100' fill="#ffaa00" filter="url(#invert)"></rect> | ||
</svg> | ||
|
||
</body> | ||
|
||
</html> |