// SK_DEFAULT_GPU_FONT_CACHE_COUNT_LIMIT and SK_DEFAULT_GPU_FONT_CACHE_LIMIT can be set using -D // on your ompiler commandline, or by using the defines in SkUserConfig.h #ifndef SK_DEFAULT_GPU_FONT_CACHE_COUNT_LIMIT #define SK_DEFAULT_GPU_FONT_CACHE_COUNT_LIMIT 2048 #endif
// The TextStrike manages an SkArenaAlloc for Glyphs. The SkStrike is what actually creates // the mask. The TextStrike may outlive the generating SkStrike. However, it retains a copy // of it's SkDescriptor as a key to access (or regenerate) the SkStrike. TextStrikes are // created by and owned by a StrikeCache. class TextStrike : public SkNVRefCnt<TextStrike> { public:
TextStrike(StrikeCache* strikeCache, const SkStrikeSpec& strikeSpec);
// StrikeCache manages strikes which are indexed by a SkStrike. These strikes can then be // used to generate individual Glyph Masks. class StrikeCache { public:
~StrikeCache();
// The user of the cache may hold a long-lived ref to the returned strike.
sk_sp<TextStrike> findOrCreateStrike(const SkStrikeSpec& strikeSpec);
// Checkout budgets, modulated by the specified min-bytes-needed-to-purge, // and attempt to purge caches to match. // Returns number of bytes freed.
size_t internalPurge(size_t minBytesNeeded = 0);
// A simple accounting of what each glyph cache reports and the strike cache total. void validate() const;
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.