Index: src/core/SkBitmapProcState_matrixProcs.cpp |
diff --git a/src/core/SkBitmapProcState_matrixProcs.cpp b/src/core/SkBitmapProcState_matrixProcs.cpp |
index a3d2b08665335c5f1b345589ff4e5db82ca6dc78..70d367b8707659f17eee533f10ee317e38f3aab5 100644 |
--- a/src/core/SkBitmapProcState_matrixProcs.cpp |
+++ b/src/core/SkBitmapProcState_matrixProcs.cpp |
@@ -112,24 +112,12 @@ extern const SkBitmapProcState::MatrixProc RepeatX_RepeatY_Procs_neon[]; |
static inline U16CPU fixed_clamp(SkFixed x) |
{ |
-#ifdef SK_CPU_HAS_CONDITIONAL_INSTR |
- if (x < 0) |
+ if (x < 0) { |
x = 0; |
- if (x >> 16) |
+ } |
+ if (x >> 16) { |
x = 0xFFFF; |
-#else |
- if (x >> 16) |
- { |
-#if 0 // is this faster? |
- x = (~x >> 31) & 0xFFFF; |
-#else |
- if (x < 0) |
- x = 0; |
- else |
- x = 0xFFFF; |
-#endif |
} |
-#endif |
return x; |
} |
@@ -185,20 +173,12 @@ static SkBitmapProcState::FixedTileLowBitsProc choose_tile_lowbits_proc(unsigned |
} |
static inline U16CPU int_clamp(int x, int n) { |
-#ifdef SK_CPU_HAS_CONDITIONAL_INSTR |
- if (x >= n) |
+ if (x >= n) { |
x = n - 1; |
- if (x < 0) |
+ } |
+ if (x < 0) { |
x = 0; |
-#else |
- if ((unsigned)x >= (unsigned)n) { |
- if (x < 0) { |
- x = 0; |
- } else { |
- x = n - 1; |
- } |
} |
-#endif |
return x; |
} |