Merge "Update FakedFont to use shared pointer" into sc-dev

This commit is contained in:
TreeHugger Robot
2021-02-06 01:27:57 +00:00
committed by Android (Google) Code Review

View File

@@ -264,7 +264,7 @@ AFont* _Nonnull AFontMatcher_match(
static_cast<minikin::FamilyVariant>(matcher->mFamilyVariant),
1 /* maxRun */);
const minikin::Font* font = runs[0].fakedFont.font;
const std::shared_ptr<minikin::Font>& font = runs[0].fakedFont.font;
std::unique_ptr<AFont> result = std::make_unique<AFont>();
const android::MinikinFontSkia* minikinFontSkia =
reinterpret_cast<android::MinikinFontSkia*>(font->typeface().get());