Lines Matching refs:capacity
23 Memory::Memory(size_t capacity, std::shared_ptr<uint8_t> bufData, size_t align, MemoryType type) in Memory() argument
24 : memoryType(type), capacity(capacity), alignment(align), in Memory()
29 Memory::Memory(size_t capacity, std::shared_ptr<Allocator> allocator, size_t align, MemoryType type… in Memory() argument
30 : memoryType(type), capacity(capacity), alignment(align), offset(0), in Memory()
36 size_t allocSize = align ? (capacity + align - 1) : capacity; in Memory()
49 return capacity; in GetCapacity()
63 start = std::min(position, capacity); in Write()
65 size_t length = std::min(writeSize, capacity - start); in Write()
90 if (position > capacity) { in GetReadOnlyData()
98 if (position + estimatedWriteSize > capacity) { in GetWritableAddr()
108 if (position + realWriteSize > capacity) { in UpdateDataSize()
199 std::shared_ptr<Buffer> Buffer::CreateDefaultBuffer(BufferMetaType type, size_t capacity, in CreateDefaultBuffer() argument
203 … std::shared_ptr<Memory> memory = std::shared_ptr<Memory>(new Memory(capacity, allocator, align)); in CreateDefaultBuffer()
208 std::shared_ptr<Memory> Buffer::WrapMemory(uint8_t* data, size_t capacity, size_t size) in WrapMemory() argument
210 …auto memory = std::shared_ptr<Memory>(new Memory(capacity, std::shared_ptr<uint8_t>(data, [](void*… in WrapMemory()
216 std::shared_ptr<Memory> Buffer::WrapMemoryPtr(std::shared_ptr<uint8_t> data, size_t capacity, size_… in WrapMemoryPtr() argument
218 auto memory = std::shared_ptr<Memory>(new Memory(capacity, data)); in WrapMemoryPtr()
238 std::shared_ptr<Memory> Buffer::AllocMemory(std::shared_ptr<Allocator> allocator, size_t capacity, … in AllocMemory() argument
244 memory = std::shared_ptr<Memory>(new Memory(capacity, allocator, align)); in AllocMemory()
249 memory = std::shared_ptr<Memory>(new SurfaceMemory(capacity, allocator, align)); in AllocMemory()
253 memory = std::shared_ptr<Memory>(new ShareMemory(capacity, allocator, align)); in AllocMemory()