File tree Expand file tree Collapse file tree 2 files changed +11
-17
lines changed Expand file tree Collapse file tree 2 files changed +11
-17
lines changed Original file line number Diff line number Diff line change @@ -315,20 +315,19 @@ void FontCollection::ClearFontFamilyCache() {
315315
316316sk_sp<skia::textlayout::FontCollection>
317317FontCollection::CreateSktFontCollection () {
318- if (!skt_collection_) {
319- skt_collection_ = sk_make_sp<skia::textlayout::FontCollection>();
320-
321- skt_collection_->setDefaultFontManager (default_font_manager_,
322- GetDefaultFontFamily ().c_str ());
323- skt_collection_->setAssetFontManager (asset_font_manager_);
324- skt_collection_->setDynamicFontManager (dynamic_font_manager_);
325- skt_collection_->setTestFontManager (test_font_manager_);
326- if (!enable_font_fallback_) {
327- skt_collection_->disableFontFallback ();
328- }
318+ sk_sp<skia::textlayout::FontCollection> skt_collection =
319+ sk_make_sp<skia::textlayout::FontCollection>();
320+
321+ skt_collection->setDefaultFontManager (default_font_manager_,
322+ GetDefaultFontFamily ().c_str ());
323+ skt_collection->setAssetFontManager (asset_font_manager_);
324+ skt_collection->setDynamicFontManager (dynamic_font_manager_);
325+ skt_collection->setTestFontManager (test_font_manager_);
326+ if (!enable_font_fallback_) {
327+ skt_collection->disableFontFallback ();
329328 }
330329
331- return skt_collection_ ;
330+ return skt_collection ;
332331}
333332
334333#endif // FLUTTER_ENABLE_SKSHAPER
Original file line number Diff line number Diff line change @@ -107,11 +107,6 @@ class FontCollection : public std::enable_shared_from_this<FontCollection> {
107107 fallback_fonts_for_locale_;
108108 bool enable_font_fallback_;
109109
110- #if FLUTTER_ENABLE_SKSHAPER
111- // An equivalent font collection usable by the Skia text shaper library.
112- sk_sp<skia::textlayout::FontCollection> skt_collection_;
113- #endif
114-
115110 // Performs the actual work of MatchFallbackFont. The result is cached in
116111 // fallback_match_cache_.
117112 const std::shared_ptr<minikin::FontFamily>& DoMatchFallbackFont (
You can’t perform that action at this time.
0 commit comments