Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
typographer_context_stb.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_BACKENDS_STB_TYPOGRAPHER_CONTEXT_STB_H_
6#define FLUTTER_IMPELLER_TYPOGRAPHER_BACKENDS_STB_TYPOGRAPHER_CONTEXT_STB_H_
7
9
10#include <memory>
11#include "flutter/fml/macros.h"
12
13namespace impeller {
14
16 public:
17 static std::unique_ptr<TypographerContext> Make();
18
20
22
23 // |TypographerContext|
24 std::shared_ptr<GlyphAtlasContext> CreateGlyphAtlasContext() const override;
25
26 // |TypographerContext|
27 std::shared_ptr<GlyphAtlas> CreateGlyphAtlas(
28 Context& context,
30 const std::shared_ptr<GlyphAtlasContext>& atlas_context,
31 const FontGlyphMap& font_glyph_map) const override;
32
33 private:
35
36 TypographerContextSTB& operator=(const TypographerContextSTB&) = delete;
37};
38
39} // namespace impeller
40
41#endif // FLUTTER_IMPELLER_TYPOGRAPHER_BACKENDS_STB_TYPOGRAPHER_CONTEXT_STB_H_
To do anything rendering related with Impeller, you need a context.
Definition context.h:46
Type
Describes how the glyphs are represented in the texture.
Definition glyph_atlas.h:32
static std::unique_ptr< TypographerContext > Make()
std::shared_ptr< GlyphAtlasContext > CreateGlyphAtlasContext() const override
std::shared_ptr< GlyphAtlas > CreateGlyphAtlas(Context &context, GlyphAtlas::Type type, const std::shared_ptr< GlyphAtlasContext > &atlas_context, const FontGlyphMap &font_glyph_map) const override
The graphics context necessary to render text.
std::unordered_map< ScaledFont, std::unordered_set< Glyph > > FontGlyphMap