| 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 portable | 11 #define SK_OPTS_NS portable |
| 12 #include "SkBlitMask_opts.h" |
| 12 #include "SkBlurImageFilter_opts.h" | 13 #include "SkBlurImageFilter_opts.h" |
| 13 #include "SkFloatingPoint_opts.h" | 14 #include "SkFloatingPoint_opts.h" |
| 14 #include "SkMorphologyImageFilter_opts.h" | 15 #include "SkMorphologyImageFilter_opts.h" |
| 15 #include "SkTextureCompressor_opts.h" | 16 #include "SkTextureCompressor_opts.h" |
| 16 #include "SkUtils_opts.h" | 17 #include "SkUtils_opts.h" |
| 17 #include "SkXfermode_opts.h" | 18 #include "SkXfermode_opts.h" |
| 18 | 19 |
| 19 #if defined(SK_CPU_X86) | 20 #if defined(SK_CPU_X86) |
| 20 #if defined(SK_BUILD_FOR_WIN32) | 21 #if defined(SK_BUILD_FOR_WIN32) |
| 21 #include <intrin.h> | 22 #include <intrin.h> |
| (...skipping 21 matching lines...) Expand all Loading... |
| 43 decltype(box_blur_yx) box_blur_yx = portable::box_blur_yx; | 44 decltype(box_blur_yx) box_blur_yx = portable::box_blur_yx; |
| 44 | 45 |
| 45 decltype(dilate_x) dilate_x = portable::dilate_x; | 46 decltype(dilate_x) dilate_x = portable::dilate_x; |
| 46 decltype(dilate_y) dilate_y = portable::dilate_y; | 47 decltype(dilate_y) dilate_y = portable::dilate_y; |
| 47 decltype( erode_x) erode_x = portable::erode_x; | 48 decltype( erode_x) erode_x = portable::erode_x; |
| 48 decltype( erode_y) erode_y = portable::erode_y; | 49 decltype( erode_y) erode_y = portable::erode_y; |
| 49 | 50 |
| 50 decltype(texture_compressor) texture_compressor = portable::texture_co
mpressor; | 51 decltype(texture_compressor) texture_compressor = portable::texture_co
mpressor; |
| 51 decltype(fill_block_dimensions) fill_block_dimensions = portable::fill_block
_dimensions; | 52 decltype(fill_block_dimensions) fill_block_dimensions = portable::fill_block
_dimensions; |
| 52 | 53 |
| 54 decltype(blit_mask_d32_a8) blit_mask_d32_a8 = portable::blit_mask_d32_a8; |
| 55 |
| 53 // Each Init_foo() is defined in src/opts/SkOpts_foo.cpp. | 56 // Each Init_foo() is defined in src/opts/SkOpts_foo.cpp. |
| 54 void Init_sse2(); | 57 void Init_sse2(); |
| 55 void Init_ssse3(); | 58 void Init_ssse3(); |
| 56 void Init_sse41(); | 59 void Init_sse41(); |
| 57 void Init_neon(); | 60 void Init_neon(); |
| 58 //TODO: _dsp2, _armv7, _armv8, _x86, _x86_64, _sse42, _avx, avx2, ... ? | 61 //TODO: _dsp2, _armv7, _armv8, _x86, _x86_64, _sse42, _avx, avx2, ... ? |
| 59 | 62 |
| 60 static void init() { | 63 static void init() { |
| 61 // TODO: Chrome's not linking _sse* opts on iOS simulator builds. Bug o
r feature? | 64 // TODO: Chrome's not linking _sse* opts on iOS simulator builds. Bug o
r feature? |
| 62 #if defined(SK_CPU_X86) && !defined(SK_BUILD_FOR_IOS) | 65 #if defined(SK_CPU_X86) && !defined(SK_BUILD_FOR_IOS) |
| (...skipping 11 matching lines...) Expand all Loading... |
| 74 | 77 |
| 75 SK_DECLARE_STATIC_ONCE(gInitOnce); | 78 SK_DECLARE_STATIC_ONCE(gInitOnce); |
| 76 void Init() { SkOnce(&gInitOnce, init); } | 79 void Init() { SkOnce(&gInitOnce, init); } |
| 77 | 80 |
| 78 #if SK_ALLOW_STATIC_GLOBAL_INITIALIZERS | 81 #if SK_ALLOW_STATIC_GLOBAL_INITIALIZERS |
| 79 static struct AutoInit { | 82 static struct AutoInit { |
| 80 AutoInit() { Init(); } | 83 AutoInit() { Init(); } |
| 81 } gAutoInit; | 84 } gAutoInit; |
| 82 #endif | 85 #endif |
| 83 } | 86 } |
| OLD | NEW |