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

Unified Diff: src/core/SkBitmapScaler.cpp

Issue 23796005: remove fConvolutionProcs from State, and just use it locally (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 7 years, 3 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 | « src/core/SkBitmapScaler.h ('k') | src/core/SkConvolver.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkBitmapScaler.cpp
diff --git a/src/core/SkBitmapScaler.cpp b/src/core/SkBitmapScaler.cpp
index 807696277ee52adf32badf92fe19135b27330d50..114836dd7967c72419c4ad92253648467cdf3413 100644
--- a/src/core/SkBitmapScaler.cpp
+++ b/src/core/SkBitmapScaler.cpp
@@ -15,7 +15,7 @@ public:
int srcFullWidth, int srcFullHeight,
int destWidth, int destHeight,
const SkIRect& destSubset,
- SkConvolutionProcs* convolveProcs);
+ const SkConvolutionProcs& convolveProcs);
~SkResizeFilter() {
SkDELETE( fBitmapFilter );
}
@@ -43,7 +43,7 @@ private:
int destSubsetLo, int destSubsetSize,
float scale,
SkConvolutionFilter1D* output,
- SkConvolutionProcs* convolveProcs);
+ const SkConvolutionProcs& convolveProcs);
SkConvolutionFilter1D fXFilter;
SkConvolutionFilter1D fYFilter;
@@ -53,7 +53,7 @@ SkResizeFilter::SkResizeFilter(SkBitmapScaler::ResizeMethod method,
int srcFullWidth, int srcFullHeight,
int destWidth, int destHeight,
const SkIRect& destSubset,
- SkConvolutionProcs* convolveProcs) {
+ const SkConvolutionProcs& convolveProcs) {
// method will only ever refer to an "algorithm method".
SkASSERT((SkBitmapScaler::RESIZE_FIRST_ALGORITHM_METHOD <= method) &&
@@ -108,7 +108,7 @@ void SkResizeFilter::computeFilters(int srcSize,
int destSubsetLo, int destSubsetSize,
float scale,
SkConvolutionFilter1D* output,
- SkConvolutionProcs* convolveProcs) {
+ const SkConvolutionProcs& convolveProcs) {
int destSubsetHi = destSubsetLo + destSubsetSize; // [lo, hi)
// When we're doing a magnification, the scale will be larger than one. This
@@ -197,8 +197,8 @@ void SkResizeFilter::computeFilters(int srcSize,
static_cast<int>(fixedFilterValues.count()));
}
- if (convolveProcs->fApplySIMDPadding) {
- convolveProcs->fApplySIMDPadding( output );
+ if (convolveProcs.fApplySIMDPadding) {
+ convolveProcs.fApplySIMDPadding( output );
}
}
@@ -238,7 +238,7 @@ bool SkBitmapScaler::Resize(SkBitmap* resultPtr,
ResizeMethod method,
int destWidth, int destHeight,
const SkIRect& destSubset,
- SkConvolutionProcs* convolveProcs,
+ const SkConvolutionProcs& convolveProcs,
SkBitmap::Allocator* allocator) {
// Ensure that the ResizeMethod enumeration is sound.
SkASSERT(((RESIZE_FIRST_QUALITY_METHOD <= method) &&
@@ -310,7 +310,7 @@ bool SkBitmapScaler::Resize(SkBitmap* resultPtr,
const SkBitmap& source,
ResizeMethod method,
int destWidth, int destHeight,
- SkConvolutionProcs* convolveProcs,
+ const SkConvolutionProcs& convolveProcs,
SkBitmap::Allocator* allocator) {
SkIRect destSubset = { 0, 0, destWidth, destHeight };
return Resize(resultPtr, source, method, destWidth, destHeight, destSubset,
« no previous file with comments | « src/core/SkBitmapScaler.h ('k') | src/core/SkConvolver.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698