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

Unified Diff: samplecode/SampleAll.cpp

Issue 85463005: remove SkFloatToScalar macro (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: add flag to expose SkFloatToScalar to chromium Created 7 years, 1 month 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 | « samplecode/SampleAARects.cpp ('k') | samplecode/SampleApp.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: samplecode/SampleAll.cpp
diff --git a/samplecode/SampleAll.cpp b/samplecode/SampleAll.cpp
index 133b653c071eb12b54eeb98a604e544749ec151b..8907a349e83a5a9ed49b70f0c014c51a9ab999c1 100644
--- a/samplecode/SampleAll.cpp
+++ b/samplecode/SampleAll.cpp
@@ -285,8 +285,8 @@ protected:
path.addCircle(SkIntToScalar(20), SkIntToScalar(20), SkIntToScalar(20),
SkPath::kCCW_Direction);
for (int index = 0; index < 10; index++) {
- SkScalar x = SkFloatToScalar((float) cos(index / 10.0f * 2 * 3.1415925358f));
- SkScalar y = SkFloatToScalar((float) sin(index / 10.0f * 2 * 3.1415925358f));
+ SkScalar x = (float) cos(index / 10.0f * 2 * 3.1415925358f);
+ SkScalar y = (float) sin(index / 10.0f * 2 * 3.1415925358f);
x *= index & 1 ? 7 : 14;
y *= index & 1 ? 7 : 14;
x += SkIntToScalar(20);
« no previous file with comments | « samplecode/SampleAARects.cpp ('k') | samplecode/SampleApp.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698