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

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

Issue 2318313003: Flesh out SkOpts namespaces. (Closed)
Patch Set: Created 4 years, 3 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
« no previous file with comments | « no previous file | 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 2015 Google Inc. 2 * Copyright 2015 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 "SkCpu.h" 8 #include "SkCpu.h"
9 #include "SkHalf.h" 9 #include "SkHalf.h"
10 #include "SkOnce.h" 10 #include "SkOnce.h"
11 #include "SkOpts.h" 11 #include "SkOpts.h"
12 12
13 #if defined(SK_ARM_HAS_NEON) 13 #if defined(SK_ARM_HAS_NEON)
14 #define SK_OPTS_NS neon 14 #if defined(__ARM_FEATURE_CRC32)
15 #define SK_OPTS_NS neon_and_crc32
16 #else
17 #define SK_OPTS_NS neon
18 #endif
19 #elif SK_CPU_SSE_LEVEL >= SK_CPU_SSE_LEVEL_AVX2
20 #define SK_OPTS_NS avx2
21 #elif SK_CPU_SSE_LEVEL >= SK_CPU_SSE_LEVEL_AVX
22 #define SK_OPTS_NS avx
23 #elif SK_CPU_SSE_LEVEL >= SK_CPU_SSE_LEVEL_SSE42
24 #define SK_OPTS_NS sse42
25 #elif SK_CPU_SSE_LEVEL >= SK_CPU_SSE_LEVEL_SSE41
26 #define SK_OPTS_NS sse41
15 #elif SK_CPU_SSE_LEVEL >= SK_CPU_SSE_LEVEL_SSSE3 27 #elif SK_CPU_SSE_LEVEL >= SK_CPU_SSE_LEVEL_SSSE3
16 #define SK_OPTS_NS ssse3 28 #define SK_OPTS_NS ssse3
17 #elif SK_CPU_SSE_LEVEL >= SK_CPU_SSE_LEVEL_SSE3 29 #elif SK_CPU_SSE_LEVEL >= SK_CPU_SSE_LEVEL_SSE3
18 #define SK_OPTS_NS sse3 30 #define SK_OPTS_NS sse3
19 #elif SK_CPU_SSE_LEVEL >= SK_CPU_SSE_LEVEL_SSE2 31 #elif SK_CPU_SSE_LEVEL >= SK_CPU_SSE_LEVEL_SSE2
20 #define SK_OPTS_NS sse2 32 #define SK_OPTS_NS sse2
33 #elif SK_CPU_SSE_LEVEL >= SK_CPU_SSE_LEVEL_SSE1
34 #define SK_OPTS_NS sse
21 #else 35 #else
22 #define SK_OPTS_NS portable 36 #define SK_OPTS_NS portable
23 #endif 37 #endif
24 38
25 #include "SkBlend_opts.h" 39 #include "SkBlend_opts.h"
26 #include "SkBlitMask_opts.h" 40 #include "SkBlitMask_opts.h"
27 #include "SkBlitRow_opts.h" 41 #include "SkBlitRow_opts.h"
28 #include "SkBlurImageFilter_opts.h" 42 #include "SkBlurImageFilter_opts.h"
29 #include "SkChecksum_opts.h" 43 #include "SkChecksum_opts.h"
30 #include "SkColorCubeFilter_opts.h" 44 #include "SkColorCubeFilter_opts.h"
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 111
98 #endif 112 #endif
99 #endif 113 #endif
100 } 114 }
101 115
102 void Init() { 116 void Init() {
103 static SkOnce once; 117 static SkOnce once;
104 once(init); 118 once(init);
105 } 119 }
106 } // namespace SkOpts 120 } // namespace SkOpts
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698