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

Unified Diff: src/fonts/SkFontMgr_indirect.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/fonts/SkFontMgr_fontconfig.cpp ('k') | src/gpu/gl/GrGLPathRendering.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/fonts/SkFontMgr_indirect.cpp
diff --git a/src/fonts/SkFontMgr_indirect.cpp b/src/fonts/SkFontMgr_indirect.cpp
index c438623c613b260d66f4109930e2418b4c218b23..6f94dfd367a1dadcadd32a155601c79071c261e2 100644
--- a/src/fonts/SkFontMgr_indirect.cpp
+++ b/src/fonts/SkFontMgr_indirect.cpp
@@ -213,19 +213,19 @@ SkTypeface* SkFontMgr_Indirect::createTypefaceFromFontId(const SkFontIdentity& i
// No exact match, but did find a data match.
if (dataTypeface.get() != NULL) {
- SkAutoTUnref<SkStream> stream(dataTypeface->openStream(NULL));
+ SkAutoTDelete<SkStream> stream(dataTypeface->openStream(NULL));
if (stream.get() != NULL) {
- return fImpl->createFromStream(stream.get(), dataTypefaceIndex);
+ return fImpl->createFromStream(stream.detach(), dataTypefaceIndex);
}
}
// No data match, request data and add entry.
- SkAutoTUnref<SkStreamAsset> stream(fProxy->getData(id.fDataId));
+ SkAutoTDelete<SkStreamAsset> stream(fProxy->getData(id.fDataId));
if (stream.get() == NULL) {
return NULL;
}
- SkAutoTUnref<SkTypeface> typeface(fImpl->createFromStream(stream, id.fTtcIndex));
+ SkAutoTUnref<SkTypeface> typeface(fImpl->createFromStream(stream.detach(), id.fTtcIndex));
if (typeface.get() == NULL) {
return NULL;
}
« no previous file with comments | « src/fonts/SkFontMgr_fontconfig.cpp ('k') | src/gpu/gl/GrGLPathRendering.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698