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

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

Issue 2087343002: Add stub for avx. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Add inclusion of sse4 intrinsics if needed. Created 4 years, 5 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 | « gyp/opts.gypi ('k') | src/opts/SkBlend_opts.h » ('j') | 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"
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 sk_default::color_xform_RGB1_2dot2_to_2dot2; 83 sk_default::color_xform_RGB1_2dot2_to_2dot2;
84 decltype(color_xform_RGB1_srgb_to_srgb) color_xform_RGB1_srgb_to_srgb = 84 decltype(color_xform_RGB1_srgb_to_srgb) color_xform_RGB1_srgb_to_srgb =
85 sk_default::color_xform_RGB1_srgb_to_srgb; 85 sk_default::color_xform_RGB1_srgb_to_srgb;
86 decltype(color_xform_RGB1_2dot2_to_srgb) color_xform_RGB1_2dot2_to_srgb = 86 decltype(color_xform_RGB1_2dot2_to_srgb) color_xform_RGB1_2dot2_to_srgb =
87 sk_default::color_xform_RGB1_2dot2_to_srgb; 87 sk_default::color_xform_RGB1_2dot2_to_srgb;
88 88
89 // Each Init_foo() is defined in src/opts/SkOpts_foo.cpp. 89 // Each Init_foo() is defined in src/opts/SkOpts_foo.cpp.
90 void Init_ssse3(); 90 void Init_ssse3();
91 void Init_sse41(); 91 void Init_sse41();
92 void Init_sse42() {} 92 void Init_sse42() {}
93 void Init_avx() {} 93 void Init_avx();
94 void Init_avx2() {} 94 void Init_avx2() {}
95 95
96 static void init() { 96 static void init() {
97 #if defined(SK_CPU_X86) && !defined(SK_BUILD_NO_OPTS) 97 #if defined(SK_CPU_X86) && !defined(SK_BUILD_NO_OPTS)
98 if (SkCpu::Supports(SkCpu::SSSE3)) { Init_ssse3(); } 98 if (SkCpu::Supports(SkCpu::SSSE3)) { Init_ssse3(); }
99 if (SkCpu::Supports(SkCpu::SSE41)) { Init_sse41(); } 99 if (SkCpu::Supports(SkCpu::SSE41)) { Init_sse41(); }
100 if (SkCpu::Supports(SkCpu::SSE42)) { Init_sse42(); } 100 if (SkCpu::Supports(SkCpu::SSE42)) { Init_sse42(); }
101 if (SkCpu::Supports(SkCpu::AVX )) { Init_avx(); } 101 if (SkCpu::Supports(SkCpu::AVX )) { Init_avx(); }
102 if (SkCpu::Supports(SkCpu::AVX2 )) { Init_avx2(); } 102 if (SkCpu::Supports(SkCpu::AVX2 )) { Init_avx2(); }
103 #endif 103 #endif
104 } 104 }
105 105
106 void Init() { 106 void Init() {
107 static SkOnce once; 107 static SkOnce once;
108 once(init); 108 once(init);
109 } 109 }
110 } // namespace SkOpts 110 } // namespace SkOpts
OLDNEW
« no previous file with comments | « gyp/opts.gypi ('k') | src/opts/SkBlend_opts.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698