Bug 474000 - Flickering tiles on canvas when painting with large brushes
Summary: Flickering tiles on canvas when painting with large brushes
Status: CONFIRMED
Alias: None
Product: krita
Classification: Applications
Component: * Unknown (other bugs)
Version First Reported In: 5.1.5
Platform: unspecified Unspecified
: NOR normal
Target Milestone: ---
Assignee: Krita Bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-08-31 19:42 UTC by Jonathan Nyenhuis
Modified: 2023-09-04 09:00 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments
canvas flickering example (401.92 KB, image/gif)
2023-08-31 19:42 UTC, Jonathan Nyenhuis
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jonathan Nyenhuis 2023-08-31 19:42:23 UTC
Created attachment 161314 [details]
canvas flickering example

SUMMARY
***
NOTE: If you are reporting a crash, please try to attach a backtrace with debug symbols.
See https://community.kde.org/Guidelines_and_HOWTOs/Debugging/How_to_create_useful_crash_reports
***

STEPS TO REPRODUCE
1. Create a any sized canvas like 3000x2000 pixels.
2. Select any brush like basic size-5 with the size set to 1000 pixels.
3. Paint strokes on the canvas.

OBSERVED RESULT
The head of the brush stroke flickers with patches updating at irregular intervals. This is most apparent on brushes larger than 500 pixels in size. I've attached a GIF of a 1000 pixel round brush with Krita forced to use a single thread to make the effect more noticeable. It looks like screen tearing but in 2D. There doesn't appear to be any observable stroke lag unless the stroke is very long.

EXPECTED RESULT
The canvas shows the brush stroke without flickering.

SOFTWARE/OS VERSIONS
Windows: 
macOS: 
Linux/KDE Plasma: 
(available in About System)
KDE Plasma Version: 
KDE Frameworks Version: 
Qt Version: 

ADDITIONAL INFORMATION
For very large brushes, even clicking on the canvas to make a single dab seems to cause this. This happens with and without instant preview enabled and even with Krita forced to use a single thread in the performance tab. This happens on my AMD Ryzen desktop and M1 MacBook. This also applies to other image operations like curves adjustments. Enabling/disabling GPU acceleration also doesn't seem to make a difference.
Comment 1 Dmitry Kazakov 2023-09-04 09:00:38 UTC
I can confirm this bug. I used to have an idea on how to fix that but I never had time to actually implement the fix :( It would require a bit of refactoring for the brushes threading code.