Revert "PDF: support perspective in simple shaders. (this version does not work well with tilling)"
Accidentally committed the wrong git branch.
This reverts commit 76839c65670df8a863041a82a4b61502e78af043.
Review URL: https://codereview.chromium.org/29743002
git-svn-id: http://skia.googlecode.com/svn/trunk@11865 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/src/pdf/SkPDFDevice.cpp b/src/pdf/SkPDFDevice.cpp
index e3134f4..e90edb1 100644
--- a/src/pdf/SkPDFDevice.cpp
+++ b/src/pdf/SkPDFDevice.cpp
@@ -648,8 +648,16 @@
void init(const SkClipStack* clipStack, const SkRegion& clipRegion,
const SkMatrix& matrix, const SkPaint& paint, bool hasText) {
fDstFormXObject = NULL;
- // Shape has to be flatten before we get here.
- NOT_IMPLEMENTED(!matrix.hasPerspective(), false);
+ 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);
}
@@ -697,8 +705,9 @@
fLastMarginContentEntry(NULL),
fClipStack(NULL),
fEncoder(NULL) {
- // Just report that PDF does not supports perspective in the
- // initial transform.
+ // 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