summaryrefslogtreecommitdiff
path: root/indra/llimage/llimage.cpp
diff options
context:
space:
mode:
authorRichard Linden <none@none>2013-07-01 17:04:01 -0700
committerRichard Linden <none@none>2013-07-01 17:04:01 -0700
commit04bdc8ba83c297945dd60489c241b88adf892ff4 (patch)
treef19e8a7c87203242abd39450dd4cfbea6857ee55 /indra/llimage/llimage.cpp
parent2fc422f39ddaca25c69e8cf2092a9d66840379f3 (diff)
SH-4294 FIX Interesting: Statistics Texture cache hit rate is always 0%
also, removed LLTrace::init and cleanup removed derived class implementation of memory stat for LLMemTrackable is automatic now
Diffstat (limited to 'indra/llimage/llimage.cpp')
-rwxr-xr-xindra/llimage/llimage.cpp13
1 files changed, 4 insertions, 9 deletions
diff --git a/indra/llimage/llimage.cpp b/indra/llimage/llimage.cpp
index 50df2ebe55..395e6a6cc5 100755
--- a/indra/llimage/llimage.cpp
+++ b/indra/llimage/llimage.cpp
@@ -50,7 +50,6 @@ LLMutex* LLImage::sMutex = NULL;
bool LLImage::sUseNewByteRange = false;
S32 LLImage::sMinimalReverseByteRangePercent = 75;
LLPrivateMemoryPool* LLImageBase::sPrivatePoolp = NULL ;
-LLTrace::MemStatHandle LLImageBase::sMemStat("LLImage");
//static
void LLImage::initClass(bool use_new_byte_range, S32 minimal_reverse_byte_range_percent)
@@ -159,9 +158,8 @@ void LLImageBase::sanityCheck()
void LLImageBase::deleteData()
{
FREE_MEM(sPrivatePoolp, mData) ;
- memDisclaimAmount(mDataSize);
+ memDisclaimAmount(mDataSize) = 0;
mData = NULL;
- mDataSize = 0;
}
// virtual
@@ -225,9 +223,7 @@ U8* LLImageBase::reallocateData(S32 size)
FREE_MEM(sPrivatePoolp, mData) ;
}
mData = new_datap;
- memDisclaimAmount(mDataSize);
- mDataSize = size;
- memClaimAmount(mDataSize);
+ memClaimAmount(memDisclaimAmount(mDataSize) = size);
return mData;
}
@@ -1612,9 +1608,8 @@ static void avg4_colors2(const U8* a, const U8* b, const U8* c, const U8* d, U8*
void LLImageBase::setDataAndSize(U8 *data, S32 size)
{
ll_assert_aligned(data, 16);
- memDisclaimAmount(mDataSize);
- mData = data; mDataSize = size;
- memClaimAmount(mDataSize);
+ mData = data;
+ memClaimAmount(memDisclaimAmount(mDataSize) = size);
}
//static