Fix issues with the DynamicTextureModule and corresponding unit tests.

This commit is contained in:
Diva Canto
2012-11-11 19:39:21 -08:00
parent 113a9704f2
commit db418bff2b
4 changed files with 44 additions and 37 deletions

View File

@@ -58,21 +58,6 @@ namespace OpenSim.Region.CoreModules.Scripting.VectorRender
private Scene m_scene;
private IDynamicTextureManager m_textureManager;
private IDynamicTextureManager TextureManager
{
get
{
if (m_textureManager == null && m_scene != null)
{
m_textureManager = m_scene.RequestModuleInterface<IDynamicTextureManager>();
if (m_textureManager != null)
{
m_textureManager.RegisterRender(GetContentType(), this);
}
}
return m_textureManager;
}
}
private Graphics m_graph;
private string m_fontName = "Arial";
@@ -121,8 +106,13 @@ namespace OpenSim.Region.CoreModules.Scripting.VectorRender
public bool AsyncConvertData(UUID id, string bodyData, string extraParams)
{
if (m_textureManager == null)
{
m_log.Warn("[VECTORRENDERMODULE]: No texture manager. Can't function");
return false;
}
// XXX: This isn't actually being done asynchronously!
TextureManager.ReturnData(id, ConvertData(bodyData, extraParams));
m_textureManager.ReturnData(id, ConvertData(bodyData, extraParams));
return true;
}
@@ -180,6 +170,14 @@ namespace OpenSim.Region.CoreModules.Scripting.VectorRender
public void RegionLoaded(Scene scene)
{
if (m_textureManager == null && m_scene == scene)
{
m_textureManager = m_scene.RequestModuleInterface<IDynamicTextureManager>();
if (m_textureManager != null)
{
m_textureManager.RegisterRender(GetContentType(), this);
}
}
}
public void RemoveRegion(Scene scene)