aboutsummaryrefslogtreecommitdiffhomepage
path: root/include/pdf/SkPDFFormXObject.h
diff options
context:
space:
mode:
authorGravatar vandebo@chromium.org <vandebo@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81>2011-07-20 17:39:01 +0000
committerGravatar vandebo@chromium.org <vandebo@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81>2011-07-20 17:39:01 +0000
commit421d6443fbd3a913dfa32b6492c4a2969bc6314b (patch)
tree5c02a30275d78adf764e0c91437bada0c6dcbd33 /include/pdf/SkPDFFormXObject.h
parentf6c3ebdeb135dcdb9af225bd7af77f1fe1f92787 (diff)
[PDF] Make stream compression optional on a per device basis.
There are a lot of small pieces to make this change work: - SkPDFDocument (and SkPDFCatalog) take flags to disable compression (and font embedding - not implemented yet, can disable font subsetting for now). - SkPDFStream now defers compression until the size/emit step. - Classes that *had* a stream (because they didn't know the stream size at construction time) now *are* streams to make the substitution work correctly. - The SkPDFShader implementation got pulled apart into two classes, one that is a SkPDFDict, and one that is a SkPDFStream (making the common ancestor SkPDFObject). - Added helper methods in SkPDFObject for children that have simple resource lists. - Added an iterator to SkPDFDict so that a substitute SkPDFStream can get a copy of the stream dictionary. - Change SkPDFDocument to have a pointer to an SkPDFCatalog to remove a new circular header reference. Review URL: http://codereview.appspot.com/4700045 git-svn-id: http://skia.googlecode.com/svn/trunk@1911 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'include/pdf/SkPDFFormXObject.h')
-rw-r--r--include/pdf/SkPDFFormXObject.h20
1 files changed, 1 insertions, 19 deletions
diff --git a/include/pdf/SkPDFFormXObject.h b/include/pdf/SkPDFFormXObject.h
index 41719f0820..1e0ad4604a 100644
--- a/include/pdf/SkPDFFormXObject.h
+++ b/include/pdf/SkPDFFormXObject.h
@@ -36,7 +36,7 @@ class SkPDFCatalog;
// The caller could keep track of the form XObjects it creates and
// canonicalize them, but the Skia API doesn't provide enough context to
// automatically do it (trivially).
-class SkPDFFormXObject : public SkPDFObject {
+class SkPDFFormXObject : public SkPDFStream {
public:
/** Create a PDF form XObject. Entries for the dictionary entries are
* automatically added.
@@ -46,27 +46,9 @@ public:
virtual ~SkPDFFormXObject();
// The SkPDFObject interface.
- virtual void emitObject(SkWStream* stream, SkPDFCatalog* catalog,
- bool indirect);
- virtual size_t getOutputSize(SkPDFCatalog* catalog, bool indirect);
virtual void getResources(SkTDArray<SkPDFObject*>* resourceList);
- /** Add the value to the stream dictionary with the given key. Refs value.
- * @param key The key for this dictionary entry.
- * @param value The value for this dictionary entry.
- * @return The value argument is returned.
- */
- SkPDFObject* insert(SkPDFName* key, SkPDFObject* value);
-
- /** Add the value to the stream dictionary with the given key. Refs value.
- * @param key The text of the key for this dictionary entry.
- * @param value The value for this dictionary entry.
- * @return The value argument is returned.
- */
- SkPDFObject* insert(const char key[], SkPDFObject* value);
-
private:
- SkRefPtr<SkPDFStream> fStream;
SkTDArray<SkPDFObject*> fResources;
};