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

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

Issue 1639863002: try plain-old code for sk_memset16/32 now that NEON is compile-time (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: for Created 4 years, 10 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 "SkHalf.h" 8 #include "SkHalf.h"
9 #include "SkOnce.h" 9 #include "SkOnce.h"
10 #include "SkOpts.h" 10 #include "SkOpts.h"
11 11
12 #define SK_OPTS_NS sk_default 12 #define SK_OPTS_NS sk_default
13 #include "SkBlitMask_opts.h" 13 #include "SkBlitMask_opts.h"
14 #include "SkBlitRow_opts.h" 14 #include "SkBlitRow_opts.h"
15 #include "SkBlurImageFilter_opts.h" 15 #include "SkBlurImageFilter_opts.h"
16 #include "SkColorCubeFilter_opts.h" 16 #include "SkColorCubeFilter_opts.h"
17 #include "SkMatrix_opts.h" 17 #include "SkMatrix_opts.h"
18 #include "SkMorphologyImageFilter_opts.h" 18 #include "SkMorphologyImageFilter_opts.h"
19 #include "SkSwizzler_opts.h" 19 #include "SkSwizzler_opts.h"
20 #include "SkTextureCompressor_opts.h" 20 #include "SkTextureCompressor_opts.h"
21 #include "SkUtils_opts.h"
22 #include "SkXfermode_opts.h" 21 #include "SkXfermode_opts.h"
23 22
24 namespace SK_OPTS_NS { 23 namespace SK_OPTS_NS {
25 static void float_to_half(uint16_t dst[], const float src[], int n) { 24 static void float_to_half(uint16_t dst[], const float src[], int n) {
26 while (n-->0) { 25 while (n-->0) {
27 *dst++ = SkFloatToHalf(*src++); 26 *dst++ = SkFloatToHalf(*src++);
28 } 27 }
29 } 28 }
30 static void half_to_float(float dst[], const uint16_t src[], int n) { 29 static void half_to_float(float dst[], const uint16_t src[], int n) {
31 while (n-->0) { 30 while (n-->0) {
(...skipping 29 matching lines...) Expand all
61 defined(SK_BUILD_FOR_ANDROID) && \ 60 defined(SK_BUILD_FOR_ANDROID) && \
62 !defined(SK_BUILD_FOR_ANDROID_FRAMEWORK) 61 !defined(SK_BUILD_FOR_ANDROID_FRAMEWORK)
63 #include <cpu-features.h> 62 #include <cpu-features.h>
64 #endif 63 #endif
65 64
66 namespace SkOpts { 65 namespace SkOpts {
67 // Define default function pointer values here... 66 // Define default function pointer values here...
68 // If our global compile options are set high enough, these defaults might e ven be 67 // If our global compile options are set high enough, these defaults might e ven be
69 // CPU-specialized, e.g. a typical x86-64 machine might start with SSE2 defa ults. 68 // CPU-specialized, e.g. a typical x86-64 machine might start with SSE2 defa ults.
70 // They'll still get a chance to be replaced with even better ones, e.g. usi ng SSE4.1. 69 // They'll still get a chance to be replaced with even better ones, e.g. usi ng SSE4.1.
71 decltype(memset16) memset16 = sk_default::memset16;
72 decltype(memset32) memset32 = sk_default::memset32;
73 decltype(create_xfermode) create_xfermode = sk_default::create_xfermode; 70 decltype(create_xfermode) create_xfermode = sk_default::create_xfermode;
74 decltype(color_cube_filter_span) color_cube_filter_span = sk_default::color_ cube_filter_span; 71 decltype(color_cube_filter_span) color_cube_filter_span = sk_default::color_ cube_filter_span;
75 72
76 decltype(box_blur_xx) box_blur_xx = sk_default::box_blur_xx; 73 decltype(box_blur_xx) box_blur_xx = sk_default::box_blur_xx;
77 decltype(box_blur_xy) box_blur_xy = sk_default::box_blur_xy; 74 decltype(box_blur_xy) box_blur_xy = sk_default::box_blur_xy;
78 decltype(box_blur_yx) box_blur_yx = sk_default::box_blur_yx; 75 decltype(box_blur_yx) box_blur_yx = sk_default::box_blur_yx;
79 76
80 decltype(dilate_x) dilate_x = sk_default::dilate_x; 77 decltype(dilate_x) dilate_x = sk_default::dilate_x;
81 decltype(dilate_y) dilate_y = sk_default::dilate_y; 78 decltype(dilate_y) dilate_y = sk_default::dilate_y;
82 decltype( erode_x) erode_x = sk_default::erode_x; 79 decltype( erode_x) erode_x = sk_default::erode_x;
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
145 142
146 SK_DECLARE_STATIC_ONCE(gInitOnce); 143 SK_DECLARE_STATIC_ONCE(gInitOnce);
147 void Init() { SkOnce(&gInitOnce, init); } 144 void Init() { SkOnce(&gInitOnce, init); }
148 145
149 #if SK_ALLOW_STATIC_GLOBAL_INITIALIZERS 146 #if SK_ALLOW_STATIC_GLOBAL_INITIALIZERS
150 static struct AutoInit { 147 static struct AutoInit {
151 AutoInit() { Init(); } 148 AutoInit() { Init(); }
152 } gAutoInit; 149 } gAutoInit;
153 #endif 150 #endif
154 } 151 }
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