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

Unified Diff: src/core/SkMatrix.cpp

Issue 295713002: Rename SkMatrix::get(Min|Max)Stretch to get(Min|Max)Scale (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: rename Created 6 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 | « src/core/SkBitmapProcShader.cpp ('k') | src/gpu/GrPathUtils.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkMatrix.cpp
diff --git a/src/core/SkMatrix.cpp b/src/core/SkMatrix.cpp
index 0929440e7a44be5a7919c8e815d296277a1a20e2..483c6c83e44ef064f3f0191408b98e827668d037 100644
--- a/src/core/SkMatrix.cpp
+++ b/src/core/SkMatrix.cpp
@@ -1456,8 +1456,8 @@ enum MinOrMax {
kMax_MinOrMax
};
-template <MinOrMax MIN_OR_MAX> SkScalar get_stretch_factor(SkMatrix::TypeMask typeMask,
- const SkScalar m[9]) {
+template <MinOrMax MIN_OR_MAX> SkScalar get_scale_factor(SkMatrix::TypeMask typeMask,
+ const SkScalar m[9]) {
if (typeMask & SkMatrix::kPerspective_Mask) {
return -1;
}
@@ -1510,12 +1510,12 @@ template <MinOrMax MIN_OR_MAX> SkScalar get_stretch_factor(SkMatrix::TypeMask ty
return SkScalarSqrt(chosenRoot);
}
-SkScalar SkMatrix::getMinStretch() const {
- return get_stretch_factor<kMin_MinOrMax>(this->getType(), fMat);
+SkScalar SkMatrix::getMinScale() const {
+ return get_scale_factor<kMin_MinOrMax>(this->getType(), fMat);
}
-SkScalar SkMatrix::getMaxStretch() const {
- return get_stretch_factor<kMax_MinOrMax>(this->getType(), fMat);
+SkScalar SkMatrix::getMaxScale() const {
+ return get_scale_factor<kMax_MinOrMax>(this->getType(), fMat);
}
static void reset_identity_matrix(SkMatrix* identity) {
« no previous file with comments | « src/core/SkBitmapProcShader.cpp ('k') | src/gpu/GrPathUtils.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698