From 67fefdb5a0eafc5fe899b990b096d1d70ce9d4a8 Mon Sep 17 00:00:00 2001 From: Melanie Date: Wed, 30 Sep 2009 20:52:10 +0100 Subject: Remove predecode-j2k and it's assoaciated logic --- OpenSim/Region/Framework/Scenes/SceneManager.cs | 122 ------------------------ 1 file changed, 122 deletions(-) (limited to 'OpenSim/Region/Framework/Scenes/SceneManager.cs') diff --git a/OpenSim/Region/Framework/Scenes/SceneManager.cs b/OpenSim/Region/Framework/Scenes/SceneManager.cs index 091a2d5..1843e2c 100644 --- a/OpenSim/Region/Framework/Scenes/SceneManager.cs +++ b/OpenSim/Region/Framework/Scenes/SceneManager.cs @@ -540,127 +540,5 @@ namespace OpenSim.Region.Framework.Scenes { m_localScenes.ForEach(action); } - - public void CacheJ2kDecode(int threads) - { - if (threads < 1) threads = 1; - - IJ2KDecoder m_decoder = m_localScenes[0].RequestModuleInterface(); - - List assetRequestList = new List(); - - #region AssetGathering! - foreach (Scene scene in m_localScenes) - { - List entitles = scene.GetEntities(); - foreach (EntityBase entity in entitles) - { - if (entity is SceneObjectGroup) - { - SceneObjectGroup sog = (SceneObjectGroup) entity; - foreach (SceneObjectPart part in sog.Children.Values) - { - if (part.Shape != null) - { - if (part.Shape.TextureEntry.Length > 0) - { - OpenMetaverse.Primitive.TextureEntry te = - new Primitive.TextureEntry(part.Shape.TextureEntry, 0, - part.Shape.TextureEntry.Length); - if (te.DefaultTexture != null) // this has been null for some reason... - { - if (te.DefaultTexture.TextureID != UUID.Zero) - assetRequestList.Add(te.DefaultTexture.TextureID); - } - for (int i=0; i arrvalus = new List(); - - //split into separate arrays - for (int j = 0; j < threads; j++) - { - List val = new List(); - - for (int k = j * entries_per_thread; k < ((j + 1) * entries_per_thread); k++) - { - if (k < arrAssetRequestList.Length) - { - val.Add(arrAssetRequestList[k]); - } - - } - arrvalus.Add(val.ToArray()); - } - - for (int l = 0; l < arrvalus.Count; l++) - { - DecodeThreadContents threadworkItem = new DecodeThreadContents(); - threadworkItem.sn = m_localScenes[0]; - threadworkItem.j2kdecode = m_decoder; - threadworkItem.arrassets = arrvalus[l]; - - System.Threading.Thread decodethread = - new System.Threading.Thread(new System.Threading.ParameterizedThreadStart(threadworkItem.run)); - - threadworkItem.SetThread(decodethread); - - decodethread.Priority = System.Threading.ThreadPriority.Lowest; - decodethread.Name = "J2kCacheDecodeThread_" + l + 1; - ThreadTracker.Add(decodethread); - decodethread.Start(); - - } - } - } - - public class DecodeThreadContents - { - public Scene sn; - public UUID[] arrassets; - public IJ2KDecoder j2kdecode; - private System.Threading.Thread thisthread; - - public void run(object o) - { - for (int i=0;i