diff options
author | 2013-08-08 11:40:26 +0000 | |
---|---|---|
committer | 2013-08-08 11:40:26 +0000 | |
commit | 16291e51d543abb517b33f57939f8dd59d77c7e0 (patch) | |
tree | ca385d32123f2a838c447656d88207fa227d3b3d /experimental/PdfViewer | |
parent | 641a2491964f7e5921fad6649be08175e03b0434 (diff) |
pdfviewer: remove save/restore used with q/Q operators (we already do there save and restore)
Review URL: https://codereview.chromium.org/22678003
git-svn-id: http://skia.googlecode.com/svn/trunk@10636 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'experimental/PdfViewer')
-rw-r--r-- | experimental/PdfViewer/SkPdfRenderer.cpp | 10 |
1 files changed, 0 insertions, 10 deletions
diff --git a/experimental/PdfViewer/SkPdfRenderer.cpp b/experimental/PdfViewer/SkPdfRenderer.cpp index 68501749ef..85e3b6e365 100644 --- a/experimental/PdfViewer/SkPdfRenderer.cpp +++ b/experimental/PdfViewer/SkPdfRenderer.cpp @@ -725,8 +725,6 @@ static PdfResult doXObject_Form(PdfContext* pdfContext, SkCanvas* canvas, SkPdfT PdfOp_q(pdfContext, canvas, NULL); - canvas->save(); - if (skobj->Resources(pdfContext->fPdfDoc)) { pdfContext->fGraphicsState.fResources = skobj->Resources(pdfContext->fPdfDoc); @@ -777,7 +775,6 @@ static PdfResult doXObject_Form(PdfContext* pdfContext, SkCanvas* canvas, SkPdfT canvas->restore(); } - canvas->restore(); PdfOp_Q(pdfContext, canvas, NULL); return kPartial_PdfResult; } @@ -795,8 +792,6 @@ static PdfResult doXObject_Pattern(PdfContext* pdfContext, SkCanvas* canvas, SkP PdfOp_q(pdfContext, canvas, NULL); - canvas->save(); - if (skobj->Resources(pdfContext->fPdfDoc)) { pdfContext->fGraphicsState.fResources = skobj->Resources(pdfContext->fPdfDoc); @@ -832,7 +827,6 @@ static PdfResult doXObject_Pattern(PdfContext* pdfContext, SkCanvas* canvas, SkP // 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 @@ PdfResult doType3Char(PdfContext* pdfContext, SkCanvas* canvas, const SkPdfObjec } PdfOp_q(pdfContext, canvas, NULL); - canvas->save(); pdfContext->fGraphicsState.fMatrixTm.preConcat(matrix); pdfContext->fGraphicsState.fMatrixTm.preScale(SkDoubleToScalar(textSize), SkDoubleToScalar(textSize)); @@ -883,7 +876,6 @@ PdfResult doType3Char(PdfContext* pdfContext, SkCanvas* canvas, const SkPdfObjec // 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 @@ static PdfResult PdfOp_fillAndStroke(PdfContext* pdfContext, SkCanvas* canvas, b // 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 @@ static PdfResult PdfOp_fillAndStroke(PdfContext* pdfContext, SkCanvas* canvas, b // 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) { |