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

Unified Diff: src/core/SkMathPriv.h

Issue 21122005: fold SK_CPU_HAS_CONDITION_INSTR through as always defined (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: typo Created 7 years, 5 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/core/SkMath.cpp ('k') | src/effects/gradients/SkLinearGradient.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkMathPriv.h
diff --git a/src/core/SkMathPriv.h b/src/core/SkMathPriv.h
index 53cf43063d1e230d67146bdb9ae87e9344ccb9ba..4eaad8b9b16fa10fb0ffbc90b2507b43f1781cf1 100644
--- a/src/core/SkMathPriv.h
+++ b/src/core/SkMathPriv.h
@@ -33,18 +33,10 @@ static inline int32_t SkCopySign32(int32_t x, int32_t y) {
@return max if value >= max, else value
*/
static inline unsigned SkClampUMax(unsigned value, unsigned max) {
-#ifdef SK_CPU_HAS_CONDITIONAL_INSTR
if (value > max) {
value = max;
}
return value;
-#else
- int diff = max - value;
- // clear diff if diff is positive
- diff &= diff >> 31;
-
- return value + diff;
-#endif
}
/** Computes the 64bit product of a * b, and then shifts the answer down by
« no previous file with comments | « src/core/SkMath.cpp ('k') | src/effects/gradients/SkLinearGradient.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698