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

Side by Side Diff: src/core/SkConvolver.h

Issue 1187173005: Plumb through out_row byte length so we can assert we stay underneath it. (Closed) Base URL: https://skia.googlesource.com/skia@master
Patch Set: Created 5 years, 6 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 | « no previous file | src/core/SkConvolver.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 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef SK_CONVOLVER_H 5 #ifndef SK_CONVOLVER_H
6 #define SK_CONVOLVER_H 6 #define SK_CONVOLVER_H
7 7
8 #include "SkSize.h" 8 #include "SkSize.h"
9 #include "SkTypes.h" 9 #include "SkTypes.h"
10 #include "SkTArray.h" 10 #include "SkTArray.h"
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after
146 typedef void (*SkConvolveVertically_pointer)( 146 typedef void (*SkConvolveVertically_pointer)(
147 const SkConvolutionFilter1D::ConvolutionFixed* filterValues, 147 const SkConvolutionFilter1D::ConvolutionFixed* filterValues,
148 int filterLength, 148 int filterLength,
149 unsigned char* const* sourceDataRows, 149 unsigned char* const* sourceDataRows,
150 int pixelWidth, 150 int pixelWidth,
151 unsigned char* outRow, 151 unsigned char* outRow,
152 bool hasAlpha); 152 bool hasAlpha);
153 typedef void (*SkConvolve4RowsHorizontally_pointer)( 153 typedef void (*SkConvolve4RowsHorizontally_pointer)(
154 const unsigned char* srcData[4], 154 const unsigned char* srcData[4],
155 const SkConvolutionFilter1D& filter, 155 const SkConvolutionFilter1D& filter,
156 unsigned char* outRow[4]); 156 unsigned char* outRow[4],
157 size_t outRowBytes);
157 typedef void (*SkConvolveHorizontally_pointer)( 158 typedef void (*SkConvolveHorizontally_pointer)(
158 const unsigned char* srcData, 159 const unsigned char* srcData,
159 const SkConvolutionFilter1D& filter, 160 const SkConvolutionFilter1D& filter,
160 unsigned char* outRow, 161 unsigned char* outRow,
161 bool hasAlpha); 162 bool hasAlpha);
162 typedef void (*SkConvolveFilterPadding_pointer)( 163 typedef void (*SkConvolveFilterPadding_pointer)(
163 SkConvolutionFilter1D* filter); 164 SkConvolutionFilter1D* filter);
164 165
165 struct SkConvolutionProcs { 166 struct SkConvolutionProcs {
166 // This is how many extra pixels may be read by the 167 // This is how many extra pixels may be read by the
(...skipping 29 matching lines...) Expand all
196 int sourceByteRowStride, 197 int sourceByteRowStride,
197 bool sourceHasAlpha, 198 bool sourceHasAlpha,
198 const SkConvolutionFilter1D& xfilter, 199 const SkConvolutionFilter1D& xfilter,
199 const SkConvolutionFilter1D& yfilter, 200 const SkConvolutionFilter1D& yfilter,
200 int outputByteRowStride, 201 int outputByteRowStride,
201 unsigned char* output, 202 unsigned char* output,
202 const SkConvolutionProcs&, 203 const SkConvolutionProcs&,
203 bool useSimdIfPossible); 204 bool useSimdIfPossible);
204 205
205 #endif // SK_CONVOLVER_H 206 #endif // SK_CONVOLVER_H
OLDNEW
« no previous file with comments | « no previous file | src/core/SkConvolver.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698