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

Unified Diff: include/core/SkPoint.h

Issue 1135693003: Revert of Revert of stop calling SkScalarDiv (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 7 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 | « include/core/SkMatrix.h ('k') | include/core/SkScalar.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/core/SkPoint.h
diff --git a/include/core/SkPoint.h b/include/core/SkPoint.h
index 4a97391c70e7d71a3029367ce2483a58134b32a5..52d01ae88ce532c1f3290bea5c7e0f97c9e65792 100644
--- a/include/core/SkPoint.h
+++ b/include/core/SkPoint.h
@@ -348,6 +348,16 @@
fY -= v.fY;
}
+ SkPoint operator*(SkScalar scale) const {
+ return Make(fX * scale, fY * scale);
+ }
+
+ SkPoint& operator*=(SkScalar scale) {
+ fX *= scale;
+ fY *= scale;
+ return *this;
+ }
+
/**
* Returns true if both X and Y are finite (not infinity or NaN)
*/
« no previous file with comments | « include/core/SkMatrix.h ('k') | include/core/SkScalar.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698