Diffusion Krita 9d2920f896c0

Fix rendering of masks and layer styles on dependent nodes

Authored by dkazakov on May 9 2019, 1:50 PM.

Description

Fix rendering of masks and layer styles on dependent nodes

In Krita we have two [0] types of "dependent" nodes, that is,
whose contents depends on the result of a merge of other layers.

KisAdjustmentLayer depends on the result of composing all the
layer below it. KisGroupLayer depends on the result of composing
its children.

All these layers can have filter masks and/or layer styles. To
handle them, the patch introduces a term needRectForOriginal().
needRectForOriginal(rect) means "what area of layer's original
device should be prepared to correct result in 'rect' of the
'final device'". Under 'final device' it may be considered
projection for a layer or a final composed planes for a
projection plane.

What is the difference between needRectForOriginal() and needRect?

needRect() defines "what area of layers below should be prepared
to get correctly merged image". Obviously, group layer doesn't
depend on layers below (it depends on its children) and adjustment
layer's needRect also includes filter's needRect, which is not the
case for needRectForOriginal().

[1] --- actually, we have three. KisCloneLayer is also "dependent",

but it is not covered by this patch.

BUG:366419
CCBUG:390299

Details

Committed
dkazakovMay 9 2019, 2:17 PM
Parents
R37:ba412701b3a8: debug--
Branches
Unknown
Tags
Unknown