aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
authorTeravus Ovares2009-01-23 11:00:36 +0000
committerTeravus Ovares2009-01-23 11:00:36 +0000
commit74df9f9c816f54fc60b131a347e7e1f1988b1fe2 (patch)
tree9f8080c00b583a68c9cfa595e62473d4018970c5 /OpenSim
parentadd event queue code for sending group IM for future group support (diff)
downloadopensim-SC_OLD-74df9f9c816f54fc60b131a347e7e1f1988b1fe2.zip
opensim-SC_OLD-74df9f9c816f54fc60b131a347e7e1f1988b1fe2.tar.gz
opensim-SC_OLD-74df9f9c816f54fc60b131a347e7e1f1988b1fe2.tar.bz2
opensim-SC_OLD-74df9f9c816f54fc60b131a347e7e1f1988b1fe2.tar.xz
* Adds a synchronous jpeg decode for pre-caching purposes
* When the DynamicTextureModule creates a j2k image, pre-cache the decode so that it doesn't stall any client threads.
Diffstat (limited to 'OpenSim')
-rw-r--r--OpenSim/Region/Environment/Interfaces/IJ2KDecoder.cs1
-rw-r--r--OpenSim/Region/Environment/Modules/Agent/TextureSender/J2KDecoderModule.cs10
-rw-r--r--OpenSim/Region/Environment/Modules/Scripting/DynamicTexture/DynamicTextureModule.cs7
3 files changed, 18 insertions, 0 deletions
diff --git a/OpenSim/Region/Environment/Interfaces/IJ2KDecoder.cs b/OpenSim/Region/Environment/Interfaces/IJ2KDecoder.cs
index 44b9289..2a37195 100644
--- a/OpenSim/Region/Environment/Interfaces/IJ2KDecoder.cs
+++ b/OpenSim/Region/Environment/Interfaces/IJ2KDecoder.cs
@@ -36,5 +36,6 @@ namespace OpenSim.Region.Environment.Interfaces
36 public interface IJ2KDecoder 36 public interface IJ2KDecoder
37 { 37 {
38 void decode(UUID AssetId, byte[] assetData, DecodedCallback decodedReturn); 38 void decode(UUID AssetId, byte[] assetData, DecodedCallback decodedReturn);
39 void syncdecode(UUID AssetId, byte[] j2kdata);
39 } 40 }
40} 41}
diff --git a/OpenSim/Region/Environment/Modules/Agent/TextureSender/J2KDecoderModule.cs b/OpenSim/Region/Environment/Modules/Agent/TextureSender/J2KDecoderModule.cs
index 2a565ee..53e66fc 100644
--- a/OpenSim/Region/Environment/Modules/Agent/TextureSender/J2KDecoderModule.cs
+++ b/OpenSim/Region/Environment/Modules/Agent/TextureSender/J2KDecoderModule.cs
@@ -146,6 +146,16 @@ namespace OpenSim.Region.Environment.Modules.Agent.TextureSender
146 } 146 }
147 } 147 }
148 148
149 /// <summary>
150 /// Provides a synchronous decode so that caller can be assured that this executes before the next line
151 /// </summary>
152 /// <param name="AssetId"></param>
153 /// <param name="j2kdata"></param>
154 public void syncdecode(UUID AssetId, byte[] j2kdata)
155 {
156 doJ2kDecode(AssetId, j2kdata);
157 }
158
149 #endregion 159 #endregion
150 160
151 /// <summary> 161 /// <summary>
diff --git a/OpenSim/Region/Environment/Modules/Scripting/DynamicTexture/DynamicTextureModule.cs b/OpenSim/Region/Environment/Modules/Scripting/DynamicTexture/DynamicTextureModule.cs
index e9fe373..0974f02 100644
--- a/OpenSim/Region/Environment/Modules/Scripting/DynamicTexture/DynamicTextureModule.cs
+++ b/OpenSim/Region/Environment/Modules/Scripting/DynamicTexture/DynamicTextureModule.cs
@@ -242,6 +242,13 @@ namespace OpenSim.Region.Environment.Modules.Scripting.DynamicTexture
242 242
243 LastAssetID = asset.FullID; 243 LastAssetID = asset.FullID;
244 244
245 IJ2KDecoder cacheLayerDecode = scene.RequestModuleInterface<IJ2KDecoder>();
246 if (cacheLayerDecode != null)
247 {
248 cacheLayerDecode.syncdecode(asset.FullID, asset.Data);
249 }
250 cacheLayerDecode = null;
251
245 // mostly keep the values from before 252 // mostly keep the values from before
246 Primitive.TextureEntry tmptex = part.Shape.Textures; 253 Primitive.TextureEntry tmptex = part.Shape.Textures;
247 254