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

Unified Diff: skia/ext/convolver.h

Issue 6334070: SIMD implementation of Convolver for Lanczos filter etc. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: try to fix win Created 9 years, 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | skia/ext/convolver.cc » ('j') | skia/ext/convolver.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « no previous file | skia/ext/convolver.cc » ('j') | skia/ext/convolver.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698