summaryrefslogtreecommitdiff
path: root/indra/newview/pipeline.cpp
diff options
context:
space:
mode:
authorPalmer Truelson <palmer@lindenlab.com>2010-02-12 21:06:02 -0800
committerPalmer Truelson <palmer@lindenlab.com>2010-02-12 21:06:02 -0800
commit1f672990e796ec55f7b684dbf46f939d1ab15607 (patch)
tree24435fc8f74b331277afe9cafc60d7e7dcfccabf /indra/newview/pipeline.cpp
parent8e67ecf3dcd5f168806389a1048b2632582feedb (diff)
Backed out davep's optimization pass. changeset 3c3685de430a
Diffstat (limited to 'indra/newview/pipeline.cpp')
-rw-r--r--indra/newview/pipeline.cpp64
1 files changed, 50 insertions, 14 deletions
diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp
index d5f87b73fe..4f4fc83819 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;
@@ -1410,26 +1411,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
@@ -3045,6 +3058,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);
@@ -4778,6 +4797,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;
@@ -4934,6 +4957,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)
{