The first part of selection tool outline optimization is done

Desktop / KDE / Calligra - Dmitry Kazakov [gmail.com] - 1 June 2013 02:25 UTC

There are at least two significant changes happened:

1) Every selection now has outlineCache() method which is supposed to be updated asynchronously and can be in either valid or invalid state.

2) The initial outline for the selection in most of the cases should not be calculated, because it i sknown by the tool itself.

3) The process of the "validness" controlling of the cache is done by a transaction. If you create a non-selection transaction on a selection paint device, the cache is cleared. If you are running a selection transaction, you should care for the cache yourself. The operations inside KisPixelSelection keep the cache consistent. If you use any other operation, you should invalidate the cache manually. This is, of course, not the ideal approach but, I guess, something can be done to that in the future.

TODO: the actual asynchronous calculation of the selection outline

CCMAIL:kimageshop@kde.org CCBUG:319535

5bf1b1c The first part of selection tool outline optimization is done
krita/image/CMakeLists.txt | 1 -
.../image/commands_new/kis_node_move_command2.cpp | 4 -
krita/image/kis_image.cc | 7 ++
krita/image/kis_image.h | 1 +
krita/image/kis_node_graph_listener.cpp | 4 +
krita/image/kis_node_graph_listener.h | 8 ++
krita/image/kis_paint_device.h | 2 +-
krita/image/kis_pixel_selection.cpp | 97 ++++++++++++++++++-
krita/image/kis_pixel_selection.h | 10 ++
krita/image/kis_selection.cc | 31 ++++++-
krita/image/kis_selection.h | 4 +-
krita/image/kis_selection_component.h | 4 +
krita/image/kis_selection_transaction_data.cpp | 51 ----------
krita/image/kis_selection_transaction_data.h | 53 -----------
krita/image/kis_transaction.h | 8 +-
krita/image/kis_transaction_data.cpp | 79 ++++++++++++++--
krita/image/kis_transaction_data.h | 7 +-
krita/image/kis_transform_visitor.h | 7 +-
krita/image/kis_transform_worker.cc | 8 ++
krita/image/kis_transform_worker.h | 5 +
krita/image/tests/kis_pixel_selection_test.cpp | 98 ++++++++++++++++++++
krita/image/tests/kis_pixel_selection_test.h | 4 +-
krita/plugins/extensions/colorrange/colorrange.cc | 1 +
.../extensions/colorrange/dlg_colorrange.cc | 1 +
krita/plugins/extensions/imagesize/imagesize.cc | 7 +-
.../tools/selectiontools/kis_tool_select_brush.cc | 4 +-
.../tools/selectiontools/kis_tool_select_brush.h | 2 +-
.../selectiontools/kis_tool_select_contiguous.cc | 2 +
.../selectiontools/kis_tool_select_elliptical.cc | 4 +
.../selectiontools/kis_tool_select_magnetic.cc | 10 +-
.../selectiontools/kis_tool_select_outline.cc | 5 +
.../tools/selectiontools/kis_tool_select_path.cc | 5 +-
.../selectiontools/kis_tool_select_polygonal.cc | 5 +
.../selectiontools/kis_tool_select_rectangular.cc | 5 +
.../selectiontools/kis_tool_select_similar.cc | 1 +
.../tools/tool_transform2/kis_tool_transform.cc | 16 ++--
.../strokes/transform_stroke_strategy.cpp | 14 +--
.../strokes/transform_stroke_strategy.h | 4 +-
.../ui/actions/kis_selection_action_factories.cpp | 2 +-
krita/ui/flake/kis_shape_selection.cpp | 39 +++++---
krita/ui/flake/kis_shape_selection.h | 10 +-
krita/ui/kis_mirror_visitor.cpp | 4 +-
krita/ui/kis_selection_decoration.cc | 17 +++-
krita/ui/kis_selection_decoration.h | 1 +
.../operations/kis_filter_selection_operation.cpp | 2 +-
krita/ui/tool/kis_selection_tool_helper.cpp | 9 +-
46 files changed, 473 insertions(+), 190 deletions(-)

Upstream: quickgit.kde.org


  • Share