diff options
author | Andrey Lihatskiy <alihatskiy@productengine.com> | 2022-05-27 02:51:33 +0300 |
---|---|---|
committer | Andrey Lihatskiy <alihatskiy@productengine.com> | 2022-05-27 02:51:33 +0300 |
commit | 3da7a50b71d4ef5919c2d4d5b9547b3ef0abab7d (patch) | |
tree | c51119f79b734a7d503bb3adeac1759b819c8f92 /indra/llimage/llimage.cpp | |
parent | 3c215ee885f846f4ab4923c03b51f1b2203394af (diff) | |
parent | cdbd06e8ed6e3f4285a61f5c0b607a65dfdf8dfd (diff) |
Merge branch 'master' into DRTVWR-543-maint
# Conflicts:
# autobuild.xml
# indra/cmake/LLCommon.cmake
# indra/llcommon/CMakeLists.txt
# indra/llrender/llgl.cpp
# indra/newview/llappviewer.cpp
# indra/newview/llface.cpp
# indra/newview/llflexibleobject.cpp
# indra/newview/llvovolume.cpp
Diffstat (limited to 'indra/llimage/llimage.cpp')
-rw-r--r-- | indra/llimage/llimage.cpp | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/indra/llimage/llimage.cpp b/indra/llimage/llimage.cpp index 8922f46ffe..0fa027c9c3 100644 --- a/indra/llimage/llimage.cpp +++ b/indra/llimage/llimage.cpp @@ -623,8 +623,7 @@ void LLImage::setLastError(const std::string& message) //--------------------------------------------------------------------------- LLImageBase::LLImageBase() -: LLTrace::MemTrackable<LLImageBase>("LLImage"), - mData(NULL), +: mData(NULL), mDataSize(0), mWidth(0), mHeight(0), @@ -673,7 +672,6 @@ void LLImageBase::sanityCheck() void LLImageBase::deleteData() { ll_aligned_free_16(mData); - disclaimMem(mDataSize); mDataSize = 0; mData = NULL; } @@ -731,7 +729,6 @@ U8* LLImageBase::allocateData(S32 size) } } mDataSize = size; - claimMem(mDataSize); return mData; } @@ -752,9 +749,7 @@ U8* LLImageBase::reallocateData(S32 size) ll_aligned_free_16(mData) ; } mData = new_datap; - disclaimMem(mDataSize); mDataSize = size; - claimMem(mDataSize); mBadBufferAllocation = false; return mData; } @@ -865,6 +860,12 @@ U8* LLImageRaw::reallocateData(S32 size) return res; } +void LLImageRaw::releaseData() +{ + LLImageBase::setSize(0, 0, 0); + LLImageBase::setDataAndSize(nullptr, 0); +} + // virtual void LLImageRaw::deleteData() { @@ -883,8 +884,6 @@ void LLImageRaw::setDataAndSize(U8 *data, S32 width, S32 height, S8 components) LLImageBase::setSize(width, height, components) ; LLImageBase::setDataAndSize(data, width * height * components) ; - - sGlobalRawMemory += getDataSize(); } bool LLImageRaw::resize(U16 width, U16 height, S8 components) @@ -2254,9 +2253,7 @@ void LLImageBase::setDataAndSize(U8 *data, S32 size) { ll_assert_aligned(data, 16); mData = data; - disclaimMem(mDataSize); mDataSize = size; - claimMem(mDataSize); } //static |