Add SkRRect::transform.
authorscroggo@google.com <scroggo@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>
Tue, 5 Nov 2013 15:54:42 +0000 (15:54 +0000)
committerscroggo@google.com <scroggo@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>
Tue, 5 Nov 2013 15:54:42 +0000 (15:54 +0000)
commit20e3cd2c9fbc049eae8bcedc591c2cc8d4bed656
tree12b4d1d2461bdca4dc3284a7c27e8d7a02bad022
parenta93f4e770f22f913197bef82dc19078e12bee76b
Add SkRRect::transform.

Much like SkPath::transform, it transforms an SkRRect based on an
SkMatrix. Unlike SkPath::transform, it will fail for matrices that
contain perspective or skewing.

Required by a future change (https://codereview.chromium.org/48623006)
to speed up drawing large blurry rounded rectangles by using ninepatches.

TODO: This could easily support 90 degree rotations, if desired.

BUG=https://b.corp.google.com/issue?id=11174385
R=reed@google.com, robertphillips@google.com

Review URL: https://codereview.chromium.org/52703003

git-svn-id: http://skia.googlecode.com/svn/trunk@12132 2bbb7eff-a529-9590-31e7-b0007b416f81
include/core/SkRRect.h
src/core/SkRRect.cpp
tests/RoundRectTest.cpp