[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:57:55 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit a4f1233c7147fd6f432784e5b292b376821c32f4
Author: zimmermann at webkit.org <zimmermann at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Thu Aug 12 10:11:08 2010 +0000

    2010-08-12  Nikolas Zimmermann  <nzimmermann at rim.com>
    
            Reviewed by Dirk Schulze.
    
            SVG masking performance very slow
            https://bugs.webkit.org/show_bug.cgi?id=43622
    
            Create ImageBuffers only as large as the final rendered size on screen. Only gradient on text on CG handled this correctly so far.
            Refactored the code into a new SVGImageBufferTools class, and use the code from RenderSVGResourceMasker -> makes the IE9 demo SVG dice usable.
            Clippers, Patterns and Filters remain to be converted.
    
            Test: svg/zoom/page/zoom-mask-with-percentages.svg
    
            * Android.mk: Add SVGImageBufferTools.* to build.
            * CMakeLists.txt: Ditto.
            * GNUmakefile.am: Ditto.
            * WebCore.gypi: Ditto.
            * WebCore.pro: Ditto.
            * WebCore.xcodeproj/project.pbxproj: Ditto.
            * rendering/RenderSVGAllInOne.cpp: Ditto.
            * rendering/RenderSVGResourceGradient.cpp: Refactored CG gradient specific "create image buffer in absolute coordinates" code into SVGImageBufferTools class.
            (WebCore::createMaskAndSwapContextForTextGradient):
            (WebCore::clipToTextMask):
            (WebCore::RenderSVGResourceGradient::applyResource):
            * rendering/RenderSVGResourceMasker.cpp: Use new SVGImageBufferTools class, to avoid pixelation when zooming and to create image buffers as big as the final rendered size on screen, not more.
            (WebCore::RenderSVGResourceMasker::invalidateClients):
            (WebCore::RenderSVGResourceMasker::applyResource):
            (WebCore::RenderSVGResourceMasker::drawContentIntoMaskImage):
            (WebCore::RenderSVGResourceMasker::calculateMaskContentRepaintRect):
            (WebCore::RenderSVGResourceMasker::resourceBoundingBox):
            * rendering/RenderSVGResourceMasker.h:
            * rendering/SVGImageBufferTools.cpp: Added.
            (WebCore::SVGImageBufferTools::absoluteTransformFromContext):
            (WebCore::SVGImageBufferTools::createImageBuffer):
            (WebCore::SVGImageBufferTools::clipToImageBuffer):
            * rendering/SVGImageBufferTools.h: Added.
            (WebCore::SVGImageBufferTools::SVGImageBufferTools):
            (WebCore::SVGImageBufferTools::~SVGImageBufferTools):
    
    2010-08-12  Nikolas Zimmermann  <nzimmermann at rim.com>
    
            Reviewed by Dirk Schulze.
    
            SVG masking performance very slow
            https://bugs.webkit.org/show_bug.cgi?id=43622
    
            Update mask results, now that mask image buffers are as big as the finaled rendered size on screen.
            Add new test covering zooming into masks, to show that it doesn't pixelate anymore.
    
            * platform/mac/svg/W3C-SVG-1.1/masking-intro-01-f-expected.checksum:
            * platform/mac/svg/W3C-SVG-1.1/masking-intro-01-f-expected.png:
            * platform/mac/svg/batik/masking/maskRegions-expected.checksum:
            * platform/mac/svg/batik/masking/maskRegions-expected.png:
            * platform/mac/svg/custom/grayscale-gradient-mask-expected.checksum:
            * platform/mac/svg/custom/grayscale-gradient-mask-expected.png:
            * platform/mac/svg/zoom/page/zoom-mask-with-percentages-expected.checksum: Added.
            * platform/mac/svg/zoom/page/zoom-mask-with-percentages-expected.png: Added.
            * platform/mac/svg/zoom/page/zoom-mask-with-percentages-expected.txt: Added.
            * svg/zoom/page/zoom-mask-with-percentages.svg: Added.
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@65229 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index 0d64c39..93fc114 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,24 @@
+2010-08-12  Nikolas Zimmermann  <nzimmermann at rim.com>
+
+        Reviewed by Dirk Schulze.
+
+        SVG masking performance very slow
+        https://bugs.webkit.org/show_bug.cgi?id=43622
+
+        Update mask results, now that mask image buffers are as big as the finaled rendered size on screen.
+        Add new test covering zooming into masks, to show that it doesn't pixelate anymore.
+
+        * platform/mac/svg/W3C-SVG-1.1/masking-intro-01-f-expected.checksum:
+        * platform/mac/svg/W3C-SVG-1.1/masking-intro-01-f-expected.png:
+        * platform/mac/svg/batik/masking/maskRegions-expected.checksum:
+        * platform/mac/svg/batik/masking/maskRegions-expected.png:
+        * platform/mac/svg/custom/grayscale-gradient-mask-expected.checksum:
+        * platform/mac/svg/custom/grayscale-gradient-mask-expected.png:
+        * platform/mac/svg/zoom/page/zoom-mask-with-percentages-expected.checksum: Added.
+        * platform/mac/svg/zoom/page/zoom-mask-with-percentages-expected.png: Added.
+        * platform/mac/svg/zoom/page/zoom-mask-with-percentages-expected.txt: Added.
+        * svg/zoom/page/zoom-mask-with-percentages.svg: Added.
+
 2010-07-14  Marcus Bulach  <bulach at chromium.org>
 
         Reviewed by darin at apple.com.
diff --git a/LayoutTests/platform/mac/svg/W3C-SVG-1.1/masking-intro-01-f-expected.checksum b/LayoutTests/platform/mac/svg/W3C-SVG-1.1/masking-intro-01-f-expected.checksum
index 1df2916..0e79e38 100644
--- a/LayoutTests/platform/mac/svg/W3C-SVG-1.1/masking-intro-01-f-expected.checksum
+++ b/LayoutTests/platform/mac/svg/W3C-SVG-1.1/masking-intro-01-f-expected.checksum
@@ -1 +1 @@
-12ac53d50854581aa61d0a7b692d688e
\ No newline at end of file
+62a68fa8de7ea652f54ced5930397a1e
\ No newline at end of file
diff --git a/LayoutTests/platform/mac/svg/W3C-SVG-1.1/masking-intro-01-f-expected.png b/LayoutTests/platform/mac/svg/W3C-SVG-1.1/masking-intro-01-f-expected.png
index 23a18fb..d6bb9cd 100644
Binary files a/LayoutTests/platform/mac/svg/W3C-SVG-1.1/masking-intro-01-f-expected.png and b/LayoutTests/platform/mac/svg/W3C-SVG-1.1/masking-intro-01-f-expected.png differ
diff --git a/LayoutTests/platform/mac/svg/batik/masking/maskRegions-expected.checksum b/LayoutTests/platform/mac/svg/batik/masking/maskRegions-expected.checksum
index 2136b25..63a88cc 100644
--- a/LayoutTests/platform/mac/svg/batik/masking/maskRegions-expected.checksum
+++ b/LayoutTests/platform/mac/svg/batik/masking/maskRegions-expected.checksum
@@ -1 +1 @@
-367e3619b5c94ebd2bc6d7a884c5fde1
\ No newline at end of file
+c8563205e30594d271e4f9ca61aa1817
\ No newline at end of file
diff --git a/LayoutTests/platform/mac/svg/batik/masking/maskRegions-expected.png b/LayoutTests/platform/mac/svg/batik/masking/maskRegions-expected.png
index fb7d13c..d149f4f 100644
Binary files a/LayoutTests/platform/mac/svg/batik/masking/maskRegions-expected.png and b/LayoutTests/platform/mac/svg/batik/masking/maskRegions-expected.png differ
diff --git a/LayoutTests/platform/mac/svg/custom/grayscale-gradient-mask-expected.checksum b/LayoutTests/platform/mac/svg/custom/grayscale-gradient-mask-expected.checksum
index 23d2633..87aa7fd 100644
--- a/LayoutTests/platform/mac/svg/custom/grayscale-gradient-mask-expected.checksum
+++ b/LayoutTests/platform/mac/svg/custom/grayscale-gradient-mask-expected.checksum
@@ -1 +1 @@
-86c9087a83ecdd5b74c9a4a877f643db
\ No newline at end of file
+63c76778f56ccf67c8ad2e82f15dc4e4
\ No newline at end of file
diff --git a/LayoutTests/platform/mac/svg/custom/grayscale-gradient-mask-expected.png b/LayoutTests/platform/mac/svg/custom/grayscale-gradient-mask-expected.png
index f2fa490..4a16987 100644
Binary files a/LayoutTests/platform/mac/svg/custom/grayscale-gradient-mask-expected.png and b/LayoutTests/platform/mac/svg/custom/grayscale-gradient-mask-expected.png differ
diff --git a/LayoutTests/platform/mac/svg/zoom/page/zoom-mask-with-percentages-expected.checksum b/LayoutTests/platform/mac/svg/zoom/page/zoom-mask-with-percentages-expected.checksum
new file mode 100644
index 0000000..e45b650
--- /dev/null
+++ b/LayoutTests/platform/mac/svg/zoom/page/zoom-mask-with-percentages-expected.checksum
@@ -0,0 +1 @@
+70602e10a8d6679cda64322a785907e7
\ No newline at end of file
diff --git a/LayoutTests/platform/mac/svg/zoom/page/zoom-mask-with-percentages-expected.png b/LayoutTests/platform/mac/svg/zoom/page/zoom-mask-with-percentages-expected.png
new file mode 100644
index 0000000..701cda2
Binary files /dev/null and b/LayoutTests/platform/mac/svg/zoom/page/zoom-mask-with-percentages-expected.png differ
diff --git a/LayoutTests/platform/mac/svg/zoom/page/zoom-mask-with-percentages-expected.txt b/LayoutTests/platform/mac/svg/zoom/page/zoom-mask-with-percentages-expected.txt
new file mode 100644
index 0000000..cdc1304
--- /dev/null
+++ b/LayoutTests/platform/mac/svg/zoom/page/zoom-mask-with-percentages-expected.txt
@@ -0,0 +1,73 @@
+layer at (0,0) size 933x1036
+  RenderView at (0,0) size 785x585
+layer at (0,0) size 933x1036
+  RenderSVGRoot {svg} at (186,74) size 550x764
+    RenderSVGContainer {g} at (186,74) size 550x764
+      RenderSVGText {text} at (179,36) size 92x18 contains 1 chunk(s)
+        RenderSVGInlineText {#text} at (0,0) size 92x18
+          chunk 1 (middle anchor) text run 1 at (179.50,50.00) startOffset 0 endOffset 12 width 91.00: "Mask Regions"
+      RenderSVGHiddenContainer {defs} at (0,0) size 0x0
+        RenderSVGResourceLinearGradient {linearGradient} [id="maskedGradient"] [gradientUnits=objectBoundingBox] [start=(0,0)] [end=(1,1)]
+          RenderSVGGradientStop {stop} [offset=0.00] [color=#0000FF]
+          RenderSVGGradientStop {stop} [offset=1.00] [color=#FF0000]
+        RenderPath {rect} at (0,0) size 208x166 [fill={[type=LINEAR-GRADIENT] [id="maskedGradient"]}] [data="M0.00,0.00 L100.00,0.00 L100.00,80.00 L0.00,80.00 Z"]
+        RenderSVGResourceMasker {mask} [id="mask_1"] [maskUnits=objectBoundingBox] [maskContentUnits=userSpaceOnUse]
+          RenderPath {circle} at (10,0) size 84x83 [fill={[type=SOLID] [color=#FFFFFF]}] [data="M45.00,20.00 L44.96,21.26 L44.84,22.51 L44.65,23.75 L44.37,24.97 L44.02,26.18 L43.60,27.36 L43.10,28.52 L42.53,29.64 L41.89,30.72 L41.18,31.76 L40.41,32.75 L39.58,33.69 L38.69,34.58 L37.75,35.41 L36.76,36.18 L35.72,36.89 L34.64,37.53 L33.52,38.10 L32.36,38.60 L31.18,39.02 L29.97,39.37 L28.75,39.65 L27.51,39.84 L26.26,39.96 L25.00,40.00 L23.74,39.96 L22.49,39.84 L21.25,39.65 L20.03,39.37 L18.82,39.02 L17.64,38.60 L16.48,38.10 L15.36,37.53 L14.28,36.89 L13.24,36.18 L12.25,35.41 L11.31,34.58 L10.42,33.69 L9.59,32.75 L8.82,31.76 L8.11,30.72 L7.47,29.64 L6.90,28.52 L6.40,27.36 L5.98,26.18 L5.63,24.97 L5.35,23.75 L5.16,22.51 L5.04,21.26 L5.00,20.00 L5.04,18.74 L5.16,17.49 L5.35,16.25 L5.63,15.03 L5.98,13.82 L6.40,12.64 L6.90,11.48 L7.47,10.36 L8.11,9.28 L8.82,8.24 L9.59,7.25 L10.42,6.31 L11.31,5.42 L12.25,4.59 L13.24,3.82 L14.28,3.11 L15.36,2.47 L16.48,1.90 L17.64,1.40 L18.82,0.98 L20.03,0.63 L21.25,0.35 L22.49,0.16 L23.74,0.04 L25.00,0.00 L26.26,0.04 L27.51,0.16 L28.75,0.35 L29.97,0.63 L31.18,0.98 L32.36,1.40 L33.52,1.90 L34.64,2.47 L35.72,3.11 L36.76,3.82 L37.75,4.59 L38.69,5.42 L39.58,6.31 L40.41,7.25 L41.18,8.24 L41.89,9.28 L42.53,10.36 L43.10,11.48 L43.60,12.64 L44.02,13.82 L44.37,15.03 L44.65,16.25 L44.84,17.49 L44.96,18.74 Z"]
+          RenderPath {circle} at (10,82) size 84x84 [fill={[type=SOLID] [color=#FFFFFF]}] [data="M45.00,60.00 L44.96,61.26 L44.84,62.51 L44.65,63.75 L44.37,64.97 L44.02,66.18 L43.60,67.36 L43.10,68.52 L42.53,69.64 L41.89,70.72 L41.18,71.76 L40.41,72.75 L39.58,73.69 L38.69,74.58 L37.75,75.41 L36.76,76.18 L35.72,76.89 L34.64,77.53 L33.52,78.10 L32.36,78.60 L31.18,79.02 L29.97,79.37 L28.75,79.65 L27.51,79.84 L26.26,79.96 L25.00,80.00 L23.74,79.96 L22.49,79.84 L21.25,79.65 L20.03,79.37 L18.82,79.02 L17.64,78.60 L16.48,78.10 L15.36,77.53 L14.28,76.89 L13.24,76.18 L12.25,75.41 L11.31,74.58 L10.42,73.69 L9.59,72.75 L8.82,71.76 L8.11,70.72 L7.47,69.64 L6.90,68.52 L6.40,67.36 L5.98,66.18 L5.63,64.97 L5.35,63.75 L5.16,62.51 L5.04,61.26 L5.00,60.00 L5.04,58.74 L5.16,57.49 L5.35,56.25 L5.63,55.03 L5.98,53.82 L6.40,52.64 L6.90,51.48 L7.47,50.36 L8.11,49.28 L8.82,48.24 L9.59,47.25 L10.42,46.31 L11.31,45.42 L12.25,44.59 L13.24,43.82 L14.28,43.11 L15.36,42.47 L16.48,41.90 L17.64,41.40 L18.82,40.98 L20.03,40.63 L21.25,40.35 L22.49,40.16 L23.74,40.04 L25.00,40.00 L26.26,40.04 L27.51,40.16 L28.75,40.35 L29.97,40.63 L31.18,40.98 L32.36,41.40 L33.52,41.90 L34.64,42.47 L35.72,43.11 L36.76,43.82 L37.75,44.59 L38.69,45.42 L39.58,46.31 L40.41,47.25 L41.18,48.24 L41.89,49.28 L42.53,50.36 L43.10,51.48 L43.60,52.64 L44.02,53.82 L44.37,55.03 L44.65,56.25 L44.84,57.49 L44.96,58.74 Z"]
+          RenderPath {circle} at (114,0) size 84x83 [fill={[type=SOLID] [color=#FFFFFF]}] [data="M95.00,20.00 L94.96,21.26 L94.84,22.51 L94.65,23.75 L94.37,24.97 L94.02,26.18 L93.60,27.36 L93.10,28.52 L92.53,29.64 L91.89,30.72 L91.18,31.76 L90.41,32.75 L89.58,33.69 L88.69,34.58 L87.75,35.41 L86.76,36.18 L85.72,36.89 L84.64,37.53 L83.52,38.10 L82.36,38.60 L81.18,39.02 L79.97,39.37 L78.75,39.65 L77.51,39.84 L76.26,39.96 L75.00,40.00 L73.74,39.96 L72.49,39.84 L71.25,39.65 L70.03,39.37 L68.82,39.02 L67.64,38.60 L66.48,38.10 L65.36,37.53 L64.28,36.89 L63.24,36.18 L62.25,35.41 L61.31,34.58 L60.42,33.69 L59.59,32.75 L58.82,31.76 L58.11,30.72 L57.47,29.64 L56.90,28.52 L56.40,27.36 L55.98,26.18 L55.63,24.97 L55.35,23.75 L55.16,22.51 L55.04,21.26 L55.00,20.00 L55.04,18.74 L55.16,17.49 L55.35,16.25 L55.63,15.03 L55.98,13.82 L56.40,12.64 L56.90,11.48 L57.47,10.36 L58.11,9.28 L58.82,8.24 L59.59,7.25 L60.42,6.31 L61.31,5.42 L62.25,4.59 L63.24,3.82 L64.28,3.11 L65.36,2.47 L66.48,1.90 L67.64,1.40 L68.82,0.98 L70.03,0.63 L71.25,0.35 L72.49,0.16 L73.74,0.04 L75.00,0.00 L76.26,0.04 L77.51,0.16 L78.75,0.35 L79.97,0.63 L81.18,0.98 L82.36,1.40 L83.52,1.90 L84.64,2.47 L85.72,3.11 L86.76,3.82 L87.75,4.59 L88.69,5.42 L89.58,6.31 L90.41,7.25 L91.18,8.24 L91.89,9.28 L92.53,10.36 L93.10,11.48 L93.60,12.64 L94.02,13.82 L94.37,15.03 L94.65,16.25 L94.84,17.49 L94.96,18.74 Z"]
+          RenderPath {circle} at (114,82) size 84x84 [fill={[type=SOLID] [color=#FFFFFF]}] [data="M95.00,60.00 L94.96,61.26 L94.84,62.51 L94.65,63.75 L94.37,64.97 L94.02,66.18 L93.60,67.36 L93.10,68.52 L92.53,69.64 L91.89,70.72 L91.18,71.76 L90.41,72.75 L89.58,73.69 L88.69,74.58 L87.75,75.41 L86.76,76.18 L85.72,76.89 L84.64,77.53 L83.52,78.10 L82.36,78.60 L81.18,79.02 L79.97,79.37 L78.75,79.65 L77.51,79.84 L76.26,79.96 L75.00,80.00 L73.74,79.96 L72.49,79.84 L71.25,79.65 L70.03,79.37 L68.82,79.02 L67.64,78.60 L66.48,78.10 L65.36,77.53 L64.28,76.89 L63.24,76.18 L62.25,75.41 L61.31,74.58 L60.42,73.69 L59.59,72.75 L58.82,71.76 L58.11,70.72 L57.47,69.64 L56.90,68.52 L56.40,67.36 L55.98,66.18 L55.63,64.97 L55.35,63.75 L55.16,62.51 L55.04,61.26 L55.00,60.00 L55.04,58.74 L55.16,57.49 L55.35,56.25 L55.63,55.03 L55.98,53.82 L56.40,52.64 L56.90,51.48 L57.47,50.36 L58.11,49.28 L58.82,48.24 L59.59,47.25 L60.42,46.31 L61.31,45.42 L62.25,44.59 L63.24,43.82 L64.28,43.11 L65.36,42.47 L66.48,41.90 L67.64,41.40 L68.82,40.98 L70.03,40.63 L71.25,40.35 L72.49,40.16 L73.74,40.04 L75.00,40.00 L76.26,40.04 L77.51,40.16 L78.75,40.35 L79.97,40.63 L81.18,40.98 L82.36,41.40 L83.52,41.90 L84.64,42.47 L85.72,43.11 L86.76,43.82 L87.75,44.59 L88.69,45.42 L89.58,46.31 L90.41,47.25 L91.18,48.24 L91.89,49.28 L92.53,50.36 L93.10,51.48 L93.60,52.64 L94.02,53.82 L94.37,55.03 L94.65,56.25 L94.84,57.49 L94.96,58.74 Z"]
+        RenderSVGResourceMasker {mask} [id="mask_2"] [maskUnits=objectBoundingBox] [maskContentUnits=userSpaceOnUse]
+          RenderPath {circle} at (10,0) size 84x83 [fill={[type=SOLID] [color=#FFFFFF]}] [data="M45.00,20.00 L44.96,21.26 L44.84,22.51 L44.65,23.75 L44.37,24.97 L44.02,26.18 L43.60,27.36 L43.10,28.52 L42.53,29.64 L41.89,30.72 L41.18,31.76 L40.41,32.75 L39.58,33.69 L38.69,34.58 L37.75,35.41 L36.76,36.18 L35.72,36.89 L34.64,37.53 L33.52,38.10 L32.36,38.60 L31.18,39.02 L29.97,39.37 L28.75,39.65 L27.51,39.84 L26.26,39.96 L25.00,40.00 L23.74,39.96 L22.49,39.84 L21.25,39.65 L20.03,39.37 L18.82,39.02 L17.64,38.60 L16.48,38.10 L15.36,37.53 L14.28,36.89 L13.24,36.18 L12.25,35.41 L11.31,34.58 L10.42,33.69 L9.59,32.75 L8.82,31.76 L8.11,30.72 L7.47,29.64 L6.90,28.52 L6.40,27.36 L5.98,26.18 L5.63,24.97 L5.35,23.75 L5.16,22.51 L5.04,21.26 L5.00,20.00 L5.04,18.74 L5.16,17.49 L5.35,16.25 L5.63,15.03 L5.98,13.82 L6.40,12.64 L6.90,11.48 L7.47,10.36 L8.11,9.28 L8.82,8.24 L9.59,7.25 L10.42,6.31 L11.31,5.42 L12.25,4.59 L13.24,3.82 L14.28,3.11 L15.36,2.47 L16.48,1.90 L17.64,1.40 L18.82,0.98 L20.03,0.63 L21.25,0.35 L22.49,0.16 L23.74,0.04 L25.00,0.00 L26.26,0.04 L27.51,0.16 L28.75,0.35 L29.97,0.63 L31.18,0.98 L32.36,1.40 L33.52,1.90 L34.64,2.47 L35.72,3.11 L36.76,3.82 L37.75,4.59 L38.69,5.42 L39.58,6.31 L40.41,7.25 L41.18,8.24 L41.89,9.28 L42.53,10.36 L43.10,11.48 L43.60,12.64 L44.02,13.82 L44.37,15.03 L44.65,16.25 L44.84,17.49 L44.96,18.74 Z"]
+          RenderPath {circle} at (10,82) size 84x84 [fill={[type=SOLID] [color=#FFFFFF]}] [data="M45.00,60.00 L44.96,61.26 L44.84,62.51 L44.65,63.75 L44.37,64.97 L44.02,66.18 L43.60,67.36 L43.10,68.52 L42.53,69.64 L41.89,70.72 L41.18,71.76 L40.41,72.75 L39.58,73.69 L38.69,74.58 L37.75,75.41 L36.76,76.18 L35.72,76.89 L34.64,77.53 L33.52,78.10 L32.36,78.60 L31.18,79.02 L29.97,79.37 L28.75,79.65 L27.51,79.84 L26.26,79.96 L25.00,80.00 L23.74,79.96 L22.49,79.84 L21.25,79.65 L20.03,79.37 L18.82,79.02 L17.64,78.60 L16.48,78.10 L15.36,77.53 L14.28,76.89 L13.24,76.18 L12.25,75.41 L11.31,74.58 L10.42,73.69 L9.59,72.75 L8.82,71.76 L8.11,70.72 L7.47,69.64 L6.90,68.52 L6.40,67.36 L5.98,66.18 L5.63,64.97 L5.35,63.75 L5.16,62.51 L5.04,61.26 L5.00,60.00 L5.04,58.74 L5.16,57.49 L5.35,56.25 L5.63,55.03 L5.98,53.82 L6.40,52.64 L6.90,51.48 L7.47,50.36 L8.11,49.28 L8.82,48.24 L9.59,47.25 L10.42,46.31 L11.31,45.42 L12.25,44.59 L13.24,43.82 L14.28,43.11 L15.36,42.47 L16.48,41.90 L17.64,41.40 L18.82,40.98 L20.03,40.63 L21.25,40.35 L22.49,40.16 L23.74,40.04 L25.00,40.00 L26.26,40.04 L27.51,40.16 L28.75,40.35 L29.97,40.63 L31.18,40.98 L32.36,41.40 L33.52,41.90 L34.64,42.47 L35.72,43.11 L36.76,43.82 L37.75,44.59 L38.69,45.42 L39.58,46.31 L40.41,47.25 L41.18,48.24 L41.89,49.28 L42.53,50.36 L43.10,51.48 L43.60,52.64 L44.02,53.82 L44.37,55.03 L44.65,56.25 L44.84,57.49 L44.96,58.74 Z"]
+          RenderPath {circle} at (114,0) size 84x83 [fill={[type=SOLID] [color=#FFFFFF]}] [data="M95.00,20.00 L94.96,21.26 L94.84,22.51 L94.65,23.75 L94.37,24.97 L94.02,26.18 L93.60,27.36 L93.10,28.52 L92.53,29.64 L91.89,30.72 L91.18,31.76 L90.41,32.75 L89.58,33.69 L88.69,34.58 L87.75,35.41 L86.76,36.18 L85.72,36.89 L84.64,37.53 L83.52,38.10 L82.36,38.60 L81.18,39.02 L79.97,39.37 L78.75,39.65 L77.51,39.84 L76.26,39.96 L75.00,40.00 L73.74,39.96 L72.49,39.84 L71.25,39.65 L70.03,39.37 L68.82,39.02 L67.64,38.60 L66.48,38.10 L65.36,37.53 L64.28,36.89 L63.24,36.18 L62.25,35.41 L61.31,34.58 L60.42,33.69 L59.59,32.75 L58.82,31.76 L58.11,30.72 L57.47,29.64 L56.90,28.52 L56.40,27.36 L55.98,26.18 L55.63,24.97 L55.35,23.75 L55.16,22.51 L55.04,21.26 L55.00,20.00 L55.04,18.74 L55.16,17.49 L55.35,16.25 L55.63,15.03 L55.98,13.82 L56.40,12.64 L56.90,11.48 L57.47,10.36 L58.11,9.28 L58.82,8.24 L59.59,7.25 L60.42,6.31 L61.31,5.42 L62.25,4.59 L63.24,3.82 L64.28,3.11 L65.36,2.47 L66.48,1.90 L67.64,1.40 L68.82,0.98 L70.03,0.63 L71.25,0.35 L72.49,0.16 L73.74,0.04 L75.00,0.00 L76.26,0.04 L77.51,0.16 L78.75,0.35 L79.97,0.63 L81.18,0.98 L82.36,1.40 L83.52,1.90 L84.64,2.47 L85.72,3.11 L86.76,3.82 L87.75,4.59 L88.69,5.42 L89.58,6.31 L90.41,7.25 L91.18,8.24 L91.89,9.28 L92.53,10.36 L93.10,11.48 L93.60,12.64 L94.02,13.82 L94.37,15.03 L94.65,16.25 L94.84,17.49 L94.96,18.74 Z"]
+          RenderPath {circle} at (114,82) size 84x84 [fill={[type=SOLID] [color=#FFFFFF]}] [data="M95.00,60.00 L94.96,61.26 L94.84,62.51 L94.65,63.75 L94.37,64.97 L94.02,66.18 L93.60,67.36 L93.10,68.52 L92.53,69.64 L91.89,70.72 L91.18,71.76 L90.41,72.75 L89.58,73.69 L88.69,74.58 L87.75,75.41 L86.76,76.18 L85.72,76.89 L84.64,77.53 L83.52,78.10 L82.36,78.60 L81.18,79.02 L79.97,79.37 L78.75,79.65 L77.51,79.84 L76.26,79.96 L75.00,80.00 L73.74,79.96 L72.49,79.84 L71.25,79.65 L70.03,79.37 L68.82,79.02 L67.64,78.60 L66.48,78.10 L65.36,77.53 L64.28,76.89 L63.24,76.18 L62.25,75.41 L61.31,74.58 L60.42,73.69 L59.59,72.75 L58.82,71.76 L58.11,70.72 L57.47,69.64 L56.90,68.52 L56.40,67.36 L55.98,66.18 L55.63,64.97 L55.35,63.75 L55.16,62.51 L55.04,61.26 L55.00,60.00 L55.04,58.74 L55.16,57.49 L55.35,56.25 L55.63,55.03 L55.98,53.82 L56.40,52.64 L56.90,51.48 L57.47,50.36 L58.11,49.28 L58.82,48.24 L59.59,47.25 L60.42,46.31 L61.31,45.42 L62.25,44.59 L63.24,43.82 L64.28,43.11 L65.36,42.47 L66.48,41.90 L67.64,41.40 L68.82,40.98 L70.03,40.63 L71.25,40.35 L72.49,40.16 L73.74,40.04 L75.00,40.00 L76.26,40.04 L77.51,40.16 L78.75,40.35 L79.97,40.63 L81.18,40.98 L82.36,41.40 L83.52,41.90 L84.64,42.47 L85.72,43.11 L86.76,43.82 L87.75,44.59 L88.69,45.42 L89.58,46.31 L90.41,47.25 L91.18,48.24 L91.89,49.28 L92.53,50.36 L93.10,51.48 L93.60,52.64 L94.02,53.82 L94.37,55.03 L94.65,56.25 L94.84,57.49 L94.96,58.74 Z"]
+        RenderSVGResourceMasker {mask} [id="mask_3"] [maskUnits=userSpaceOnUse] [maskContentUnits=userSpaceOnUse]
+          RenderPath {circle} at (10,0) size 84x83 [fill={[type=SOLID] [color=#FFFFFF]}] [data="M45.00,20.00 L44.96,21.26 L44.84,22.51 L44.65,23.75 L44.37,24.97 L44.02,26.18 L43.60,27.36 L43.10,28.52 L42.53,29.64 L41.89,30.72 L41.18,31.76 L40.41,32.75 L39.58,33.69 L38.69,34.58 L37.75,35.41 L36.76,36.18 L35.72,36.89 L34.64,37.53 L33.52,38.10 L32.36,38.60 L31.18,39.02 L29.97,39.37 L28.75,39.65 L27.51,39.84 L26.26,39.96 L25.00,40.00 L23.74,39.96 L22.49,39.84 L21.25,39.65 L20.03,39.37 L18.82,39.02 L17.64,38.60 L16.48,38.10 L15.36,37.53 L14.28,36.89 L13.24,36.18 L12.25,35.41 L11.31,34.58 L10.42,33.69 L9.59,32.75 L8.82,31.76 L8.11,30.72 L7.47,29.64 L6.90,28.52 L6.40,27.36 L5.98,26.18 L5.63,24.97 L5.35,23.75 L5.16,22.51 L5.04,21.26 L5.00,20.00 L5.04,18.74 L5.16,17.49 L5.35,16.25 L5.63,15.03 L5.98,13.82 L6.40,12.64 L6.90,11.48 L7.47,10.36 L8.11,9.28 L8.82,8.24 L9.59,7.25 L10.42,6.31 L11.31,5.42 L12.25,4.59 L13.24,3.82 L14.28,3.11 L15.36,2.47 L16.48,1.90 L17.64,1.40 L18.82,0.98 L20.03,0.63 L21.25,0.35 L22.49,0.16 L23.74,0.04 L25.00,0.00 L26.26,0.04 L27.51,0.16 L28.75,0.35 L29.97,0.63 L31.18,0.98 L32.36,1.40 L33.52,1.90 L34.64,2.47 L35.72,3.11 L36.76,3.82 L37.75,4.59 L38.69,5.42 L39.58,6.31 L40.41,7.25 L41.18,8.24 L41.89,9.28 L42.53,10.36 L43.10,11.48 L43.60,12.64 L44.02,13.82 L44.37,15.03 L44.65,16.25 L44.84,17.49 L44.96,18.74 Z"]
+          RenderPath {circle} at (10,82) size 84x84 [fill={[type=SOLID] [color=#FFFFFF]}] [data="M45.00,60.00 L44.96,61.26 L44.84,62.51 L44.65,63.75 L44.37,64.97 L44.02,66.18 L43.60,67.36 L43.10,68.52 L42.53,69.64 L41.89,70.72 L41.18,71.76 L40.41,72.75 L39.58,73.69 L38.69,74.58 L37.75,75.41 L36.76,76.18 L35.72,76.89 L34.64,77.53 L33.52,78.10 L32.36,78.60 L31.18,79.02 L29.97,79.37 L28.75,79.65 L27.51,79.84 L26.26,79.96 L25.00,80.00 L23.74,79.96 L22.49,79.84 L21.25,79.65 L20.03,79.37 L18.82,79.02 L17.64,78.60 L16.48,78.10 L15.36,77.53 L14.28,76.89 L13.24,76.18 L12.25,75.41 L11.31,74.58 L10.42,73.69 L9.59,72.75 L8.82,71.76 L8.11,70.72 L7.47,69.64 L6.90,68.52 L6.40,67.36 L5.98,66.18 L5.63,64.97 L5.35,63.75 L5.16,62.51 L5.04,61.26 L5.00,60.00 L5.04,58.74 L5.16,57.49 L5.35,56.25 L5.63,55.03 L5.98,53.82 L6.40,52.64 L6.90,51.48 L7.47,50.36 L8.11,49.28 L8.82,48.24 L9.59,47.25 L10.42,46.31 L11.31,45.42 L12.25,44.59 L13.24,43.82 L14.28,43.11 L15.36,42.47 L16.48,41.90 L17.64,41.40 L18.82,40.98 L20.03,40.63 L21.25,40.35 L22.49,40.16 L23.74,40.04 L25.00,40.00 L26.26,40.04 L27.51,40.16 L28.75,40.35 L29.97,40.63 L31.18,40.98 L32.36,41.40 L33.52,41.90 L34.64,42.47 L35.72,43.11 L36.76,43.82 L37.75,44.59 L38.69,45.42 L39.58,46.31 L40.41,47.25 L41.18,48.24 L41.89,49.28 L42.53,50.36 L43.10,51.48 L43.60,52.64 L44.02,53.82 L44.37,55.03 L44.65,56.25 L44.84,57.49 L44.96,58.74 Z"]
+          RenderPath {circle} at (114,0) size 84x83 [fill={[type=SOLID] [color=#FFFFFF]}] [data="M95.00,20.00 L94.96,21.26 L94.84,22.51 L94.65,23.75 L94.37,24.97 L94.02,26.18 L93.60,27.36 L93.10,28.52 L92.53,29.64 L91.89,30.72 L91.18,31.76 L90.41,32.75 L89.58,33.69 L88.69,34.58 L87.75,35.41 L86.76,36.18 L85.72,36.89 L84.64,37.53 L83.52,38.10 L82.36,38.60 L81.18,39.02 L79.97,39.37 L78.75,39.65 L77.51,39.84 L76.26,39.96 L75.00,40.00 L73.74,39.96 L72.49,39.84 L71.25,39.65 L70.03,39.37 L68.82,39.02 L67.64,38.60 L66.48,38.10 L65.36,37.53 L64.28,36.89 L63.24,36.18 L62.25,35.41 L61.31,34.58 L60.42,33.69 L59.59,32.75 L58.82,31.76 L58.11,30.72 L57.47,29.64 L56.90,28.52 L56.40,27.36 L55.98,26.18 L55.63,24.97 L55.35,23.75 L55.16,22.51 L55.04,21.26 L55.00,20.00 L55.04,18.74 L55.16,17.49 L55.35,16.25 L55.63,15.03 L55.98,13.82 L56.40,12.64 L56.90,11.48 L57.47,10.36 L58.11,9.28 L58.82,8.24 L59.59,7.25 L60.42,6.31 L61.31,5.42 L62.25,4.59 L63.24,3.82 L64.28,3.11 L65.36,2.47 L66.48,1.90 L67.64,1.40 L68.82,0.98 L70.03,0.63 L71.25,0.35 L72.49,0.16 L73.74,0.04 L75.00,0.00 L76.26,0.04 L77.51,0.16 L78.75,0.35 L79.97,0.63 L81.18,0.98 L82.36,1.40 L83.52,1.90 L84.64,2.47 L85.72,3.11 L86.76,3.82 L87.75,4.59 L88.69,5.42 L89.58,6.31 L90.41,7.25 L91.18,8.24 L91.89,9.28 L92.53,10.36 L93.10,11.48 L93.60,12.64 L94.02,13.82 L94.37,15.03 L94.65,16.25 L94.84,17.49 L94.96,18.74 Z"]
+          RenderPath {circle} at (114,82) size 84x84 [fill={[type=SOLID] [color=#FFFFFF]}] [data="M95.00,60.00 L94.96,61.26 L94.84,62.51 L94.65,63.75 L94.37,64.97 L94.02,66.18 L93.60,67.36 L93.10,68.52 L92.53,69.64 L91.89,70.72 L91.18,71.76 L90.41,72.75 L89.58,73.69 L88.69,74.58 L87.75,75.41 L86.76,76.18 L85.72,76.89 L84.64,77.53 L83.52,78.10 L82.36,78.60 L81.18,79.02 L79.97,79.37 L78.75,79.65 L77.51,79.84 L76.26,79.96 L75.00,80.00 L73.74,79.96 L72.49,79.84 L71.25,79.65 L70.03,79.37 L68.82,79.02 L67.64,78.60 L66.48,78.10 L65.36,77.53 L64.28,76.89 L63.24,76.18 L62.25,75.41 L61.31,74.58 L60.42,73.69 L59.59,72.75 L58.82,71.76 L58.11,70.72 L57.47,69.64 L56.90,68.52 L56.40,67.36 L55.98,66.18 L55.63,64.97 L55.35,63.75 L55.16,62.51 L55.04,61.26 L55.00,60.00 L55.04,58.74 L55.16,57.49 L55.35,56.25 L55.63,55.03 L55.98,53.82 L56.40,52.64 L56.90,51.48 L57.47,50.36 L58.11,49.28 L58.82,48.24 L59.59,47.25 L60.42,46.31 L61.31,45.42 L62.25,44.59 L63.24,43.82 L64.28,43.11 L65.36,42.47 L66.48,41.90 L67.64,41.40 L68.82,40.98 L70.03,40.63 L71.25,40.35 L72.49,40.16 L73.74,40.04 L75.00,40.00 L76.26,40.04 L77.51,40.16 L78.75,40.35 L79.97,40.63 L81.18,40.98 L82.36,41.40 L83.52,41.90 L84.64,42.47 L85.72,43.11 L86.76,43.82 L87.75,44.59 L88.69,45.42 L89.58,46.31 L90.41,47.25 L91.18,48.24 L91.89,49.28 L92.53,50.36 L93.10,51.48 L93.60,52.64 L94.02,53.82 L94.37,55.03 L94.65,56.25 L94.84,57.49 L94.96,58.74 Z"]
+        RenderSVGResourceMasker {mask} [id="mask_4"] [maskUnits=objectBoundingBox] [maskContentUnits=objectBoundingBox]
+          RenderPath {circle} at (0,0) size 3x3 [fill={[type=SOLID] [color=#FFFFFF]}] [data="M0.45,0.20 L0.45,0.21 L0.45,0.23 L0.45,0.24 L0.44,0.25 L0.44,0.26 L0.44,0.27 L0.43,0.29 L0.43,0.30 L0.42,0.31 L0.41,0.32 L0.40,0.33 L0.40,0.34 L0.39,0.35 L0.38,0.35 L0.37,0.36 L0.36,0.37 L0.35,0.38 L0.34,0.38 L0.32,0.39 L0.31,0.39 L0.30,0.39 L0.29,0.40 L0.28,0.40 L0.26,0.40 L0.25,0.40 L0.24,0.40 L0.22,0.40 L0.21,0.40 L0.20,0.39 L0.19,0.39 L0.18,0.39 L0.16,0.38 L0.15,0.38 L0.14,0.37 L0.13,0.36 L0.12,0.35 L0.11,0.35 L0.10,0.34 L0.10,0.33 L0.09,0.32 L0.08,0.31 L0.07,0.30 L0.07,0.29 L0.06,0.27 L0.06,0.26 L0.06,0.25 L0.05,0.24 L0.05,0.23 L0.05,0.21 L0.05,0.20 L0.05,0.19 L0.05,0.17 L0.05,0.16 L0.06,0.15 L0.06,0.14 L0.06,0.13 L0.07,0.11 L0.07,0.10 L0.08,0.09 L0.09,0.08 L0.10,0.07 L0.10,0.06 L0.11,0.05 L0.12,0.05 L0.13,0.04 L0.14,0.03 L0.15,0.02 L0.16,0.02 L0.18,0.01 L0.19,0.01 L0.20,0.01 L0.21,0.00 L0.22,0.00 L0.24,0.00 L0.25,0.00 L0.26,0.00 L0.28,0.00 L0.29,0.00 L0.30,0.01 L0.31,0.01 L0.32,0.01 L0.34,0.02 L0.35,0.02 L0.36,0.03 L0.37,0.04 L0.38,0.05 L0.39,0.05 L0.40,0.06 L0.40,0.07 L0.41,0.08 L0.42,0.09 L0.43,0.10 L0.43,0.11 L0.44,0.13 L0.44,0.14 L0.44,0.15 L0.45,0.16 L0.45,0.17 L0.45,0.19 Z"]
+          RenderPath {circle} at (0,0) size 3x3 [fill={[type=SOLID] [color=#FFFFFF]}] [data="M0.45,0.60 L0.45,0.61 L0.45,0.63 L0.45,0.64 L0.44,0.65 L0.44,0.66 L0.44,0.67 L0.43,0.69 L0.43,0.70 L0.42,0.71 L0.41,0.72 L0.40,0.73 L0.40,0.74 L0.39,0.75 L0.38,0.75 L0.37,0.76 L0.36,0.77 L0.35,0.78 L0.34,0.78 L0.32,0.79 L0.31,0.79 L0.30,0.79 L0.29,0.80 L0.28,0.80 L0.26,0.80 L0.25,0.80 L0.24,0.80 L0.22,0.80 L0.21,0.80 L0.20,0.79 L0.19,0.79 L0.18,0.79 L0.16,0.78 L0.15,0.78 L0.14,0.77 L0.13,0.76 L0.12,0.75 L0.11,0.75 L0.10,0.74 L0.10,0.73 L0.09,0.72 L0.08,0.71 L0.07,0.70 L0.07,0.69 L0.06,0.67 L0.06,0.66 L0.06,0.65 L0.05,0.64 L0.05,0.63 L0.05,0.61 L0.05,0.60 L0.05,0.59 L0.05,0.57 L0.05,0.56 L0.06,0.55 L0.06,0.54 L0.06,0.53 L0.07,0.51 L0.07,0.50 L0.08,0.49 L0.09,0.48 L0.10,0.47 L0.10,0.46 L0.11,0.45 L0.12,0.45 L0.13,0.44 L0.14,0.43 L0.15,0.42 L0.16,0.42 L0.18,0.41 L0.19,0.41 L0.20,0.41 L0.21,0.40 L0.22,0.40 L0.24,0.40 L0.25,0.40 L0.26,0.40 L0.28,0.40 L0.29,0.40 L0.30,0.41 L0.31,0.41 L0.32,0.41 L0.34,0.42 L0.35,0.42 L0.36,0.43 L0.37,0.44 L0.38,0.45 L0.39,0.45 L0.40,0.46 L0.40,0.47 L0.41,0.48 L0.42,0.49 L0.43,0.50 L0.43,0.51 L0.44,0.53 L0.44,0.54 L0.44,0.55 L0.45,0.56 L0.45,0.57 L0.45,0.59 Z"]
+          RenderPath {circle} at (0,0) size 3x3 [fill={[type=SOLID] [color=#FFFFFF]}] [data="M0.95,0.20 L0.95,0.21 L0.95,0.23 L0.95,0.24 L0.94,0.25 L0.94,0.26 L0.94,0.27 L0.93,0.29 L0.93,0.30 L0.92,0.31 L0.91,0.32 L0.90,0.33 L0.90,0.34 L0.89,0.35 L0.88,0.35 L0.87,0.36 L0.86,0.37 L0.85,0.38 L0.84,0.38 L0.82,0.39 L0.81,0.39 L0.80,0.39 L0.79,0.40 L0.78,0.40 L0.76,0.40 L0.75,0.40 L0.74,0.40 L0.72,0.40 L0.71,0.40 L0.70,0.39 L0.69,0.39 L0.68,0.39 L0.66,0.38 L0.65,0.38 L0.64,0.37 L0.63,0.36 L0.62,0.35 L0.61,0.35 L0.60,0.34 L0.60,0.33 L0.59,0.32 L0.58,0.31 L0.57,0.30 L0.57,0.29 L0.56,0.27 L0.56,0.26 L0.56,0.25 L0.55,0.24 L0.55,0.23 L0.55,0.21 L0.55,0.20 L0.55,0.19 L0.55,0.17 L0.55,0.16 L0.56,0.15 L0.56,0.14 L0.56,0.13 L0.57,0.11 L0.57,0.10 L0.58,0.09 L0.59,0.08 L0.60,0.07 L0.60,0.06 L0.61,0.05 L0.62,0.05 L0.63,0.04 L0.64,0.03 L0.65,0.02 L0.66,0.02 L0.68,0.01 L0.69,0.01 L0.70,0.01 L0.71,0.00 L0.72,0.00 L0.74,0.00 L0.75,0.00 L0.76,0.00 L0.78,0.00 L0.79,0.00 L0.80,0.01 L0.81,0.01 L0.82,0.01 L0.84,0.02 L0.85,0.02 L0.86,0.03 L0.87,0.04 L0.88,0.05 L0.89,0.05 L0.90,0.06 L0.90,0.07 L0.91,0.08 L0.92,0.09 L0.93,0.10 L0.93,0.11 L0.94,0.13 L0.94,0.14 L0.94,0.15 L0.95,0.16 L0.95,0.17 L0.95,0.19 Z"]
+          RenderPath {circle} at (0,0) size 3x3 [fill={[type=SOLID] [color=#FFFFFF]}] [data="M0.95,0.60 L0.95,0.61 L0.95,0.63 L0.95,0.64 L0.94,0.65 L0.94,0.66 L0.94,0.67 L0.93,0.69 L0.93,0.70 L0.92,0.71 L0.91,0.72 L0.90,0.73 L0.90,0.74 L0.89,0.75 L0.88,0.75 L0.87,0.76 L0.86,0.77 L0.85,0.78 L0.84,0.78 L0.82,0.79 L0.81,0.79 L0.80,0.79 L0.79,0.80 L0.78,0.80 L0.76,0.80 L0.75,0.80 L0.74,0.80 L0.72,0.80 L0.71,0.80 L0.70,0.79 L0.69,0.79 L0.68,0.79 L0.66,0.78 L0.65,0.78 L0.64,0.77 L0.63,0.76 L0.62,0.75 L0.61,0.75 L0.60,0.74 L0.60,0.73 L0.59,0.72 L0.58,0.71 L0.57,0.70 L0.57,0.69 L0.56,0.67 L0.56,0.66 L0.56,0.65 L0.55,0.64 L0.55,0.63 L0.55,0.61 L0.55,0.60 L0.55,0.59 L0.55,0.57 L0.55,0.56 L0.56,0.55 L0.56,0.54 L0.56,0.53 L0.57,0.51 L0.57,0.50 L0.58,0.49 L0.59,0.48 L0.60,0.47 L0.60,0.46 L0.61,0.45 L0.62,0.45 L0.63,0.44 L0.64,0.43 L0.65,0.42 L0.66,0.42 L0.68,0.41 L0.69,0.41 L0.70,0.41 L0.71,0.40 L0.72,0.40 L0.74,0.40 L0.75,0.40 L0.76,0.40 L0.78,0.40 L0.79,0.40 L0.80,0.41 L0.81,0.41 L0.82,0.41 L0.84,0.42 L0.85,0.42 L0.86,0.43 L0.87,0.44 L0.88,0.45 L0.89,0.45 L0.90,0.46 L0.90,0.47 L0.91,0.48 L0.92,0.49 L0.93,0.50 L0.93,0.51 L0.94,0.53 L0.94,0.54 L0.94,0.55 L0.95,0.56 L0.95,0.57 L0.95,0.59 Z"]
+      RenderSVGContainer {g} at (362,171) size 209x202 [transform={m=((1.00,0.00)(0.00,1.00)) t=(175.00,100.00)}]
+        RenderSVGContainer {use} at (362,207) size 209x166
+          RenderSVGContainer {g} at (362,207) size 209x166
+            RenderPath {rect} at (362,207) size 209x166 [fill={[type=LINEAR-GRADIENT] [id="maskedGradient"]}] [data="M0.00,0.00 L100.00,0.00 L100.00,80.00 L0.00,80.00 Z"]
+        RenderSVGText {text} at (25,-17) size 50x18 contains 1 chunk(s)
+          RenderSVGInlineText {#text} at (0,0) size 50x18
+            chunk 1 (middle anchor) text run 1 at (25.00,-3.00) startOffset 0 endOffset 6 width 50.00: "Masked"
+      RenderSVGContainer {g} at (186,420) size 188x202 [transform={m=((1.00,0.00)(0.00,1.00)) t=(85.00,220.00)}]
+        RenderSVGContainer {use} at (186,455) size 188x167
+          [masker="mask_1"] RenderSVGResourceMasker {mask} at (5,0) size 90x80
+          RenderSVGContainer {g} at (176,455) size 208x167
+            RenderPath {rect} at (176,455) size 208x167 [fill={[type=LINEAR-GRADIENT] [id="maskedGradient"]}] [data="M0.00,0.00 L100.00,0.00 L100.00,80.00 L0.00,80.00 Z"]
+        RenderSVGText {text} at (26,-17) size 48x18 contains 1 chunk(s)
+          RenderSVGInlineText {#text} at (0,0) size 48x18
+            chunk 1 (middle anchor) text run 1 at (26.50,-3.00) startOffset 0 endOffset 6 width 47.00: "Mask 1"
+      RenderSVGContainer {g} at (228,669) size 104x160 [transform={m=((1.00,0.00)(0.00,1.00)) t=(85.00,340.00)}]
+        RenderSVGContainer {use} at (228,745) size 104x84
+          [masker="mask_2"] RenderSVGResourceMasker {mask} at (25,20) size 50x40
+          RenderSVGContainer {g} at (176,704) size 208x167
+            RenderPath {rect} at (176,704) size 208x167 [fill={[type=LINEAR-GRADIENT] [id="maskedGradient"]}] [data="M0.00,0.00 L100.00,0.00 L100.00,80.00 L0.00,80.00 Z"]
+        RenderSVGText {text} at (26,-17) size 48x18 contains 1 chunk(s)
+          RenderSVGInlineText {#text} at (0,0) size 48x18
+            chunk 1 (middle anchor) text run 1 at (26.50,-3.00) startOffset 0 endOffset 6 width 47.00: "Mask 2"
+      RenderSVGContainer {g} at (590,420) size 105x161 [transform={m=((1.00,0.00)(0.00,1.00)) t=(260.00,220.00)}]
+        RenderSVGContainer {use} at (590,497) size 105x84
+          [masker="mask_3"] RenderSVGResourceMasker {mask} at (25,20) size 50x40
+          RenderSVGContainer {g} at (539,455) size 208x167
+            RenderPath {rect} at (539,455) size 208x167 [fill={[type=LINEAR-GRADIENT] [id="maskedGradient"]}] [data="M0.00,0.00 L100.00,0.00 L100.00,80.00 L0.00,80.00 Z"]
+        RenderSVGText {text} at (26,-17) size 48x18 contains 1 chunk(s)
+          RenderSVGInlineText {#text} at (0,0) size 48x18
+            chunk 1 (middle anchor) text run 1 at (26.50,-3.00) startOffset 0 endOffset 6 width 47.00: "Mask 3"
+      RenderSVGContainer {g} at (547,669) size 189x169 [transform={m=((1.00,0.00)(0.00,1.00)) t=(260.00,340.00)}]
+        RenderSVGContainer {use} at (547,704) size 189x134
+          [masker="mask_4"] RenderSVGResourceMasker {mask} at (5.00,0) size 90x64
+          RenderSVGContainer {g} at (539,704) size 208x167
+            RenderPath {rect} at (539,704) size 208x167 [fill={[type=LINEAR-GRADIENT] [id="maskedGradient"]}] [data="M0.00,0.00 L100.00,0.00 L100.00,80.00 L0.00,80.00 Z"]
+        RenderSVGText {text} at (26,-17) size 48x18 contains 1 chunk(s)
+          RenderSVGInlineText {#text} at (0,0) size 48x18
+            chunk 1 (middle anchor) text run 1 at (26.50,-3.00) startOffset 0 endOffset 6 width 47.00: "Mask 4"
+    RenderSVGHiddenContainer {defs} at (0,0) size 0x0
diff --git a/LayoutTests/svg/zoom/page/zoom-mask-with-percentages.svg b/LayoutTests/svg/zoom/page/zoom-mask-with-percentages.svg
new file mode 100644
index 0000000..5bb74f8
--- /dev/null
+++ b/LayoutTests/svg/zoom/page/zoom-mask-with-percentages.svg
@@ -0,0 +1,138 @@
+<?xml version="1.0" standalone="no"?>
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.0//EN"
+"http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd">
+
+<!--
+   Licensed to the Apache Software Foundation (ASF) under one or more
+   contributor license agreements.  See the NOTICE file distributed with
+   this work for additional information regarding copyright ownership.
+   The ASF licenses this file to You under the Apache License, Version 2.0
+   (the "License"); you may not use this file except in compliance with
+   the License.  You may obtain a copy of the License at
+   
+        http://www.apache.org/licenses/LICENSE-2.0
+   
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.
+-->
+
+<!-- ========================================================================= -->
+<!-- Validates processing of mask regions                                      -->
+<!--                                                                           -->
+<!-- @author vincent.hardy at eng.sun.com                                         -->
+<!-- @version $Id: maskRegions.svg 475477 2006-11-15 22:44:28Z cam $ -->
+<!-- ========================================================================= -->
+
+<?xml-stylesheet type="text/css" href="../resources/test.css" ?>
+
+<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" id="body" width="450" height="500" viewBox="0 0 450 500">
+<title>Mask</title>
+    <!-- ============================================================= -->
+    <!-- Test content                                                  -->
+    <!-- ============================================================= -->
+    <g id="testContent" class="legend" text-anchor="middle">
+        <text x="225" y="50" class="title">
+        Mask Regions
+        </text>
+
+        <defs>
+    
+        <!-- ======================================== -->
+        <!-- Masked object definition                 -->
+        <!-- ======================================== -->
+        <linearGradient id="maskedGradient" x1="0" x2="1" y1="0" y2="1" color-interpolation="linearRGB">
+            <stop offset="0" stop-color="blue" />
+            <stop offset="1" stop-color="red" />
+        </linearGradient>
+
+        <rect id="masked" width="100" height="80" fill="url(#maskedGradient)" />
+
+        <!-- ======================================= -->
+        <!-- maskUnits: default                      -->
+        <!-- maskContentUnits: default               -->
+        <!-- maskRegion: default (-.1, -.1, 1.2, 1.2)-->
+        <!-- ======================================= -->
+        <mask id="mask_1">
+            <circle cx="25" cy="20" r="20" fill="#ffffff" />
+            <circle cx="25" cy="60" r="20" fill="#ffffff" />
+            <circle cx="75" cy="20" r="20" fill="#ffffff" />
+            <circle cx="75" cy="60" r="20" fill="#ffffff" />
+        </mask>
+
+        <!-- ======================================= -->
+        <!-- maskUnits: objectBoundingBox            -->
+        <!-- maskContentUnits: default               -->
+        <!-- maskRegion: (.25, .25, .5, .5)          -->
+        <!-- ======================================= -->
+        <mask id="mask_2" maskUnits="objectBoundingBox"
+              x=".25" y="25%" width="50%" height=".5">
+            <circle cx="25" cy="20" r="20" fill="#ffffff" />
+            <circle cx="25" cy="60" r="20" fill="#ffffff" />
+            <circle cx="75" cy="20" r="20" fill="#ffffff" />
+            <circle cx="75" cy="60" r="20" fill="#ffffff" />
+        </mask>
+
+        <!-- ======================================= -->
+        <!-- maskUnits: userSpaceOnUse               -->
+        <!-- maskContentUnits: default               -->
+        <!-- maskRegion: (25, 25, 50, 50)            -->
+        <!-- ======================================= -->
+        <mask id="mask_3" maskUnits="userSpaceOnUse" 
+              x="25" y="20" width="11.11111111%" height="8%">
+            <circle cx="25" cy="20" r="20" fill="#ffffff" />
+            <circle cx="25" cy="60" r="20" fill="#ffffff" />
+            <circle cx="75" cy="20" r="20" fill="#ffffff" />
+            <circle cx="75" cy="60" r="20" fill="#ffffff" />
+        </mask>
+
+        <!-- ======================================= -->
+        <!-- maskUnits: objectBoundingBox            -->
+        <!-- maskContentUnits: default               -->
+        <!-- maskRegion: (25, 25, 50, 50)            -->
+        <!-- ======================================= -->
+        <mask id="mask_4" maskUnits="objectBoundingBox" 
+              maskContentUnits="objectBoundingBox"
+              x="0" y="0" width="100%" height="100%">
+            <circle cx=".25" cy=".2" r=".2" fill="#ffffff" />
+            <circle cx=".25" cy=".6" r=".2" fill="#ffffff" />
+            <circle cx=".75" cy=".2" r=".2" fill="#ffffff" />
+            <circle cx=".75" cy=".6" r=".2" fill="#ffffff" />
+        </mask>
+
+        </defs>
+
+        <g transform="translate(175, 100)">
+            <use xlink:href="#masked" />
+            <text x="50" y="-3">Masked</text>
+        </g>
+
+        <g transform="translate(85, 220)">
+            <use xlink:href="#masked" mask="url(#mask_1)"/>
+            <text x="50" y="-3">Mask 1</text>
+        </g>
+
+        <g transform="translate(85, 340)">
+            <use xlink:href="#masked" mask="url(#mask_2)"/>
+            <text x="50" y="-3">Mask 2</text>
+        </g>
+
+        <g transform="translate(260, 220)">
+            <use xlink:href="#masked" mask="url(#mask_3)"/>
+            <text x="50" y="-3">Mask 3</text>
+        </g>
+
+        <g transform="translate(260, 340)">
+            <use xlink:href="#masked" mask="url(#mask_4)"/>
+            <text x="50" y="-3">Mask 4</text>
+        </g>
+
+    </g>
+
+<defs>
+  <script>var zoomCount = 4;</script>
+  <script xlink:href="../resources/testPageZoom.js"/>
+</defs>
+</svg>
diff --git a/LayoutTests/svg/zoom/page/zoom-mask.svg b/LayoutTests/svg/zoom/page/zoom-mask.svg
new file mode 100644
index 0000000..31b6d5d
--- /dev/null
+++ b/LayoutTests/svg/zoom/page/zoom-mask.svg
@@ -0,0 +1,28 @@
+<?xml version="1.0" standalone="no"?>
+<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" id="body" width="100%" height="100%" viewBox="0 0 450 500">
+<defs>
+    <linearGradient id="maskedGradient" x1="0" x2="1" y1="0" y2="1" color-interpolation="linearRGB">
+        <stop offset="0" stop-color="blue" />
+        <stop offset="1" stop-color="red" />
+    </linearGradient>
+
+    <rect id="masked" width="100" height="80" fill="url(#maskedGradient)" />
+    
+    <mask id="mask_3" maskUnits="userSpaceOnUse" x="25" y="20" width="50" height="40">
+        <circle cx="25" cy="20" r="20" fill="#ffffff" />
+        <circle cx="25" cy="60" r="20" fill="#ffffff" />
+        <circle cx="75" cy="20" r="20" fill="#ffffff" />
+        <circle cx="75" cy="60" r="20" fill="#ffffff" />
+    </mask>
+</defs>
+
+<g transform="scale(5)">
+    <use xlink:href="#masked" mask="url(#mask_3)"/>
+    <text x="50" y="-3">Mask 3</text>
+</g>
+
+<defs>
+  <script>var zoomCount = 4;</script>
+  <script xlink:href="../resources/testPageZoom.js"/>
+</defs>
+</svg>
diff --git a/WebCore/Android.mk b/WebCore/Android.mk
index cb647d5..7c1422c 100644
--- a/WebCore/Android.mk
+++ b/WebCore/Android.mk
@@ -690,6 +690,7 @@ ifeq ($(ENABLE_SVG), true)
 LOCAL_SRC_FILES := $(LOCAL_SRC_FILES) \
 	rendering/SVGCharacterData.cpp \
 	rendering/SVGCharacterLayoutInfo.cpp \
+	rendering/SVGImageBufferTools.cpp \
 	rendering/SVGInlineFlowBox.cpp \
 	rendering/SVGInlineTextBox.cpp \
 	rendering/SVGMarkerLayoutInfo.cpp \
diff --git a/WebCore/CMakeLists.txt b/WebCore/CMakeLists.txt
index f7a2a0f..50840e1 100644
--- a/WebCore/CMakeLists.txt
+++ b/WebCore/CMakeLists.txt
@@ -1582,6 +1582,7 @@ IF (ENABLE_SVG)
         rendering/RenderSVGViewportContainer.cpp
         rendering/SVGCharacterData.cpp
         rendering/SVGCharacterLayoutInfo.cpp
+        rendering/SVGImageBufferTools.cpp
         rendering/SVGInlineFlowBox.cpp
         rendering/SVGInlineTextBox.cpp
         rendering/SVGMarkerLayoutInfo.cpp
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 3a6beff..e98e891 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,42 @@
+2010-08-12  Nikolas Zimmermann  <nzimmermann at rim.com>
+
+        Reviewed by Dirk Schulze.
+
+        SVG masking performance very slow
+        https://bugs.webkit.org/show_bug.cgi?id=43622
+
+        Create ImageBuffers only as large as the final rendered size on screen. Only gradient on text on CG handled this correctly so far.
+        Refactored the code into a new SVGImageBufferTools class, and use the code from RenderSVGResourceMasker -> makes the IE9 demo SVG dice usable.
+        Clippers, Patterns and Filters remain to be converted.
+
+        Test: svg/zoom/page/zoom-mask-with-percentages.svg
+
+        * Android.mk: Add SVGImageBufferTools.* to build.
+        * CMakeLists.txt: Ditto.
+        * GNUmakefile.am: Ditto.
+        * WebCore.gypi: Ditto.
+        * WebCore.pro: Ditto.
+        * WebCore.xcodeproj/project.pbxproj: Ditto.
+        * rendering/RenderSVGAllInOne.cpp: Ditto.
+        * rendering/RenderSVGResourceGradient.cpp: Refactored CG gradient specific "create image buffer in absolute coordinates" code into SVGImageBufferTools class.
+        (WebCore::createMaskAndSwapContextForTextGradient):
+        (WebCore::clipToTextMask):
+        (WebCore::RenderSVGResourceGradient::applyResource):
+        * rendering/RenderSVGResourceMasker.cpp: Use new SVGImageBufferTools class, to avoid pixelation when zooming and to create image buffers as big as the final rendered size on screen, not more.
+        (WebCore::RenderSVGResourceMasker::invalidateClients):
+        (WebCore::RenderSVGResourceMasker::applyResource):
+        (WebCore::RenderSVGResourceMasker::drawContentIntoMaskImage):
+        (WebCore::RenderSVGResourceMasker::calculateMaskContentRepaintRect):
+        (WebCore::RenderSVGResourceMasker::resourceBoundingBox):
+        * rendering/RenderSVGResourceMasker.h:
+        * rendering/SVGImageBufferTools.cpp: Added.
+        (WebCore::SVGImageBufferTools::absoluteTransformFromContext):
+        (WebCore::SVGImageBufferTools::createImageBuffer):
+        (WebCore::SVGImageBufferTools::clipToImageBuffer):
+        * rendering/SVGImageBufferTools.h: Added.
+        (WebCore::SVGImageBufferTools::SVGImageBufferTools):
+        (WebCore::SVGImageBufferTools::~SVGImageBufferTools):
+
 2010-08-10  Jeremy Orlow  <jorlow at chromium.org>
 
         Reviewed by Adam Barth.
diff --git a/WebCore/GNUmakefile.am b/WebCore/GNUmakefile.am
index fb08207..f8b05d0 100644
--- a/WebCore/GNUmakefile.am
+++ b/WebCore/GNUmakefile.am
@@ -3872,6 +3872,8 @@ webcore_sources += \
 	WebCore/rendering/SVGCharacterLayoutInfo.h \
 	WebCore/rendering/SVGInlineFlowBox.cpp \
 	WebCore/rendering/SVGInlineFlowBox.h \
+	WebCore/rendering/SVGImageBufferTools.cpp \
+	WebCore/rendering/SVGImageBufferTools.h \
 	WebCore/rendering/SVGInlineTextBox.cpp \
 	WebCore/rendering/SVGInlineTextBox.h \
 	WebCore/rendering/SVGMarkerData.h \
diff --git a/WebCore/WebCore.gypi b/WebCore/WebCore.gypi
index 64d9eb8..ae83d24 100644
--- a/WebCore/WebCore.gypi
+++ b/WebCore/WebCore.gypi
@@ -3446,6 +3446,8 @@
             'rendering/SVGCharacterLayoutInfo.h',
             'rendering/SVGInlineFlowBox.cpp',
             'rendering/SVGInlineFlowBox.h',
+            'rendering/SVGImageBufferTools.cpp',
+            'rendering/SVGImageBufferTools.h',
             'rendering/SVGInlineTextBox.cpp',
             'rendering/SVGInlineTextBox.h',
             'rendering/SVGMarkerData.h',
diff --git a/WebCore/WebCore.pro b/WebCore/WebCore.pro
index 23711ae..2239f42 100644
--- a/WebCore/WebCore.pro
+++ b/WebCore/WebCore.pro
@@ -1918,6 +1918,7 @@ HEADERS += \
     rendering/style/SVGRenderStyle.h \
     rendering/SVGCharacterData.h \
     rendering/SVGCharacterLayoutInfo.h \
+    rendering/SVGImageBufferTools.h \
     rendering/SVGInlineFlowBox.h \
     rendering/SVGInlineTextBox.h \
     rendering/SVGMarkerData.h \
@@ -2971,6 +2972,7 @@ contains(DEFINES, ENABLE_SVG=1) {
         rendering/RenderSVGViewportContainer.cpp \
         rendering/SVGCharacterData.cpp \
         rendering/SVGCharacterLayoutInfo.cpp \
+        rendering/SVGImageBufferTools.cpp \
         rendering/SVGInlineFlowBox.cpp \
         rendering/SVGInlineTextBox.cpp \
         rendering/SVGMarkerLayoutInfo.cpp \
diff --git a/WebCore/WebCore.xcodeproj/project.pbxproj b/WebCore/WebCore.xcodeproj/project.pbxproj
index 85383bd..6b3bd1c 100644
--- a/WebCore/WebCore.xcodeproj/project.pbxproj
+++ b/WebCore/WebCore.xcodeproj/project.pbxproj
@@ -179,6 +179,8 @@
 		08C34AF81179C057002D7456 /* RenderSVGResourceLinearGradient.h in Headers */ = {isa = PBXBuildFile; fileRef = 08C34AF41179C057002D7456 /* RenderSVGResourceLinearGradient.h */; };
 		08C34AFD1179C072002D7456 /* RenderSVGResourceRadialGradient.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 08C34AFB1179C072002D7456 /* RenderSVGResourceRadialGradient.cpp */; };
 		08C34AFE1179C072002D7456 /* RenderSVGResourceRadialGradient.h in Headers */ = {isa = PBXBuildFile; fileRef = 08C34AFC1179C072002D7456 /* RenderSVGResourceRadialGradient.h */; };
+		08C46B691212F15E0011AF40 /* SVGImageBufferTools.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 08C46B671212F15D0011AF40 /* SVGImageBufferTools.cpp */; };
+		08C46B6A1212F15E0011AF40 /* SVGImageBufferTools.h in Headers */ = {isa = PBXBuildFile; fileRef = 08C46B681212F15D0011AF40 /* SVGImageBufferTools.h */; };
 		08C4C5180EF19A4000E4840F /* WMLImageElement.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 08C4C5140EF19A4000E4840F /* WMLImageElement.cpp */; };
 		08C4C5190EF19A4000E4840F /* WMLImageElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 08C4C5150EF19A4000E4840F /* WMLImageElement.h */; };
 		08C4C51A0EF19A4000E4840F /* WMLImageLoader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 08C4C5160EF19A4000E4840F /* WMLImageLoader.cpp */; };
@@ -5886,6 +5888,8 @@
 		08C34AF41179C057002D7456 /* RenderSVGResourceLinearGradient.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RenderSVGResourceLinearGradient.h; sourceTree = "<group>"; };
 		08C34AFB1179C072002D7456 /* RenderSVGResourceRadialGradient.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = RenderSVGResourceRadialGradient.cpp; sourceTree = "<group>"; };
 		08C34AFC1179C072002D7456 /* RenderSVGResourceRadialGradient.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RenderSVGResourceRadialGradient.h; sourceTree = "<group>"; };
+		08C46B671212F15D0011AF40 /* SVGImageBufferTools.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SVGImageBufferTools.cpp; sourceTree = "<group>"; };
+		08C46B681212F15D0011AF40 /* SVGImageBufferTools.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGImageBufferTools.h; sourceTree = "<group>"; };
 		08C4C5140EF19A4000E4840F /* WMLImageElement.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WMLImageElement.cpp; sourceTree = "<group>"; };
 		08C4C5150EF19A4000E4840F /* WMLImageElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WMLImageElement.h; sourceTree = "<group>"; };
 		08C4C5160EF19A4000E4840F /* WMLImageLoader.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WMLImageLoader.cpp; sourceTree = "<group>"; };
@@ -17090,6 +17094,8 @@
 				0842BC711190144000C7D08F /* SVGCharacterData.h */,
 				B2B33A5D0B887CEF00C15984 /* SVGCharacterLayoutInfo.cpp */,
 				B2B33A5E0B887CEF00C15984 /* SVGCharacterLayoutInfo.h */,
+				08C46B671212F15D0011AF40 /* SVGImageBufferTools.cpp */,
+				08C46B681212F15D0011AF40 /* SVGImageBufferTools.h */,
 				853CA9E20AEEC608002372DC /* SVGInlineFlowBox.cpp */,
 				853CA9E30AEEC608002372DC /* SVGInlineFlowBox.h */,
 				AA0972CA0B6947A800A705E9 /* SVGInlineTextBox.cpp */,
@@ -20141,6 +20147,7 @@
 				E1BE512E0CF6C512002EA959 /* XSLTUnicodeSort.h in Headers */,
 				97DD4D870FDF4D6E00ECF9A4 /* XSSAuditor.h in Headers */,
 				CE172E011136E8CE0062A533 /* ZoomMode.h in Headers */,
+				08C46B6A1212F15E0011AF40 /* SVGImageBufferTools.h in Headers */,
 				7AB0B1C11211A62200A76940 /* InspectorStorageAgent.h in Headers */,
 				2EED575312109ED0007656BB /* BlobRegistryImpl.h in Headers */,
 				2EED575412109ED0007656BB /* BlobStorageData.h in Headers */,
@@ -22568,6 +22575,7 @@
 				93F19B0508245E59001E9ABC /* XSLTProcessorLibxslt.cpp in Sources */,
 				E1BE512D0CF6C512002EA959 /* XSLTUnicodeSort.cpp in Sources */,
 				97DD4D860FDF4D6E00ECF9A4 /* XSSAuditor.cpp in Sources */,
+				08C46B691212F15E0011AF40 /* SVGImageBufferTools.cpp in Sources */,
 				7AB0B1C01211A62200A76940 /* InspectorStorageAgent.cpp in Sources */,
 				2EED575212109ED0007656BB /* BlobRegistryImpl.cpp in Sources */,
 				2EED575512109ED0007656BB /* BlobURL.cpp in Sources */,
diff --git a/WebCore/rendering/RenderSVGAllInOne.cpp b/WebCore/rendering/RenderSVGAllInOne.cpp
index fa5709e..2d44ca2 100644
--- a/WebCore/rendering/RenderSVGAllInOne.cpp
+++ b/WebCore/rendering/RenderSVGAllInOne.cpp
@@ -53,6 +53,7 @@
 #include "RenderSVGViewportContainer.cpp"
 #include "SVGCharacterData.cpp"
 #include "SVGCharacterLayoutInfo.cpp"
+#include "SVGImageBufferTools.cpp"
 #include "SVGInlineFlowBox.cpp"
 #include "SVGInlineTextBox.cpp"
 #include "SVGMarkerLayoutInfo.cpp"
diff --git a/WebCore/rendering/RenderSVGResourceGradient.cpp b/WebCore/rendering/RenderSVGResourceGradient.cpp
index 73b2ab6..b8d953d 100644
--- a/WebCore/rendering/RenderSVGResourceGradient.cpp
+++ b/WebCore/rendering/RenderSVGResourceGradient.cpp
@@ -28,6 +28,7 @@
 
 #include "GradientAttributes.h"
 #include "GraphicsContext.h"
+#include "SVGImageBufferTools.h"
 #include "SVGRenderSupport.h"
 #include <wtf/UnusedParam.h>
 
@@ -72,59 +73,43 @@ void RenderSVGResourceGradient::invalidateClient(RenderObject* client)
 }
 
 #if PLATFORM(CG)
-static inline AffineTransform absoluteTransformFromContext(GraphicsContext* context)
-{
-    // Extract current transformation matrix used in the original context. Note that this coordinate
-    // system is flipped compared to SVGs internal coordinate system, done in WebKit level. Fix
-    // this transformation by flipping the y component.
-    return context->getCTM() * AffineTransform().flipY();
-}
-
 static inline bool createMaskAndSwapContextForTextGradient(GraphicsContext*& context,
                                                            GraphicsContext*& savedContext,
                                                            OwnPtr<ImageBuffer>& imageBuffer,
                                                            const RenderObject* object)
 {
     const RenderObject* textRootBlock = SVGRenderSupport::findTextRootObject(object);
+    ASSERT(textRootBlock);
 
-    AffineTransform transform(absoluteTransformFromContext(context));
-    FloatRect maskAbsoluteBoundingBox = transform.mapRect(textRootBlock->repaintRectInLocalCoordinates());
+    AffineTransform absoluteTransform(SVGImageBufferTools::absoluteTransformFromContext(context));
+    FloatRect absoluteTargetRect = absoluteTransform.mapRect(textRootBlock->repaintRectInLocalCoordinates());
 
-    IntRect maskImageRect = enclosingIntRect(maskAbsoluteBoundingBox);
-    if (maskImageRect.isEmpty())
+    OwnPtr<ImageBuffer> maskImage;
+    if (!SVGImageBufferTools::createImageBuffer(context, absoluteTransform, absoluteTargetRect, maskImage, DeviceRGB))
         return false;
 
-    // Allocate an image buffer as big as the absolute unclipped size of the object
-    OwnPtr<ImageBuffer> maskImage = ImageBuffer::create(maskImageRect.size());
-    if (!maskImage)
-        return false;
-
-    GraphicsContext* maskImageContext = maskImage->context();
-
-    // Transform the mask image coordinate system to absolute screen coordinates
-    maskImageContext->translate(-maskAbsoluteBoundingBox.x(), -maskAbsoluteBoundingBox.y());
-    maskImageContext->concatCTM(transform);
-
-    imageBuffer = maskImage.release();
+    ASSERT(maskImage);
     savedContext = context;
-    context = maskImageContext;
-
+    context = maskImage->context();
+    imageBuffer = maskImage.release();
     return true;
 }
 
 static inline AffineTransform clipToTextMask(GraphicsContext* context,
                                              OwnPtr<ImageBuffer>& imageBuffer,
+                                             FloatRect& repaintRect,
                                              const RenderObject* object,
                                              GradientData* gradientData)
 {
     const RenderObject* textRootBlock = SVGRenderSupport::findTextRootObject(object);
+    ASSERT(textRootBlock);
 
-    // The mask image has been created in the device coordinate space, as the image should not be scaled.
-    // So the actual masking process has to be done in the device coordinate space as well.
-    AffineTransform transform(absoluteTransformFromContext(context));
-    context->concatCTM(transform.inverse());
-    context->clipToImageBuffer(transform.mapRect(textRootBlock->repaintRectInLocalCoordinates()), imageBuffer.get());
-    context->concatCTM(transform);
+    repaintRect = textRootBlock->repaintRectInLocalCoordinates();
+
+    AffineTransform absoluteTransform(SVGImageBufferTools::absoluteTransformFromContext(context));
+    FloatRect absoluteTargetRect = absoluteTransform.mapRect(repaintRect);
+
+    SVGImageBufferTools::clipToImageBuffer(context, absoluteTransform, absoluteTargetRect, imageBuffer.get());
 
     AffineTransform matrix;
     if (gradientData->boundingBoxMode) {
@@ -232,12 +217,11 @@ void RenderSVGResourceGradient::postApplyResource(RenderObject* object, Graphics
             context = m_savedContext;
             m_savedContext = 0;
 
-            gradientData->gradient->setGradientSpaceTransform(clipToTextMask(context, m_imageBuffer, object, gradientData));
+            FloatRect repaintRect;
+            gradientData->gradient->setGradientSpaceTransform(clipToTextMask(context, m_imageBuffer, repaintRect, object, gradientData));
             context->setFillGradient(gradientData->gradient);
 
-            const RenderObject* textRootBlock = SVGRenderSupport::findTextRootObject(object);
-            context->fillRect(textRootBlock->repaintRectInLocalCoordinates());
-
+            context->fillRect(repaintRect);
             m_imageBuffer.clear();
         }
 #else
diff --git a/WebCore/rendering/RenderSVGResourceMasker.cpp b/WebCore/rendering/RenderSVGResourceMasker.cpp
index 2c36c96..1798453 100644
--- a/WebCore/rendering/RenderSVGResourceMasker.cpp
+++ b/WebCore/rendering/RenderSVGResourceMasker.cpp
@@ -35,6 +35,7 @@
 #include "IntRect.h"
 #include "RenderSVGResource.h"
 #include "SVGElement.h"
+#include "SVGImageBufferTools.h"
 #include "SVGMaskElement.h"
 #include "SVGStyledElement.h"
 #include "SVGUnitTypes.h"
@@ -61,7 +62,7 @@ RenderSVGResourceMasker::~RenderSVGResourceMasker()
 
 void RenderSVGResourceMasker::invalidateClients()
 {
-    m_maskBoundaries = FloatRect();
+    m_maskContentBoundaries = FloatRect();
     if (!m_masker.isEmpty()) {
         deleteAllValues(m_masker);
         m_masker.clear();
@@ -95,73 +96,47 @@ bool RenderSVGResourceMasker::applyResource(RenderObject* object, RenderStyle*,
         m_masker.set(object, new MaskerData);
 
     MaskerData* maskerData = m_masker.get(object);
-    if (!maskerData->maskImage && !maskerData->emptyMask) {
+
+    AffineTransform absoluteTransform(SVGImageBufferTools::absoluteTransformFromContext(context));
+    FloatRect maskRect = absoluteTransform.mapRect(object->repaintRectInLocalCoordinates());
+
+    if (!maskerData->maskImage && !maskRect.isEmpty()) {
         SVGMaskElement* maskElement = static_cast<SVGMaskElement*>(node());
         if (!maskElement)
             return false;
-        createMaskImage(maskerData, maskElement, object);
+
+        if (!SVGImageBufferTools::createImageBuffer(context, absoluteTransform, maskRect, maskerData->maskImage, LinearRGB))
+            return false;
+
+        ASSERT(maskerData->maskImage);
+        drawContentIntoMaskImage(maskRect, maskerData, maskElement, object);
     }
 
     if (!maskerData->maskImage)
         return false;
 
-    context->clipToImageBuffer(maskerData->maskRect, maskerData->maskImage.get());
+    SVGImageBufferTools::clipToImageBuffer(context, absoluteTransform, maskRect, maskerData->maskImage.get());
     return true;
 }
 
-void RenderSVGResourceMasker::createMaskImage(MaskerData* maskerData, const SVGMaskElement* maskElement, RenderObject* object)
+void RenderSVGResourceMasker::drawContentIntoMaskImage(const FloatRect& maskRect, MaskerData* maskerData, const SVGMaskElement* maskElement, RenderObject* object)
 {
-    FloatRect objectBoundingBox = object->objectBoundingBox();
-
-    // Mask rect clipped with clippingBoundingBox and filterBoundingBox as long as they are present.
-    maskerData->maskRect = object->repaintRectInLocalCoordinates();
-    if (maskerData->maskRect.isEmpty()) {
-        maskerData->emptyMask = true;
-        return;
-    }
-    
-    if (m_maskBoundaries.isEmpty())
-        calculateMaskContentRepaintRect();
+    IntRect maskImageRect = enclosingIntRect(maskRect);
+    maskImageRect.setLocation(IntPoint());
 
-    FloatRect repaintRect = m_maskBoundaries;
-    AffineTransform contextTransform;
-    // We need to scale repaintRect for objectBoundingBox to get the drawing area.
+    // Eventually adjust the mask image context according to the target objectBoundingBox.
     if (maskElement->maskContentUnits() == SVGUnitTypes::SVG_UNIT_TYPE_OBJECTBOUNDINGBOX) {
-        contextTransform.scaleNonUniform(objectBoundingBox.width(), objectBoundingBox.height());
-        FloatPoint contextAdjustment = repaintRect.location();
-        repaintRect = contextTransform.mapRect(repaintRect);
-        repaintRect.move(objectBoundingBox.x(), objectBoundingBox.y());
-        contextTransform.translate(-contextAdjustment.x(), -contextAdjustment.y());
-    }
-    repaintRect.intersect(maskerData->maskRect);
-    maskerData->maskRect = repaintRect;
-    IntRect maskImageRect = enclosingIntRect(maskerData->maskRect);
-
-    maskImageRect.setLocation(IntPoint());
+        GraphicsContext* maskImageContext = maskerData->maskImage->context();
+        ASSERT(maskImageContext);
 
-    // Don't create ImageBuffers with image size of 0
-    if (maskImageRect.isEmpty()) {
-        maskerData->emptyMask = true;
-        return;
+        FloatRect objectBoundingBox = object->objectBoundingBox();
+        AffineTransform contextTransform;
+        contextTransform.translate(objectBoundingBox.x(), objectBoundingBox.y());
+        contextTransform.scaleNonUniform(objectBoundingBox.width(), objectBoundingBox.height());
+        maskImageContext->concatCTM(contextTransform);
     }
 
-    // FIXME: This changes color space to linearRGB, the default color space
-    // for masking operations in SVG. We need a switch for the other color-space
-    // attribute values sRGB, inherit and auto.
-    maskerData->maskImage = ImageBuffer::create(maskImageRect.size(), LinearRGB);
-    if (!maskerData->maskImage)
-        return;
-
-    GraphicsContext* maskImageContext = maskerData->maskImage->context();
-    ASSERT(maskImageContext);
-
-    maskImageContext->save();
-
-    if (maskElement->maskContentUnits() == SVGUnitTypes::SVG_UNIT_TYPE_USERSPACEONUSE)
-        maskImageContext->translate(-maskerData->maskRect.x(), -maskerData->maskRect.y());
-    maskImageContext->concatCTM(contextTransform);
-
-    // draw the content into the ImageBuffer
+    // Draw the content into the ImageBuffer.
     for (Node* node = maskElement->firstChild(); node; node = node->nextSibling()) {
         RenderObject* renderer = node->renderer();
         if (!node->isSVGElement() || !static_cast<SVGElement*>(node)->isStyled() || !renderer)
@@ -172,8 +147,6 @@ void RenderSVGResourceMasker::createMaskImage(MaskerData* maskerData, const SVGM
         SVGRenderSupport::renderSubtreeToImage(maskerData->maskImage.get(), renderer);
     }
 
-    maskImageContext->restore();
-
 #if !PLATFORM(CG)
     maskerData->maskImage->transformColorSpace(DeviceRGB, LinearRGB);
 #endif
@@ -206,31 +179,31 @@ void RenderSVGResourceMasker::calculateMaskContentRepaintRect()
         RenderStyle* style = renderer->style();
         if (!style || style->display() == NONE || style->visibility() != VISIBLE)
              continue;
-        m_maskBoundaries.unite(renderer->localToParentTransform().mapRect(renderer->repaintRectInLocalCoordinates()));
+        m_maskContentBoundaries.unite(renderer->localToParentTransform().mapRect(renderer->repaintRectInLocalCoordinates()));
     }
 }
 
 FloatRect RenderSVGResourceMasker::resourceBoundingBox(RenderObject* object)
 {
-    // Resource was not layouted yet. Give back clipping rect of the mask.
     SVGMaskElement* maskElement = static_cast<SVGMaskElement*>(node());
+    ASSERT(maskElement);
+
     FloatRect objectBoundingBox = object->objectBoundingBox();
     FloatRect maskBoundaries = maskElement->maskBoundingBox(objectBoundingBox);
+
+    // Resource was not layouted yet. Give back clipping rect of the mask.
     if (selfNeedsLayout())
         return maskBoundaries;
 
-    if (m_maskBoundaries.isEmpty())
+    if (m_maskContentBoundaries.isEmpty())
         calculateMaskContentRepaintRect();
 
-    if (!maskElement)
-        return FloatRect();
-
-    FloatRect maskRect = m_maskBoundaries;
+    FloatRect maskRect = m_maskContentBoundaries;
     if (maskElement->maskContentUnits() == SVGUnitTypes::SVG_UNIT_TYPE_OBJECTBOUNDINGBOX) {
         AffineTransform transform;
         transform.translate(objectBoundingBox.x(), objectBoundingBox.y());
         transform.scaleNonUniform(objectBoundingBox.width(), objectBoundingBox.height());
-        maskRect =  transform.mapRect(maskRect);
+        maskRect = transform.mapRect(maskRect);
     }
 
     maskRect.intersect(maskBoundaries);
diff --git a/WebCore/rendering/RenderSVGResourceMasker.h b/WebCore/rendering/RenderSVGResourceMasker.h
index f6301cb..ab90ce9 100644
--- a/WebCore/rendering/RenderSVGResourceMasker.h
+++ b/WebCore/rendering/RenderSVGResourceMasker.h
@@ -36,14 +36,7 @@
 namespace WebCore {
 
 struct MaskerData {
-    MaskerData()
-        : emptyMask(false)
-    {
-    }
-
     OwnPtr<ImageBuffer> maskImage;
-    FloatRect maskRect;
-    bool emptyMask;
 };
 
 class RenderSVGResourceMasker : public RenderSVGResourceContainer {
@@ -66,10 +59,10 @@ public:
     static RenderSVGResourceType s_resourceType;
 
 private:
-    void createMaskImage(MaskerData*, const SVGMaskElement*, RenderObject*);
+    void drawContentIntoMaskImage(const FloatRect& maskRect, MaskerData*, const SVGMaskElement*, RenderObject*);
     void calculateMaskContentRepaintRect();
 
-    FloatRect m_maskBoundaries;
+    FloatRect m_maskContentBoundaries;
     HashMap<RenderObject*, MaskerData*> m_masker;
 };
 
diff --git a/WebCore/rendering/SVGImageBufferTools.cpp b/WebCore/rendering/SVGImageBufferTools.cpp
new file mode 100644
index 0000000..04cf6c4
--- /dev/null
+++ b/WebCore/rendering/SVGImageBufferTools.cpp
@@ -0,0 +1,75 @@
+/*
+    Copyright (C) Research In Motion Limited 2010. All rights reserved.
+
+    This library is free software; you can redistribute it and/or
+    modify it under the terms of the GNU Library General Public
+    License as published by the Free Software Foundation; either
+    version 2 of the License, or (at your option) any later version.
+
+    This library is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+    Library General Public License for more details.
+
+    You should have received a copy of the GNU Library General Public License
+    along with this library; see the file COPYING.LIB.  If not, write to
+    the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+    Boston, MA 02110-1301, USA.
+*/
+
+#include "config.h"
+
+#if ENABLE(SVG)
+#include "SVGImageBufferTools.h"
+
+#include "GraphicsContext.h"
+#include "RenderObject.h"
+
+namespace WebCore {
+
+AffineTransform SVGImageBufferTools::absoluteTransformFromContext(GraphicsContext* context)
+{
+    // Extract current transformation matrix used in the original context. Note that this coordinate
+    // system is flipped compared to SVGs internal coordinate system, done in WebKit level. Fix
+    // this transformation by flipping the y component.
+    return context->getCTM() * AffineTransform().flipY();
+}
+
+bool SVGImageBufferTools::createImageBuffer(GraphicsContext* context, const AffineTransform& absoluteTransform, const FloatRect& absoluteTargetRect, OwnPtr<ImageBuffer>& imageBuffer, ImageColorSpace colorSpace)
+{
+    ASSERT(context);
+
+    IntRect imageRect = enclosingIntRect(absoluteTargetRect);
+    if (imageRect.isEmpty())
+        return false;
+
+    // Allocate an image buffer as big as the absolute unclipped size of the object
+    OwnPtr<ImageBuffer> image = ImageBuffer::create(imageRect.size(), colorSpace);
+    if (!image)
+        return false;
+
+    GraphicsContext* imageContext = image->context();
+
+    // Transform the mask image coordinate system to absolute screen coordinates
+    imageContext->translate(-absoluteTargetRect.x(), -absoluteTargetRect.y());
+    imageContext->concatCTM(absoluteTransform);
+
+    imageBuffer = image.release();
+    return true;
+}
+
+void SVGImageBufferTools::clipToImageBuffer(GraphicsContext* context, const AffineTransform& absoluteTransform, const FloatRect& absoluteTargetRect, ImageBuffer* imageBuffer)
+{
+    ASSERT(context);
+    ASSERT(imageBuffer);
+
+    // The mask image has been created in the device coordinate space, as the image should not be scaled.
+    // So the actual masking process has to be done in the device coordinate space as well.
+    context->concatCTM(absoluteTransform.inverse());
+    context->clipToImageBuffer(absoluteTargetRect, imageBuffer);
+    context->concatCTM(absoluteTransform);
+}
+
+}
+
+#endif // ENABLE(SVG)
diff --git a/WebCore/rendering/SVGImageBufferTools.h b/WebCore/rendering/SVGImageBufferTools.h
new file mode 100644
index 0000000..ed29c06
--- /dev/null
+++ b/WebCore/rendering/SVGImageBufferTools.h
@@ -0,0 +1,49 @@
+/*
+    Copyright (C) Research In Motion Limited 2010. All rights reserved.
+
+    This library is free software; you can redistribute it and/or
+    modify it under the terms of the GNU Library General Public
+    License as published by the Free Software Foundation; either
+    version 2 of the License, or (at your option) any later version.
+
+    This library is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+    Library General Public License for more details.
+
+    You should have received a copy of the GNU Library General Public License
+    aint with this library; see the file COPYING.LIB.  If not, write to
+    the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+    Boston, MA 02110-1301, USA.
+*/
+
+#ifndef SVGImageBufferTools_h
+#define SVGImageBufferTools_h
+
+#if ENABLE(SVG)
+#include "ImageBuffer.h"
+#include <wtf/Noncopyable.h>
+
+namespace WebCore {
+
+class AffineTransform;
+class FloatRect;
+class GraphicsContext;
+class RenderObject;
+
+class SVGImageBufferTools : public Noncopyable {
+public:
+    static bool createImageBuffer(GraphicsContext*, const AffineTransform& absoluteTransform, const FloatRect& absoluteTargetRect, OwnPtr<ImageBuffer>&, ImageColorSpace);
+    static void clipToImageBuffer(GraphicsContext*, const AffineTransform& absoluteTransform, const FloatRect& absoluteTargetRect, ImageBuffer*);
+
+    static AffineTransform absoluteTransformFromContext(GraphicsContext*);
+
+private:
+    SVGImageBufferTools() { }
+    ~SVGImageBufferTools() { }
+};
+
+}
+
+#endif
+#endif

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list