• Add normal clip mask support to ps_split_composite.

    The split composite shader is now quite similar to a normal
    brush shader (uses prim header, supports normal clip masks
    etc). The only real difference is that it draws a quad polygon
    from local points instead of a rectangle. It should be easy
    to unify this into the brush_image shader in the future.
    
    Add a temporary "ClipNodeCollector" interface to correctly
    handle clips that are ancestors of the current rasterization
    root. Although it's not enforced by the API, I have verified
    that any time a clip from a spatial node that is an ancestor
    of the current rasterization root is applied on all primitives
    that are part of that picture. This means we can safely apply
    those clips during compositing of the rasterization root rather
    than on each individual primitive. This fixes correctness
    issues with clips across rasterization roots, and is also a
    quite significant performance win in some cases, since the
    clip mask is now applied once when the rasterization root
    is drawn, rather than on each indidvidual primitive.
    
    The end result of this is actually quite good - it will allow
    us to simplify some of the clipping code in the future, and is
    a performance win. The implementation leaves a lot to be
    desired, but gets the required result without having to fix
    up both gecko and wr clipping API mismatches. The long term
    solution for this is to update gecko and WR to make better use
    of clip chains on stacking contexts, rather than putting
    clips from the stacking context on each individual primitive (we
    have discussed doing this previously, but it's low-ish priority
    for now given other bugs).
    gw3583 committed Sep 11, 2018