Flutter Engine
The Flutter Engine
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
Public Member Functions | List of all members
SkBulkGlyphMetricsAndPaths Class Reference

#include <SkStrikeSpec.h>

Public Member Functions

 SkBulkGlyphMetricsAndPaths (const SkStrikeSpec &spec)
 
 SkBulkGlyphMetricsAndPaths (sk_sp< SkStrike > &&strike)
 
 ~SkBulkGlyphMetricsAndPaths ()
 
SkSpan< const SkGlyph * > glyphs (SkSpan< const SkGlyphID > glyphIDs)
 
const SkGlyphglyph (SkGlyphID glyphID)
 
void findIntercepts (const SkScalar bounds[2], SkScalar scale, SkScalar xPos, const SkGlyph *glyph, SkScalar *array, int *count)
 

Detailed Description

Definition at line 128 of file SkStrikeSpec.h.

Constructor & Destructor Documentation

◆ SkBulkGlyphMetricsAndPaths() [1/2]

SkBulkGlyphMetricsAndPaths::SkBulkGlyphMetricsAndPaths ( const SkStrikeSpec spec)
explicit

Definition at line 197 of file SkStrikeSpec.cpp.

198 : fStrike{spec.findOrCreateStrike()} { }
sk_sp< SkStrike > findOrCreateStrike() const

◆ SkBulkGlyphMetricsAndPaths() [2/2]

SkBulkGlyphMetricsAndPaths::SkBulkGlyphMetricsAndPaths ( sk_sp< SkStrike > &&  strike)
explicit

Definition at line 200 of file SkStrikeSpec.cpp.

201 : fStrike{std::move(strike)} { }

◆ ~SkBulkGlyphMetricsAndPaths()

SkBulkGlyphMetricsAndPaths::~SkBulkGlyphMetricsAndPaths ( )
default

Member Function Documentation

◆ findIntercepts()

void SkBulkGlyphMetricsAndPaths::findIntercepts ( const SkScalar  bounds[2],
SkScalar  scale,
SkScalar  xPos,
const SkGlyph glyph,
SkScalar array,
int count 
)

Definition at line 214 of file SkStrikeSpec.cpp.

216 {
217 // TODO(herb): remove this abominable const_cast. Do the intercepts really need to be on the
218 // glyph?
219 fStrike->findIntercepts(bounds, scale, xPos, const_cast<SkGlyph*>(glyph), array, count);
220}
int count
Definition: FontMgrTest.cpp:50
const SkGlyph * glyph(SkGlyphID glyphID)
void findIntercepts(const SkScalar bounds[2], SkScalar scale, SkScalar xPos, SkGlyph *, SkScalar *array, int *count) SK_EXCLUDES(fStrikeLock)
Definition: SkStrike.cpp:212
Optional< SkRect > bounds
Definition: SkRecords.h:189
const Scalar scale

◆ glyph()

const SkGlyph * SkBulkGlyphMetricsAndPaths::glyph ( SkGlyphID  glyphID)

Definition at line 210 of file SkStrikeSpec.cpp.

210 {
211 return this->glyphs(SkSpan<const SkGlyphID>{&glyphID, 1})[0];
212}
SkSpan< const SkGlyph * > glyphs(SkSpan< const SkGlyphID > glyphIDs)

◆ glyphs()

SkSpan< const SkGlyph * > SkBulkGlyphMetricsAndPaths::glyphs ( SkSpan< const SkGlyphID glyphIDs)

Definition at line 205 of file SkStrikeSpec.cpp.

205 {
206 fGlyphs.reset(glyphIDs.size());
207 return fStrike->preparePaths(glyphIDs, fGlyphs.get());
208}
constexpr size_t size() const
Definition: SkSpan_impl.h:95
SkSpan< const SkGlyph * > preparePaths(SkSpan< const SkGlyphID > glyphIDs, const SkGlyph *results[]) SK_EXCLUDES(fStrikeLock)
Definition: SkStrike.cpp:224
void reset(int count)
Definition: SkTemplates.h:195

The documentation for this class was generated from the following files: