15 std::shared_ptr<TypographerContext> typographer_context)
16 : typographer_context_(
std::move(typographer_context)),
17 alpha_context_(typographer_context_
18 ? typographer_context_->CreateGlyphAtlasContext()
20 color_context_(typographer_context_
21 ? typographer_context_->CreateGlyphAtlasContext()
27 FML_DCHECK(atlas_map_.empty());
36 alpha_glyph_map_.clear();
37 color_glyph_map_.clear();
45 auto atlas_it = atlas_map_.find(type);
46 if (atlas_it != atlas_map_.end()) {
47 return atlas_it->second;
51 if (!typographer_context_) {
52 VALIDATION_LOG <<
"Unable to render text because a TypographerContext has "
56 if (!typographer_context_->IsValid()) {
58 <<
"Unable to render text because the TypographerContext is invalid.";
66 auto atlas = typographer_context_->CreateGlyphAtlas(context, type,
67 atlas_context, glyph_map);
68 if (!atlas || !atlas->IsValid()) {
72 atlas_map_[type] = atlas;