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/effects | |
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/effects')
-rw-r--r-- | src/effects/gradients/SkLinearGradient.cpp | 13 |
1 files changed, 2 insertions, 11 deletions
diff --git a/src/effects/gradients/SkLinearGradient.cpp b/src/effects/gradients/SkLinearGradient.cpp index 4bc697d904..2f56cb49ca 100644 --- a/src/effects/gradients/SkLinearGradient.cpp +++ b/src/effects/gradients/SkLinearGradient.cpp @@ -23,26 +23,17 @@ static inline int repeat_8bits(int x) { #endif static inline int mirror_bits(int x, const int bits) { -#ifdef SK_CPU_HAS_CONDITIONAL_INSTR - if (x & (1 << bits)) + if (x & (1 << bits)) { x = ~x; + } return x & ((1 << bits) - 1); -#else - int s = x << (31 - bits) >> 31; - return (x ^ s) & ((1 << bits) - 1); -#endif } static inline int mirror_8bits(int x) { -#ifdef SK_CPU_HAS_CONDITIONAL_INSTR if (x & 256) { x = ~x; } return x & 255; -#else - int s = x << 23 >> 31; - return (x ^ s) & 0xFF; -#endif } #if defined(_MSC_VER) && (_MSC_VER >= 1600) |