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

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

Issue 1986763002: Revert of Add specialized sRGB blitter for SkOpts (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 7 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/SkBlend_opts.h ('k') | tests/SkBlend_optsTest.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 9
10 #define SK_OPTS_NS sk_sse41 10 #define SK_OPTS_NS sk_sse41
11 #include "SkBlurImageFilter_opts.h" 11 #include "SkBlurImageFilter_opts.h"
12 #include "SkBlitRow_opts.h" 12 #include "SkBlitRow_opts.h"
13 #include "SkBlend_opts.h"
14 13
15 #ifndef SK_SUPPORT_LEGACY_X86_BLITS 14 #ifndef SK_SUPPORT_LEGACY_X86_BLITS
16 15
17 namespace sk_sse41_new { 16 namespace sk_sse41_new {
18 17
19 // An SSE register holding at most 64 bits of useful data in the low lanes. 18 // An SSE register holding at most 64 bits of useful data in the low lanes.
20 struct m64i { 19 struct m64i {
21 __m128i v; 20 __m128i v;
22 /*implicit*/ m64i(__m128i v) : v(v) {} 21 /*implicit*/ m64i(__m128i v) : v(v) {}
23 operator __m128i() const { return v; } 22 operator __m128i() const { return v; }
(...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after
205 // SrcOver blend mode, with coverage folded into source alpha. 204 // SrcOver blend mode, with coverage folded into source alpha.
206 __m128i sc = scale(s,c), 205 __m128i sc = scale(s,c),
207 AC = inv(alphas(sc)); 206 AC = inv(alphas(sc));
208 return _mm_add_epi16(sc, scale(d,AC)); 207 return _mm_add_epi16(sc, scale(d,AC));
209 })); 208 }));
210 dst += dstRB / sizeof(*dst); 209 dst += dstRB / sizeof(*dst);
211 cov += covRB / sizeof(*cov); 210 cov += covRB / sizeof(*cov);
212 } 211 }
213 } 212 }
214 } 213 }
214
215 } // namespace sk_sse41_new 215 } // namespace sk_sse41_new
216 216
217 #endif 217 #endif
218 218
219 namespace SkOpts { 219 namespace SkOpts {
220 void Init_sse41() { 220 void Init_sse41() {
221 box_blur_xx = sk_sse41::box_blur_xx; 221 box_blur_xx = sk_sse41::box_blur_xx;
222 box_blur_xy = sk_sse41::box_blur_xy; 222 box_blur_xy = sk_sse41::box_blur_xy;
223 box_blur_yx = sk_sse41::box_blur_yx; 223 box_blur_yx = sk_sse41::box_blur_yx;
224 srcover_srgb_srgb = sk_sse41::srcover_srgb_srgb;
225 224
226 #ifndef SK_SUPPORT_LEGACY_X86_BLITS 225 #ifndef SK_SUPPORT_LEGACY_X86_BLITS
227 blit_row_color32 = sk_sse41_new::blit_row_color32; 226 blit_row_color32 = sk_sse41_new::blit_row_color32;
228 blit_mask_d32_a8 = sk_sse41_new::blit_mask_d32_a8; 227 blit_mask_d32_a8 = sk_sse41_new::blit_mask_d32_a8;
229 #endif 228 #endif
230 blit_row_s32a_opaque = sk_sse41::blit_row_s32a_opaque; 229 blit_row_s32a_opaque = sk_sse41::blit_row_s32a_opaque;
231 } 230 }
232 } 231 }
OLDNEW
« no previous file with comments | « src/opts/SkBlend_opts.h ('k') | tests/SkBlend_optsTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698