| Index: src/ports/SkFontMgr_android.cpp
|
| diff --git a/src/ports/SkFontMgr_android.cpp b/src/ports/SkFontMgr_android.cpp
|
| index 31b5346a10686a1e0955cfdc1183e3f7ba2f15a8..1ab2f29642a1147be1bc0404e43faf951f3af113 100644
|
| --- a/src/ports/SkFontMgr_android.cpp
|
| +++ b/src/ports/SkFontMgr_android.cpp
|
| @@ -95,7 +95,7 @@ public:
|
| bool isFixedPitch,
|
| const SkString familyName)
|
| : INHERITED(index, style, isFixedPitch, familyName)
|
| - , fStream(stream) { }
|
| + , fStream(SkRef(stream)) { }
|
|
|
| virtual void onGetFontDescriptor(SkFontDescriptor* desc,
|
| bool* serialize) const SK_OVERRIDE {
|
| @@ -382,16 +382,14 @@ protected:
|
| return stream.get() ? this->createFromStream(stream, ttcIndex) : NULL;
|
| }
|
|
|
| - virtual SkTypeface* onCreateFromStream(SkStream* s, int ttcIndex) const SK_OVERRIDE {
|
| - SkAutoTUnref<SkStream> stream(s);
|
| -
|
| + virtual SkTypeface* onCreateFromStream(SkStream* stream, int ttcIndex) const SK_OVERRIDE {
|
| bool isFixedPitch;
|
| SkTypeface::Style style;
|
| SkString name;
|
| if (!SkTypeface_FreeType::ScanFont(stream, ttcIndex, &name, &style, &isFixedPitch)) {
|
| return NULL;
|
| }
|
| - return SkNEW_ARGS(SkTypeface_AndroidStream, (stream.detach(), ttcIndex,
|
| + return SkNEW_ARGS(SkTypeface_AndroidStream, (stream, ttcIndex,
|
| style, isFixedPitch, name));
|
| }
|
|
|
|
|