Changeset View
Changeset View
Standalone View
Standalone View
libs/image/tiles3/tests/kis_store_limits_test.cpp
Show All 20 Lines | |||||
21 | 21 | | |||
22 | #include "kis_debug.h" | 22 | #include "kis_debug.h" | ||
23 | 23 | | |||
24 | #include "kis_image_config.h" | 24 | #include "kis_image_config.h" | ||
25 | #include "tiles3/swap/kis_tile_data_swapper_p.h" | 25 | #include "tiles3/swap/kis_tile_data_swapper_p.h" | ||
26 | 26 | | |||
27 | void KisStoreLimitsTest::testLimits() | 27 | void KisStoreLimitsTest::testLimits() | ||
28 | { | 28 | { | ||
29 | KisImageConfig config(false); | 29 | KisImageConfigMutable config; | ||
30 | config.setMemoryHardLimitPercent(50); | 30 | config.setMemoryHardLimitPercent(50); | ||
31 | config.setMemorySoftLimitPercent(25); | 31 | config.setMemorySoftLimitPercent(25); | ||
32 | config.setMemoryPoolLimitPercent(10); | 32 | config.setMemoryPoolLimitPercent(10); | ||
33 | 33 | | |||
34 | const int totalRAM = KisImageConfig::totalRAM(); | 34 | const int totalRAM = KisImageConfig::totalRAM(); | ||
35 | 35 | | |||
36 | // values are shifted because of the pooler part | 36 | // values are shifted because of the pooler part | ||
37 | const int halfRAMMetric = MiB_TO_METRIC(int(totalRAM * 0.4)); | 37 | const int halfRAMMetric = MiB_TO_METRIC(int(totalRAM * 0.4)); | ||
Show All 13 Lines |