Krita Source Code Documentation
Loading...
Searching...
No Matches
KisOptimizedByteArray::Private Struct Reference
+ Inheritance diagram for KisOptimizedByteArray::Private:

Public Member Functions

 Private (const Private &rhs)
 
 Private (MemoryAllocatorSP _allocator)
 
 ~Private ()
 

Public Attributes

MemoryAllocatorallocator
 
MemoryChunk data
 
int dataSize = 0
 
MemoryAllocatorSP storedAllocator
 

Detailed Description

Definition at line 125 of file KisOptimizedByteArray.cpp.

Constructor & Destructor Documentation

◆ Private() [1/2]

KisOptimizedByteArray::Private::Private ( MemoryAllocatorSP _allocator)
inline

Definition at line 127 of file KisOptimizedByteArray.cpp.

128 {
130 _allocator ? _allocator : DefaultMemoryAllocatorStore::instance()->allocator();
131
132 allocator = storedAllocator.data();
133 }

References allocator, and storedAllocator.

◆ Private() [2/2]

KisOptimizedByteArray::Private::Private ( const Private & rhs)
inline

Definition at line 135 of file KisOptimizedByteArray.cpp.

136 : QSharedData(rhs)
137 {
138 allocator = rhs.allocator;
139 storedAllocator = rhs.storedAllocator;
140 dataSize = rhs.dataSize;
141 if (dataSize) {
143 memcpy(data.first, rhs.data.first, dataSize);
144 }
145 }
virtual MemoryChunk alloc(int size)=0

References KisOptimizedByteArray::MemoryAllocator::alloc(), allocator, data, dataSize, and storedAllocator.

◆ ~Private()

KisOptimizedByteArray::Private::~Private ( )
inline

Definition at line 147 of file KisOptimizedByteArray.cpp.

147 {
149 }
virtual void free(MemoryChunk chunk)=0

References allocator, data, and KisOptimizedByteArray::MemoryAllocator::free().

Member Data Documentation

◆ allocator

MemoryAllocator* KisOptimizedByteArray::Private::allocator

Definition at line 151 of file KisOptimizedByteArray.cpp.

◆ data

MemoryChunk KisOptimizedByteArray::Private::data

Definition at line 158 of file KisOptimizedByteArray.cpp.

◆ dataSize

int KisOptimizedByteArray::Private::dataSize = 0

Definition at line 159 of file KisOptimizedByteArray.cpp.

◆ storedAllocator

MemoryAllocatorSP KisOptimizedByteArray::Private::storedAllocator

Definition at line 156 of file KisOptimizedByteArray.cpp.


The documentation for this struct was generated from the following file: