Index: src/pdf/SkPDFShader.cpp |
diff --git a/src/pdf/SkPDFShader.cpp b/src/pdf/SkPDFShader.cpp |
index 5dd94e2c68138317b90527b0642aece103d158ac..abcae7be12c33010a4ccfadb06acb4c335ef4596 100644 |
--- a/src/pdf/SkPDFShader.cpp |
+++ b/src/pdf/SkPDFShader.cpp |
@@ -452,7 +452,9 @@ private: |
//////////////////////////////////////////////////////////////////////////////// |
SkPDFFunctionShader::SkPDFFunctionShader(SkPDFShader::State* state) |
- : SkPDFDict("Pattern"), fShaderState(state) {} |
+ : SkPDFDict("Pattern"), fShaderState(state) { |
+ state->fImage.reset(); |
+} |
SkPDFFunctionShader::~SkPDFFunctionShader() {} |
@@ -463,7 +465,9 @@ bool SkPDFFunctionShader::equals(const SkPDFShader::State& state) const { |
//////////////////////////////////////////////////////////////////////////////// |
SkPDFAlphaFunctionShader::SkPDFAlphaFunctionShader(SkPDFShader::State* state) |
- : fShaderState(state) {} |
+ : fShaderState(state) { |
+ state->fImage.reset(); |
+} |
bool SkPDFAlphaFunctionShader::equals(const SkPDFShader::State& state) const { |
return state == *fShaderState; |
@@ -474,7 +478,9 @@ SkPDFAlphaFunctionShader::~SkPDFAlphaFunctionShader() {} |
//////////////////////////////////////////////////////////////////////////////// |
SkPDFImageShader::SkPDFImageShader(SkPDFShader::State* state) |
- : fShaderState(state) {} |
+ : fShaderState(state) { |
+ state->fImage.reset(); |
+} |
bool SkPDFImageShader::equals(const SkPDFShader::State& state) const { |
return state == *fShaderState; |