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