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

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

Issue 1273103002: Port SkTextureCompression opts to SkOpts (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: update include_dirs Created 5 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/opts/SkOpts_neon.cpp » ('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 "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 "SkBlurImageFilter_opts.h" 12 #include "SkBlurImageFilter_opts.h"
13 #include "SkFloatingPoint_opts.h" 13 #include "SkFloatingPoint_opts.h"
14 #include "SkMorphologyImageFilter_opts.h" 14 #include "SkMorphologyImageFilter_opts.h"
15 #include "SkTextureCompressor_opts.h"
15 #include "SkUtils_opts.h" 16 #include "SkUtils_opts.h"
16 #include "SkXfermode_opts.h" 17 #include "SkXfermode_opts.h"
17 18
18 #if defined(SK_CPU_X86) 19 #if defined(SK_CPU_X86)
19 #if defined(SK_BUILD_FOR_WIN32) 20 #if defined(SK_BUILD_FOR_WIN32)
20 #include <intrin.h> 21 #include <intrin.h>
21 static void cpuid(uint32_t abcd[4]) { __cpuid((int*)abcd, 1); } 22 static void cpuid(uint32_t abcd[4]) { __cpuid((int*)abcd, 1); }
22 #else 23 #else
23 #include <cpuid.h> 24 #include <cpuid.h>
24 static void cpuid(uint32_t abcd[4]) { __get_cpuid(1, abcd+0, abcd+1, abc d+2, abcd+3); } 25 static void cpuid(uint32_t abcd[4]) { __get_cpuid(1, abcd+0, abcd+1, abc d+2, abcd+3); }
(...skipping 14 matching lines...) Expand all
39 40
40 decltype(box_blur_xx) box_blur_xx = portable::box_blur_xx; 41 decltype(box_blur_xx) box_blur_xx = portable::box_blur_xx;
41 decltype(box_blur_xy) box_blur_xy = portable::box_blur_xy; 42 decltype(box_blur_xy) box_blur_xy = portable::box_blur_xy;
42 decltype(box_blur_yx) box_blur_yx = portable::box_blur_yx; 43 decltype(box_blur_yx) box_blur_yx = portable::box_blur_yx;
43 44
44 decltype(dilate_x) dilate_x = portable::dilate_x; 45 decltype(dilate_x) dilate_x = portable::dilate_x;
45 decltype(dilate_y) dilate_y = portable::dilate_y; 46 decltype(dilate_y) dilate_y = portable::dilate_y;
46 decltype( erode_x) erode_x = portable::erode_x; 47 decltype( erode_x) erode_x = portable::erode_x;
47 decltype( erode_y) erode_y = portable::erode_y; 48 decltype( erode_y) erode_y = portable::erode_y;
48 49
50 decltype(texture_compressor) texture_compressor = portable::texture_co mpressor;
51 decltype(fill_block_dimensions) fill_block_dimensions = portable::fill_block _dimensions;
52
49 // Each Init_foo() is defined in src/opts/SkOpts_foo.cpp. 53 // Each Init_foo() is defined in src/opts/SkOpts_foo.cpp.
50 void Init_sse2(); 54 void Init_sse2();
51 void Init_ssse3(); 55 void Init_ssse3();
52 void Init_sse41(); 56 void Init_sse41();
53 void Init_neon(); 57 void Init_neon();
54 //TODO: _dsp2, _armv7, _armv8, _x86, _x86_64, _sse42, _avx, avx2, ... ? 58 //TODO: _dsp2, _armv7, _armv8, _x86, _x86_64, _sse42, _avx, avx2, ... ?
55 59
56 static void init() { 60 static void init() {
57 // TODO: Chrome's not linking _sse* opts on iOS simulator builds. Bug o r feature? 61 // TODO: Chrome's not linking _sse* opts on iOS simulator builds. Bug o r feature?
58 #if defined(SK_CPU_X86) && !defined(SK_BUILD_FOR_IOS) 62 #if defined(SK_CPU_X86) && !defined(SK_BUILD_FOR_IOS)
(...skipping 11 matching lines...) Expand all
70 74
71 SK_DECLARE_STATIC_ONCE(gInitOnce); 75 SK_DECLARE_STATIC_ONCE(gInitOnce);
72 void Init() { SkOnce(&gInitOnce, init); } 76 void Init() { SkOnce(&gInitOnce, init); }
73 77
74 #if SK_ALLOW_STATIC_GLOBAL_INITIALIZERS 78 #if SK_ALLOW_STATIC_GLOBAL_INITIALIZERS
75 static struct AutoInit { 79 static struct AutoInit {
76 AutoInit() { Init(); } 80 AutoInit() { Init(); }
77 } gAutoInit; 81 } gAutoInit;
78 #endif 82 #endif
79 } 83 }
OLDNEW
« no previous file with comments | « src/core/SkOpts.h ('k') | src/opts/SkOpts_neon.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698