Flutter Engine
The Flutter Engine
Classes | Public Member Functions | Friends | List of all members
sktext::gpu::TextStrike Class Reference

#include <StrikeCache.h>

Inheritance diagram for sktext::gpu::TextStrike:
SkNVRefCnt< TextStrike >

Public Member Functions

 TextStrike (const SkStrikeSpec &strikeSpec)
 
GlyphgetGlyph (SkPackedGlyphID)
 
const SkStrikeSpecstrikeSpec () const
 
- Public Member Functions inherited from SkNVRefCnt< TextStrike >
 SkNVRefCnt ()
 
 ~SkNVRefCnt ()
 
bool unique () const
 
void ref () const
 
void unref () const
 
void deref () const
 
bool refCntGreaterThan (int32_t threadIsolatedTestCnt) const
 

Friends

class StrikeCache
 

Detailed Description

Definition at line 29 of file StrikeCache.h.

Constructor & Destructor Documentation

◆ TextStrike()

sktext::gpu::TextStrike::TextStrike ( const SkStrikeSpec strikeSpec)

Definition at line 55 of file StrikeCache.cpp.

55: fStrikeSpec{strikeSpec} {}
const SkStrikeSpec & strikeSpec() const
Definition: StrikeCache.h:34

Member Function Documentation

◆ getGlyph()

Glyph * sktext::gpu::TextStrike::getGlyph ( SkPackedGlyphID  packedGlyphID)

Definition at line 57 of file StrikeCache.cpp.

57 {
58 Glyph* glyph = fCache.findOrNull(packedGlyphID);
59 if (glyph == nullptr) {
60 glyph = fAlloc.make<Glyph>(packedGlyphID);
61 fCache.set(glyph);
62 }
63 return glyph;
64}
auto make(Ctor &&ctor) -> decltype(ctor(nullptr))
Definition: SkArenaAlloc.h:120

◆ strikeSpec()

const SkStrikeSpec & sktext::gpu::TextStrike::strikeSpec ( ) const
inline

Definition at line 34 of file StrikeCache.h.

34{ return fStrikeSpec; }

Friends And Related Function Documentation

◆ StrikeCache

friend class StrikeCache
friend

Definition at line 50 of file StrikeCache.h.


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