aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ClientStack/LindenUDP/J2KImage.cs
diff options
context:
space:
mode:
authorJohn Hurliman2009-10-14 11:44:17 -0700
committerJohn Hurliman2009-10-14 11:44:17 -0700
commit4b5a2f8c024b63f75b122916f6322f2f04d79f42 (patch)
treee4c3b1d086a70c6d50b91bca6f61a08b77b65188 /OpenSim/Region/ClientStack/LindenUDP/J2KImage.cs
parent* Minimized the number of times textures are pulled off the priority queue (diff)
parentMerge branch 'master' into htb-throttle (diff)
downloadopensim-SC-4b5a2f8c024b63f75b122916f6322f2f04d79f42.zip
opensim-SC-4b5a2f8c024b63f75b122916f6322f2f04d79f42.tar.gz
opensim-SC-4b5a2f8c024b63f75b122916f6322f2f04d79f42.tar.bz2
opensim-SC-4b5a2f8c024b63f75b122916f6322f2f04d79f42.tar.xz
Merge branch 'htb-throttle' of ssh://opensimulator.org/var/git/opensim into htb-throttle
Diffstat (limited to 'OpenSim/Region/ClientStack/LindenUDP/J2KImage.cs')
-rw-r--r--OpenSim/Region/ClientStack/LindenUDP/J2KImage.cs14
1 files changed, 14 insertions, 0 deletions
diff --git a/OpenSim/Region/ClientStack/LindenUDP/J2KImage.cs b/OpenSim/Region/ClientStack/LindenUDP/J2KImage.cs
index 9ded390..b53a2fb 100644
--- a/OpenSim/Region/ClientStack/LindenUDP/J2KImage.cs
+++ b/OpenSim/Region/ClientStack/LindenUDP/J2KImage.cs
@@ -31,6 +31,7 @@ using OpenMetaverse;
31using OpenMetaverse.Imaging; 31using OpenMetaverse.Imaging;
32using OpenSim.Framework; 32using OpenSim.Framework;
33using OpenSim.Region.Framework.Interfaces; 33using OpenSim.Region.Framework.Interfaces;
34using OpenSim.Region.Framework.Scenes.Hypergrid;
34using OpenSim.Services.Interfaces; 35using OpenSim.Services.Interfaces;
35using log4net; 36using log4net;
36using System.Reflection; 37using System.Reflection;
@@ -54,6 +55,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP
54 public UUID TextureID; 55 public UUID TextureID;
55 public IJ2KDecoder J2KDecoder; 56 public IJ2KDecoder J2KDecoder;
56 public IAssetService AssetService; 57 public IAssetService AssetService;
58 public UUID AgentID;
59 public IHyperAssetService HyperAssets;
57 public OpenJPEG.J2KLayerInfo[] Layers; 60 public OpenJPEG.J2KLayerInfo[] Layers;
58 public bool IsDecoded; 61 public bool IsDecoded;
59 public bool HasAsset; 62 public bool HasAsset;
@@ -373,6 +376,17 @@ namespace OpenSim.Region.ClientStack.LindenUDP
373 UUID assetID = UUID.Zero; 376 UUID assetID = UUID.Zero;
374 if (asset != null) 377 if (asset != null)
375 assetID = asset.FullID; 378 assetID = asset.FullID;
379 else if ((HyperAssets != null) && (sender != HyperAssets))
380 {
381 // Try the user's inventory, but only if it's different from the regions'
382 string userAssets = HyperAssets.GetUserAssetServer(AgentID);
383 if ((userAssets != string.Empty) && (userAssets != HyperAssets.GetSimAssetServer()))
384 {
385 m_log.DebugFormat("[J2KIMAGE]: texture {0} not found in local asset storage. Trying user's storage.", id);
386 AssetService.Get(userAssets + "/" + id, HyperAssets, AssetReceived);
387 return;
388 }
389 }
376 390
377 AssetDataCallback(assetID, asset); 391 AssetDataCallback(assetID, asset);
378 392