mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-09 11:25:00 +00:00
Bug 527325 - feConvoleMatrix does not process bias correctly. r=roc
This commit is contained in:
parent
93a572947c
commit
b93042d2d4
@ -4084,7 +4084,7 @@ ConvolvePixel(const PRUint8 *aSourceData,
|
||||
}
|
||||
for (PRInt32 i = 0; i < channels; i++) {
|
||||
aTargetData[aY * aStride + 4 * aX + offsets[i]] =
|
||||
BoundInterval(static_cast<PRInt32>(sum[i] / aDivisor + aBias * 255), 256);
|
||||
BoundInterval(static_cast<PRInt32>(sum[i] / aDivisor + aBias), 256);
|
||||
}
|
||||
if (aPreserveAlpha) {
|
||||
aTargetData[aY * aStride + 4 * aX + GFX_ARGB32_OFFSET_A] =
|
||||
|
@ -0,0 +1,9 @@
|
||||
<!--
|
||||
Any copyright is dedicated to the Public Domain.
|
||||
http://creativecommons.org/licenses/publicdomain/
|
||||
-->
|
||||
<svg xmlns="http://www.w3.org/2000/svg">
|
||||
<title>Reference for feConvolveMatrix with bias</title>
|
||||
<!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=527325 -->
|
||||
<rect x="0" y="0" width="100" height="100" fill="rgb(187,255,187)"/>
|
||||
</svg>
|
After Width: | Height: | Size: 363 B |
14
layout/reftests/svg/filters/feConvolveMatrix-bias-01.svg
Normal file
14
layout/reftests/svg/filters/feConvolveMatrix-bias-01.svg
Normal file
@ -0,0 +1,14 @@
|
||||
<!--
|
||||
Any copyright is dedicated to the Public Domain.
|
||||
http://creativecommons.org/licenses/publicdomain/
|
||||
-->
|
||||
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<title>Testcase for feConvolveMatrix with bias</title>
|
||||
<!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=527325 -->
|
||||
<defs>
|
||||
<filter id="filter" filterUnits="objectBoundingBox" x="0%" y="0%" width="100%" height="100%">
|
||||
<feConvolveMatrix kernelMatrix="1 1 1 1 1 1 1 1 1" bias="0.5"/>
|
||||
</filter>
|
||||
</defs>
|
||||
<rect x="0" y="0" width="100" height="100" fill="rgb(0,255,0)" filter="url(#filter)"/>
|
||||
</svg>
|
After Width: | Height: | Size: 624 B |
@ -68,6 +68,7 @@ fails == filter-marked-line-01.svg pass.svg # bug 477704
|
||||
== filter-patterned-rect-02.svg pass.svg
|
||||
|
||||
== feComposite-arguments-01.svg pass.svg
|
||||
== feConvolveMatrix-bias-01.svg feConvolveMatrix-bias-01-ref.svg
|
||||
== feConvolveMatrix-order-01.svg feConvolveMatrix-order-01-ref.svg
|
||||
|
||||
== feMorphology-radius-negative-01.svg pass.svg
|
||||
|
Loading…
Reference in New Issue
Block a user