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

Unified Diff: src/effects/gradients/SkRadialGradient.cpp

Issue 1314583003: Replace SkPin32 with SkTPin and remove. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Add comment. Created 5 years, 4 months 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/SkTableMaskFilter.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/effects/gradients/SkRadialGradient.cpp
diff --git a/src/effects/gradients/SkRadialGradient.cpp b/src/effects/gradients/SkRadialGradient.cpp
index 3a1a21e83c26fffbd48444547a099487b1eec1b4..c7e730825120de0538ba0b1051a53404ed2d46a5 100644
--- a/src/effects/gradients/SkRadialGradient.cpp
+++ b/src/effects/gradients/SkRadialGradient.cpp
@@ -92,10 +92,10 @@ void shadeSpan16_radial_clamp(SkScalar sfx, SkScalar sdx,
// might perform this check for the other modes,
// but the win will be a smaller % of the total
if (dy == 0) {
- fy = SkPin32(fy, -0xFFFF >> 1, 0xFFFF >> 1);
+ fy = SkTPin(fy, -0xFFFF >> 1, 0xFFFF >> 1);
fy *= fy;
do {
- unsigned xx = SkPin32(fx, -0xFFFF >> 1, 0xFFFF >> 1);
+ unsigned xx = SkTPin(fx, -0xFFFF >> 1, 0xFFFF >> 1);
unsigned fi = (xx * xx + fy) >> (14 + 16 - kSQRT_TABLE_BITS);
fi = SkFastMin32(fi, 0xFFFF >> (16 - kSQRT_TABLE_BITS));
fx += dx;
@@ -105,8 +105,8 @@ void shadeSpan16_radial_clamp(SkScalar sfx, SkScalar sdx,
} while (--count != 0);
} else {
do {
- unsigned xx = SkPin32(fx, -0xFFFF >> 1, 0xFFFF >> 1);
- unsigned fi = SkPin32(fy, -0xFFFF >> 1, 0xFFFF >> 1);
+ unsigned xx = SkTPin(fx, -0xFFFF >> 1, 0xFFFF >> 1);
+ unsigned fi = SkTPin(fy, -0xFFFF >> 1, 0xFFFF >> 1);
fi = (xx * xx + fi * fi) >> (14 + 16 - kSQRT_TABLE_BITS);
fi = SkFastMin32(fi, 0xFFFF >> (16 - kSQRT_TABLE_BITS));
fx += dx;
« no previous file with comments | « src/effects/SkTableMaskFilter.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698