diff options
author | commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2013-07-30 13:16:29 +0000 |
---|---|---|
committer | commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2013-07-30 13:16:29 +0000 |
commit | 38bad32cf5297ec6908620fd174cd08c937d331a (patch) | |
tree | 73e25dbca97c025c1bf563e25f8df66d9d53f172 /src/core/SkBitmapProcState_matrixProcs.cpp | |
parent | 5abacf672088bed1b6cd0d149aea0db1b8035dbc (diff) |
fold SK_CPU_HAS_CONDITION_INSTR through as always defined
BUG=
R=reed@google.com
Author: mtklein@google.com
Review URL: https://chromiumcodereview.appspot.com/21122005
git-svn-id: http://skia.googlecode.com/svn/trunk@10432 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'src/core/SkBitmapProcState_matrixProcs.cpp')
-rw-r--r-- | src/core/SkBitmapProcState_matrixProcs.cpp | 32 |
1 files changed, 6 insertions, 26 deletions
diff --git a/src/core/SkBitmapProcState_matrixProcs.cpp b/src/core/SkBitmapProcState_matrixProcs.cpp index a3d2b08665..70d367b870 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; } |