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

Unified Diff: src/effects/SkColorMatrix.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 | « src/effects/SkBlurMaskFilter.cpp ('k') | src/effects/SkDisplacementMapEffect.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/effects/SkColorMatrix.cpp
diff --git a/src/effects/SkColorMatrix.cpp b/src/effects/SkColorMatrix.cpp
index d6cb9405fc6f3af8ae399bed4138255b5eee4996..535d6cc247183eda96d9e9837d20c816ea5bced7 100644
--- a/src/effects/SkColorMatrix.cpp
+++ b/src/effects/SkColorMatrix.cpp
@@ -108,9 +108,9 @@ static void setrow(SkScalar row[], SkScalar r, SkScalar g, SkScalar b) {
row[2] = b;
}
-static const SkScalar kHueR = SkFloatToScalar(0.213f);
-static const SkScalar kHueG = SkFloatToScalar(0.715f);
-static const SkScalar kHueB = SkFloatToScalar(0.072f);
+static const SkScalar kHueR = 0.213f;
+static const SkScalar kHueG = 0.715f;
+static const SkScalar kHueB = 0.072f;
void SkColorMatrix::setSaturation(SkScalar sat) {
memset(fMat, 0, sizeof(fMat));
@@ -125,17 +125,17 @@ void SkColorMatrix::setSaturation(SkScalar sat) {
fMat[18] = SK_Scalar1;
}
-static const SkScalar kR2Y = SkFloatToScalar(0.299f);
-static const SkScalar kG2Y = SkFloatToScalar(0.587f);
-static const SkScalar kB2Y = SkFloatToScalar(0.114f);
+static const SkScalar kR2Y = 0.299f;
+static const SkScalar kG2Y = 0.587f;
+static const SkScalar kB2Y = 0.114f;
-static const SkScalar kR2U = SkFloatToScalar(-0.16874f);
-static const SkScalar kG2U = SkFloatToScalar(-0.33126f);
-static const SkScalar kB2U = SkFloatToScalar(0.5f);
+static const SkScalar kR2U = -0.16874f;
+static const SkScalar kG2U = -0.33126f;
+static const SkScalar kB2U = 0.5f;
-static const SkScalar kR2V = SkFloatToScalar(0.5f);
-static const SkScalar kG2V = SkFloatToScalar(-0.41869f);
-static const SkScalar kB2V = SkFloatToScalar(-0.08131f);
+static const SkScalar kR2V = 0.5f;
+static const SkScalar kG2V = -0.41869f;
+static const SkScalar kB2V = -0.08131f;
void SkColorMatrix::setRGB2YUV() {
memset(fMat, 0, sizeof(fMat));
@@ -146,10 +146,10 @@ void SkColorMatrix::setRGB2YUV() {
fMat[18] = SK_Scalar1;
}
-static const SkScalar kV2R = SkFloatToScalar(1.402f);
-static const SkScalar kU2G = SkFloatToScalar(-0.34414f);
-static const SkScalar kV2G = SkFloatToScalar(-0.71414f);
-static const SkScalar kU2B = SkFloatToScalar(1.772f);
+static const SkScalar kV2R = 1.402f;
+static const SkScalar kU2G = -0.34414f;
+static const SkScalar kV2G = -0.71414f;
+static const SkScalar kU2B = 1.772f;
void SkColorMatrix::setYUV2RGB() {
memset(fMat, 0, sizeof(fMat));
« no previous file with comments | « src/effects/SkBlurMaskFilter.cpp ('k') | src/effects/SkDisplacementMapEffect.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698