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

Side by Side Diff: src/opts/SkOpts_sse2.cpp

Issue 1264103004: Port SkBlurImage opts to SkOpts. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: rename to match src/effects 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/opts/SkOpts_neon.cpp ('k') | src/opts/SkOpts_sse41.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 "SkOpts.h" 8 #include "SkOpts.h"
9
10 #define SK_OPTS_NS sse2
11 #include "SkBlurImageFilter_opts.h"
9 #include "SkXfermode_opts.h" 12 #include "SkXfermode_opts.h"
10 13
11 namespace sse2 { // This helps identify methods from this file when debugging / profiling. 14 namespace sse2 { // This helps identify methods from this file when debugging / profiling.
12 15
13 static void memset16(uint16_t* dst, uint16_t val, int n) { 16 static void memset16(uint16_t* dst, uint16_t val, int n) {
14 auto dst8 = (__m128i*)dst; 17 auto dst8 = (__m128i*)dst;
15 auto val8 = _mm_set1_epi16(val); 18 auto val8 = _mm_set1_epi16(val);
16 for ( ; n >= 8; n -= 8) { 19 for ( ; n >= 8; n -= 8) {
17 _mm_storeu_si128(dst8++, val8); 20 _mm_storeu_si128(dst8++, val8);
18 } 21 }
(...skipping 27 matching lines...) Expand all
46 } 49 }
47 } 50 }
48 51
49 } // namespace sse2 52 } // namespace sse2
50 53
51 namespace SkOpts { 54 namespace SkOpts {
52 void Init_sse2() { 55 void Init_sse2() {
53 memset16 = sse2::memset16; 56 memset16 = sse2::memset16;
54 memset32 = sse2::memset32; 57 memset32 = sse2::memset32;
55 create_xfermode = SkCreate4pxXfermode; 58 create_xfermode = SkCreate4pxXfermode;
59
60 static const auto x = sse2::kX, y = sse2::kY;
61 box_blur_xx = sse2::box_blur<x,x>;
62 box_blur_xy = sse2::box_blur<x,y>;
63 box_blur_yx = sse2::box_blur<y,x>;
56 } 64 }
57 } 65 }
OLDNEW
« no previous file with comments | « src/opts/SkOpts_neon.cpp ('k') | src/opts/SkOpts_sse41.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698