Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(162)

Unified Diff: src/pdf/SkPDFDevice.cpp

Issue 29743002: Revert "PDF: support perspective in simple shaders. (this version does not work well with tilling)" (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 7 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/pdf/SkPDFShader.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/pdf/SkPDFDevice.cpp
diff --git a/src/pdf/SkPDFDevice.cpp b/src/pdf/SkPDFDevice.cpp
index e3134f4ac397ddac9faf50f518a40fe53e74e7db..e90edb1408fa790592e2f0766305eb923e72d3b6 100644
--- a/src/pdf/SkPDFDevice.cpp
+++ b/src/pdf/SkPDFDevice.cpp
@@ -648,8 +648,16 @@ private:
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 @@ SkPDFDevice::SkPDFDevice(const SkISize& pageSize, const SkISize& contentSize,
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
« no previous file with comments | « no previous file | src/pdf/SkPDFShader.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698