• Home
  • Raw
  • Download

Lines Matching refs:run

71 const SkTextBlob::RunRecord* SkTextBlob::RunRecord::Next(const RunRecord* run) {  in Next()  argument
72 return SkToBool(run->fFlags & kLast_Flag) ? nullptr : NextUnchecked(run); in Next()
102 const SkTextBlob::RunRecord* SkTextBlob::RunRecord::NextUnchecked(const RunRecord* run) { in NextUnchecked() argument
105 reinterpret_cast<const uint8_t*>(run) in NextUnchecked()
106 + StorageSize(run->glyphCount(), run->textSize(), run->positioning(), &safe)); in NextUnchecked()
160 const auto* run = RunRecord::First(this); in ~SkTextBlob() local
162 const auto* nextRun = RunRecord::Next(run); in ~SkTextBlob()
163 SkDEBUGCODE(run->validate((uint8_t*)this + fStorageSize);) in ~SkTextBlob()
164 run->~RunRecord(); in ~SkTextBlob()
165 run = nextRun; in ~SkTextBlob()
166 } while (run); in ~SkTextBlob()
282 SkRect SkTextBlobBuilder::TightRunBounds(const SkTextBlob::RunRecord& run) { in TightRunBounds() argument
283 const SkFont& font = run.font(); in TightRunBounds()
286 if (SkTextBlob::kDefault_Positioning == run.positioning()) { in TightRunBounds()
287 font.measureText(run.glyphBuffer(), run.glyphCount() * sizeof(uint16_t), in TightRunBounds()
289 return bounds.makeOffset(run.offset().x(), run.offset().y()); in TightRunBounds()
292 SkAutoSTArray<16, SkRect> glyphBounds(run.glyphCount()); in TightRunBounds()
293 font.getBounds(run.glyphBuffer(), run.glyphCount(), glyphBounds.get(), nullptr); in TightRunBounds()
295 if (SkTextBlob::kRSXform_Positioning == run.positioning()) { in TightRunBounds()
297 const SkRSXform* xform = run.xformBuffer(); in TightRunBounds()
298 SkASSERT((void*)(xform + run.glyphCount()) <= SkTextBlob::RunRecord::Next(&run)); in TightRunBounds()
299 for (unsigned i = 0; i < run.glyphCount(); ++i) { in TightRunBounds()
303 SkASSERT(SkTextBlob::kFull_Positioning == run.positioning() || in TightRunBounds()
304 SkTextBlob::kHorizontal_Positioning == run.positioning()); in TightRunBounds()
309 const SkScalar* glyphPosX = run.posBuffer(); in TightRunBounds()
310 const SkScalar* glyphPosY = (run.positioning() == SkTextBlob::kFull_Positioning) ? in TightRunBounds()
312 const unsigned posXInc = SkTextBlob::ScalarsPerGlyph(run.positioning()); in TightRunBounds()
313 const unsigned posYInc = (run.positioning() == SkTextBlob::kFull_Positioning) ? in TightRunBounds()
317 for (unsigned i = 0; i < run.glyphCount(); ++i) { in TightRunBounds()
323 SkASSERT((void*)glyphPosX <= SkTextBlob::RunRecord::Next(&run)); in TightRunBounds()
325 return bounds.makeOffset(run.offset().x(), run.offset().y()); in TightRunBounds()
328 SkRect SkTextBlobBuilder::ConservativeRunBounds(const SkTextBlob::RunRecord& run) { in ConservativeRunBounds() argument
329 SkASSERT(run.glyphCount() > 0); in ConservativeRunBounds()
330 SkASSERT(SkTextBlob::kFull_Positioning == run.positioning() || in ConservativeRunBounds()
331 SkTextBlob::kHorizontal_Positioning == run.positioning() || in ConservativeRunBounds()
332 SkTextBlob::kRSXform_Positioning == run.positioning()); in ConservativeRunBounds()
334 const SkRect fontBounds = SkFontPriv::GetFontBounds(run.font()); in ConservativeRunBounds()
338 return TightRunBounds(run); in ConservativeRunBounds()
343 switch (run.positioning()) { in ConservativeRunBounds()
345 const SkScalar* glyphPos = run.posBuffer(); in ConservativeRunBounds()
346 SkASSERT((void*)(glyphPos + run.glyphCount()) <= SkTextBlob::RunRecord::Next(&run)); in ConservativeRunBounds()
350 for (unsigned i = 1; i < run.glyphCount(); ++i) { in ConservativeRunBounds()
359 const SkPoint* glyphPosPts = run.pointBuffer(); in ConservativeRunBounds()
360 SkASSERT((void*)(glyphPosPts + run.glyphCount()) <= SkTextBlob::RunRecord::Next(&run)); in ConservativeRunBounds()
362 bounds.setBounds(glyphPosPts, run.glyphCount()); in ConservativeRunBounds()
365 const SkRSXform* xform = run.xformBuffer(); in ConservativeRunBounds()
366 SkASSERT((void*)(xform + run.glyphCount()) <= SkTextBlob::RunRecord::Next(&run)); in ConservativeRunBounds()
368 for (unsigned i = 0; i < run.glyphCount(); ++i) { in ConservativeRunBounds()
376 if (run.positioning() != SkTextBlob::kRSXform_Positioning) { in ConservativeRunBounds()
385 return bounds.makeOffset(run.offset().x(), run.offset().y()); in ConservativeRunBounds()
396 SkTextBlob::RunRecord* run = reinterpret_cast<SkTextBlob::RunRecord*>(fStorage.get() + in updateDeferredBounds() local
400 SkRect runBounds = SkTextBlob::kDefault_Positioning == run->positioning() ? in updateDeferredBounds()
401 TightRunBounds(*run) : ConservativeRunBounds(*run); in updateDeferredBounds()
439 SkTextBlob::RunRecord* run = reinterpret_cast<SkTextBlob::RunRecord*>(fStorage.get() + in mergeRun() local
441 SkASSERT(run->glyphCount() > 0); in mergeRun()
443 if (run->textSize() != 0) { in mergeRun()
447 if (run->positioning() != positioning in mergeRun()
448 || run->font() != font in mergeRun()
449 || (run->glyphCount() + count < run->glyphCount())) { in mergeRun()
459 || run->offset().y() != offset.y())) { in mergeRun()
465 SkTextBlob::RunRecord::StorageSize(run->glyphCount() + count, 0, positioning, &safe) - in mergeRun()
466 SkTextBlob::RunRecord::StorageSize(run->glyphCount() , 0, positioning, &safe); in mergeRun()
474 run = reinterpret_cast<SkTextBlob::RunRecord*>(fStorage.get() + fLastRun); in mergeRun()
475 uint32_t preMergeCount = run->glyphCount(); in mergeRun()
476 run->grow(count); in mergeRun()
479 fCurrentRunBuffer.glyphs = run->glyphBuffer() + preMergeCount; in mergeRun()
480 fCurrentRunBuffer.pos = run->posBuffer() in mergeRun()
486 run->validate(fStorage.get() + fStorageUsed); in mergeRun()
515 SkTextBlob::RunRecord* run = new (fStorage.get() + fStorageUsed) in allocInternal() local
517 fCurrentRunBuffer.glyphs = run->glyphBuffer(); in allocInternal()
518 fCurrentRunBuffer.pos = run->posBuffer(); in allocInternal()
519 fCurrentRunBuffer.utf8text = run->textBuffer(); in allocInternal()
520 fCurrentRunBuffer.clusters = run->clusterBuffer(); in allocInternal()
527 run->validate(fStorage.get() + fStorageUsed); in allocInternal()
643 for (const auto* run = SkTextBlob::RunRecord::First(blob); run; in make()
644 run = SkTextBlob::RunRecord::Next(run)) { in make()
646 run->fCount, run->textSize(), run->positioning(), &safe); in make()
647 run->validate(reinterpret_cast<const uint8_t*>(blob) + fStorageUsed); in make()
987 const SkGlyphRun run(*this, in getIntercepts() local
994 intervalCount = get_glyph_run_intercepts(run, paint, bounds, result.data(), &intervalCount); in getIntercepts()