summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
authorLeslie Linden <leslie@lindenlab.com>2011-11-23 13:44:56 -0800
committerLeslie Linden <leslie@lindenlab.com>2011-11-23 13:44:56 -0800
commite09f8e651a87e92a64c49bf0107dc7fee80bc5ef (patch)
tree2db160d79ba3f5dc2a80ad9148685d1fdac1d2dd /indra/newview
parent619cda179d28a9d62732a952d349dff76fd57180 (diff)
SH-2712 FIX -- added caching to isFullyLoaded
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/llvoavatar.cpp8
-rw-r--r--indra/newview/llvoavatar.h3
2 files changed, 6 insertions, 5 deletions
diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp
index a3550000df..d69d1a7962 100644
--- a/indra/newview/llvoavatar.cpp
+++ b/indra/newview/llvoavatar.cpp
@@ -690,7 +690,8 @@ LLVOAvatar::LLVOAvatar(const LLUUID& id,
mFullyLoadedInitialized(FALSE),
mSupportsAlphaLayers(FALSE),
mLoadedCallbacksPaused(FALSE),
- mHasPelvisOffset( FALSE )
+ mHasPelvisOffset( FALSE ),
+ mRenderUnloadedAvatar(LLCachedControl<bool>(gSavedSettings, "RenderUnloadedAvatar"))
{
LLMemType mt(LLMemType::MTYPE_AVATAR);
//VTResume(); // VTune
@@ -6493,10 +6494,7 @@ BOOL LLVOAvatar::processFullyLoadedChange(bool loading)
BOOL LLVOAvatar::isFullyLoaded() const
{
- if (gSavedSettings.getBOOL("RenderUnloadedAvatar"))
- return TRUE;
- else
- return mFullyLoaded;
+ return (mRenderUnloadedAvatar || mFullyLoaded);
}
bool LLVOAvatar::isTooComplex() const
diff --git a/indra/newview/llvoavatar.h b/indra/newview/llvoavatar.h
index e53b8e3f4b..59796370ae 100644
--- a/indra/newview/llvoavatar.h
+++ b/indra/newview/llvoavatar.h
@@ -40,6 +40,7 @@
#include "lldrawpoolalpha.h"
#include "llviewerobject.h"
#include "llcharacter.h"
+#include "llcontrol.h"
#include "llviewerjointmesh.h"
#include "llviewerjointattachment.h"
#include "llrendertarget.h"
@@ -450,6 +451,8 @@ private:
F32 mImpostorDistance;
F32 mImpostorPixelArea;
LLVector3 mLastAnimExtents[2];
+
+ LLCachedControl<bool> mRenderUnloadedAvatar;
//--------------------------------------------------------------------
// Wind rippling in clothes