aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorAliciaRaven2015-07-13 11:49:57 +0100
committerMichael Cerquoni2015-07-21 15:11:47 -0400
commit297d31b1c2ab9ddb5f251ebbfdd36aa6d69a5a4c (patch)
tree487ce1f4c86026056a92a9b0c942f50bf16e789b
parentCorrecting errors in previous change: MySQL needs int unsigned, not (diff)
downloadopensim-SC-297d31b1c2ab9ddb5f251ebbfdd36aa6d69a5a4c.zip
opensim-SC-297d31b1c2ab9ddb5f251ebbfdd36aa6d69a5a4c.tar.gz
opensim-SC-297d31b1c2ab9ddb5f251ebbfdd36aa6d69a5a4c.tar.bz2
opensim-SC-297d31b1c2ab9ddb5f251ebbfdd36aa6d69a5a4c.tar.xz
Prevent two maptiles being generated at startup, one for v1 and another for v2-3 service. * v1 Service (WorldMapModule) is called directly by scene on startup. This patch moves the initial map registration of the v2-3 service (MapImageServiceModule) to that point so they can share the bitmap instead of doubling the work of Warp3D and exasperate its memory leak issues.
Signed-off-by: Michael Cerquoni <nebadon2025@gmail.com>
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/CoreModules/ServiceConnectorsOut/MapImage/MapImageServiceModule.cs4
-rw-r--r--OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs6
2 files changed, 9 insertions, 1 deletions
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/MapImage/MapImageServiceModule.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/MapImage/MapImageServiceModule.cs
index 7dfe53a..860a526 100644
--- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/MapImage/MapImageServiceModule.cs
+++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/MapImage/MapImageServiceModule.cs
@@ -151,7 +151,9 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.MapImage
151 lock (m_scenes) 151 lock (m_scenes)
152 m_scenes[scene.RegionInfo.RegionID] = scene; 152 m_scenes[scene.RegionInfo.RegionID] = scene;
153 153
154 scene.EventManager.OnRegionReadyStatusChange += s => { if (s.Ready) UploadMapTile(s); }; 154 // v2 Map generation on startup is now handled by scene to allow bmp to be shared with
155 // v1 service and not generate map tiles twice as was previous behavior
156 //scene.EventManager.OnRegionReadyStatusChange += s => { if (s.Ready) UploadMapTile(s); };
155 157
156 scene.RegisterModuleInterface<IMapImageUploadModule>(this); 158 scene.RegisterModuleInterface<IMapImageUploadModule>(this);
157 } 159 }
diff --git a/OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs b/OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs
index 767f75f..db1187e 100644
--- a/OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs
+++ b/OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs
@@ -1462,7 +1462,13 @@ namespace OpenSim.Region.CoreModules.World.WorldMap
1462 m_log.DebugFormat("[WORLD MAP]: Generating map image for {0}", m_scene.Name); 1462 m_log.DebugFormat("[WORLD MAP]: Generating map image for {0}", m_scene.Name);
1463 1463
1464 using (Bitmap mapbmp = m_mapImageGenerator.CreateMapTile()) 1464 using (Bitmap mapbmp = m_mapImageGenerator.CreateMapTile())
1465 {
1466 // V1 (This Module)
1465 GenerateMaptile(mapbmp); 1467 GenerateMaptile(mapbmp);
1468
1469 // v2/3 (MapImageServiceModule)
1470 m_mapImageServiceModule.UploadMapTile(m_scene, mapbmp);
1471 }
1466 } 1472 }
1467 1473
1468 private void GenerateMaptile(Bitmap mapbmp) 1474 private void GenerateMaptile(Bitmap mapbmp)