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 "SkOnce.h" | 8 #include "SkOnce.h" |
9 #include "SkOpts.h" | 9 #include "SkOpts.h" |
10 | 10 |
11 #define SK_OPTS_NS sk_default | 11 #define SK_OPTS_NS sk_default |
12 #include "SkBlitMask_opts.h" | 12 #include "SkBlitMask_opts.h" |
13 #include "SkBlitRow_opts.h" | 13 #include "SkBlitRow_opts.h" |
14 #include "SkBlurImageFilter_opts.h" | 14 #include "SkBlurImageFilter_opts.h" |
15 #include "SkColorCubeFilter_opts.h" | 15 #include "SkColorCubeFilter_opts.h" |
16 #include "SkFloatingPoint_opts.h" | |
17 #include "SkMatrix_opts.h" | 16 #include "SkMatrix_opts.h" |
18 #include "SkMorphologyImageFilter_opts.h" | 17 #include "SkMorphologyImageFilter_opts.h" |
19 #include "SkSwizzler_opts.h" | 18 #include "SkSwizzler_opts.h" |
20 #include "SkTextureCompressor_opts.h" | 19 #include "SkTextureCompressor_opts.h" |
21 #include "SkUtils_opts.h" | 20 #include "SkUtils_opts.h" |
22 #include "SkXfermode_opts.h" | 21 #include "SkXfermode_opts.h" |
23 | 22 |
24 #if defined(SK_CPU_X86) && !defined(SK_BUILD_FOR_IOS) | 23 #if defined(SK_CPU_X86) && !defined(SK_BUILD_FOR_IOS) |
25 #if defined(SK_BUILD_FOR_WIN32) | 24 #if defined(SK_BUILD_FOR_WIN32) |
26 #include <intrin.h> | 25 #include <intrin.h> |
(...skipping 21 matching lines...) Expand all Loading... |
48 defined(SK_BUILD_FOR_ANDROID) && \ | 47 defined(SK_BUILD_FOR_ANDROID) && \ |
49 !defined(SK_BUILD_FOR_ANDROID_FRAMEWORK) | 48 !defined(SK_BUILD_FOR_ANDROID_FRAMEWORK) |
50 #include <cpu-features.h> | 49 #include <cpu-features.h> |
51 #endif | 50 #endif |
52 | 51 |
53 namespace SkOpts { | 52 namespace SkOpts { |
54 // Define default function pointer values here... | 53 // Define default function pointer values here... |
55 // If our global compile options are set high enough, these defaults might e
ven be | 54 // If our global compile options are set high enough, these defaults might e
ven be |
56 // CPU-specialized, e.g. a typical x86-64 machine might start with SSE2 defa
ults. | 55 // CPU-specialized, e.g. a typical x86-64 machine might start with SSE2 defa
ults. |
57 // They'll still get a chance to be replaced with even better ones, e.g. usi
ng SSE4.1. | 56 // They'll still get a chance to be replaced with even better ones, e.g. usi
ng SSE4.1. |
58 decltype(rsqrt) rsqrt = sk_default::rsqrt; | |
59 decltype(memset16) memset16 = sk_default::memset16; | 57 decltype(memset16) memset16 = sk_default::memset16; |
60 decltype(memset32) memset32 = sk_default::memset32; | 58 decltype(memset32) memset32 = sk_default::memset32; |
61 decltype(create_xfermode) create_xfermode = sk_default::create_xfermode; | 59 decltype(create_xfermode) create_xfermode = sk_default::create_xfermode; |
62 decltype(color_cube_filter_span) color_cube_filter_span = sk_default::color_
cube_filter_span; | 60 decltype(color_cube_filter_span) color_cube_filter_span = sk_default::color_
cube_filter_span; |
63 | 61 |
64 decltype(box_blur_xx) box_blur_xx = sk_default::box_blur_xx; | 62 decltype(box_blur_xx) box_blur_xx = sk_default::box_blur_xx; |
65 decltype(box_blur_xy) box_blur_xy = sk_default::box_blur_xy; | 63 decltype(box_blur_xy) box_blur_xy = sk_default::box_blur_xy; |
66 decltype(box_blur_yx) box_blur_yx = sk_default::box_blur_yx; | 64 decltype(box_blur_yx) box_blur_yx = sk_default::box_blur_yx; |
67 | 65 |
68 decltype(dilate_x) dilate_x = sk_default::dilate_x; | 66 decltype(dilate_x) dilate_x = sk_default::dilate_x; |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
123 | 121 |
124 SK_DECLARE_STATIC_ONCE(gInitOnce); | 122 SK_DECLARE_STATIC_ONCE(gInitOnce); |
125 void Init() { SkOnce(&gInitOnce, init); } | 123 void Init() { SkOnce(&gInitOnce, init); } |
126 | 124 |
127 #if SK_ALLOW_STATIC_GLOBAL_INITIALIZERS | 125 #if SK_ALLOW_STATIC_GLOBAL_INITIALIZERS |
128 static struct AutoInit { | 126 static struct AutoInit { |
129 AutoInit() { Init(); } | 127 AutoInit() { Init(); } |
130 } gAutoInit; | 128 } gAutoInit; |
131 #endif | 129 #endif |
132 } | 130 } |
OLD | NEW |