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

Unified Diff: src/pdf/SkPDFDocument.h

Issue 1034583002: SkPDF refactor skpdfdocument (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: SkToS32() 2015-03-24 (Tuesday) 16:54:14 EDT Created 5 years, 9 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 | src/pdf/SkPDFDocument.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/pdf/SkPDFDocument.h
diff --git a/src/pdf/SkPDFDocument.h b/src/pdf/SkPDFDocument.h
index 01290d034a8ac97a85e628c59408f0c6b050d7de..e4c0521cbe0472bea31f0f783b1cbdbf0eee2568 100644
--- a/src/pdf/SkPDFDocument.h
+++ b/src/pdf/SkPDFDocument.h
@@ -41,27 +41,15 @@ public:
*/
bool emitPDF(SkWStream* stream);
- /** Sets the specific page to the passed PDF device. If the specified
- * page is already set, this overrides it. Returns true if successful.
- * Will fail if the document has already been emitted.
- *
- * @param pageNumber The position to add the passed device (1 based).
- * @param pdfDevice The page to add to this document.
- */
- bool setPage(int pageNumber, SkPDFDevice* pdfDevice);
-
/** Append the passed pdf device to the document as a new page. Returns
* true if successful. Will fail if the document has already been emitted.
*
* @param pdfDevice The page to add to this document.
*/
- bool appendPage(SkPDFDevice* pdfDevice);
-
- /** Get the count of unique font types used in the document.
- * DEPRECATED.
- */
- void getCountOfFontTypes(
- int counts[SkAdvancedTypefaceMetrics::kOther_Font + 2]) const;
+ bool appendPage(SkPDFDevice* pdfDevice) {
+ fPageDevices.push(SkRef(pdfDevice));
+ return true;
+ }
/** Get the count of unique font types used in the document.
*/
@@ -71,32 +59,7 @@ public:
int* notEmbedddableCount) const;
private:
- SkAutoTDelete<SkPDFCatalog> fCatalog;
- int64_t fXRefFileOffset;
-
- SkTDArray<SkPDFPage*> fPages;
- SkTDArray<SkPDFDict*> fPageTree;
- SkPDFDict* fDocCatalog;
- SkTSet<SkPDFObject*>* fFirstPageResources;
- SkTSet<SkPDFObject*>* fOtherPageResources;
- SkTDArray<SkPDFObject*> fSubstitutes;
-
- SkPDFDict* fTrailerDict;
-
- /** Output the PDF header to the passed stream.
- * @param stream The writable output stream to send the header to.
- */
- void emitHeader(SkWStream* stream);
-
- /** Get the size of the header.
- */
- size_t headerSize();
-
- /** Output the PDF footer to the passed stream.
- * @param stream The writable output stream to send the footer to.
- * @param objCount The number of objects in the PDF.
- */
- void emitFooter(SkWStream* stream, int64_t objCount);
+ SkTDArray<SkPDFDevice*> fPageDevices;
};
#endif
« no previous file with comments | « no previous file | src/pdf/SkPDFDocument.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698