Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(279)

Side by Side Diff: src/effects/gradients/SkGradientShaderPriv.h

Issue 1777213003: Remove version checks for _MSC_VER < 1800 (msvs2013). (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 } 44 }
45 45
46 // Repeat 46 // Repeat
47 47
48 static inline SkFixed repeat_tileproc(SkFixed x) { 48 static inline SkFixed repeat_tileproc(SkFixed x) {
49 return x & 0xFFFF; 49 return x & 0xFFFF;
50 } 50 }
51 51
52 // Mirror 52 // Mirror
53 53
54 // Visual Studio 2010 (MSC_VER=1600) optimizes bit-shift code incorrectly.
55 // See http://code.google.com/p/skia/issues/detail?id=472
56 #if defined(_MSC_VER) && (_MSC_VER >= 1600)
mtklein 2016/03/10 17:37:47 ditto
57 #pragma optimize("", off)
58 #endif
59
60 static inline SkFixed mirror_tileproc(SkFixed x) { 54 static inline SkFixed mirror_tileproc(SkFixed x) {
61 int s = SkLeftShift(x, 15) >> 31; 55 int s = SkLeftShift(x, 15) >> 31;
62 return (x ^ s) & 0xFFFF; 56 return (x ^ s) & 0xFFFF;
63 } 57 }
64 58
65 #if defined(_MSC_VER) && (_MSC_VER >= 1600)
66 #pragma optimize("", on)
67 #endif
68
69 /////////////////////////////////////////////////////////////////////////////// 59 ///////////////////////////////////////////////////////////////////////////////
70 60
71 typedef SkFixed (*TileProc)(SkFixed); 61 typedef SkFixed (*TileProc)(SkFixed);
72 62
73 /////////////////////////////////////////////////////////////////////////////// 63 ///////////////////////////////////////////////////////////////////////////////
74 64
75 static const TileProc gTileProcs[] = { 65 static const TileProc gTileProcs[] = {
76 clamp_tileproc, 66 clamp_tileproc,
77 repeat_tileproc, 67 repeat_tileproc,
78 mirror_tileproc 68 mirror_tileproc
(...skipping 378 matching lines...) Expand 10 before | Expand all | Expand 10 after
457 GrGLSLProgramDataManager::UniformHandle fColorStartUni; 447 GrGLSLProgramDataManager::UniformHandle fColorStartUni;
458 GrGLSLProgramDataManager::UniformHandle fColorMidUni; 448 GrGLSLProgramDataManager::UniformHandle fColorMidUni;
459 GrGLSLProgramDataManager::UniformHandle fColorEndUni; 449 GrGLSLProgramDataManager::UniformHandle fColorEndUni;
460 450
461 typedef GrGLSLFragmentProcessor INHERITED; 451 typedef GrGLSLFragmentProcessor INHERITED;
462 }; 452 };
463 453
464 #endif 454 #endif
465 455
466 #endif 456 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698