Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
impeller
typographer
lazy_glyph_atlas.h
Go to the documentation of this file.
1
// Copyright 2013 The Flutter Authors. All rights reserved.
2
// Use of this source code is governed by a BSD-style license that can be
3
// found in the LICENSE file.
4
5
#ifndef FLUTTER_IMPELLER_TYPOGRAPHER_LAZY_GLYPH_ATLAS_H_
6
#define FLUTTER_IMPELLER_TYPOGRAPHER_LAZY_GLYPH_ATLAS_H_
7
8
#include <unordered_map>
9
10
#include "flutter/fml/macros.h"
11
#include "
impeller/renderer/context.h
"
12
#include "
impeller/typographer/glyph_atlas.h
"
13
#include "
impeller/typographer/text_frame.h
"
14
#include "
impeller/typographer/typographer_context.h
"
15
16
namespace
impeller
{
17
18
class
LazyGlyphAtlas
{
19
public
:
20
explicit
LazyGlyphAtlas
(
21
std::shared_ptr<TypographerContext> typographer_context);
22
23
~LazyGlyphAtlas
();
24
25
void
AddTextFrame
(
const
TextFrame
&
frame
,
Scalar
scale
);
26
27
void
ResetTextFrames
();
28
29
const
std::shared_ptr<GlyphAtlas>&
CreateOrGetGlyphAtlas
(
30
Context
& context,
31
GlyphAtlas::Type
type
)
const
;
32
33
private
:
34
std::shared_ptr<TypographerContext> typographer_context_;
35
36
FontGlyphMap
alpha_glyph_map_;
37
FontGlyphMap
color_glyph_map_;
38
std::shared_ptr<GlyphAtlasContext> alpha_context_;
39
std::shared_ptr<GlyphAtlasContext> color_context_;
40
mutable
std::shared_ptr<GlyphAtlas> alpha_atlas_;
41
mutable
std::shared_ptr<GlyphAtlas> color_atlas_;
42
43
LazyGlyphAtlas
(
const
LazyGlyphAtlas
&) =
delete
;
44
45
LazyGlyphAtlas
& operator=(
const
LazyGlyphAtlas
&) =
delete
;
46
};
47
48
}
// namespace impeller
49
50
#endif
// FLUTTER_IMPELLER_TYPOGRAPHER_LAZY_GLYPH_ATLAS_H_
impeller::Context
To do anything rendering related with Impeller, you need a context.
Definition
context.h:46
impeller::GlyphAtlas::Type
Type
Describes how the glyphs are represented in the texture.
Definition
glyph_atlas.h:32
impeller::LazyGlyphAtlas
Definition
lazy_glyph_atlas.h:18
impeller::LazyGlyphAtlas::~LazyGlyphAtlas
~LazyGlyphAtlas()
impeller::LazyGlyphAtlas::ResetTextFrames
void ResetTextFrames()
Definition
lazy_glyph_atlas.cc:40
impeller::LazyGlyphAtlas::AddTextFrame
void AddTextFrame(const TextFrame &frame, Scalar scale)
Definition
lazy_glyph_atlas.cc:31
impeller::LazyGlyphAtlas::CreateOrGetGlyphAtlas
const std::shared_ptr< GlyphAtlas > & CreateOrGetGlyphAtlas(Context &context, GlyphAtlas::Type type) const
Definition
lazy_glyph_atlas.cc:47
impeller::TextFrame
Represents a collection of shaped text runs.
Definition
text_frame.h:20
frame
double frame
Definition
examples.cpp:31
type
uint8_t type
Definition
fl_standard_message_codec_test.cc:1115
glyph_atlas.h
context.h
impeller
Definition
texture.h:18
impeller::Scalar
float Scalar
Definition
scalar.h:18
impeller::FontGlyphMap
std::unordered_map< ScaledFont, std::unordered_set< Glyph > > FontGlyphMap
Definition
font_glyph_pair.h:29
scale
const Scalar scale
Definition
stroke_path_geometry.cc:253
text_frame.h
typographer_context.h
Generated on Fri Apr 26 2024 06:14:15 for Flutter Engine by
1.9.8