19 : fParagraph(paragraph)
21 , fUseHalfLeading(false)
22 , fBaselineShift(0.0f)
24 , fUnresolvedGlyphs(0)
25 , fUniqueRunId(paragraph->fRuns.size()){ }
42 RunBlock() : fRun(nullptr) { }
53 explicit RunBlock(std::shared_ptr<Run>
run)
55 , fText(fRun->fTextRange)
58 std::shared_ptr<Run> fRun;
61 bool isFullyResolved() {
return fRun !=
nullptr && fGlyphs.width() == fRun->size(); }
66 bool iterateThroughShapingRegions(
const ShapeVisitor&
shape);
68 using ShapeSingleFontVisitor =
70 void iterateThroughFontStyles(
80 void matchResolvedFonts(
const TextStyle& textStyle,
const TypefaceVisitor& visitor);
92 fCurrentRun = std::make_shared<Run>(fParagraph,
100 return fCurrentRun->newRunBuffer();
107 return fCurrentText.
start + fCurrentRun->fClusterIndexes[glyph];
109 void addFullyResolved();
110 void addUnresolvedWithRun(
GlyphRange glyphRange);
111 void sortOutGlyphs(std::function<
void(
GlyphRange)>&& sortOutUnresolvedBLock);
113 void fillGaps(
size_t);
115 ParagraphImpl* fParagraph;
118 bool fUseHalfLeading;
121 size_t fUnresolvedGlyphs;
125 std::shared_ptr<Run> fCurrentRun;
126 std::deque<RunBlock> fUnresolvedBlocks;
127 std::vector<RunBlock> fResolvedBlocks;
135 : fUnicode(unicode), fFontStyle(fontStyle), fLocale(
std::move(locale)) { }
static std::unique_ptr< SkEncoder > Make(SkWStream *dst, const SkPixmap *src, const SkYUVAPixmaps *srcYUVA, const SkColorSpace *srcYUVAColorSpace, const SkJpegEncoder::Options &options)
size_t unresolvedGlyphs()
void beginLine() override
void commitRunInfo() override
static SkUnichar getEmojiSequenceStart(SkUnicode *unicode, const char **begin, const char *end)
void runInfo(const RunInfo &) override
void commitRunBuffer(const RunInfo &) override
Buffer runBuffer(const RunInfo &info) override
void commitLine() override
OneLineShaper(ParagraphImpl *paragraph)
SkRange< size_t > ClusterRange
SkRange< size_t > TextRange
SkRange< GlyphIndex > GlyphRange
uint32_t operator()(const FontKey &key) const