Revision ac7786a...

Go back to digest for 7th October 2012

Optimization in Office

Dmitry Kazakov committed changes in [calligra] /:

Added caching for dabs into the brush paintop

This patch adds caching of the dabs to the paint op system of Krita.
Such cache makes the execution of the benchmarks up to 2 times faster.
Subjectively, the real painting becomes much faster, especially with
huge brushes. Artists report up to 20% speed gain while painting.

Of course, such caching makes the painting a bit less precise: we need
to tolerate subpixel differences to allow the cache to work. Sometimes
small difference in the size of a dab can also be acceptable. That is
why I introduced levels of precision. They are graded from 1 to 5: from
the fastest and less precise to the slowest, but with the best quality.
You can see the slider in the paintop settings dialog. The ToolTip text
explains which features of the brush are sacrificed on each precision
level.

The texturing and mirroring problems are solved.

My next steps are: make this cache tolerate bug 307588 and port it to
other brush-based paitops.

CC
REVIEW:106724

File Changes

Added 3 files
  • /plugins/paintops/libpaintop
  •   krita/kis_dab_cache.cpp
  •   krita/kis_dab_cache.h
  •   krita/kis_precision_option.cpp
Modified 17 files
  •   krita/image/kis_fixed_paint_device.cpp
  •   krita/image/kis_fixed_paint_device.h
  •   krita/image/kis_painter.cc
  •   krita/image/kis_painter.h
  •   krita/plugins/paintops/libpaintop/CMakeLists.txt
  •   krita/plugins/paintops/libpaintop/kis_brush_based_paintop_options_widget.cpp
  •   krita/plugins/paintops/libpaintop/kis_brush_based_paintop_options_widget.h
  •   krita/plugins/paintops/libpaintop/kis_brush_option_widget.cpp
  •   krita/plugins/paintops/libpaintop/kis_brush_option_widget.h
  •   krita/plugins/paintops/libpaintop/kis_brush_selection_widget.cpp
  •   krita/plugins/paintops/libpaintop/kis_brush_selection_widget.h
  •   krita/plugins/paintops/libpaintop/kis_pressure_sharpness_option.cpp
  •   krita/plugins/paintops/libpaintop/kis_pressure_sharpness_option.h
  •   krita/plugins/paintops/defaultpaintops/brush/kis_brushop.cpp
  •   krita/plugins/paintops/defaultpaintops/brush/kis_brushop.h
  •   krita/plugins/paintops/defaultpaintops/brush/kis_brushop_settings_widget.cpp
  •   krita/plugins/paintops/libpaintop/forms/wdgbrushchooser.ui
20 files changed in total