Lines Matching refs:run
156 static const RunRecord* Next(const RunRecord* run) { in Next() argument
157 return reinterpret_cast<const RunRecord*>(reinterpret_cast<const uint8_t*>(run) in Next()
158 + StorageSize(run->glyphCount(), run->positioning())); in Next()
208 const RunRecord* run = RunRecord::First(this); in ~SkTextBlob() local
210 const RunRecord* nextRun = RunRecord::Next(run); in ~SkTextBlob()
211 SkDEBUGCODE(run->validate((uint8_t*)this + fStorageSize);) in ~SkTextBlob()
212 run->~RunRecord(); in ~SkTextBlob()
213 run = nextRun; in ~SkTextBlob()
370 SkRect SkTextBlobBuilder::TightRunBounds(const SkTextBlob::RunRecord& run) { in TightRunBounds() argument
371 SkASSERT(SkTextBlob::kDefault_Positioning == run.positioning()); in TightRunBounds()
375 run.font().applyToPaint(&paint); in TightRunBounds()
376 paint.measureText(run.glyphBuffer(), run.glyphCount() * sizeof(uint16_t), &bounds); in TightRunBounds()
378 return bounds.makeOffset(run.offset().x(), run.offset().y()); in TightRunBounds()
381 SkRect SkTextBlobBuilder::ConservativeRunBounds(const SkTextBlob::RunRecord& run) { in ConservativeRunBounds() argument
382 SkASSERT(run.glyphCount() > 0); in ConservativeRunBounds()
383 SkASSERT(SkTextBlob::kFull_Positioning == run.positioning() || in ConservativeRunBounds()
384 SkTextBlob::kHorizontal_Positioning == run.positioning()); in ConservativeRunBounds()
388 switch (run.positioning()) { in ConservativeRunBounds()
390 const SkScalar* glyphPos = run.posBuffer(); in ConservativeRunBounds()
391 SkASSERT((void*)(glyphPos + run.glyphCount()) <= SkTextBlob::RunRecord::Next(&run)); in ConservativeRunBounds()
395 for (unsigned i = 1; i < run.glyphCount(); ++i) { in ConservativeRunBounds()
404 const SkPoint* glyphPosPts = reinterpret_cast<const SkPoint*>(run.posBuffer()); in ConservativeRunBounds()
405 SkASSERT((void*)(glyphPosPts + run.glyphCount()) <= SkTextBlob::RunRecord::Next(&run)); in ConservativeRunBounds()
407 bounds.setBounds(glyphPosPts, run.glyphCount()); in ConservativeRunBounds()
415 run.font().applyToPaint(&paint); in ConservativeRunBounds()
423 return bounds.makeOffset(run.offset().x(), run.offset().y()); in ConservativeRunBounds()
434 SkTextBlob::RunRecord* run = reinterpret_cast<SkTextBlob::RunRecord*>(fStorage.get() + in updateDeferredBounds() local
438 SkRect runBounds = SkTextBlob::kDefault_Positioning == run->positioning() ? in updateDeferredBounds()
439 TightRunBounds(*run) : ConservativeRunBounds(*run); in updateDeferredBounds()
472 SkTextBlob::RunRecord* run = reinterpret_cast<SkTextBlob::RunRecord*>(fStorage.get() + in mergeRun() local
474 SkASSERT(run->glyphCount() > 0); in mergeRun()
476 if (run->positioning() != positioning in mergeRun()
477 || run->font() != font in mergeRun()
478 || (run->glyphCount() + count < run->glyphCount())) { in mergeRun()
488 || run->offset().y() != offset.y())) { in mergeRun()
492 size_t sizeDelta = SkTextBlob::RunRecord::StorageSize(run->glyphCount() + count, positioning) - in mergeRun()
493 SkTextBlob::RunRecord::StorageSize(run->glyphCount(), positioning); in mergeRun()
497 run = reinterpret_cast<SkTextBlob::RunRecord*>(fStorage.get() + fLastRun); in mergeRun()
498 uint32_t preMergeCount = run->glyphCount(); in mergeRun()
499 run->grow(count); in mergeRun()
502 fCurrentRunBuffer.glyphs = run->glyphBuffer() + preMergeCount; in mergeRun()
503 fCurrentRunBuffer.pos = run->posBuffer() in mergeRun()
509 run->validate(fStorage.get() + fStorageUsed); in mergeRun()
529 SkTextBlob::RunRecord* run = new (fStorage.get() + fStorageUsed) in allocInternal() local
532 fCurrentRunBuffer.glyphs = run->glyphBuffer(); in allocInternal()
533 fCurrentRunBuffer.pos = run->posBuffer(); in allocInternal()
540 run->validate(fStorage.get() + fStorageUsed); in allocInternal()
589 const SkTextBlob::RunRecord* run = in build()
592 validateSize += SkTextBlob::RunRecord::StorageSize(run->fCount, run->fPositioning); in build()
593 run->validate(fStorage.get() + fStorageUsed); in build()
594 run = SkTextBlob::RunRecord::Next(run); in build()