Debian Codegraph @

src/core/SkSwizzler_opts_ssse3.cpp

raw
1
2 /*
3 * Copyright 2023 Google LLC
4 *
5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file.
7 */
8
9 #include "include/private/base/SkFeatures.h"
10 #include "src/core/SkOptsTargets.h"
11 #include "src/core/SkSwizzlePriv.h"
12
13 #if defined(SK_CPU_X86) && \
14 !defined(SK_ENABLE_OPTIMIZE_SIZE) && \
15 SK_CPU_SSE_LEVEL < SK_CPU_SSE_LEVEL_SSSE3
16
17 // The order of these includes is important:
18 // 1) Select the target CPU architecture by defining SK_OPTS_TARGET and including SkOpts_SetTarget
19 // 2) Include the code to compile, typically in a _opts.inc file.
20 // 3) Include SkOpts_RestoreTarget to switch back to the default CPU architecture
21
22 #define SK_OPTS_TARGET SK_OPTS_TARGET_SSSE3
23 #include "src/opts/SkOpts_SetTarget.h"
24
25 #include "src/opts/SkSwizzler_opts.inc"
26
27 #include "src/opts/SkOpts_RestoreTarget.h"
28
29 namespace SkOpts {
30 void Init_Swizzler_ssse3() {
31 RGBA_to_BGRA = ssse3::RGBA_to_BGRA;
32 RGBA_to_rgbA = ssse3::RGBA_to_rgbA;
33 RGBA_to_bgrA = ssse3::RGBA_to_bgrA;
34 RGB_to_RGB1 = ssse3::RGB_to_RGB1;
35 RGB_to_BGR1 = ssse3::RGB_to_BGR1;
36 gray_to_RGB1 = ssse3::gray_to_RGB1;
37 grayA_to_RGBA = ssse3::grayA_to_RGBA;
38 grayA_to_rgbA = ssse3::grayA_to_rgbA;
39 inverted_CMYK_to_RGB1 = ssse3::inverted_CMYK_to_RGB1;
40 inverted_CMYK_to_BGR1 = ssse3::inverted_CMYK_to_BGR1;
41 }
42 } // namespace SkOpts
43
44 #endif // SK_CPU_X86 && !SK_ENABLE_OPTIMIZE_SIZE