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

Unified Diff: src/effects/SkBlurMask.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/SkBicubicImageFilter.cpp ('k') | src/effects/SkBlurMaskFilter.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/effects/SkBlurMask.cpp
diff --git a/src/effects/SkBlurMask.cpp b/src/effects/SkBlurMask.cpp
index 97a623426b2b2d3486f7ffaf27b55b45ab9664c3..d2484c84b79511a54f8aea4a5d4a5769cd826698 100644
--- a/src/effects/SkBlurMask.cpp
+++ b/src/effects/SkBlurMask.cpp
@@ -21,7 +21,7 @@ SkScalar SkBlurMask::ConvertRadiusToSigma(SkScalar radius) {
// Firefox used to do the same too, until 4.0 where they fixed it. So at some
// point we should probably get rid of these scaling constants and rebaseline
// all the blur tests.
- static const SkScalar kBLUR_SIGMA_SCALE = SkFloatToScalar(0.57735f);
+ static const SkScalar kBLUR_SIGMA_SCALE = 0.57735f;
return radius ? kBLUR_SIGMA_SCALE * radius + 0.5f : 0.0f;
}
@@ -405,7 +405,7 @@ static int boxBlurInterp(const uint8_t* src, int src_y_stride, uint8_t* dst,
static void get_adjusted_radii(SkScalar passRadius, int *loRadius, int *hiRadius)
{
*loRadius = *hiRadius = SkScalarCeil(passRadius);
- if (SkIntToScalar(*hiRadius) - passRadius > SkFloatToScalar(0.5f)) {
+ if (SkIntToScalar(*hiRadius) - passRadius > 0.5f) {
*loRadius = *hiRadius - 1;
}
}
« no previous file with comments | « src/effects/SkBicubicImageFilter.cpp ('k') | src/effects/SkBlurMaskFilter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698