Diffusion Krita 5884065cb3fe

Don't keep the default tile data blocked from swapping

Authored by dkazakov on Jul 20 2016, 1:51 PM.

Description

Don't keep the default tile data blocked from swapping

Summary:
We don't access the raw data of it usually. And is cases we do
we should block it separately.

This patch is needed to be able to migrate the leftover of tiles
to the new pool when a document is closed.

Release all the tile pools forcefully when a document is closed

This approach is a bit hackish, but it is the best thing we can do.
When the document is closed and the pool still contains a few tiles,
we artificially "swap-out" the tiles into a QList, purge the data in
the tile data pools and "swap-in" the tiles back.

Surely, we will not get an ACM award for this solution, but at least it
works ;)

CCBUG:364848

Implement data pool for the chunks in openGL canvas updates

This patch implements KisTextureTileInfoPool. A special object that keeps
track of all the chunks allocated during the openGL canvas updates.

This class is also capable of tracking multiple openGL tile sizes
and color space pixel sizes.

It should fix the most of the memory fragmentation problems,
especially on Windows.

CCBUG:363334,364848

Fix warning

Merge remote-tracking branch 'origin/master' into kazakov/memory-optimizations

Test Plan: Open any huge image in Krita and try to work with it, Krita should not consume more memory with time. The RAM shouldn't also grow with reopening the same large image multiple times. Well, it will grow anyway, but not much.

Reviewers: rempt

Subscribers: dkazakov

Differential Revision: https://phabricator.kde.org/D2236

Details

Merged Changes

CommitAuthorDetailsCommitted
e951aa70ef0crempt
Use devtools-3 instead of 2 
Jul 20 2016
bcdae430d503rempt
Disable the histogram docker until Eugene's branch is ready 
Jul 19 2016
1b2546f50ebdD2210tantsevov/dkazakov
Added ability to enter groups with PgUp/PgDown shortcuts 
Jul 19 2016
efc2047b46c4D2127dkazakov
Add quick flip buttons to transform docker 
Jul 19 2016
f7e283e0a300dkazakov
Revert "Add quick flip buttons to transform docker" 
Jul 19 2016
f594e3ea8a90rempt
BUG:363910 Brush freezes after lifting stylus pen away from tablet on OSX 
Jul 18 2016
00152c78bd1dD2127dkazakov
Add quick flip buttons to transform docker 
Jul 18 2016
a3e2d2d27655scottpetrovic
BUG: 361653 Prevent the preview assistant signal from firing twice 
Jul 17 2016