| Index: src/pdf/SkPDFDevice.cpp
|
| ===================================================================
|
| --- src/pdf/SkPDFDevice.cpp (revision 11353)
|
| +++ src/pdf/SkPDFDevice.cpp (working copy)
|
| @@ -632,6 +632,16 @@
|
| void init(const SkClipStack* clipStack, const SkRegion& clipRegion,
|
| const SkMatrix& matrix, const SkPaint& paint, bool hasText) {
|
| fDstFormXObject = NULL;
|
| + if (matrix.hasPerspective() ||
|
| + (paint.getShader() &&
|
| + paint.getShader()->getLocalMatrix().hasPerspective())) {
|
| + // Just report that PDF does not supports perspective
|
| + // TODO(edisonn): update the shape when possible
|
| + // or dump in an image otherwise
|
| + NOT_IMPLEMENTED(true, false);
|
| + return;
|
| + }
|
| +
|
| if (paint.getXfermode()) {
|
| paint.getXfermode()->asMode(&fXfermode);
|
| }
|
| @@ -679,6 +689,11 @@
|
| fLastMarginContentEntry(NULL),
|
| fClipStack(NULL),
|
| fEncoder(NULL) {
|
| + // just report that PDF does not supports perspective
|
| + // TODO(edisonn): update the shape when possible
|
| + // or dump in an image otherwise
|
| + NOT_IMPLEMENTED(initialTransform.hasPerspective(), true);
|
| +
|
| // Skia generally uses the top left as the origin but PDF natively has the
|
| // origin at the bottom left. This matrix corrects for that. But that only
|
| // needs to be done once, we don't do it when layering.
|
| @@ -915,6 +930,7 @@
|
| origPath.transform(*prePathMatrix, pathPtr);
|
| } else {
|
| if (!matrix.preConcat(*prePathMatrix)) {
|
| + // TODO(edisonn): report somehow why we failed?
|
| return;
|
| }
|
| }
|
|
|