Fix bug in SkMatrix::invert where typemask is not set on inverse when a matrix is inverted into itself.
Review URL: http://codereview.appspot.com/4819050/ git-svn-id: http://skia.googlecode.com/svn/trunk@2002 2bbb7eff-a529-9590-31e7-b0007b416f81
This commit is contained in:
parent
84b437e6ce
commit
cf9b7505f2
@ -795,8 +795,10 @@ bool SkMatrix::invert(SkMatrix* inv) const {
|
||||
|
||||
if (inv) {
|
||||
SkMatrix tmp;
|
||||
if (inv == this)
|
||||
if (inv == this) {
|
||||
inv = &tmp;
|
||||
}
|
||||
inv->setTypeMask(kUnknown_Mask);
|
||||
|
||||
if (isPersp) {
|
||||
shift = 61 - shift;
|
||||
@ -880,7 +882,6 @@ bool SkMatrix::invert(SkMatrix* inv) const {
|
||||
if (inv == &tmp) {
|
||||
*(SkMatrix*)this = tmp;
|
||||
}
|
||||
inv->setTypeMask(kUnknown_Mask);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user