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

Unified Diff: src/pdf/SkPDFDevice.cpp

Issue 24265006: pdf: drawPath should pass the computed matrix, instead of default matrix stored in draw. (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: Created 7 years, 3 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 | « include/pdf/SkPDFDevice.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/pdf/SkPDFDevice.cpp
===================================================================
--- src/pdf/SkPDFDevice.cpp (revision 11417)
+++ src/pdf/SkPDFDevice.cpp (working copy)
@@ -959,16 +959,16 @@
}
#ifdef SK_PDF_USE_PATHOPS
- if (handleInversePath(d, origPath, paint, pathIsMutable)) {
+ if (handleInversePath(d, origPath, paint, pathIsMutable, &matrix)) {
return;
}
#endif
- if (handleRectAnnotation(pathPtr->getBounds(), *d.fMatrix, paint)) {
+ if (handleRectAnnotation(pathPtr->getBounds(), matrix, paint)) {
return;
}
- ScopedContentEntry content(this, d, paint);
+ ScopedContentEntry content(this, d.fClipStack, *d.fClip, matrix, paint);
if (!content.entry()) {
return;
}
@@ -1365,7 +1365,8 @@
* in the first place.
*/
bool SkPDFDevice::handleInversePath(const SkDraw& d, const SkPath& origPath,
- const SkPaint& paint, bool pathIsMutable) {
+ const SkPaint& paint, bool pathIsMutable,
+ const SkMatrix* matrix) {
if (!origPath.isInverseFillType()) {
return false;
}
@@ -1399,7 +1400,8 @@
// (clip bounds are given in device space).
SkRect bounds;
SkMatrix transformInverse;
- if (!d.fMatrix->invert(&transformInverse)) {
+ const SkMatrix matrixToUse = matrix ? *matrix : *d.fMatrix;
+ if (!matrixToUse.invert(&transformInverse)) {
return false;
}
bounds.set(d.fClip->getBounds());
@@ -1414,7 +1416,7 @@
return false;
}
- drawPath(d, modifiedPath, noInversePaint, NULL, true);
+ drawPath(d, modifiedPath, noInversePaint, matrix, true);
vandebo (ex-Chrome) 2013/09/20 18:57:56 This isn't the prePathMatrix, this is the total ma
return true;
}
#endif
« no previous file with comments | « include/pdf/SkPDFDevice.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698