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

Unified Diff: src/ports/SkFontHost_FreeType.cpp

Issue 849103004: Make SkStream *not* ref counted. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Treat SkFontMgr::createFromStream as taking ownership of the stream (is this correct?) Created 5 years, 11 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/ports/SkFontHost_FreeType.cpp
diff --git a/src/ports/SkFontHost_FreeType.cpp b/src/ports/SkFontHost_FreeType.cpp
index 459abbc9b800fe53a567ab910fe4eabb76c3abc1..1eff823d628502a4a142f53f2e6d31bf44f2b1d7 100644
--- a/src/ports/SkFontHost_FreeType.cpp
+++ b/src/ports/SkFontHost_FreeType.cpp
@@ -233,18 +233,15 @@ private:
///////////////////////////////////////////////////////////////////////////
struct SkFaceRec {
- SkFaceRec* fNext;
- FT_Face fFace;
- FT_StreamRec fFTStream;
- SkStream* fSkStream;
- uint32_t fRefCnt;
- uint32_t fFontID;
+ SkFaceRec* fNext;
+ FT_Face fFace;
+ FT_StreamRec fFTStream;
+ SkAutoTDelete<SkStream> fSkStream;
+ uint32_t fRefCnt;
+ uint32_t fFontID;
// assumes ownership of the stream, will call unref() when its done
bungeman-skia 2015/01/15 22:44:55 Comment, 'will delete when its done'.
scroggo 2015/01/16 19:13:37 Done.
SkFaceRec(SkStream* strm, uint32_t fontID);
- ~SkFaceRec() {
- fSkStream->unref();
- }
};
extern "C" {

Powered by Google App Engine
This is Rietveld 408576698