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

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

Issue 323013004: Clean up transform methods in GraphicsContext. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: 2nd Attempt Mac build fix Created 6 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 | « Source/core/rendering/svg/SVGRenderingContext.cpp ('k') | Source/platform/DragImage.cpp » ('j') | 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 240ad44a39e9fd60f98502f9986da5316002e6b1..8b0ec9f54637d5596165c55aa2dd8dcaf5f6d407 100644
--- a/Source/core/svg/graphics/SVGImage.cpp
+++ b/Source/core/svg/graphics/SVGImage.cpp
@@ -226,6 +226,8 @@ void SVGImage::drawPatternForContainer(GraphicsContext* context, const FloatSize
// The ImageBuffer size needs to be scaled to match the final resolution.
// FIXME: No need to get the full CTM here, we just need the scale.
+ // FIXME: See crbug.com/382491. This scale does not reflect compositor applied
+ // scale factors, such a High DPI or device zoom.
AffineTransform transform = context->getCTM();
FloatSize imageBufferScale = FloatSize(transform.xScale(), transform.yScale());
ASSERT(imageBufferScale.width());
@@ -276,7 +278,7 @@ void SVGImage::draw(GraphicsContext* context, const FloatRect& dstRect, const Fl
FloatPoint destOffset = dstRect.location() - topLeftOffset;
context->translate(destOffset.x(), destOffset.y());
- context->scale(scale);
+ context->scale(scale.width(), scale.height());
FrameView* view = frameView();
view->resize(containerSize());
« no previous file with comments | « Source/core/rendering/svg/SVGRenderingContext.cpp ('k') | Source/platform/DragImage.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698