Refactored the mutex usage in osgText and freetype plugin to prevent multi-thread crash

This commit is contained in:
Robert Osfield
2008-02-25 12:54:54 +00:00
parent 3333ca2b46
commit e869200b3d
10 changed files with 169 additions and 639 deletions

View File

@@ -158,9 +158,6 @@ public:
typedef OpenThreads::Mutex FontMutex;
/** Get the mutex that enables the serialization of calls to this font.*/
static FontMutex* getSerializeFontCallsMutex();
protected:
virtual ~Font();
@@ -173,13 +170,15 @@ protected:
typedef std::map< FontResolution, GlyphMap > FontSizeGlyphMap;
mutable OpenThreads::Mutex _glyphMapMutex;
osg::ref_ptr<osg::TexEnv> _texenv;
osg::ref_ptr<osg::StateSet> _stateset;
FontSizeGlyphMap _sizeGlyphMap;
GlyphTextureList _glyphTextureList;
// current active size of font
FontResolution _fontSize;
FontResolution _fontSize;
unsigned int _margin;
float _marginRatio;

View File

@@ -111,9 +111,6 @@ public:
virtual void setThreadSafeRefUnref(bool threadSafe);
typedef OpenThreads::Mutex Font3DMutex;
/** Get the mutex that enables the serialization of calls to this font.*/
static Font3DMutex* getSerializeFontCallsMutex();
protected: