Index: src/core/SkBitmapScaler.cpp |
=================================================================== |
--- src/core/SkBitmapScaler.cpp (revision 13679) |
+++ src/core/SkBitmapScaler.cpp (working copy) |
@@ -89,8 +89,15 @@ |
this->computeFilters(srcFullWidth, destSubset.fLeft, destSubset.width(), |
scaleX, &fXFilter, convolveProcs); |
- this->computeFilters(srcFullHeight, destSubset.fTop, destSubset.height(), |
- scaleY, &fYFilter, convolveProcs); |
+ if (srcFullWidth == srcFullHeight && |
+ destSubset.fLeft == destSubset.fTop && |
+ destSubset.width() == destSubset.height()&& |
+ scaleX == scaleY) { |
+ fYFilter = fXFilter; |
+ } else { |
+ this->computeFilters(srcFullHeight, destSubset.fTop, destSubset.height(), |
+ scaleY, &fYFilter, convolveProcs); |
+ } |
} |
// TODO(egouriou): Take advantage of periods in the convolution. |