Update to newer Skia font API (flutter/engine#6236)
This function now takes an sk_sp
This commit is contained in:
@@ -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>();
|
||||
|
||||
Reference in New Issue
Block a user