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

zherczeg at webkit.org zherczeg at webkit.org
Wed Dec 22 18:42:56 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit 06dff81d1ec92b2e87100b0761a29f054f15c82b
Author: zherczeg at webkit.org <zherczeg at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Thu Dec 16 08:32:37 2010 +0000

    Improve feArithmeticFilter
    https://bugs.webkit.org/show_bug.cgi?id=51105
    
    Reviewed by Dirk Schulze.
    
    WebCore:
    
    In case of the arithmetic operator on feComposite filter, we could use
    different result passing modes depend on its type. Furthermore, the
    number of executed multiplications is reduced if k1 or k4 argument is zero.
    
    2% speedup on WebCore/manual-tests/svg-filter-animation.svg
    
    * platform/graphics/filters/FEComposite.cpp:
    (WebCore::computeArithmeticPixels):
    (WebCore::arithmetic):
    (WebCore::FEComposite::apply):
    
    LayoutTests:
    
    No visible changes.
    
    * platform/mac-leopard/svg/dynamic-updates/SVGFECompositeElement-dom-in2-attr-expected.checksum:
    * platform/mac-leopard/svg/dynamic-updates/SVGFECompositeElement-dom-in2-attr-expected.png:
    * platform/mac-leopard/svg/dynamic-updates/SVGFECompositeElement-dom-k1-attr-expected.checksum:
    * platform/mac-leopard/svg/dynamic-updates/SVGFECompositeElement-dom-k1-attr-expected.png:
    * platform/mac-leopard/svg/dynamic-updates/SVGFECompositeElement-dom-k2-attr-expected.checksum:
    * platform/mac-leopard/svg/dynamic-updates/SVGFECompositeElement-dom-k2-attr-expected.png:
    * platform/mac-leopard/svg/dynamic-updates/SVGFECompositeElement-dom-k3-attr-expected.checksum:
    * platform/mac-leopard/svg/dynamic-updates/SVGFECompositeElement-dom-k3-attr-expected.png:
    * platform/mac-leopard/svg/dynamic-updates/SVGFECompositeElement-dom-k4-attr-expected.checksum:
    * platform/mac-leopard/svg/dynamic-updates/SVGFECompositeElement-dom-k4-attr-expected.png:
    * platform/mac-leopard/svg/dynamic-updates/SVGFECompositeElement-dom-operator-attr-expected.checksum:
    * platform/mac-leopard/svg/dynamic-updates/SVGFECompositeElement-dom-operator-attr-expected.png:
    * platform/mac-leopard/svg/dynamic-updates/SVGFECompositeElement-svgdom-in2-prop-expected.checksum:
    * platform/mac-leopard/svg/dynamic-updates/SVGFECompositeElement-svgdom-in2-prop-expected.png:
    * platform/mac-leopard/svg/dynamic-updates/SVGFECompositeElement-svgdom-k1-prop-expected.checksum:
    * platform/mac-leopard/svg/dynamic-updates/SVGFECompositeElement-svgdom-k1-prop-expected.png:
    * platform/mac-leopard/svg/dynamic-updates/SVGFECompositeElement-svgdom-k2-prop-expected.checksum:
    * platform/mac-leopard/svg/dynamic-updates/SVGFECompositeElement-svgdom-k2-prop-expected.png:
    * platform/mac-leopard/svg/dynamic-updates/SVGFECompositeElement-svgdom-k3-prop-expected.checksum:
    * platform/mac-leopard/svg/dynamic-updates/SVGFECompositeElement-svgdom-k3-prop-expected.png:
    * platform/mac-leopard/svg/dynamic-updates/SVGFECompositeElement-svgdom-k4-prop-expected.checksum:
    * platform/mac-leopard/svg/dynamic-updates/SVGFECompositeElement-svgdom-k4-prop-expected.png:
    * platform/mac-leopard/svg/dynamic-updates/SVGFECompositeElement-svgdom-operator-prop-expected.checksum:
    * platform/mac-leopard/svg/dynamic-updates/SVGFECompositeElement-svgdom-operator-prop-expected.png:
    
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@74177 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index 8d22a93..37aafde 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,37 @@
+2010-12-16  Zoltan Herczeg  <zherczeg at webkit.org>
+
+        Reviewed by Dirk Schulze.
+
+        Improve feArithmeticFilter
+        https://bugs.webkit.org/show_bug.cgi?id=51105
+
+        No visible changes.
+
+        * platform/mac-leopard/svg/dynamic-updates/SVGFECompositeElement-dom-in2-attr-expected.checksum:
+        * platform/mac-leopard/svg/dynamic-updates/SVGFECompositeElement-dom-in2-attr-expected.png:
+        * platform/mac-leopard/svg/dynamic-updates/SVGFECompositeElement-dom-k1-attr-expected.checksum:
+        * platform/mac-leopard/svg/dynamic-updates/SVGFECompositeElement-dom-k1-attr-expected.png:
+        * platform/mac-leopard/svg/dynamic-updates/SVGFECompositeElement-dom-k2-attr-expected.checksum:
+        * platform/mac-leopard/svg/dynamic-updates/SVGFECompositeElement-dom-k2-attr-expected.png:
+        * platform/mac-leopard/svg/dynamic-updates/SVGFECompositeElement-dom-k3-attr-expected.checksum:
+        * platform/mac-leopard/svg/dynamic-updates/SVGFECompositeElement-dom-k3-attr-expected.png:
+        * platform/mac-leopard/svg/dynamic-updates/SVGFECompositeElement-dom-k4-attr-expected.checksum:
+        * platform/mac-leopard/svg/dynamic-updates/SVGFECompositeElement-dom-k4-attr-expected.png:
+        * platform/mac-leopard/svg/dynamic-updates/SVGFECompositeElement-dom-operator-attr-expected.checksum:
+        * platform/mac-leopard/svg/dynamic-updates/SVGFECompositeElement-dom-operator-attr-expected.png:
+        * platform/mac-leopard/svg/dynamic-updates/SVGFECompositeElement-svgdom-in2-prop-expected.checksum:
+        * platform/mac-leopard/svg/dynamic-updates/SVGFECompositeElement-svgdom-in2-prop-expected.png:
+        * platform/mac-leopard/svg/dynamic-updates/SVGFECompositeElement-svgdom-k1-prop-expected.checksum:
+        * platform/mac-leopard/svg/dynamic-updates/SVGFECompositeElement-svgdom-k1-prop-expected.png:
+        * platform/mac-leopard/svg/dynamic-updates/SVGFECompositeElement-svgdom-k2-prop-expected.checksum:
+        * platform/mac-leopard/svg/dynamic-updates/SVGFECompositeElement-svgdom-k2-prop-expected.png:
+        * platform/mac-leopard/svg/dynamic-updates/SVGFECompositeElement-svgdom-k3-prop-expected.checksum:
+        * platform/mac-leopard/svg/dynamic-updates/SVGFECompositeElement-svgdom-k3-prop-expected.png:
+        * platform/mac-leopard/svg/dynamic-updates/SVGFECompositeElement-svgdom-k4-prop-expected.checksum:
+        * platform/mac-leopard/svg/dynamic-updates/SVGFECompositeElement-svgdom-k4-prop-expected.png:
+        * platform/mac-leopard/svg/dynamic-updates/SVGFECompositeElement-svgdom-operator-prop-expected.checksum:
+        * platform/mac-leopard/svg/dynamic-updates/SVGFECompositeElement-svgdom-operator-prop-expected.png:
+
 2010-12-15  Yury Semikhatsky  <yurys at chromium.org>
 
         Unreviewed. Update Chromium test expectations.
