OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2012 Google Inc. | 2 * Copyright 2012 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 #ifndef SkGradientShaderPriv_DEFINED | 8 #ifndef SkGradientShaderPriv_DEFINED |
9 #define SkGradientShaderPriv_DEFINED | 9 #define SkGradientShaderPriv_DEFINED |
10 | 10 |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
51 | 51 |
52 // Mirror | 52 // Mirror |
53 | 53 |
54 // Visual Studio 2010 (MSC_VER=1600) optimizes bit-shift code incorrectly. | 54 // Visual Studio 2010 (MSC_VER=1600) optimizes bit-shift code incorrectly. |
55 // See http://code.google.com/p/skia/issues/detail?id=472 | 55 // See http://code.google.com/p/skia/issues/detail?id=472 |
56 #if defined(_MSC_VER) && (_MSC_VER >= 1600) | 56 #if defined(_MSC_VER) && (_MSC_VER >= 1600) |
57 #pragma optimize("", off) | 57 #pragma optimize("", off) |
58 #endif | 58 #endif |
59 | 59 |
60 static inline SkFixed mirror_tileproc(SkFixed x) { | 60 static inline SkFixed mirror_tileproc(SkFixed x) { |
61 int s = x << 15 >> 31; | 61 int s = SkLeftShift(x, 15) >> 31; |
62 return (x ^ s) & 0xFFFF; | 62 return (x ^ s) & 0xFFFF; |
63 } | 63 } |
64 | 64 |
65 #if defined(_MSC_VER) && (_MSC_VER >= 1600) | 65 #if defined(_MSC_VER) && (_MSC_VER >= 1600) |
66 #pragma optimize("", on) | 66 #pragma optimize("", on) |
67 #endif | 67 #endif |
68 | 68 |
69 /////////////////////////////////////////////////////////////////////////////// | 69 /////////////////////////////////////////////////////////////////////////////// |
70 | 70 |
71 typedef SkFixed (*TileProc)(SkFixed); | 71 typedef SkFixed (*TileProc)(SkFixed); |
(...skipping 384 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
456 GrGLSLProgramDataManager::UniformHandle fColorStartUni; | 456 GrGLSLProgramDataManager::UniformHandle fColorStartUni; |
457 GrGLSLProgramDataManager::UniformHandle fColorMidUni; | 457 GrGLSLProgramDataManager::UniformHandle fColorMidUni; |
458 GrGLSLProgramDataManager::UniformHandle fColorEndUni; | 458 GrGLSLProgramDataManager::UniformHandle fColorEndUni; |
459 | 459 |
460 typedef GrGLSLFragmentProcessor INHERITED; | 460 typedef GrGLSLFragmentProcessor INHERITED; |
461 }; | 461 }; |
462 | 462 |
463 #endif | 463 #endif |
464 | 464 |
465 #endif | 465 #endif |
OLD | NEW |