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

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

Issue 1264543006: Port SkXfermode opts to SkOpts.h (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: rebase 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/SkXfermode_opts.h » ('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 #include "SkXfermode_opts.h"
9 10
10 namespace sse2 { // This helps identify methods from this file when debugging / profiling. 11 namespace sse2 { // This helps identify methods from this file when debugging / profiling.
11 12
12 static void memset16(uint16_t* dst, uint16_t val, int n) { 13 static void memset16(uint16_t* dst, uint16_t val, int n) {
13 auto dst8 = (__m128i*)dst; 14 auto dst8 = (__m128i*)dst;
14 auto val8 = _mm_set1_epi16(val); 15 auto val8 = _mm_set1_epi16(val);
15 for ( ; n >= 8; n -= 8) { 16 for ( ; n >= 8; n -= 8) {
16 _mm_storeu_si128(dst8++, val8); 17 _mm_storeu_si128(dst8++, val8);
17 } 18 }
18 dst = (uint16_t*)dst8; 19 dst = (uint16_t*)dst8;
(...skipping 23 matching lines...) Expand all
42 } 43 }
43 if (n & 1) { 44 if (n & 1) {
44 *dst = val; 45 *dst = val;
45 } 46 }
46 } 47 }
47 48
48 } // namespace sse2 49 } // namespace sse2
49 50
50 namespace SkOpts { 51 namespace SkOpts {
51 void Init_sse2() { 52 void Init_sse2() {
52 memset16 = sse2::memset16; 53 memset16 = sse2::memset16;
53 memset32 = sse2::memset32; 54 memset32 = sse2::memset32;
55 create_xfermode = SkCreate4pxXfermode;
54 } 56 }
55 } 57 }
OLDNEW
« no previous file with comments | « src/opts/SkOpts_neon.cpp ('k') | src/opts/SkXfermode_opts.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698