Remove LLMemType and related files
This commit is contained in:
@@ -30,7 +30,6 @@
|
||||
|
||||
#include "llmath.h"
|
||||
#include "v4coloru.h"
|
||||
#include "llmemtype.h"
|
||||
|
||||
#include "llimagebmp.h"
|
||||
#include "llimagetga.h"
|
||||
@@ -93,8 +92,7 @@ LLImageBase::LLImageBase()
|
||||
mHeight(0),
|
||||
mComponents(0),
|
||||
mBadBufferAllocation(false),
|
||||
mAllowOverSize(false),
|
||||
mMemType(LLMemType::MTYPE_IMAGEBASE)
|
||||
mAllowOverSize(false)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -164,8 +162,6 @@ void LLImageBase::deleteData()
|
||||
// virtual
|
||||
U8* LLImageBase::allocateData(S32 size)
|
||||
{
|
||||
LLMemType mt1(mMemType);
|
||||
|
||||
if (size < 0)
|
||||
{
|
||||
size = mWidth * mHeight * mComponents;
|
||||
@@ -226,7 +222,6 @@ U8* LLImageBase::reallocateData(S32 size)
|
||||
if(mData && (mDataSize == size))
|
||||
return mData;
|
||||
|
||||
LLMemType mt1(mMemType);
|
||||
U8 *new_datap = (U8*)ALLOCATE_MEM(sPrivatePoolp, size);
|
||||
if (!new_datap)
|
||||
{
|
||||
@@ -293,14 +288,12 @@ S32 LLImageRaw::sRawImageCachedCount = 0;
|
||||
LLImageRaw::LLImageRaw()
|
||||
: LLImageBase(), mCacheEntries(0)
|
||||
{
|
||||
mMemType = LLMemType::MTYPE_IMAGERAW;
|
||||
++sRawImageCount;
|
||||
}
|
||||
|
||||
LLImageRaw::LLImageRaw(U16 width, U16 height, S8 components)
|
||||
: LLImageBase(), mCacheEntries(0)
|
||||
{
|
||||
mMemType = LLMemType::MTYPE_IMAGERAW;
|
||||
llassert( S32(width) * S32(height) * S32(components) <= MAX_IMAGE_DATA_SIZE );
|
||||
allocateDataSize(width, height, components);
|
||||
++sRawImageCount;
|
||||
@@ -309,7 +302,6 @@ LLImageRaw::LLImageRaw(U16 width, U16 height, S8 components)
|
||||
LLImageRaw::LLImageRaw(U8 *data, U16 width, U16 height, S8 components)
|
||||
: LLImageBase(), mCacheEntries(0)
|
||||
{
|
||||
mMemType = LLMemType::MTYPE_IMAGERAW;
|
||||
if(allocateDataSize(width, height, components) && data)
|
||||
{
|
||||
memcpy(getData(), data, width*height*components);
|
||||
@@ -319,7 +311,6 @@ LLImageRaw::LLImageRaw(U8 *data, U16 width, U16 height, S8 components)
|
||||
|
||||
LLImageRaw::LLImageRaw(LLImageRaw const* src, U16 width, U16 height, U16 crop_offset, bool crop_vertically) : mCacheEntries(0)
|
||||
{
|
||||
mMemType = LLMemType::MTYPE_IMAGERAW;
|
||||
llassert_always(src);
|
||||
S8 const components = src->getComponents();
|
||||
U8 const* const data = src->getData();
|
||||
@@ -343,11 +334,11 @@ LLImageRaw::LLImageRaw(LLImageRaw const* src, U16 width, U16 height, U16 crop_of
|
||||
++sRawImageCount;
|
||||
}
|
||||
|
||||
/*LLImageRaw::LLImageRaw(const std::string& filename, bool j2c_lowest_mip_only)
|
||||
: LLImageBase(), mCacheEntries(0)
|
||||
{
|
||||
createFromFile(filename, j2c_lowest_mip_only);
|
||||
}*/
|
||||
//LLImageRaw::LLImageRaw(const std::string& filename, bool j2c_lowest_mip_only)
|
||||
// : LLImageBase(), mCacheEntries(0)
|
||||
//{
|
||||
// createFromFile(filename, j2c_lowest_mip_only);
|
||||
//}
|
||||
|
||||
LLImageRaw::~LLImageRaw()
|
||||
{
|
||||
@@ -416,7 +407,6 @@ BOOL LLImageRaw::resize(U16 width, U16 height, S8 components)
|
||||
#if 0
|
||||
U8 * LLImageRaw::getSubImage(U32 x_pos, U32 y_pos, U32 width, U32 height) const
|
||||
{
|
||||
LLMemType mt1(mMemType);
|
||||
U8 *data = new U8[width*height*getComponents()];
|
||||
|
||||
// Should do some simple bounds checking
|
||||
@@ -500,7 +490,6 @@ void LLImageRaw::clear(U8 r, U8 g, U8 b, U8 a)
|
||||
// Reverses the order of the rows in the image
|
||||
void LLImageRaw::verticalFlip()
|
||||
{
|
||||
LLMemType mt1(mMemType);
|
||||
S32 row_bytes = getWidth() * getComponents();
|
||||
llassert(row_bytes > 0);
|
||||
try
|
||||
@@ -640,7 +629,6 @@ void LLImageRaw::composite( LLImageRaw* src )
|
||||
// Src and dst can be any size. Src has 4 components. Dst has 3 components.
|
||||
void LLImageRaw::compositeScaled4onto3(LLImageRaw* src)
|
||||
{
|
||||
LLMemType mt1(mMemType);
|
||||
llinfos << "compositeScaled4onto3" << llendl;
|
||||
|
||||
LLImageRaw* dst = this; // Just for clarity.
|
||||
@@ -915,7 +903,6 @@ void LLImageRaw::copyUnscaled3onto4( LLImageRaw* src )
|
||||
// Src and dst can be any size. Src and dst have same number of components.
|
||||
void LLImageRaw::copyScaled( LLImageRaw* src )
|
||||
{
|
||||
LLMemType mt1(mMemType);
|
||||
LLImageRaw* dst = this; // Just for clarity.
|
||||
|
||||
llassert_always( (1 == src->getComponents()) || (3 == src->getComponents()) || (4 == src->getComponents()) );
|
||||
@@ -956,8 +943,6 @@ void LLImageRaw::copyScaled( LLImageRaw* src )
|
||||
//scale down image by not blending a pixel with its neighbors.
|
||||
BOOL LLImageRaw::scaleDownWithoutBlending( S32 new_width, S32 new_height)
|
||||
{
|
||||
LLMemType mt1(mMemType);
|
||||
|
||||
S8 c = getComponents() ;
|
||||
llassert((1 == c) || (3 == c) || (4 == c) );
|
||||
|
||||
@@ -1002,7 +987,6 @@ BOOL LLImageRaw::scaleDownWithoutBlending( S32 new_width, S32 new_height)
|
||||
|
||||
BOOL LLImageRaw::scale( S32 new_width, S32 new_height, BOOL scale_image_data )
|
||||
{
|
||||
LLMemType mt1(mMemType);
|
||||
llassert((1 == getComponents()) || (3 == getComponents()) || (4 == getComponents()) );
|
||||
|
||||
S32 old_width = getWidth();
|
||||
@@ -1439,7 +1423,6 @@ LLImageFormatted::LLImageFormatted(S8 codec)
|
||||
mDecoded(0),
|
||||
mDiscardLevel(-1)
|
||||
{
|
||||
mMemType = LLMemType::MTYPE_IMAGEFORMATTED;
|
||||
}
|
||||
|
||||
// virtual
|
||||
|
||||
Reference in New Issue
Block a user