2010-05-10 Dirk Schulze <krit@webkit.org>
authorkrit@webkit.org <krit@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 10 May 2010 15:59:19 +0000 (15:59 +0000)
committerkrit@webkit.org <krit@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 10 May 2010 15:59:19 +0000 (15:59 +0000)
        Reviewed by Nikolas Zimmermann.

        Further optimization for SVG's repaintRect calculation
        https://bugs.webkit.org/show_bug.cgi?id=38820

        This is a further optimization to get smaller repaintRects on SVG objects
        in combination with masker or clipper resources.
        Masker takes the unite of all stroke boundaries of it's childs.
        Both, clipper and masker, store this union to avoid multiple calls of the childs
        and the unite calculations now.
        The unite rect can be transformed to any targets objectBoundingBox, if the content
        unit of the resource is set to objectBoundingBoxMode.
        This speeds up the use of resources with multiple target objects.

        No behavior changes, the smaller repaintRects cause updates for DRT results.

        * rendering/RenderSVGResource.h:
        * rendering/RenderSVGResourceClipper.cpp:
        (WebCore::RenderSVGResourceClipper::invalidateClients):
        (WebCore::RenderSVGResourceClipper::calculateClipContentRepaintRect):
        (WebCore::RenderSVGResourceClipper::resourceBoundingBox):
        * rendering/RenderSVGResourceClipper.h:
        * rendering/RenderSVGResourceFilter.cpp:
        (WebCore::RenderSVGResourceFilter::resourceBoundingBox):
        * rendering/RenderSVGResourceFilter.h:
        * rendering/RenderSVGResourceGradient.h:
        (WebCore::RenderSVGResourceGradient::resourceBoundingBox):
        * rendering/RenderSVGResourceMarker.h:
        (WebCore::RenderSVGResourceMarker::resourceBoundingBox):
        * rendering/RenderSVGResourceMasker.cpp:
        (WebCore::RenderSVGResourceMasker::invalidateClients):
        (WebCore::RenderSVGResourceMasker::createMaskImage):
        (WebCore::RenderSVGResourceMasker::calculateMaskContentRepaintRect):
        (WebCore::RenderSVGResourceMasker::resourceBoundingBox):
        * rendering/RenderSVGResourceMasker.h:
        * rendering/RenderSVGResourcePattern.h:
        (WebCore::RenderSVGResourcePattern::resourceBoundingBox):
        * rendering/RenderSVGResourceSolidColor.h:
        (WebCore::RenderSVGResourceSolidColor::resourceBoundingBox):
2010-05-10  Dirk Schulze  <krit@webkit.org>

        Reviewed by Nikolas Zimmermann.

        Further optimization for SVG's repaintRect calculation
        https://bugs.webkit.org/show_bug.cgi?id=38820

        The repaintRect of SVG objects with masks got smaller. This made
        updates of some results necessary.

        * platform/mac/svg/W3C-SVG-1.1/masking-intro-01-f-expected.txt:
        * platform/mac/svg/batik/masking/maskRegions-expected.txt:
        * platform/mac/svg/clip-path/clip-path-with-invisibile-child-expected.txt:
        * platform/mac/svg/css/circle-in-mask-with-shadow-expected.txt:
        * platform/mac/svg/css/mask-with-shadow-expected.txt:
        * platform/mac/svg/custom/empty-mask-expected.txt:
        * platform/mac/svg/custom/mask-excessive-malloc-expected.txt:
        * platform/mac/svg/custom/mask-inside-defs-expected.txt:
        * platform/mac/svg/custom/mask-invalidation-expected.txt:
        * platform/mac/svg/custom/mask-with-all-units-expected.txt:
        * platform/mac/svg/custom/resource-invalidate-on-target-update-expected.txt:
        * platform/mac/svg/custom/visibility-override-mask-expected.txt:
        * svg/custom/transformedMaskFails-expected.txt:

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

26 files changed:
LayoutTests/ChangeLog
LayoutTests/platform/mac/svg/W3C-SVG-1.1/masking-intro-01-f-expected.txt
LayoutTests/platform/mac/svg/batik/masking/maskRegions-expected.txt
LayoutTests/platform/mac/svg/clip-path/clip-path-with-invisibile-child-expected.txt
LayoutTests/platform/mac/svg/css/circle-in-mask-with-shadow-expected.txt
LayoutTests/platform/mac/svg/css/mask-with-shadow-expected.txt
LayoutTests/platform/mac/svg/custom/empty-mask-expected.txt
LayoutTests/platform/mac/svg/custom/mask-excessive-malloc-expected.txt
LayoutTests/platform/mac/svg/custom/mask-inside-defs-expected.txt
LayoutTests/platform/mac/svg/custom/mask-invalidation-expected.txt
LayoutTests/platform/mac/svg/custom/mask-with-all-units-expected.txt
LayoutTests/platform/mac/svg/custom/resource-invalidate-on-target-update-expected.txt
LayoutTests/platform/mac/svg/custom/visibility-override-mask-expected.txt
LayoutTests/svg/custom/transformedMaskFails-expected.txt
WebCore/ChangeLog
WebCore/rendering/RenderSVGResource.h
WebCore/rendering/RenderSVGResourceClipper.cpp
WebCore/rendering/RenderSVGResourceClipper.h
WebCore/rendering/RenderSVGResourceFilter.cpp
WebCore/rendering/RenderSVGResourceFilter.h
WebCore/rendering/RenderSVGResourceGradient.h
WebCore/rendering/RenderSVGResourceMarker.h
WebCore/rendering/RenderSVGResourceMasker.cpp
WebCore/rendering/RenderSVGResourceMasker.h
WebCore/rendering/RenderSVGResourcePattern.h
WebCore/rendering/RenderSVGResourceSolidColor.h

index bd0c713..25439cb 100644 (file)
@@ -1,3 +1,27 @@
+2010-05-10  Dirk Schulze  <krit@webkit.org>
+
+        Reviewed by Nikolas Zimmermann.
+
+        Further optimization for SVG's repaintRect calculation
+        https://bugs.webkit.org/show_bug.cgi?id=38820
+        
+        The repaintRect of SVG objects with masks got smaller. This made
+        updates of some results necessary.
+
+        * platform/mac/svg/W3C-SVG-1.1/masking-intro-01-f-expected.txt:
+        * platform/mac/svg/batik/masking/maskRegions-expected.txt:
+        * platform/mac/svg/clip-path/clip-path-with-invisibile-child-expected.txt:
+        * platform/mac/svg/css/circle-in-mask-with-shadow-expected.txt:
+        * platform/mac/svg/css/mask-with-shadow-expected.txt:
+        * platform/mac/svg/custom/empty-mask-expected.txt:
+        * platform/mac/svg/custom/mask-excessive-malloc-expected.txt:
+        * platform/mac/svg/custom/mask-inside-defs-expected.txt:
+        * platform/mac/svg/custom/mask-invalidation-expected.txt:
+        * platform/mac/svg/custom/mask-with-all-units-expected.txt:
+        * platform/mac/svg/custom/resource-invalidate-on-target-update-expected.txt:
+        * platform/mac/svg/custom/visibility-override-mask-expected.txt:
+        * svg/custom/transformedMaskFails-expected.txt:
+
 2010-05-10  Hans Wennborg  <hans@chromium.org>
 
         Reviewed by Jeremy Orlow.
