Flutter Engine
The Flutter Engine
Namespaces | Macros | Functions | Variables
typographer_context_stb.cc File Reference
#include "impeller/typographer/backends/stb/typographer_context_stb.h"
#include <numeric>
#include <utility>
#include "flutter/fml/logging.h"
#include "flutter/fml/trace_event.h"
#include "fml/closure.h"
#include "fml/mapping.h"
#include "impeller/base/allocation.h"
#include "impeller/core/allocator.h"
#include "impeller/core/device_buffer.h"
#include "impeller/typographer/backends/stb/glyph_atlas_context_stb.h"
#include "impeller/typographer/font_glyph_pair.h"
#include "typeface_stb.h"

Go to the source code of this file.

Namespaces

namespace  impeller
 

Macros

#define DISABLE_COLOR_FONT_SUPPORT   1
 

Functions

static size_t impeller::PairsFitInAtlasOfSize (const std::vector< FontGlyphPair > &pairs, const ISize &atlas_size, std::vector< Rect > &glyph_positions, const std::shared_ptr< RectanglePacker > &rect_packer)
 
static bool impeller::CanAppendToExistingAtlas (const std::shared_ptr< GlyphAtlas > &atlas, const std::vector< FontGlyphPair > &extra_pairs, std::vector< Rect > &glyph_positions, ISize atlas_size, const std::shared_ptr< RectanglePacker > &rect_packer)
 
static ISize impeller::OptimumAtlasSizeForFontGlyphPairs (const std::vector< FontGlyphPair > &pairs, std::vector< Rect > &glyph_positions, const std::shared_ptr< GlyphAtlasContext > &atlas_context, GlyphAtlas::Type type, const ISize &max_texture_size)
 
static void impeller::DrawGlyph (BitmapSTB *bitmap, const ScaledFont &scaled_font, const Glyph &glyph, const Rect &location, bool has_color)
 
static bool impeller::UpdateAtlasBitmap (const GlyphAtlas &atlas, const std::shared_ptr< BitmapSTB > &bitmap, const std::vector< FontGlyphPair > &new_pairs)
 
static std::shared_ptr< BitmapSTB > impeller::CreateAtlasBitmap (const GlyphAtlas &atlas, const ISize &atlas_size)
 
static bool impeller::UpdateGlyphTextureAtlas (std::shared_ptr< BitmapSTB > &bitmap, const std::shared_ptr< Allocator > &allocator, std::shared_ptr< BlitPass > &blit_pass, const std::shared_ptr< Texture > &texture)
 
static std::shared_ptr< Texture > impeller::UploadGlyphTextureAtlas (const std::shared_ptr< Allocator > &allocator, std::shared_ptr< BlitPass > &blit_pass, std::shared_ptr< BitmapSTB > &bitmap, const ISize &atlas_size, PixelFormat format)
 
static Rect impeller::ComputeGlyphSize (const ScaledFont &font, const SubpixelGlyph &glyph)
 

Variables

constexpr auto kColorFontBitsPerPixel = 1
 

Macro Definition Documentation

◆ DISABLE_COLOR_FONT_SUPPORT

#define DISABLE_COLOR_FONT_SUPPORT   1

Definition at line 21 of file typographer_context_stb.cc.

Variable Documentation

◆ kColorFontBitsPerPixel

constexpr auto kColorFontBitsPerPixel = 1
constexpr

Definition at line 23 of file typographer_context_stb.cc.