Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1414)

Unified Diff: src/pdf/SkPDFShader.cpp

Issue 1851123002: SkPDF: PDFShader does not hold images/bitmaps (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 2016-04-01 (Friday) 13:59:49 EDT Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698