From 1e622d24d99f65fad071bd47f9dc47a552bf889f Mon Sep 17 00:00:00 2001 From: Brian Osman Date: Wed, 12 Sep 2018 10:47:29 -0400 Subject: [PATCH] Update to newer Skia font API (#6236) This function now takes an sk_sp --- lib/ui/text/asset_manager_font_provider.cc | 2 +- lib/ui/text/font_collection.cc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/ui/text/asset_manager_font_provider.cc b/lib/ui/text/asset_manager_font_provider.cc index 7edcbe6706..6caf8dd898 100644 --- a/lib/ui/text/asset_manager_font_provider.cc +++ b/lib/ui/text/asset_manager_font_provider.cc @@ -103,7 +103,7 @@ SkTypeface* AssetManagerFontStyleSet::createTypeface(int i) { std::unique_ptr 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; } diff --git a/lib/ui/text/font_collection.cc b/lib/ui/text/font_collection.cc index 987bbfaa76..b5a88354cc 100644 --- a/lib/ui/text/font_collection.cc +++ b/lib/ui/text/font_collection.cc @@ -96,7 +96,7 @@ void FontCollection::RegisterFonts(fml::RefPtr asset_manager) { void FontCollection::RegisterTestFonts() { sk_sp test_typeface = - SkTypeface::MakeFromStream(GetTestFontData().release()); + SkTypeface::MakeFromStream(GetTestFontData()); std::unique_ptr font_provider = std::make_unique(); -- GitLab