This looks like what this was supposed to be.
With "if( !m_bDelayedDelete || !t->m_bCacheThis )", if !m_bDelayedDelete, when we preload banners we'll load the texture and then immediately free it. This way, we always keep banners around, even if !m_bDelayedDelete. I'm adding another option to tweak the banner caching. I like the smoother banner changes, but I don't care for the very slow opening of groups. I'm not sure how to handle memory usage. I have about 14 megs of banners. In order to load them all, you just have to open each group once, and 14 megs of PNG is a lot of memory uncompressed. Ideal would be to cache the compressed version, but that'd be a bit of work. I'll add precache-all-at-load, precache-group and no-precache options for now.
This commit is contained in:
@@ -113,7 +113,11 @@ void RageTextureManager::UnloadTexture( RageTexture *t )
|
||||
*/
|
||||
if( t->IsAMovie() )
|
||||
bDeleteThis = true;
|
||||
if( !m_bDelayedDelete || !t->m_bCacheThis )
|
||||
|
||||
/* If m_bDelayedDelete, keep all textures around until we GC. If m_bCacheThis,
|
||||
* keep this individual texture, even if m_bDelayedDelete is off. (Would
|
||||
* "m_bDelayedDelete" be clearer as "m_bCacheAll"?) */
|
||||
if( !m_bDelayedDelete && !t->m_bCacheThis )
|
||||
bDeleteThis = true;
|
||||
|
||||
if( bDeleteThis )
|
||||
|
||||
Reference in New Issue
Block a user