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

--- Comment #4 from Lynx3d <lynx.mw+...@gmail.com> ---
Git commit 73d5958e94517a98f7bc4a91882d94d99d892617 by Mathias Wein.
Committed on 09/05/2022 at 09:00.
Pushed by mwein into branch 'master'.

Fix painting on selection masks with various blending modes

The issue was that KoColorSpace::bitBlt() only accepted composite ops from
its own color space, while at the same time allowing KoAlphaColorSpace to
blit in a differing source color space and substituting the composite op
accordingly, specifically to allow painting.

Since we cannot acquire most composite ops from KoAlphaColorSpace, some
restructuring was necessary:

- KoColorSpace::compositeOp() and ::hasCompositeOp() now take an optional
  destination color space to acquire the desired composite op
- KoColorSpace::bitBlt() accepts composite ops from source color space
  if it's going to work in source color space; this also avoids the lookup
  for substitution on each call
- KisPainter delays fetching the composite op until the source color space
  is known and caches the result
- change KisPainter::compositeOp() to compositeOpId() since we can no
  longer return an actual composite op
- since recompile time can't get any worse, take care of the TODO and
  rename KisPainter::setCompositeOp() to setCompositeOpId() and cleanup
  many places that were fetching a composite op beforehand

M  +2    -2    benchmarks/kis_filter_selections_benchmark.cpp
M  +3    -3    benchmarks/kis_floodfill_benchmark.cpp
M  +1    -1    benchmarks/kis_gradient_benchmark.cpp
M  +1    -1    benchmarks/kis_painter_benchmark.cpp
M  +1    -1    libs/brush/tests/kis_auto_brush_test.cpp
M  +1    -1    libs/brush/tests/kis_imagepipe_brush_test.cpp
M  +1    -1    libs/image/kis_fill_painter.cc
M  +1    -1    libs/image/kis_indirect_painting_support.cpp
M  +1    -1    libs/image/kis_layer_projection_plane.cpp
M  +1    -1    libs/image/kis_onion_skin_compositor.cpp
M  +1    -1    libs/image/kis_paint_layer.cc
M  +47   -26   libs/image/kis_painter.cc
M  +9    -5    libs/image/kis_painter.h
M  +2    -2    libs/image/kis_painter_blt_multi_fixed.cpp
M  +5    -1    libs/image/kis_painter_p.h
M  +1    -1    libs/image/kis_perspectivetransform_worker.cpp
M  +1    -1    libs/image/layerstyles/KisLayerStyleKnockoutBlower.cpp
M  +2    -2    libs/image/layerstyles/kis_ls_bevel_emboss_filter.cpp
M  +1    -1    libs/image/layerstyles/kis_ls_drop_shadow_filter.cpp
M  +2    -2    libs/image/layerstyles/kis_ls_stroke_filter.cpp
M  +3    -3    libs/image/layerstyles/kis_ls_utils.cpp
M  +1    -1    libs/image/layerstyles/kis_multiple_projection.cpp
M  +1    -1    libs/image/lazybrush/kis_colorize_mask.cpp
M  +1    -1    libs/image/tests/kis_gradient_painter_test.cpp
M  +3    -3    libs/image/tests/kis_layer_style_projection_plane_test.cpp
M  +5    -5    libs/image/tests/kis_painter_test.cpp
M  +16   -6    libs/pigment/KoColorSpace.cpp
M  +14   -3    libs/pigment/KoColorSpace.h
M  +2    -2    libs/ui/tool/kis_resources_snapshot.cpp
M  +1    -1    libs/ui/tool/strokes/kis_painter_based_stroke_strategy.cpp
M  +1    -1    plugins/extensions/qmic/kis_qmic_import_tools.h
M  +1    -1    plugins/extensions/waveletdecompose/waveletdecompose.cpp
M  +1    -1    plugins/filters/gaussianhighpass/gaussianhighpass_filter.cpp
M  +3    -3    plugins/filters/halftone/KisHalftoneFilter.cpp
M  +1    -1    plugins/filters/smalltilesfilter/kis_small_tiles_filter.cpp
M  +1    -1    plugins/generators/gradient/KisGradientGenerator.cpp
M  +2    -2    plugins/generators/screentone/KisScreentoneGenerator.cpp
M  +3    -3    plugins/paintops/colorsmudge/KisColorSmudgeStrategyLightness.cpp
M  +3    -3   
plugins/paintops/colorsmudge/KisColorSmudgeStrategyWithOverlay.cpp
M  +1    -1    plugins/paintops/defaultpaintops/duplicate/kis_duplicateop.cpp
M  +2    -2    plugins/paintops/experiment/kis_experiment_paintop.cpp
M  +1    -1    plugins/paintops/filterop/kis_filterop.cpp
M  +3    -3    plugins/paintops/libpaintop/kis_texture_option.cpp
M  +2    -2    plugins/paintops/mypaint/MyPaintPaintOp.cpp
M  +3    -3    plugins/paintops/mypaint/MyPaintSurface.cpp
M  +2    -2    plugins/paintops/tangentnormal/kis_tangent_normal_paintop.cpp

https://invent.kde.org/graphics/krita/commit/73d5958e94517a98f7bc4a91882d94d99d892617

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

Reply via email to