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

Picture caching support, part 1 (of 2). #3332

Merged
merged 10 commits into from Nov 23, 2018
Merged

Picture caching support, part 1 (of 2). #3332

merged 10 commits into from Nov 23, 2018

Commits on Nov 22, 2018

  1. Picture caching support, part 1 (of 2).

    This patch introduces a picture composite mode that caches the
    surface in a grid of tiles in the texture cache. This is enabled
    by setting the picture composite mode to PictureCompositeMode::TileCache.
    
    Basic overview:
     * During initial picture traversal, any tile caches encountered
       are pushed / popped onto the PictureUpdateState stack.
     * If a tile cache is present, and if the transforms have changed
       since last frame build, then the primitive instances are walked,
       mapping each prim instance to a set of tiles in the cache. This
       allows dependencies for each tile (transforms, images, animated
       property bindings etc) to be set. Although this does involve an
       extra pass of primitive instances, it's only used when the tile
       cache mappings (the relative transforms) have changed, so it's
       done quite rarely. In addition, in the future we can move much
       of the second primitive traversal (clip chain building) etc to
       also happen here, which will mean that doesn't get done each
       frame build.
     * During prim prepare, a picture with tile cache enabled checks
       the dependencies on each tile, to see if it needs to be invalidated.
       It builds a dirty rect that is the union of the set of dirty
       tiles for this picture. Right now, we support only a single
       dirty rect for simplicity, but this can easily be expanded in
       the future to support a number of regions as required. This
       dirty rect is then passed via the PictureContext to any child
       primitives, and is used as the culling rect for primitive, clip
       mask and child picture allocations.
     * The picture preparation step also maintains a list of texture
       cache handles per tile, and records a series of blit commands
       for the renderer to execute after drawing the picture. These
       blits are executed to cache the picture output in texture
       cache tiles.
     * On subsequent frames, if the tile(s) are not invalid, they are
       drawn as a series of images with the brush_image shader.
    gw3583 committed Nov 22, 2018
  2. Address review comments.

    gw3583 committed Nov 22, 2018
  3. Rebase on recent opacity bindings change.

    gw3583 committed Nov 22, 2018
You can’t perform that action at this time.