[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc
zimmermann at webkit.org
zimmermann at webkit.org
Wed Dec 22 11:16:14 UTC 2010
The following commit has been merged in the debian/experimental branch:
commit 4e10c835f691255dc2483724ac962c38a288c6a0
Author: zimmermann at webkit.org <zimmermann at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Fri Jul 16 09:45:00 2010 +0000
2010-07-16 Nikolas Zimmermann <nzimmermann at rim.com>
Reviewed by Dirk Schulze.
Convolution computation causes bad alpha channel values
https://bugs.webkit.org/show_bug.cgi?id=42273
Unbreak the convolve matrix filter, fixing svg/W3C-SVG-1.1/filters-conv-01-f.svg.
1) Fix clamping the rgb values:
"image->set(pixel++, clampRGBAValue(totals[0], maxAlpha));" totals[0] -> totals[i].
2) Don't apply the divisior divison and bias addition multiple times, accumulated!
* svg/graphics/filters/SVGFEConvolveMatrix.cpp:
(WebCore::setDestinationPixels): Fix two evil bugs, breaking feConvolveMatrix.
2010-07-16 Nikolas Zimmermann <nzimmermann at rim.com>
Reviewed by Dirk Schulze.
Convolution computation causes bad alpha channel values
https://bugs.webkit.org/show_bug.cgi?id=42273
Unbreak the convolve matrix filter, fixing svg/W3C-SVG-1.1/filters-conv-01-f.svg.
Update convolution-crash.svg results.
* platform/mac/svg/custom/convolution-crash-expected.checksum:
* platform/mac/svg/custom/convolution-crash-expected.png:
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@63535 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index b2f9032..4653006 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,5 +1,18 @@
2010-07-16 Nikolas Zimmermann <nzimmermann at rim.com>
+ Reviewed by Dirk Schulze.
+
+ Convolution computation causes bad alpha channel values
+ https://bugs.webkit.org/show_bug.cgi?id=42273
+
+ Unbreak the convolve matrix filter, fixing svg/W3C-SVG-1.1/filters-conv-01-f.svg.
+ Update convolution-crash.svg results.
+
+ * platform/mac/svg/custom/convolution-crash-expected.checksum:
+ * platform/mac/svg/custom/convolution-crash-expected.png:
+
+2010-07-16 Nikolas Zimmermann <nzimmermann at rim.com>
+
Not reviewed. Rebaseline two results which seemed to be corrupt (DRT warns).
* platform/mac/svg/custom/convolution-crash-expected.checksum:
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 1bc9f29..e8f0bab 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -2,6 +2,23 @@
Reviewed by Dirk Schulze.
+ Convolution computation causes bad alpha channel values
+ https://bugs.webkit.org/show_bug.cgi?id=42273
+
+ Unbreak the convolve matrix filter, fixing svg/W3C-SVG-1.1/filters-conv-01-f.svg.
+
+ 1) Fix clamping the rgb values:
+ "image->set(pixel++, clampRGBAValue(totals[0], maxAlpha));" totals[0] -> totals[i].
+
+ 2) Don't apply the divisior divison and bias addition multiple times, accumulated!
+
+ * svg/graphics/filters/SVGFEConvolveMatrix.cpp:
+ (WebCore::setDestinationPixels): Fix two evil bugs, breaking feConvolveMatrix.
+
+2010-07-16 Nikolas Zimmermann <nzimmermann at rim.com>
+
+ Reviewed by Dirk Schulze.
+
relative positioning does not work for radialGradient after window resize
https://bugs.webkit.org/show_bug.cgi?id=41249
diff --git a/WebCore/svg/graphics/filters/SVGFEConvolveMatrix.cpp b/WebCore/svg/graphics/filters/SVGFEConvolveMatrix.cpp
index 616e545..ddd4928 100644
--- a/WebCore/svg/graphics/filters/SVGFEConvolveMatrix.cpp
+++ b/WebCore/svg/graphics/filters/SVGFEConvolveMatrix.cpp
@@ -206,25 +206,15 @@ static ALWAYS_INLINE unsigned char clampRGBAValue(float channel, unsigned char m
template<bool preserveAlphaValues>
ALWAYS_INLINE void setDestinationPixels(CanvasPixelArray* image, int& pixel, float* totals, float divisor, float bias, CanvasPixelArray* src)
{
- int numTotals = preserveAlphaValues ? 3 : 4;
- for (int i = 0; i < numTotals; ++i)
- totals[i] = totals[i] / divisor + bias;
-
- unsigned char maxAlpha;
- if (!preserveAlphaValues)
- maxAlpha = clampRGBAValue(totals[3]);
- else
- maxAlpha = 255;
-
+ unsigned char maxAlpha = preserveAlphaValues ? 255 : clampRGBAValue(totals[3] / divisor + bias);
for (int i = 0; i < 3; ++i)
- image->set(pixel++, clampRGBAValue(totals[0], maxAlpha));
+ image->set(pixel++, clampRGBAValue(totals[i] / divisor + bias, maxAlpha));
- if (!preserveAlphaValues)
- image->set(pixel++, maxAlpha);
- else {
+ if (preserveAlphaValues) {
image->set(pixel, src->get(pixel));
++pixel;
- }
+ } else
+ image->set(pixel++, maxAlpha);
}
// Only for region C
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list