Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(410)

Unified Diff: Source/core/svg/graphics/SVGImage.cpp

Issue 17800002: Speed up SVG sprites by only painting the source rect in SVGImage::draw (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/svg/graphics/SVGImage.cpp
diff --git a/Source/core/svg/graphics/SVGImage.cpp b/Source/core/svg/graphics/SVGImage.cpp
index 1a96062555c07d557ab36d7f79a74587379b0aa7..b248d0b787b4b37c1f827eda493e373dc30b27f9 100644
--- a/Source/core/svg/graphics/SVGImage.cpp
+++ b/Source/core/svg/graphics/SVGImage.cpp
@@ -217,7 +217,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();
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698