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

Unified Diff: experimental/PdfViewer/SkPdfRenderer.cpp

Issue 22678003: pdfviewer: remove save/restore used with q/Q operators (we already do there save and restore) (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: Created 7 years, 4 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 | no next file » | 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 10630)
+++ experimental/PdfViewer/SkPdfRenderer.cpp (working copy)
@@ -725,9 +725,7 @@
PdfOp_q(pdfContext, canvas, NULL);
- canvas->save();
-
if (skobj->Resources(pdfContext->fPdfDoc)) {
pdfContext->fGraphicsState.fResources = skobj->Resources(pdfContext->fPdfDoc);
}
@@ -777,7 +775,6 @@
canvas->restore();
}
- canvas->restore();
PdfOp_Q(pdfContext, canvas, NULL);
return kPartial_PdfResult;
}
@@ -795,9 +792,7 @@
PdfOp_q(pdfContext, canvas, NULL);
- canvas->save();
-
if (skobj->Resources(pdfContext->fPdfDoc)) {
pdfContext->fGraphicsState.fResources = skobj->Resources(pdfContext->fPdfDoc);
}
@@ -832,7 +827,6 @@
// TODO(edisonn): should we restore the variable stack at the same state?
// There could be operands left, that could be consumed by a parent tokenizer when we pop.
- canvas->restore();
PdfOp_Q(pdfContext, canvas, NULL);
return kPartial_PdfResult;
}
@@ -848,7 +842,6 @@
}
PdfOp_q(pdfContext, canvas, NULL);
- canvas->save();
pdfContext->fGraphicsState.fMatrixTm.preConcat(matrix);
pdfContext->fGraphicsState.fMatrixTm.preScale(SkDoubleToScalar(textSize), SkDoubleToScalar(textSize));
@@ -883,7 +876,6 @@
// TODO(edisonn): should we restore the variable stack at the same state?
// There could be operands left, that could be consumed by a parent tokenizer when we pop.
- canvas->restore();
PdfOp_Q(pdfContext, canvas, NULL);
return kPartial_PdfResult;
@@ -1284,7 +1276,6 @@
// TODO(edisonn): we can use a shader here, like imageshader to draw fast. ultimately,
// if this is not possible, and we are in rasper mode, and the cells don't intersect, we could even have multiple cpus.
- canvas->save();
PdfOp_q(pdfContext, canvas, NULL);
if (evenOdd) {
@@ -1340,7 +1331,6 @@
// get xstep, y step, bbox ... for cliping, and bos of the path
PdfOp_Q(pdfContext, canvas, NULL);
- canvas->restore();
} else {
paint.setStyle(SkPaint::kFill_Style);
if (evenOdd) {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698