Index: gm/shaderbounds.cpp |
diff --git a/gm/shaderbounds.cpp b/gm/shaderbounds.cpp |
index 4363d4eee3861fe2f5e8f25cde52d6e441fe4193..e86ab054310262b814901328b59f58536f9283e2 100644 |
--- a/gm/shaderbounds.cpp |
+++ b/gm/shaderbounds.cpp |
@@ -80,9 +80,10 @@ |
if (background) { |
scale = 0.6f; |
} |
- SkScalar shaderWidth = width / scale; |
- SkScalar shaderHeight = height / scale; |
- SkMatrix shaderScale = SkMatrix::MakeScale(scale); |
+ SkScalar shaderWidth = SkScalarDiv(SkIntToScalar(width), scale); |
+ SkScalar shaderHeight = SkScalarDiv(SkIntToScalar(height), scale); |
+ SkMatrix shaderScale; |
+ shaderScale.setScale(scale, scale); |
SkShader* shader = fShaderMaker(shaderWidth, shaderHeight, background, shaderScale); |
return shader; |
} |