• Home
  • Raw
  • Download

Lines Matching refs:SkTextBlob

39 size_t SkTextBlob::RunRecord::StorageSize(uint32_t glyphCount, uint32_t textSize,  in StorageSize()
40 SkTextBlob::GlyphPositioning positioning, in StorageSize()
48 auto size = sizeof(SkTextBlob::RunRecord); in StorageSize()
61 const SkTextBlob::RunRecord* SkTextBlob::RunRecord::First(const SkTextBlob* blob) { in First()
67 const SkTextBlob::RunRecord* SkTextBlob::RunRecord::Next(const RunRecord* run) { in Next()
81 void SkTextBlob::RunRecord::validate(const uint8_t* storageTop) const { in validate()
94 static_assert(sizeof(SkTextBlob::RunRecord) == sizeof(RunRecordStorageEquivalent), in validate()
98 const SkTextBlob::RunRecord* SkTextBlob::RunRecord::NextUnchecked(const RunRecord* run) { in NextUnchecked()
107 size_t SkTextBlob::RunRecord::PosCount(uint32_t glyphCount, in PosCount()
108 SkTextBlob::GlyphPositioning positioning, in PosCount()
113 uint32_t* SkTextBlob::RunRecord::textSizePtr() const { in textSizePtr()
122 void SkTextBlob::RunRecord::grow(uint32_t count) { in grow()
144 SkTextBlob::SkTextBlob(const SkRect& bounds) in SkTextBlob() function in SkTextBlob
149 SkTextBlob::~SkTextBlob() { in ~SkTextBlob()
180 enum SkTextBlob::GlyphPositioning : uint8_t {
187 unsigned SkTextBlob::ScalarsPerGlyph(GlyphPositioning pos) { in ScalarsPerGlyph()
198 void SkTextBlob::operator delete(void* p) { in operator delete()
202 void* SkTextBlob::operator new(size_t) { in operator new()
206 void* SkTextBlob::operator new(size_t, void* p) { in operator new()
210 SkTextBlobRunIterator::SkTextBlobRunIterator(const SkTextBlob* blob) in SkTextBlobRunIterator()
211 : fCurrentRun(SkTextBlob::RunRecord::First(blob)) { in SkTextBlobRunIterator()
220 fCurrentRun = SkTextBlob::RunRecord::Next(fCurrentRun); in next()
226 static_assert(static_cast<GlyphPositioning>(SkTextBlob::kDefault_Positioning) == in positioning()
228 static_assert(static_cast<GlyphPositioning>(SkTextBlob::kHorizontal_Positioning) == in positioning()
230 static_assert(static_cast<GlyphPositioning>(SkTextBlob::kFull_Positioning) == in positioning()
232 static_assert(static_cast<GlyphPositioning>(SkTextBlob::kRSXform_Positioning) == in positioning()
239 return SkTextBlob::ScalarsPerGlyph(fCurrentRun->positioning()); in scalarsPerGlyph()
267 SkRect SkTextBlobBuilder::TightRunBounds(const SkTextBlob::RunRecord& run) { in TightRunBounds()
271 if (SkTextBlob::kDefault_Positioning == run.positioning()) { in TightRunBounds()
280 if (SkTextBlob::kRSXform_Positioning == run.positioning()) { in TightRunBounds()
283 SkASSERT((void*)(xform + run.glyphCount()) <= SkTextBlob::RunRecord::Next(&run)); in TightRunBounds()
288 SkASSERT(SkTextBlob::kFull_Positioning == run.positioning() || in TightRunBounds()
289 SkTextBlob::kHorizontal_Positioning == run.positioning()); in TightRunBounds()
295 const SkScalar* glyphPosY = (run.positioning() == SkTextBlob::kFull_Positioning) ? in TightRunBounds()
297 const unsigned posXInc = SkTextBlob::ScalarsPerGlyph(run.positioning()); in TightRunBounds()
298 const unsigned posYInc = (run.positioning() == SkTextBlob::kFull_Positioning) ? in TightRunBounds()
308 SkASSERT((void*)glyphPosX <= SkTextBlob::RunRecord::Next(&run)); in TightRunBounds()
313 SkRect SkTextBlobBuilder::ConservativeRunBounds(const SkTextBlob::RunRecord& run) { in ConservativeRunBounds()
315 SkASSERT(SkTextBlob::kFull_Positioning == run.positioning() || in ConservativeRunBounds()
316 SkTextBlob::kHorizontal_Positioning == run.positioning() || in ConservativeRunBounds()
317 SkTextBlob::kRSXform_Positioning == run.positioning()); in ConservativeRunBounds()
329 case SkTextBlob::kHorizontal_Positioning: { in ConservativeRunBounds()
331 SkASSERT((void*)(glyphPos + run.glyphCount()) <= SkTextBlob::RunRecord::Next(&run)); in ConservativeRunBounds()
343 case SkTextBlob::kFull_Positioning: { in ConservativeRunBounds()
345 SkASSERT((void*)(glyphPosPts + run.glyphCount()) <= SkTextBlob::RunRecord::Next(&run)); in ConservativeRunBounds()
349 case SkTextBlob::kRSXform_Positioning: { in ConservativeRunBounds()
351 SkASSERT((void*)(xform + run.glyphCount()) <= SkTextBlob::RunRecord::Next(&run)); in ConservativeRunBounds()
361 if (run.positioning() != SkTextBlob::kRSXform_Positioning) { in ConservativeRunBounds()
380 SkASSERT(fLastRun >= SkAlignPtr(sizeof(SkTextBlob))); in updateDeferredBounds()
381 SkTextBlob::RunRecord* run = reinterpret_cast<SkTextBlob::RunRecord*>(fStorage.get() + in updateDeferredBounds()
385 SkRect runBounds = SkTextBlob::kDefault_Positioning == run->positioning() ? in updateDeferredBounds()
406 fStorageUsed = SkAlignPtr(sizeof(SkTextBlob)); in reserve()
416 bool SkTextBlobBuilder::mergeRun(const SkFont& font, SkTextBlob::GlyphPositioning positioning, in mergeRun()
423 SkASSERT(fLastRun >= SkAlignPtr(sizeof(SkTextBlob))); in mergeRun()
424 SkTextBlob::RunRecord* run = reinterpret_cast<SkTextBlob::RunRecord*>(fStorage.get() + in mergeRun()
442 if (SkTextBlob::kFull_Positioning != positioning in mergeRun()
443 && (SkTextBlob::kHorizontal_Positioning != positioning in mergeRun()
450 SkTextBlob::RunRecord::StorageSize(run->glyphCount() + count, 0, positioning, &safe) - in mergeRun()
451 SkTextBlob::RunRecord::StorageSize(run->glyphCount() , 0, positioning, &safe); in mergeRun()
459 run = reinterpret_cast<SkTextBlob::RunRecord*>(fStorage.get() + fLastRun); in mergeRun()
466 + preMergeCount * SkTextBlob::ScalarsPerGlyph(positioning); in mergeRun()
477 SkTextBlob::GlyphPositioning positioning, in allocInternal()
489 size_t runSize = SkTextBlob::RunRecord::StorageSize(count, textSize, positioning, &safe); in allocInternal()
497 SkASSERT(fStorageUsed >= SkAlignPtr(sizeof(SkTextBlob))); in allocInternal()
500 SkTextBlob::RunRecord* run = new (fStorage.get() + fStorageUsed) in allocInternal()
501 SkTextBlob::RunRecord(count, textSize, offset, font, positioning); in allocInternal()
530 this->allocInternal(font, SkTextBlob::kDefault_Positioning, count, 0, {x, y}, bounds); in allocRun()
537 this->allocInternal(font, SkTextBlob::kHorizontal_Positioning, count, 0, {0, y}, bounds); in allocRunPosH()
543 this->allocInternal(font, SkTextBlob::kFull_Positioning, count, 0, {0, 0}, bounds); in allocRunPos()
549 this->allocInternal(font, SkTextBlob::kRSXform_Positioning, count, 0, {0, 0}, nullptr); in allocRunRSXform()
558 SkTextBlob::kDefault_Positioning, in allocRunText()
572 SkTextBlob::kHorizontal_Positioning, in allocRunTextPosH()
585 SkTextBlob::kFull_Positioning, in allocRunTextPos()
597 SkTextBlob::kRSXform_Positioning, in allocRunTextRSXform()
605 sk_sp<SkTextBlob> SkTextBlobBuilder::make() { in make()
619 auto* lastRun = reinterpret_cast<SkTextBlob::RunRecord*>(fStorage.get() + fLastRun); in make()
620 lastRun->fFlags |= SkTextBlob::RunRecord::kLast_Flag; in make()
622 SkTextBlob* blob = new (fStorage.release()) SkTextBlob(fBounds); in make()
623 SkDEBUGCODE(const_cast<SkTextBlob*>(blob)->fStorageSize = fStorageSize;) in make()
627 size_t validateSize = SkAlignPtr(sizeof(SkTextBlob)); in make()
628 for (const auto* run = SkTextBlob::RunRecord::First(blob); run; in make()
629 run = SkTextBlob::RunRecord::Next(run)) { in make()
630 validateSize += SkTextBlob::RunRecord::StorageSize( in make()
646 return sk_sp<SkTextBlob>(blob); in make()
651 void SkTextBlobPriv::Flatten(const SkTextBlob& blob, SkWriteBuffer& buffer) { in Flatten()
679 SkTextBlob::ScalarsPerGlyph( in Flatten()
680 SkTo<SkTextBlob::GlyphPositioning>(it.positioning()))); in Flatten()
693 sk_sp<SkTextBlob> SkTextBlobPriv::MakeFromBuffer(SkReadBuffer& reader) { in MakeFromBuffer()
708 const auto pos = SkTo<SkTextBlob::GlyphPositioning>(pe.positioning); in MakeFromBuffer()
709 if (glyphCount <= 0 || pos > SkTextBlob::kRSXform_Positioning) { in MakeFromBuffer()
727 SkTextBlob::ScalarsPerGlyph(pos))), in MakeFromBuffer()
738 case SkTextBlob::kDefault_Positioning: in MakeFromBuffer()
742 case SkTextBlob::kHorizontal_Positioning: in MakeFromBuffer()
746 case SkTextBlob::kFull_Positioning: in MakeFromBuffer()
749 case SkTextBlob::kRSXform_Positioning: in MakeFromBuffer()
776 sk_sp<SkTextBlob> SkTextBlob::MakeFromText(const void* text, size_t byteLength, const SkFont& font, in MakeFromText()
791 sk_sp<SkTextBlob> SkTextBlob::MakeFromPosText(const void* text, size_t byteLength, in MakeFromPosText()
805 sk_sp<SkTextBlob> SkTextBlob::MakeFromPosTextH(const void* text, size_t byteLength, in MakeFromPosTextH()
819 sk_sp<SkTextBlob> SkTextBlob::MakeFromRSXform(const void* text, size_t byteLength, in MakeFromRSXform()
833 sk_sp<SkData> SkTextBlob::serialize(const SkSerialProcs& procs) const { in serialize()
844 sk_sp<SkTextBlob> SkTextBlob::Deserialize(const void* data, size_t length, in Deserialize()
853 size_t SkTextBlob::serialize(const SkSerialProcs& procs, void* memory, size_t memory_size) const { in serialize()
923 int SkTextBlob::getIntercepts(const SkScalar bounds[2], SkScalar intervals[], in getIntercepts()
949 SkTextBlob::Iter::Iter(const SkTextBlob& blob) { in Iter()
953 bool SkTextBlob::Iter::next(Run* rec) { in next()
975 bool SkTextBlob::Iter::experimentalNext(ExperimentalRun* rec) { in experimentalNext()