| Index: src/ports/SkFontHost_linux.cpp
|
| diff --git a/src/ports/SkFontHost_linux.cpp b/src/ports/SkFontHost_linux.cpp
|
| index ec8e33870ca9e94dd99582320821f596a6da999e..7faf07fe39591222a3d83097fd65ef5c7abdd2b5 100644
|
| --- a/src/ports/SkFontHost_linux.cpp
|
| +++ b/src/ports/SkFontHost_linux.cpp
|
| @@ -139,7 +139,7 @@ protected:
|
|
|
| private:
|
| SkString fPath;
|
| - const SkAutoTUnref<SkStreamAsset> fStream;
|
| + const SkAutoTDelete<SkStreamAsset> fStream;
|
|
|
| typedef SkTypeface_Custom INHERITED;
|
| };
|
| @@ -283,8 +283,7 @@ protected:
|
| }
|
|
|
| SkTypeface* onCreateFromData(SkData* data, int ttcIndex) const SK_OVERRIDE {
|
| - SkAutoTUnref<SkStream> stream(new SkMemoryStream(data));
|
| - return this->createFromStream(stream, ttcIndex);
|
| + return this->createFromStream(new SkMemoryStream(data), ttcIndex);
|
| }
|
|
|
| SkTypeface* onCreateFromStream(SkStream* stream, int ttcIndex) const SK_OVERRIDE {
|
| @@ -305,8 +304,8 @@ protected:
|
| }
|
|
|
| SkTypeface* onCreateFromFile(const char path[], int ttcIndex) const SK_OVERRIDE {
|
| - SkAutoTUnref<SkStream> stream(SkStream::NewFromFile(path));
|
| - return stream.get() ? this->createFromStream(stream, ttcIndex) : NULL;
|
| + SkAutoTDelete<SkStream> stream(SkStream::NewFromFile(path));
|
| + return stream.get() ? this->createFromStream(stream.detach(), ttcIndex) : NULL;
|
| }
|
|
|
| virtual SkTypeface* onLegacyCreateTypeface(const char familyName[],
|
| @@ -341,7 +340,7 @@ private:
|
|
|
| while (iter.next(&name, false)) {
|
| SkString filename(SkOSPath::Join(directory.c_str(), name.c_str()));
|
| - SkAutoTUnref<SkStream> stream(SkStream::NewFromFile(filename.c_str()));
|
| + SkAutoTDelete<SkStream> stream(SkStream::NewFromFile(filename.c_str()));
|
| if (!stream.get()) {
|
| SkDebugf("---- failed to open <%s>\n", filename.c_str());
|
| continue;
|
|
|