Index: src/pdf/SkPDFShader.cpp |
diff --git a/src/pdf/SkPDFShader.cpp b/src/pdf/SkPDFShader.cpp |
index 97bca73f63b78d33c5e552736e4702f015277646..da55340d4c518981e94fb76d9b34a9403391b9e2 100644 |
--- a/src/pdf/SkPDFShader.cpp |
+++ b/src/pdf/SkPDFShader.cpp |
@@ -1101,8 +1101,10 @@ SkPDFImageShader* SkPDFImageShader::Create( |
SkNEW_ARGS(SkPDFImageShader, (autoState->detach())); |
imageShader->setData(content.get()); |
+ SkAutoTUnref<SkPDFResourceDict> resourceDict( |
+ patternDevice->createResourceDict()); |
populate_tiling_pattern_dict(imageShader, patternBBox, |
- patternDevice->getResourceDict(), finalMatrix); |
+ resourceDict.get(), finalMatrix); |
imageShader->fShaderState->fImage.unlockPixels(); |