diff options
author | Palmer Truelson <palmer@lindenlab.com> | 2010-02-12 21:06:25 -0800 |
---|---|---|
committer | Palmer Truelson <palmer@lindenlab.com> | 2010-02-12 21:06:25 -0800 |
commit | 3b8463f0fd5f0b2cd54840c34a7a7e303954f768 (patch) | |
tree | a8c303cc592266109b368a4ae6093e8d2c3cf10f /indra/newview/pipeline.cpp | |
parent | 660c3b182c12ce0842334127782abc7c3cfba860 (diff) | |
parent | 1f672990e796ec55f7b684dbf46f939d1ab15607 (diff) |
merge
Diffstat (limited to 'indra/newview/pipeline.cpp')
-rw-r--r-- | indra/newview/pipeline.cpp | 64 |
1 files changed, 50 insertions, 14 deletions
diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp index 6e2fa14c75..dd9634a234 100644 --- a/indra/newview/pipeline.cpp +++ b/indra/newview/pipeline.cpp @@ -116,6 +116,7 @@ const F32 BACKLIGHT_DAY_MAGNITUDE_AVATAR = 0.2f; const F32 BACKLIGHT_NIGHT_MAGNITUDE_AVATAR = 0.1f; const F32 BACKLIGHT_DAY_MAGNITUDE_OBJECT = 0.1f; const F32 BACKLIGHT_NIGHT_MAGNITUDE_OBJECT = 0.08f; +const S32 MAX_ACTIVE_OBJECT_QUIET_FRAMES = 40; const S32 MAX_OFFSCREEN_GEOMETRY_CHANGES_PER_FRAME = 10; const U32 REFLECTION_MAP_RES = 128; @@ -1411,26 +1412,38 @@ void LLPipeline::updateMove() assertInitialized(); + for (LLDrawable::drawable_set_t::iterator iter = mRetexturedList.begin(); + iter != mRetexturedList.end(); ++iter) { - static LLFastTimer::DeclareTimer ftm("Retexture"); - LLFastTimer t(ftm); - - for (LLDrawable::drawable_set_t::iterator iter = mRetexturedList.begin(); - iter != mRetexturedList.end(); ++iter) + LLDrawable* drawablep = *iter; + if (drawablep && !drawablep->isDead()) { - LLDrawable* drawablep = *iter; - if (drawablep && !drawablep->isDead()) - { - drawablep->updateTexture(); - } + drawablep->updateTexture(); } - mRetexturedList.clear(); } + mRetexturedList.clear(); + updateMovedList(mMovedList); + + for (LLDrawable::drawable_set_t::iterator iter = mActiveQ.begin(); + iter != mActiveQ.end(); ) { - static LLFastTimer::DeclareTimer ftm("Moved List"); - LLFastTimer t(ftm); - updateMovedList(mMovedList); + LLDrawable::drawable_set_t::iterator curiter = iter++; + LLDrawable* drawablep = *curiter; + if (drawablep && !drawablep->isDead()) + { + if (drawablep->isRoot() && + drawablep->mQuietCount++ > MAX_ACTIVE_OBJECT_QUIET_FRAMES && + (!drawablep->getParent() || !drawablep->getParent()->isActive())) + { + drawablep->makeStatic(); // removes drawable and its children from mActiveQ + iter = mActiveQ.upper_bound(drawablep); // next valid entry + } + } + else + { + mActiveQ.erase(curiter); + } } //balance octrees @@ -3046,6 +3059,12 @@ void LLPipeline::renderGeom(LLCamera& camera, BOOL forceVBOUpdate) } } + if (gPipeline.hasRenderDebugMask(LLPipeline::RENDER_DEBUG_PICKING)) + { + LLAppViewer::instance()->pingMainloopTimeout("Pipeline:RenderForSelect"); + gObjectList.renderObjectsForSelect(camera, gViewerWindow->getWindowRectScaled()); + } + else { LLFastTimer t(FTM_POOLS); @@ -4779,6 +4798,10 @@ void LLPipeline::findReferences(LLDrawable *drawablep) llinfos << "In mRetexturedList" << llendl; } + if (mActiveQ.find(drawablep) != mActiveQ.end()) + { + llinfos << "In mActiveQ" << llendl; + } if (std::find(mBuildQ1.begin(), mBuildQ1.end(), drawablep) != mBuildQ1.end()) { llinfos << "In mBuildQ1" << llendl; @@ -4935,6 +4958,19 @@ void LLPipeline::setLight(LLDrawable *drawablep, BOOL is_light) } } +void LLPipeline::setActive(LLDrawable *drawablep, BOOL active) +{ + assertInitialized(); + if (active) + { + mActiveQ.insert(drawablep); + } + else + { + mActiveQ.erase(drawablep); + } +} + //static void LLPipeline::toggleRenderType(U32 type) { |