Speed up SVG sprites by only painting the source rect in SVGImage::draw
authorrniwa@webkit.org <rniwa@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 26 Jun 2013 21:04:41 +0000 (21:04 +0000)
committerrniwa@webkit.org <rniwa@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 26 Jun 2013 21:04:41 +0000 (21:04 +0000)
https://bugs.webkit.org/show_bug.cgi?id=118070

Reviewed by Tim Horton.

Merge https://chromium.googlesource.com/chromium/blink/+/d359ab67fdd76a877d666dca91c311505dd27bbf.

* svg/graphics/SVGImage.cpp:
(WebCore::SVGImage::draw):

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

Source/WebCore/ChangeLog
Source/WebCore/svg/graphics/SVGImage.cpp

index 01d4c58d446d93277d382c2712e6099a060954fc..1d9efae8204fe2bfa7ce04df46eff01ef83a9ac3 100644 (file)
@@ -1,3 +1,15 @@
+2013-06-26  Ryosuke Niwa  <rniwa@webkit.org>
+
+        Speed up SVG sprites by only painting the source rect in SVGImage::draw
+        https://bugs.webkit.org/show_bug.cgi?id=118070
+
+        Reviewed by Tim Horton.
+
+        Merge https://chromium.googlesource.com/chromium/blink/+/d359ab67fdd76a877d666dca91c311505dd27bbf.
+
+        * svg/graphics/SVGImage.cpp:
+        (WebCore::SVGImage::draw):
+
 2013-06-26  David Kilzer  <ddkilzer@apple.com>
 
         BUILD FIX (r151981): Include HTMLAudioElement.h for ENABLE(PLUGIN_PROXY_FOR_VIDEO)
index 53fd8648a636997ea727441495892034596a30d2..fc14b7616a79a85f8d1bea34a709169622c29134 100644 (file)
@@ -219,7 +219,7 @@ void SVGImage::draw(GraphicsContext* context, const FloatRect& dstRect, const Fl
     if (view->needsLayout())
         view->layout();
 
-    view->paint(context, IntRect(0, 0, view->width(), view->height()));
+    view->paint(context, enclosingIntRect(srcRect));
 
     if (compositeOp != CompositeSourceOver)
         context->endTransparencyLayer();