| 1377 | } |
| 1378 | |
| 1379 | void GFXTextureManager::deleteTexture( GFXTextureObject *texture ) |
| 1380 | { |
| 1381 | if ( mTextureManagerState == GFXTextureManager::Dead ) |
| 1382 | return; |
| 1383 | |
| 1384 | #ifdef DEBUG_SPEW |
| 1385 | Platform::outputDebugString( "[GFXTextureManager] deleteTexture '%s'", |
| 1386 | texture->mTextureLookupName.c_str() |
| 1387 | ); |
| 1388 | #endif |
| 1389 | |
| 1390 | if( mListHead == texture ) |
| 1391 | mListHead = texture->mNext; |
| 1392 | if( mListTail == texture ) |
| 1393 | mListTail = texture->mPrev; |
| 1394 | |
| 1395 | hashRemove( texture ); |
| 1396 | |
| 1397 | // If we have a path for the texture then |
| 1398 | // remove change notifications for it. |
| 1399 | Path texPath = texture->getPath(); |
| 1400 | if ( !texPath.isEmpty() ) |
| 1401 | FS::RemoveChangeNotification( texPath, this, &GFXTextureManager::_onFileChanged ); |
| 1402 | |
| 1403 | GFXTextureProfile::updateStatsForDeletion(texture); |
| 1404 | |
| 1405 | freeTexture( texture ); |
| 1406 | } |
| 1407 | |
| 1408 | void GFXTextureManager::_validateTexParams( const U32 width, const U32 height, |
| 1409 | const GFXTextureProfile *profile, |
no test coverage detected