diff --git a/LayoutTests/platform/mac-leopard/svg/dynamic-updates/SVGFECompositeElement-dom-in2-attr-expected.checksum b/LayoutTests/platform/mac-leopard/svg/dynamic-updates/SVGFECompositeElement-dom-in2-attr-expected.checksum
index f3244b7..da55884 100644
--- a/LayoutTests/platform/mac-leopard/svg/dynamic-updates/SVGFECompositeElement-dom-in2-attr-expected.checksum
+++ b/LayoutTests/platform/mac-leopard/svg/dynamic-updates/SVGFECompositeElement-dom-in2-attr-expected.checksum
@@ -1 +1 @@
-b8ebba3ca32e6d92d8907cd0ef88cb63
\ No newline at end of file
+ac82a213e2cad1d9040ebc6501f67ce3
\ No newline at end of file
diff --git a/LayoutTests/platform/mac-leopard/svg/dynamic-updates/SVGFECompositeElement-dom-in2-attr-expected.png b/LayoutTests/platform/mac-leopard/svg/dynamic-updates/SVGFECompositeElement-dom-in2-attr-expected.png
index 8715a93..6a1875d 100644
Binary files a/LayoutTests/platform/mac-leopard/svg/dynamic-updates/SVGFECompositeElement-dom-in2-attr-expected.png and b/LayoutTests/platform/mac-leopard/svg/dynamic-updates/SVGFECompositeElement-dom-in2-attr-expected.png differ
diff --git a/LayoutTests/platform/mac-leopard/svg/dynamic-updates/SVGFECompositeElement-dom-k1-attr-expected.checksum b/LayoutTests/platform/mac-leopard/svg/dynamic-updates/SVGFECompositeElement-dom-k1-attr-expected.checksum
index c19a239..3bbeadb 100644
--- a/LayoutTests/platform/mac-leopard/svg/dynamic-updates/SVGFECompositeElement-dom-k1-attr-expected.checksum
+++ b/LayoutTests/platform/mac-leopard/svg/dynamic-updates/SVGFECompositeElement-dom-k1-attr-expected.checksum
@@ -1 +1 @@
-38df8645bfe7a3d2879bc54d86fff6af
\ No newline at end of file
+947c03583b06c763dc5e29d4b74bd26c
\ No newline at end of file
diff --git a/LayoutTests/platform/mac-leopard/svg/dynamic-updates/SVGFECompositeElement-dom-k1-attr-expected.png b/LayoutTests/platform/mac-leopard/svg/dynamic-updates/SVGFECompositeElement-dom-k1-attr-expected.png
index c9ccace..bdd9ce9 100644
Binary files a/LayoutTests/platform/mac-leopard/svg/dynamic-updates/SVGFECompositeElement-dom-k1-attr-expected.png and b/LayoutTests/platform/mac-leopard/svg/dynamic-updates/SVGFECompositeElement-dom-k1-attr-expected.png differ
diff --git a/LayoutTests/platform/mac-leopard/svg/dynamic-updates/SVGFECompositeElement-dom-k2-attr-expected.checksum b/LayoutTests/platform/mac-leopard/svg/dynamic-updates/SVGFECompositeElement-dom-k2-attr-expected.checksum
index ee60d31..15e3bcc 100644
--- a/LayoutTests/platform/mac-leopard/svg/dynamic-updates/SVGFECompositeElement-dom-k2-attr-expected.checksum
+++ b/LayoutTests/platform/mac-leopard/svg/dynamic-updates/SVGFECompositeElement-dom-k2-attr-expected.checksum
@@ -1 +1 @@
-07fc38fa2020a152552114545ea4a7e6
\ No newline at end of file
+032dbf6ef60e39bb2e18113b0b31155a
\ No newline at end of file
diff --git a/LayoutTests/platform/mac-leopard/svg/dynamic-updates/SVGFECompositeElement-dom-k2-attr-expected.png b/LayoutTests/platform/mac-leopard/svg/dynamic-updates/SVGFECompositeElement-dom-k2-attr-expected.png
index dff21fd..0116f6f 100644
Binary files a/LayoutTests/platform/mac-leopard/svg/dynamic-updates/SVGFECompositeElement-dom-k2-attr-expected.png and b/LayoutTests/platform/mac-leopard/svg/dynamic-updates/SVGFECompositeElement-dom-k2-attr-expected.png differ
diff --git a/LayoutTests/platform/mac-leopard/svg/dynamic-updates/SVGFECompositeElement-dom-k3-attr-expected.checksum b/LayoutTests/platform/mac-leopard/svg/dynamic-updates/SVGFECompositeElement-dom-k3-attr-expected.checksum
index 270f068..214f1ed 100644
--- a/LayoutTests/platform/mac-leopard/svg/dynamic-updates/SVGFECompositeElement-dom-k3-attr-expected.checksum
+++ b/LayoutTests/platform/mac-leopard/svg/dynamic-updates/SVGFECompositeElement-dom-k3-attr-expected.checksum
@@ -1 +1 @@
-71a66d32a5483a15ef6138d9ab129c16
\ No newline at end of file
+26f6a99d7e3dbee398b68c1085d7ad6e
\ No newline at end of file
diff --git a/LayoutTests/platform/mac-leopard/svg/dynamic-updates/SVGFECompositeElement-dom-k3-attr-expected.png b/LayoutTests/platform/mac-leopard/svg/dynamic-updates/SVGFECompositeElement-dom-k3-attr-expected.png
index da7565b..11a1cd6 100644
Binary files a/LayoutTests/platform/mac-leopard/svg/dynamic-updates/SVGFECompositeElement-dom-k3-attr-expected.png and b/LayoutTests/platform/mac-leopard/svg/dynamic-updates/SVGFECompositeElement-dom-k3-attr-expected.png differ
diff --git a/LayoutTests/platform/mac-leopard/svg/dynamic-updates/SVGFECompositeElement-dom-k4-attr-expected.checksum b/LayoutTests/platform/mac-leopard/svg/dynamic-updates/SVGFECompositeElement-dom-k4-attr-expected.checksum
index 8ad4b8b..504666a 100644
--- a/LayoutTests/platform/mac-leopard/svg/dynamic-updates/SVGFECompositeElement-dom-k4-attr-expected.checksum
+++ b/LayoutTests/platform/mac-leopard/svg/dynamic-updates/SVGFECompositeElement-dom-k4-attr-expected.checksum
@@ -1 +1 @@
-b2c0e2407f1be8d2b92f409d00378a82
\ No newline at end of file
+500dafa12d9b64cb5892ad86b4c0db6b
\ No newline at end of file
diff --git a/LayoutTests/platform/mac-leopard/svg/dynamic-updates/SVGFECompositeElement-dom-k4-attr-expected.png b/LayoutTests/platform/mac-leopard/svg/dynamic-updates/SVGFECompositeElement-dom-k4-attr-expected.png
index d3392ee..a4fc575 100644
Binary files a/LayoutTests/platform/mac-leopard/svg/dynamic-updates/SVGFECompositeElement-dom-k4-attr-expected.png and b/LayoutTests/platform/mac-leopard/svg/dynamic-updates/SVGFECompositeElement-dom-k4-attr-expected.png differ
diff --git a/LayoutTests/platform/mac-leopard/svg/dynamic-updates/SVGFECompositeElement-dom-operator-attr-expected.checksum b/LayoutTests/platform/mac-leopard/svg/dynamic-updates/SVGFECompositeElement-dom-operator-attr-expected.checksum
index bf8e9a4..3d8b4c2 100644
--- a/LayoutTests/platform/mac-leopard/svg/dynamic-updates/SVGFECompositeElement-dom-operator-attr-expected.checksum
+++ b/LayoutTests/platform/mac-leopard/svg/dynamic-updates/SVGFECompositeElement-dom-operator-attr-expected.checksum
@@ -1 +1 @@
-38ccde3b5675a6866e5ef2434f6fcc2f
\ No newline at end of file
+093438afd3f7586e1f8979e12ef85057
\ No newline at end of file
diff --git a/LayoutTests/platform/mac-leopard/svg/dynamic-updates/SVGFECompositeElement-dom-operator-attr-expected.png b/LayoutTests/platform/mac-leopard/svg/dynamic-updates/SVGFECompositeElement-dom-operator-attr-expected.png
index 17e6532..21bfcf5 100644
Binary files a/LayoutTests/platform/mac-leopard/svg/dynamic-updates/SVGFECompositeElement-dom-operator-attr-expected.png and b/LayoutTests/platform/mac-leopard/svg/dynamic-updates/SVGFECompositeElement-dom-operator-attr-expected.png differ
diff --git a/LayoutTests/platform/mac-leopard/svg/dynamic-updates/SVGFECompositeElement-svgdom-in2-prop-expected.checksum b/LayoutTests/platform/mac-leopard/svg/dynamic-updates/SVGFECompositeElement-svgdom-in2-prop-expected.checksum
index 9f36ba4..a3409ff 100644
--- a/LayoutTests/platform/mac-leopard/svg/dynamic-updates/SVGFECompositeElement-svgdom-in2-prop-expected.checksum
+++ b/LayoutTests/platform/mac-leopard/svg/dynamic-updates/SVGFECompositeElement-svgdom-in2-prop-expected.checksum
@@ -1 +1 @@
-4dc9c3bb67b26860d558477eaf33a517
\ No newline at end of file
+f4b778d86939af60699c7c1fbab69470
\ No newline at end of file
diff --git a/LayoutTests/platform/mac-leopard/svg/dynamic-updates/SVGFECompositeElement-svgdom-in2-prop-expected.png b/LayoutTests/platform/mac-leopard/svg/dynamic-updates/SVGFECompositeElement-svgdom-in2-prop-expected.png
index a5459a8..9cf1ed6 100644
Binary files a/LayoutTests/platform/mac-leopard/svg/dynamic-updates/SVGFECompositeElement-svgdom-in2-prop-expected.png and b/LayoutTests/platform/mac-leopard/svg/dynamic-updates/SVGFECompositeElement-svgdom-in2-prop-expected.png differ
diff --git a/LayoutTests/platform/mac-leopard/svg/dynamic-updates/SVGFECompositeElement-svgdom-k1-prop-expected.checksum b/LayoutTests/platform/mac-leopard/svg/dynamic-updates/SVGFECompositeElement-svgdom-k1-prop-expected.checksum
index 0df379b..2e19e30 100644
--- a/LayoutTests/platform/mac-leopard/svg/dynamic-updates/SVGFECompositeElement-svgdom-k1-prop-expected.checksum
+++ b/LayoutTests/platform/mac-leopard/svg/dynamic-updates/SVGFECompositeElement-svgdom-k1-prop-expected.checksum
@@ -1 +1 @@
-429985f294624af9aba4703a324f4451
\ No newline at end of file
+45c83c311cae3e7a2d45ae5bca0ecdff
\ No newline at end of file
diff --git a/LayoutTests/platform/mac-leopard/svg/dynamic-updates/SVGFECompositeElement-svgdom-k1-prop-expected.png b/LayoutTests/platform/mac-leopard/svg/dynamic-updates/SVGFECompositeElement-svgdom-k1-prop-expected.png
index 2f2865a..3428dfb 100644
Binary files a/LayoutTests/platform/mac-leopard/svg/dynamic-updates/SVGFECompositeElement-svgdom-k1-prop-expected.png and b/LayoutTests/platform/mac-leopard/svg/dynamic-updates/SVGFECompositeElement-svgdom-k1-prop-expected.png differ
diff --git a/LayoutTests/platform/mac-leopard/svg/dynamic-updates/SVGFECompositeElement-svgdom-k2-prop-expected.checksum b/LayoutTests/platform/mac-leopard/svg/dynamic-updates/SVGFECompositeElement-svgdom-k2-prop-expected.checksum
index 07cbeb0..0cb5cd5 100644
--- a/LayoutTests/platform/mac-leopard/svg/dynamic-updates/SVGFECompositeElement-svgdom-k2-prop-expected.checksum
+++ b/LayoutTests/platform/mac-leopard/svg/dynamic-updates/SVGFECompositeElement-svgdom-k2-prop-expected.checksum
@@ -1 +1 @@
-02568e3667f51b5979f8892d6da5a02c
\ No newline at end of file
+e41d58304bbde13cea27b545785d1bc0
\ No newline at end of file
diff --git a/LayoutTests/platform/mac-leopard/svg/dynamic-updates/SVGFECompositeElement-svgdom-k2-prop-expected.png b/LayoutTests/platform/mac-leopard/svg/dynamic-updates/SVGFECompositeElement-svgdom-k2-prop-expected.png
index e532364..c55d090 100644
Binary files a/LayoutTests/platform/mac-leopard/svg/dynamic-updates/SVGFECompositeElement-svgdom-k2-prop-expected.png and b/LayoutTests/platform/mac-leopard/svg/dynamic-updates/SVGFECompositeElement-svgdom-k2-prop-expected.png differ
diff --git a/LayoutTests/platform/mac-leopard/svg/dynamic-updates/SVGFECompositeElement-svgdom-k3-prop-expected.checksum b/LayoutTests/platform/mac-leopard/svg/dynamic-updates/SVGFECompositeElement-svgdom-k3-prop-expected.checksum
index 3923e4a..a097dd7 100644
--- a/LayoutTests/platform/mac-leopard/svg/dynamic-updates/SVGFECompositeElement-svgdom-k3-prop-expected.checksum
+++ b/LayoutTests/platform/mac-leopard/svg/dynamic-updates/SVGFECompositeElement-svgdom-k3-prop-expected.checksum
@@ -1 +1 @@
-a356ac044c8db790dfb68888cf3dd59b
\ No newline at end of file
+b1c74fce3113522e243f2cda0bc37b56
\ No newline at end of file
diff --git a/LayoutTests/platform/mac-leopard/svg/dynamic-updates/SVGFECompositeElement-svgdom-k3-prop-expected.png b/LayoutTests/platform/mac-leopard/svg/dynamic-updates/SVGFECompositeElement-svgdom-k3-prop-expected.png
index bfe8967..1417546 100644
Binary files a/LayoutTests/platform/mac-leopard/svg/dynamic-updates/SVGFECompositeElement-svgdom-k3-prop-expected.png and b/LayoutTests/platform/mac-leopard/svg/dynamic-updates/SVGFECompositeElement-svgdom-k3-prop-expected.png differ
diff --git a/LayoutTests/platform/mac-leopard/svg/dynamic-updates/SVGFECompositeElement-svgdom-k4-prop-expected.checksum b/LayoutTests/platform/mac-leopard/svg/dynamic-updates/SVGFECompositeElement-svgdom-k4-prop-expected.checksum
index 3993371..7dd0be0 100644
--- a/LayoutTests/platform/mac-leopard/svg/dynamic-updates/SVGFECompositeElement-svgdom-k4-prop-expected.checksum
+++ b/LayoutTests/platform/mac-leopard/svg/dynamic-updates/SVGFECompositeElement-svgdom-k4-prop-expected.checksum
@@ -1 +1 @@
-e627b3da6410afc872d0e78dea54b764
\ No newline at end of file
+1caaad410392d6276e62cd98e093ab75
\ No newline at end of file
diff --git a/LayoutTests/platform/mac-leopard/svg/dynamic-updates/SVGFECompositeElement-svgdom-k4-prop-expected.png b/LayoutTests/platform/mac-leopard/svg/dynamic-updates/SVGFECompositeElement-svgdom-k4-prop-expected.png
index 4bf16b8..0a7fed3 100644
Binary files a/LayoutTests/platform/mac-leopard/svg/dynamic-updates/SVGFECompositeElement-svgdom-k4-prop-expected.png and b/LayoutTests/platform/mac-leopard/svg/dynamic-updates/SVGFECompositeElement-svgdom-k4-prop-expected.png differ
diff --git a/LayoutTests/platform/mac-leopard/svg/dynamic-updates/SVGFECompositeElement-svgdom-operator-prop-expected.checksum b/LayoutTests/platform/mac-leopard/svg/dynamic-updates/SVGFECompositeElement-svgdom-operator-prop-expected.checksum
index 861dc9f..ca8088d 100644
--- a/LayoutTests/platform/mac-leopard/svg/dynamic-updates/SVGFECompositeElement-svgdom-operator-prop-expected.checksum
+++ b/LayoutTests/platform/mac-leopard/svg/dynamic-updates/SVGFECompositeElement-svgdom-operator-prop-expected.checksum
@@ -1 +1 @@
-623b9250dad484bbf3b4dced688b42e1
\ No newline at end of file
+3cf85b442526712e57ce4100a1c49965
\ No newline at end of file
diff --git a/LayoutTests/platform/mac-leopard/svg/dynamic-updates/SVGFECompositeElement-svgdom-operator-prop-expected.png b/LayoutTests/platform/mac-leopard/svg/dynamic-updates/SVGFECompositeElement-svgdom-operator-prop-expected.png
index ffb7c5f..de10554 100644
Binary files a/LayoutTests/platform/mac-leopard/svg/dynamic-updates/SVGFECompositeElement-svgdom-operator-prop-expected.png and b/LayoutTests/platform/mac-leopard/svg/dynamic-updates/SVGFECompositeElement-svgdom-operator-prop-expected.png differ
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index ab9df2e..93b49b4 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,21 @@
+2010-12-16  Zoltan Herczeg  <zherczeg at webkit.org>
+
+        Reviewed by Dirk Schulze.
+
+        Improve feArithmeticFilter
+        https://bugs.webkit.org/show_bug.cgi?id=51105
+
+        In case of the arithmetic operator on feComposite filter, we could use
+        different result passing modes depend on its type. Furthermore, the
+        number of executed multiplications is reduced if k1 or k4 argument is zero.
+
+        2% speedup on WebCore/manual-tests/svg-filter-animation.svg
+
+        * platform/graphics/filters/FEComposite.cpp:
+        (WebCore::computeArithmeticPixels):
+        (WebCore::arithmetic):
+        (WebCore::FEComposite::apply):
+
 2010-12-15  Brian Weinstein  <bweinstein at apple.com>
 
         Reviewed by Jon Honeycutt.
