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

Unified Diff: experimental/PdfViewer/SkPdfRenderer.cpp

Issue 18093008: pdfviewer: add option to run the load or render multiple times, --benchLoad, --benchRender (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: Created 7 years, 5 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 | experimental/PdfViewer/pdf_viewer_main.cpp » ('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 10010)
+++ experimental/PdfViewer/SkPdfRenderer.cpp (working copy)
@@ -2003,6 +2003,10 @@
// TODO(edisonn): create static function that could return NULL if there are errors
fPdfDoc = new SkNativeParsedPDF(inputFileName.c_str());
+ if (fPdfDoc->pages() == 0) {
+ delete fPdfDoc;
+ fPdfDoc = NULL;
+ }
return fPdfDoc != NULL;
}
@@ -2024,4 +2028,3 @@
size_t SkPdfRenderer::bytesUsed() const {
return fPdfDoc ? fPdfDoc->bytesUsed() : 0;
}
-
« no previous file with comments | « no previous file | experimental/PdfViewer/pdf_viewer_main.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698