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

Unified Diff: gm/shaderbounds.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/roundrects.cpp ('k') | gm/simpleaaclip.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gm/shaderbounds.cpp
diff --git a/gm/shaderbounds.cpp b/gm/shaderbounds.cpp
index 9529151c5f6ef4afe066318a9d34e4e303579bde..ef9a7e9015e3b042c5804a93c10261136db0832e 100644
--- a/gm/shaderbounds.cpp
+++ b/gm/shaderbounds.cpp
@@ -41,7 +41,7 @@ protected:
virtual SkMatrix onGetInitialTransform() const SK_OVERRIDE {
SkMatrix result;
- SkScalar scale = SkFloatToScalar(0.8f);
+ SkScalar scale = 0.8f;
result.setScale(scale, scale);
result.postTranslate(SkIntToScalar(7), SkIntToScalar(23));
return result;
@@ -54,7 +54,7 @@ protected:
SkIntToScalar(240)));
SkMatrix canvasScale;
- SkScalar scale = SkFloatToScalar(0.7f);
+ SkScalar scale = 0.7f;
canvasScale.setScale(scale, scale);
canvas->concat(canvasScale);
@@ -74,9 +74,9 @@ protected:
}
SkShader* MakeShader(int width, int height, bool background) {
- SkScalar scale = SkFloatToScalar(0.5f);
+ SkScalar scale = 0.5f;
if (background) {
- scale = SkFloatToScalar(0.6f);
+ scale = 0.6f;
}
SkScalar shaderWidth = SkScalarDiv(SkIntToScalar(width), scale);
SkScalar shaderHeight = SkScalarDiv(SkIntToScalar(height), scale);
« no previous file with comments | « gm/roundrects.cpp ('k') | gm/simpleaaclip.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698