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

Unified Diff: gm/shaderbounds.cpp

Issue 1135053002: stop calling SkScalarDiv (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: fix xpsdevice Created 5 years, 7 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 | « gm/resizeimagefilter.cpp ('k') | gm/stringart.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
}
« no previous file with comments | « gm/resizeimagefilter.cpp ('k') | gm/stringart.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698