diff options
author | Diva Canto | 2009-09-30 10:59:10 -0700 |
---|---|---|
committer | Melanie | 2009-09-30 18:41:41 +0100 |
commit | 4bf47fa592fd60716ffd6b34d418c241709c4744 (patch) | |
tree | c3c773f9cc594bec6386f87dc0c63d6132b67741 /OpenSim/Region/ClientStack/LindenUDP/LLImageManager.cs | |
parent | Remove The legacy inventory and asset servers. Bump interface version to 6 (diff) | |
download | opensim-SC_OLD-4bf47fa592fd60716ffd6b34d418c241709c4744.zip opensim-SC_OLD-4bf47fa592fd60716ffd6b34d418c241709c4744.tar.gz opensim-SC_OLD-4bf47fa592fd60716ffd6b34d418c241709c4744.tar.bz2 opensim-SC_OLD-4bf47fa592fd60716ffd6b34d418c241709c4744.tar.xz |
This releases the texture assets from LLImageManager cache, and re-requests them later if the client asks for them again. Needs more testing in texture-rich sims.
Diffstat (limited to 'OpenSim/Region/ClientStack/LindenUDP/LLImageManager.cs')
-rw-r--r-- | OpenSim/Region/ClientStack/LindenUDP/LLImageManager.cs | 23 |
1 files changed, 22 insertions, 1 deletions
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLImageManager.cs b/OpenSim/Region/ClientStack/LindenUDP/LLImageManager.cs index 295a5e6..b039049 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/LLImageManager.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/LLImageManager.cs | |||
@@ -257,6 +257,14 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
257 | J2KImage imagereq = m_imagestore[m_priorities.Values[x]]; | 257 | J2KImage imagereq = m_imagestore[m_priorities.Values[x]]; |
258 | if (imagereq.m_decoded == true && !imagereq.m_completedSendAtCurrentDiscardLevel) | 258 | if (imagereq.m_decoded == true && !imagereq.m_completedSendAtCurrentDiscardLevel) |
259 | { | 259 | { |
260 | // we need to test this here now that we are dropping assets | ||
261 | if (!imagereq.m_hasasset) | ||
262 | { | ||
263 | m_log.WarnFormat("[LLIMAGE MANAGER]: Re-requesting the image asset {0}", imagereq.m_requestedUUID); | ||
264 | imagereq.RunUpdate(); | ||
265 | continue; | ||
266 | } | ||
267 | |||
260 | numCollected++; | 268 | numCollected++; |
261 | //SendPackets will send up to ten packets per cycle | 269 | //SendPackets will send up to ten packets per cycle |
262 | if (imagereq.SendPackets(m_client, maxpack)) | 270 | if (imagereq.SendPackets(m_client, maxpack)) |
@@ -264,8 +272,21 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
264 | //Send complete | 272 | //Send complete |
265 | if (!imagereq.m_completedSendAtCurrentDiscardLevel) | 273 | if (!imagereq.m_completedSendAtCurrentDiscardLevel) |
266 | { | 274 | { |
267 | imagereq.m_completedSendAtCurrentDiscardLevel = true; | 275 | // I think this field imagereq.m_completedSendAtCurrentDiscardLevel |
276 | // is completely redundant | ||
277 | //imagereq.m_completedSendAtCurrentDiscardLevel = true; | ||
278 | |||
268 | Interlocked.Decrement(ref m_outstandingtextures); | 279 | Interlocked.Decrement(ref m_outstandingtextures); |
280 | |||
281 | // First and foremost, drop the reference to the asset | ||
282 | // so that the asset doesn't stay in memory forever. | ||
283 | // We'll Get it again from the asset service (usually cache) | ||
284 | // if/when the client requests it again. | ||
285 | // In order not to mess much with the current implementation | ||
286 | // of this management code, we drop only the asset reference | ||
287 | // but keep the image request itself. | ||
288 | imagereq.DropAsset(); | ||
289 | |||
269 | //Re-assign priority to bottom | 290 | //Re-assign priority to bottom |
270 | //Remove the old priority | 291 | //Remove the old priority |
271 | m_priorities.Remove(imagereq.m_designatedPriorityKey); | 292 | m_priorities.Remove(imagereq.m_designatedPriorityKey); |