| OLD | NEW |
| 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" |
| 11 | 11 |
| 12 // avoid confusion with Mac OS X's math library (Carbon) | 12 // avoid confusion with Mac OS X's math library (Carbon) |
| 13 #if defined(__APPLE__) | 13 #if defined(__APPLE__) |
| 14 #undef FloatToConvolutionFixed | 14 #undef FloatToConvolutionFixed |
| 15 #undef ConvolutionFixedToFloat | 15 #undef ConvolutionFixedToFloat |
| 16 #undef FloatToFixed |
| 17 #undef FixedToFloat |
| 16 #endif | 18 #endif |
| 17 | 19 |
| 18 // Represents a filter in one dimension. Each output pixel has one entry in this | 20 // Represents a filter in one dimension. Each output pixel has one entry in this |
| 19 // object for the filter values contributing to it. You build up the filter | 21 // object for the filter values contributing to it. You build up the filter |
| 20 // list by calling AddFilter for each output pixel (in order). | 22 // list by calling AddFilter for each output pixel (in order). |
| 21 // | 23 // |
| 22 // We do 2-dimensional convolution by first convolving each row by one | 24 // We do 2-dimensional convolution by first convolving each row by one |
| 23 // SkConvolutionFilter1D, then convolving each column by another one. | 25 // SkConvolutionFilter1D, then convolving each column by another one. |
| 24 // | 26 // |
| 25 // Entries are stored in ConvolutionFixed point, shifted left by kShiftBits. | 27 // Entries are stored in ConvolutionFixed point, shifted left by kShiftBits. |
| (...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 194 int sourceByteRowStride, | 196 int sourceByteRowStride, |
| 195 bool sourceHasAlpha, | 197 bool sourceHasAlpha, |
| 196 const SkConvolutionFilter1D& xfilter, | 198 const SkConvolutionFilter1D& xfilter, |
| 197 const SkConvolutionFilter1D& yfilter, | 199 const SkConvolutionFilter1D& yfilter, |
| 198 int outputByteRowStride, | 200 int outputByteRowStride, |
| 199 unsigned char* output, | 201 unsigned char* output, |
| 200 const SkConvolutionProcs&, | 202 const SkConvolutionProcs&, |
| 201 bool useSimdIfPossible); | 203 bool useSimdIfPossible); |
| 202 | 204 |
| 203 #endif // SK_CONVOLVER_H | 205 #endif // SK_CONVOLVER_H |
| OLD | NEW |