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

Unified Diff: gm/dftext.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
« no previous file with comments | « gm/dcshader.cpp ('k') | gm/gmmain.cpp » ('j') | gm/gmmain.cpp » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gm/dftext.cpp
diff --git a/gm/dftext.cpp b/gm/dftext.cpp
index 36b8d5501c67bcac4d67807e7331143681e194cc..d431331cb2b79cc4ef6e05b7933974348f8019de 100755
--- a/gm/dftext.cpp
+++ b/gm/dftext.cpp
@@ -25,13 +25,13 @@ public:
protected:
void onOnceBeforeDraw() SK_OVERRIDE {
SkString filename = GetResourcePath("/Funkster.ttf");
- SkAutoTUnref<SkFILEStream> stream(new SkFILEStream(filename.c_str()));
+ SkAutoTDelete<SkFILEStream> stream(new SkFILEStream(filename.c_str()));
if (!stream->isValid()) {
SkDebugf("Could not find Funkster.ttf, please set --resourcePath correctly.\n");
return;
}
- fTypeface = SkTypeface::CreateFromStream(stream);
+ fTypeface = SkTypeface::CreateFromStream(stream.detach());
}
uint32_t onGetFlags() const SK_OVERRIDE {
« no previous file with comments | « gm/dcshader.cpp ('k') | gm/gmmain.cpp » ('j') | gm/gmmain.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698