index e98c3a1..daafea0 100644 (file)
@@ -18,8 +18,8 @@ layer at (0,0) size 480x360
       RenderSVGResourceMasker {mask} [id="two"] [maskUnits=objectBoundingBox] [maskContentUnits=objectBoundingBox]
         RenderPath {circle} at (0,0) size 1x1 [stroke={[type=SOLID] [color=#FF0000] [stroke width=0.15]}] [fill={[type=SOLID] [color=#0000FF]}] [data="M0.50,0.50 L0.50,0.51 L0.50,0.53 L0.50,0.54 L0.49,0.55 L0.49,0.56 L0.49,0.57 L0.48,0.59 L0.48,0.60 L0.47,0.61 L0.46,0.62 L0.45,0.63 L0.45,0.64 L0.44,0.65 L0.43,0.65 L0.42,0.66 L0.41,0.67 L0.40,0.68 L0.39,0.68 L0.37,0.69 L0.36,0.69 L0.35,0.69 L0.34,0.70 L0.33,0.70 L0.31,0.70 L0.30,0.70 L0.29,0.70 L0.27,0.70 L0.26,0.70 L0.25,0.69 L0.24,0.69 L0.23,0.69 L0.21,0.68 L0.20,0.68 L0.19,0.67 L0.18,0.66 L0.17,0.65 L0.16,0.65 L0.15,0.64 L0.15,0.63 L0.14,0.62 L0.13,0.61 L0.12,0.60 L0.12,0.59 L0.11,0.57 L0.11,0.56 L0.11,0.55 L0.10,0.54 L0.10,0.53 L0.10,0.51 L0.10,0.50 L0.10,0.49 L0.10,0.47 L0.10,0.46 L0.11,0.45 L0.11,0.44 L0.11,0.43 L0.12,0.41 L0.12,0.40 L0.13,0.39 L0.14,0.38 L0.15,0.37 L0.15,0.36 L0.16,0.35 L0.17,0.35 L0.18,0.34 L0.19,0.33 L0.20,0.32 L0.21,0.32 L0.23,0.31 L0.24,0.31 L0.25,0.31 L0.26,0.30 L0.27,0.30 L0.29,0.30 L0.30,0.30 L0.31,0.30 L0.33,0.30 L0.34,0.30 L0.35,0.31 L0.36,0.31 L0.37,0.31 L0.39,0.32 L0.40,0.32 L0.41,0.33 L0.42,0.34 L0.43,0.35 L0.44,0.35 L0.45,0.36 L0.45,0.37 L0.46,0.38 L0.47,0.39 L0.48,0.40 L0.48,0.41 L0.49,0.43 L0.49,0.44 L0.49,0.45 L0.50,0.46 L0.50,0.47 L0.50,0.49 Z"]
         RenderPath {circle} at (0,0) size 1x1 [fill={[type=SOLID] [color=#0000FF]}] [data="M0.90,0.50 L0.90,0.51 L0.90,0.53 L0.90,0.54 L0.89,0.55 L0.89,0.56 L0.89,0.57 L0.88,0.59 L0.88,0.60 L0.87,0.61 L0.86,0.62 L0.85,0.63 L0.85,0.64 L0.84,0.65 L0.83,0.65 L0.82,0.66 L0.81,0.67 L0.80,0.68 L0.79,0.68 L0.77,0.69 L0.76,0.69 L0.75,0.69 L0.74,0.70 L0.73,0.70 L0.71,0.70 L0.70,0.70 L0.69,0.70 L0.67,0.70 L0.66,0.70 L0.65,0.69 L0.64,0.69 L0.63,0.69 L0.61,0.68 L0.60,0.68 L0.59,0.67 L0.58,0.66 L0.57,0.65 L0.56,0.65 L0.55,0.64 L0.55,0.63 L0.54,0.62 L0.53,0.61 L0.52,0.60 L0.52,0.59 L0.51,0.57 L0.51,0.56 L0.51,0.55 L0.50,0.54 L0.50,0.53 L0.50,0.51 L0.50,0.50 L0.50,0.49 L0.50,0.47 L0.50,0.46 L0.51,0.45 L0.51,0.44 L0.51,0.43 L0.52,0.41 L0.52,0.40 L0.53,0.39 L0.54,0.38 L0.55,0.37 L0.55,0.36 L0.56,0.35 L0.57,0.35 L0.58,0.34 L0.59,0.33 L0.60,0.32 L0.61,0.32 L0.63,0.31 L0.64,0.31 L0.65,0.31 L0.66,0.30 L0.67,0.30 L0.69,0.30 L0.70,0.30 L0.71,0.30 L0.73,0.30 L0.74,0.30 L0.75,0.31 L0.76,0.31 L0.77,0.31 L0.79,0.32 L0.80,0.32 L0.81,0.33 L0.82,0.34 L0.83,0.35 L0.84,0.35 L0.85,0.36 L0.85,0.37 L0.86,0.38 L0.87,0.39 L0.88,0.40 L0.88,0.41 L0.89,0.43 L0.89,0.44 L0.89,0.45 L0.90,0.46 L0.90,0.47 L0.90,0.49 Z"]
-    RenderPath {rect} at (150,150) size 200x200 [fill={[type=SOLID] [color=#00008B]}] [data="M150.00,150.00 L350.00,150.00 L350.00,350.00 L150.00,350.00 Z"]
-      [masker="two"] RenderSVGResourceMasker {mask} at (130,130) size 240x240
+    RenderPath {rect} at (155,195) size 175x110 [fill={[type=SOLID] [color=#00008B]}] [data="M150.00,150.00 L350.00,150.00 L350.00,350.00 L150.00,350.00 Z"]
+      [masker="two"] RenderSVGResourceMasker {mask} at (155.01,195.01) size 174.99x109.99
     RenderSVGText {text} at (50,260) size 89x18 contains 1 chunk(s)
       RenderSVGInlineText {#text} at (0,-14) size 89x18
         chunk 1 text run 1 at (50.00,260.00) startOffset 0 endOffset 14 width 89.00: "With a 'mask':"
index 931de72..849d0c1 100644 (file)
@@ -2,7 +2,7 @@ layer at (0,0) size 800x600
   RenderView at (0,0) size 800x600
 layer at (0,0) size 450x500
   RenderSVGRoot {svg} at (0,0) size 450x500
-    RenderSVGContainer {g} at (85,36) size 275x384
+    RenderSVGContainer {g} at (90,36) size 265x368
       RenderSVGText {text} at (174,50) size 102x17 contains 1 chunk(s)
         RenderSVGInlineText {#text} at (0,-14) size 102x17
           chunk 1 (middle anchor) text run 1 at (174.00,50.00) startOffset 0 endOffset 12 width 102.00: "Mask Regions"
@@ -38,9 +38,9 @@ layer at (0,0) size 450x500
         RenderSVGText {text} at (22,-3) size 56x17 contains 1 chunk(s)
           RenderSVGInlineText {#text} at (0,-14) size 56x17
             chunk 1 (middle anchor) text run 1 at (22.00,-3.00) startOffset 0 endOffset 6 width 56.00: "Masked"
-      RenderSVGContainer {g} at (85,203) size 100x97 [transform={m=((1.00,0.00)(0.00,1.00)) t=(85.00,220.00)}]
-        RenderSVGContainer {use} at (85,220) size 100x80
-          [masker="mask_1"] RenderSVGResourceMasker {mask} at (-10,-8) size 120x96
+      RenderSVGContainer {g} at (90,203) size 90x97 [transform={m=((1.00,0.00)(0.00,1.00)) t=(85.00,220.00)}]
+        RenderSVGContainer {use} at (90,220) size 90x80
+          [masker="mask_1"] RenderSVGResourceMasker {mask} at (5,0) size 90x80
           RenderSVGContainer {g} at (85,220) size 100x80
             RenderPath {rect} at (85,220) size 100x80 [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 (24,-3) size 52x17 contains 1 chunk(s)
@@ -56,15 +56,15 @@ layer at (0,0) size 450x500
             chunk 1 (middle anchor) text run 1 at (24.50,-3.00) startOffset 0 endOffset 6 width 51.00: "Mask 2"
       RenderSVGContainer {g} at (284,203) size 52x77 [transform={m=((1.00,0.00)(0.00,1.00)) t=(260.00,220.00)}]
         RenderSVGContainer {use} at (285,240) size 50x40
-          [masker="mask_3"] RenderSVGResourceMasker {mask} at (25,20) size 50.00x40
+          [masker="mask_3"] RenderSVGResourceMasker {mask} at (25,20) size 50x40
           RenderSVGContainer {g} at (260,220) size 100x80
             RenderPath {rect} at (260,220) size 100x80 [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 (24,-3) size 52x17 contains 1 chunk(s)
           RenderSVGInlineText {#text} at (0,-14) size 52x17
             chunk 1 (middle anchor) text run 1 at (24.50,-3.00) startOffset 0 endOffset 6 width 51.00: "Mask 3"
-      RenderSVGContainer {g} at (260,323) size 100x97 [transform={m=((1.00,0.00)(0.00,1.00)) t=(260.00,340.00)}]
-        RenderSVGContainer {use} at (260,340) size 100x80
-          [masker="mask_4"] RenderSVGResourceMasker {mask} at (0,0) size 100x80
+      RenderSVGContainer {g} at (264,323) size 91x81 [transform={m=((1.00,0.00)(0.00,1.00)) t=(260.00,340.00)}]
+        RenderSVGContainer {use} at (264,340) size 91x64
+          [masker="mask_4"] RenderSVGResourceMasker {mask} at (5.00,0) size 90x64
           RenderSVGContainer {g} at (260,340) size 100x80
             RenderPath {rect} at (260,340) size 100x80 [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 (24,-3) size 52x17 contains 1 chunk(s)
index 472ba99..82a0545 100644 (file)
@@ -8,5 +8,5 @@ layer at (0,0) size 800x600
         RenderSVGContainer {use} at (70,40) size 200x170
           RenderSVGContainer {g} at (70,40) size 200x170
             RenderPath {path} at (70,40) size 200x170 [transform={m=((1.00,0.00)(0.00,1.00)) t=(70.00,40.00)}] [fill={[type=SOLID] [color=#000000]}] [data="M100.00,0.00 L160.00,170.00 L0.00,60.00 L200.00,60.00 L30.00,170.00 Z"]
-    RenderPath {rect} at (70,40) size 200x170 [fill={[type=SOLID] [color=#008000]}] [data="M40.00,40.00 L340.00,40.00 L340.00,340.00 L40.00,340.00 Z"]
-      [clipPath="clip"] RenderSVGResourceClipper {clipPath} at (70,40) size 200x170
+    RenderPath {rect} at (40,40) size 300x300 [fill={[type=SOLID] [color=#008000]}] [data="M40.00,40.00 L340.00,40.00 L340.00,340.00 L40.00,340.00 Z"]
+      [clipPath="clip"] RenderSVGResourceClipper {clipPath} at (0,0) size 0x0
index 2f84667..d3c597e 100644 (file)
@@ -2,7 +2,7 @@ layer at (0,0) size 800x600
   RenderView at (0,0) size 800x600
 layer at (0,0) size 450x500
   RenderSVGRoot {svg} at (0,0) size 450x500
-    RenderSVGContainer {g} at (0,0) size 300x300
+    RenderSVGContainer {g} at (5,5) size 220x220
       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]
@@ -13,8 +13,8 @@ layer at (0,0) size 450x500
           RenderPath {circle} at (5,115) size 120x120 [fill={[type=SOLID] [color=#FFFFFF]}] [data="M105.00,165.00 L104.90,168.14 L104.61,171.27 L104.11,174.37 L103.43,177.43 L102.55,180.45 L101.49,183.41 L100.24,186.29 L98.82,189.09 L97.22,191.79 L95.45,194.39 L93.53,196.87 L91.45,199.23 L89.23,201.45 L86.87,203.53 L84.39,205.45 L81.79,207.22 L79.09,208.82 L76.29,210.24 L73.41,211.49 L70.45,212.55 L67.43,213.43 L64.37,214.11 L61.27,214.61 L58.14,214.90 L55.00,215.00 L51.86,214.90 L48.73,214.61 L45.63,214.11 L42.57,213.43 L39.55,212.55 L36.59,211.49 L33.71,210.24 L30.91,208.82 L28.21,207.22 L25.61,205.45 L23.13,203.53 L20.77,201.45 L18.55,199.23 L16.47,196.87 L14.55,194.39 L12.78,191.79 L11.18,189.09 L9.76,186.29 L8.51,183.41 L7.45,180.45 L6.57,177.43 L5.89,174.37 L5.39,171.27 L5.10,168.14 L5.00,165.00 L5.10,161.86 L5.39,158.73 L5.89,155.63 L6.57,152.57 L7.45,149.55 L8.51,146.59 L9.76,143.71 L11.18,140.91 L12.78,138.21 L14.55,135.61 L16.47,133.13 L18.55,130.77 L20.77,128.55 L23.13,126.47 L25.61,124.55 L28.21,122.78 L30.91,121.18 L33.71,119.76 L36.59,118.51 L39.55,117.45 L42.57,116.57 L45.63,115.89 L48.73,115.39 L51.86,115.10 L55.00,115.00 L58.14,115.10 L61.27,115.39 L64.37,115.89 L67.43,116.57 L70.45,117.45 L73.41,118.51 L76.29,119.76 L79.09,121.18 L81.79,122.78 L84.39,124.55 L86.87,126.47 L89.23,128.55 L91.45,130.77 L93.53,133.13 L95.45,135.61 L97.22,138.21 L98.82,140.91 L100.24,143.71 L101.49,146.59 L102.55,149.55 L103.43,152.57 L104.11,155.63 L104.61,158.73 L104.90,161.86 Z"]
           RenderPath {circle} at (115,5) size 120x120 [fill={[type=SOLID] [color=#FFFFFF]}] [data="M215.00,55.00 L214.90,58.14 L214.61,61.27 L214.11,64.37 L213.43,67.43 L212.55,70.45 L211.49,73.41 L210.24,76.29 L208.82,79.09 L207.22,81.79 L205.45,84.39 L203.53,86.87 L201.45,89.23 L199.23,91.45 L196.87,93.53 L194.39,95.45 L191.79,97.22 L189.09,98.82 L186.29,100.24 L183.41,101.49 L180.45,102.55 L177.43,103.43 L174.37,104.11 L171.27,104.61 L168.14,104.90 L165.00,105.00 L161.86,104.90 L158.73,104.61 L155.63,104.11 L152.57,103.43 L149.55,102.55 L146.59,101.49 L143.71,100.24 L140.91,98.82 L138.21,97.22 L135.61,95.45 L133.13,93.53 L130.77,91.45 L128.55,89.23 L126.47,86.87 L124.55,84.39 L122.78,81.79 L121.18,79.09 L119.76,76.29 L118.51,73.41 L117.45,70.45 L116.57,67.43 L115.89,64.37 L115.39,61.27 L115.10,58.14 L115.00,55.00 L115.10,51.86 L115.39,48.73 L115.89,45.63 L116.57,42.57 L117.45,39.55 L118.51,36.59 L119.76,33.71 L121.18,30.91 L122.78,28.21 L124.55,25.61 L126.47,23.13 L128.55,20.77 L130.77,18.55 L133.13,16.47 L135.61,14.55 L138.21,12.78 L140.91,11.18 L143.71,9.76 L146.59,8.51 L149.55,7.45 L152.57,6.57 L155.63,5.89 L158.73,5.39 L161.86,5.10 L165.00,5.00 L168.14,5.10 L171.27,5.39 L174.37,5.89 L177.43,6.57 L180.45,7.45 L183.41,8.51 L186.29,9.76 L189.09,11.18 L191.79,12.78 L194.39,14.55 L196.87,16.47 L199.23,18.55 L201.45,20.77 L203.53,23.13 L205.45,25.61 L207.22,28.21 L208.82,30.91 L210.24,33.71 L211.49,36.59 L212.55,39.55 L213.43,42.57 L214.11,45.63 L214.61,48.73 L214.90,51.86 Z"]
           RenderPath {circle} at (115,115) size 120x120 [fill={[type=SOLID] [color=#FFFFFF]}] [data="M215.00,165.00 L214.90,168.14 L214.61,171.27 L214.11,174.37 L213.43,177.43 L212.55,180.45 L211.49,183.41 L210.24,186.29 L208.82,189.09 L207.22,191.79 L205.45,194.39 L203.53,196.87 L201.45,199.23 L199.23,201.45 L196.87,203.53 L194.39,205.45 L191.79,207.22 L189.09,208.82 L186.29,210.24 L183.41,211.49 L180.45,212.55 L177.43,213.43 L174.37,214.11 L171.27,214.61 L168.14,214.90 L165.00,215.00 L161.86,214.90 L158.73,214.61 L155.63,214.11 L152.57,213.43 L149.55,212.55 L146.59,211.49 L143.71,210.24 L140.91,208.82 L138.21,207.22 L135.61,205.45 L133.13,203.53 L130.77,201.45 L128.55,199.23 L126.47,196.87 L124.55,194.39 L122.78,191.79 L121.18,189.09 L119.76,186.29 L118.51,183.41 L117.45,180.45 L116.57,177.43 L115.89,174.37 L115.39,171.27 L115.10,168.14 L115.00,165.00 L115.10,161.86 L115.39,158.73 L115.89,155.63 L116.57,152.57 L117.45,149.55 L118.51,146.59 L119.76,143.71 L121.18,140.91 L122.78,138.21 L124.55,135.61 L126.47,133.13 L128.55,130.77 L130.77,128.55 L133.13,126.47 L135.61,124.55 L138.21,122.78 L140.91,121.18 L143.71,119.76 L146.59,118.51 L149.55,117.45 L152.57,116.57 L155.63,115.89 L158.73,115.39 L161.86,115.10 L165.00,115.00 L168.14,115.10 L171.27,115.39 L174.37,115.89 L177.43,116.57 L180.45,117.45 L183.41,118.51 L186.29,119.76 L189.09,121.18 L191.79,122.78 L194.39,124.55 L196.87,126.47 L199.23,128.55 L201.45,130.77 L203.53,133.13 L205.45,135.61 L207.22,138.21 L208.82,140.91 L210.24,143.71 L211.49,146.59 L212.55,149.55 L213.43,152.57 L214.11,155.63 L214.61,158.73 L214.90,161.86 Z"]
-      RenderSVGContainer {g} at (0,0) size 300x300
-        RenderSVGContainer {use} at (0,0) size 300x300
-          [masker="mask_1"] RenderSVGResourceMasker {mask} at (-30,-30) size 360x360
+      RenderSVGContainer {g} at (5,5) size 220x220
+        RenderSVGContainer {use} at (5,5) size 220x220
+          [masker="mask_1"] RenderSVGResourceMasker {mask} at (5,5) size 220x220
           RenderSVGContainer {g} at (0,0) size 300x300
             RenderPath {rect} at (0,0) size 300x300 [fill={[type=LINEAR-GRADIENT] [id="maskedGradient"]}] [data="M0.00,0.00 L300.00,0.00 L300.00,300.00 L0.00,300.00 Z"]
index c6fabdf..7fd53fb 100644 (file)
@@ -2,7 +2,7 @@ layer at (0,0) size 800x600
   RenderView at (0,0) size 800x600
 layer at (0,0) size 450x500
   RenderSVGRoot {svg} at (0,0) size 450x500
-    RenderSVGContainer {g} at (0,0) size 300x300
+    RenderSVGContainer {g} at (5,5) size 210x210
       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]
@@ -13,8 +13,8 @@ layer at (0,0) size 450x500
           RenderPath {circle} at (5,115) size 110x110 [fill={[type=SOLID] [color=#FFFFFF]}] [data="M105.00,165.00 L104.90,168.14 L104.61,171.27 L104.11,174.37 L103.43,177.43 L102.55,180.45 L101.49,183.41 L100.24,186.29 L98.82,189.09 L97.22,191.79 L95.45,194.39 L93.53,196.87 L91.45,199.23 L89.23,201.45 L86.87,203.53 L84.39,205.45 L81.79,207.22 L79.09,208.82 L76.29,210.24 L73.41,211.49 L70.45,212.55 L67.43,213.43 L64.37,214.11 L61.27,214.61 L58.14,214.90 L55.00,215.00 L51.86,214.90 L48.73,214.61 L45.63,214.11 L42.57,213.43 L39.55,212.55 L36.59,211.49 L33.71,210.24 L30.91,208.82 L28.21,207.22 L25.61,205.45 L23.13,203.53 L20.77,201.45 L18.55,199.23 L16.47,196.87 L14.55,194.39 L12.78,191.79 L11.18,189.09 L9.76,186.29 L8.51,183.41 L7.45,180.45 L6.57,177.43 L5.89,174.37 L5.39,171.27 L5.10,168.14 L5.00,165.00 L5.10,161.86 L5.39,158.73 L5.89,155.63 L6.57,152.57 L7.45,149.55 L8.51,146.59 L9.76,143.71 L11.18,140.91 L12.78,138.21 L14.55,135.61 L16.47,133.13 L18.55,130.77 L20.77,128.55 L23.13,126.47 L25.61,124.55 L28.21,122.78 L30.91,121.18 L33.71,119.76 L36.59,118.51 L39.55,117.45 L42.57,116.57 L45.63,115.89 L48.73,115.39 L51.86,115.10 L55.00,115.00 L58.14,115.10 L61.27,115.39 L64.37,115.89 L67.43,116.57 L70.45,117.45 L73.41,118.51 L76.29,119.76 L79.09,121.18 L81.79,122.78 L84.39,124.55 L86.87,126.47 L89.23,128.55 L91.45,130.77 L93.53,133.13 L95.45,135.61 L97.22,138.21 L98.82,140.91 L100.24,143.71 L101.49,146.59 L102.55,149.55 L103.43,152.57 L104.11,155.63 L104.61,158.73 L104.90,161.86 Z"]
           RenderPath {circle} at (115,5) size 110x110 [fill={[type=SOLID] [color=#FFFFFF]}] [data="M215.00,55.00 L214.90,58.14 L214.61,61.27 L214.11,64.37 L213.43,67.43 L212.55,70.45 L211.49,73.41 L210.24,76.29 L208.82,79.09 L207.22,81.79 L205.45,84.39 L203.53,86.87 L201.45,89.23 L199.23,91.45 L196.87,93.53 L194.39,95.45 L191.79,97.22 L189.09,98.82 L186.29,100.24 L183.41,101.49 L180.45,102.55 L177.43,103.43 L174.37,104.11 L171.27,104.61 L168.14,104.90 L165.00,105.00 L161.86,104.90 L158.73,104.61 L155.63,104.11 L152.57,103.43 L149.55,102.55 L146.59,101.49 L143.71,100.24 L140.91,98.82 L138.21,97.22 L135.61,95.45 L133.13,93.53 L130.77,91.45 L128.55,89.23 L126.47,86.87 L124.55,84.39 L122.78,81.79 L121.18,79.09 L119.76,76.29 L118.51,73.41 L117.45,70.45 L116.57,67.43 L115.89,64.37 L115.39,61.27 L115.10,58.14 L115.00,55.00 L115.10,51.86 L115.39,48.73 L115.89,45.63 L116.57,42.57 L117.45,39.55 L118.51,36.59 L119.76,33.71 L121.18,30.91 L122.78,28.21 L124.55,25.61 L126.47,23.13 L128.55,20.77 L130.77,18.55 L133.13,16.47 L135.61,14.55 L138.21,12.78 L140.91,11.18 L143.71,9.76 L146.59,8.51 L149.55,7.45 L152.57,6.57 L155.63,5.89 L158.73,5.39 L161.86,5.10 L165.00,5.00 L168.14,5.10 L171.27,5.39 L174.37,5.89 L177.43,6.57 L180.45,7.45 L183.41,8.51 L186.29,9.76 L189.09,11.18 L191.79,12.78 L194.39,14.55 L196.87,16.47 L199.23,18.55 L201.45,20.77 L203.53,23.13 L205.45,25.61 L207.22,28.21 L208.82,30.91 L210.24,33.71 L211.49,36.59 L212.55,39.55 L213.43,42.57 L214.11,45.63 L214.61,48.73 L214.90,51.86 Z"]
           RenderPath {circle} at (115,115) size 110x110 [fill={[type=SOLID] [color=#FFFFFF]}] [data="M215.00,165.00 L214.90,168.14 L214.61,171.27 L214.11,174.37 L213.43,177.43 L212.55,180.45 L211.49,183.41 L210.24,186.29 L208.82,189.09 L207.22,191.79 L205.45,194.39 L203.53,196.87 L201.45,199.23 L199.23,201.45 L196.87,203.53 L194.39,205.45 L191.79,207.22 L189.09,208.82 L186.29,210.24 L183.41,211.49 L180.45,212.55 L177.43,213.43 L174.37,214.11 L171.27,214.61 L168.14,214.90 L165.00,215.00 L161.86,214.90 L158.73,214.61 L155.63,214.11 L152.57,213.43 L149.55,212.55 L146.59,211.49 L143.71,210.24 L140.91,208.82 L138.21,207.22 L135.61,205.45 L133.13,203.53 L130.77,201.45 L128.55,199.23 L126.47,196.87 L124.55,194.39 L122.78,191.79 L121.18,189.09 L119.76,186.29 L118.51,183.41 L117.45,180.45 L116.57,177.43 L115.89,174.37 L115.39,171.27 L115.10,168.14 L115.00,165.00 L115.10,161.86 L115.39,158.73 L115.89,155.63 L116.57,152.57 L117.45,149.55 L118.51,146.59 L119.76,143.71 L121.18,140.91 L122.78,138.21 L124.55,135.61 L126.47,133.13 L128.55,130.77 L130.77,128.55 L133.13,126.47 L135.61,124.55 L138.21,122.78 L140.91,121.18 L143.71,119.76 L146.59,118.51 L149.55,117.45 L152.57,116.57 L155.63,115.89 L158.73,115.39 L161.86,115.10 L165.00,115.00 L168.14,115.10 L171.27,115.39 L174.37,115.89 L177.43,116.57 L180.45,117.45 L183.41,118.51 L186.29,119.76 L189.09,121.18 L191.79,122.78 L194.39,124.55 L196.87,126.47 L199.23,128.55 L201.45,130.77 L203.53,133.13 L205.45,135.61 L207.22,138.21 L208.82,140.91 L210.24,143.71 L211.49,146.59 L212.55,149.55 L213.43,152.57 L214.11,155.63 L214.61,158.73 L214.90,161.86 Z"]
-      RenderSVGContainer {g} at (0,0) size 300x300
-        RenderSVGContainer {use} at (0,0) size 300x300
-          [masker="mask_1"] RenderSVGResourceMasker {mask} at (-30,-30) size 360x360
+      RenderSVGContainer {g} at (5,5) size 210x210
+        RenderSVGContainer {use} at (5,5) size 210x210
+          [masker="mask_1"] RenderSVGResourceMasker {mask} at (5,5) size 210x210
           RenderSVGContainer {g} at (0,0) size 300x300
             RenderPath {rect} at (0,0) size 300x300 [fill={[type=LINEAR-GRADIENT] [id="maskedGradient"]}] [data="M0.00,0.00 L300.00,0.00 L300.00,300.00 L0.00,300.00 Z"]
index aa24c58..5ec9474 100644 (file)
@@ -6,9 +6,9 @@ layer at (0,0) size 800x600
       RenderSVGResourceMasker {mask} [id="mask"] [maskUnits=objectBoundingBox] [maskContentUnits=userSpaceOnUse]
         RenderPath {rect} at (0,0) size 0x0 [fill={[type=SOLID] [color=#FFFFFF]}] [data="M-0.50,-0.50 L-0.40,-0.50 L-0.40,-0.40 L-0.50,-0.40 Z"]
     RenderPath {rect} at (20,20) size 100x100 [fill={[type=SOLID] [color=#008000]}] [data="M20.00,20.00 L120.00,20.00 L120.00,120.00 L20.00,120.00 Z"]
-      [masker="mask"] RenderSVGResourceMasker {mask} at (10,10) size 120x120
+      [masker="mask"] RenderSVGResourceMasker {mask} at (0,0) size 0x0
     RenderSVGText {text} at (60,60) size 21x18 contains 1 chunk(s)
-      [masker="mask"] RenderSVGResourceMasker {mask} at (57.90,44.20) size 25.20x21.60
+      [masker="mask"] RenderSVGResourceMasker {mask} at (0,0) size 0x0
       RenderSVGTSpan {tspan} at (0,0) size 21x18
         RenderSVGInlineText {#text} at (0,-14) size 21x18
           chunk 1 text run 1 at (60.00,60.00) startOffset 0 endOffset 4 width 21.00: "test"
index 21d7a0c..46058f6 100644 (file)
@@ -5,4 +5,4 @@ layer at (0,0) size 800x600
     RenderSVGResourceMasker {mask} [id="mask"] [maskUnits=objectBoundingBox] [maskContentUnits=userSpaceOnUse]
       RenderPath {rect} at (0,0) size 0x0 [fill={[type=SOLID] [color=#FFFFFF]}] [data="M0.00,0.00 L2147483648.00,0.00 L2147483648.00,2147483648.00 L0.00,2147483648.00 Z"]
     RenderPath {path} at (200,200) size 100x200 [fill={[type=SOLID] [color=#0000FF]}] [data="M200.00,200.00 L300.00,200.00 L300.00,400.00 L200.00,400.00 Z"]
-      [masker="mask"] RenderSVGResourceMasker {mask} at (190,180) size 214748364800.00x429496729600.00
+      [masker="mask"] RenderSVGResourceMasker {mask} at (190,180) size 2147483520x2147483520
index de40847..16373d6 100644 (file)
@@ -4,7 +4,7 @@ layer at (0,0) size 800x600
   RenderSVGRoot {svg} at (0,0) size 800x600
     RenderSVGResourceMasker {mask} [id="mymask"] [maskUnits=objectBoundingBox] [maskContentUnits=userSpaceOnUse]
       RenderPath {rect} at (0,0) size 100x100 [fill={[type=SOLID] [color=#FFFFFF]}] [data="M0.00,0.00 L100.00,0.00 L100.00,100.00 L0.00,100.00 Z"]
-    RenderSVGContainer {g} at (0,0) size 200x200
-      [masker="mymask"] RenderSVGResourceMasker {mask} at (-20,-20) size 240x240
+    RenderSVGContainer {g} at (0,0) size 100x100
+      [masker="mymask"] RenderSVGResourceMasker {mask} at (0,0) size 100x100
       RenderPath {rect} at (0,0) size 200x200 [fill={[type=SOLID] [color=#FF0000]}] [data="M0.00,0.00 L200.00,0.00 L200.00,200.00 L0.00,200.00 Z"]
       RenderPath {rect} at (0,0) size 100x100 [fill={[type=SOLID] [color=#008000]}] [data="M0.00,0.00 L100.00,0.00 L100.00,100.00 L0.00,100.00 Z"]
index b4d1bcc..308c93d 100644 (file)
@@ -7,7 +7,7 @@ layer at (0,0) size 800x600
         RenderPath {rect} at (50,50) size 460x316 [fill={[type=SOLID] [color=#FFFFFF]}] [data="M50.00,50.00 L510.00,50.00 L510.00,366.00 L50.00,366.00 Z"]
     RenderSVGContainer {g} at (50,50) size 453x299
       RenderPath {rect} at (50,50) size 453x299 [fill={[type=SOLID] [color=#008000]}] [data="M50.00,50.00 L503.00,50.00 L503.00,349.00 L50.00,349.00 Z"]
-        [masker="mask"] RenderSVGResourceMasker {mask} at (-80,-60) size 960x720
+        [masker="mask"] RenderSVGResourceMasker {mask} at (50,50) size 460x316
     RenderSVGText {text} at (14,20) size 83x18 contains 1 chunk(s)
       RenderSVGInlineText {#text} at (0,-14) size 83x18
         chunk 1 text run 1 at (14.00,20.00) startOffset 0 endOffset 11 width 83.00: "Move Object"
index ffb34dc..8ac6332 100644 (file)
@@ -11,11 +11,11 @@ layer at (0,0) size 250x250
         RenderPath {rect} at (60,170) size 50x50 [fill={[type=SOLID] [color=#FFFFFF] [opacity=0.50]}] [data="M60.00,170.00 L110.00,170.00 L110.00,220.00 L60.00,220.00 Z"]
       RenderSVGResourceMasker {mask} [id="mask4"] [maskUnits=userSpaceOnUse] [maskContentUnits=objectBoundingBox]
         RenderPath {rect} at (0,0) size 1x1 [fill={[type=SOLID] [color=#FFFFFF] [opacity=0.50]}] [data="M0.50,0.50 L1.00,0.50 L1.00,1.00 L0.50,1.00 Z"]
-    RenderPath {rect} at (10,10) size 100x100 [fill={[type=SOLID] [color=#008000]}] [data="M10.00,10.00 L110.00,10.00 L110.00,110.00 L10.00,110.00 Z"]
-      [masker="mask1"] RenderSVGResourceMasker {mask} at (10,10) size 100x100
-    RenderPath {rect} at (120,10) size 100x100 [fill={[type=SOLID] [color=#008000]}] [data="M120.00,10.00 L220.00,10.00 L220.00,110.00 L120.00,110.00 Z"]
-      [masker="mask2"] RenderSVGResourceMasker {mask} at (110,0) size 120x120
-    RenderPath {rect} at (10,170) size 100x50 [fill={[type=SOLID] [color=#008000]}] [data="M10.00,120.00 L110.00,120.00 L110.00,220.00 L10.00,220.00 Z"]
-      [masker="mask3"] RenderSVGResourceMasker {mask} at (0,170) size 120x120
-    RenderPath {rect} at (120,120) size 100x100 [fill={[type=SOLID] [color=#008000]}] [data="M120.00,120.00 L220.00,120.00 L220.00,220.00 L120.00,220.00 Z"]
-      [masker="mask4"] RenderSVGResourceMasker {mask} at (120,120) size 100x100
+    RenderPath {rect} at (60,60) size 50x50 [fill={[type=SOLID] [color=#008000]}] [data="M10.00,10.00 L110.00,10.00 L110.00,110.00 L10.00,110.00 Z"]
+      [masker="mask1"] RenderSVGResourceMasker {mask} at (60,60) size 50x50
+    RenderPath {rect} at (170,60) size 50x50 [fill={[type=SOLID] [color=#008000]}] [data="M120.00,10.00 L220.00,10.00 L220.00,110.00 L120.00,110.00 Z"]
+      [masker="mask2"] RenderSVGResourceMasker {mask} at (170,60) size 60x50
+    RenderPath {rect} at (60,170) size 50x50 [fill={[type=SOLID] [color=#008000]}] [data="M10.00,120.00 L110.00,120.00 L110.00,220.00 L10.00,220.00 Z"]
+      [masker="mask3"] RenderSVGResourceMasker {mask} at (60,170) size 50x50
+    RenderPath {rect} at (170,170) size 50x50 [fill={[type=SOLID] [color=#008000]}] [data="M120.00,120.00 L220.00,120.00 L220.00,220.00 L120.00,220.00 Z"]
+      [masker="mask4"] RenderSVGResourceMasker {mask} at (170,170) size 50x50
index 8ccac18..03e7c57 100644 (file)
@@ -14,7 +14,7 @@ layer at (0,0) size 800x600
         RenderPath {circle} at (0,0) size 1x1 [fill={[type=SOLID] [color=#FFFFFF]}] [data="M1.00,0.50 L1.00,0.53 L1.00,0.56 L0.99,0.59 L0.98,0.62 L0.98,0.65 L0.96,0.68 L0.95,0.71 L0.94,0.74 L0.92,0.77 L0.90,0.79 L0.89,0.82 L0.86,0.84 L0.84,0.86 L0.82,0.89 L0.79,0.90 L0.77,0.92 L0.74,0.94 L0.71,0.95 L0.68,0.96 L0.65,0.98 L0.62,0.98 L0.59,0.99 L0.56,1.00 L0.53,1.00 L0.50,1.00 L0.47,1.00 L0.44,1.00 L0.41,0.99 L0.38,0.98 L0.35,0.98 L0.32,0.96 L0.29,0.95 L0.26,0.94 L0.23,0.92 L0.21,0.90 L0.18,0.89 L0.16,0.86 L0.14,0.84 L0.11,0.82 L0.10,0.79 L0.08,0.77 L0.06,0.74 L0.05,0.71 L0.04,0.68 L0.02,0.65 L0.02,0.62 L0.01,0.59 L0.00,0.56 L0.00,0.53 L0.00,0.50 L0.00,0.47 L0.00,0.44 L0.01,0.41 L0.02,0.38 L0.02,0.35 L0.04,0.32 L0.05,0.29 L0.06,0.26 L0.08,0.23 L0.10,0.21 L0.11,0.18 L0.14,0.16 L0.16,0.14 L0.18,0.11 L0.21,0.10 L0.23,0.08 L0.26,0.06 L0.29,0.05 L0.32,0.04 L0.35,0.02 L0.38,0.02 L0.41,0.01 L0.44,0.00 L0.47,0.00 L0.50,0.00 L0.53,0.00 L0.56,0.00 L0.59,0.01 L0.62,0.02 L0.65,0.02 L0.68,0.04 L0.71,0.05 L0.74,0.06 L0.77,0.08 L0.79,0.10 L0.82,0.11 L0.84,0.14 L0.86,0.16 L0.89,0.18 L0.90,0.21 L0.92,0.23 L0.94,0.26 L0.95,0.29 L0.96,0.32 L0.98,0.35 L0.98,0.38 L0.99,0.41 L1.00,0.44 L1.00,0.47 Z"]
     RenderSVGContainer {g} at (0,10) size 121x350
       RenderPath {rect} at (10,10) size 100x100 [fill={[type=SOLID] [color=#008000]}] [data="M10.00,10.00 L110.00,10.00 L110.00,110.00 L10.00,110.00 Z"]
-        [masker="mask"] RenderSVGResourceMasker {mask} at (0,0) size 120x120
+        [masker="mask"] RenderSVGResourceMasker {mask} at (10,10) size 100x100
       RenderPath {rect} at (10,130) size 100x100 [fill={[type=SOLID] [color=#008000]}] [data="M10.00,130.00 L110.00,130.00 L110.00,230.00 L10.00,230.00 Z"]
         [clipPath="clip"] RenderSVGResourceClipper {clipPath} at (10,130) size 100x100
       RenderPath {rect} at (0,240) size 121x120 [fill={[type=SOLID] [color=#008000]}] [data="M10.00,250.00 L110.00,250.00 L110.00,350.00 L10.00,350.00 Z"]
index bd75554..409cd65 100644 (file)
@@ -6,8 +6,8 @@ layer at (0,0) size 800x600
       RenderSVGResourceMasker {mask} [id="mymask"] [maskUnits=objectBoundingBox] [maskContentUnits=userSpaceOnUse]
         RenderPath {rect} at (0,0) size 100x100 [fill={[type=SOLID] [color=#FFFFFF]}] [data="M0.00,0.00 L100.00,0.00 L100.00,100.00 L0.00,100.00 Z"]
     RenderPath {rect} at (0,0) size 100x100 [fill={[type=SOLID] [color=#0000FF]}] [data="M0.00,0.00 L100.00,0.00 L100.00,100.00 L0.00,100.00 Z"]
-    RenderSVGContainer {g} at (0,0) size 200x200
-      [masker="mymask"] RenderSVGResourceMasker {mask} at (-20,-20) size 240x240
+    RenderSVGContainer {g} at (0,0) size 100x100
+      [masker="mymask"] RenderSVGResourceMasker {mask} at (0,0) size 100x100
       RenderSVGContainer {g} at (0,0) size 200x200
         RenderPath {rect} at (0,0) size 200x200 [fill={[type=SOLID] [color=#FF0000]}] [data="M0.00,0.00 L200.00,0.00 L200.00,200.00 L0.00,200.00 Z"]
         RenderPath {rect} at (0,0) size 100x100 [fill={[type=SOLID] [color=#008000]}] [data="M0.00,0.00 L100.00,0.00 L100.00,100.00 L0.00,100.00 Z"]
index 4d69a3d..64f532d 100644 (file)
@@ -8,4 +8,4 @@ layer at (0,0) size 800x600
           RenderPath {rect} at (100,100) size 150x150 [fill={[type=SOLID] [color=#FFFFFF]}] [data="M0.00,0.00 L150.00,0.00 L150.00,150.00 L0.00,150.00 Z"]
     RenderPath {rect} at (100,100) size 100x100 [fill={[type=SOLID] [color=#FF0000]}] [data="M100.00,100.00 L200.00,100.00 L200.00,200.00 L100.00,200.00 Z"]
     RenderPath {rect} at (100,100) size 100x100 [fill={[type=SOLID] [color=#008000]}] [data="M100.00,100.00 L200.00,100.00 L200.00,200.00 L100.00,200.00 Z"]
-      [masker="mask"] RenderSVGResourceMasker {mask} at (90,90) size 120x120
+      [masker="mask"] RenderSVGResourceMasker {mask} at (100,100) size 110x110
index 1367fca..a9c546c 100644 (file)
@@ -1,3 +1,45 @@
+2010-05-10  Dirk Schulze  <krit@webkit.org>
+
+        Reviewed by Nikolas Zimmermann.
+
+        Further optimization for SVG's repaintRect calculation
+        https://bugs.webkit.org/show_bug.cgi?id=38820
+        
+        This is a further optimization to get smaller repaintRects on SVG objects
+        in combination with masker or clipper resources.
+        Masker takes the unite of all stroke boundaries of it's childs.
+        Both, clipper and masker, store this union to avoid multiple calls of the childs
+        and the unite calculations now.
+        The unite rect can be transformed to any targets objectBoundingBox, if the content
+        unit of the resource is set to objectBoundingBoxMode.
+        This speeds up the use of resources with multiple target objects.
+        
+        No behavior changes, the smaller repaintRects cause updates for DRT results.
+
+        * rendering/RenderSVGResource.h:
+        * rendering/RenderSVGResourceClipper.cpp:
+        (WebCore::RenderSVGResourceClipper::invalidateClients):
+        (WebCore::RenderSVGResourceClipper::calculateClipContentRepaintRect):
+        (WebCore::RenderSVGResourceClipper::resourceBoundingBox):
+        * rendering/RenderSVGResourceClipper.h:
+        * rendering/RenderSVGResourceFilter.cpp:
+        (WebCore::RenderSVGResourceFilter::resourceBoundingBox):
+        * rendering/RenderSVGResourceFilter.h:
+        * rendering/RenderSVGResourceGradient.h:
+        (WebCore::RenderSVGResourceGradient::resourceBoundingBox):
+        * rendering/RenderSVGResourceMarker.h:
+        (WebCore::RenderSVGResourceMarker::resourceBoundingBox):
+        * rendering/RenderSVGResourceMasker.cpp:
+        (WebCore::RenderSVGResourceMasker::invalidateClients):
+        (WebCore::RenderSVGResourceMasker::createMaskImage):
+        (WebCore::RenderSVGResourceMasker::calculateMaskContentRepaintRect):
+        (WebCore::RenderSVGResourceMasker::resourceBoundingBox):
+        * rendering/RenderSVGResourceMasker.h:
+        * rendering/RenderSVGResourcePattern.h:
+        (WebCore::RenderSVGResourcePattern::resourceBoundingBox):
+        * rendering/RenderSVGResourceSolidColor.h:
+        (WebCore::RenderSVGResourceSolidColor::resourceBoundingBox):
+
 2010-05-11  Ilya Tikhonovsky  <loislo@chromium.org>
 
         Reviewed by Pavel Feldman.
index f14fa4a..4e33e55 100644 (file)
@@ -60,7 +60,7 @@ public:
 
     virtual bool applyResource(RenderObject*, RenderStyle*, GraphicsContext*&, unsigned short resourceMode) = 0;
     virtual void postApplyResource(RenderObject*, GraphicsContext*&, unsigned short) { }
-    virtual FloatRect resourceBoundingBox(const FloatRect&) const = 0;
+    virtual FloatRect resourceBoundingBox(const FloatRect&) = 0;
 
     virtual RenderSVGResourceType resourceType() const = 0;
 
index 5a75491..65eeb2f 100644 (file)
@@ -65,6 +65,7 @@ void RenderSVGResourceClipper::invalidateClients()
     }
     deleteAllValues(m_clipper);
     m_clipper.clear();
+    m_clipBoundaries = FloatRect();
 }
 
 void RenderSVGResourceClipper::invalidateClient(RenderObject* object)
@@ -250,27 +251,35 @@ bool RenderSVGResourceClipper::createClipData(ClipperData* clipperData, const Fl
     return true;
 }
 
-FloatRect RenderSVGResourceClipper::resourceBoundingBox(const FloatRect& objectBoundingBox) const
+void RenderSVGResourceClipper::calculateClipContentRepaintRect()
 {
     // This is a rough heuristic to appraise the clip size and doesn't consider clip on clip.
-    FloatRect clipRect;
     for (Node* childNode = node()->firstChild(); childNode; childNode = childNode->nextSibling()) {
         RenderObject* renderer = childNode->renderer();
         if (!childNode->isSVGElement() || !static_cast<SVGElement*>(childNode)->isStyled() || !renderer)
             continue;
         if (!renderer->isRenderPath() && !renderer->isSVGText() && !renderer->isSVGShadowTreeRootContainer())
             continue;
-        clipRect.unite(renderer->localToParentTransform().mapRect(renderer->repaintRectInLocalCoordinates()));
+        RenderStyle* style = renderer->style();
+        if (!style || style->display() == NONE || style->visibility() != VISIBLE)
+             continue;
+        m_clipBoundaries.unite(renderer->localToParentTransform().mapRect(renderer->repaintRectInLocalCoordinates()));
     }
+}
+
+FloatRect RenderSVGResourceClipper::resourceBoundingBox(const FloatRect& objectBoundingBox)
+{
+    if (m_clipBoundaries.isEmpty())
+        calculateClipContentRepaintRect();
 
     if (static_cast<SVGClipPathElement*>(node())->clipPathUnits() == SVGUnitTypes::SVG_UNIT_TYPE_OBJECTBOUNDINGBOX) {
         AffineTransform transform;
         transform.translate(objectBoundingBox.x(), objectBoundingBox.y());
         transform.scaleNonUniform(objectBoundingBox.width(), objectBoundingBox.height());
-        return transform.mapRect(clipRect);
+        return transform.mapRect(m_clipBoundaries);
     }
 
-    return clipRect;
+    return m_clipBoundaries;
 }
 
 }
index 0b6f2b3..d8e2eed 100644 (file)
@@ -51,7 +51,7 @@ public:
     virtual void invalidateClient(RenderObject*);
 
     virtual bool applyResource(RenderObject*, RenderStyle*, GraphicsContext*&, unsigned short resourceMode);
-    virtual FloatRect resourceBoundingBox(const FloatRect&) const;
+    virtual FloatRect resourceBoundingBox(const FloatRect&);
 
     virtual RenderSVGResourceType resourceType() const { return ClipperResourceType; }
 
@@ -64,7 +64,9 @@ private:
     bool applyClippingToContext(RenderObject*, const FloatRect&, const FloatRect&, GraphicsContext*);
     bool pathOnlyClipping(GraphicsContext*, const FloatRect&);
     bool createClipData(ClipperData*, const FloatRect&, const FloatRect&);
+    void calculateClipContentRepaintRect();
 
+    FloatRect m_clipBoundaries;
     HashMap<RenderObject*, ClipperData*> m_clipper;
 };
 
index ac3ea49..ea30d77 100644 (file)
@@ -281,7 +281,7 @@ void RenderSVGResourceFilter::postApplyResource(RenderObject* object, GraphicsCo
     m_sourceGraphicBuffer.clear();
 }
 
-FloatRect RenderSVGResourceFilter::resourceBoundingBox(const FloatRect& objectBoundingBox) const
+FloatRect RenderSVGResourceFilter::resourceBoundingBox(const FloatRect& objectBoundingBox)
 {
     if (SVGFilterElement* element = static_cast<SVGFilterElement*>(node()))
         return element->filterBoundingBox(objectBoundingBox);
index ce4a7e1..6e98492 100644 (file)
@@ -68,7 +68,7 @@ public:
     virtual bool applyResource(RenderObject*, RenderStyle*, GraphicsContext*&, unsigned short resourceMode);
     virtual void postApplyResource(RenderObject*, GraphicsContext*&, unsigned short resourceMode);
 
-    virtual FloatRect resourceBoundingBox(const FloatRect&) const;
+    virtual FloatRect resourceBoundingBox(const FloatRect&);
 
     PassOwnPtr<SVGFilterBuilder> buildPrimitives();
 
index 2fd9cf4..4d848af 100644 (file)
@@ -54,7 +54,7 @@ public:
 
     virtual bool applyResource(RenderObject*, RenderStyle*, GraphicsContext*&, unsigned short resourceMode);
     virtual void postApplyResource(RenderObject*, GraphicsContext*&, unsigned short resourceMode);
-    virtual FloatRect resourceBoundingBox(const FloatRect&) const { return FloatRect(); }
+    virtual FloatRect resourceBoundingBox(const FloatRect&) { return FloatRect(); }
 
 protected:
     void addStops(GradientData*, const Vector<Gradient::ColorStop>&) const;
index efbbdfa..fe848a9 100644 (file)
@@ -58,7 +58,7 @@ public:
     AffineTransform markerTransformation(const FloatPoint& origin, float angle, float strokeWidth) const;
 
     virtual bool applyResource(RenderObject*, RenderStyle*, GraphicsContext*&, unsigned short) { return false; }
-    virtual FloatRect resourceBoundingBox(const FloatRect&) const { return FloatRect(); }
+    virtual FloatRect resourceBoundingBox(const FloatRect&) { return FloatRect(); }
 
     FloatPoint referencePoint() const;
     float angle() const;
index abf8e48..0ce82df 100644 (file)
@@ -65,6 +65,7 @@ void RenderSVGResourceMasker::invalidateClients()
 
     deleteAllValues(m_masker);
     m_masker.clear();
+    m_maskBoundaries = FloatRect();
 }
 
 void RenderSVGResourceMasker::invalidateClient(RenderObject* object)
@@ -111,14 +112,6 @@ bool RenderSVGResourceMasker::applyResource(RenderObject* object, RenderStyle*,
     return true;
 }
 
-FloatRect RenderSVGResourceMasker::resourceBoundingBox(const FloatRect& objectBoundingBox) const
-{
-    if (SVGMaskElement* element = static_cast<SVGMaskElement*>(node()))
-        return element->maskBoundingBox(objectBoundingBox);
-
-    return FloatRect();
-}
-
 void RenderSVGResourceMasker::createMaskImage(MaskerData* maskerData, const SVGMaskElement* maskElement, RenderObject* object)
 {
     FloatRect objectBoundingBox = object->objectBoundingBox();
@@ -129,19 +122,11 @@ void RenderSVGResourceMasker::createMaskImage(MaskerData* maskerData, const SVGM
         maskerData->emptyMask = true;
         return;
     }
+    
+    if (m_maskBoundaries.isEmpty())
+        calculateMaskContentRepaintRect();
 
-    // Calculate the smallest rect for the mask ImageBuffer.
-    FloatRect repaintRect;
-    Vector<RenderObject*> rendererList;
-    for (Node* node = maskElement->firstChild(); node; node = node->nextSibling()) {
-        RenderObject* renderer = node->renderer();
-        if (!node->isSVGElement() || !static_cast<SVGElement*>(node)->isStyled() || !renderer)
-            continue;
-
-        rendererList.append(renderer);
-        repaintRect.unite(renderer->localToParentTransform().mapRect(renderer->repaintRectInLocalCoordinates()));
-    }
-
+    FloatRect repaintRect = m_maskBoundaries;
     AffineTransform contextTransform;
     // We need to scale repaintRect for objectBoundingBox to get the drawing area.
     if (maskElement->maskContentUnits() == SVGUnitTypes::SVG_UNIT_TYPE_OBJECTBOUNDINGBOX) {
@@ -180,9 +165,15 @@ void RenderSVGResourceMasker::createMaskImage(MaskerData* maskerData, const SVGM
     maskImageContext->concatCTM(contextTransform);
 
     // draw the content into the ImageBuffer
-    Vector<RenderObject*>::iterator end = rendererList.end();
-    for (Vector<RenderObject*>::iterator it = rendererList.begin(); it != end; it++)
-        renderSubtreeToImage(maskerData->maskImage.get(), *it);
+    for (Node* node = maskElement->firstChild(); node; node = node->nextSibling()) {
+        RenderObject* renderer = node->renderer();
+        if (!node->isSVGElement() || !static_cast<SVGElement*>(node)->isStyled() || !renderer)
+            continue;
+        RenderStyle* style = renderer->style();
+        if (!style || style->display() == NONE || style->visibility() != VISIBLE)
+            continue;
+        renderSubtreeToImage(maskerData->maskImage.get(), renderer);
+    }
 
     maskImageContext->restore();
 
@@ -205,4 +196,38 @@ void RenderSVGResourceMasker::createMaskImage(MaskerData* maskerData, const SVGM
     maskerData->maskImage->putUnmultipliedImageData(imageData.get(), maskImageRect, IntPoint());
 }
 
+void RenderSVGResourceMasker::calculateMaskContentRepaintRect()
+{
+    for (Node* childNode = node()->firstChild(); childNode; childNode = childNode->nextSibling()) {
+        RenderObject* renderer = childNode->renderer();
+        if (!childNode->isSVGElement() || !static_cast<SVGElement*>(childNode)->isStyled() || !renderer)
+            continue;
+        RenderStyle* style = renderer->style();
+        if (!style || style->display() == NONE || style->visibility() != VISIBLE)
+             continue;
+        m_maskBoundaries.unite(renderer->localToParentTransform().mapRect(renderer->repaintRectInLocalCoordinates()));
+    }
+}
+
+FloatRect RenderSVGResourceMasker::resourceBoundingBox(const FloatRect& objectBoundingBox)
+{
+    if (m_maskBoundaries.isEmpty())
+        calculateMaskContentRepaintRect();
+
+    SVGMaskElement* maskElement = static_cast<SVGMaskElement*>(node());
+    if (!maskElement)
+        return FloatRect();
+
+    FloatRect maskRect = m_maskBoundaries;
+    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.intersect(maskElement->maskBoundingBox(objectBoundingBox));
+    return maskRect;
+}
+
 }
index b022f7b..2de5f3f 100644 (file)
@@ -57,7 +57,7 @@ public:
     virtual void invalidateClient(RenderObject*);
 
     virtual bool applyResource(RenderObject*, RenderStyle*, GraphicsContext*&, unsigned short resourceMode);
-    virtual FloatRect resourceBoundingBox(const FloatRect&) const;
+    virtual FloatRect resourceBoundingBox(const FloatRect&);
 
     SVGUnitTypes::SVGUnitType maskUnits() const { return toUnitType(static_cast<SVGMaskElement*>(node())->maskUnits()); }
     SVGUnitTypes::SVGUnitType maskContentUnits() const { return toUnitType(static_cast<SVGMaskElement*>(node())->maskContentUnits()); }
@@ -67,7 +67,9 @@ public:
 
 private:
     void createMaskImage(MaskerData*, const SVGMaskElement*, RenderObject*);
+    void calculateMaskContentRepaintRect();
 
+    FloatRect m_maskBoundaries;
     HashMap<RenderObject*, MaskerData*> m_masker;
 };
 
index 2f9d553..4129934 100644 (file)
@@ -54,7 +54,7 @@ public:
 
     virtual bool applyResource(RenderObject*, RenderStyle*, GraphicsContext*&, unsigned short resourceMode);
     virtual void postApplyResource(RenderObject*, GraphicsContext*&, unsigned short resourceMode);
-    virtual FloatRect resourceBoundingBox(const FloatRect&) const { return FloatRect(); }
+    virtual FloatRect resourceBoundingBox(const FloatRect&) { return FloatRect(); }
 
     virtual RenderSVGResourceType resourceType() const { return s_resourceType; }
     static RenderSVGResourceType s_resourceType;
index a1a8863..a4de62d 100644 (file)
@@ -38,7 +38,7 @@ public:
 
     virtual bool applyResource(RenderObject*, RenderStyle*, GraphicsContext*&, unsigned short resourceMode);
     virtual void postApplyResource(RenderObject*, GraphicsContext*&, unsigned short resourceMode);
-    virtual FloatRect resourceBoundingBox(const FloatRect&) const { return FloatRect(); }
+    virtual FloatRect resourceBoundingBox(const FloatRect&) { return FloatRect(); }
 
     virtual RenderSVGResourceType resourceType() const { return s_resourceType; }
     static RenderSVGResourceType s_resourceType;