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

Side by Side Diff: src/core/SkOpts.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 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"
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 decltype(float_to_half) float_to_half = sk_default::float_to_half; 75 decltype(float_to_half) float_to_half = sk_default::float_to_half;
76 76
77 decltype(srcover_srgb_srgb) srcover_srgb_srgb = sk_default::srcover_srgb_srg b; 77 decltype(srcover_srgb_srgb) srcover_srgb_srgb = sk_default::srcover_srgb_srg b;
78 78
79 // Each Init_foo() is defined in src/opts/SkOpts_foo.cpp. 79 // Each Init_foo() is defined in src/opts/SkOpts_foo.cpp.
80 void Init_ssse3(); 80 void Init_ssse3();
81 void Init_sse41(); 81 void Init_sse41();
82 void Init_sse42() {} 82 void Init_sse42() {}
83 void Init_avx() {} 83 void Init_avx() {}
84 void Init_avx2() {} 84 void Init_avx2() {}
85 void Init_neon();
86 85
87 static void init() { 86 static void init() {
88 // TODO: Chrome's not linking _sse* opts on iOS simulator builds. Bug o r feature? 87 // TODO: Chrome's not linking _sse* opts on iOS simulator builds. Bug o r feature?
89 #if defined(SK_CPU_X86) && !defined(SK_BUILD_FOR_IOS) 88 #if defined(SK_CPU_X86) && !defined(SK_BUILD_FOR_IOS)
90 if (SkCpu::Supports(SkCpu::SSSE3)) { Init_ssse3(); } 89 if (SkCpu::Supports(SkCpu::SSSE3)) { Init_ssse3(); }
91 if (SkCpu::Supports(SkCpu::SSE41)) { Init_sse41(); } 90 if (SkCpu::Supports(SkCpu::SSE41)) { Init_sse41(); }
92 if (SkCpu::Supports(SkCpu::SSE42)) { Init_sse42(); } 91 if (SkCpu::Supports(SkCpu::SSE42)) { Init_sse42(); }
93 if (SkCpu::Supports(SkCpu::AVX )) { Init_avx(); } 92 if (SkCpu::Supports(SkCpu::AVX )) { Init_avx(); }
94 if (SkCpu::Supports(SkCpu::AVX2 )) { Init_avx2(); } 93 if (SkCpu::Supports(SkCpu::AVX2 )) { Init_avx2(); }
95
96 #elif defined(SK_CPU_ARM32) && \
97 defined(SK_BUILD_FOR_ANDROID) && \
98 !defined(SK_BUILD_FOR_ANDROID_FRAMEWORK)
99 if (SkCpu::Supports(SkCpu::NEON)) { Init_neon(); }
100 #endif 94 #endif
101 } 95 }
102 96
103 void Init() { 97 void Init() {
104 static SkOnce once; 98 static SkOnce once;
105 once(init); 99 once(init);
106 } 100 }
107 } // namespace SkOpts 101 } // namespace SkOpts
OLDNEW
« no previous file with comments | « src/core/SkBlitter_RGB16.cpp ('k') | src/core/SkUtilsArm.h » ('j') | src/core/SkUtilsArm.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698