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

Side by Side Diff: src/opts/SkUtils_opts_arm.cpp

Issue 1075003002: Replace NEON assembly memset16 and memset32 with intrinsic versions. (Closed) Base URL: https://skia.googlesource.com/skia@master
Patch Set: Created 5 years, 8 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 2014 ARM Ltd. 2 * Copyright 2014 ARM Ltd.
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 "SkUtils.h" 8 #include "SkUtils.h"
9 #include "SkUtilsArm.h" 9 #include "SkUtilsArm.h"
10 10
11 extern "C" void memset16_neon(uint16_t dst[], uint16_t value, int count); 11 void sk_memset16_neon(uint16_t dst[], uint16_t value, int count);
12 extern "C" void memset32_neon(uint32_t dst[], uint32_t value, int count); 12 void sk_memset32_neon(uint32_t dst[], uint32_t value, int count);
13 13
14 SkMemset16Proc SkMemset16GetPlatformProc() { 14 SkMemset16Proc SkMemset16GetPlatformProc() {
15 #if SK_ARM_NEON_IS_ALWAYS 15 #if SK_ARM_NEON_IS_ALWAYS
16 return memset16_neon; 16 return sk_memset16_neon;
17 #elif SK_ARM_NEON_IS_DYNAMIC 17 #elif SK_ARM_NEON_IS_DYNAMIC
18 return sk_cpu_arm_has_neon() ? memset16_neon : nullptr; 18 return sk_cpu_arm_has_neon() ? sk_memset16_neon : nullptr;
19 #else 19 #else
20 return nullptr; 20 return nullptr;
21 #endif 21 #endif
22 } 22 }
23 23
24 SkMemset32Proc SkMemset32GetPlatformProc() { 24 SkMemset32Proc SkMemset32GetPlatformProc() {
25 #if SK_ARM_NEON_IS_ALWAYS 25 #if SK_ARM_NEON_IS_ALWAYS
26 return memset32_neon; 26 return sk_memset32_neon;
27 #elif SK_ARM_NEON_IS_DYNAMIC 27 #elif SK_ARM_NEON_IS_DYNAMIC
28 return sk_cpu_arm_has_neon() ? memset32_neon : nullptr; 28 return sk_cpu_arm_has_neon() ? sk_memset32_neon : nullptr;
29 #else 29 #else
30 return nullptr; 30 return nullptr;
31 #endif 31 #endif
32 } 32 }
33 33
34 SkMemcpy32Proc SkMemcpy32GetPlatformProc() { 34 SkMemcpy32Proc SkMemcpy32GetPlatformProc() {
35 return NULL; 35 return NULL;
36 } 36 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698