aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/SkCanvas.cpp
diff options
context:
space:
mode:
authorGravatar mike@reedtribe.org <mike@reedtribe.org@2bbb7eff-a529-9590-31e7-b0007b416f81>2012-04-14 19:06:16 +0000
committerGravatar mike@reedtribe.org <mike@reedtribe.org@2bbb7eff-a529-9590-31e7-b0007b416f81>2012-04-14 19:06:16 +0000
commit90bf427001fd4f6d9fcee88911deb015aeb4ab7c (patch)
tree109f3ff22dd5d23a7a7fbe8e2afc4e5d26bf5c92 /src/core/SkCanvas.cpp
parent6093e6582970364241a10d62b05efee50606c5e8 (diff)
proper handling if SkMatrix::invert failes, addresses hack fix in rev. 3657
git-svn-id: http://skia.googlecode.com/svn/trunk@3679 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'src/core/SkCanvas.cpp')
-rw-r--r--src/core/SkCanvas.cpp10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/core/SkCanvas.cpp b/src/core/SkCanvas.cpp
index 56ac2da646..fc308d4058 100644
--- a/src/core/SkCanvas.cpp
+++ b/src/core/SkCanvas.cpp
@@ -1365,12 +1365,10 @@ void SkCanvas::setExternalMatrix(const SkMatrix* matrix) {
}
fUseExternalMatrix = false;
} else {
- fUseExternalMatrix = true;
- fDeviceCMDirty = true; // |= (fExternalMatrix != *matrix)
-
- fExternalMatrix = *matrix;
- if (!matrix->invert(&fExternalInverse)) {
- fExternalInverse.reset();
+ if (matrix->invert(&fExternalInverse)) {
+ fExternalMatrix = *matrix;
+ fUseExternalMatrix = true;
+ fDeviceCMDirty = true; // |= (fExternalMatrix != *matrix)
}
}
}