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

Unified Diff: Source/core/html/canvas/CanvasRenderingContext2D.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/frame/LocalFrame.cpp ('k') | Source/core/page/PrintContext.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/html/canvas/CanvasRenderingContext2D.cpp
diff --git a/Source/core/html/canvas/CanvasRenderingContext2D.cpp b/Source/core/html/canvas/CanvasRenderingContext2D.cpp
index 1c92df5400c91c95558a8266871c7923bbed128c..0bdca984ee530ef3252f0f977a605630641cf683 100644
--- a/Source/core/html/canvas/CanvasRenderingContext2D.cpp
+++ b/Source/core/html/canvas/CanvasRenderingContext2D.cpp
@@ -726,7 +726,7 @@ void CanvasRenderingContext2D::scale(float sx, float sy)
}
modifiableState().m_transform = newTransform;
- c->scale(FloatSize(sx, sy));
+ c->scale(sx, sy);
m_path.transform(AffineTransform().scaleNonUniform(1.0 / sx, 1.0 / sy));
}
@@ -1539,7 +1539,7 @@ void CanvasRenderingContext2D::drawVideo(HTMLVideoElement* video, FloatRect srcR
GraphicsContextStateSaver stateSaver(*c);
c->clip(dstRect);
c->translate(dstRect.x(), dstRect.y());
- c->scale(FloatSize(dstRect.width() / srcRect.width(), dstRect.height() / srcRect.height()));
+ c->scale(dstRect.width() / srcRect.width(), dstRect.height() / srcRect.height());
c->translate(-srcRect.x(), -srcRect.y());
video->paintCurrentFrameInContext(c, IntRect(IntPoint(), IntSize(video->videoWidth(), video->videoHeight())));
stateSaver.restore();
@@ -2187,7 +2187,7 @@ void CanvasRenderingContext2D::drawTextInternal(const String& text, float x, flo
if (useMaxWidth) {
c->translate(location.x(), location.y());
// We draw when fontWidth is 0 so compositing operations (eg, a "copy" op) still work.
- c->scale(FloatSize((fontWidth > 0 ? (width / fontWidth) : 0), 1));
+ c->scale((fontWidth > 0 ? (width / fontWidth) : 0), 1);
location = FloatPoint();
}
« no previous file with comments | « Source/core/frame/LocalFrame.cpp ('k') | Source/core/page/PrintContext.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698