Poor performance on IE's Chalkboard benchmark.
https://bugs.webkit.org/show_bug.cgi?id=140753.
Patch by Said Abou-Hallawa <sabouhallawa@apple.com> on 2015-01-28
Reviewed by Zalan Bujtas.
PerformanceTests:
* SVG/UnderTheSeeBenchmark.html: Added
* SVG/WorldcupBenchmark.html: Added.
* SVG/resources/RenderAnimator.css: Added.
* SVG/resources/RenderAnimator.js: Added.
These are benchmarks for the SVG rendering. Mainly we want to measure how fast
the SVG rendering will be when only a small part of it is drawn.
Source/WebCore:
Test: PerformanceTests/SVG/UnderTheSeeBenchmark.html
PerformanceTests/SVG/WorldcupBenchmark.html
The SVG rendering code was not skipping the SVG elements which are outside the
clipping rectangle. We were drawing all the SVG elements even if some of them
are completely outside the clipping rectangle. The fix is to pass the correct
dirty rectangle to the ScrollView which then gets propagated to the SVG renderers.
* svg/graphics/SVGImage.cpp:
(WebCore::SVGImage::draw):
SVGImage::draw() needs to pass the intersection of 'srcRect' and context->clipBounds(),
to ScrollView::paint(). This will ensure RenderSVGShape::paint() gets the correct
clipping rectangle. If there is no intersection between the boundingBox of the
RenderSVGShape and the clipping rectangle, the RenderSVGShape will not be drawn.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@179335
268f45cc-cd09-0410-ab3c-
d52691b4dbfc