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

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

Issue 1952953004: Remove NEON runtime detection support. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: (x) Created 4 years, 7 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 2011 Google Inc. 2 * Copyright 2011 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 #include "SkBitmapCache.h" 8 #include "SkBitmapCache.h"
9 #include "SkBitmapController.h" 9 #include "SkBitmapController.h"
10 #include "SkBitmapProcState.h" 10 #include "SkBitmapProcState.h"
11 #include "SkColorPriv.h" 11 #include "SkColorPriv.h"
12 #include "SkFilterProc.h" 12 #include "SkFilterProc.h"
13 #include "SkPaint.h" 13 #include "SkPaint.h"
14 #include "SkShader.h" // for tilemodes 14 #include "SkShader.h" // for tilemodes
15 #include "SkUtilsArm.h" 15 #include "SkUtilsArm.h"
16 #include "SkBitmapScaler.h" 16 #include "SkBitmapScaler.h"
17 #include "SkMipMap.h" 17 #include "SkMipMap.h"
18 #include "SkPixelRef.h" 18 #include "SkPixelRef.h"
19 #include "SkImageEncoder.h" 19 #include "SkImageEncoder.h"
20 #include "SkResourceCache.h" 20 #include "SkResourceCache.h"
21 21
22 #if !SK_ARM_NEON_IS_NONE 22 #if defined(SK_ARM_HAS_NEON)
23 // These are defined in src/opts/SkBitmapProcState_arm_neon.cpp 23 // These are defined in src/opts/SkBitmapProcState_arm_neon.cpp
24 extern const SkBitmapProcState::SampleProc32 gSkBitmapProcStateSample32_neon[]; 24 extern const SkBitmapProcState::SampleProc32 gSkBitmapProcStateSample32_neon[];
25 extern void S16_D16_filter_DX_neon(const SkBitmapProcState&, const uint32_t*, i nt, uint16_t*); 25 extern void S16_D16_filter_DX_neon(const SkBitmapProcState&, const uint32_t*, i nt, uint16_t*);
26 extern void Clamp_S16_D16_filter_DX_shaderproc_neon(const void *, int, int, uin t16_t*, int); 26 extern void Clamp_S16_D16_filter_DX_shaderproc_neon(const void *, int, int, uin t16_t*, int);
27 extern void Repeat_S16_D16_filter_DX_shaderproc_neon(const void *, int, int, ui nt16_t*, int); 27 extern void Repeat_S16_D16_filter_DX_shaderproc_neon(const void *, int, int, ui nt16_t*, int);
28 extern void SI8_opaque_D32_filter_DX_neon(const SkBitmapProcState&, const uint3 2_t*, int, SkPMColor*); 28 extern void SI8_opaque_D32_filter_DX_neon(const SkBitmapProcState&, const uint3 2_t*, int, SkPMColor*);
29 extern void SI8_opaque_D32_filter_DX_shaderproc_neon(const void *, int, int, ui nt32_t*, int); 29 extern void SI8_opaque_D32_filter_DX_shaderproc_neon(const void *, int, int, ui nt32_t*, int);
30 extern void Clamp_SI8_opaque_D32_filter_DX_shaderproc_neon(const void*, int, in t, uint32_t*, int); 30 extern void Clamp_SI8_opaque_D32_filter_DX_shaderproc_neon(const void*, int, in t, uint32_t*, int);
31 #endif 31 #endif
32 32
(...skipping 256 matching lines...) Expand 10 before | Expand all | Expand 10 after
289 break; 289 break;
290 case kGray_8_SkColorType: 290 case kGray_8_SkColorType:
291 index |= 40; 291 index |= 40;
292 fPaintPMColor = SkPreMultiplyColor(fPaintColor); 292 fPaintPMColor = SkPreMultiplyColor(fPaintColor);
293 break; 293 break;
294 default: 294 default:
295 // TODO(dominikg): Should we ever get here? SkASSERT(false) inst ead? 295 // TODO(dominikg): Should we ever get here? SkASSERT(false) inst ead?
296 return false; 296 return false;
297 } 297 }
298 298
299 #if !SK_ARM_NEON_IS_ALWAYS 299 #if !defined(SK_ARM_HAS_NEON)
300 static const SampleProc32 gSkBitmapProcStateSample32[] = { 300 static const SampleProc32 gSkBitmapProcStateSample32[] = {
301 S32_opaque_D32_nofilter_DXDY, 301 S32_opaque_D32_nofilter_DXDY,
302 S32_alpha_D32_nofilter_DXDY, 302 S32_alpha_D32_nofilter_DXDY,
303 S32_opaque_D32_nofilter_DX, 303 S32_opaque_D32_nofilter_DX,
304 S32_alpha_D32_nofilter_DX, 304 S32_alpha_D32_nofilter_DX,
305 S32_opaque_D32_filter_DXDY, 305 S32_opaque_D32_filter_DXDY,
306 S32_alpha_D32_filter_DXDY, 306 S32_alpha_D32_filter_DXDY,
307 S32_opaque_D32_filter_DX, 307 S32_opaque_D32_filter_DX,
308 S32_alpha_D32_filter_DX, 308 S32_alpha_D32_filter_DX,
309 309
(...skipping 507 matching lines...) Expand 10 before | Expand all | Expand 10 after
817 *dst++ = src[index]; 817 *dst++ = src[index];
818 fx += dx; 818 fx += dx;
819 } 819 }
820 } else { 820 } else {
821 for (int i = 0; i < count; ++i) { 821 for (int i = 0; i < count; ++i) {
822 dst[i] = src[SkClampMax(SkFractionalIntToInt(fx), maxX)]; 822 dst[i] = src[SkClampMax(SkFractionalIntToInt(fx), maxX)];
823 fx += dx; 823 fx += dx;
824 } 824 }
825 } 825 }
826 } 826 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698