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

Side by Side Diff: experimental/PdfViewer/pdfparser/native/SkNativeParsedPDF.h

Issue 18584010: pdfviewer: add --pages arg: render a certain page (all, all in desceding order, firsl, last and by … (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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 #ifndef EXPERIMENTAL_PDFVIEWER_PDFPARSER_NATIVE_SKNATIVEPARSEDPDF_H_ 1 #ifndef EXPERIMENTAL_PDFVIEWER_PDFPARSER_NATIVE_SKNATIVEPARSEDPDF_H_
2 #define EXPERIMENTAL_PDFVIEWER_PDFPARSER_NATIVE_SKNATIVEPARSEDPDF_H_ 2 #define EXPERIMENTAL_PDFVIEWER_PDFPARSER_NATIVE_SKNATIVEPARSEDPDF_H_
3 3
4 #include "SkRect.h" 4 #include "SkRect.h"
5 #include "SkTDArray.h" 5 #include "SkTDArray.h"
6 6
7 class SkCanvas; 7 class SkCanvas;
8 8
9 class SkPdfAllocator; 9 class SkPdfAllocator;
10 class SkPdfMapper; 10 class SkPdfMapper;
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 SkPdfReal* createReal(double value) const; 55 SkPdfReal* createReal(double value) const;
56 SkPdfInteger* createInteger(int value) const; 56 SkPdfInteger* createInteger(int value) const;
57 // the string does not own the char* 57 // the string does not own the char*
58 SkPdfString* createString(unsigned char* sz, size_t len) const; 58 SkPdfString* createString(unsigned char* sz, size_t len) const;
59 59
60 void drawPage(int page, SkCanvas* canvas); 60 void drawPage(int page, SkCanvas* canvas);
61 61
62 SkPdfObject* resolveReference(const SkPdfObject* ref); 62 SkPdfObject* resolveReference(const SkPdfObject* ref);
63 63
64 // Reports an approximation of all the memory usage. 64 // Reports an approximation of all the memory usage.
65 size_t bytesUsed(); 65 size_t bytesUsed() const;
66 66
67 private: 67 private:
68 68
69 unsigned char* readCrossReferenceSection(unsigned char* xrefStart, unsigned char* trailerEnd); 69 unsigned char* readCrossReferenceSection(unsigned char* xrefStart, unsigned char* trailerEnd);
70 long readTrailer(unsigned char* trailerStart, unsigned char* trailerEnd, boo l storeCatalog); 70 long readTrailer(unsigned char* trailerStart, unsigned char* trailerEnd, boo l storeCatalog);
71 71
72 // TODO(edisonn): updates not supported right now, generation ignored 72 // TODO(edisonn): updates not supported right now, generation ignored
73 void addCrossSectionInfo(int id, int generation, int offset, bool isFreed); 73 void addCrossSectionInfo(int id, int generation, int offset, bool isFreed);
74 static void reset(PublicObjectEntry* obj) { 74 static void reset(PublicObjectEntry* obj) {
75 obj->fObj = NULL; 75 obj->fObj = NULL;
(...skipping 11 matching lines...) Expand all
87 unsigned char* fFileContent; 87 unsigned char* fFileContent;
88 size_t fContentLength; 88 size_t fContentLength;
89 const SkPdfObject* fRootCatalogRef; 89 const SkPdfObject* fRootCatalogRef;
90 SkPdfCatalogDictionary* fRootCatalog; 90 SkPdfCatalogDictionary* fRootCatalog;
91 91
92 mutable SkTDArray<PublicObjectEntry> fObjects; 92 mutable SkTDArray<PublicObjectEntry> fObjects;
93 SkTDArray<SkPdfPageObjectDictionary*> fPages; 93 SkTDArray<SkPdfPageObjectDictionary*> fPages;
94 }; 94 };
95 95
96 #endif // EXPERIMENTAL_PDFVIEWER_PDFPARSER_NATIVE_SKNATIVEPARSEDPDF_H_ 96 #endif // EXPERIMENTAL_PDFVIEWER_PDFPARSER_NATIVE_SKNATIVEPARSEDPDF_H_
OLDNEW
« 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