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

Side by Side Diff: src/core/SkBitmapProcState_matrixProcs.cpp

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 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 153 matching lines...) Expand 10 before | Expand all | Expand 10 after
164 if (x >> 16) { 164 if (x >> 16) {
165 x = 0xFFFF; 165 x = 0xFFFF;
166 } 166 }
167 return x; 167 return x;
168 } 168 }
169 169
170 static inline U16CPU fixed_repeat(SkFixed x) { 170 static inline U16CPU fixed_repeat(SkFixed x) {
171 return x & 0xFFFF; 171 return x & 0xFFFF;
172 } 172 }
173 173
174 // Visual Studio 2010 (MSC_VER=1600) optimizes bit-shift code incorrectly.
175 // See http://code.google.com/p/skia/issues/detail?id=472
176 #if defined(_MSC_VER) && (_MSC_VER >= 1600)
mtklein 2016/03/10 17:37:47 This is a >= check... you sure we don't need this
bungeman-skia 2016/03/10 17:54:23 This was fixed in Visual Studio 2012 (https://conn
177 #pragma optimize("", off)
178 #endif
179
180 static inline U16CPU fixed_mirror(SkFixed x) { 174 static inline U16CPU fixed_mirror(SkFixed x) {
181 SkFixed s = SkLeftShift(x, 15) >> 31; 175 SkFixed s = SkLeftShift(x, 15) >> 31;
182 // s is FFFFFFFF if we're on an odd interval, or 0 if an even interval 176 // s is FFFFFFFF if we're on an odd interval, or 0 if an even interval
183 return (x ^ s) & 0xFFFF; 177 return (x ^ s) & 0xFFFF;
184 } 178 }
185 179
186 #if defined(_MSC_VER) && (_MSC_VER >= 1600)
187 #pragma optimize("", on)
188 #endif
189
190 static SkBitmapProcState::FixedTileProc choose_tile_proc(unsigned m) { 180 static SkBitmapProcState::FixedTileProc choose_tile_proc(unsigned m) {
191 if (SkShader::kClamp_TileMode == m) { 181 if (SkShader::kClamp_TileMode == m) {
192 return fixed_clamp; 182 return fixed_clamp;
193 } 183 }
194 if (SkShader::kRepeat_TileMode == m) { 184 if (SkShader::kRepeat_TileMode == m) {
195 return fixed_repeat; 185 return fixed_repeat;
196 } 186 }
197 SkASSERT(SkShader::kMirror_TileMode == m); 187 SkASSERT(SkShader::kMirror_TileMode == m);
198 return fixed_mirror; 188 return fixed_mirror;
199 } 189 }
(...skipping 321 matching lines...) Expand 10 before | Expand all | Expand 10 after
521 if (SkShader::kRepeat_TileMode == fTileModeX && SkShader::kRepeat_TileMode = = fTileModeY) { 511 if (SkShader::kRepeat_TileMode == fTileModeX && SkShader::kRepeat_TileMode = = fTileModeY) {
522 return SK_ARM_NEON_WRAP(RepeatX_RepeatY_Procs)[index]; 512 return SK_ARM_NEON_WRAP(RepeatX_RepeatY_Procs)[index];
523 } 513 }
524 514
525 fTileProcX = choose_tile_proc(fTileModeX); 515 fTileProcX = choose_tile_proc(fTileModeX);
526 fTileProcY = choose_tile_proc(fTileModeY); 516 fTileProcY = choose_tile_proc(fTileModeY);
527 fTileLowBitsProcX = choose_tile_lowbits_proc(fTileModeX); 517 fTileLowBitsProcX = choose_tile_lowbits_proc(fTileModeX);
528 fTileLowBitsProcY = choose_tile_lowbits_proc(fTileModeY); 518 fTileLowBitsProcY = choose_tile_lowbits_proc(fTileModeY);
529 return GeneralXY_Procs[index]; 519 return GeneralXY_Procs[index];
530 } 520 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698