summaryrefslogtreecommitdiff
path: root/indra/llprimitive
diff options
context:
space:
mode:
authorSteven Bennetts <steve@lindenlab.com>2008-04-28 23:29:46 +0000
committerSteven Bennetts <steve@lindenlab.com>2008-04-28 23:29:46 +0000
commit16baf6c9d43fc29e697b5a460439ca664897450c (patch)
tree6c3ae45c538cbc90408ab72f3a02564cf5dce754 /indra/llprimitive
parent75ee8558abb662b6a0a6b559c61a9549818d2962 (diff)
merge release-QAR-499 Viewer 1.20 RC 3
merge release-QAR-508 Viewer 1.20 RC 4 merge Branch_1-20-Viewer -r 85278 : 85828 -> release
Diffstat (limited to 'indra/llprimitive')
-rw-r--r--indra/llprimitive/llprimitive.cpp13
1 files changed, 9 insertions, 4 deletions
diff --git a/indra/llprimitive/llprimitive.cpp b/indra/llprimitive/llprimitive.cpp
index cc676f73f1..ff69cacf0f 100644
--- a/indra/llprimitive/llprimitive.cpp
+++ b/indra/llprimitive/llprimitive.cpp
@@ -32,6 +32,7 @@
#include "linden_common.h"
#include "material_codes.h"
+#include "llmemtype.h"
#include "llerror.h"
#include "message.h"
#include "llprimitive.h"
@@ -178,7 +179,7 @@ LLPrimitive::~LLPrimitive()
// Cleanup handled by volume manager
if (mVolumep)
{
- sVolumeManager->cleanupVolume(mVolumep);
+ sVolumeManager->unrefVolume(mVolumep);
}
mVolumep = NULL;
}
@@ -187,6 +188,7 @@ LLPrimitive::~LLPrimitive()
// static
LLPrimitive *LLPrimitive::createPrimitive(LLPCode p_code)
{
+ LLMemType m1(LLMemType::MTYPE_PRIMITIVE);
LLPrimitive *retval = new LLPrimitive();
if (retval)
@@ -204,6 +206,7 @@ LLPrimitive *LLPrimitive::createPrimitive(LLPCode p_code)
//===============================================================
void LLPrimitive::init_primitive(LLPCode p_code)
{
+ LLMemType m1(LLMemType::MTYPE_PRIMITIVE);
if (mNumTEs)
{
if (mTextureList)
@@ -246,6 +249,7 @@ void LLPrimitive::setNumTEs(const U8 num_tes)
// Right now, we don't try and preserve entries when the number of faces
// changes.
+ LLMemType m1(LLMemType::MTYPE_PRIMITIVE);
if (num_tes)
{
LLTextureEntry *new_tes;
@@ -914,6 +918,7 @@ S32 face_index_from_id(LLFaceID face_ID, const std::vector<LLProfile::Face>& fac
BOOL LLPrimitive::setVolume(const LLVolumeParams &volume_params, const S32 detail, bool unique_volume)
{
+ LLMemType m1(LLMemType::MTYPE_VOLUME);
LLVolume *volumep;
if (unique_volume)
{
@@ -935,10 +940,10 @@ BOOL LLPrimitive::setVolume(const LLVolumeParams &volume_params, const S32 detai
}
}
- volumep = sVolumeManager->getVolume(volume_params, detail);
+ volumep = sVolumeManager->refVolume(volume_params, detail);
if (volumep == mVolumep)
{
- sVolumeManager->cleanupVolume( volumep ); // LLVolumeMgr::getVolume() creates a reference, but we don't need a second one.
+ sVolumeManager->unrefVolume( volumep ); // LLVolumeMgr::refVolume() creates a reference, but we don't need a second one.
return TRUE;
}
}
@@ -981,7 +986,7 @@ BOOL LLPrimitive::setVolume(const LLVolumeParams &volume_params, const S32 detai
// build the new object
- sVolumeManager->cleanupVolume(mVolumep);
+ sVolumeManager->unrefVolume(mVolumep);
mVolumep = volumep;
U32 new_face_mask = mVolumep->mFaceMask;