| 149 | } |
| 150 | |
| 151 | void GFXTextureManager::zombify() |
| 152 | { |
| 153 | AssertFatal( mTextureManagerState != GFXTextureManager::Zombie, "Texture Manager already a zombie!" ); |
| 154 | |
| 155 | // Notify everyone that cares about the zombification! |
| 156 | smEventSignal.trigger( GFXZombify ); |
| 157 | |
| 158 | // Release unused pool textures. |
| 159 | cleanupPool(); |
| 160 | |
| 161 | // Release everything in the cache we can. |
| 162 | cleanupCache(); |
| 163 | |
| 164 | // Free all the device copies of the textures. |
| 165 | GFXTextureObject *temp = mListHead; |
| 166 | while( temp != NULL ) |
| 167 | { |
| 168 | freeTexture( temp, true ); |
| 169 | temp = temp->mNext; |
| 170 | } |
| 171 | |
| 172 | // Finally, note our state. |
| 173 | mTextureManagerState = GFXTextureManager::Zombie; |
| 174 | } |
| 175 | |
| 176 | void GFXTextureManager::resurrect() |
| 177 | { |
no test coverage detected