Skip to content
  • Dmitry Kazakov's avatar
    Fix rendering of masks and layer styles on dependent nodes · 9d2920f8
    Dmitry Kazakov authored
    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
    9d2920f8