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

Unified Diff: src/pdf/SkPDFDevice.cpp

Issue 26389006: 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: code review updates + return from ContentEntry if perspective is used in matrix, in adittion to rep… 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 1aed85632a7b978688d388f2641c8cd1431daf14..a7d2bd459accb39c70518ef21afc1289b30d3723 100644
--- a/src/pdf/SkPDFDevice.cpp
+++ b/src/pdf/SkPDFDevice.cpp
@@ -648,16 +648,11 @@ private:
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);
+ // Shape has to be flatten before we get here.
+ if (matrix.hasPerspective()) {
+ NOT_IMPLEMENTED(!matrix.hasPerspective(), false);
return;
}
-
if (paint.getXfermode()) {
paint.getXfermode()->asMode(&fXfermode);
}
@@ -706,9 +701,8 @@ SkPDFDevice::SkPDFDevice(const SkISize& pageSize, const SkISize& contentSize,
fClipStack(NULL),
fEncoder(NULL),
fRasterDpi(SkFloatToScalar(72.0f)) {
- // just report that PDF does not supports perspective
- // TODO(edisonn): update the shape when possible
- // or dump in an image otherwise
+ // Just report that PDF does not supports perspective in the
+ // initial transform.
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