diff options
author | edisonn@google.com <edisonn@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2013-04-02 15:33:08 +0000 |
---|---|---|
committer | edisonn@google.com <edisonn@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2013-04-02 15:33:08 +0000 |
commit | 6addb1930013ebb2f984045141650fd7afcfa90f (patch) | |
tree | dd4c38a7cb519486ecf9cf54c2f7a65ec85dcfca /include/pdf | |
parent | c52570475f00d5b62b8d82ba50b4b911dc38ce43 (diff) |
resubmit https://code.google.com/p/skia/source/detail?r=7883 (in the meantime we
added capability to collect minidump and callstack if buildbot fails with heap
coruption in windows, and a NPE bug was fixed in SkPDFDocument, when document was destroyed without ever beeing used and a field was NULL + a few minor conflicts have been resolved)
git-svn-id: http://skia.googlecode.com/svn/trunk@8487 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'include/pdf')
-rw-r--r-- | include/pdf/SkPDFDevice.h | 12 | ||||
-rw-r--r-- | include/pdf/SkPDFDocument.h | 4 |
2 files changed, 13 insertions, 3 deletions
diff --git a/include/pdf/SkPDFDevice.h b/include/pdf/SkPDFDevice.h index 90379f9f6b..f8261b5da1 100644 --- a/include/pdf/SkPDFDevice.h +++ b/include/pdf/SkPDFDevice.h @@ -30,6 +30,7 @@ class SkPDFGraphicState; class SkPDFObject; class SkPDFShader; class SkPDFStream; +template <typename T> class SK_API SkTSet; // Private classes. struct ContentEntry; @@ -132,12 +133,19 @@ public: SK_API SkPDFDict* getResourceDict(); /** Get the list of resources (PDF objects) used on this page. - * @param resourceList A list to append the resources to. + * This method will add to newResourceObjects any objects that this method + * depends on, but not already in knownResourceObjects. This might operate + * recursively so if this object depends on another object and that object + * depends on two more, all three objects will be added. + * + * @param knownResourceObjects The set of resources to be ignored. + * @param newResourceObjects The set to append dependant resources to. * @param recursive If recursive is true, get the resources of the * device's resources recursively. (Useful for adding * objects to the catalog.) */ - SK_API void getResources(SkTDArray<SkPDFObject*>* resourceList, + SK_API void getResources(const SkTSet<SkPDFObject*>& knownResourceObjects, + SkTSet<SkPDFObject*>* newResourceObjects, bool recursive) const; /** Get the fonts used on this device. diff --git a/include/pdf/SkPDFDocument.h b/include/pdf/SkPDFDocument.h index cb786c7133..8f4ee48564 100644 --- a/include/pdf/SkPDFDocument.h +++ b/include/pdf/SkPDFDocument.h @@ -21,6 +21,7 @@ class SkPDFDict; class SkPDFPage; class SkPDFObject; class SkWStream; +template <typename T> class SK_API SkTSet; /** \class SkPDFDocument @@ -79,7 +80,8 @@ private: SkTDArray<SkPDFPage*> fPages; SkTDArray<SkPDFDict*> fPageTree; SkPDFDict* fDocCatalog; - SkTDArray<SkPDFObject*> fPageResources; + SkTSet<SkPDFObject*>* fFirstPageResources; + SkTSet<SkPDFObject*>* fOtherPageResources; SkTDArray<SkPDFObject*> fSubstitutes; int fSecondPageFirstResourceIndex; |