diff options
author | reed <reed@google.com> | 2016-06-30 06:38:54 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-06-30 06:38:54 -0700 |
commit | 47df89ebfd548de2ccd91387e1d7eee418b65f96 (patch) | |
tree | 97ef6df66cec123f559f7feb98dd5942670bf744 /include/core/SkMatrix.h | |
parent | 501ca7f538f129efd27113e641ad17363920886e (diff) |
speed up maprect for scale+trans case
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2111703002
Review-Url: https://codereview.chromium.org/2111703002
Diffstat (limited to 'include/core/SkMatrix.h')
-rw-r--r-- | include/core/SkMatrix.h | 6 |
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. |