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

Unified Diff: gm/gradients.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 | « gm/gradient_matrix.cpp ('k') | gm/hairlines.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gm/gradients.cpp
diff --git a/gm/gradients.cpp b/gm/gradients.cpp
index 8208d622406993768eaeacf7c17415dfe5fc9450..d4617bc813d39eb0093488697a5014744db7aae2 100644
--- a/gm/gradients.cpp
+++ b/gm/gradients.cpp
@@ -262,7 +262,7 @@ protected:
this->drawBG(canvas);
SkColor colors[] = { SK_ColorRED, SK_ColorGREEN, SK_ColorGREEN, SK_ColorRED };
- SkScalar pos[] = { 0, SkFloatToScalar(0.01f), SkFloatToScalar(0.99f), SK_Scalar1 };
+ SkScalar pos[] = { 0, 0.01f, 0.99f, SK_Scalar1 };
SkPoint c0;
c0.iset(-80, 25);
SkScalar r0 = SkIntToScalar(70);
@@ -343,9 +343,9 @@ protected:
center.set(SkIntToScalar(dim.width())/2, SkIntToScalar(dim.height())/2);
SkScalar radius = SkIntToScalar(dim.width())/2;
const SkColor colors[] = { 0x7f7f7f7f, 0x7f7f7f7f, 0xb2000000 };
- const SkScalar pos[] = { SkFloatToScalar(0.0f),
- SkFloatToScalar(0.35f),
- SkFloatToScalar(1.0f) };
+ const SkScalar pos[] = { 0.0f,
+ 0.35f,
+ 1.0f };
SkShader* shader =
SkGradientShader::CreateRadial(center, radius, colors,
pos, SK_ARRAY_COUNT(pos),
« no previous file with comments | « gm/gradient_matrix.cpp ('k') | gm/hairlines.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698