Index: src/core/SkPictureShader.cpp |
diff --git a/src/core/SkPictureShader.cpp b/src/core/SkPictureShader.cpp |
index e831320a7ec38649a578a96cf70da29d60a6feb1..2c835ed93ecbb5122a89e726d5623da43bfa92f6 100644 |
--- a/src/core/SkPictureShader.cpp |
+++ b/src/core/SkPictureShader.cpp |
@@ -178,8 +178,8 @@ SkShader* SkPictureShader::refBitmapShader(const SkMatrix& matrix, const SkMatri |
if (scaledSize.width() > maxTextureSize || scaledSize.height() > maxTextureSize) { |
SkScalar downScale = SkScalarDiv(maxTextureSize, |
SkMax32(scaledSize.width(), scaledSize.height())); |
- scaledSize.set(SkScalarMul(scaledSize.width(), downScale), |
- SkScalarMul(scaledSize.height(), downScale)); |
+ scaledSize.set(SkScalarFloorToScalar(SkScalarMul(scaledSize.width(), downScale)), |
+ SkScalarFloorToScalar(SkScalarMul(scaledSize.height(), downScale))); |
} |
} |
#endif |