OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2008 Google Inc. | 2 * Copyright 2008 Google Inc. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
6 */ | 6 */ |
7 | 7 |
8 // The copyright below was added in 2009, but I see no record of moto contributi
ons...? | 8 // The copyright below was added in 2009, but I see no record of moto contributi
ons...? |
9 | 9 |
10 /* NEON optimized code (C) COPYRIGHT 2009 Motorola | 10 /* NEON optimized code (C) COPYRIGHT 2009 Motorola |
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
171 return x & 0xFFFF; | 171 return x & 0xFFFF; |
172 } | 172 } |
173 | 173 |
174 // Visual Studio 2010 (MSC_VER=1600) optimizes bit-shift code incorrectly. | 174 // Visual Studio 2010 (MSC_VER=1600) optimizes bit-shift code incorrectly. |
175 // See http://code.google.com/p/skia/issues/detail?id=472 | 175 // See http://code.google.com/p/skia/issues/detail?id=472 |
176 #if defined(_MSC_VER) && (_MSC_VER >= 1600) | 176 #if defined(_MSC_VER) && (_MSC_VER >= 1600) |
177 #pragma optimize("", off) | 177 #pragma optimize("", off) |
178 #endif | 178 #endif |
179 | 179 |
180 static inline U16CPU fixed_mirror(SkFixed x) { | 180 static inline U16CPU fixed_mirror(SkFixed x) { |
181 SkFixed s = x << 15 >> 31; | 181 SkFixed s = SkLeftShift(x, 15) >> 31; |
182 // s is FFFFFFFF if we're on an odd interval, or 0 if an even interval | 182 // s is FFFFFFFF if we're on an odd interval, or 0 if an even interval |
183 return (x ^ s) & 0xFFFF; | 183 return (x ^ s) & 0xFFFF; |
184 } | 184 } |
185 | 185 |
186 #if defined(_MSC_VER) && (_MSC_VER >= 1600) | 186 #if defined(_MSC_VER) && (_MSC_VER >= 1600) |
187 #pragma optimize("", on) | 187 #pragma optimize("", on) |
188 #endif | 188 #endif |
189 | 189 |
190 static SkBitmapProcState::FixedTileProc choose_tile_proc(unsigned m) { | 190 static SkBitmapProcState::FixedTileProc choose_tile_proc(unsigned m) { |
191 if (SkShader::kClamp_TileMode == m) { | 191 if (SkShader::kClamp_TileMode == m) { |
(...skipping 332 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
524 if (SkShader::kRepeat_TileMode == fTileModeX && SkShader::kRepeat_TileMode =
= fTileModeY) { | 524 if (SkShader::kRepeat_TileMode == fTileModeX && SkShader::kRepeat_TileMode =
= fTileModeY) { |
525 return SK_ARM_NEON_WRAP(RepeatX_RepeatY_Procs)[index]; | 525 return SK_ARM_NEON_WRAP(RepeatX_RepeatY_Procs)[index]; |
526 } | 526 } |
527 | 527 |
528 fTileProcX = choose_tile_proc(fTileModeX); | 528 fTileProcX = choose_tile_proc(fTileModeX); |
529 fTileProcY = choose_tile_proc(fTileModeY); | 529 fTileProcY = choose_tile_proc(fTileModeY); |
530 fTileLowBitsProcX = choose_tile_lowbits_proc(fTileModeX); | 530 fTileLowBitsProcX = choose_tile_lowbits_proc(fTileModeX); |
531 fTileLowBitsProcY = choose_tile_lowbits_proc(fTileModeY); | 531 fTileLowBitsProcY = choose_tile_lowbits_proc(fTileModeY); |
532 return GeneralXY_Procs[index]; | 532 return GeneralXY_Procs[index]; |
533 } | 533 } |
OLD | NEW |