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

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

Issue 2189193002: Experimental: Remove 2.2 special case Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 4 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 | « src/core/SkOpts.h ('k') | src/core/SkSRGB.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 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 DEFINE_DEFAULT(RGB_to_RGB1); 65 DEFINE_DEFAULT(RGB_to_RGB1);
66 DEFINE_DEFAULT(RGB_to_BGR1); 66 DEFINE_DEFAULT(RGB_to_BGR1);
67 DEFINE_DEFAULT(gray_to_RGB1); 67 DEFINE_DEFAULT(gray_to_RGB1);
68 DEFINE_DEFAULT(grayA_to_RGBA); 68 DEFINE_DEFAULT(grayA_to_RGBA);
69 DEFINE_DEFAULT(grayA_to_rgbA); 69 DEFINE_DEFAULT(grayA_to_rgbA);
70 DEFINE_DEFAULT(inverted_CMYK_to_RGB1); 70 DEFINE_DEFAULT(inverted_CMYK_to_RGB1);
71 DEFINE_DEFAULT(inverted_CMYK_to_BGR1); 71 DEFINE_DEFAULT(inverted_CMYK_to_BGR1);
72 72
73 DEFINE_DEFAULT(srcover_srgb_srgb); 73 DEFINE_DEFAULT(srcover_srgb_srgb);
74 74
75 DEFINE_DEFAULT(color_xform_RGB1_to_2dot2);
76 DEFINE_DEFAULT(color_xform_RGB1_to_srgb); 75 DEFINE_DEFAULT(color_xform_RGB1_to_srgb);
77 DEFINE_DEFAULT(color_xform_RGB1_to_table); 76 DEFINE_DEFAULT(color_xform_RGB1_to_table);
78 DEFINE_DEFAULT(color_xform_RGB1_to_linear); 77 DEFINE_DEFAULT(color_xform_RGB1_to_linear);
79 DEFINE_DEFAULT(color_xform_RGB1_to_2dot2_swaprb);
80 DEFINE_DEFAULT(color_xform_RGB1_to_srgb_swaprb); 78 DEFINE_DEFAULT(color_xform_RGB1_to_srgb_swaprb);
81 DEFINE_DEFAULT(color_xform_RGB1_to_table_swaprb); 79 DEFINE_DEFAULT(color_xform_RGB1_to_table_swaprb);
82 #undef DEFINE_DEFAULT 80 #undef DEFINE_DEFAULT
83 81
84 // Each Init_foo() is defined in src/opts/SkOpts_foo.cpp. 82 // Each Init_foo() is defined in src/opts/SkOpts_foo.cpp.
85 void Init_ssse3(); 83 void Init_ssse3();
86 void Init_sse41(); 84 void Init_sse41();
87 void Init_sse42() {} 85 void Init_sse42() {}
88 void Init_avx(); 86 void Init_avx();
89 void Init_avx2() {} 87 void Init_avx2() {}
90 88
91 static void init() { 89 static void init() {
92 #if defined(SK_CPU_X86) && !defined(SK_BUILD_NO_OPTS) 90 #if defined(SK_CPU_X86) && !defined(SK_BUILD_NO_OPTS)
93 if (SkCpu::Supports(SkCpu::SSSE3)) { Init_ssse3(); } 91 if (SkCpu::Supports(SkCpu::SSSE3)) { Init_ssse3(); }
94 if (SkCpu::Supports(SkCpu::SSE41)) { Init_sse41(); } 92 if (SkCpu::Supports(SkCpu::SSE41)) { Init_sse41(); }
95 if (SkCpu::Supports(SkCpu::SSE42)) { Init_sse42(); } 93 if (SkCpu::Supports(SkCpu::SSE42)) { Init_sse42(); }
96 if (SkCpu::Supports(SkCpu::AVX )) { Init_avx(); } 94 if (SkCpu::Supports(SkCpu::AVX )) { Init_avx(); }
97 if (SkCpu::Supports(SkCpu::AVX2 )) { Init_avx2(); } 95 if (SkCpu::Supports(SkCpu::AVX2 )) { Init_avx2(); }
98 #endif 96 #endif
99 } 97 }
100 98
101 void Init() { 99 void Init() {
102 static SkOnce once; 100 static SkOnce once;
103 once(init); 101 once(init);
104 } 102 }
105 } // namespace SkOpts 103 } // namespace SkOpts
OLDNEW
« no previous file with comments | « src/core/SkOpts.h ('k') | src/core/SkSRGB.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698