Index: src/core/SkFontMgr.cpp |
diff --git a/src/core/SkFontMgr.cpp b/src/core/SkFontMgr.cpp |
index 57f82b03ba28201a21959f67ace59c7787191bc7..0f0066792636837af660e610ab96ede11b5d7bb2 100644 |
--- a/src/core/SkFontMgr.cpp |
+++ b/src/core/SkFontMgr.cpp |
@@ -139,11 +139,11 @@ |
return this->onCreateFromStream(stream, params); |
} |
-SkTypeface* SkFontMgr::createFromFontData(std::unique_ptr<SkFontData> data) const { |
+SkTypeface* SkFontMgr::createFromFontData(SkFontData* data) const { |
if (nullptr == data) { |
return nullptr; |
} |
- return this->onCreateFromFontData(std::move(data)); |
+ return this->onCreateFromFontData(data); |
} |
// This implementation is temporary until it can be made pure virtual. |
@@ -152,8 +152,10 @@ |
} |
// This implementation is temporary until it can be made pure virtual. |
-SkTypeface* SkFontMgr::onCreateFromFontData(std::unique_ptr<SkFontData> data) const { |
- return this->createFromStream(data->detachStream().release(), data->getIndex()); |
+SkTypeface* SkFontMgr::onCreateFromFontData(SkFontData* data) const { |
+ SkTypeface* ret = this->createFromStream(data->detachStream(), data->getIndex()); |
+ delete data; |
+ return ret; |
} |
SkTypeface* SkFontMgr::createFromFile(const char path[], int ttcIndex) const { |