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

Unified Diff: src/pdf/SkPDFBitmap.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
« no previous file with comments | « src/doc/SkDocument_PDF.cpp ('k') | src/pdf/SkPDFCanon.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/pdf/SkPDFBitmap.cpp
diff --git a/src/pdf/SkPDFBitmap.cpp b/src/pdf/SkPDFBitmap.cpp
index 03230341a4cd6604adaeb7d6be9aac2f77ac6a45..23c88c129f2a8eb90a20e6bd713a2647c589a00d 100644
--- a/src/pdf/SkPDFBitmap.cpp
+++ b/src/pdf/SkPDFBitmap.cpp
@@ -252,7 +252,7 @@ SkPDFBitmap::SkPDFBitmap(SkPDFCanon* canon,
SkPDFObject* smask)
: fCanon(canon), fBitmap(bm), fSMask(smask) {}
-SkPDFBitmap::~SkPDFBitmap() { fCanon->removeBitmap(this); }
+SkPDFBitmap::~SkPDFBitmap() {}
////////////////////////////////////////////////////////////////////////////////
static bool is_transparent(const SkBitmap& bm) {
@@ -313,6 +313,6 @@ SkPDFBitmap* SkPDFBitmap::Create(SkPDFCanon* canon,
smask = SkNEW_ARGS(PDFAlphaBitmap, (bm));
}
pdfBitmap = SkNEW_ARGS(SkPDFBitmap, (canon, bm, smask));
- canon->addBitmap(pdfBitmap);
+ canon->addBitmap(SkRef(pdfBitmap));
mtklein 2015/02/27 19:50:17 This seems to distribute the responsibility for re
hal.canary 2015/02/27 20:13:42 Done.
return pdfBitmap;
}
« no previous file with comments | « src/doc/SkDocument_PDF.cpp ('k') | src/pdf/SkPDFCanon.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698