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

Unified Diff: src/animator/SkDrawColor.cpp

Issue 111353003: deprecate SkScalarRound (and its ilk), use SkScalarRound[ToInt,ToScalar]. #define SK_SUPPORT_DEPREC… (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 7 years 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 | « src/animator/SkDisplayMath.cpp ('k') | src/animator/SkOperandIterpolator.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/animator/SkDrawColor.cpp
diff --git a/src/animator/SkDrawColor.cpp b/src/animator/SkDrawColor.cpp
index 00c429b5a1842132fdc48f604155a99b96d40c23..eb57d9dad49ed041e0c748d2db95718786357955 100644
--- a/src/animator/SkDrawColor.cpp
+++ b/src/animator/SkDrawColor.cpp
@@ -69,7 +69,7 @@ static SkColor HSV_to_RGB(SkColor color, HSV_Choice choice, SkScalar hsv) {
red = green = blue = value;
else {
//SkScalar fraction = SkScalarMod(hue, 60 * SK_Scalar1);
- int sextant = SkScalarFloor(hue / 60);
+ int sextant = SkScalarFloorToInt(hue / 60);
SkScalar fraction = hue / 60 - SkIntToScalar(sextant);
SkScalar p = SkScalarMul(value , SK_Scalar1 - saturation);
SkScalar q = SkScalarMul(value, SK_Scalar1 - SkScalarMul(saturation, fraction));
@@ -85,8 +85,8 @@ static SkColor HSV_to_RGB(SkColor color, HSV_Choice choice, SkScalar hsv) {
}
}
//used to say SkToU8((U8CPU) red) etc
- return SkColorSetARGB(SkColorGetA(color), SkScalarRound(red),
- SkScalarRound(green), SkScalarRound(blue));
+ return SkColorSetARGB(SkColorGetA(color), SkScalarRoundToInt(red),
+ SkScalarRoundToInt(green), SkScalarRoundToInt(blue));
}
#if defined _WIN32 && _MSC_VER >= 1300
« no previous file with comments | « src/animator/SkDisplayMath.cpp ('k') | src/animator/SkOperandIterpolator.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698