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

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

Issue 98373003: Do proper cpu checking for NEON SkBoxBlur procs. (Closed) Base URL: /usr/local/google/home/senorblanco/src/skia-android/../skia@master
Patch Set: Created 7 years 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
« no previous file with comments | « src/opts/SkBlurImage_opts_neon.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /*************************************************************************** 1 /***************************************************************************
2 * Copyright (c) 2010, Code Aurora Forum. All rights reserved. 2 * Copyright (c) 2010, Code Aurora Forum. All rights reserved.
3 * Copyright 2006-2010, The Android Open Source Project 3 * Copyright 2006-2010, The Android Open Source Project
4 * 4 *
5 * Use of this source code is governed by a BSD-style license that can be 5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file. 6 * found in the LICENSE file.
7 ***************************************************************************/ 7 ***************************************************************************/
8 8
9 /* Changes: 9 /* Changes:
10 * 2011-04-01 ARM 10 * 2011-04-01 ARM
11 * Merged the functions from src/opts/opts_check_arm_neon.cpp 11 * Merged the functions from src/opts/opts_check_arm_neon.cpp
12 * Modified to return ARM version of memset16 and memset32 if no neon 12 * Modified to return ARM version of memset16 and memset32 if no neon
13 * available in the core 13 * available in the core
14 */ 14 */
15 15
16 #include "SkBlitRow.h" 16 #include "SkBlitRow.h"
17 #include "SkUtils.h" 17 #include "SkUtils.h"
18 18
19 #include "SkUtilsArm.h" 19 #include "SkUtilsArm.h"
20 #include "SkMorphology_opts.h" 20 #include "SkMorphology_opts.h"
21 #include "SkMorphology_opts_neon.h" 21 #include "SkMorphology_opts_neon.h"
22 #include "SkBlurImage_opts_neon.h"
22 23
23 #if defined(SK_CPU_LENDIAN) && !SK_ARM_NEON_IS_NONE 24 #if defined(SK_CPU_LENDIAN) && !SK_ARM_NEON_IS_NONE
24 extern "C" void memset16_neon(uint16_t dst[], uint16_t value, int count); 25 extern "C" void memset16_neon(uint16_t dst[], uint16_t value, int count);
25 extern "C" void memset32_neon(uint32_t dst[], uint32_t value, int count); 26 extern "C" void memset32_neon(uint32_t dst[], uint32_t value, int count);
26 #endif 27 #endif
27 28
28 #if defined(SK_CPU_LENDIAN) 29 #if defined(SK_CPU_LENDIAN)
29 extern "C" void arm_memset16(uint16_t* dst, uint16_t value, int count); 30 extern "C" void arm_memset16(uint16_t* dst, uint16_t value, int count);
30 extern "C" void arm_memset32(uint32_t* dst, uint32_t value, int count); 31 extern "C" void arm_memset32(uint32_t* dst, uint32_t value, int count);
31 #endif 32 #endif
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
84 return SkDilateY_neon; 85 return SkDilateY_neon;
85 case kErodeX_SkMorphologyProcType: 86 case kErodeX_SkMorphologyProcType:
86 return SkErodeX_neon; 87 return SkErodeX_neon;
87 case kErodeY_SkMorphologyProcType: 88 case kErodeY_SkMorphologyProcType:
88 return SkErodeY_neon; 89 return SkErodeY_neon;
89 default: 90 default:
90 return NULL; 91 return NULL;
91 } 92 }
92 #endif 93 #endif
93 } 94 }
95
96 bool SkBoxBlurGetPlatformProcs(SkBoxBlurProc* boxBlurX,
97 SkBoxBlurProc* boxBlurY,
98 SkBoxBlurProc* boxBlurXY,
99 SkBoxBlurProc* boxBlurYX) {
100 #if SK_ARM_NEON_IS_NONE
101 return NULL;
102 #else
103 #if SK_ARM_NEON_IS_DYNAMIC
104 if (!sk_cpu_arm_has_neon()) {
105 return NULL;
106 }
107 #endif
108 return SkBoxBlurGetPlatformProcs_NEON(boxBlurX, boxBlurY, boxBlurXY, boxBlur YX);
109 #endif
110 }
OLDNEW
« no previous file with comments | « src/opts/SkBlurImage_opts_neon.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698