summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview')
-rwxr-xr-xindra/newview/lldrawable.cpp4
-rwxr-xr-xindra/newview/lldrawable.h2
-rwxr-xr-xindra/newview/lldynamictexture.h6
-rwxr-xr-xindra/newview/llface.h21
-rw-r--r--indra/newview/llscenemonitor.cpp8
-rwxr-xr-xindra/newview/llspatialpartition.cpp36
-rwxr-xr-xindra/newview/llspatialpartition.h26
-rw-r--r--indra/newview/llvieweroctree.cpp120
-rw-r--r--indra/newview/llvieweroctree.h90
-rwxr-xr-xindra/newview/llviewerregion.cpp10
-rwxr-xr-xindra/newview/llviewerregion.h4
-rwxr-xr-xindra/newview/llviewerstats.cpp14
-rwxr-xr-xindra/newview/llvoavatar.h6
-rwxr-xr-xindra/newview/llvoavatarself.h10
-rwxr-xr-xindra/newview/llvocache.cpp20
-rwxr-xr-xindra/newview/llvocache.h2
-rwxr-xr-xindra/newview/skins/default/xui/en/floater_stats.xml17
17 files changed, 179 insertions, 217 deletions
diff --git a/indra/newview/lldrawable.cpp b/indra/newview/lldrawable.cpp
index 4b6c80b51a..5981153bd5 100755
--- a/indra/newview/lldrawable.cpp
+++ b/indra/newview/lldrawable.cpp
@@ -1047,7 +1047,7 @@ bool LLDrawable::isVisible() const
}
{
- LLviewerOctreeGroup* group = mEntry->getGroup();
+ LLViewerOctreeGroup* group = mEntry->getGroup();
if (group && group->isVisible())
{
LLViewerOctreeEntryData::setVisible();
@@ -1073,7 +1073,7 @@ bool LLDrawable::isRecentlyVisible() const
return vis ;
}
-void LLDrawable::setGroup(LLviewerOctreeGroup *groupp)
+void LLDrawable::setGroup(LLViewerOctreeGroup *groupp)
{
LLSpatialGroup* cur_groupp = (LLSpatialGroup*)getGroup();
diff --git a/indra/newview/lldrawable.h b/indra/newview/lldrawable.h
index 067cee6838..a3461d4c01 100755
--- a/indra/newview/lldrawable.h
+++ b/indra/newview/lldrawable.h
@@ -176,7 +176,7 @@ public:
virtual void cleanupReferences();
- void setGroup(LLviewerOctreeGroup* group);
+ void setGroup(LLViewerOctreeGroup* group);
void setRadius(const F32 radius);
F32 getRadius() const { return mRadius; }
F32 getVisibilityRadius() const;
diff --git a/indra/newview/lldynamictexture.h b/indra/newview/lldynamictexture.h
index d287ae6eeb..f3f57c9a6b 100755
--- a/indra/newview/lldynamictexture.h
+++ b/indra/newview/lldynamictexture.h
@@ -38,12 +38,12 @@ class LLViewerDynamicTexture : public LLViewerTexture
public:
void* operator new(size_t size)
{
- return ll_aligned_malloc_16(size);
+ return LLTrace::MemTrackable<LLTexture>::aligned_new<16>(size);
}
- void operator delete(void* ptr)
+ void operator delete(void* ptr, size_t size)
{
- ll_aligned_free_16(ptr);
+ LLTrace::MemTrackable<LLTexture>::aligned_delete<16>(ptr, size);
}
enum
diff --git a/indra/newview/llface.h b/indra/newview/llface.h
index 25c87b54f8..40f4968801 100755
--- a/indra/newview/llface.h
+++ b/indra/newview/llface.h
@@ -53,22 +53,11 @@ class LLDrawInfo;
const F32 MIN_ALPHA_SIZE = 1024.f;
const F32 MIN_TEX_ANIM_SIZE = 512.f;
-class LLFace
+class LLFace : public LLTrace::MemTrackableNonVirtual<LLFace, 16>
{
public:
-
- void* operator new(size_t size)
- {
- return ll_aligned_malloc_16(size);
- }
-
- void operator delete(void* ptr)
- {
- ll_aligned_free_16(ptr);
- }
-
-
LLFace(const LLFace& rhs)
+ : LLTrace::MemTrackableNonVirtual<LLFace, 16>("LLFace")
{
*this = rhs;
}
@@ -96,7 +85,11 @@ public:
static void cacheFaceInVRAM(const LLVolumeFace& vf);
public:
- LLFace(LLDrawable* drawablep, LLViewerObject* objp) { init(drawablep, objp); }
+ LLFace(LLDrawable* drawablep, LLViewerObject* objp)
+ : LLTrace::MemTrackableNonVirtual<LLFace, 16>("LLFace")
+ {
+ init(drawablep, objp);
+ }
~LLFace() { destroy(); }
const LLMatrix4& getWorldMatrix() const { return mVObjp->getWorldMatrix(mXform); }
diff --git a/indra/newview/llscenemonitor.cpp b/indra/newview/llscenemonitor.cpp
index c1ebd1f435..db2936b1fd 100644
--- a/indra/newview/llscenemonitor.cpp
+++ b/indra/newview/llscenemonitor.cpp
@@ -546,7 +546,7 @@ void LLSceneMonitor::dumpToFile(std::string file_name)
os << '\n';
- typedef TraceType<CountAccumulator> trace_count;
+ typedef StatType<CountAccumulator> trace_count;
for (trace_count::instance_iter it = trace_count::beginInstances(), end_it = trace_count::endInstances();
it != end_it;
++it)
@@ -579,7 +579,7 @@ void LLSceneMonitor::dumpToFile(std::string file_name)
}
}
- typedef TraceType<EventAccumulator> trace_event;
+ typedef StatType<EventAccumulator> trace_event;
for (trace_event::instance_iter it = trace_event::beginInstances(), end_it = trace_event::endInstances();
it != end_it;
@@ -620,7 +620,7 @@ void LLSceneMonitor::dumpToFile(std::string file_name)
}
}
- typedef TraceType<SampleAccumulator> trace_sample;
+ typedef StatType<SampleAccumulator> trace_sample;
for (trace_sample::instance_iter it = trace_sample::beginInstances(), end_it = trace_sample::endInstances();
it != end_it;
@@ -661,7 +661,7 @@ void LLSceneMonitor::dumpToFile(std::string file_name)
}
}
- typedef TraceType<MemStatAccumulator> trace_mem;
+ typedef StatType<MemAccumulator> trace_mem;
for (trace_mem::instance_iter it = trace_mem::beginInstances(), end_it = trace_mem::endInstances();
it != end_it;
++it)
diff --git a/indra/newview/llspatialpartition.cpp b/indra/newview/llspatialpartition.cpp
index 0fbe1578cf..045fcccad7 100755
--- a/indra/newview/llspatialpartition.cpp
+++ b/indra/newview/llspatialpartition.cpp
@@ -483,7 +483,7 @@ void LLSpatialPartition::rebuildMesh(LLSpatialGroup* group)
LLSpatialGroup* LLSpatialGroup::getParent()
{
- return (LLSpatialGroup*)LLviewerOctreeGroup::getParent();
+ return (LLSpatialGroup*)LLViewerOctreeGroup::getParent();
}
BOOL LLSpatialGroup::removeObject(LLDrawable *drawablep, BOOL from_octree)
@@ -831,7 +831,7 @@ void LLSpatialGroup::handleInsertion(const TreeNode* node, LLViewerOctreeEntry*
void LLSpatialGroup::handleRemoval(const TreeNode* node, LLViewerOctreeEntry* entry)
{
removeObject((LLDrawable*)entry->getDrawable(), TRUE);
- LLviewerOctreeGroup::handleRemoval(node, entry);
+ LLViewerOctreeGroup::handleRemoval(node, entry);
}
void LLSpatialGroup::handleDestruction(const TreeNode* node)
@@ -1065,7 +1065,7 @@ class LLOctreeCull : public LLViewerOctreeCull
public:
LLOctreeCull(LLCamera* camera) : LLViewerOctreeCull(camera) {}
- virtual bool earlyFail(LLviewerOctreeGroup* base_group)
+ virtual bool earlyFail(LLViewerOctreeGroup* base_group)
{
LLSpatialGroup* group = (LLSpatialGroup*)base_group;
group->checkOcclusion();
@@ -1081,7 +1081,7 @@ public:
return false;
}
- virtual S32 frustumCheck(const LLviewerOctreeGroup* group)
+ virtual S32 frustumCheck(const LLViewerOctreeGroup* group)
{
S32 res = AABBInFrustumNoFarClipGroupBounds(group);
if (res != 0)
@@ -1091,7 +1091,7 @@ public:
return res;
}
- virtual S32 frustumCheckObjects(const LLviewerOctreeGroup* group)
+ virtual S32 frustumCheckObjects(const LLViewerOctreeGroup* group)
{
S32 res = AABBInFrustumNoFarClipObjectBounds(group);
if (res != 0)
@@ -1101,7 +1101,7 @@ public:
return res;
}
- virtual void processGroup(LLviewerOctreeGroup* base_group)
+ virtual void processGroup(LLViewerOctreeGroup* base_group)
{
LLSpatialGroup* group = (LLSpatialGroup*)base_group;
if (group->needsUpdate() ||
@@ -1119,12 +1119,12 @@ public:
LLOctreeCullNoFarClip(LLCamera* camera)
: LLOctreeCull(camera) { }
- virtual S32 frustumCheck(const LLviewerOctreeGroup* group)
+ virtual S32 frustumCheck(const LLViewerOctreeGroup* group)
{
return AABBInFrustumNoFarClipGroupBounds(group);
}
- virtual S32 frustumCheckObjects(const LLviewerOctreeGroup* group)
+ virtual S32 frustumCheckObjects(const LLViewerOctreeGroup* group)
{
S32 res = AABBInFrustumNoFarClipObjectBounds(group);
return res;
@@ -1137,12 +1137,12 @@ public:
LLOctreeCullShadow(LLCamera* camera)
: LLOctreeCull(camera) { }
- virtual S32 frustumCheck(const LLviewerOctreeGroup* group)
+ virtual S32 frustumCheck(const LLViewerOctreeGroup* group)
{
return AABBInFrustumGroupBounds(group);
}
- virtual S32 frustumCheckObjects(const LLviewerOctreeGroup* group)
+ virtual S32 frustumCheckObjects(const LLViewerOctreeGroup* group)
{
return AABBInFrustumObjectBounds(group);
}
@@ -1154,7 +1154,7 @@ public:
LLOctreeCullVisExtents(LLCamera* camera, LLVector4a& min, LLVector4a& max)
: LLOctreeCullShadow(camera), mMin(min), mMax(max), mEmpty(TRUE) { }
- virtual bool earlyFail(LLviewerOctreeGroup* base_group)
+ virtual bool earlyFail(LLViewerOctreeGroup* base_group)
{
LLSpatialGroup* group = (LLSpatialGroup*)base_group;
@@ -1195,7 +1195,7 @@ public:
}
}
- virtual void processGroup(LLviewerOctreeGroup* base_group)
+ virtual void processGroup(LLViewerOctreeGroup* base_group)
{
LLSpatialGroup* group = (LLSpatialGroup*)base_group;
@@ -1231,7 +1231,7 @@ public:
LLOctreeCullDetectVisible(LLCamera* camera)
: LLOctreeCullShadow(camera), mResult(FALSE) { }
- virtual bool earlyFail(LLviewerOctreeGroup* base_group)
+ virtual bool earlyFail(LLViewerOctreeGroup* base_group)
{
LLSpatialGroup* group = (LLSpatialGroup*)base_group;
@@ -1246,7 +1246,7 @@ public:
return false;
}
- virtual void processGroup(LLviewerOctreeGroup* base_group)
+ virtual void processGroup(LLViewerOctreeGroup* base_group)
{
if (base_group->isVisible())
{
@@ -1263,10 +1263,10 @@ public:
LLOctreeSelect(LLCamera* camera, std::vector<LLDrawable*>* results)
: LLOctreeCull(camera), mResults(results) { }
- virtual bool earlyFail(LLviewerOctreeGroup* group) { return false; }
- virtual void preprocess(LLviewerOctreeGroup* group) { }
+ virtual bool earlyFail(LLViewerOctreeGroup* group) { return false; }
+ virtual void preprocess(LLViewerOctreeGroup* group) { }
- virtual void processGroup(LLviewerOctreeGroup* base_group)
+ virtual void processGroup(LLViewerOctreeGroup* base_group)
{
LLSpatialGroup* group = (LLSpatialGroup*)base_group;
OctreeNode* branch = group->getOctreeNode();
@@ -3909,7 +3909,7 @@ LLDrawable* LLSpatialPartition::lineSegmentIntersect(const LLVector4a& start, co
LLDrawInfo::LLDrawInfo(U16 start, U16 end, U32 count, U32 offset,
LLViewerTexture* texture, LLVertexBuffer* buffer,
BOOL fullbright, U8 bump, BOOL particle, F32 part_size)
-:
+: LLTrace::MemTrackableNonVirtual<LLDrawInfo, 16>("LLDrawInfo"),
mVertexBuffer(buffer),
mTexture(texture),
mTextureMatrix(NULL),
diff --git a/indra/newview/llspatialpartition.h b/indra/newview/llspatialpartition.h
index 4026175a9a..fef6fdc2c2 100755
--- a/indra/newview/llspatialpartition.h
+++ b/indra/newview/llspatialpartition.h
@@ -55,24 +55,14 @@ class LLViewerRegion;
void pushVerts(LLFace* face, U32 mask);
-class LLDrawInfo : public LLRefCount
+class LLDrawInfo : public LLRefCount, public LLTrace::MemTrackableNonVirtual<LLDrawInfo, 16>
{
protected:
~LLDrawInfo();
public:
- void* operator new(size_t size)
- {
- return ll_aligned_malloc_16(size);
- }
-
- void operator delete(void* ptr)
- {
- ll_aligned_free_16(ptr);
- }
-
-
LLDrawInfo(const LLDrawInfo& rhs)
+ : LLTrace::MemTrackableNonVirtual<LLDrawInfo, 16>("LLDrawInfo")
{
*this = rhs;
}
@@ -209,16 +199,6 @@ public:
*this = rhs;
}
- void* operator new(size_t size)
- {
- return ll_aligned_malloc_16(size);
- }
-
- void operator delete(void* ptr)
- {
- ll_aligned_free_16(ptr);
- }
-
const LLSpatialGroup& operator=(const LLSpatialGroup& rhs)
{
LL_ERRS() << "Illegal operation!" << LL_ENDL;
@@ -262,7 +242,7 @@ public:
typedef enum
{
- GEOM_DIRTY = LLviewerOctreeGroup::INVALID_STATE,
+ GEOM_DIRTY = LLViewerOctreeGroup::INVALID_STATE,
ALPHA_DIRTY = (GEOM_DIRTY << 1),
IN_IMAGE_QUEUE = (ALPHA_DIRTY << 1),
IMAGE_DIRTY = (IN_IMAGE_QUEUE << 1),
diff --git a/indra/newview/llvieweroctree.cpp b/indra/newview/llvieweroctree.cpp
index e8eba43242..5bd0a95387 100644
--- a/indra/newview/llvieweroctree.cpp
+++ b/indra/newview/llvieweroctree.cpp
@@ -231,9 +231,10 @@ S32 AABBSphereIntersectR2(const LLVector4a& min, const LLVector4a& max, const LL
//class LLViewerOctreeEntry definitions
//-----------------------------------------------------------------------------------
LLViewerOctreeEntry::LLViewerOctreeEntry()
- : mGroup(NULL),
- mBinRadius(0.f),
- mBinIndex(-1)
+: LLTrace::MemTrackable<LLViewerOctreeEntry, 16>("LLViewerOctreeEntry"),
+ mGroup(NULL),
+ mBinRadius(0.f),
+ mBinIndex(-1)
{
mPositionGroup.clear();
mExtents[0].clear();
@@ -271,7 +272,7 @@ void LLViewerOctreeEntry::removeData(LLViewerOctreeEntryData* data)
if(mGroup != NULL && !mData[LLDRAWABLE])
{
- LLviewerOctreeGroup* group = mGroup;
+ LLViewerOctreeGroup* group = mGroup;
mGroup = NULL;
group->removeFromGroup(data);
@@ -285,7 +286,7 @@ void LLViewerOctreeEntry::nullGroup()
mGroup = NULL;
}
-void LLViewerOctreeEntry::setGroup(LLviewerOctreeGroup* group)
+void LLViewerOctreeEntry::setGroup(LLViewerOctreeGroup* group)
{
if(mGroup == group)
{
@@ -294,7 +295,7 @@ void LLViewerOctreeEntry::setGroup(LLviewerOctreeGroup* group)
if(mGroup)
{
- LLviewerOctreeGroup* group = mGroup;
+ LLViewerOctreeGroup* group = mGroup;
mGroup = NULL;
group->removeFromGroup(this);
@@ -363,7 +364,7 @@ const LLVector4a* LLViewerOctreeEntryData::getSpatialExtents() const
}
//virtual
-void LLViewerOctreeEntryData::setGroup(LLviewerOctreeGroup* group)
+void LLViewerOctreeEntryData::setGroup(LLViewerOctreeGroup* group)
{
mEntry->setGroup(group);
}
@@ -375,7 +376,7 @@ void LLViewerOctreeEntryData::shift(const LLVector4a &shift_vector)
mEntry->mPositionGroup.add(shift_vector);
}
-LLviewerOctreeGroup* LLViewerOctreeEntryData::getGroup()const
+LLViewerOctreeGroup* LLViewerOctreeEntryData::getGroup()const
{
return mEntry.notNull() ? mEntry->mGroup : NULL;
}
@@ -425,15 +426,16 @@ void LLViewerOctreeEntryData::setVisible() const
}
//-----------------------------------------------------------------------------------
-//class LLviewerOctreeGroup definitions
+//class LLViewerOctreeGroup definitions
//-----------------------------------------------------------------------------------
-LLviewerOctreeGroup::~LLviewerOctreeGroup()
+LLViewerOctreeGroup::~LLViewerOctreeGroup()
{
//empty here
}
-LLviewerOctreeGroup::LLviewerOctreeGroup(OctreeNode* node) :
+LLViewerOctreeGroup::LLViewerOctreeGroup(OctreeNode* node)
+: LLTrace::MemTrackable<LLViewerOctreeGroup, 16>("LLViewerOctreeGroup"),
mOctreeNode(node),
mState(CLEAN)
{
@@ -448,7 +450,7 @@ LLviewerOctreeGroup::LLviewerOctreeGroup(OctreeNode* node) :
mOctreeNode->addListener(this);
}
-bool LLviewerOctreeGroup::hasElement(LLViewerOctreeEntryData* data)
+bool LLViewerOctreeGroup::hasElement(LLViewerOctreeEntryData* data)
{
if(!data->getEntry())
{
@@ -457,12 +459,12 @@ bool LLviewerOctreeGroup::hasElement(LLViewerOctreeEntryData* data)
return std::find(getDataBegin(), getDataEnd(), data->getEntry()) != getDataEnd();
}
-bool LLviewerOctreeGroup::removeFromGroup(LLViewerOctreeEntryData* data)
+bool LLViewerOctreeGroup::removeFromGroup(LLViewerOctreeEntryData* data)
{
return removeFromGroup(data->getEntry());
}
-bool LLviewerOctreeGroup::removeFromGroup(LLViewerOctreeEntry* entry)
+bool LLViewerOctreeGroup::removeFromGroup(LLViewerOctreeEntry* entry)
{
llassert(entry != NULL);
llassert(!entry->getGroup());
@@ -483,7 +485,7 @@ bool LLviewerOctreeGroup::removeFromGroup(LLViewerOctreeEntry* entry)
}
//virtual
-void LLviewerOctreeGroup::unbound()
+void LLViewerOctreeGroup::unbound()
{
if (isDirty())
{
@@ -498,7 +500,7 @@ void LLviewerOctreeGroup::unbound()
OctreeNode* parent = (OctreeNode*) mOctreeNode->getParent();
while (parent != NULL)
{
- LLviewerOctreeGroup* group = (LLviewerOctreeGroup*) parent->getListener(0);
+ LLViewerOctreeGroup* group = (LLViewerOctreeGroup*) parent->getListener(0);
if (!group || group->isDirty())
{
return;
@@ -511,7 +513,7 @@ void LLviewerOctreeGroup::unbound()
}
//virtual
-void LLviewerOctreeGroup::rebound()
+void LLViewerOctreeGroup::rebound()
{
if (!isDirty())
{
@@ -520,7 +522,7 @@ void LLviewerOctreeGroup::rebound()
if (mOctreeNode->getChildCount() == 1 && mOctreeNode->getElementCount() == 0)
{
- LLviewerOctreeGroup* group = (LLviewerOctreeGroup*) mOctreeNode->getChild(0)->getListener(0);
+ LLViewerOctreeGroup* group = (LLViewerOctreeGroup*) mOctreeNode->getChild(0)->getListener(0);
group->rebound();
//copy single child's bounding box
@@ -541,7 +543,7 @@ void LLviewerOctreeGroup::rebound()
{
LLVector4a& newMin = mExtents[0];
LLVector4a& newMax = mExtents[1];
- LLviewerOctreeGroup* group = (LLviewerOctreeGroup*) mOctreeNode->getChild(0)->getListener(0);
+ LLViewerOctreeGroup* group = (LLViewerOctreeGroup*) mOctreeNode->getChild(0)->getListener(0);
group->clearState(SKIP_FRUSTUM_CHECK);
group->rebound();
//initialize to first child
@@ -551,7 +553,7 @@ void LLviewerOctreeGroup::rebound()
//first, rebound children
for (U32 i = 1; i < mOctreeNode->getChildCount(); i++)
{
- group = (LLviewerOctreeGroup*) mOctreeNode->getChild(i)->getListener(0);
+ group = (LLViewerOctreeGroup*) mOctreeNode->getChild(i)->getListener(0);
group->clearState(SKIP_FRUSTUM_CHECK);
group->rebound();
const LLVector4a& max = group->mExtents[1];
@@ -575,7 +577,7 @@ void LLviewerOctreeGroup::rebound()
}
//virtual
-void LLviewerOctreeGroup::handleInsertion(const TreeNode* node, LLViewerOctreeEntry* obj)
+void LLViewerOctreeGroup::handleInsertion(const TreeNode* node, LLViewerOctreeEntry* obj)
{
obj->setGroup(this);
unbound();
@@ -583,7 +585,7 @@ void LLviewerOctreeGroup::handleInsertion(const TreeNode* node, LLViewerOctreeEn
}
//virtual
-void LLviewerOctreeGroup::handleRemoval(const TreeNode* node, LLViewerOctreeEntry* obj)
+void LLViewerOctreeGroup::handleRemoval(const TreeNode* node, LLViewerOctreeEntry* obj)
{
unbound();
setState(OBJECT_DIRTY);
@@ -592,7 +594,7 @@ void LLviewerOctreeGroup::handleRemoval(const TreeNode* node, LLViewerOctreeEntr
}
//virtual
-void LLviewerOctreeGroup::handleDestruction(const TreeNode* node)
+void LLViewerOctreeGroup::handleDestruction(const TreeNode* node)
{
for (OctreeNode::element_iter i = mOctreeNode->getDataBegin(); i != mOctreeNode->getDataEnd(); ++i)
{
@@ -607,7 +609,7 @@ void LLviewerOctreeGroup::handleDestruction(const TreeNode* node)
}
//virtual
-void LLviewerOctreeGroup::handleStateChange(const TreeNode* node)
+void LLViewerOctreeGroup::handleStateChange(const TreeNode* node)
{
//drop bounding box upon state change
if (mOctreeNode != node)
@@ -618,29 +620,29 @@ void LLviewerOctreeGroup::handleStateChange(const TreeNode* node)
}
//virtual
-void LLviewerOctreeGroup::handleChildAddition(const OctreeNode* parent, OctreeNode* child)
+void LLViewerOctreeGroup::handleChildAddition(const OctreeNode* parent, OctreeNode* child)
{
if (child->getListenerCount() == 0)
{
- new LLviewerOctreeGroup(child);
+ new LLViewerOctreeGroup(child);
}
else
{
- OCT_ERRS << "LLviewerOctreeGroup redundancy detected." << LL_ENDL;
+ OCT_ERRS << "LLViewerOctreeGroup redundancy detected." << LL_ENDL;
}
unbound();
- ((LLviewerOctreeGroup*)child->getListener(0))->unbound();
+ ((LLViewerOctreeGroup*)child->getListener(0))->unbound();
}
//virtual
-void LLviewerOctreeGroup::handleChildRemoval(const OctreeNode* parent, const OctreeNode* child)
+void LLViewerOctreeGroup::handleChildRemoval(const OctreeNode* parent, const OctreeNode* child)
{
unbound();
}
-LLviewerOctreeGroup* LLviewerOctreeGroup::getParent()
+LLViewerOctreeGroup* LLViewerOctreeGroup::getParent()
{
if (isDead())
{
@@ -656,14 +658,14 @@ LLviewerOctreeGroup* LLviewerOctreeGroup::getParent()
if (parent)
{
- return (LLviewerOctreeGroup*) parent->getListener(0);
+ return (LLViewerOctreeGroup*) parent->getListener(0);
}
return NULL;
}
//virtual
-bool LLviewerOctreeGroup::boundObjects(BOOL empty, LLVector4a& minOut, LLVector4a& maxOut)
+bool LLViewerOctreeGroup::boundObjects(BOOL empty, LLVector4a& minOut, LLVector4a& maxOut)
{
const OctreeNode* node = mOctreeNode;
@@ -721,23 +723,23 @@ bool LLviewerOctreeGroup::boundObjects(BOOL empty, LLVector4a& minOut, LLVector4
}
//virtual
-BOOL LLviewerOctreeGroup::isVisible() const
+BOOL LLViewerOctreeGroup::isVisible() const
{
return mVisible[LLViewerCamera::sCurCameraID] >= LLViewerOctreeEntryData::getCurrentFrame() ? TRUE : FALSE;
}
//virtual
-BOOL LLviewerOctreeGroup::isRecentlyVisible() const
+BOOL LLViewerOctreeGroup::isRecentlyVisible() const
{
return FALSE;
}
-void LLviewerOctreeGroup::setVisible()
+void LLViewerOctreeGroup::setVisible()
{
mVisible[LLViewerCamera::sCurCameraID] = LLViewerOctreeEntryData::getCurrentFrame();
}
-void LLviewerOctreeGroup::checkStates()
+void LLViewerOctreeGroup::checkStates()
{
#if LL_OCTREE_PARANOIA_CHECK
//LLOctreeStateCheck checker;
@@ -837,7 +839,7 @@ public:
LLOcclusionCullingGroup::LLOcclusionCullingGroup(OctreeNode* node, LLViewerOctreePartition* part) :
- LLviewerOctreeGroup(node),
+ LLViewerOctreeGroup(node),
mSpatialPartition(part)
{
part->mLODSeed = (part->mLODSeed+1)%part->mLODPeriod;
@@ -885,7 +887,7 @@ void LLOcclusionCullingGroup::handleChildAddition(const OctreeNode* parent, Octr
unbound();
- ((LLviewerOctreeGroup*)child->getListener(0))->unbound();
+ ((LLViewerOctreeGroup*)child->getListener(0))->unbound();
}
void LLOcclusionCullingGroup::releaseOcclusionQueryObjectNames()
@@ -1316,7 +1318,7 @@ BOOL LLViewerOctreePartition::isOcclusionEnabled()
//-----------------------------------------------------------------------------------
//virtual
-bool LLViewerOctreeCull::earlyFail(LLviewerOctreeGroup* group)
+bool LLViewerOctreeCull::earlyFail(LLViewerOctreeGroup* group)
{
return false;
}
@@ -1324,7 +1326,7 @@ bool LLViewerOctreeCull::earlyFail(LLviewerOctreeGroup* group)
//virtual
void LLViewerOctreeCull::traverse(const OctreeNode* n)
{
- LLviewerOctreeGroup* group = (LLviewerOctreeGroup*) n->getListener(0);
+ LLViewerOctreeGroup* group = (LLViewerOctreeGroup*) n->getListener(0);
if (earlyFail(group))
{
@@ -1332,7 +1334,7 @@ void LLViewerOctreeCull::traverse(const OctreeNode* n)
}
if (mRes == 2 ||
- (mRes && group->hasState(LLviewerOctreeGroup::SKIP_FRUSTUM_CHECK)))
+ (mRes && group->hasState(LLViewerOctreeGroup::SKIP_FRUSTUM_CHECK)))
{ //fully in, just add everything
OctreeTraveler::traverse(n);
}
@@ -1351,17 +1353,17 @@ void LLViewerOctreeCull::traverse(const OctreeNode* n)
//------------------------------------------
//agent space group culling
-S32 LLViewerOctreeCull::AABBInFrustumNoFarClipGroupBounds(const LLviewerOctreeGroup* group)
+S32 LLViewerOctreeCull::AABBInFrustumNoFarClipGroupBounds(const LLViewerOctreeGroup* group)
{
return mCamera->AABBInFrustumNoFarClip(group->mBounds[0], group->mBounds[1]);
}
-S32 LLViewerOctreeCull::AABBSphereIntersectGroupExtents(const LLviewerOctreeGroup* group)
+S32 LLViewerOctreeCull::AABBSphereIntersectGroupExtents(const LLViewerOctreeGroup* group)
{
return AABBSphereIntersect(group->mExtents[0], group->mExtents[1], mCamera->getOrigin(), mCamera->mFrustumCornerDist);
}
-S32 LLViewerOctreeCull::AABBInFrustumGroupBounds(const LLviewerOctreeGroup* group)
+S32 LLViewerOctreeCull::AABBInFrustumGroupBounds(const LLViewerOctreeGroup* group)
{
return mCamera->AABBInFrustum(group->mBounds[0], group->mBounds[1]);
}
@@ -1369,17 +1371,17 @@ S32 LLViewerOctreeCull::AABBInFrustumGroupBounds(const LLviewerOctreeGroup* grou
//------------------------------------------
//agent space object set culling
-S32 LLViewerOctreeCull::AABBInFrustumNoFarClipObjectBounds(const LLviewerOctreeGroup* group)
+S32 LLViewerOctreeCull::AABBInFrustumNoFarClipObjectBounds(const LLViewerOctreeGroup* group)
{
return mCamera->AABBInFrustumNoFarClip(group->mObjectBounds[0], group->mObjectBounds[1]);
}
-S32 LLViewerOctreeCull::AABBSphereIntersectObjectExtents(const LLviewerOctreeGroup* group)
+S32 LLViewerOctreeCull::AABBSphereIntersectObjectExtents(const LLViewerOctreeGroup* group)
{
return AABBSphereIntersect(group->mObjectExtents[0], group->mObjectExtents[1], mCamera->getOrigin(), mCamera->mFrustumCornerDist);
}
-S32 LLViewerOctreeCull::AABBInFrustumObjectBounds(const LLviewerOctreeGroup* group)
+S32 LLViewerOctreeCull::AABBInFrustumObjectBounds(const LLViewerOctreeGroup* group)
{
return mCamera->AABBInFrustum(group->mObjectBounds[0], group->mObjectBounds[1]);
}
@@ -1387,17 +1389,17 @@ S32 LLViewerOctreeCull::AABBInFrustumObjectBounds(const LLviewerOctreeGroup* gro
//------------------------------------------
//local regional space group culling
-S32 LLViewerOctreeCull::AABBInRegionFrustumNoFarClipGroupBounds(const LLviewerOctreeGroup* group)
+S32 LLViewerOctreeCull::AABBInRegionFrustumNoFarClipGroupBounds(const LLViewerOctreeGroup* group)
{
return mCamera->AABBInRegionFrustumNoFarClip(group->mBounds[0], group->mBounds[1]);
}
-S32 LLViewerOctreeCull::AABBInRegionFrustumGroupBounds(const LLviewerOctreeGroup* group)
+S32 LLViewerOctreeCull::AABBInRegionFrustumGroupBounds(const LLViewerOctreeGroup* group)
{
return mCamera->AABBInRegionFrustum(group->mBounds[0], group->mBounds[1]);
}
-S32 LLViewerOctreeCull::AABBRegionSphereIntersectGroupExtents(const LLviewerOctreeGroup* group, const LLVector3& shift)
+S32 LLViewerOctreeCull::AABBRegionSphereIntersectGroupExtents(const LLViewerOctreeGroup* group, const LLVector3& shift)
{
return AABBSphereIntersect(group->mExtents[0], group->mExtents[1], mCamera->getOrigin() - shift, mCamera->mFrustumCornerDist);
}
@@ -1405,24 +1407,24 @@ S32 LLViewerOctreeCull::AABBRegionSphereIntersectGroupExtents(const LLviewerOctr
//------------------------------------------
//local regional space object culling
-S32 LLViewerOctreeCull::AABBInRegionFrustumObjectBounds(const LLviewerOctreeGroup* group)
+S32 LLViewerOctreeCull::AABBInRegionFrustumObjectBounds(const LLViewerOctreeGroup* group)
{
return mCamera->AABBInRegionFrustum(group->mObjectBounds[0], group->mObjectBounds[1]);
}
-S32 LLViewerOctreeCull::AABBInRegionFrustumNoFarClipObjectBounds(const LLviewerOctreeGroup* group)
+S32 LLViewerOctreeCull::AABBInRegionFrustumNoFarClipObjectBounds(const LLViewerOctreeGroup* group)
{
return mCamera->AABBInRegionFrustumNoFarClip(group->mObjectBounds[0], group->mObjectBounds[1]);
}
-S32 LLViewerOctreeCull::AABBRegionSphereIntersectObjectExtents(const LLviewerOctreeGroup* group, const LLVector3& shift)
+S32 LLViewerOctreeCull::AABBRegionSphereIntersectObjectExtents(const LLViewerOctreeGroup* group, const LLVector3& shift)
{
return AABBSphereIntersect(group->mObjectExtents[0], group->mObjectExtents[1], mCamera->getOrigin() - shift, mCamera->mFrustumCornerDist);
}
//------------------------------------------
//virtual
-bool LLViewerOctreeCull::checkObjects(const OctreeNode* branch, const LLviewerOctreeGroup* group)
+bool LLViewerOctreeCull::checkObjects(const OctreeNode* branch, const LLViewerOctreeGroup* group)
{
if (branch->getElementCount() == 0) //no elements
{
@@ -1441,19 +1443,19 @@ bool LLViewerOctreeCull::checkObjects(const OctreeNode* branch, const LLviewerOc
}
//virtual
-void LLViewerOctreeCull::preprocess(LLviewerOctreeGroup* group)
+void LLViewerOctreeCull::preprocess(LLViewerOctreeGroup* group)
{
}
//virtual
-void LLViewerOctreeCull::processGroup(LLviewerOctreeGroup* group)
+void LLViewerOctreeCull::processGroup(LLViewerOctreeGroup* group)
{
}
//virtual
void LLViewerOctreeCull::visit(const OctreeNode* branch)
{
- LLviewerOctreeGroup* group = (LLviewerOctreeGroup*) branch->getListener(0);
+ LLViewerOctreeGroup* group = (LLViewerOctreeGroup*) branch->getListener(0);
preprocess(group);
@@ -1475,12 +1477,12 @@ void LLViewerOctreeDebug::visit(const OctreeNode* branch)
LL_INFOS() << "Child " << i << " : " << (U32)branch->getChild(i) << LL_ENDL;
}
#endif
- LLviewerOctreeGroup* group = (LLviewerOctreeGroup*) branch->getListener(0);
+ LLViewerOctreeGroup* group = (LLViewerOctreeGroup*) branch->getListener(0);
processGroup(group);
}
//virtual
-void LLViewerOctreeDebug::processGroup(LLviewerOctreeGroup* group)
+void LLViewerOctreeDebug::processGroup(LLViewerOctreeGroup* group)
{
#if 0
const LLVector4a* vec4 = group->getBounds();
diff --git a/indra/newview/llvieweroctree.h b/indra/newview/llvieweroctree.h
index 174af5e22f..1eaa1b931e 100644
--- a/indra/newview/llvieweroctree.h
+++ b/indra/newview/llvieweroctree.h
@@ -41,7 +41,7 @@
class LLViewerRegion;
class LLViewerOctreeEntryData;
-class LLviewerOctreeGroup;
+class LLViewerOctreeGroup;
class LLViewerOctreeEntry;
class LLViewerOctreePartition;
@@ -53,7 +53,7 @@ typedef LLOctreeTraveler<LLViewerOctreeEntry> OctreeTraveler;
#if LL_OCTREE_PARANOIA_CHECK
#define assert_octree_valid(x) x->validate()
-#define assert_states_valid(x) ((LLviewerOctreeGroup*) x->mSpatialPartition->mOctree->getListener(0))->checkStates()
+#define assert_states_valid(x) ((LLViewerOctreeGroup*) x->mSpatialPartition->mOctree->getListener(0))->checkStates()
#else
#define assert_octree_valid(x)
#define assert_states_valid(x)
@@ -71,7 +71,7 @@ S32 AABBSphereIntersectR2(const LLVector3& min, const LLVector3& max, const LLVe
//defines data needed for octree of an entry
//LL_ALIGN_PREFIX(16)
-class LLViewerOctreeEntry : public LLRefCount
+class LLViewerOctreeEntry : public LLRefCount, public LLTrace::MemTrackable<LLViewerOctreeEntry, 16>
{
friend class LLViewerOctreeEntryData;
@@ -90,7 +90,7 @@ public:
LLViewerOctreeEntry();
void nullGroup(); //called by group handleDestruction() only
- void setGroup(LLviewerOctreeGroup* group);
+ void setGroup(LLViewerOctreeGroup* group);
void removeData(LLViewerOctreeEntryData* data);
LLViewerOctreeEntryData* getDrawable() const {return mData[LLDRAWABLE];}
@@ -100,28 +100,18 @@ public:
const LLVector4a* getSpatialExtents() const {return mExtents;}
const LLVector4a& getPositionGroup() const {return mPositionGroup;}
- LLviewerOctreeGroup* getGroup()const {return mGroup;}
+ LLViewerOctreeGroup* getGroup()const {return mGroup;}
F32 getBinRadius() const {return mBinRadius;}
S32 getBinIndex() const {return mBinIndex; }
void setBinIndex(S32 index) const {mBinIndex = index; }
- void* operator new(size_t size)
- {
- return ll_aligned_malloc_16(size);
- }
-
- void operator delete(void* ptr)
- {
- ll_aligned_free_16(ptr);
- }
-
private:
void addData(LLViewerOctreeEntryData* data);
private:
LLViewerOctreeEntryData* mData[NUM_DATA_TYPE]; //do not use LLPointer here.
- LLviewerOctreeGroup* mGroup;
+ LLViewerOctreeGroup* mGroup;
//aligned members
LL_ALIGN_16(LLVector4a mExtents[2]);
@@ -153,7 +143,7 @@ public:
F32 getBinRadius() const {return mEntry->getBinRadius();}
const LLVector4a* getSpatialExtents() const;
- LLviewerOctreeGroup* getGroup()const;
+ LLViewerOctreeGroup* getGroup()const;
const LLVector4a& getPositionGroup() const;
void setBinRadius(F32 rad) {mEntry->mBinRadius = rad;}
@@ -161,7 +151,7 @@ public:
void setSpatialExtents(const LLVector4a& min, const LLVector4a& max);
void setPositionGroup(const LLVector4a& pos);
- virtual void setGroup(LLviewerOctreeGroup* group);
+ virtual void setGroup(LLViewerOctreeGroup* group);
void shift(const LLVector4a &shift_vector);
U32 getVisible() const {return mEntry ? mEntry->mVisible : 0;}
@@ -185,11 +175,12 @@ protected:
//defines an octree group for an octree node, which contains multiple entries.
//LL_ALIGN_PREFIX(16)
-class LLviewerOctreeGroup : public LLOctreeListener<LLViewerOctreeEntry>
+class LLViewerOctreeGroup
+: public LLOctreeListener<LLViewerOctreeEntry>, public LLTrace::MemTrackable<LLViewerOctreeGroup, 16>
{
friend class LLViewerOctreeCull;
protected:
- virtual ~LLviewerOctreeGroup();
+ virtual ~LLViewerOctreeGroup();
public:
enum
@@ -206,22 +197,13 @@ public:
typedef LLOctreeNode<LLViewerOctreeEntry>::element_iter element_iter;
typedef LLOctreeNode<LLViewerOctreeEntry>::element_list element_list;
- LLviewerOctreeGroup(OctreeNode* node);
- LLviewerOctreeGroup(const LLviewerOctreeGroup& rhs)
+ LLViewerOctreeGroup(OctreeNode* node);
+ LLViewerOctreeGroup(const LLViewerOctreeGroup& rhs)
+ : LLTrace::MemTrackable<LLViewerOctreeGroup, 16>("LLViewerOctreeGroup")
{
*this = rhs;
}
- void* operator new(size_t size)
- {
- return ll_aligned_malloc_16(size);
- }
-
- void operator delete(void* ptr)
- {
- ll_aligned_free_16(ptr);
- }
-
bool removeFromGroup(LLViewerOctreeEntryData* data);
bool removeFromGroup(LLViewerOctreeEntry* entry);
@@ -250,7 +232,7 @@ public:
virtual void handleChildRemoval(const OctreeNode* parent, const OctreeNode* child);
OctreeNode* getOctreeNode() {return mOctreeNode;}
- LLviewerOctreeGroup* getParent();
+ LLViewerOctreeGroup* getParent();
const LLVector4a* getBounds() const {return mBounds;}
const LLVector4a* getExtents() const {return mExtents;}
@@ -285,7 +267,7 @@ public:
//octree group which has capability to support occlusion culling
//LL_ALIGN_PREFIX(16)
-class LLOcclusionCullingGroup : public LLviewerOctreeGroup
+class LLOcclusionCullingGroup : public LLViewerOctreeGroup
{
public:
typedef enum
@@ -310,7 +292,7 @@ protected:
public:
LLOcclusionCullingGroup(OctreeNode* node, LLViewerOctreePartition* part);
- LLOcclusionCullingGroup(const LLOcclusionCullingGroup& rhs) : LLviewerOctreeGroup(rhs)
+ LLOcclusionCullingGroup(const LLOcclusionCullingGroup& rhs) : LLViewerOctreeGroup(rhs)
{
*this = rhs;
}
@@ -379,35 +361,35 @@ public:
LLViewerOctreeCull(LLCamera* camera)
: mCamera(camera), mRes(0) { }
- virtual bool earlyFail(LLviewerOctreeGroup* group);
+ virtual bool earlyFail(LLViewerOctreeGroup* group);
virtual void traverse(const OctreeNode* n);
//agent space group cull
- S32 AABBInFrustumNoFarClipGroupBounds(const LLviewerOctreeGroup* group);
- S32 AABBSphereIntersectGroupExtents(const LLviewerOctreeGroup* group);
- S32 AABBInFrustumGroupBounds(const LLviewerOctreeGroup* group);
+ S32 AABBInFrustumNoFarClipGroupBounds(const LLViewerOctreeGroup* group);
+ S32 AABBSphereIntersectGroupExtents(const LLViewerOctreeGroup* group);
+ S32 AABBInFrustumGroupBounds(const LLViewerOctreeGroup* group);
//agent space object set cull
- S32 AABBInFrustumNoFarClipObjectBounds(const LLviewerOctreeGroup* group);
- S32 AABBSphereIntersectObjectExtents(const LLviewerOctreeGroup* group);
- S32 AABBInFrustumObjectBounds(const LLviewerOctreeGroup* group);
+ S32 AABBInFrustumNoFarClipObjectBounds(const LLViewerOctreeGroup* group);
+ S32 AABBSphereIntersectObjectExtents(const LLViewerOctreeGroup* group);
+ S32 AABBInFrustumObjectBounds(const LLViewerOctreeGroup* group);
//local region space group cull
- S32 AABBInRegionFrustumNoFarClipGroupBounds(const LLviewerOctreeGroup* group);
- S32 AABBInRegionFrustumGroupBounds(const LLviewerOctreeGroup* group);
- S32 AABBRegionSphereIntersectGroupExtents(const LLviewerOctreeGroup* group, const LLVector3& shift);
+ S32 AABBInRegionFrustumNoFarClipGroupBounds(const LLViewerOctreeGroup* group);
+ S32 AABBInRegionFrustumGroupBounds(const LLViewerOctreeGroup* group);
+ S32 AABBRegionSphereIntersectGroupExtents(const LLViewerOctreeGroup* group, const LLVector3& shift);
//local region space object set cull
- S32 AABBInRegionFrustumNoFarClipObjectBounds(const LLviewerOctreeGroup* group);
- S32 AABBInRegionFrustumObjectBounds(const LLviewerOctreeGroup* group);
- S32 AABBRegionSphereIntersectObjectExtents(const LLviewerOctreeGroup* group, const LLVector3& shift);
+ S32 AABBInRegionFrustumNoFarClipObjectBounds(const LLViewerOctreeGroup* group);
+ S32 AABBInRegionFrustumObjectBounds(const LLViewerOctreeGroup* group);
+ S32 AABBRegionSphereIntersectObjectExtents(const LLViewerOctreeGroup* group, const LLVector3& shift);
- virtual S32 frustumCheck(const LLviewerOctreeGroup* group) = 0;
- virtual S32 frustumCheckObjects(const LLviewerOctreeGroup* group) = 0;
+ virtual S32 frustumCheck(const LLViewerOctreeGroup* group) = 0;
+ virtual S32 frustumCheckObjects(const LLViewerOctreeGroup* group) = 0;
- virtual bool checkObjects(const OctreeNode* branch, const LLviewerOctreeGroup* group);
- virtual void preprocess(LLviewerOctreeGroup* group);
- virtual void processGroup(LLviewerOctreeGroup* group);
+ virtual bool checkObjects(const OctreeNode* branch, const LLViewerOctreeGroup* group);
+ virtual void preprocess(LLViewerOctreeGroup* group);
+ virtual void processGroup(LLViewerOctreeGroup* group);
virtual void visit(const OctreeNode* branch);
protected:
@@ -419,7 +401,7 @@ protected:
class LLViewerOctreeDebug : public OctreeTraveler
{
public:
- virtual void processGroup(LLviewerOctreeGroup* group);
+ virtual void processGroup(LLViewerOctreeGroup* group);
virtual void visit(const OctreeNode* branch);
public:
diff --git a/indra/newview/llviewerregion.cpp b/indra/newview/llviewerregion.cpp
index 6e9f649d23..4b4de583d8 100755
--- a/indra/newview/llviewerregion.cpp
+++ b/indra/newview/llviewerregion.cpp
@@ -148,7 +148,7 @@ public:
LLVOCacheEntry::vocache_entry_map_t mCacheMap; //all cached entries
LLVOCacheEntry::vocache_entry_set_t mActiveSet; //all active entries;
LLVOCacheEntry::vocache_entry_set_t mWaitingSet; //entries waiting for LLDrawable to be generated.
- std::set< LLPointer<LLviewerOctreeGroup> > mVisibleGroups; //visible groupa
+ std::set< LLPointer<LLViewerOctreeGroup> > mVisibleGroups; //visible groupa
LLVOCachePartition* mVOCachePartition;
LLVOCacheEntry::vocache_entry_set_t mVisibleEntries; //must-be-created visible entries wait for objects creation.
LLVOCacheEntry::vocache_entry_priority_list_t mWaitingList; //transient list storing sorted visible entries waiting for object creation.
@@ -963,7 +963,7 @@ void LLViewerRegion::removeActiveCacheEntry(LLVOCacheEntry* entry, LLDrawable* d
entry->setState(LLVOCacheEntry::INACTIVE);
}
-bool LLViewerRegion::addVisibleGroup(LLviewerOctreeGroup* group)
+bool LLViewerRegion::addVisibleGroup(LLViewerOctreeGroup* group)
{
if(mDead || group->isEmpty())
{
@@ -1110,17 +1110,17 @@ F32 LLViewerRegion::updateVisibleEntries(F32 max_time)
}
//process visible groups
- std::set< LLPointer<LLviewerOctreeGroup> >::iterator group_iter = mImpl->mVisibleGroups.begin();
+ std::set< LLPointer<LLViewerOctreeGroup> >::iterator group_iter = mImpl->mVisibleGroups.begin();
for(; group_iter != mImpl->mVisibleGroups.end(); ++group_iter)
{
- LLPointer<LLviewerOctreeGroup> group = *group_iter;
+ LLPointer<LLViewerOctreeGroup> group = *group_iter;
if(group->getNumRefs() < 3 || //group to be deleted
!group->getOctreeNode() || group->isEmpty()) //group empty
{
continue;
}
- for (LLviewerOctreeGroup::element_iter i = group->getDataBegin(); i != group->getDataEnd(); ++i)
+ for (LLViewerOctreeGroup::element_iter i = group->getDataBegin(); i != group->getDataEnd(); ++i)
{
if((*i)->hasVOCacheEntry())
{
diff --git a/indra/newview/llviewerregion.h b/indra/newview/llviewerregion.h
index 79a992a4c1..4e2252b75b 100755
--- a/indra/newview/llviewerregion.h
+++ b/indra/newview/llviewerregion.h
@@ -68,7 +68,7 @@ class LLBBox;
class LLSpatialGroup;
class LLDrawable;
class LLViewerRegionImpl;
-class LLviewerOctreeGroup;
+class LLViewerOctreeGroup;
class LLVOCachePartition;
class LLViewerRegion: public LLCapabilityProvider // implements this interface
@@ -230,7 +230,7 @@ public:
F32 getWidth() const { return mWidth; }
BOOL idleUpdate(F32 max_update_time);
- bool addVisibleGroup(LLviewerOctreeGroup* group);
+ bool addVisibleGroup(LLViewerOctreeGroup* group);
void addVisibleCacheEntry(LLVOCacheEntry* entry);
void addActiveCacheEntry(LLVOCacheEntry* entry);
void removeActiveCacheEntry(LLVOCacheEntry* entry, LLDrawable* drawablep);
diff --git a/indra/newview/llviewerstats.cpp b/indra/newview/llviewerstats.cpp
index f300983f19..c81a9a0ad3 100755
--- a/indra/newview/llviewerstats.cpp
+++ b/indra/newview/llviewerstats.cpp
@@ -343,17 +343,17 @@ void update_statistics()
sample(LLStatViewer::DRAW_DISTANCE, (F64)gSavedSettings.getF32("RenderFarClip"));
sample(LLStatViewer::CHAT_BUBBLES, gSavedSettings.getBOOL("UseChatBubbles"));
- typedef LLInstanceTracker<LLTrace::TraceType<LLTrace::TimeBlockAccumulator>, std::string> trace_type_t;
+ typedef LLInstanceTracker<LLTrace::StatType<LLTrace::TimeBlockAccumulator>, std::string> stat_type_t;
- F64Seconds idle_secs = last_frame_recording.getSum(*trace_type_t::getInstance("Idle"));
- F64Seconds network_secs = last_frame_recording.getSum(*trace_type_t::getInstance("Network"));
+ F64Seconds idle_secs = last_frame_recording.getSum(*stat_type_t::getInstance("Idle"));
+ F64Seconds network_secs = last_frame_recording.getSum(*stat_type_t::getInstance("Network"));
- record(LLStatViewer::FRAME_STACKTIME, last_frame_recording.getSum(*trace_type_t::getInstance("Frame")));
+ record(LLStatViewer::FRAME_STACKTIME, last_frame_recording.getSum(*stat_type_t::getInstance("Frame")));
record(LLStatViewer::UPDATE_STACKTIME, idle_secs - network_secs);
record(LLStatViewer::NETWORK_STACKTIME, network_secs);
- record(LLStatViewer::IMAGE_STACKTIME, last_frame_recording.getSum(*trace_type_t::getInstance("Update Images")));
- record(LLStatViewer::REBUILD_STACKTIME, last_frame_recording.getSum(*trace_type_t::getInstance("Sort Draw State")));
- record(LLStatViewer::RENDER_STACKTIME, last_frame_recording.getSum(*trace_type_t::getInstance("Render Geometry")));
+ record(LLStatViewer::IMAGE_STACKTIME, last_frame_recording.getSum(*stat_type_t::getInstance("Update Images")));
+ record(LLStatViewer::REBUILD_STACKTIME, last_frame_recording.getSum(*stat_type_t::getInstance("Sort Draw State")));
+ record(LLStatViewer::RENDER_STACKTIME, last_frame_recording.getSum(*stat_type_t::getInstance("Render Geometry")));
LLCircuitData *cdp = gMessageSystem->mCircuitInfo.findCircuit(gAgent.getRegion()->getHost());
if (cdp)
diff --git a/indra/newview/llvoavatar.h b/indra/newview/llvoavatar.h
index b600d2a8f1..6800fe3785 100755
--- a/indra/newview/llvoavatar.h
+++ b/indra/newview/llvoavatar.h
@@ -97,12 +97,12 @@ public:
public:
void* operator new(size_t size)
{
- return ll_aligned_malloc_16(size);
+ return LLTrace::MemTrackable<LLViewerObject>::aligned_new<16>(size);
}
- void operator delete(void* ptr)
+ void operator delete(void* ptr, size_t size)
{
- ll_aligned_free_16(ptr);
+ LLTrace::MemTrackable<LLViewerObject>::aligned_delete<16>(ptr, size);
}
LLVOAvatar(const LLUUID &id, const LLPCode pcode, LLViewerRegion *regionp);
diff --git a/indra/newview/llvoavatarself.h b/indra/newview/llvoavatarself.h
index 9e9e2b61d7..c280988fd6 100755
--- a/indra/newview/llvoavatarself.h
+++ b/indra/newview/llvoavatarself.h
@@ -50,16 +50,6 @@ class LLVOAvatarSelf :
**/
public:
- void* operator new(size_t size)
- {
- return ll_aligned_malloc_16(size);
- }
-
- void operator delete(void* ptr)
- {
- ll_aligned_free_16(ptr);
- }
-
LLVOAvatarSelf(const LLUUID &id, const LLPCode pcode, LLViewerRegion *regionp);
virtual ~LLVOAvatarSelf();
virtual void markDead();
diff --git a/indra/newview/llvocache.cpp b/indra/newview/llvocache.cpp
index ada412be8c..3f01ffa3cd 100755
--- a/indra/newview/llvocache.cpp
+++ b/indra/newview/llvocache.cpp
@@ -495,7 +495,7 @@ void LLVOCacheGroup::handleChildAddition(const OctreeNode* parent, OctreeNode* c
unbound();
- ((LLviewerOctreeGroup*)child->getListener(0))->unbound();
+ ((LLViewerOctreeGroup*)child->getListener(0))->unbound();
}
LLVOCachePartition::LLVOCachePartition(LLViewerRegion* regionp)
@@ -542,7 +542,7 @@ public:
mUseObjectCacheOcclusion = use_object_cache_occlusion;
}
- virtual bool earlyFail(LLviewerOctreeGroup* base_group)
+ virtual bool earlyFail(LLViewerOctreeGroup* base_group)
{
if( mUseObjectCacheOcclusion &&
base_group->getOctreeNode()->getParent()) //never occlusion cull the root node
@@ -565,7 +565,7 @@ public:
return false;
}
- virtual S32 frustumCheck(const LLviewerOctreeGroup* group)
+ virtual S32 frustumCheck(const LLViewerOctreeGroup* group)
{
#if 1
S32 res = AABBInRegionFrustumGroupBounds(group);
@@ -579,7 +579,7 @@ public:
return res;
}
- virtual S32 frustumCheckObjects(const LLviewerOctreeGroup* group)
+ virtual S32 frustumCheckObjects(const LLViewerOctreeGroup* group)
{
#if 1
S32 res = AABBInRegionFrustumObjectBounds(group);
@@ -593,7 +593,7 @@ public:
return res;
}
- virtual void processGroup(LLviewerOctreeGroup* base_group)
+ virtual void processGroup(LLViewerOctreeGroup* base_group)
{
if( !mUseObjectCacheOcclusion ||
!base_group->getOctreeNode()->getParent())
@@ -647,19 +647,19 @@ public:
mSphereRadius = back_sphere_radius;
}
- virtual S32 frustumCheck(const LLviewerOctreeGroup* group)
+ virtual S32 frustumCheck(const LLViewerOctreeGroup* group)
{
const LLVector4a* exts = group->getExtents();
return backSphereCheck(exts[0], exts[1]);
}
- virtual S32 frustumCheckObjects(const LLviewerOctreeGroup* group)
+ virtual S32 frustumCheckObjects(const LLViewerOctreeGroup* group)
{
const LLVector4a* exts = group->getObjectExtents();
return backSphereCheck(exts[0], exts[1]);
}
- virtual void processGroup(LLviewerOctreeGroup* base_group)
+ virtual void processGroup(LLViewerOctreeGroup* base_group)
{
mRegionp->addVisibleGroup(base_group);
return;
@@ -721,7 +721,7 @@ S32 LLVOCachePartition::cull(LLCamera &camera, bool do_occlusion)
return 0;
}
- ((LLviewerOctreeGroup*)mOctree->getListener(0))->rebound();
+ ((LLViewerOctreeGroup*)mOctree->getListener(0))->rebound();
if(LLViewerCamera::sCurCameraID >= LLViewerCamera::CAMERA_WATER0)
{
@@ -779,7 +779,7 @@ S32 LLVOCachePartition::cull(LLCamera &camera, bool do_occlusion)
return 1;
}
-void LLVOCachePartition::addOccluders(LLviewerOctreeGroup* gp)
+void LLVOCachePartition::addOccluders(LLViewerOctreeGroup* gp)
{
LLVOCacheGroup* group = (LLVOCacheGroup*)gp;
diff --git a/indra/newview/llvocache.h b/indra/newview/llvocache.h
index b58bb3d499..eef364dd5d 100755
--- a/indra/newview/llvocache.h
+++ b/indra/newview/llvocache.h
@@ -180,7 +180,7 @@ public:
void addEntry(LLViewerOctreeEntry* entry);
void removeEntry(LLViewerOctreeEntry* entry);
/*virtual*/ S32 cull(LLCamera &camera, bool do_occlusion);
- void addOccluders(LLviewerOctreeGroup* gp);
+ void addOccluders(LLViewerOctreeGroup* gp);
void resetOccluders();
void processOccluders(LLCamera* camera);
void removeOccluder(LLVOCacheGroup* group);
diff --git a/indra/newview/skins/default/xui/en/floater_stats.xml b/indra/newview/skins/default/xui/en/floater_stats.xml
index b2399123be..6c776907f5 100755
--- a/indra/newview/skins/default/xui/en/floater_stats.xml
+++ b/indra/newview/skins/default/xui/en/floater_stats.xml
@@ -125,12 +125,27 @@
<stat_bar name="LLViewerObject"
label="Viewer Objects"
stat="LLViewerObject"/>
- <stat_bar name="LLVOCacheEntry"
+ <stat_bar name="LLViewerOctreeGroup"
+ label="Octree Group Data"
+ stat="LLViewerOctreeGroup"/>
+ <stat_bar name="LLViewerOctreeEntry"
+ label="Octree Data"
+ stat="LLViewerOctreeEntry"/>
+ <stat_bar name="LLVOCacheEntry"
label="Viewer Object Cache"
stat="LLVOCacheEntry"/>
<stat_bar name="LLDrawable"
label="Drawables"
stat="LLDrawable"/>
+ <stat_bar name="LLFace"
+ label="Face Data"
+ stat="LLFace"/>
+ <stat_bar name="LLDrawInfo"
+ label="Draw Info"
+ stat="LLDrawInfo"/>
+ <stat_bar name="LLTexture"
+ label="Texture Data"
+ stat="LLTexture"/>
<stat_bar name="LLImage"
label="Image Data"
stat="LLImage"/>