| Flutter Impeller |

Public Member Functions | Protected Member Functions | List of all members
impeller::GlyphAtlasContext Class Reference

A container for caching a glyph atlas across frames. More...

`#include <glyph_atlas.h>`

Inheritance diagram for impeller::GlyphAtlasContext:

## Public Member Functions
virtual | ~GlyphAtlasContext ()
std::shared_ptr< GlyphAtlas > | GetGlyphAtlas () const
| Retrieve the current glyph atlas. More...
const ISize & | GetAtlasSize () const
| Retrieve the size of the current glyph atlas. More...
std::shared_ptr< RectanglePacker > | GetRectPacker () const
| Retrieve the previous (if any) rect packer. More...
void | UpdateGlyphAtlas (std::shared_ptr< GlyphAtlas > atlas, ISize size)
| Update the context with a newly constructed glyph atlas. More...
void | UpdateRectPacker (std::shared_ptr< RectanglePacker > rect_packer)

## Protected Member Functions
| GlyphAtlasContext ()

## Detailed Description

A container for caching a glyph atlas across frames.

Definition at line 145 of file glyph_atlas.h.

## Constructor & Destructor Documentation

## ◆ ~GlyphAtlasContext()

impeller::GlyphAtlasContext::~GlyphAtlasContext | ( |  | ) |
| virtual

Definition at line 16 of file glyph_atlas.cc.

16 {}

## ◆ GlyphAtlasContext()

impeller::GlyphAtlasContext::GlyphAtlasContext | ( |  | ) |
| protected

Definition at line 12 of file glyph_atlas.cc.

13 : atlas_(std::make_shared<GlyphAtlas>(GlyphAtlas::Type::kAlphaBitmap)),
14 atlas_size_(ISize(0, 0)) {}

## Member Function Documentation

## ◆ GetAtlasSize()

const ISize & impeller::GlyphAtlasContext::GetAtlasSize | ( |  | ) | const

Retrieve the size of the current glyph atlas.

Definition at line 22 of file glyph_atlas.cc.

22 {
23 return atlas_size_;
24 }

## ◆ GetGlyphAtlas()

std::shared_ptr< GlyphAtlas > impeller::GlyphAtlasContext::GetGlyphAtlas | ( |  | ) | const

Retrieve the current glyph atlas.

Definition at line 18 of file glyph_atlas.cc.

18 {
19 return atlas_;
20 }

## ◆ GetRectPacker()

std::shared_ptr< RectanglePacker > impeller::GlyphAtlasContext::GetRectPacker | ( |  | ) | const

Retrieve the previous (if any) rect packer.

Definition at line 26 of file glyph_atlas.cc.

26 {
27 return rect_packer_;
28 }

## ◆ UpdateGlyphAtlas()

void impeller::GlyphAtlasContext::UpdateGlyphAtlas | ( | std::shared_ptr< GlyphAtlas > | atlas,
|  | ISize | size
| ) |  |

Update the context with a newly constructed glyph atlas.

Definition at line 30 of file glyph_atlas.cc.

31 {
32 atlas_ = std::move(atlas);
33 atlas_size_ = size;
34 }

## ◆ UpdateRectPacker()

void impeller::GlyphAtlasContext::UpdateRectPacker | ( | std::shared_ptr< RectanglePacker > | rect_packer | ) |

Definition at line 36 of file glyph_atlas.cc.

37 {
38 rect_packer_ = std::move(rect_packer);
39 }

The documentation for this class was generated from the following files:

- impeller/typographer/glyph_atlas.h
- impeller/typographer/glyph_atlas.cc

impeller::GlyphAtlas::Type::kAlphaBitmap
@ kAlphaBitmap
impeller::ISize
TSize< int64_t > ISize
Definition: size.h:138