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

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

Issue 21738005: pdfviewer: add indexed rbg image support, enhanche caching(setData) for SkPdfObject (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 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 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 SkPdfPageObjectDictionary* page(int page); 57 SkPdfPageObjectDictionary* page(int page);
58 58
59 const SkPdfMapper* mapper() const; 59 const SkPdfMapper* mapper() const;
60 SkPdfAllocator* allocator() const; 60 SkPdfAllocator* allocator() const;
61 61
62 SkPdfReal* createReal(double value) const; 62 SkPdfReal* createReal(double value) const;
63 SkPdfInteger* createInteger(int value) const; 63 SkPdfInteger* createInteger(int value) const;
64 // the string does not own the char* 64 // the string does not own the char*
65 SkPdfString* createString(const unsigned char* sz, size_t len) const; 65 SkPdfString* createString(const unsigned char* sz, size_t len) const;
66 66
67 SkPdfObject* resolveReference(const SkPdfObject* ref); 67 SkPdfObject* resolveReference(SkPdfObject* ref);
68 68
69 // Reports an approximation of all the memory usage. 69 // Reports an approximation of all the memory usage.
70 size_t bytesUsed() const; 70 size_t bytesUsed() const;
71 71
72 private: 72 private:
73 73
74 // Takes ownership of bytes. 74 // Takes ownership of bytes.
75 void init(const void* bytes, size_t length); 75 void init(const void* bytes, size_t length);
76 void loadWithoutXRef(); 76 void loadWithoutXRef();
77 77
(...skipping 10 matching lines...) Expand all
88 88
89 SkPdfObject* readObject(int id/*, int generation*/); 89 SkPdfObject* readObject(int id/*, int generation*/);
90 90
91 void fillPages(SkPdfPageTreeNodeDictionary* tree); 91 void fillPages(SkPdfPageTreeNodeDictionary* tree);
92 92
93 // private fields 93 // private fields
94 SkPdfAllocator* fAllocator; 94 SkPdfAllocator* fAllocator;
95 SkPdfMapper* fMapper; 95 SkPdfMapper* fMapper;
96 const unsigned char* fFileContent; 96 const unsigned char* fFileContent;
97 size_t fContentLength; 97 size_t fContentLength;
98 const SkPdfObject* fRootCatalogRef; 98 SkPdfObject* fRootCatalogRef;
99 SkPdfCatalogDictionary* fRootCatalog; 99 SkPdfCatalogDictionary* fRootCatalog;
100 100
101 mutable SkTDArray<PublicObjectEntry> fObjects; 101 mutable SkTDArray<PublicObjectEntry> fObjects;
102 SkTDArray<SkPdfPageObjectDictionary*> fPages; 102 SkTDArray<SkPdfPageObjectDictionary*> fPages;
103 }; 103 };
104 104
105 #endif // EXPERIMENTAL_PDFVIEWER_PDFPARSER_NATIVE_SKNATIVEPARSEDPDF_H_ 105 #endif // EXPERIMENTAL_PDFVIEWER_PDFPARSER_NATIVE_SKNATIVEPARSEDPDF_H_
OLDNEW
« no previous file with comments | « experimental/PdfViewer/SkPdfRenderer.cpp ('k') | experimental/PdfViewer/pdfparser/native/SkNativeParsedPDF.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698