summaryrefslogtreecommitdiff
path: root/indra/llimage/llimagejpeg.cpp
diff options
context:
space:
mode:
authorAndrey Lihatskiy <alihatskiy@productengine.com>2022-05-27 02:51:33 +0300
committerAndrey Lihatskiy <alihatskiy@productengine.com>2022-05-27 02:51:33 +0300
commit3da7a50b71d4ef5919c2d4d5b9547b3ef0abab7d (patch)
treec51119f79b734a7d503bb3adeac1759b819c8f92 /indra/llimage/llimagejpeg.cpp
parent3c215ee885f846f4ab4923c03b51f1b2203394af (diff)
parentcdbd06e8ed6e3f4285a61f5c0b607a65dfdf8dfd (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/llimagejpeg.cpp')
-rw-r--r--indra/llimage/llimagejpeg.cpp8
1 files changed, 0 insertions, 8 deletions
diff --git a/indra/llimage/llimagejpeg.cpp b/indra/llimage/llimagejpeg.cpp
index 62638fa16c..32a5472ec8 100644
--- a/indra/llimage/llimagejpeg.cpp
+++ b/indra/llimage/llimagejpeg.cpp
@@ -393,9 +393,7 @@ boolean LLImageJPEG::encodeEmptyOutputBuffer( j_compress_ptr cinfo )
cinfo->dest->next_output_byte = self->mOutputBuffer + self->mOutputBufferSize;
cinfo->dest->free_in_buffer = self->mOutputBufferSize;
- self->disclaimMem(self->mOutputBufferSize);
self->mOutputBufferSize = new_buffer_size;
- self->claimMem(new_buffer_size);
return true;
}
@@ -501,13 +499,10 @@ bool LLImageJPEG::encode( const LLImageRaw* raw_image, F32 encode_time )
// Allocate a temporary buffer big enough to hold the entire compressed image (and then some)
// (Note: we make it bigger in emptyOutputBuffer() if we need to)
delete[] mOutputBuffer;
- disclaimMem(mOutputBufferSize);
mOutputBufferSize = getWidth() * getHeight() * getComponents() + 1024;
- claimMem(mOutputBufferSize);
mOutputBuffer = new(std::nothrow) U8[ mOutputBufferSize ];
if (mOutputBuffer == NULL)
{
- disclaimMem(mOutputBufferSize);
mOutputBufferSize = 0;
setLastError("Failed to allocate output buffer");
return false;
@@ -547,7 +542,6 @@ bool LLImageJPEG::encode( const LLImageRaw* raw_image, F32 encode_time )
jpeg_destroy_compress(&cinfo);
delete[] mOutputBuffer;
mOutputBuffer = NULL;
- disclaimMem(mOutputBufferSize);
mOutputBufferSize = 0;
return false;
}
@@ -650,7 +644,6 @@ bool LLImageJPEG::encode( const LLImageRaw* raw_image, F32 encode_time )
// After finish_compress, we can release the temp output buffer.
delete[] mOutputBuffer;
mOutputBuffer = NULL;
- disclaimMem(mOutputBufferSize);
mOutputBufferSize = 0;
////////////////////////////////////////
@@ -663,7 +656,6 @@ bool LLImageJPEG::encode( const LLImageRaw* raw_image, F32 encode_time )
jpeg_destroy_compress(&cinfo);
delete[] mOutputBuffer;
mOutputBuffer = NULL;
- disclaimMem(mOutputBufferSize);
mOutputBufferSize = 0;
return false;
}