未验证 提交 1e622d24 编写于 作者: B Brian Osman 提交者: GitHub

Update to newer Skia font API (#6236)

This function now takes an sk_sp
上级 87b4af09
......@@ -103,7 +103,7 @@ SkTypeface* AssetManagerFontStyleSet::createTypeface(int i) {
std::unique_ptr<SkMemoryStream> stream = SkMemoryStream::Make(asset_data);
// Ownership of the stream is transferred.
asset.typeface = SkTypeface::MakeFromStream(stream.release());
asset.typeface = SkTypeface::MakeFromStream(std::move(stream));
if (!asset.typeface)
return nullptr;
}
......
......@@ -96,7 +96,7 @@ void FontCollection::RegisterFonts(fml::RefPtr<AssetManager> asset_manager) {
void FontCollection::RegisterTestFonts() {
sk_sp<SkTypeface> test_typeface =
SkTypeface::MakeFromStream(GetTestFontData().release());
SkTypeface::MakeFromStream(GetTestFontData());
std::unique_ptr<txt::TypefaceFontAssetProvider> font_provider =
std::make_unique<txt::TypefaceFontAssetProvider>();
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册