[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc

krit at webkit.org krit at webkit.org
Wed Dec 22 12:41:57 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit 817299991a3ac1440561307d81747ea9b3acaa4f
Author: krit at webkit.org <krit at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Fri Aug 27 11:40:20 2010 +0000

    2010-08-27  Dirk Schulze  <krit at webkit.org>
    
            Reviewed by Nikolas Zimmermann.
    
            SVG Filter with wrong results on repaint for non-CG platforms
            https://bugs.webkit.org/show_bug.cgi?id=44706
    
            The result of SVG Filter is transformed to linearRGB on every repaint.
            Transform the result just once, right after creating it.
    
            Test: svg/repaint/filter-repaint.svg
    
            * rendering/RenderSVGResourceFilter.cpp:
            (WebCore::RenderSVGResourceFilter::postApplyResource):
    2010-08-27  Dirk Schulze  <krit at webkit.org>
    
            Reviewed by Nikolas Zimmermann.
    
            SVG Filter with wrong results on repaint for non-CG platforms
            https://bugs.webkit.org/show_bug.cgi?id=44706
    
            Test that repainting a Filter does not change the result.
    
            * platform/mac/svg/repaint: Added.
            * platform/mac/svg/repaint/filter-repaint-expected.checksum: Added.
            * platform/mac/svg/repaint/filter-repaint-expected.png: Added.
            * platform/mac/svg/repaint/filter-repaint-expected.txt: Added.
            * svg/repaint: Added.
            * svg/repaint/filter-repaint.svg: Added.
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@66204 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index 08e0535..943803c 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,19 @@
+2010-08-27  Dirk Schulze  <krit at webkit.org>
+
+        Reviewed by Nikolas Zimmermann.
+
+        SVG Filter with wrong results on repaint for non-CG platforms
+        https://bugs.webkit.org/show_bug.cgi?id=44706
+        
+        Test that repainting a Filter does not change the result.
+
+        * platform/mac/svg/repaint: Added.
+        * platform/mac/svg/repaint/filter-repaint-expected.checksum: Added.
+        * platform/mac/svg/repaint/filter-repaint-expected.png: Added.
+        * platform/mac/svg/repaint/filter-repaint-expected.txt: Added.
+        * svg/repaint: Added.
+        * svg/repaint/filter-repaint.svg: Added.
+
 2010-08-27  Sheriff Bot  <webkit.review.bot at gmail.com>
 
         Unreviewed, rolling out r66196.
diff --git a/LayoutTests/platform/mac/svg/filters/feComposite-expected.checksum b/LayoutTests/platform/mac/svg/repaint/filter-repaint-expected.checksum
similarity index 100%
copy from LayoutTests/platform/mac/svg/filters/feComposite-expected.checksum
copy to LayoutTests/platform/mac/svg/repaint/filter-repaint-expected.checksum
diff --git a/LayoutTests/platform/mac/svg/filters/feComposite-expected.txt b/LayoutTests/platform/mac/svg/repaint/filter-repaint-expected.txt
similarity index 100%
copy from LayoutTests/platform/mac/svg/filters/feComposite-expected.txt
copy to LayoutTests/platform/mac/svg/repaint/filter-repaint-expected.txt
diff --git a/LayoutTests/svg/repaint/filter-repaint.svg b/LayoutTests/svg/repaint/filter-repaint.svg
new file mode 100644
index 0000000..86d2f8f
--- /dev/null
+++ b/LayoutTests/svg/repaint/filter-repaint.svg
@@ -0,0 +1,53 @@
+<?xml version="1.0" standalone="no"?>
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
+<svg width="400" height="400" version="1.1" xmlns="http://www.w3.org/2000/svg">
+<script type="text/javascript">
+if (window.layoutTestController) {
+    layoutTestController.testRepaint();
+}
+</script>
+<defs>
+<filter id="over" filterUnits="objectBoundingBox" primitiveUnits="objectBoundingBox" x="0%" y="0%" width="100%" height="100%">
+    <feFlood flood-color="#f00" flood-opacity="0.5" result="res1" x="0%" y="0%" width="75%" height="75%"/>
+    <feFlood flood-color="#00f" flood-opacity="0.5" result="res2" x="25%" y="25%" width="75%" height="75%"/>
+    <feComposite in2="res1" in="res2" operator="over"/>
+</filter>
+<filter id="in" filterUnits="objectBoundingBox" primitiveUnits="objectBoundingBox" x="0%" y="0%" width="100%" height="100%">
+    <feFlood flood-color="#f00" flood-opacity="0.5" result="res1" x="0%" y="0%" width="75%" height="75%"/>
+    <feFlood flood-color="#00f" flood-opacity="0.5" result="res2" x="25%" y="25%" width="75%" height="75%"/>
+    <feComposite in2="res1" in="res2" operator="in"/>
+</filter>
+<filter id="out" filterUnits="objectBoundingBox" primitiveUnits="objectBoundingBox" x="0%" y="0%" width="100%" height="100%">
+    <feFlood flood-color="#f00" flood-opacity="0.5" result="res1" x="0%" y="0%" width="75%" height="75%"/>
+    <feFlood flood-color="#00f" flood-opacity="0.5" result="res2" x="25%" y="25%" width="75%" height="75%"/>
+    <feComposite in2="res1" in="res2" operator="out"/>
+</filter>
+<filter id="atop" filterUnits="objectBoundingBox" primitiveUnits="objectBoundingBox" x="0%" y="0%" width="100%" height="100%">
+    <feFlood flood-color="#f00" flood-opacity="0.5" result="res1" x="0%" y="0%" width="75%" height="75%"/>
+    <feFlood flood-color="#00f" flood-opacity="0.5" result="res2" x="25%" y="25%" width="75%" height="75%"/>
+    <feComposite in2="res1" in="res2" operator="atop"/>
+</filter>
+<filter id="xor" filterUnits="objectBoundingBox" primitiveUnits="objectBoundingBox" x="0%" y="0%" width="100%" height="100%">
+    <feFlood flood-color="#f00" flood-opacity="0.5" result="res1" x="0%" y="0%" width="75%" height="75%"/>
+    <feFlood flood-color="#00f" flood-opacity="0.5" result="res2" x="25%" y="25%" width="75%" height="75%"/>
+    <feComposite in2="res1" in="res2" operator="xor"/>
+</filter>
+<filter id="arithmetic" filterUnits="objectBoundingBox" primitiveUnits="objectBoundingBox" x="0%" y="0%" width="100%" height="100%">
+    <feFlood flood-color="#f00" flood-opacity="0.2" result="res1" x="0%" y="0%" width="75%" height="75%"/>
+    <feFlood flood-color="#00f" flood-opacity="0.5" result="res2" x="25%" y="25%" width="75%" height="75%"/>
+    <feComposite in2="res1" in="res2" operator="arithmetic" k1=".5" k2=".5" k3=".5" k4=".5"/>
+</filter>
+</defs>
+<rect x="10" y="10" width="50" height="50" filter="url(#over)"/>
+<text x="10" y="90">over</text>
+<rect x="70" y="10" width="50" height="50" filter="url(#in)"/>
+<text x="70" y="90">in</text>
+<rect x="130" y="10" width="50" height="50" filter="url(#out)"/>
+<text x="130" y="90">out</text>
+<rect x="10" y="110" width="50" height="50" filter="url(#atop)"/>
+<text x="10" y="190">atop</text>
+<rect x="70" y="110" width="50" height="50" filter="url(#xor)"/>
+<text x="70" y="190">xor</text>
+<rect x="130" y="110" width="50" height="50" filter="url(#arithmetic)"/>
+<text x="130" y="190">arithmetic</text>
+</svg>
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 1d2ae63..a68d36c 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,18 @@
+2010-08-27  Dirk Schulze  <krit at webkit.org>
+
+        Reviewed by Nikolas Zimmermann.
+
+        SVG Filter with wrong results on repaint for non-CG platforms
+        https://bugs.webkit.org/show_bug.cgi?id=44706
+        
+        The result of SVG Filter is transformed to linearRGB on every repaint. 
+        Transform the result just once, right after creating it.
+
+        Test: svg/repaint/filter-repaint.svg
+
+        * rendering/RenderSVGResourceFilter.cpp:
+        (WebCore::RenderSVGResourceFilter::postApplyResource):
+
 2010-08-27  Yury Semikhatsky  <yurys at chromium.org>
 
         Reviewed by Pavel Feldman.
diff --git a/WebCore/rendering/RenderSVGResourceFilter.cpp b/WebCore/rendering/RenderSVGResourceFilter.cpp
index 09e83f4..982375e 100644
--- a/WebCore/rendering/RenderSVGResourceFilter.cpp
+++ b/WebCore/rendering/RenderSVGResourceFilter.cpp
@@ -262,16 +262,17 @@ void RenderSVGResourceFilter::postApplyResource(RenderObject* object, GraphicsCo
         if (!filterData->builded) {
             filterData->filter->setSourceImage(filterData->sourceGraphicBuffer.release());
             lastEffect->apply(filterData->filter.get());
+#if !PLATFORM(CG)
+            ImageBuffer* resultImage = lastEffect->resultImage();
+            if (resultImage)
+                resultImage->transformColorSpace(LinearRGB, DeviceRGB);
+#endif
             filterData->builded = true;
         }
 
         ImageBuffer* resultImage = lastEffect->resultImage();
-        if (resultImage) {
-#if !PLATFORM(CG)
-            resultImage->transformColorSpace(LinearRGB, DeviceRGB);
-#endif
+        if (resultImage)
             context->drawImageBuffer(resultImage, object->style()->colorSpace(), lastEffect->subRegion());
-        }
     }
 
     filterData->sourceGraphicBuffer.clear();

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list