Index: src/pdf/SkPDFPage.cpp |
diff --git a/src/pdf/SkPDFPage.cpp b/src/pdf/SkPDFPage.cpp |
index d940f41065b9d56467110919f1d938e94ec020e0..8961d2f3d3ea4f963d8825252c096079921706e2 100644 |
--- a/src/pdf/SkPDFPage.cpp |
+++ b/src/pdf/SkPDFPage.cpp |
@@ -10,6 +10,7 @@ |
#include "SkPDFCatalog.h" |
#include "SkPDFDevice.h" |
#include "SkPDFPage.h" |
+#include "SkPDFResourceDict.h" |
#include "SkStream.h" |
SkPDFPage::SkPDFPage(SkPDFDevice* content) |
@@ -23,8 +24,9 @@ SkPDFPage::~SkPDFPage() {} |
void SkPDFPage::finalizePage(SkPDFCatalog* catalog, bool firstPage, |
const SkTSet<SkPDFObject*>& knownResourceObjects, |
SkTSet<SkPDFObject*>* newResourceObjects) { |
+ SkPDFResourceDict* resourceDict = fDevice->getResourceDict(); |
if (fContentStream.get() == NULL) { |
- insert("Resources", fDevice->getResourceDict()); |
+ insert("Resources", resourceDict); |
SkSafeUnref(this->insert("MediaBox", fDevice->copyMediaBox())); |
if (!SkToBool(catalog->getDocumentFlags() & |
SkPDFDocument::kNoLinks_Flags)) { |
@@ -39,7 +41,9 @@ void SkPDFPage::finalizePage(SkPDFCatalog* catalog, bool firstPage, |
insert("Contents", new SkPDFObjRef(fContentStream.get()))->unref(); |
} |
catalog->addObject(fContentStream.get(), firstPage); |
- fDevice->getResources(knownResourceObjects, newResourceObjects, true); |
+ resourceDict->getReferencedResources(knownResourceObjects, |
+ newResourceObjects, |
+ true); |
} |
off_t SkPDFPage::getPageSize(SkPDFCatalog* catalog, off_t fileOffset) { |