From 84947a22ad2c2ccb91733e171566433731eb0f48 Mon Sep 17 00:00:00 2001 From: Mattes D Date: Mon, 15 Sep 2014 17:20:54 +0200 Subject: QtBiomeVisualiser: removed multithreading. It was slowing things down, the granularity is too fine. --- Tools/QtBiomeVisualiser/ChunkSource.h | 20 +++----------------- 1 file changed, 3 insertions(+), 17 deletions(-) (limited to 'Tools/QtBiomeVisualiser/ChunkSource.h') diff --git a/Tools/QtBiomeVisualiser/ChunkSource.h b/Tools/QtBiomeVisualiser/ChunkSource.h index 7bbdda276..a485e473a 100644 --- a/Tools/QtBiomeVisualiser/ChunkSource.h +++ b/Tools/QtBiomeVisualiser/ChunkSource.h @@ -49,25 +49,11 @@ protected: /** Path to the world.ini file from which the m_WorldIni is regenerated on reload requests. */ QString m_WorldIniPath; - /** Parsed contents of the world.ini file from which the biome generators are initialized. - Locked by m_Mtx to avoid multithreaded access. */ - std::unique_ptr m_WorldIni; + /** The generator used for generating biomes. */ + std::unique_ptr m_BiomeGen; - /** List of cBiomeGen instances that are "free" - aren't doing any generating at this moment. - Locked by m_Mtx to avoid multithreaded access. */ - std::vector m_AvailableGens; - - /** Guards m_AvailableGens and m_WorldIni against multithreaded access. */ + /** Guards m_BiomeGen against multithreaded access. */ QMutex m_Mtx; - - - /** Returns a cBiomeGen that can generate a new chunk's biomes. - Uses m_AvailableGens as a cache before creating a new generator. */ - cBiomeGenPtr BioGenSource::getBiomeGen(); - - /** Puts the specified BiomeGen back to m_AvailableGens to make it available for next getBiomeGen() request. - Truncates m_AvailableGens if there are too many instances in there. */ - void releaseBiomeGen(cBiomeGenPtr a_BiomeGen); }; -- cgit v1.2.3