Index: skia/ext/convolver.h |
diff --git a/skia/ext/convolver.h b/skia/ext/convolver.h |
index 04d6fe5c52db2e05218b8973c5e90b944e0b5d8f..e56efa0db85eb975b285fecee7c291ee6b2f6b9c 100644 |
--- a/skia/ext/convolver.h |
+++ b/skia/ext/convolver.h |
@@ -98,6 +98,13 @@ class ConvolutionFilter1D { |
return &filter_values_[filter.data_location]; |
} |
+ inline void PaddingForSIMD(int align) { |
+ // Padding more coefficients to allow SIMD to load after the last one. |
+ // This has to be done after all |AddFilter| calls. |
+ for (int i = 0; i < align; ++i) |
+ filter_values_.push_back(static_cast<Fixed>(0)); |
+ } |
+ |
private: |
struct FilterInstance { |
// Offset within filter_values for this instance of the filter. |
@@ -146,7 +153,8 @@ void BGRAConvolve2D(const unsigned char* source_data, |
const ConvolutionFilter1D& xfilter, |
const ConvolutionFilter1D& yfilter, |
int output_byte_row_stride, |
- unsigned char* output); |
+ unsigned char* output, |
+ bool use_sse2 = false); |
} // namespace skia |