Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clip chain refactor for local picture raster support. #2951

Merged
merged 2 commits into from Aug 10, 2018

Commits on Aug 8, 2018

  1. There's a large number of related changes in this

    patch. The overall goal is to make clip chain handling
    not depend on screen rectangle generation. This
    will make it much easier to implement local space
    picture rasterization for perspective elements. In
    addition to that, we unify how user / hierarchical and
    primitive clip chain nodes are handled.
    
    Clip chain instances are built on demand now, as
    required by primitives. Right now, none of the
    clip chain information is cached between primitives.
    In general, now that the calculations are done in
    local space, they are much faster - however we can
    easily start to cache the common clip-chain state
    (per raster coordinate system) if it ever shows up
    in a profile. Additionally, since we only build
    clip chains on demand, and clip chains for non-
    visible primitives are not built, which is a
    decent saving on many pages.
    
    Remove ClipNode altogether. Instead, during flattening
    we map directly from a ClipId to a ClipChainId
    as appropriate. Clip chains are now created during
    flattening and the links remain constant. It's only
    during construction of a clip chain instance that we
    include and exclude parts of the specified clip
    chain. This unifies how we handle user defined clip
    chains and legacy hierarchical clip chains. At the
    same time, unify how the optional primitive specific
    complex clip is handled with clip chains. Now, if
    a primitive has a complex clip, it's added as a
    normal clip chain node, and linked to the parent
    clip chain that this primitive would otherwise
    be attached to.
    
    Primitive runs now only depend on the spatial node.
    This results in far fewer primitive run breaks.
    
    ClipWorkItems are now stored as a single contiguous
    array in the ClipStore. To achieve this they are
    stored as an index buffer, and a clip node range
    is simply an (index, count). These are a lot
    cheaper to pass to clip masks, and also require
    fewer heap allocations.
    
    Port hit testing to use the same clip chain data
    structures that the main clip code uses, now that
    the hierarchical and user defined clip chains are
    handled in a uniform way.
    
    Remove the need for Arc in clip chain code, since
    clip chains are now stored in a contiguous index
    buffer style structure.
    gw3583 committed Aug 8, 2018

Commits on Aug 9, 2018

  1. Address review comments.

    gw3583 committed Aug 9, 2018
You can’t perform that action at this time.