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

Unified Diff: experimental/PdfViewer/pdfparser/native/SkNativeParsedPDF.h

Issue 20087003: pdfviewer: remove dependency on picture_utils. add utility function to render SkStream into bitmap. (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
Index: experimental/PdfViewer/pdfparser/native/SkNativeParsedPDF.h
===================================================================
--- experimental/PdfViewer/pdfparser/native/SkNativeParsedPDF.h (revision 10286)
+++ experimental/PdfViewer/pdfparser/native/SkNativeParsedPDF.h (working copy)
@@ -19,6 +19,8 @@
class SkPdfNativeTokenizer;
+class SkStream;
+
class SkNativeParsedPDF {
private:
struct PublicObjectEntry {
@@ -35,7 +37,10 @@
// TODO(edisonn): read page N asap, read all file
// TODO(edisonn): allow corruptions of file (e.g. missing endobj, missing stream length, ...)
// TODO(edisonn): encryption
+
SkNativeParsedPDF(const char* path);
+ SkNativeParsedPDF(SkStream* stream);
+
~SkNativeParsedPDF();
int pages() const;
@@ -65,6 +70,9 @@
private:
+ // Takes ownership of bytes.
+ void init(const void* bytes, size_t length);
+
const unsigned char* readCrossReferenceSection(const unsigned char* xrefStart, const unsigned char* trailerEnd);
long readTrailer(const unsigned char* trailerStart, const unsigned char* trailerEnd, bool storeCatalog);
« no previous file with comments | « experimental/PdfViewer/pdf_viewer_main.cpp ('k') | experimental/PdfViewer/pdfparser/native/SkNativeParsedPDF.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698