From 6bbffb3e9a20404ee0573b21f039a236bcb58276 Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Thu, 30 Jun 2005 22:49:35 +0000 Subject: [PATCH] remove TEX_CACHED --- stepmania/src/RageTextureID.h | 2 +- stepmania/src/RageTextureManager.cpp | 26 +++++--------------------- stepmania/src/RageTextureManager.h | 1 - 3 files changed, 6 insertions(+), 23 deletions(-) diff --git a/stepmania/src/RageTextureID.h b/stepmania/src/RageTextureID.h index b84617d04f..22c901e438 100644 --- a/stepmania/src/RageTextureID.h +++ b/stepmania/src/RageTextureID.h @@ -55,7 +55,7 @@ struct RageTextureID * Note that this property is not considered for ordering/equality. Loading * a texture with a different loading policy will reuse the same texture with * a different policy. */ - enum TexPolicy { TEX_CACHED, TEX_VOLATILE, TEX_DEFAULT } Policy; + enum TexPolicy { TEX_VOLATILE, TEX_DEFAULT } Policy; void Init(); diff --git a/stepmania/src/RageTextureManager.cpp b/stepmania/src/RageTextureManager.cpp index 8a8adee09e..6de2eb4f75 100644 --- a/stepmania/src/RageTextureManager.cpp +++ b/stepmania/src/RageTextureManager.cpp @@ -6,10 +6,6 @@ * This is what you get if you call LoadTexture() on a texture that isn't * loaded. * - * Cached: When DelayedDelete is off, delete unused textures when we change screens. - * When on, treat as Default. This is used to precache textures that aren't - * loaded immediately; use CacheTexture. - * * Volatile: Delete unused textures once they've been used at least once. Ignore * DelayedDelete. * @@ -20,12 +16,11 @@ * player could actually view all banners long enough to transition to them * all in the course of one song select screen. * - * Policy priority is in the order CACHED, VOLATILE, DEFAULT. Textures that are loaded - * DEFAULT can be changed to VOLATILE and CACHED; VOLATILE textures can only be changed - * to CACHED. CACHED flags are normally set explicitly on a per-texture basis. VOLATILE - * flags are set for all banners, but banners which are explicitly set to CACHED should - * stay CACHED. Finally, all textures, when they're finally used, are loaded as NORMAL, - * and that should never override. + * Policy priority is in the order VOLATILE, DEFAULT. Textures that are loaded + * DEFAULT can be changed to VOLATILE. CACHED flags are normally set explicitly + * on a per-texture basis. VOLATILE flags are set for all banners, but banners + * which are explicitly set to CACHED should stay CACHED. Finally, all textures, + * when they're finally used, are loaded as NORMAL, and that should never override. */ #include "global.h" @@ -144,13 +139,6 @@ RageTexture* RageTextureManager::LoadTexture( RageTextureID ID ) return pTexture; } -void RageTextureManager::CacheTexture( RageTextureID ID ) -{ - RageTexture* pTexture = LoadTextureInternal( ID ); - pTexture->GetPolicy() = min( pTexture->GetPolicy(), RageTextureID::TEX_CACHED ); - UnloadTexture( pTexture ); -} - void RageTextureManager::VolatileTexture( RageTextureID ID ) { RageTexture* pTexture = LoadTextureInternal( ID ); @@ -234,10 +222,6 @@ void RageTextureManager::GarbageCollect( GCType type ) if( !m_Prefs.m_bDelayedDelete ) bDeleteThis = true; break; - case RageTextureID::TEX_CACHED: - if( !m_Prefs.m_bDelayedDelete ) - bDeleteThis = true; - break; case RageTextureID::TEX_VOLATILE: bDeleteThis = true; break; diff --git a/stepmania/src/RageTextureManager.h b/stepmania/src/RageTextureManager.h index dadfdbe4f0..4589728185 100644 --- a/stepmania/src/RageTextureManager.h +++ b/stepmania/src/RageTextureManager.h @@ -58,7 +58,6 @@ public: RageTexture* LoadTexture( RageTextureID ID ); bool IsTextureRegistered( RageTextureID ID ) const; void RegisterTexture( RageTextureID ID, RageTexture *p ); - void CacheTexture( RageTextureID ID ); void VolatileTexture( RageTextureID ID ); void UnloadTexture( RageTexture *t ); void ReloadAll();