aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/pdf/SkPDFShader.h
diff options
context:
space:
mode:
authorGravatar halcanary <halcanary@google.com>2015-02-27 12:41:03 -0800
committerGravatar Commit bot <commit-bot@chromium.org>2015-02-27 12:41:03 -0800
commit2e3f9d8a9309686eeb4c76ccfde5800da87a68b3 (patch)
treed4a9837f39b384086705102850610a515e2c5e74 /src/pdf/SkPDFShader.h
parent4f569beac777afde2f2dd9079a52535f8e7519b3 (diff)
PDF: Canon now owns a reference to all interned objects
Add SkPDFCanon::reset function to unref all objects. No longer possible to remove object from canon Motivation: this doesn't change these object's lifetime, (they will still be fully unrefed when SkDocument::close() is called, but we no longer have to remove them from the array when their destructor is called. Review URL: https://codereview.chromium.org/966863002
Diffstat (limited to 'src/pdf/SkPDFShader.h')
-rw-r--r--src/pdf/SkPDFShader.h9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/pdf/SkPDFShader.h b/src/pdf/SkPDFShader.h
index 5be47a382f..4fdbc44cf7 100644
--- a/src/pdf/SkPDFShader.h
+++ b/src/pdf/SkPDFShader.h
@@ -61,10 +61,9 @@ public:
bool equals(const SkPDFShader::State&) const;
private:
- SkPDFCanon* fCanon;
SkAutoTDelete<const SkPDFShader::State> fShaderState;
SkTDArray<SkPDFObject*> fResources;
- SkPDFFunctionShader(SkPDFCanon*, SkPDFShader::State*);
+ SkPDFFunctionShader(SkPDFShader::State*);
typedef SkPDFDict INHERITED;
};
@@ -82,11 +81,10 @@ public:
bool equals(const SkPDFShader::State&) const;
private:
- SkPDFCanon* fCanon;
SkAutoTDelete<const SkPDFShader::State> fShaderState;
SkAutoTUnref<SkPDFObject> fColorShader;
SkAutoTUnref<SkPDFResourceDict> fResourceDict;
- SkPDFAlphaFunctionShader(SkPDFCanon*, SkPDFShader::State*);
+ SkPDFAlphaFunctionShader(SkPDFShader::State*);
};
class SkPDFImageShader : public SkPDFStream {
@@ -98,10 +96,9 @@ public:
bool equals(const SkPDFShader::State&) const;
private:
- SkPDFCanon* fCanon;
SkAutoTDelete<const SkPDFShader::State> fShaderState;
SkTSet<SkPDFObject*> fResources;
- SkPDFImageShader(SkPDFCanon*, SkPDFShader::State*);
+ SkPDFImageShader(SkPDFShader::State*);
};
#endif