* 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.0.6.3-post-fixes
parent
68978e6e2a
commit
74df9f9c81
|
@ -36,5 +36,6 @@ namespace OpenSim.Region.Environment.Interfaces
|
|||
public interface IJ2KDecoder
|
||||
{
|
||||
void decode(UUID AssetId, byte[] assetData, DecodedCallback decodedReturn);
|
||||
void syncdecode(UUID AssetId, byte[] j2kdata);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -146,6 +146,16 @@ namespace OpenSim.Region.Environment.Modules.Agent.TextureSender
|
|||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Provides a synchronous decode so that caller can be assured that this executes before the next line
|
||||
/// </summary>
|
||||
/// <param name="AssetId"></param>
|
||||
/// <param name="j2kdata"></param>
|
||||
public void syncdecode(UUID AssetId, byte[] j2kdata)
|
||||
{
|
||||
doJ2kDecode(AssetId, j2kdata);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
/// <summary>
|
||||
|
|
|
@ -242,6 +242,13 @@ namespace OpenSim.Region.Environment.Modules.Scripting.DynamicTexture
|
|||
|
||||
LastAssetID = asset.FullID;
|
||||
|
||||
IJ2KDecoder cacheLayerDecode = scene.RequestModuleInterface<IJ2KDecoder>();
|
||||
if (cacheLayerDecode != null)
|
||||
{
|
||||
cacheLayerDecode.syncdecode(asset.FullID, asset.Data);
|
||||
}
|
||||
cacheLayerDecode = null;
|
||||
|
||||
// mostly keep the values from before
|
||||
Primitive.TextureEntry tmptex = part.Shape.Textures;
|
||||
|
||||
|
|
Loading…
Reference in New Issue