diff --git a/WebCore/platform/graphics/filters/FEComposite.cpp b/WebCore/platform/graphics/filters/FEComposite.cpp
index 010ceef..3f32552 100644
--- a/WebCore/platform/graphics/filters/FEComposite.cpp
+++ b/WebCore/platform/graphics/filters/FEComposite.cpp
@@ -97,23 +97,66 @@ void FEComposite::setK4(float k4)
     m_k4 = k4;
 }
 
-inline void arithmetic(const ByteArray* srcPixelArrayA, ByteArray* srcPixelArrayB,
+template <int b1, int b2, int b3, int b4>
+inline void computeArithmeticPixels(unsigned char* source, unsigned char* destination, int pixelArrayLength,
+                                    float k1, float k2, float k3, float k4)
+{
+    float scaledK4;
+    float scaledK1;
+    if (b1)
+        scaledK1 = k1 / 255.f;
+    if (b4)
+        scaledK4 = k4 * 255.f;
+
+    while (--pixelArrayLength >= 0) {
+        unsigned char i1 = *source;
+        unsigned char i2 = *destination;
+        float result = 0;
+        if (b1)
+            result += scaledK1 * i1 * i2;
+        if (b2)
+            result += k2 * i1;
+        if (b3)
+            result += k3 * i2;
+        if (b4)
+            result += scaledK4;
+
+        if (result <= 0)
+            *destination = 0;
+        else if (result >= 255)
+            *destination = 255;
+        else
+            *destination = result;
+        ++source;
+        ++destination;
+    }
+}
+
+inline void arithmetic(ByteArray* srcPixelArrayA, ByteArray* srcPixelArrayB,
                        float k1, float k2, float k3, float k4)
 {
-    float scaledK1 = k1 / 255.f;
-    float scaledK4 = k4 * 255.f;
-    unsigned pixelArrayLength = srcPixelArrayA->length();
-    for (unsigned pixelOffset = 0; pixelOffset < pixelArrayLength; pixelOffset += 4) {
-        for (unsigned channel = 0; channel < 4; ++channel) {
-            unsigned char i1 = srcPixelArrayA->get(pixelOffset + channel);
-            unsigned char i2 = srcPixelArrayB->get(pixelOffset + channel);
+    int pixelArrayLength = srcPixelArrayA->length();
+    ASSERT(pixelArrayLength == srcPixelArrayB->length());
+    unsigned char* source = srcPixelArrayA->data();
+    unsigned char* destination = srcPixelArrayB->data();
 
-            double result = scaledK1 * i1 * i2 + k2 * i1 + k3 * i2 + scaledK4;
-            srcPixelArrayB->set(pixelOffset + channel, result);
+    if (!k4) {
+        if (!k1) {
+            computeArithmeticPixels<0,1,1,0>(source, destination, pixelArrayLength, k1, k2, k3, k4);
+            return;
         }
+
+        computeArithmeticPixels<1,1,1,0>(source, destination, pixelArrayLength, k1, k2, k3, k4);
+        return;
+    }
+
+    if (!k1) {
+        computeArithmeticPixels<0,1,1,1>(source, destination, pixelArrayLength, k1, k2, k3, k4);
+        return;
     }
+    computeArithmeticPixels<1,1,1,1>(source, destination, pixelArrayLength, k1, k2, k3, k4);
 }
-    
+
 void FEComposite::determineAbsolutePaintRect()
 {
     switch (m_type) {
@@ -146,6 +189,21 @@ void FEComposite::apply()
     if (!in->hasResult() || !in2->hasResult())
         return;
 
+    if (m_type == FECOMPOSITE_OPERATOR_ARITHMETIC) {
+        ImageData* resultImage = createPremultipliedImageResult();
+        if (!resultImage)
+            return;
+
+        IntRect effectADrawingRect = requestedRegionOfInputImageData(in->absolutePaintRect());
+        RefPtr<ImageData> srcImageData = in->asPremultipliedImage(effectADrawingRect);
+
+        IntRect effectBDrawingRect = requestedRegionOfInputImageData(in2->absolutePaintRect());
+        in2->copyPremultipliedImage(resultImage, effectBDrawingRect);
+
+        arithmetic(srcImageData->data()->data(), resultImage->data()->data(), m_k1, m_k2, m_k3, m_k4);
+        return;
+    }
+
     ImageBuffer* resultImage = createImageBufferResult();
     if (!resultImage)
         return;
@@ -175,19 +233,6 @@ void FEComposite::apply()
         filterContext->drawImageBuffer(in2->asImageBuffer(), ColorSpaceDeviceRGB, drawingRegionOfInputImage(in2->absolutePaintRect()));
         filterContext->drawImageBuffer(in->asImageBuffer(), ColorSpaceDeviceRGB, drawingRegionOfInputImage(in->absolutePaintRect()), srcRect, CompositeXOR);
         break;
-    case FECOMPOSITE_OPERATOR_ARITHMETIC: {
-        IntRect effectADrawingRect = requestedRegionOfInputImageData(in->absolutePaintRect());
-        RefPtr<ImageData> srcImageData = in->asImageBuffer()->getPremultipliedImageData(effectADrawingRect);
-        ByteArray* srcPixelArrayA = srcImageData->data()->data();
-
-        IntRect effectBDrawingRect = requestedRegionOfInputImageData(in2->absolutePaintRect());
-        RefPtr<ImageData> imageData = in2->asImageBuffer()->getPremultipliedImageData(effectBDrawingRect);
-        ByteArray* srcPixelArrayB = imageData->data()->data();
-
-        arithmetic(srcPixelArrayA, srcPixelArrayB, m_k1, m_k2, m_k3, m_k4);
-        resultImage->putPremultipliedImageData(imageData.get(), IntRect(IntPoint(), resultImage->size()), IntPoint());
-        }
-        break;
     default:
         break;
     }

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list