Skip to content
Commit 2e9c60d3 authored by Dmitry Kazakov's avatar Dmitry Kazakov
Browse files

Fix threading issues in the scheduler when manipulating layers

After several iterations of changes to KisNode::changeRect() definition,
KisBaseRectsWalker::changeRect() now means **not** the rect of the canvas
that is changed by the walker on any layer, but only a rect that will be
changed in the end of the merge operation. It means that two merge
operations may still overlap on the intermediate layers if the layer
stack has nodes with weird change/needRect(). And that can cause
breakage of the tile manager's invariants, because two threads would
write into overlapping areas.

This patch fixes it in a suboptimal approach. Now the scheduler just checks
if accessRect of the walkers intersect. That means that the scheduler
now also blocks walkers with overlapping **read** rects, which are totally
legal.

BUG:450957
parent 238a81b4
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment