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

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

Issue 2481733003: Make SSE2/Neon convolution functions not to read extra bytes (Closed)
Patch Set: Change macros to functions Created 4 years, 1 month 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_arm_neon.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 2009 The Android Open Source Project 2 * Copyright 2009 The Android Open Source Project
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 "SkBitmapFilter_opts_SSE2.h" 8 #include "SkBitmapFilter_opts_SSE2.h"
9 #include "SkBitmapProcState_opts_SSE2.h" 9 #include "SkBitmapProcState_opts_SSE2.h"
10 #include "SkBitmapProcState_opts_SSSE3.h" 10 #include "SkBitmapProcState_opts_SSSE3.h"
(...skipping 19 matching lines...) Expand all
30 /* This file must *not* be compiled with -msse or any other optional SIMD 30 /* This file must *not* be compiled with -msse or any other optional SIMD
31 extension, otherwise gcc may generate SIMD instructions even for scalar ops 31 extension, otherwise gcc may generate SIMD instructions even for scalar ops
32 (and thus give an invalid instruction on Pentium3 on the code below). 32 (and thus give an invalid instruction on Pentium3 on the code below).
33 For example, only files named *_SSE2.cpp in this directory should be 33 For example, only files named *_SSE2.cpp in this directory should be
34 compiled with -msse2 or higher. */ 34 compiled with -msse2 or higher. */
35 35
36 //////////////////////////////////////////////////////////////////////////////// 36 ////////////////////////////////////////////////////////////////////////////////
37 37
38 void SkBitmapScaler::PlatformConvolutionProcs(SkConvolutionProcs* procs) { 38 void SkBitmapScaler::PlatformConvolutionProcs(SkConvolutionProcs* procs) {
39 if (SkCpu::Supports(SkCpu::SSE2)) { 39 if (SkCpu::Supports(SkCpu::SSE2)) {
40 procs->fExtraHorizontalReads = 3;
41 procs->fConvolveVertically = &convolveVertically_SSE2; 40 procs->fConvolveVertically = &convolveVertically_SSE2;
42 procs->fConvolve4RowsHorizontally = &convolve4RowsHorizontally_SSE2; 41 procs->fConvolve4RowsHorizontally = &convolve4RowsHorizontally_SSE2;
43 procs->fConvolveHorizontally = &convolveHorizontally_SSE2; 42 procs->fConvolveHorizontally = &convolveHorizontally_SSE2;
44 procs->fApplySIMDPadding = &applySIMDPadding_SSE2;
45 } 43 }
46 } 44 }
47 45
48 //////////////////////////////////////////////////////////////////////////////// 46 ////////////////////////////////////////////////////////////////////////////////
49 47
50 void SkBitmapProcState::platformProcs() { 48 void SkBitmapProcState::platformProcs() {
51 /* Every optimization in the function requires at least SSE2 */ 49 /* Every optimization in the function requires at least SSE2 */
52 if (!SkCpu::Supports(SkCpu::SSE2)) { 50 if (!SkCpu::Supports(SkCpu::SSE2)) {
53 return; 51 return;
54 } 52 }
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
154 } 152 }
155 } else { 153 } else {
156 return nullptr; 154 return nullptr;
157 } 155 }
158 156
159 } 157 }
160 158
161 SkBlitMask::RowProc SkBlitMask::PlatformRowProcs(SkColorType, SkMask::Format, Ro wFlags) { 159 SkBlitMask::RowProc SkBlitMask::PlatformRowProcs(SkColorType, SkMask::Format, Ro wFlags) {
162 return nullptr; 160 return nullptr;
163 } 161 }
OLDNEW
« no previous file with comments | « src/opts/SkBitmapProcState_arm_neon.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698