• Home
  • Raw
  • Download

Lines Matching refs:Padding

78         template <size_t Align = 1, size_t Padding = 0>
79 int avail() const { return std::max(0, fSize - this->cursor<Align, Padding>()); } in avail()
85 template <size_t Align = 1, size_t Padding = 0>
86 int firstAlignedOffset() const { return this->alignedOffset<Align, Padding>(kDataStart); } in firstAlignedOffset()
138 template <size_t Align, size_t Padding>
139 int cursor() const { return this->alignedOffset<Align, Padding>(fCursor); } in cursor()
141 template <size_t Align, size_t Padding>
188 template<size_t Align = 1, size_t Padding = 0>
197 template<size_t Align = 1, size_t Padding = 0>
274 template <size_t Align, size_t Padding = 0>
301 template <size_t Align = 1, size_t Padding = 0>
325 template <size_t Align, size_t Padding = 0>
328 template <size_t Align, size_t Padding = 0>
330 return const_cast<GrBlockAllocator*>(this)->owningBlock<Align, Padding>(ptr, start); in owningBlock()
428 template<size_t Align, size_t Padding>
513 template<size_t Align, size_t Padding> in GR_MAKE_BITFIELD_OPS()
515 static_assert(GrAlignTo(kDataStart + Padding, Align) >= sizeof(Block)); in GR_MAKE_BITFIELD_OPS()
516 return GrAlignTo(kDataStart + Padding, Align); in GR_MAKE_BITFIELD_OPS()
519 template<size_t Align, size_t Padding>
524 offsetof(GrBlockAllocator, fHead) + BlockOverhead<Align, Padding>()); in Overhead()
527 template<size_t Align, size_t Padding>
532 return BlockOverhead<Align, Padding>() + kMaxAllocationSize; in MaxBlockSize()
535 template<size_t Align, size_t Padding>
542 this->currentBlock()->avail<Align, Padding>() < iSize) { in reserve()
544 int blockSize = BlockOverhead<Align, Padding>() + iSize; in reserve()
546 : MaxBlockSize<Align, Padding>(); in reserve()
547 SkASSERT((size_t) maxSize <= (MaxBlockSize<Align, Padding>())); in reserve()
558 template <size_t Align, size_t Padding>
561 static constexpr int kBlockOverhead = (int) BlockOverhead<Align, Padding>(); in allocate()
564 static_assert((kMaxAllocationSize + GrAlignTo(MaxBlockSize<Align, Padding>(), Align)) in allocate()
575 int offset = fTail->cursor<Align, Padding>(); in allocate()
578 this->addBlock(iSize + kBlockOverhead, MaxBlockSize<Align, Padding>()); in allocate()
579 offset = fTail->cursor<Align, Padding>(); in allocate()
586 SkASSERT(offset - fTail->fCursor >= (int) Padding && in allocate()
587 offset - fTail->fCursor <= (int) (Padding + Align - 1)); in allocate()
593 fTail->unpoisonRange(offset - Padding, end); in allocate()
598 template <size_t Align, size_t Padding>
609 (reinterpret_cast<uintptr_t>(p) - start - Padding) & ~(Align - 1)); in owningBlock()
619 template <size_t Align, size_t Padding>
623 static_assert(MaxBlockSize<Align, Padding>() + Padding + Align - 1 in alignedOffset()
628 return (offset + Padding + Align - 1) & ~(Align - 1); in alignedOffset()
633 uintptr_t alignedPtr = (blockPtr + offset + Padding + Align - 1) & ~(Align - 1); in alignedOffset()