Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
Namespaces | Functions | Variables
typographer_context_skia.cc File Reference
#include "impeller/typographer/backends/skia/typographer_context_skia.h"
#include <numeric>
#include <utility>
#include "flutter/fml/logging.h"
#include "flutter/fml/trace_event.h"
#include "impeller/base/allocation.h"
#include "impeller/core/allocator.h"
#include "impeller/typographer/backends/skia/glyph_atlas_context_skia.h"
#include "impeller/typographer/backends/skia/typeface_skia.h"
#include "impeller/typographer/rectangle_packer.h"
#include "impeller/typographer/typographer_context.h"
#include "include/core/SkColor.h"
#include "include/core/SkSize.h"
#include "third_party/skia/include/core/SkBitmap.h"
#include "third_party/skia/include/core/SkCanvas.h"
#include "third_party/skia/include/core/SkFont.h"
#include "third_party/skia/include/core/SkSurface.h"

Go to the source code of this file.

Namespaces

namespace  impeller
 

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 (SkCanvas *canvas, const ScaledFont &scaled_font, const Glyph &glyph, const Rect &location, bool has_color)
 
static bool impeller::UpdateAtlasBitmap (const GlyphAtlas &atlas, const std::shared_ptr< SkBitmap > &bitmap, const std::vector< FontGlyphPair > &new_pairs)
 
static std::shared_ptr< SkBitmapimpeller::CreateAtlasBitmap (const GlyphAtlas &atlas, const ISize &atlas_size)
 
static bool impeller::UpdateGlyphTextureAtlas (std::shared_ptr< SkBitmap > bitmap, const std::shared_ptr< Texture > &texture)
 
static std::shared_ptr< Textureimpeller::UploadGlyphTextureAtlas (const std::shared_ptr< Allocator > &allocator, std::shared_ptr< SkBitmap > bitmap, const ISize &atlas_size, PixelFormat format)
 

Variables

constexpr auto impeller::kPadding = 2