• Home
  • Raw
  • Download

Lines Matching refs:run

140         auto& run = fOwner->run(runIndex);  in TextLine()  local
141 runLevels[runLevelsIndex++] = run.fBidiLevel; in TextLine()
143 …InternalLineMetrics(run.fFontMetrics.fAscent, run.fFontMetrics.fDescent, run.fFontMetrics.fLeading… in TextLine()
158 if (!cluster->run().isPlaceholder()) { in TextLine()
174 … (const Run* run, SkScalar runOffsetInLine, TextRange textRange, SkScalar* runWidthInLine) { in paint() argument
176 run, runOffsetInLine, textRange, StyleType::kBackground, in paint()
187 … (const Run* run, SkScalar runOffsetInLine, TextRange textRange, SkScalar* runWidthInLine) { in paint() argument
189 run, runOffsetInLine, textRange, StyleType::kShadow, in paint()
210 … (const Run* run, SkScalar runOffsetInLine, TextRange textRange, SkScalar* runWidthInLine) { in paint() argument
212 run, runOffsetInLine, textRange, StyleType::kDecorations, in paint()
229 … (const Run* run, SkScalar runOffsetInLine, TextRange textRange, SkScalar* runWidthInLine) { in ensureTextBlobCachePopulated() argument
230 if (run->placeholderStyle() != nullptr) { in ensureTextBlobCachePopulated()
231 *runWidthInLine = run->advance().fX; in ensureTextBlobCachePopulated()
235 run, runOffsetInLine, textRange, StyleType::kForeground, in ensureTextBlobCachePopulated()
271 …[this, visitor, styleType](const Run* run, SkScalar runOffset, TextRange textRange, SkScalar* widt… in scanStyles() argument
273 run, runOffset, textRange, styleType, in scanStyles()
295 [&result](const Run* run, SkScalar runOffset, TextRange textRange, SkScalar* width) { in metricsWithoutMultiplier() argument
296 InternalLineMetrics runMetrics(run->ascent(), run->descent(), run->leading()); in metricsWithoutMultiplier()
315 if (context.run->placeholderStyle() != nullptr) { in buildTextBlob()
327 record.fVisitor_Run = context.run; in buildTextBlob()
332 context.run->copyTo(builder, SkToU32(context.pos), context.size); in buildTextBlob()
340 SkASSERT(nearlyEqual(context.run->baselineShift(), style.getBaselineShift())); in buildTextBlob()
385 context.run->copyTo(builder, context.pos, context.size); in paintShadow()
457 if (cluster->run().leftToRight()) { in justify()
486 auto& run = cluster->run(); in shiftCluster() local
490 if (end == run.size()) { in shiftCluster()
495 if (run.fJustificationShifts.empty()) { in shiftCluster()
497 run.fJustificationShifts.push_back_n(run.size() + 1, { 0, 0 }); in shiftCluster()
501 run.fJustificationShifts[pos] = { shift, prevShift }; in shiftCluster()
513 std::unique_ptr<Run> run = shapeEllipsis(ellipsis, cluster->run()); in createEllipsis() local
514 run->fClusterStart = cluster->textRange().start; in createEllipsis()
515 run->setOwner(fOwner); in createEllipsis()
518 if (width + run->advance().fX > maxWidth) { in createEllipsis()
524 fEllipsis = std::move(run); in createEllipsis()
541 std::unique_ptr<Run> TextLine::shapeEllipsis(const SkString& ellipsis, const Run& run) { in shapeEllipsis() argument
547 Run* run() & { return fRun.get(); } in shapeEllipsis() function in skia::textlayout::TextLine::shapeEllipsis::ShapeHandler
548 std::unique_ptr<Run> run() && { return std::move(fRun); } in shapeEllipsis() function in skia::textlayout::TextLine::shapeEllipsis::ShapeHandler
579 … ShapeHandler handler(run.heightMultiplier(), run.useHalfLeading(), run.baselineShift(), ellipsis); in shapeEllipsis()
582 shaper->shape(ellipsis.c_str(), ellipsis.size(), run.font(), true, in shapeEllipsis()
584 handler.run()->fTextRange = TextRange(0, ellipsis.size()); in shapeEllipsis()
585 handler.run()->fOwner = fOwner; in shapeEllipsis()
586 return std::move(handler).run(); in shapeEllipsis()
590 const Run* run, in measureTextInsideOneRun() argument
595 ClipContext result = { run, 0, run->size(), 0, SkRect::MakeEmpty(), 0, false }; in measureTextInsideOneRun()
597 if (run->fEllipsis) { in measureTextInsideOneRun()
599 SkASSERT(textRange == run->textRange()); in measureTextInsideOneRun()
602 sizes().runTop(run, this->fAscentStyle), in measureTextInsideOneRun()
603 run->advance().fX, in measureTextInsideOneRun()
604run->calculateHeight(this->fAscentStyle,this->fDescentStyle)); in measureTextInsideOneRun()
606 } else if (run->isPlaceholder()) { in measureTextInsideOneRun()
608 if (SkScalarIsFinite(run->fFontMetrics.fAscent)) { in measureTextInsideOneRun()
610 sizes().runTop(run, this->fAscentStyle), in measureTextInsideOneRun()
611 run->advance().fX, in measureTextInsideOneRun()
612run->calculateHeight(this->fAscentStyle,this->fDescentStyle)); in measureTextInsideOneRun()
614 … result.clip = SkRect::MakeXYWH(runOffsetInLine, run->fFontMetrics.fAscent, run->advance().fX, 0); in measureTextInsideOneRun()
625 std::tie(found, startIndex, endIndex) = run->findLimitingClusters(textRange); in measureTextInsideOneRun()
637 if (run->leftToRight()) { in measureTextInsideOneRun()
649 std::tie(found, startIndex, endIndex) = run->findLimitingGraphemes(textRange); in measureTextInsideOneRun()
665 auto textStartInRun = run->positionX(start->startPos()); in measureTextInsideOneRun()
683 sizes().runTop(run, this->fAscentStyle), in measureTextInsideOneRun()
684 run->calculateWidth(result.pos, result.pos + result.size, false), in measureTextInsideOneRun()
685 run->calculateHeight(this->fAscentStyle,this->fDescentStyle)); in measureTextInsideOneRun()
704 if (run->leftToRight()) { in measureTextInsideOneRun()
732 auto run = this->fOwner->run(r); in iterateThroughClustersInGlyphsOrder() local
733 auto trimmedRange = fClusterRange.intersection(run.clusterRange()); in iterateThroughClustersInGlyphsOrder()
734 auto trailedRange = fGhostClusterRange.intersection(run.clusterRange()); in iterateThroughClustersInGlyphsOrder()
739 directional_for_each(trailed, reversed != run.leftToRight(), [&](Cluster& cluster) { in iterateThroughClustersInGlyphsOrder()
753 SkScalar TextLine::iterateThroughSingleRunByStyles(const Run* run, in iterateThroughSingleRunByStyles() argument
759 if (run->fEllipsis) { in iterateThroughSingleRunByStyles()
761 ClipContext clipContext = this->measureTextInsideOneRun(run->textRange(), run, runOffset, in iterateThroughSingleRunByStyles()
763 TextRange testRange(run->fClusterStart, run->fClusterStart + 1); in iterateThroughSingleRunByStyles()
769 return run->advance().fX; in iterateThroughSingleRunByStyles()
776 ClipContext clipContext = this->measureTextInsideOneRun(textRange, run, runOffset, in iterateThroughSingleRunByStyles()
798 (run->leftToRight() ? fBlockRange.start + index : fBlockRange.end - index - 1); in iterateThroughSingleRunByStyles()
837 ClipContext clipContext = this->measureTextInsideOneRun(runStyleTextRange, run, runOffset, in iterateThroughSingleRunByStyles()
862 const auto run = &this->fOwner->run(runIndex); in iterateThroughVisualRuns() local
863 auto lineIntersection = intersected(run->textRange(), textRange); in iterateThroughVisualRuns()
868 if (!run->leftToRight() && runOffset == 0 && includingGhostSpaces) { in iterateThroughVisualRuns()
873 … TextRange(fTextExcludingSpaces.end, fTextIncludingNewlines.end), run->fTextRange); in iterateThroughVisualRuns()
875 …auto whitespacesLen = measureTextInsideOneRun(whitespaces, run, runOffset, 0, true, false).clip.wi… in iterateThroughVisualRuns()
881 if (!visitor(run, runOffset, lineIntersection, &width)) { in iterateThroughVisualRuns()
930 (const Run* run, SkScalar runOffsetInLine, TextRange textRange, SkScalar* runWidthInLine) { in getMetrics() argument
931 if (run->placeholderStyle() != nullptr) { in getMetrics()
932 *runWidthInLine = run->advance().fX; in getMetrics()
936 run, runOffsetInLine, textRange, StyleType::kForeground, in getMetrics()
937 [&result, &run](TextRange textRange, const TextStyle& style, const ClipContext& context) { in getMetrics()
939 run->fFont.getMetrics(&fontMetrics); in getMetrics()
974 (const Run* run, SkScalar runOffsetInLine, TextRange textRange, SkScalar* runWidthInLine) { in getRectsForRange() argument
976 run, runOffsetInLine, textRange, StyleType::kNone, in getRectsForRange()
977 …[run, runOffsetInLine, textRange0, rectHeightStyle, rectWidthStyle, &boxes, &lastRun, startBox, th… in getRectsForRange()
988 … auto context = this->measureTextInsideOneRun(intersect, run, runOffsetInLine, 0, true, true); in getRectsForRange()
1001 … auto verticalShift = this->sizes().runTop(context.run, LineMetricStyle::Typographic); in getRectsForRange()
1007 … auto verticalShift = this->sizes().runTop(context.run, LineMetricStyle::Typographic); in getRectsForRange()
1013 … auto verticalShift = this->sizes().runTop(context.run, LineMetricStyle::Typographic); in getRectsForRange()
1032 if (run->fHeightMultiplier <= 0) { in getRectsForRange()
1036 clip.fTop = effectiveBaseline + run->ascent(); in getRectsForRange()
1037 clip.fBottom = effectiveBaseline + run->descent(); in getRectsForRange()
1059 if(run->leftToRight()) { in getRectsForRange()
1067 !run->leftToRight()) in getRectsForRange()
1075 run->leftToRight()) in getRectsForRange()
1096 context.run->placeholderStyle() == nullptr && in getRectsForRange()
1098 context.run->heightMultiplier()) && in getRectsForRange()
1099 lastRun->font() == context.run->font()) in getRectsForRange()
1112 lastRun = context.run; in getRectsForRange()
1117 boxes.emplace_back(clip, context.run->getTextDirection()); in getRectsForRange()
1167 (const Run* run, SkScalar runOffsetInLine, TextRange textRange, SkScalar* runWidthInLine) { in getGlyphPositionAtCoordinate() argument
1170 run, runOffsetInLine, textRange, StyleType::kNone, in getGlyphPositionAtCoordinate()
1171 [this, run, dx, &result, &keepLooking] in getGlyphPositionAtCoordinate()
1178 if (run->leftToRight()) { in getGlyphPositionAtCoordinate()
1190 … auto utf16Index = fOwner->getUTF16Index(context.run->globalClusterIndex(context.pos)); in getGlyphPositionAtCoordinate()
1191 if (run->leftToRight()) { in getGlyphPositionAtCoordinate()
1197 return keepLooking = !run->leftToRight(); in getGlyphPositionAtCoordinate()
1202 …auto utf16Index = fOwner->getUTF16Index(context.run->globalClusterIndex(context.pos + context.size… in getGlyphPositionAtCoordinate()
1203 if (run->leftToRight()) { in getGlyphPositionAtCoordinate()
1209 return keepLooking = run->leftToRight(); in getGlyphPositionAtCoordinate()
1218 … auto end = littleRound(context.run->positionX(index) + context.fTextShift + offsetX); in getGlyphPositionAtCoordinate()
1221 } else if (end == dx && !context.run->leftToRight()) { in getGlyphPositionAtCoordinate()
1228 … SkScalar glyphemePosLeft = context.run->positionX(found) + context.fTextShift + offsetX; in getGlyphPositionAtCoordinate()
1229 … SkScalar glyphemePosWidth = context.run->positionX(found + 1) - context.run->positionX(found); in getGlyphPositionAtCoordinate()
1232 auto clusterIndex8 = context.run->globalClusterIndex(found); in getGlyphPositionAtCoordinate()
1233 auto clusterEnd8 = context.run->globalClusterIndex(found + 1); in getGlyphPositionAtCoordinate()
1236 if ((dx < center) == context.run->leftToRight()) { in getGlyphPositionAtCoordinate()
1256 [&boxes, this](const Run* run, SkScalar runOffset, TextRange textRange, in getRectsForPlaceholders()
1258 auto context = this->measureTextInsideOneRun(textRange, run, runOffset, 0, true, false); in getRectsForPlaceholders()
1264 if (!run->isPlaceholder()) { in getRectsForPlaceholders()
1275 boxes.emplace_back(clip, run->getTextDirection()); in getRectsForPlaceholders()