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

Unified Diff: gm/glyph_pos.cpp

Issue 1138263002: 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 | « experimental/StrokePathRenderer/GrStrokePathRenderer.cpp ('k') | gm/gradients.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gm/glyph_pos.cpp
diff --git a/gm/glyph_pos.cpp b/gm/glyph_pos.cpp
index 16cdfca11a8a0fda5c66d3b44395a6ae534e566c..0da59ac6f9e78534b3ba87c17224a2d6cc59e573 100644
--- a/gm/glyph_pos.cpp
+++ b/gm/glyph_pos.cpp
@@ -82,8 +82,10 @@
canvas->scale(3.0f, 3.0f);
SkMatrix skew;
skew.setIdentity();
- skew.setSkewX(8.0f / 25.0f);
- skew.setSkewY(2.0f / 25.0f);
+ skew.setSkewX(SkScalarDiv(8.0f,
+ 25.0f));
+ skew.setSkewY(SkScalarDiv(2.0f,
+ 25.0f));
canvas->concat(skew);
drawTestCase(canvas, 1.0f);
canvas->restore();
@@ -93,9 +95,11 @@
canvas->save();
SkMatrix perspective;
perspective.setIdentity();
- perspective.setPerspX(-SkScalarInvert(340));
- perspective.setSkewX(8.0f / 25.0f);
- perspective.setSkewY(2.0f / 25.0f);
+ perspective.setPerspX(-SkScalarDiv(SK_Scalar1, 340.0f));
+ perspective.setSkewX(SkScalarDiv(8.0f,
+ 25.0f));
+ perspective.setSkewY(SkScalarDiv(2.0f,
+ 25.0f));
canvas->concat(perspective);
« no previous file with comments | « experimental/StrokePathRenderer/GrStrokePathRenderer.cpp ('k') | gm/gradients.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698