Skip to content

Commit

Permalink
Update to newer Skia font API (flutter#6236)
Browse files Browse the repository at this point in the history
This function now takes an sk_sp
  • Loading branch information
brianosman authored Sep 12, 2018
1 parent 87b4af0 commit 1e622d2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/ui/text/asset_manager_font_provider.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
2 changes: 1 addition & 1 deletion lib/ui/text/font_collection.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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>();
Expand Down

0 comments on commit 1e622d2

Please sign in to comment.