remove TEX_CACHED
This commit is contained in:
@@ -55,7 +55,7 @@ struct RageTextureID
|
|||||||
* Note that this property is not considered for ordering/equality. Loading
|
* 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 texture with a different loading policy will reuse the same texture with
|
||||||
* a different policy. */
|
* a different policy. */
|
||||||
enum TexPolicy { TEX_CACHED, TEX_VOLATILE, TEX_DEFAULT } Policy;
|
enum TexPolicy { TEX_VOLATILE, TEX_DEFAULT } Policy;
|
||||||
|
|
||||||
void Init();
|
void Init();
|
||||||
|
|
||||||
|
|||||||
@@ -6,10 +6,6 @@
|
|||||||
* This is what you get if you call LoadTexture() on a texture that isn't
|
* This is what you get if you call LoadTexture() on a texture that isn't
|
||||||
* loaded.
|
* 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
|
* Volatile: Delete unused textures once they've been used at least once. Ignore
|
||||||
* DelayedDelete.
|
* DelayedDelete.
|
||||||
*
|
*
|
||||||
@@ -20,12 +16,11 @@
|
|||||||
* player could actually view all banners long enough to transition to them
|
* player could actually view all banners long enough to transition to them
|
||||||
* all in the course of one song select screen.
|
* all in the course of one song select screen.
|
||||||
*
|
*
|
||||||
* Policy priority is in the order CACHED, VOLATILE, DEFAULT. Textures that are loaded
|
* Policy priority is in the order VOLATILE, DEFAULT. Textures that are loaded
|
||||||
* DEFAULT can be changed to VOLATILE and CACHED; VOLATILE textures can only be changed
|
* DEFAULT can be changed to VOLATILE. CACHED flags are normally set explicitly
|
||||||
* to CACHED. CACHED flags are normally set explicitly on a per-texture basis. VOLATILE
|
* on a per-texture basis. VOLATILE flags are set for all banners, but banners
|
||||||
* flags are set for all banners, but banners which are explicitly set to CACHED should
|
* which are explicitly set to CACHED should stay CACHED. Finally, all textures,
|
||||||
* stay CACHED. Finally, all textures, when they're finally used, are loaded as NORMAL,
|
* when they're finally used, are loaded as NORMAL, and that should never override.
|
||||||
* and that should never override.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "global.h"
|
#include "global.h"
|
||||||
@@ -144,13 +139,6 @@ RageTexture* RageTextureManager::LoadTexture( RageTextureID ID )
|
|||||||
return pTexture;
|
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 )
|
void RageTextureManager::VolatileTexture( RageTextureID ID )
|
||||||
{
|
{
|
||||||
RageTexture* pTexture = LoadTextureInternal( ID );
|
RageTexture* pTexture = LoadTextureInternal( ID );
|
||||||
@@ -234,10 +222,6 @@ void RageTextureManager::GarbageCollect( GCType type )
|
|||||||
if( !m_Prefs.m_bDelayedDelete )
|
if( !m_Prefs.m_bDelayedDelete )
|
||||||
bDeleteThis = true;
|
bDeleteThis = true;
|
||||||
break;
|
break;
|
||||||
case RageTextureID::TEX_CACHED:
|
|
||||||
if( !m_Prefs.m_bDelayedDelete )
|
|
||||||
bDeleteThis = true;
|
|
||||||
break;
|
|
||||||
case RageTextureID::TEX_VOLATILE:
|
case RageTextureID::TEX_VOLATILE:
|
||||||
bDeleteThis = true;
|
bDeleteThis = true;
|
||||||
break;
|
break;
|
||||||
|
|||||||
@@ -58,7 +58,6 @@ public:
|
|||||||
RageTexture* LoadTexture( RageTextureID ID );
|
RageTexture* LoadTexture( RageTextureID ID );
|
||||||
bool IsTextureRegistered( RageTextureID ID ) const;
|
bool IsTextureRegistered( RageTextureID ID ) const;
|
||||||
void RegisterTexture( RageTextureID ID, RageTexture *p );
|
void RegisterTexture( RageTextureID ID, RageTexture *p );
|
||||||
void CacheTexture( RageTextureID ID );
|
|
||||||
void VolatileTexture( RageTextureID ID );
|
void VolatileTexture( RageTextureID ID );
|
||||||
void UnloadTexture( RageTexture *t );
|
void UnloadTexture( RageTexture *t );
|
||||||
void ReloadAll();
|
void ReloadAll();
|
||||||
|
|||||||
Reference in New Issue
Block a user