Bug 386642 - Multi-threaded brushes: delay with big textures
Summary: Multi-threaded brushes: delay with big textures
Status: RESOLVED FIXED
Alias: None
Product: krita
Classification: Applications
Component: Brush engines (show other bugs)
Version: 4.0 pre-alpha
Platform: Microsoft Windows Microsoft Windows
: NOR normal
Target Milestone: ---
Assignee: Krita Bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-11-08 12:03 UTC by DoubleDee
Modified: 2017-11-25 19:59 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Test pattern (3.73 MB, application/x-7z-compressed)
2017-11-08 12:03 UTC, DoubleDee
Details

Note You need to log in before you can comment on or make changes to this bug.
Description DoubleDee 2017-11-08 12:03:39 UTC
Created attachment 108738 [details]
Test pattern

Generally multi-threaded brushes in second development build of 4.0 work faster, than default ones, but there are cases, where they get much slower, than previously.
It happens, when brush has a big texture (2048px) - stroke gets delayed before appearing. Delay gets even bigger, when texture is upscaled.
https://gfycat.com/gifs/detail/EnergeticInsidiousHuemul

How to reproduce:
- Download a text pattern from the attachment and install it in the resources folder.
- In Krita, assign this pattern to random pixel brush.
- Create some strokes.
- Change texture's scale in pattern settings to higher and create more strokes.
Comment 1 Halla Rempt 2017-11-08 12:20:03 UTC
Added to https://phabricator.kde.org/T7309
Comment 2 Halla Rempt 2017-11-23 09:40:07 UTC
Add to https://phabricator.kde.org/T7309
Comment 3 Dmitry Kazakov 2017-11-25 19:59:49 UTC
Git commit a5712e328d252a25321b030bbc039aea1e4bd796 by Dmitry Kazakov.
Committed on 25/11/2017 at 19:55.
Pushed by dkazakov into branch 'master'.

Fix the delay before starting a stroke with a huge texture

The texturing mask should not be recalculated every time. Just
cache it in a singleton.
Ref T7309

M  +1    -0    plugins/paintops/libpaintop/CMakeLists.txt
A  +229  -0    plugins/paintops/libpaintop/KisTextureMaskInfo.cpp     [License: GPL (v2+)]
A  +89   -0    plugins/paintops/libpaintop/KisTextureMaskInfo.h     [License: GPL (v2+)]
M  +20   -96   plugins/paintops/libpaintop/kis_texture_option.cpp
M  +3    -11   plugins/paintops/libpaintop/kis_texture_option.h

https://commits.kde.org/krita/a5712e328d252a25321b030bbc039aea1e4bd796