diff options
author | Justin Clarke Casey | 2009-02-16 19:15:16 +0000 |
---|---|---|
committer | Justin Clarke Casey | 2009-02-16 19:15:16 +0000 |
commit | 93837807ffb24e5811368063b9231a9d8b018d9d (patch) | |
tree | 5da8dcbc3fd6e6e4c7003e486f0ad26bd7c43d87 /OpenSim/Region/CoreModules | |
parent | * Iniital inventory archive test code. Doesn't actually do any testing yet (diff) | |
download | opensim-SC_OLD-93837807ffb24e5811368063b9231a9d8b018d9d.zip opensim-SC_OLD-93837807ffb24e5811368063b9231a9d8b018d9d.tar.gz opensim-SC_OLD-93837807ffb24e5811368063b9231a9d8b018d9d.tar.bz2 opensim-SC_OLD-93837807ffb24e5811368063b9231a9d8b018d9d.tar.xz |
* refactor: remove AssetCache field hanging off Scene
* This is always available at Scene.CommsManager.AssetCache
Diffstat (limited to 'OpenSim/Region/CoreModules')
8 files changed, 12 insertions, 11 deletions
diff --git a/OpenSim/Region/CoreModules/Agent/Capabilities/CapabilitiesModule.cs b/OpenSim/Region/CoreModules/Agent/Capabilities/CapabilitiesModule.cs index 6327466..2c6b51d 100644 --- a/OpenSim/Region/CoreModules/Agent/Capabilities/CapabilitiesModule.cs +++ b/OpenSim/Region/CoreModules/Agent/Capabilities/CapabilitiesModule.cs | |||
@@ -86,7 +86,7 @@ namespace OpenSim.Region.CoreModules.Agent.Capabilities | |||
86 | 86 | ||
87 | Caps caps | 87 | Caps caps |
88 | = new Caps( | 88 | = new Caps( |
89 | m_scene.AssetCache, m_scene.CommsManager.HttpServer, m_scene.RegionInfo.ExternalHostName, | 89 | m_scene.CommsManager.AssetCache, m_scene.CommsManager.HttpServer, m_scene.RegionInfo.ExternalHostName, |
90 | m_scene.CommsManager.HttpServer.Port, | 90 | m_scene.CommsManager.HttpServer.Port, |
91 | capsObjectPath, agentId, m_scene.DumpAssetsToFile, m_scene.RegionInfo.RegionName); | 91 | capsObjectPath, agentId, m_scene.DumpAssetsToFile, m_scene.RegionInfo.RegionName); |
92 | 92 | ||
diff --git a/OpenSim/Region/CoreModules/Agent/TextureDownload/UserTextureDownloadService.cs b/OpenSim/Region/CoreModules/Agent/TextureDownload/UserTextureDownloadService.cs index 2f98bab..ae71fda 100644 --- a/OpenSim/Region/CoreModules/Agent/TextureDownload/UserTextureDownloadService.cs +++ b/OpenSim/Region/CoreModules/Agent/TextureDownload/UserTextureDownloadService.cs | |||
@@ -152,7 +152,7 @@ namespace OpenSim.Region.CoreModules.Agent.TextureDownload | |||
152 | TextureSender.TextureSender requestHandler = new TextureSender.TextureSender(m_client, e.DiscardLevel, e.PacketNumber); | 152 | TextureSender.TextureSender requestHandler = new TextureSender.TextureSender(m_client, e.DiscardLevel, e.PacketNumber); |
153 | m_textureSenders.Add(e.RequestedAssetID, requestHandler); | 153 | m_textureSenders.Add(e.RequestedAssetID, requestHandler); |
154 | 154 | ||
155 | m_scene.AssetCache.GetAsset(e.RequestedAssetID, TextureCallback, true); | 155 | m_scene.CommsManager.AssetCache.GetAsset(e.RequestedAssetID, TextureCallback, true); |
156 | } | 156 | } |
157 | } | 157 | } |
158 | } | 158 | } |
diff --git a/OpenSim/Region/CoreModules/Hypergrid/HGStandaloneAssetService.cs b/OpenSim/Region/CoreModules/Hypergrid/HGStandaloneAssetService.cs index c70f65c..7caa786 100644 --- a/OpenSim/Region/CoreModules/Hypergrid/HGStandaloneAssetService.cs +++ b/OpenSim/Region/CoreModules/Hypergrid/HGStandaloneAssetService.cs | |||
@@ -114,7 +114,8 @@ namespace OpenSim.Region.CoreModules.Hypergrid | |||
114 | 114 | ||
115 | protected void AddHttpHandlers(Scene m_scene) | 115 | protected void AddHttpHandlers(Scene m_scene) |
116 | { | 116 | { |
117 | IAssetDataPlugin m_assetProvider = ((AssetServerBase)m_scene.AssetCache.AssetServer).AssetProviderPlugin; | 117 | IAssetDataPlugin m_assetProvider |
118 | = ((AssetServerBase)m_scene.CommsManager.AssetCache.AssetServer).AssetProviderPlugin; | ||
118 | 119 | ||
119 | BaseHttpServer httpServer = m_scene.CommsManager.HttpServer; | 120 | BaseHttpServer httpServer = m_scene.CommsManager.HttpServer; |
120 | httpServer.AddStreamHandler(new GetAssetStreamHandler(m_assetProvider)); | 121 | httpServer.AddStreamHandler(new GetAssetStreamHandler(m_assetProvider)); |
diff --git a/OpenSim/Region/CoreModules/Scripting/DynamicTexture/DynamicTextureModule.cs b/OpenSim/Region/CoreModules/Scripting/DynamicTexture/DynamicTextureModule.cs index 121dc3c..d6f0713 100644 --- a/OpenSim/Region/CoreModules/Scripting/DynamicTexture/DynamicTextureModule.cs +++ b/OpenSim/Region/CoreModules/Scripting/DynamicTexture/DynamicTextureModule.cs | |||
@@ -212,7 +212,7 @@ namespace OpenSim.Region.CoreModules.Scripting.DynamicTexture | |||
212 | if (BlendWithOldTexture) | 212 | if (BlendWithOldTexture) |
213 | { | 213 | { |
214 | UUID lastTextureID = part.Shape.Textures.DefaultTexture.TextureID; | 214 | UUID lastTextureID = part.Shape.Textures.DefaultTexture.TextureID; |
215 | oldAsset = scene.AssetCache.GetAsset(lastTextureID, true); | 215 | oldAsset = scene.CommsManager.AssetCache.GetAsset(lastTextureID, true); |
216 | if (oldAsset != null) | 216 | if (oldAsset != null) |
217 | { | 217 | { |
218 | assetData = BlendTextures(data, oldAsset.Data, SetNewFrontAlpha, FrontAlpha); | 218 | assetData = BlendTextures(data, oldAsset.Data, SetNewFrontAlpha, FrontAlpha); |
@@ -238,7 +238,7 @@ namespace OpenSim.Region.CoreModules.Scripting.DynamicTexture | |||
238 | asset.Metadata.Description = "dynamic image"; | 238 | asset.Metadata.Description = "dynamic image"; |
239 | asset.Metadata.Local = false; | 239 | asset.Metadata.Local = false; |
240 | asset.Metadata.Temporary = true; | 240 | asset.Metadata.Temporary = true; |
241 | scene.AssetCache.AddAsset(asset); | 241 | scene.CommsManager.AssetCache.AddAsset(asset); |
242 | 242 | ||
243 | LastAssetID = asset.Metadata.FullID; | 243 | LastAssetID = asset.Metadata.FullID; |
244 | 244 | ||
@@ -254,7 +254,7 @@ namespace OpenSim.Region.CoreModules.Scripting.DynamicTexture | |||
254 | 254 | ||
255 | // remove the old asset from the cache | 255 | // remove the old asset from the cache |
256 | UUID oldID = tmptex.DefaultTexture.TextureID; | 256 | UUID oldID = tmptex.DefaultTexture.TextureID; |
257 | scene.AssetCache.ExpireAsset(oldID); | 257 | scene.CommsManager.AssetCache.ExpireAsset(oldID); |
258 | 258 | ||
259 | tmptex.DefaultTexture.TextureID = asset.Metadata.FullID; | 259 | tmptex.DefaultTexture.TextureID = asset.Metadata.FullID; |
260 | // I'm pretty sure we always want to force this to true | 260 | // I'm pretty sure we always want to force this to true |
diff --git a/OpenSim/Region/CoreModules/World/Archiver/ArchiveReadRequest.cs b/OpenSim/Region/CoreModules/World/Archiver/ArchiveReadRequest.cs index 9497869..66fc43b 100644 --- a/OpenSim/Region/CoreModules/World/Archiver/ArchiveReadRequest.cs +++ b/OpenSim/Region/CoreModules/World/Archiver/ArchiveReadRequest.cs | |||
@@ -297,7 +297,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver | |||
297 | asset.Metadata.Type = assetType; | 297 | asset.Metadata.Type = assetType; |
298 | asset.Data = data; | 298 | asset.Data = data; |
299 | 299 | ||
300 | m_scene.AssetCache.AddAsset(asset); | 300 | m_scene.CommsManager.AssetCache.AddAsset(asset); |
301 | 301 | ||
302 | /** | 302 | /** |
303 | * Create layers on decode for image assets. This is likely to significantly increase the time to load archives so | 303 | * Create layers on decode for image assets. This is likely to significantly increase the time to load archives so |
diff --git a/OpenSim/Region/CoreModules/World/Archiver/ArchiveWriteRequestPreparation.cs b/OpenSim/Region/CoreModules/World/Archiver/ArchiveWriteRequestPreparation.cs index bd36779..139dff0 100644 --- a/OpenSim/Region/CoreModules/World/Archiver/ArchiveWriteRequestPreparation.cs +++ b/OpenSim/Region/CoreModules/World/Archiver/ArchiveWriteRequestPreparation.cs | |||
@@ -104,7 +104,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver | |||
104 | protected AssetBase GetAsset(UUID uuid) | 104 | protected AssetBase GetAsset(UUID uuid) |
105 | { | 105 | { |
106 | m_waitingForObjectAsset = true; | 106 | m_waitingForObjectAsset = true; |
107 | m_scene.AssetCache.GetAsset(uuid, AssetRequestCallback, true); | 107 | m_scene.CommsManager.AssetCache.GetAsset(uuid, AssetRequestCallback, true); |
108 | 108 | ||
109 | // The asset cache callback can either | 109 | // The asset cache callback can either |
110 | // | 110 | // |
@@ -324,7 +324,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver | |||
324 | m_scene, | 324 | m_scene, |
325 | m_saveStream); | 325 | m_saveStream); |
326 | 326 | ||
327 | new AssetsRequest(assetUuids.Keys, m_scene.AssetCache, awre.ReceivedAllAssets).Execute(); | 327 | new AssetsRequest(assetUuids.Keys, m_scene.CommsManager.AssetCache, awre.ReceivedAllAssets).Execute(); |
328 | } | 328 | } |
329 | } | 329 | } |
330 | } | 330 | } |
diff --git a/OpenSim/Region/CoreModules/World/WorldMap/TexturedMapTileRenderer.cs b/OpenSim/Region/CoreModules/World/WorldMap/TexturedMapTileRenderer.cs index 2e018d3..69d3dac 100644 --- a/OpenSim/Region/CoreModules/World/WorldMap/TexturedMapTileRenderer.cs +++ b/OpenSim/Region/CoreModules/World/WorldMap/TexturedMapTileRenderer.cs | |||
@@ -159,7 +159,7 @@ namespace OpenSim.Region.CoreModules.World.WorldMap | |||
159 | // will wait anyway) | 159 | // will wait anyway) |
160 | private Bitmap fetchTexture(UUID id) | 160 | private Bitmap fetchTexture(UUID id) |
161 | { | 161 | { |
162 | AssetBase asset = m_scene.AssetCache.GetAsset(id, true); | 162 | AssetBase asset = m_scene.CommsManager.AssetCache.GetAsset(id, true); |
163 | m_log.DebugFormat("Fetched texture {0}, found: {1}", id, asset != null); | 163 | m_log.DebugFormat("Fetched texture {0}, found: {1}", id, asset != null); |
164 | if (asset == null) return null; | 164 | if (asset == null) return null; |
165 | 165 | ||
diff --git a/OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs b/OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs index 9355374..e1c3d85 100644 --- a/OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs +++ b/OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs | |||
@@ -738,7 +738,7 @@ namespace OpenSim.Region.CoreModules.World.WorldMap | |||
738 | imgstream = new MemoryStream(); | 738 | imgstream = new MemoryStream(); |
739 | 739 | ||
740 | // non-async because we know we have the asset immediately. | 740 | // non-async because we know we have the asset immediately. |
741 | AssetBase mapasset = m_scene.AssetCache.GetAsset(m_scene.RegionInfo.lastMapUUID, true); | 741 | AssetBase mapasset = m_scene.CommsManager.AssetCache.GetAsset(m_scene.RegionInfo.lastMapUUID, true); |
742 | 742 | ||
743 | // Decode image to System.Drawing.Image | 743 | // Decode image to System.Drawing.Image |
744 | if (OpenJPEG.DecodeToImage(mapasset.Data, out managedImage, out image)) | 744 | if (OpenJPEG.DecodeToImage(mapasset.Data, out managedImage, out image)) |