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

Unified Diff: src/pdf/SkPDFTypes.h

Issue 869783003: Cleanup SkPDFObject::emit* (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 11 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 | « src/pdf/SkPDFDocument.cpp ('k') | src/pdf/SkPDFTypes.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/pdf/SkPDFTypes.h
diff --git a/src/pdf/SkPDFTypes.h b/src/pdf/SkPDFTypes.h
index ce1ca86e6e370fa212a4b8a690b47bcf3cfb86c5..b0ce0b97d0cdd4783e7cf3eadab5977d643860a9 100644
--- a/src/pdf/SkPDFTypes.h
+++ b/src/pdf/SkPDFTypes.h
@@ -30,12 +30,12 @@ class SkPDFObject : public SkRefCnt {
public:
SK_DECLARE_INST_COUNT(SkPDFObject)
- /** Return the size (number of bytes) of this object in the final output
- * file. Only used for testing.
+ /** Subclasses must implement this method to print the object to the
+ * PDF file.
* @param catalog The object catalog to use.
- * @param indirect If true, output an object identifier with the object.
+ * @param stream The writable output stream to send the output to.
*/
- size_t getOutputSize(SkPDFCatalog* catalog, bool indirect);
+ virtual void emitObject(SkWStream* stream, SkPDFCatalog* catalog) = 0;
/** For non-primitive objects (i.e. objects defined outside this file),
* this method will add to newResourceObjects any objects that this method
@@ -49,23 +49,6 @@ public:
virtual void getResources(const SkTSet<SkPDFObject*>& knownResourceObjects,
SkTSet<SkPDFObject*>* newResourceObjects);
- /** Emit this object unless the catalog has a substitute object, in which
- * case emit that.
- * @see emitObject
- */
- void emit(SkWStream* stream, SkPDFCatalog* catalog, bool indirect);
-
- /** Helper function to output an indirect object.
- * @param catalog The object catalog to use.
- * @param stream The writable output stream to send the output to.
- */
- void emitIndirectObject(SkWStream* stream, SkPDFCatalog* catalog);
-
- /** Helper function to find the size of an indirect object.
- * @param catalog The object catalog to use.
- */
- size_t getIndirectOutputSize(SkPDFCatalog* catalog);
-
/** Static helper function to add a resource to a list. The list takes
* a reference.
* @param resource The resource to add.
@@ -88,14 +71,7 @@ public:
const SkTSet<SkPDFObject*>& knownResourceObjects,
SkTSet<SkPDFObject*>* newResourceObjects);
-protected:
- /** Subclasses must implement this method to print the object to the
- * PDF file.
- * @param catalog The object catalog to use.
- * @param stream The writable output stream to send the output to.
- */
- virtual void emitObject(SkWStream* stream, SkPDFCatalog* catalog) = 0;
-
+private:
typedef SkRefCnt INHERITED;
};
« no previous file with comments | « src/pdf/SkPDFDocument.cpp ('k') | src/pdf/SkPDFTypes.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698