Krita Source Code Documentation
Loading...
Searching...
No Matches
kis_tile_data_swapper_p.h
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: 2010 Dmitry Kazakov <dimula73@gmail.com>
3 *
4 * SPDX-License-Identifier: GPL-2.0-or-later
5 */
6#ifndef KIS_TILE_DATA_SWAPPER_P_H_
7#define KIS_TILE_DATA_SWAPPER_P_H_
8
9#include "kis_image_config.h"
11
12
13/*
14 Limits Diagram
15 +------------------------+ <-- out of memory
16 | |
17 | |
18 | |
19 |## emergencyThreshold ##| <-- new tiles are not created
20 | | until we free some memory
21 | |
22 |== hardLimitThreshold ==| <-- the swapper thread starts
23 |........................| swapping out working (actually
24 |........................| needed) tiles until the level
25 |........................| reaches hardLimit level.
26 |........................|
27 |===== hardLimit ======| <-- the swapper stops swapping
28 | | out needed tiles
29 | |
30 : :
31 | |
32 | |
33 |== softLimitThreshold ==| <-- the swapper starts swapping
34 |........................| out memento tiles (those, which
35 |........................| store undo information)
36 |........................|
37 |===== softLimit ======| <-- the swapper stops swapping
38 | | out memento tiles
39 | |
40 : :
41 | |
42 +------------------------+ <-- 0 MiB
43
44 */
45
46
48{
49public:
61
66 inline qint32 emergencyThreshold() {
68 }
69
70 inline qint32 hardLimitThreshold() {
72 }
73
74 inline qint32 hardLimit() {
75 return m_hardLimit;
76 }
77
78 inline qint32 softLimitThreshold() {
80 }
81
82 inline qint32 softLimit() {
83 return m_softLimit;
84 }
85
86private:
92};
93
94
95
96
97#endif /* KIS_TILE_DATA_SWAPPER_P_H_ */
98
int tilesHardLimit() const
int tilesSoftLimit() const
T MiB_TO_METRIC(T value)