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

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: 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/SkPDFBitmap.h ('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..5774360a7cce07cf8ab2e118ed0c421bafdebf10 100644
--- a/src/pdf/SkPDFBitmap.cpp
+++ b/src/pdf/SkPDFBitmap.cpp
@@ -247,12 +247,11 @@ void SkPDFBitmap::emitDict(SkWStream* stream,
pdfDict.emitObject(stream, catalog);
}
-SkPDFBitmap::SkPDFBitmap(SkPDFCanon* canon,
- const SkBitmap& bm,
+SkPDFBitmap::SkPDFBitmap(const SkBitmap& bm,
SkPDFObject* smask)
- : fCanon(canon), fBitmap(bm), fSMask(smask) {}
+ : fBitmap(bm), fSMask(smask) {}
-SkPDFBitmap::~SkPDFBitmap() { fCanon->removeBitmap(this); }
+SkPDFBitmap::~SkPDFBitmap() {}
////////////////////////////////////////////////////////////////////////////////
static bool is_transparent(const SkBitmap& bm) {
@@ -312,7 +311,7 @@ SkPDFBitmap* SkPDFBitmap::Create(SkPDFCanon* canon,
// are refed by the SkPDFBitmap).
smask = SkNEW_ARGS(PDFAlphaBitmap, (bm));
}
- pdfBitmap = SkNEW_ARGS(SkPDFBitmap, (canon, bm, smask));
+ pdfBitmap = SkNEW_ARGS(SkPDFBitmap, (bm, smask));
canon->addBitmap(pdfBitmap);
return pdfBitmap;
}
« no previous file with comments | « src/pdf/SkPDFBitmap.h ('k') | src/pdf/SkPDFCanon.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698