diff options
author | Mattes D <github@xoft.cz> | 2014-09-15 17:20:54 +0200 |
---|---|---|
committer | Mattes D <github@xoft.cz> | 2014-09-15 17:20:54 +0200 |
commit | 84947a22ad2c2ccb91733e171566433731eb0f48 (patch) | |
tree | f7e7d4b66dade1d47798f7661429e8c040b86883 /Tools/QtBiomeVisualiser/ChunkSource.h | |
parent | QtBiomeVisualiser: Added multithreading. (diff) | |
download | cuberite-84947a22ad2c2ccb91733e171566433731eb0f48.tar cuberite-84947a22ad2c2ccb91733e171566433731eb0f48.tar.gz cuberite-84947a22ad2c2ccb91733e171566433731eb0f48.tar.bz2 cuberite-84947a22ad2c2ccb91733e171566433731eb0f48.tar.lz cuberite-84947a22ad2c2ccb91733e171566433731eb0f48.tar.xz cuberite-84947a22ad2c2ccb91733e171566433731eb0f48.tar.zst cuberite-84947a22ad2c2ccb91733e171566433731eb0f48.zip |
Diffstat (limited to 'Tools/QtBiomeVisualiser/ChunkSource.h')
-rw-r--r-- | Tools/QtBiomeVisualiser/ChunkSource.h | 20 |
1 files changed, 3 insertions, 17 deletions
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<cIniFile> m_WorldIni; + /** The generator used for generating biomes. */ + std::unique_ptr<cBiomeGen> 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<cBiomeGenPtr> 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); }; |