Closed Bug 1922323 Opened 2 years ago Closed 1 year ago

Make it possible to conditionally cache render tasks

Categories

(Core :: Graphics: WebRender, task, P3)

task

Tracking

()

RESOLVED FIXED

People

(Reporter: nical, Assigned: nical)

References

(Regressed 2 open bugs)

Details

(Whiteboard: [viewtransitions:m1:gfx])

Attachments

(7 files)

A small refactoring to allow caching some render tasks only under certain conditions.

This will be needed by some quad rendering optimizations and the view-transition snapshotting infrastructure.
The main change in this patch is that ResourceCache::request_render_task now takes an optional cache key and only creates a cached render task if the cache key is supplied.
The patch ballooned into including a few cosmetic changes:

  • user_data was always None so the parameter was removed
  • the closure is not generic anymore
  • arguments were shuffled a bit to put parameters at the beginning and the &mut builders together at the end.
Assignee: nobody → nical.bugzilla
Status: NEW → ASSIGNED

This is the first step in a series of patches that will merge all render target structs into a single one that can express any kind of render task, cached or not.
Merging color and alpha targets isn't that important in isolation but it makes merging color and texture cache target easier since the latter can be color or alpha.

Whiteboard: [viewtransitions:m1:gfx]

And make get_target_texture work with texture cache location.

Attachment #9430172 - Attachment description: WIP: Bug 1922323 - Don't make cached rendertask location read-only → Bug 1922323 - Don't make cached rendertask location read-only
Pushed by nsilva@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/62f67ebe23cb Make it possible to conditionally cache render tasks. r=gfx-reviewers,gw https://hg.mozilla.org/integration/autoland/rev/01843109bd8f Merge AlphaRenderTarget into ColorRenderTarget. r=gfx-reviewers,gw https://hg.mozilla.org/integration/autoland/rev/8738e1ec23e3 Remove the RenderTarget trait. r=gfx-reviewers,gw https://hg.mozilla.org/integration/autoland/rev/6405db5a78f3 Rename ColorRenderTarget into RenderTarget. r=gfx-reviewers,gw https://hg.mozilla.org/integration/autoland/rev/63367470c79c Merge RenderTarget and TextureCacheRenderTarget. r=gfx-reviewers,gw https://hg.mozilla.org/integration/autoland/rev/8ed813d0430c Move some repeated code into Renderer::draw_render_target. r=gfx-reviewers,gw https://hg.mozilla.org/integration/autoland/rev/37d6006a429b Don't make cached rendertask location read-only
Keywords: leave-open

The remaining tasks I initially intended to do in this bug are now in bug 1924736 so this can be closed.

Status: ASSIGNED → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Keywords: leave-open

This lead to a 14% regression on a sub-test of TART with Windows-sw-wr.
This sub-test is configured not to generate any perf alerts, so no action is expected here. This is just an FYI.

Regressions: 1941709
Regressions: 1954711
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: