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

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

Issue 1819223003: Revert of Clean up SSSE3 and SSE4 stubs. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 9 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/SkBitmapProcState_opts_SSSE3.cpp ('k') | no next file » | 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 "SkBlitRow_opts_SSE4.h" 8 #include "SkBlitRow_opts_SSE4.h"
9
10 // Some compilers can't compile SSSE3 or SSE4 intrinsics. We give them stub met hods.
11 // The stubs should never be called, so we make them crash just to confirm that.
12 #if SK_CPU_SSE_LEVEL < SK_CPU_SSE_LEVEL_SSE41
13 void S32A_Opaque_BlitRow32_SSE4(SkPMColor* SK_RESTRICT, const SkPMColor* SK_REST RICT, int, U8CPU) {
14 sk_throw();
15 }
16
17 #else
18
19 #include <smmintrin.h> // SSE4.1 intrinsics
9 #include "SkColorPriv.h" 20 #include "SkColorPriv.h"
10 #include "SkColor_opts_SSE2.h" 21 #include "SkColor_opts_SSE2.h"
11 #include "SkMSAN.h" 22 #include "SkMSAN.h"
12 23
13 void S32A_Opaque_BlitRow32_SSE4(SkPMColor* SK_RESTRICT dst, 24 void S32A_Opaque_BlitRow32_SSE4(SkPMColor* SK_RESTRICT dst,
14 const SkPMColor* SK_RESTRICT src, 25 const SkPMColor* SK_RESTRICT src,
15 int count, 26 int count,
16 U8CPU alpha) { 27 U8CPU alpha) {
17 sk_msan_assert_initialized(src, src+count); 28 sk_msan_assert_initialized(src, src+count);
18 29
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 } 63 }
53 64
54 // Wrap up the last <= 15 pixels. 65 // Wrap up the last <= 15 pixels.
55 for (int i = count16*16; i < count; i++) { 66 for (int i = count16*16; i < count; i++) {
56 // This check is not really necessarily, but it prevents pointless autov ectorization. 67 // This check is not really necessarily, but it prevents pointless autov ectorization.
57 if (src[i] & 0xFF000000) { 68 if (src[i] & 0xFF000000) {
58 dst[i] = SkPMSrcOver(src[i], dst[i]); 69 dst[i] = SkPMSrcOver(src[i], dst[i]);
59 } 70 }
60 } 71 }
61 } 72 }
73
74 #endif
OLDNEW
« no previous file with comments | « src/opts/SkBitmapProcState_opts_SSSE3.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698