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

Add support for caching render tasks across frames and display lists. #2284

Merged
merged 1 commit into from Jan 15, 2018

Commits on Jan 14, 2018

  1. Add support for caching render tasks across frames and display lists.

    This patch adds the infrastructure required to allow render tasks
    to be rendered into the texture cache, where they can be stored
    and referenced across multiple frames.
    
    Since the cache key is based on the contents of the task itself,
    the cache items remain valid even when a new display list is provided,
    so long as the content of the cached task is the same. When the cache
    is determined to be valid, the render task is just drawn as a simple
    image, rather than executing the complex render task chain used to
    build the output.
    
    Convert box-shadows to make use of this new feature. When a new
    box-shadow is required, the render task chain is set up to draw the
    minimal box-shadow, and blur it. The blurred result is then stored in
    the texture cache, available for use on this and subsequent frames.
    
    Since items are drawn into the texture cache, this will also help
    with batching in the future, as we collapse more items to be able to
    use a simple shader that draws an image from the texture cache.
    
    Remove blur regions since they are no longer used or required.
    Remove old render task sharing within a single frame, it's redundant now.
    
    TODO (as future work):
     * Support caching of RGBA8 render tasks.
     * Convert other tasks (e.g. clips, drop-shadows) to use cacheable tasks.
     * Use this as basis for optimizing rendering of static Pictures (e.g. a picture with a filter chain + image).
    gw3583 committed Jan 14, 2018
You can’t perform that action at this time.