Closed Bug 1732109 Opened 3 years ago Closed 3 years ago

Clean up the texture cache

Categories

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

task

Tracking

()

RESOLVED FIXED
94 Branch
Tracking Status
firefox94 --- fixed

People

(Reporter: nical, Assigned: nical)

Details

Attachments

(8 files)

The texture cache code is more complicated than I would like and it's current structure gets in the way of implementing texture cache compaction and better eviction heuristics.

The plan:

  • Put the picture tile handling into its own separate thing, as far as I can tell we don't get anything from abstracting over the cache and the picture tiles.
  • Move to a lru cache per Texture instead of one per type of content. I need this for better eviction heuristics.
  • Separate the entry data from the lru cache.
  • whatever else itches along the way.

I'm hoping that with that these changes will split the texture cache into a few independent pieces that are easier to move rather than the current state of affairs where everything sort of needs to be aware of the rest.

The shelf allocator is better in all scenarios, we don't need to keep that code around.

Depends on D126681

Last step before PictureTextures can be used independently.

Depends on D126685

They are used all over the place, these kinds of types usually go in internal_types.rs

Depends on D126688

Pushed by nsilva@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/d647046143fc
Remove the slab atlas allocator. r=gfx-reviewers,gw
https://hg.mozilla.org/integration/autoland/rev/b625a94df2a7
Move PictureTextures into its own file. r=gfx-reviewers,gw
https://hg.mozilla.org/integration/autoland/rev/afc30923cf87
Move more picture-specific code out of texture_cache.rs. r=gfx-reviewers,gw
https://hg.mozilla.org/integration/autoland/rev/8f13a584fb29
Remove generic picture texture access via TextureCache::get_opt/get_opt_mut. r=gfx-reviewers,gw
https://hg.mozilla.org/integration/autoland/rev/b5ec92b8df13
Request picture tiles explicitly and add PictureTextures::now. r=gfx-reviewers,gw
https://hg.mozilla.org/integration/autoland/rev/316f4cedacc9
Move picture tiles out of TextureCache. r=gfx-reviewers,gw
https://hg.mozilla.org/integration/autoland/rev/a54ad4336b10
Use a simpler cache entry struct for picture tiles. r=gfx-reviewers,gw
Backout by imoraru@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/f055b131d2ad
Backed out 7 changesets for causing wrench bustages. CLOSED TREE

Backed out for causing wrench bustages.

Push with failures

Failure log

Backout link

Flags: needinfo?(nical.bugzilla)
Pushed by nsilva@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/ec364c6654f2
Remove the slab atlas allocator. r=gfx-reviewers,gw
https://hg.mozilla.org/integration/autoland/rev/8c8b31e75522
Move PictureTextures into its own file. r=gfx-reviewers,gw
https://hg.mozilla.org/integration/autoland/rev/69d53e668d9a
Move more picture-specific code out of texture_cache.rs. r=gfx-reviewers,gw
https://hg.mozilla.org/integration/autoland/rev/8de24748f946
Remove generic picture texture access via TextureCache::get_opt/get_opt_mut. r=gfx-reviewers,gw
https://hg.mozilla.org/integration/autoland/rev/8a362f24929f
Request picture tiles explicitly and add PictureTextures::now. r=gfx-reviewers,gw
https://hg.mozilla.org/integration/autoland/rev/bf39693fa599
Move picture tiles out of TextureCache. r=gfx-reviewers,gw
https://hg.mozilla.org/integration/autoland/rev/a5cecdbf4d7d
Use a simpler cache entry struct for picture tiles. r=gfx-reviewers,gw
https://hg.mozilla.org/integration/autoland/rev/3e54ce015458
Move FrameId and FrameStamp out of render_backend.rs. r=gfx-reviewers,kvark
Flags: needinfo?(nical.bugzilla)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: