aboutsummaryrefslogtreecommitdiffhomepage
path: root/include/core/SkMatrix.h
diff options
context:
space:
mode:
authorGravatar reed <reed@google.com>2016-06-30 06:38:54 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2016-06-30 06:38:54 -0700
commit47df89ebfd548de2ccd91387e1d7eee418b65f96 (patch)
tree97ef6df66cec123f559f7feb98dd5942670bf744 /include/core/SkMatrix.h
parent501ca7f538f129efd27113e641ad17363920886e (diff)
speed up maprect for scale+trans case
Diffstat (limited to 'include/core/SkMatrix.h')
-rw-r--r--include/core/SkMatrix.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/core/SkMatrix.h b/include/core/SkMatrix.h
index 6738a0eb69..d6d029597f 100644
--- a/include/core/SkMatrix.h
+++ b/include/core/SkMatrix.h
@@ -561,6 +561,12 @@ public:
this->mapPoints(dst, 4);
}
+ /**
+ * Maps a rect to another rect, asserting (in debug mode) that the matrix only contains
+ * scale and translate elements. If it contains other elements, the results are undefined.
+ */
+ void mapRectScaleTranslate(SkRect* dst, const SkRect& src) const;
+
/** Return the mean radius of a circle after it has been mapped by
this matrix. NOTE: in perspective this value assumes the circle
has its center at the origin.