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

Unified Diff: src/pdf/SkPDFFont.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/SkPDFFont.cpp
diff --git a/src/pdf/SkPDFFont.cpp b/src/pdf/SkPDFFont.cpp
index f386b7152393e8773629ae865c95eb07f1ba6257..dc7168a0f785a63ce3081a2bf3b64ff39b69d565 100644
--- a/src/pdf/SkPDFFont.cpp
+++ b/src/pdf/SkPDFFont.cpp
@@ -747,7 +747,7 @@ SkPDFGlyphSet* SkPDFGlyphSetMap::getGlyphSetForFont(SkPDFFont* font) {
* from each page and combine it and ask for a resource with that subset.
*/
-SkPDFFont::~SkPDFFont() { fCanon->removeFont(this); }
+SkPDFFont::~SkPDFFont() {}
SkTypeface* SkPDFFont::typeface() {
return fTypeface.get();
@@ -854,7 +854,7 @@ SkPDFFont* SkPDFFont::GetFontResource(SkPDFCanon* canon,
SkPDFFont* font = SkPDFFont::Create(canon, fontMetrics.get(), typeface,
glyphID, relatedFontDescriptor);
- canon->addFont(font, fontID, font->fFirstGlyphID);
+ canon->addFont(SkRef(font), fontID, font->fFirstGlyphID);
return font;
}

Powered by Google App Engine
This is Rietveld 408576698