Index: skia/ext/convolver.h |
diff --git a/skia/ext/convolver.h b/skia/ext/convolver.h |
index 04d6fe5c52db2e05218b8973c5e90b944e0b5d8f..a93dece7815325ba5c104ae169c3ac0c73568ed8 100644 |
--- a/skia/ext/convolver.h |
+++ b/skia/ext/convolver.h |
@@ -10,6 +10,7 @@ |
#include <vector> |
#include "base/basictypes.h" |
+#include "base/cpu.h" |
// avoid confusion with Mac OS X's math library (Carbon) |
#if defined(__APPLE__) |
@@ -98,6 +99,13 @@ class ConvolutionFilter1D { |
return &filter_values_[filter.data_location]; |
} |
+ inline void PaddingForSIMD(int align) { |
brettw
2011/02/21 04:45:45
I would have thought that you'd want to pad up to
jiesun
2011/02/22 21:37:03
padding in SIMD serve two purpose:
1. make element
|
+ // 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. |
@@ -148,6 +156,21 @@ void BGRAConvolve2D(const unsigned char* source_data, |
int output_byte_row_stride, |
unsigned char* output); |
+void BGRAConvolve2D_C(const unsigned char* source_data, |
+ int source_byte_row_stride, |
brettw
2011/02/21 04:45:45
Style: be sure to align the args in these two func
jiesun
2011/02/22 21:37:03
Done.
|
+ bool source_has_alpha, |
+ const ConvolutionFilter1D& filter_x, |
+ const ConvolutionFilter1D& filter_y, |
+ int output_byte_row_stride, |
+ unsigned char* output); |
+ |
+void BGRAConvolve2D_SSE2(const unsigned char* source_data, |
+ int source_byte_row_stride, |
+ bool source_has_alpha, |
+ const ConvolutionFilter1D& filter_x, |
+ const ConvolutionFilter1D& filter_y, |
+ int output_byte_row_stride, |
+ unsigned char* output); |
} // namespace skia |
#endif // SKIA_EXT_CONVOLVER_H_ |