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

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: 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
Index: src/pdf/SkPDFGraphicState.cpp
diff --git a/src/pdf/SkPDFGraphicState.cpp b/src/pdf/SkPDFGraphicState.cpp
index 4ec0821974aabc9ba3cf988eecc733e944e0dab3..5732ef84bb6b72f26656860a798cb7da55763a6a 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();
@@ -132,7 +128,7 @@ SkPDFGraphicState* SkPDFGraphicState::GetGraphicStateForPaint(
return SkRef(pdfGraphicState);
}
pdfGraphicState = new SkPDFGraphicState(canon, paint);
- canon->addGraphicState(pdfGraphicState);
+ canon->addGraphicState(SkRef(pdfGraphicState));
return pdfGraphicState;
}
« src/pdf/SkPDFBitmap.cpp ('K') | « src/pdf/SkPDFFont.cpp ('k') | src/pdf/SkPDFShader.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698