Poor performance on IE's Chalkboard benchmark.
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 29 Jan 2015 05:23:28 +0000 (05:23 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 29 Jan 2015 05:23:28 +0000 (05:23 +0000)
commit4a63ae9c65db8fbfe3178c61c0808f793f5a4522
tree2f31b4f3f3256ecc5a70918195799620fd9cf365
parent4565859ff73b1d35abe9fbfaba33d47679255678
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
PerformanceTests/ChangeLog
PerformanceTests/SVG/UnderTheSeeBenchmark.html [new file with mode: 0644]
PerformanceTests/SVG/WorldcupBenchmark.html [new file with mode: 0644]
PerformanceTests/SVG/resources/RenderAnimator.css [new file with mode: 0644]
PerformanceTests/SVG/resources/RenderAnimator.js [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/svg/graphics/SVGImage.cpp