szeged / webrender

A GPU-based renderer for the web
https://doc.servo.org/webrender/
Mozilla Public License 2.0
45 stars 7 forks source link

Better memory management #255

Closed zakorgy closed 4 years ago

zakorgy commented 5 years ago

When creating a new Image/Buffer we call allocate_memory with the size it needs. This is not a good solution, we should lower the number of memory allocations as possible and use some kind of memory allocation strategy. Fortunately there are crates which depend on gfx-hal and have memory allocators for our needs: Gfx-memory: https://github.com/gfx-rs/gfx-memory, which is not maintained at the moment. Rendy: https://github.com/omni-viral/rendy

zakorgy commented 4 years ago

I think we can close this now, since we are already using rendy-memory to manage our allocations, and it seems to work quite well.