Chromium Code Reviews| 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" |
| (...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 185 // The result will be put into the given output buffer. The destination image | 185 // The result will be put into the given output buffer. The destination image |
| 186 // size will be xfilter.numValues() * yfilter.numValues() pixels. It will be | 186 // size will be xfilter.numValues() * yfilter.numValues() pixels. It will be |
| 187 // in rows of exactly xfilter.numValues() * 4 bytes. | 187 // in rows of exactly xfilter.numValues() * 4 bytes. |
| 188 // | 188 // |
| 189 // |sourceHasAlpha| is a hint that allows us to avoid doing computations on | 189 // |sourceHasAlpha| is a hint that allows us to avoid doing computations on |
| 190 // the alpha channel if the image is opaque. If you don't know, set this to | 190 // the alpha channel if the image is opaque. If you don't know, set this to |
| 191 // true and it will work properly, but setting this to false will be a few | 191 // true and it will work properly, but setting this to false will be a few |
| 192 // percent faster if you know the image is opaque. | 192 // percent faster if you know the image is opaque. |
| 193 // | 193 // |
| 194 // The layout in memory is assumed to be 4-bytes per pixel in B-G-R-A order | 194 // The layout in memory is assumed to be 4-bytes per pixel in B-G-R-A order |
| 195 // (this is ARGB when loaded into 32-bit words on a little-endian machine). | 195 // (this is ARGB when loaded into 32-bit words on a little-endian machine). |
|
robertphillips
2015/10/01 15:01:09
doc new return value ?
reed1
2015/10/01 18:14:52
Done.
| |
| 196 SK_API void BGRAConvolve2D(const unsigned char* sourceData, | 196 SK_API bool BGRAConvolve2D(const unsigned char* sourceData, |
| 197 int sourceByteRowStride, | 197 int sourceByteRowStride, |
| 198 bool sourceHasAlpha, | 198 bool sourceHasAlpha, |
| 199 const SkConvolutionFilter1D& xfilter, | 199 const SkConvolutionFilter1D& xfilter, |
| 200 const SkConvolutionFilter1D& yfilter, | 200 const SkConvolutionFilter1D& yfilter, |
| 201 int outputByteRowStride, | 201 int outputByteRowStride, |
| 202 unsigned char* output, | 202 unsigned char* output, |
| 203 const SkConvolutionProcs&, | 203 const SkConvolutionProcs&, |
| 204 bool useSimdIfPossible); | 204 bool useSimdIfPossible); |
| 205 | 205 |
| 206 #endif // SK_CONVOLVER_H | 206 #endif // SK_CONVOLVER_H |
| OLD | NEW |