Tasks:Gfx Cache: Difference between revisions
Jump to navigation
Jump to search
added graphic cache task |
→Requirements: Updated for state of implementation |
||
Line 11: | Line 11: | ||
== Requirements == | == Requirements == | ||
* Count references to keeps track of images in use | * <span style="text-decoration:line-through;">Count references to keeps track of images in use</span> (done) | ||
* Allow to configure maximum cache size | * <span style="text-decoration:line-through;">Allow to configure maximum cache size</span> (done) | ||
* Keep track of cache memory used | * <span style="text-decoration:line-through;">Keep track of cache memory used</span> (done) | ||
* Keep images cached, even if reference count reaches zero | * <span style="text-decoration:line-through;">Keep images cached, even if reference count reaches zero</span> (done) | ||
* When cache size exceeded, delete least frequently used images first | * When cache size exceeded, delete least frequently used images first | ||
* Empty cache to a certain threshold only, so that frequently used images remain cached | * <span style="text-decoration:line-through;">Empty cache to a certain threshold only, so that frequently used images remain cached</span> (done) | ||
* Allow "manual" or maybe periodic purge of cache | * <span style="text-decoration:line-through;">Allow "manual" or maybe periodic purge of cache</span> (done) | ||
== References == | == References == | ||
Current cache implementation: [http://cvs.savannah.nongnu.org/viewvc/adonthell/src/gfx/gfx.cc?root=adonthell&view=markup gfx.cc] see <tt>surface_cache(...)</tt> method | Current cache implementation: [http://cvs.savannah.nongnu.org/viewvc/adonthell/src/gfx/gfx.cc?root=adonthell&view=markup gfx.cc] see <tt>surface_cache(...)</tt> method |
Latest revision as of 18:14, 2 February 2009
Back to Task List
Overview
The Graphics cache makes sure that images are only loaded once, even when used multiple times in the game.
Dependencies
Requirements
- Count references to keeps track of images in use (done)
- Allow to configure maximum cache size (done)
- Keep track of cache memory used (done)
- Keep images cached, even if reference count reaches zero (done)
- When cache size exceeded, delete least frequently used images first
- Empty cache to a certain threshold only, so that frequently used images remain cached (done)
- Allow "manual" or maybe periodic purge of cache (done)
References
Current cache implementation: gfx.cc see surface_cache(...) method