|
Krita Source Code Documentation
|
#include <kis_texture_tile_info_pool.h>
Public Member Functions | |
| int | chunkSize () const |
| bool | free (quint8 *ptr) |
| KisTextureTileInfoPoolSingleSize (int tileWidth, int tileHeight, int pixelSize) | |
| quint8 * | malloc () |
| int | numFrees () const |
| void | tryPurge (int numFrees) |
Private Attributes | |
| const int | m_chunkSize |
| int | m_maxAllocations |
| int | m_numAllocations |
| int | m_numFrees |
| boost::pool< boost::default_user_allocator_new_delete > | m_pool |
A pool for keeping the chunks of data of constant size. We have one such pool per used openGL tile size. The size of the chunk obviously depends on the size of the tile in pixels and the size of a single pixel in bytes.
As soon as the number of allocations drops to zero, all the memory is returned back to the operating system. Please note, that there is no way of reclaiming even unused pool memory until all the allocated chunks are free'd.
Definition at line 42 of file kis_texture_tile_info_pool.h.
|
inline |
Definition at line 45 of file kis_texture_tile_info_pool.h.
|
inline |
Definition at line 71 of file kis_texture_tile_info_pool.h.
|
inline |
Definition at line 61 of file kis_texture_tile_info_pool.h.
References freeThreshold, and KIS_ASSERT_RECOVER_NOOP.
|
inline |
Definition at line 54 of file kis_texture_tile_info_pool.h.
|
inline |
Definition at line 75 of file kis_texture_tile_info_pool.h.
|
inline |
Definition at line 79 of file kis_texture_tile_info_pool.h.
|
private |
Definition at line 89 of file kis_texture_tile_info_pool.h.
|
private |
Definition at line 92 of file kis_texture_tile_info_pool.h.
|
private |
Definition at line 91 of file kis_texture_tile_info_pool.h.
|
private |
Definition at line 93 of file kis_texture_tile_info_pool.h.
|
private |
Definition at line 90 of file kis_texture_tile_info_pool.h.