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

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: Rebase, just in case. 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
« no previous file with comments | « src/ports/SkFontConfigTypeface.h ('k') | src/ports/SkFontHost_fontconfig.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ports/SkFontHost_FreeType.cpp
diff --git a/src/ports/SkFontHost_FreeType.cpp b/src/ports/SkFontHost_FreeType.cpp
index 459abbc9b800fe53a567ab910fe4eabb76c3abc1..3f23a92ff842eac39dca2892b376acfb4c71dd48 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;
-
- // assumes ownership of the stream, will call unref() when its done
+ SkFaceRec* fNext;
+ FT_Face fFace;
+ FT_StreamRec fFTStream;
+ SkAutoTDelete<SkStream> fSkStream;
+ uint32_t fRefCnt;
+ uint32_t fFontID;
+
+ // assumes ownership of the stream, will delete when its done
SkFaceRec(SkStream* strm, uint32_t fontID);
- ~SkFaceRec() {
- fSkStream->unref();
- }
};
extern "C" {
« no previous file with comments | « src/ports/SkFontConfigTypeface.h ('k') | src/ports/SkFontHost_fontconfig.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698