OLD | NEW |
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 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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); | 75 DEFINE_DEFAULT(color_xform_RGB1_to_2dot2); |
76 DEFINE_DEFAULT(color_xform_RGB1_to_srgb); | 76 DEFINE_DEFAULT(color_xform_RGB1_to_srgb); |
77 DEFINE_DEFAULT(color_xform_RGB1_to_table); | 77 DEFINE_DEFAULT(color_xform_RGB1_to_table); |
| 78 DEFINE_DEFAULT(color_xform_RGB1_to_linear); |
78 #undef DEFINE_DEFAULT | 79 #undef DEFINE_DEFAULT |
79 | 80 |
80 // Each Init_foo() is defined in src/opts/SkOpts_foo.cpp. | 81 // Each Init_foo() is defined in src/opts/SkOpts_foo.cpp. |
81 void Init_ssse3(); | 82 void Init_ssse3(); |
82 void Init_sse41(); | 83 void Init_sse41(); |
83 void Init_sse42() {} | 84 void Init_sse42() {} |
84 void Init_avx(); | 85 void Init_avx(); |
85 void Init_avx2() {} | 86 void Init_avx2() {} |
86 | 87 |
87 static void init() { | 88 static void init() { |
88 #if defined(SK_CPU_X86) && !defined(SK_BUILD_NO_OPTS) | 89 #if defined(SK_CPU_X86) && !defined(SK_BUILD_NO_OPTS) |
89 if (SkCpu::Supports(SkCpu::SSSE3)) { Init_ssse3(); } | 90 if (SkCpu::Supports(SkCpu::SSSE3)) { Init_ssse3(); } |
90 if (SkCpu::Supports(SkCpu::SSE41)) { Init_sse41(); } | 91 if (SkCpu::Supports(SkCpu::SSE41)) { Init_sse41(); } |
91 if (SkCpu::Supports(SkCpu::SSE42)) { Init_sse42(); } | 92 if (SkCpu::Supports(SkCpu::SSE42)) { Init_sse42(); } |
92 if (SkCpu::Supports(SkCpu::AVX )) { Init_avx(); } | 93 if (SkCpu::Supports(SkCpu::AVX )) { Init_avx(); } |
93 if (SkCpu::Supports(SkCpu::AVX2 )) { Init_avx2(); } | 94 if (SkCpu::Supports(SkCpu::AVX2 )) { Init_avx2(); } |
94 #endif | 95 #endif |
95 } | 96 } |
96 | 97 |
97 void Init() { | 98 void Init() { |
98 static SkOnce once; | 99 static SkOnce once; |
99 once(init); | 100 once(init); |
100 } | 101 } |
101 } // namespace SkOpts | 102 } // namespace SkOpts |
OLD | NEW |