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