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

Unified Diff: src/core/SkMaskGamma.h

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/core/SkLineClipper.cpp ('k') | src/core/SkMaskGamma.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkMaskGamma.h
diff --git a/src/core/SkMaskGamma.h b/src/core/SkMaskGamma.h
index fafe4ac7761d6b59c988b80682920bdbbab21436..9d3fd9a344837ade23f5c6721c56d28099df99c8 100644
--- a/src/core/SkMaskGamma.h
+++ b/src/core/SkMaskGamma.h
@@ -35,9 +35,9 @@ public:
SkScalar r = luminance.toLuma(gamma, SkIntToScalar(SkColorGetR(c)) / 255);
SkScalar g = luminance.toLuma(gamma, SkIntToScalar(SkColorGetG(c)) / 255);
SkScalar b = luminance.toLuma(gamma, SkIntToScalar(SkColorGetB(c)) / 255);
- SkScalar luma = r * SkFloatToScalar(SK_LUM_COEFF_R) +
- g * SkFloatToScalar(SK_LUM_COEFF_G) +
- b * SkFloatToScalar(SK_LUM_COEFF_B);
+ SkScalar luma = r * SK_LUM_COEFF_R +
+ g * SK_LUM_COEFF_G +
+ b * SK_LUM_COEFF_B;
SkASSERT(luma <= SK_Scalar1);
return SkScalarRoundToInt(luminance.fromLuma(gamma, luma) * 255);
}
« no previous file with comments | « src/core/SkLineClipper.cpp ('k') | src/core/SkMaskGamma.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698