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

Unified Diff: experimental/PdfViewer/SkPdfRenderer.cpp

Issue 27057003: pdfviewer: more code comments + concat the pdf matrix with the existing matrix in canvas, instead o… (Closed) Base URL: http://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 | « experimental/PdfViewer/SkPdfRenderer.h ('k') | experimental/PdfViewer/SkPdfReporter.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: experimental/PdfViewer/SkPdfRenderer.cpp
===================================================================
--- experimental/PdfViewer/SkPdfRenderer.cpp (revision 11730)
+++ experimental/PdfViewer/SkPdfRenderer.cpp (working copy)
@@ -3062,6 +3062,8 @@
SkAssertResult(pdfContext.fOriginalMatrix.setPolyToPoly(pdfSpace, skiaSpace, 4));
SkTraceMatrix(pdfContext.fOriginalMatrix, "Original matrix");
+ pdfContext.fOriginalMatrix.postConcat(canvas->getTotalMatrix());
+
pdfContext.fGraphicsState.fCTM = pdfContext.fOriginalMatrix;
pdfContext.fGraphicsState.fContentStreamMatrix = pdfContext.fOriginalMatrix;
pdfContext.fGraphicsState.fMatrixTm = pdfContext.fGraphicsState.fCTM;
@@ -3071,7 +3073,7 @@
canvas->clipRect(dst, SkRegion::kIntersect_Op, true);
#endif
- canvas->setMatrix(pdfContext.fOriginalMatrix);
+ canvas->concat(pdfContext.fOriginalMatrix);
doPage(&pdfContext, canvas, fPdfDoc->page(page));
« no previous file with comments | « experimental/PdfViewer/SkPdfRenderer.h ('k') | experimental/PdfViewer/SkPdfReporter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698