summaryrefslogtreecommitdiff
path: root/indra/newview/llviewertexture.cpp
diff options
context:
space:
mode:
authorDave Parks <davep@lindenlab.com>2012-11-07 16:03:54 -0600
committerDave Parks <davep@lindenlab.com>2012-11-07 16:03:54 -0600
commita36b66bd145e99a8f597f1c7c3b48ca30bdd7029 (patch)
tree16975fa96600b25e8243fc5152998556370262fb /indra/newview/llviewertexture.cpp
parent9ff687218af74000c7281e0579d17ef2930c6e33 (diff)
MAINT-1815 Fix for excessive memory usage in Mayfair. Disable tcmalloc. Disable private memory pools. Make viewer large address aware on windows.
Reviewed by Kelly
Diffstat (limited to 'indra/newview/llviewertexture.cpp')
-rw-r--r--indra/newview/llviewertexture.cpp34
1 files changed, 30 insertions, 4 deletions
diff --git a/indra/newview/llviewertexture.cpp b/indra/newview/llviewertexture.cpp
index 7f638a24bf..808781ea93 100644
--- a/indra/newview/llviewertexture.cpp
+++ b/indra/newview/llviewertexture.cpp
@@ -619,6 +619,7 @@ LLViewerTexture::~LLViewerTexture()
void LLViewerTexture::init(bool firstinit)
{
mBoostLevel = LLViewerTexture::BOOST_NONE;
+ mSelectedTime = 0.f;
mFullWidth = 0;
mFullHeight = 0;
@@ -674,11 +675,18 @@ void LLViewerTexture::setBoostLevel(S32 level)
if(mBoostLevel != level)
{
mBoostLevel = level ;
- if(mBoostLevel != LLViewerTexture::BOOST_NONE)
+ if(mBoostLevel != LLViewerTexture::BOOST_NONE &&
+ mBoostLevel != LLViewerTexture::BOOST_SELECTED)
{
setNoDelete() ;
}
}
+
+ if (mBoostLevel == LLViewerTexture::BOOST_SELECTED)
+ {
+ mSelectedTime = gFrameTimeSeconds;
+ }
+
}
@@ -1865,13 +1873,31 @@ void LLViewerFetchedTexture::updateVirtualSize()
for(U32 i = 0 ; i < mNumFaces ; i++)
{
LLFace* facep = mFaceList[i] ;
- if(facep->getDrawable()->isRecentlyVisible())
+ LLDrawable* drawable = facep->getDrawable();
+ if (drawable)
{
- addTextureStats(facep->getVirtualSize()) ;
- setAdditionalDecodePriority(facep->getImportanceToCamera()) ;
+ if(drawable->isRecentlyVisible())
+ {
+ if (getBoostLevel() == LLViewerTexture::BOOST_NONE &&
+ drawable->getVObj() && drawable->getVObj()->isSelected())
+ {
+ setBoostLevel(LLViewerTexture::BOOST_SELECTED);
+ }
+ addTextureStats(facep->getVirtualSize()) ;
+ setAdditionalDecodePriority(facep->getImportanceToCamera()) ;
+ }
}
}
+ //reset whether or not a face was selected after 10 seconds
+ const F32 SELECTION_RESET_TIME = 10.f;
+
+ if (getBoostLevel() == LLViewerTexture::BOOST_SELECTED &&
+ gFrameTimeSeconds - mSelectedTime > SELECTION_RESET_TIME)
+ {
+ setBoostLevel(LLViewerTexture::BOOST_NONE);
+ }
+
if(mMaxVirtualSizeResetCounter > 0)
{
mMaxVirtualSizeResetCounter--;