diff options
author | Dave SIMmONs <simon@lindenlab.com> | 2011-05-12 13:42:51 -0700 |
---|---|---|
committer | Dave SIMmONs <simon@lindenlab.com> | 2011-05-12 13:42:51 -0700 |
commit | 00c5628074dff2a687d737bc30e9dbe2a1ccfbf8 (patch) | |
tree | ad6819435b956dee23c6463d69fe26caa89d912d /indra/llrender/llgl.cpp | |
parent | 11f988cd09daa8f33a21b7f82201e4b59e8a04ad (diff) | |
parent | 6fcf9e4817a5c245f7779dd030b0ba75dab10e5e (diff) |
Merge lindenlab/viewer-development
Diffstat (limited to 'indra/llrender/llgl.cpp')
-rw-r--r-- | indra/llrender/llgl.cpp | 29 |
1 files changed, 8 insertions, 21 deletions
diff --git a/indra/llrender/llgl.cpp b/indra/llrender/llgl.cpp index c86c89fa9b..b1a4051e96 100644 --- a/indra/llrender/llgl.cpp +++ b/indra/llrender/llgl.cpp @@ -105,7 +105,6 @@ LLMatrix4 gGLObliqueProjectionInverse; #define LL_GL_NAME_POOLING 0 -LLGLNamePool::pool_list_t LLGLNamePool::sInstances; std::list<LLGLUpdate*> LLGLUpdate::sGLQ; #if (LL_WINDOWS || LL_LINUX || LL_SOLARIS) && !LL_MESA_HEADLESS @@ -1920,22 +1919,8 @@ LLGLNamePool::LLGLNamePool() { } -void LLGLNamePool::registerPool(LLGLNamePool* pool) -{ - pool_list_t::iterator iter = std::find(sInstances.begin(), sInstances.end(), pool); - if (iter == sInstances.end()) - { - sInstances.push_back(pool); - } -} - LLGLNamePool::~LLGLNamePool() { - pool_list_t::iterator iter = std::find(sInstances.begin(), sInstances.end(), this); - if (iter != sInstances.end()) - { - sInstances.erase(iter); - } } void LLGLNamePool::upkeep() @@ -2004,20 +1989,22 @@ void LLGLNamePool::release(GLuint name) void LLGLNamePool::upkeepPools() { LLMemType mt(LLMemType::MTYPE_UPKEEP_POOLS); - for (pool_list_t::iterator iter = sInstances.begin(); iter != sInstances.end(); ++iter) + tracker_t::LLInstanceTrackerScopedGuard guard; + for (tracker_t::instance_iter iter = guard.beginInstances(); iter != guard.endInstances(); ++iter) { - LLGLNamePool* pool = *iter; - pool->upkeep(); + LLGLNamePool & pool = *iter; + pool.upkeep(); } } //static void LLGLNamePool::cleanupPools() { - for (pool_list_t::iterator iter = sInstances.begin(); iter != sInstances.end(); ++iter) + tracker_t::LLInstanceTrackerScopedGuard guard; + for (tracker_t::instance_iter iter = guard.beginInstances(); iter != guard.endInstances(); ++iter) { - LLGLNamePool* pool = *iter; - pool->cleanup(); + LLGLNamePool & pool = *iter; + pool.cleanup(); } } |