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

Unified Diff: src/ports/SkFontHost_fontconfig.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_fontconfig.cpp
diff --git a/src/ports/SkFontHost_fontconfig.cpp b/src/ports/SkFontHost_fontconfig.cpp
index 32e9f80560cefe0ad6c31cee45ae44a3184b564a..422d4fed3c09620f034929b6564e93b10c1b4b64 100644
--- a/src/ports/SkFontHost_fontconfig.cpp
+++ b/src/ports/SkFontHost_fontconfig.cpp
@@ -132,7 +132,7 @@ SkStream* FontConfigTypeface::onOpenStream(int* ttcIndex) const {
// should have been provided by CreateFromStream()
*ttcIndex = 0;
- SkAutoTUnref<SkStream> dupStream(stream->duplicate());
+ SkAutoTDelete<SkStream> dupStream(stream->duplicate());
if (dupStream) {
return dupStream.detach();
}
@@ -148,7 +148,7 @@ SkStream* FontConfigTypeface::onOpenStream(int* ttcIndex) const {
SkAutoTMalloc<uint8_t> allocMemory(length);
stream->rewind();
if (length == stream->read(allocMemory.get(), length)) {
- SkAutoTUnref<SkMemoryStream> copyStream(new SkMemoryStream());
+ SkAutoTDelete<SkMemoryStream> copyStream(new SkMemoryStream());
copyStream->setMemoryOwned(allocMemory.detach(), length);
return copyStream.detach();
}

Powered by Google App Engine
This is Rietveld 408576698