https://bugs.kde.org/show_bug.cgi?id=436731

Dmitry Kazakov <dimul...@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |FIXED
             Status|CONFIRMED                   |RESOLVED
      Latest Commit|                            |https://invent.kde.org/grap
                   |                            |hics/krita/commit/e7d22031d
                   |                            |abb8785f3dbeb37a8c3e14f551d
                   |                            |b9dc

--- Comment #6 from Dmitry Kazakov <dimul...@gmail.com> ---
Git commit e7d22031dabb8785f3dbeb37a8c3e14f551db9dc by Dmitry Kazakov.
Committed on 29/09/2021 at 10:56.
Pushed by dkazakov into branch 'master'.

Fix delays on the stroke start when the brush is too big

This patch implements two things:

1) Makes sure that KisBrushBasedPaintOpSettings::m_savedBrush is
   actually passed by into the stroke (with cloning of course).
   Cloning of brushes is cheap due to lazy copying mechanism of
   QImage.

2) Implements a special manager class (KisPresetShadowUpdater) that
   regenerates brush'es heavy data structures (such as brush outline
   and image pyramid) in background (with a 1500 ms delay after the
   brush change).

It means that the brush on the server will always store the correct
data cached. When the user starts the stroke, this data is just cloned
and passed to the stroke without extra recalculation (which may take
up to 1000 ms for heavy brush tips).

** POSSIBLE REGRESSIONS **

1) It may happen that the brush outline will be outdated after some of
   the brush settings are changed.

2) It may happen that the changes in the brush settings will not be
   visible in the actual stroke right aftert that.

I haven't seen these regressions in real life, but, theoretically,
they can happen.

M  +0    -1    libs/brush/CMakeLists.txt
D  +0    -50   libs/brush/KisSharedQImagePyramid.cpp
D  +0    -49   libs/brush/KisSharedQImagePyramid.h
M  +14   -3    libs/brush/kis_auto_brush.cpp
M  +3    -0    libs/brush/kis_auto_brush.h
M  +53   -36   libs/brush/kis_brush.cpp
M  +8    -5    libs/brush/kis_brush.h
M  +1    -1    libs/brush/kis_gbr_brush.cpp
M  +29   -2    libs/brush/kis_imagepipe_brush.cpp
M  +4    -1    libs/brush/kis_imagepipe_brush.h
M  +1    -1    libs/brush/kis_text_brush.cpp
M  +4    -3    libs/brush/tests/kis_gbr_brush_test.cpp
M  +1    -1    libs/brush/tests/kis_imagepipe_brush_test.cpp
A  +85   -0    libs/global/KisLazySharedCacheStorage.h     [License:
GPL(v2.0+)]
M  +12   -1    libs/image/brushengine/kis_paintop_preset.cpp
M  +17   -2    libs/image/brushengine/kis_paintop_preset.h
M  +10   -0    libs/image/brushengine/kis_paintop_settings.cpp
M  +5    -0    libs/image/brushengine/kis_paintop_settings.h
M  +1    -0    libs/ui/CMakeLists.txt
A  +121  -0    libs/ui/KisPresetShadowUpdater.cpp     [License: GPL(v2.0+)]
A  +32   -0    libs/ui/KisPresetShadowUpdater.h     [License: GPL(v2.0+)]
M  +6    -1    libs/ui/kis_canvas_resource_provider.cpp
M  +2    -0    libs/ui/kis_canvas_resource_provider.h
M  +22   -2    plugins/paintops/libpaintop/kis_brush_based_paintop_settings.cpp
M  +3    -0    plugins/paintops/libpaintop/kis_brush_based_paintop_settings.h

https://invent.kde.org/graphics/krita/commit/e7d22031dabb8785f3dbeb37a8c3e14f551db9dc

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to