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

Unified Diff: src/pdf/SkPDFGraphicState.cpp

Issue 966863002: PDF: Canon now owns a reference to all interned objects (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 2015-02-27 (Friday) 15:27:08 EST Created 5 years, 10 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 | « src/pdf/SkPDFGraphicState.h ('k') | src/pdf/SkPDFShader.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/pdf/SkPDFGraphicState.cpp
diff --git a/src/pdf/SkPDFGraphicState.cpp b/src/pdf/SkPDFGraphicState.cpp
index 4ec0821974aabc9ba3cf988eecc733e944e0dab3..09545d1356da4c6085f385e478148d161caf959b 100644
--- a/src/pdf/SkPDFGraphicState.cpp
+++ b/src/pdf/SkPDFGraphicState.cpp
@@ -112,11 +112,7 @@ bool SkPDFGraphicState::equals(const SkPaint& paint) const {
return equivalent(paint, fPaint);
}
-SkPDFGraphicState::~SkPDFGraphicState() {
- if (fCanon) {
- fCanon->removeGraphicState(this);
- }
-}
+SkPDFGraphicState::~SkPDFGraphicState() {}
void SkPDFGraphicState::emitObject(SkWStream* stream, SkPDFCatalog* catalog) {
populateDict();
@@ -131,7 +127,7 @@ SkPDFGraphicState* SkPDFGraphicState::GetGraphicStateForPaint(
if (pdfGraphicState) {
return SkRef(pdfGraphicState);
}
- pdfGraphicState = new SkPDFGraphicState(canon, paint);
+ pdfGraphicState = new SkPDFGraphicState(paint);
canon->addGraphicState(pdfGraphicState);
return pdfGraphicState;
}
@@ -207,10 +203,10 @@ SkPDFGraphicState* SkPDFGraphicState::GetNoSMaskGraphicState() {
}
SkPDFGraphicState::SkPDFGraphicState()
- : fCanon(NULL), fPopulated(false) {}
+ : fPopulated(false) {}
-SkPDFGraphicState::SkPDFGraphicState(SkPDFCanon* canon, const SkPaint& paint)
- : fCanon(canon), fPaint(paint), fPopulated(false) {}
+SkPDFGraphicState::SkPDFGraphicState(const SkPaint& paint)
+ : fPaint(paint), fPopulated(false) {}
// populateDict and operator== have to stay in sync with each other.
void SkPDFGraphicState::populateDict() {
« no previous file with comments | « src/pdf/SkPDFGraphicState.h ('k') | src/pdf/SkPDFShader.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698