Index: src/pdf/SkPDFShader.cpp |
diff --git a/src/pdf/SkPDFShader.cpp b/src/pdf/SkPDFShader.cpp |
index 8ffafb3c8724340bbc7416e02368347d03a7d484..ef41c017cea37e6f82a2252ba663fdee84b838bf 100644 |
--- a/src/pdf/SkPDFShader.cpp |
+++ b/src/pdf/SkPDFShader.cpp |
@@ -14,6 +14,7 @@ |
#include "SkPDFCatalog.h" |
#include "SkPDFDevice.h" |
#include "SkPDFTypes.h" |
+#include "SkPDFResourceDict.h" |
#include "SkPDFUtils.h" |
#include "SkScalar.h" |
#include "SkStream.h" |
@@ -840,7 +841,8 @@ SkPDFImageShader::SkPDFImageShader(SkPDFShader::State* state) : fState(state) { |
// Put the canvas into the pattern stream (fContent). |
SkAutoTUnref<SkStream> content(pattern.content()); |
setData(content.get()); |
- pattern.getResources(fResources, &fResources, false); |
+ SkPDFResourceDict* resourceDict = pattern.getResourceDict(); |
+ resourceDict->getReferencedResources(fResources, &fResources, false); |
insertName("Type", "Pattern"); |
insertInt("PatternType", 1); |
@@ -849,7 +851,7 @@ SkPDFImageShader::SkPDFImageShader(SkPDFShader::State* state) : fState(state) { |
insert("BBox", patternBBoxArray.get()); |
insertScalar("XStep", patternBBox.width()); |
insertScalar("YStep", patternBBox.height()); |
- insert("Resources", pattern.getResourceDict()); |
+ insert("Resources", resourceDict); |
insert("Matrix", SkPDFUtils::MatrixToArray(finalMatrix))->unref(); |
fState.get()->fImage.unlockPixels(); |