Changeset 56644 in webkit


Ignore:
Timestamp:
Mar 26, 2010 3:12:47 PM (14 years ago)
Author:
Beth Dakin
Message:

WebCore: Partial fix for https://bugs.webkit.org/show_bug.cgi?id=36564
Performance regression for setting content of <text> in SVG
-and corresponding-
<rdar://problem/7693963>

Reviewed by Darin Adler.

toClipPath() is extremely inefficient, so this patch removes the
call to it from RenderSVGResourceClipper::resourceBoundingBox()
which is very hot code in SVG with clip-paths. It is sufficient to
call unite with the objectBoundingBox(), which will return early if
objectBoundingBox() is empty.

  • rendering/RenderSVGResourceClipper.cpp:

(WebCore::RenderSVGResourceClipper::resourceBoundingBox):

LayoutTests: Updated test for https://bugs.webkit.org/show_bug.cgi?id=36564
Performance regression for setting content of <text> in SVG
-and corresponding-
<rdar://problem/7693963>

Reviewed by Darin Adler.

  • platform/mac/svg/custom/clip-path-referencing-use2-expected.txt:
Location:
trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r56641 r56644  
     12010-03-26  Beth Dakin  <bdakin@apple.com>
     2
     3        Reviewed by Darin Adler.
     4
     5        Updated test for https://bugs.webkit.org/show_bug.cgi?id=36564
     6        Performance regression for setting content of <text> in SVG
     7        -and corresponding-
     8        <rdar://problem/7693963>
     9
     10        * platform/mac/svg/custom/clip-path-referencing-use2-expected.txt:
     11
    1122010-03-26  Joseph Pecoraro  <joepeck@webkit.org>
    213
  • trunk/LayoutTests/platform/mac/svg/custom/clip-path-referencing-use2-expected.txt

    r55289 r56644  
    1 CONSOLE MESSAGE: line 1: Error: Not allowed to use indirect reference in <clip-path>
    2 CONSOLE MESSAGE: line 1: Error: Not allowed to use indirect reference in <clip-path>
    3 CONSOLE MESSAGE: line 1: Error: Not allowed to use indirect reference in <clip-path>
    4 CONSOLE MESSAGE: line 1: Error: Not allowed to use indirect reference in <clip-path>
    5 CONSOLE MESSAGE: line 1: Error: Not allowed to use indirect reference in <clip-path>
    6 CONSOLE MESSAGE: line 1: Error: Not allowed to use indirect reference in <clip-path>
    7 CONSOLE MESSAGE: line 1: Error: Not allowed to use indirect reference in <clip-path>
    8 CONSOLE MESSAGE: line 1: Error: Not allowed to use indirect reference in <clip-path>
    9 CONSOLE MESSAGE: line 1: Error: Not allowed to use indirect reference in <clip-path>
    10 CONSOLE MESSAGE: line 1: Error: Not allowed to use indirect reference in <clip-path>
    11 CONSOLE MESSAGE: line 1: Error: Not allowed to use indirect reference in <clip-path>
    12 CONSOLE MESSAGE: line 1: Error: Not allowed to use indirect reference in <clip-path>
    13 CONSOLE MESSAGE: line 1: Error: Not allowed to use indirect reference in <clip-path>
    14 CONSOLE MESSAGE: line 1: Error: Not allowed to use indirect reference in <clip-path>
    15 CONSOLE MESSAGE: line 1: Error: Not allowed to use indirect reference in <clip-path>
    16 CONSOLE MESSAGE: line 1: Error: Not allowed to use indirect reference in <clip-path>
    17 CONSOLE MESSAGE: line 1: Error: Not allowed to use indirect reference in <clip-path>
    18 CONSOLE MESSAGE: line 1: Error: Not allowed to use indirect reference in <clip-path>
    19 CONSOLE MESSAGE: line 1: Error: Not allowed to use indirect reference in <clip-path>
    20 CONSOLE MESSAGE: line 1: Error: Not allowed to use indirect reference in <clip-path>
    211CONSOLE MESSAGE: line 1: Error: Not allowed to use indirect reference in <clip-path>
    222layer at (0,0) size 800x600
     
    3515              RenderPath {rect} at (0,0) size 50x50 [fill={[type=SOLID] [color=#000000]}] [data="M0.00,0.00 L50.00,0.00 L50.00,50.00 L0.00,50.00 Z"]
    3616    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"]
    37     RenderSVGContainer {g} at (0,0) size 100x100
    38       [clipPath="clip"] RenderSVGResourceClipper {clipPath} at (0,0) size 0x0
     17    RenderSVGContainer {g} at (0,0) size 50x50
     18      [clipPath="clip"] RenderSVGResourceClipper {clipPath} at (0,0) size 50x50
    3919      RenderPath {rect} at (0,0) size 100x100 [fill={[type=SOLID] [color=#FF0000]}] [data="M0.00,0.00 L100.00,0.00 L100.00,100.00 L0.00,100.00 Z"]
    4020    RenderSVGText {text} at (10,120) size 377x18 contains 1 chunk(s)
  • trunk/WebCore/ChangeLog

    r56641 r56644  
     12010-03-26 Beth Dakin <bdakin@apple.com>
     2
     3        Reviewed by Darin Adler.
     4
     5        Partial fix for https://bugs.webkit.org/show_bug.cgi?id=36564
     6        Performance regression for setting content of <text> in SVG
     7        -and corresponding-
     8        <rdar://problem/7693963>
     9
     10        toClipPath() is extremely inefficient, so this patch removes the
     11        call to it from RenderSVGResourceClipper::resourceBoundingBox()
     12        which is very hot code in SVG with clip-paths. It is sufficient to
     13        call unite with the objectBoundingBox(), which will return early if
     14        objectBoundingBox() is empty.
     15
     16        * rendering/RenderSVGResourceClipper.cpp:
     17        (WebCore::RenderSVGResourceClipper::resourceBoundingBox):
     18
    1192010-03-26  Joseph Pecoraro  <joepeck@webkit.org>
    220
  • trunk/WebCore/rendering/RenderSVGResourceClipper.cpp

    r55289 r56644  
    130130        SVGStyledTransformableElement* styled = static_cast<SVGStyledTransformableElement*>(childNode);
    131131        RenderStyle* style = styled->renderer() ? styled->renderer()->style() : 0;
    132         if (!style || style->display() == NONE || styled->toClipPath().isEmpty())
     132        if (!style || style->display() == NONE)
    133133            continue;
    134134        clipRect.unite(styled->renderer()->objectBoundingBox());
Note: See TracChangeset for help on using the changeset viewer.