Flutter Engine
The Flutter Engine
Public 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:
impeller::GlyphAtlasContextSTB

Public Member Functions

 GlyphAtlasContext (GlyphAtlas::Type type)
 
virtual ~GlyphAtlasContext ()
 
std::shared_ptr< GlyphAtlasGetGlyphAtlas () const
 Retrieve the current glyph atlas. More...
 
const ISizeGetAtlasSize () const
 Retrieve the size of the current glyph atlas. More...
 
std::shared_ptr< RectanglePackerGetRectPacker () const
 Retrieve the previous (if any) rect packer. More...
 
int64_t GetHeightAdjustment () const
 A y-coordinate shift that must be applied to glyphs appended to the atlas. More...
 
void UpdateGlyphAtlas (std::shared_ptr< GlyphAtlas > atlas, ISize size, int64_t height_adjustment_)
 Update the context with a newly constructed glyph atlas. More...
 
void UpdateRectPacker (std::shared_ptr< RectanglePacker > rect_packer)
 

Detailed Description

A container for caching a glyph atlas across frames.

Definition at line 149 of file glyph_atlas.h.

Constructor & Destructor Documentation

◆ GlyphAtlasContext()

impeller::GlyphAtlasContext::GlyphAtlasContext ( GlyphAtlas::Type  type)
explicit

Definition at line 12 of file glyph_atlas.cc.

13 : atlas_(std::make_shared<GlyphAtlas>(type)), atlas_size_(ISize(0, 0)) {}
GLenum type
ISize64 ISize
Definition: size.h:140

◆ ~GlyphAtlasContext()

impeller::GlyphAtlasContext::~GlyphAtlasContext ( )
virtual

Definition at line 15 of file glyph_atlas.cc.

15{}

Member Function Documentation

◆ GetAtlasSize()

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

Retrieve the size of the current glyph atlas.

Definition at line 21 of file glyph_atlas.cc.

21 {
22 return atlas_size_;
23}

◆ GetGlyphAtlas()

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

Retrieve the current glyph atlas.

Definition at line 17 of file glyph_atlas.cc.

17 {
18 return atlas_;
19}

◆ GetHeightAdjustment()

int64_t impeller::GlyphAtlasContext::GetHeightAdjustment ( ) const

A y-coordinate shift that must be applied to glyphs appended to the atlas.

The rectangle packer is only initialized for unfilled regions of the atlas. The area the rectangle packer covers is offset from the origin by this height adjustment.

Definition at line 25 of file glyph_atlas.cc.

25 {
26 return height_adjustment_;
27}

◆ GetRectPacker()

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

Retrieve the previous (if any) rect packer.

Definition at line 29 of file glyph_atlas.cc.

29 {
30 return rect_packer_;
31}

◆ UpdateGlyphAtlas()

void impeller::GlyphAtlasContext::UpdateGlyphAtlas ( std::shared_ptr< GlyphAtlas atlas,
ISize  size,
int64_t  height_adjustment_ 
)

Update the context with a newly constructed glyph atlas.

Definition at line 33 of file glyph_atlas.cc.

35 {
36 atlas_ = std::move(atlas);
37 atlas_size_ = size;
38 height_adjustment_ = height_adjustment;
39}
sk_sp< const SkImage > atlas
Definition: SkRecords.h:331
it will be possible to load the file into Perfetto s trace viewer disable asset Prevents usage of any non test fonts unless they were explicitly Loaded via prefetched default font Indicates whether the embedding started a prefetch of the default font manager before creating the engine run In non interactive keep the shell running after the Dart script has completed enable serial On low power devices with low core running concurrent GC tasks on threads can cause them to contend with the UI thread which could potentially lead to jank This option turns off all concurrent GC activities domain network JSON encoded network policy per domain This overrides the DisallowInsecureConnections switch Embedder can specify whether to allow or disallow insecure connections at a domain level old gen heap size
Definition: switches.h:259

◆ UpdateRectPacker()

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

Definition at line 41 of file glyph_atlas.cc.

42 {
43 rect_packer_ = std::move(rect_packer);
44}

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