Flutter Impeller
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 
13 namespace impeller {
14 
16  public:
17  static std::unique_ptr<TypographerContext> Make();
18 
20 
21  ~TypographerContextSTB() override;
22 
23  // |TypographerContext|
24  std::shared_ptr<GlyphAtlasContext> CreateGlyphAtlasContext() const override;
25 
26  // |TypographerContext|
27  std::shared_ptr<GlyphAtlas> CreateGlyphAtlas(
28  Context& context,
29  GlyphAtlas::Type type,
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_
impeller::TypographerContext
The graphics context necessary to render text.
Definition: typographer_context.h:23
impeller::TypographerContextSTB::TypographerContextSTB
TypographerContextSTB()
Definition: typographer_context_stb.cc:33
impeller::FontGlyphMap
std::unordered_map< ScaledFont, std::unordered_set< Glyph > > FontGlyphMap
Definition: font_glyph_pair.h:29
typographer_context.h
impeller::TypographerContextSTB::~TypographerContextSTB
~TypographerContextSTB() override
impeller::TypographerContextSTB::CreateGlyphAtlas
std::shared_ptr< GlyphAtlas > CreateGlyphAtlas(Context &context, GlyphAtlas::Type type, const std::shared_ptr< GlyphAtlasContext > &atlas_context, const FontGlyphMap &font_glyph_map) const override
Definition: typographer_context_stb.cc:375
impeller::GlyphAtlas::Type
Type
Describes how the glyphs are represented in the texture.
Definition: glyph_atlas.h:32
impeller::TypographerContextSTB::Make
static std::unique_ptr< TypographerContext > Make()
Definition: typographer_context_stb.cc:29
impeller::TypographerContextSTB
Definition: typographer_context_stb.h:15
impeller::TypographerContextSTB::CreateGlyphAtlasContext
std::shared_ptr< GlyphAtlasContext > CreateGlyphAtlasContext() const override
Definition: typographer_context_stb.cc:38
impeller::Context
To do anything rendering related with Impeller, you need a context.
Definition: context.h:46
impeller
Definition: aiks_blur_unittests.cc:20