53 std::optional<SkStrikePromise> promise =
55 if (!
buffer.validate(promise.has_value())) {
59 int32_t glyphCount =
buffer.read32();
61 if (!
buffer.validate(glyphCount > 0)) {
66 static constexpr int kMaxCount = (
int)(INT_MAX /
sizeof(uint32_t));
67 if (!
buffer.validate(glyphCount <= kMaxCount)) {
73 if (!
buffer.validate(glyphCount *
sizeof(uint32_t) <=
buffer.available())) {
78 for (
int i = 0; i < glyphCount; i++) {
static std::optional< SkStrikePromise > MakeFromBuffer(SkReadBuffer &buffer, const SkStrikeClient *client, SkStrikeCache *strikeCache)
void flatten(SkWriteBuffer &buffer) const
GlyphVector(SkStrikePromise &&strikePromise, SkSpan< Variant > glyphs)
static GlyphVector Make(SkStrikePromise &&promise, SkSpan< const SkPackedGlyphID > glyphs, SubRunAllocator *alloc)
void flatten(SkWriteBuffer &buffer) const
SkSpan< const Glyph * > glyphs() const
void packedGlyphIDToGlyph(StrikeCache *cache)
static std::optional< GlyphVector > MakeFromBuffer(SkReadBuffer &buffer, const SkStrikeClient *strikeClient, SubRunAllocator *alloc)
static const uint8_t buffer[]
SkPackedGlyphID packedGlyphID