2006-01-28 Alexander Kellett <lypanov@kde.org>
authoreseidel <eseidel@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 28 Jan 2006 10:18:23 +0000 (10:18 +0000)
committereseidel <eseidel@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 28 Jan 2006 10:18:23 +0000 (10:18 +0000)
        Reviewed by eseidel.

        SourceAlpha does not display until window is redrawn (resized)
        http://bugzilla.opendarwin.org/show_bug.cgi?id=6375

        Test: svg/custom/filter-source-alpha.svg

        * kcanvas/device/quartz/KCanvasFilterQuartz.mm:
        (KCanvasFilterQuartz::inputImage):`

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@12427 268f45cc-cd09-0410-ab3c-d52691b4dbfc

LayoutTests/ChangeLog
LayoutTests/svg/custom/filter-source-alpha-expected.checksum [new file with mode: 0644]
LayoutTests/svg/custom/filter-source-alpha-expected.png [new file with mode: 0644]
LayoutTests/svg/custom/filter-source-alpha-expected.txt [new file with mode: 0644]
LayoutTests/svg/custom/filter-source-alpha.svg [new file with mode: 0644]
WebCore/ChangeLog
WebCore/kcanvas/device/quartz/KCanvasFilterQuartz.mm

index 346964f70c8b27a159c826e286a7e4a8e4d6209f..94cdcf7f6b2de233af5f6d038f8385e7fed319f1 100644 (file)
@@ -1,3 +1,12 @@
+2006-01-28  Alexander Kellett  <lypanov@kde.org>
+
+        Reviewed by eseidel.
+
+        * svg/custom/filter-source-alpha-expected.checksum
+        * svg/custom/filter-source-alpha-expected.png
+        * svg/custom/filter-source-alpha-expected.txt
+        * svg/custom/filter-source-alpha.svg
+
 2006-01-27  Darin Adler  <darin@apple.com>
 
         Reviewed by Adele.
diff --git a/LayoutTests/svg/custom/filter-source-alpha-expected.checksum b/LayoutTests/svg/custom/filter-source-alpha-expected.checksum
new file mode 100644 (file)
index 0000000..7363841
--- /dev/null
@@ -0,0 +1 @@
+778803df0a824ed8f2c7dfa07c56832e
\ No newline at end of file
diff --git a/LayoutTests/svg/custom/filter-source-alpha-expected.png b/LayoutTests/svg/custom/filter-source-alpha-expected.png
new file mode 100644 (file)
index 0000000..3db2634
Binary files /dev/null and b/LayoutTests/svg/custom/filter-source-alpha-expected.png differ
diff --git a/LayoutTests/svg/custom/filter-source-alpha-expected.txt b/LayoutTests/svg/custom/filter-source-alpha-expected.txt
new file mode 100644 (file)
index 0000000..5fdea59
--- /dev/null
@@ -0,0 +1,6 @@
+KCanvasResource {id="filter" [type=FILTER]  [bounding box=at (-10,-10) size 120x120] [effect bounding box mode=0] [effects=[[type=GAUSSIAN-BLUR] [in="SourceAlpha"] [result="blur"] [subregion="at (0,0) size 800x600"] [std dev. x=0.00 y=0.00], [type=MERGE]  [subregion="at (0,0) size 800x600"][merge inputs=[blur, SourceGraphic]]]]}
+layer at (0,0) size 800x600
+  RenderCanvas at (0,0) size 800x600
+    KCanvasContainer {svg} at (0,0) size 100x100
+      KCanvasItem {rect} at (0,0) size 100x100 [fill={[type=SOLID] [color=#FF0000]}] [data="M0.00,0.00L100.00,0.00L100.00,100.00L0.00,100.00"]
+      KCanvasItem {rect} at (0,0) size 100x100 [fill={[type=SOLID] [color=#008000]}] [filter=#filter] [data="M0.00,0.00L100.00,0.00L100.00,100.00L0.00,100.00"]
diff --git a/LayoutTests/svg/custom/filter-source-alpha.svg b/LayoutTests/svg/custom/filter-source-alpha.svg
new file mode 100644 (file)
index 0000000..7bdf1b5
--- /dev/null
@@ -0,0 +1,14 @@
+<?xml version="1.0"?>
+<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
+   <defs>
+      <filter id="filter">
+         <feGaussianBlur in="SourceAlpha" stdDeviation="0" result="blur"/>
+         <feMerge>
+            <feMergeNode in="blur"/>
+            <feMergeNode in="SourceGraphic"/>
+         </feMerge>
+      </filter>
+   </defs>
+   <rect x="0" y="0" width="100" height="100" fill="red"/>
+   <rect x="0" y="0" width="100" height="100" filter="url(#filter)" fill="green"/>
+</svg>
index 706f36ea01dcb1274eaf0a20e8ae40d54a75c25a..9e85eb499d02b6fc5b60d4c3bb61eb1e95561abc 100644 (file)
@@ -1,3 +1,15 @@
+2006-01-28  Alexander Kellett  <lypanov@kde.org>
+
+        Reviewed by eseidel.
+
+        SourceAlpha does not display until window is redrawn (resized)
+        http://bugzilla.opendarwin.org/show_bug.cgi?id=6375
+
+        Test: svg/custom/filter-source-alpha.svg
+
+        * kcanvas/device/quartz/KCanvasFilterQuartz.mm:
+        (KCanvasFilterQuartz::inputImage):
+
 2006-01-28  David Hyatt  <hyatt@apple.com>
 
         Fix CachedImage.h/.cpp up.  Lots of cleanup.  Eliminated
index 6382a5d425173c6c1be3de18ce48c85e92dcfdfc..294962f892e1538535274f85e0f255f152a37564 100644 (file)
@@ -206,7 +206,8 @@ CIImage *KCanvasFilterQuartz::inputImage(const KCanvasFilterEffect *filterEffect
             CIImage *sourceGraphic = imageForName("SourceGraphic");
             if (!sourceGraphic)
                 return nil;
-            setImageForName(alphaImageForImage(sourceGraphic), "SourceAlpha");
+            sourceAlpha = alphaImageForImage(sourceGraphic);
+            setImageForName(sourceAlpha, "SourceAlpha");
         }
         return sourceAlpha;
     }