#include <lazy_glyph_atlas.h>
Definition at line 15 of file lazy_glyph_atlas.h.
◆ LazyGlyphAtlas()
impeller::LazyGlyphAtlas::LazyGlyphAtlas |
( |
std::shared_ptr< TypographerContext > |
typographer_context | ) |
|
|
explicit |
Definition at line 19 of file lazy_glyph_atlas.cc.
21 : typographer_context_(std::move(typographer_context)),
22 alpha_context_(typographer_context_
23 ? typographer_context_->CreateGlyphAtlasContext(
25 : nullptr),
26 color_context_(typographer_context_
27 ? typographer_context_->CreateGlyphAtlasContext(
29 : nullptr) {}
◆ ~LazyGlyphAtlas()
impeller::LazyGlyphAtlas::~LazyGlyphAtlas |
( |
| ) |
|
|
default |
◆ AddTextFrame()
Definition at line 33 of file lazy_glyph_atlas.cc.
36 {
37 FML_DCHECK(alpha_atlas_ ==
nullptr && color_atlas_ ==
nullptr);
40 properties);
41 } else {
43 properties);
44 }
45}
#define FML_DCHECK(condition)
◆ CreateOrGetGlyphAtlas()
Definition at line 54 of file lazy_glyph_atlas.cc.
57 {
58 {
60 return alpha_atlas_;
61 }
63 return color_atlas_;
64 }
65 }
66
67 if (!typographer_context_) {
68 VALIDATION_LOG <<
"Unable to render text because a TypographerContext has "
69 "not been set.";
71 }
72 if (!typographer_context_->IsValid()) {
74 << "Unable to render text because the TypographerContext is invalid.";
76 }
77
79 : color_glyph_map_;
80 const std::shared_ptr<GlyphAtlasContext>& atlas_context =
82 std::shared_ptr<GlyphAtlas>
atlas = typographer_context_->CreateGlyphAtlas(
83 context,
type, host_buffer, atlas_context, glyph_map);
87 }
89 alpha_atlas_ = std::move(
atlas);
90 return alpha_atlas_;
91 }
93 color_atlas_ = std::move(
atlas);
94 return color_atlas_;
95 }
97}
#define FML_UNREACHABLE()
sk_sp< const SkImage > atlas
static const std::shared_ptr< GlyphAtlas > kNullGlyphAtlas
◆ ResetTextFrames()
void impeller::LazyGlyphAtlas::ResetTextFrames |
( |
| ) |
|
Definition at line 47 of file lazy_glyph_atlas.cc.
47 {
48 alpha_glyph_map_.clear();
49 color_glyph_map_.clear();
50 alpha_atlas_.reset();
51 color_atlas_.reset();
52}
The documentation for this class was generated from the following files: