Adjust size of surface cache
Bug #1121944 reported by
Nicolai Hähnle
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
widelands |
Fix Released
|
Medium
|
Unassigned |
Bug Description
The surface cache introduced with bzr6501 is fixed to 30MB. This is not enough to hold all the graphics used in a typical game, even for a single player. As a result, the game sometimes stalls briefly while image data is reloaded into the cache, especially when jumping around on the map.
To help with this issue, the game should at least let users change the size of the surface cache manually via a command line option and perhaps an advanced configuration option.
In addition, the game should probably attempt to determine a reasonable size for the surface cache automatically, based on the available video memory. This may require some non-portable, operating system dependent code.
Related branches
lp:~widelands-dev/widelands/resize_texture_cache
- TiborB: Approve
-
Diff: 302 lines (+74/-105)5 files modifiedsrc/graphic/font_handler1.cc (+11/-7)
src/graphic/text/sdl_ttf_font.cc (+1/-1)
src/graphic/text/test/render.cc (+1/-1)
src/graphic/texture_cache.cc (+32/-81)
src/graphic/texture_cache.h (+29/-15)
Changed in widelands: | |
status: | New → Confirmed |
assignee: | nobody → SirVer (sirver) |
Changed in widelands: | |
status: | Incomplete → Fix Committed |
assignee: | SirVer (sirver) → nobody |
tags: |
added: graphics removed: graphic |
Changed in widelands: | |
status: | Fix Committed → Fix Released |
To post a comment you must log in.
We can let SDL determine how much video memory is available [1] so we don't need platform dependent code. I prefer the automatic adjustment of cache size over a manual configuration, which won't be used by most people I guess.
[1] http:// www.libsdl. org/cgi/ docwiki. cgi/SDL_ VideoInfo