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
+1,332
−138
Merged
Changes from 1 commit
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
0eeabbb
Make reftest failure messages more useful.
gw3583 0870bd8
Make animation example more useful for picture caching debugging.
gw3583 e52ba83
Add is_image_dirty to check if an image was updated.
gw3583 a521a1d
Support using the instance rect as the source for stretch size.
gw3583 602151d
Support not having per-segment rects.
gw3583 83e4c3c
Add method to get float value from property id.
gw3583 7c3453f
Picture caching support, part 1 (of 2).
gw3583 e9ac545
Address review comments.
gw3583 ea5f781
Address some more review comments
gw3583 4efa809
Rebase on recent opacity bindings change.
gw3583 File filter...
Filter file types
Jump to…
Jump to file
Failed to load files.
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.
- Loading branch information
commit 7c3453f884a3c9a58d3815c7b41f7a3fe69ddceb
Oops, something went wrong.
ProTip!
Use n and p to navigate between commits in a pull request.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
maybe: