Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(279)

Unified Diff: src/pdf/SkPDFFormXObject.cpp

Issue 6007044: [PDF] If matrix inversion fails, use the identity matrix. (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 12 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/pdf/SkPDFDevice.cpp ('k') | src/pdf/SkPDFShader.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/pdf/SkPDFFormXObject.cpp
diff --git a/src/pdf/SkPDFFormXObject.cpp b/src/pdf/SkPDFFormXObject.cpp
index fb8a9159cf650f8149fb571a383135732bcff645..f368834938766f427ec569bc449e5612c9c26013 100644
--- a/src/pdf/SkPDFFormXObject.cpp
+++ b/src/pdf/SkPDFFormXObject.cpp
@@ -36,8 +36,9 @@ SkPDFFormXObject::SkPDFFormXObject(SkPDFDevice* device) {
// embedded in things like shaders and images.
if (!device->initialTransform().isIdentity()) {
SkMatrix inverse;
- inverse.reset();
- device->initialTransform().invert(&inverse);
+ if (!device->initialTransform().invert(&inverse)) {
+ inverse.reset();
+ }
insert("Matrix", SkPDFUtils::MatrixToArray(inverse))->unref();
}
« no previous file with comments | « src/pdf/SkPDFDevice.cpp ('k') | src/pdf/SkPDFShader.cpp » ('j') | no next file with comments »

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b