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

Unified Diff: experimental/PdfViewer/SkPdfRenderer.cpp

Issue 22436003: pdfviewer: remove text save/restore (not needed) and verify that colorspace dictionary exists befor… (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 10636)
+++ experimental/PdfViewer/SkPdfRenderer.cpp (working copy)
@@ -388,10 +388,7 @@
pdfContext->fGraphicsState.applyGraphicsState(&paint, false);
- canvas->save();
-
skfont->drawText(decoded, &paint, pdfContext, canvas);
- canvas->restore();
return kOK_PdfResult;
}
@@ -1581,7 +1578,7 @@
//Next, get the ColorSpace Dictionary from the Resource Dictionary:
SkPdfDictionary* colorSpaceResource = pdfContext->fGraphicsState.fResources->ColorSpace(pdfContext->fPdfDoc);
- SkPdfObject* colorSpace = pdfContext->fPdfDoc->resolveReference(colorSpaceResource->get(name));
+ SkPdfObject* colorSpace = colorSpaceResource ? pdfContext->fPdfDoc->resolveReference(colorSpaceResource->get(name)) : name;
if (colorSpace == NULL) {
colorOperator->fColorSpace = name->strRef();
« 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