summaryrefslogtreecommitdiff
path: root/indra/llimage
diff options
context:
space:
mode:
Diffstat (limited to 'indra/llimage')
-rw-r--r--indra/llimage/llimage.cpp14
-rw-r--r--indra/llimage/llimage.h5
-rw-r--r--indra/llimage/llimagedxt.h1
-rw-r--r--indra/llimage/llimagej2c.cpp6
-rw-r--r--indra/llimage/llimagetga.cpp4
-rw-r--r--indra/llimage/llimageworker.h1
6 files changed, 18 insertions, 13 deletions
diff --git a/indra/llimage/llimage.cpp b/indra/llimage/llimage.cpp
index 93ddc65f32..488f3bf78d 100644
--- a/indra/llimage/llimage.cpp
+++ b/indra/llimage/llimage.cpp
@@ -152,7 +152,7 @@ void LLImageBase::deleteData()
// virtual
U8* LLImageBase::allocateData(S32 size)
{
- LLMemType mt1((LLMemType::EMemType)mMemType);
+ LLMemType mt1(mMemType);
if (size < 0)
{
@@ -188,7 +188,7 @@ U8* LLImageBase::allocateData(S32 size)
// virtual
U8* LLImageBase::reallocateData(S32 size)
{
- LLMemType mt1((LLMemType::EMemType)mMemType);
+ LLMemType mt1(mMemType);
U8 *new_datap = new U8[size];
if (!new_datap)
{
@@ -332,7 +332,7 @@ BOOL LLImageRaw::resize(U16 width, U16 height, S8 components)
U8 * LLImageRaw::getSubImage(U32 x_pos, U32 y_pos, U32 width, U32 height) const
{
- LLMemType mt1((LLMemType::EMemType)mMemType);
+ LLMemType mt1(mMemType);
U8 *data = new U8[width*height*getComponents()];
// Should do some simple bounds checking
@@ -415,7 +415,7 @@ 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((LLMemType::EMemType)mMemType);
+ LLMemType mt1(mMemType);
S32 row_bytes = getWidth() * getComponents();
llassert(row_bytes > 0);
std::vector<U8> line_buffer(row_bytes);
@@ -548,7 +548,7 @@ 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((LLMemType::EMemType)mMemType);
+ LLMemType mt1(mMemType);
llinfos << "compositeScaled4onto3" << llendl;
LLImageRaw* dst = this; // Just for clarity.
@@ -787,7 +787,7 @@ 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((LLMemType::EMemType)mMemType);
+ LLMemType mt1(mMemType);
LLImageRaw* dst = this; // Just for clarity.
llassert_always( (1 == src->getComponents()) || (3 == src->getComponents()) || (4 == src->getComponents()) );
@@ -819,7 +819,7 @@ void LLImageRaw::copyScaled( LLImageRaw* src )
BOOL LLImageRaw::scale( S32 new_width, S32 new_height, BOOL scale_image_data )
{
- LLMemType mt1((LLMemType::EMemType)mMemType);
+ LLMemType mt1(mMemType);
llassert((1 == getComponents()) || (3 == getComponents()) || (4 == getComponents()) );
S32 old_width = getWidth();
diff --git a/indra/llimage/llimage.h b/indra/llimage/llimage.h
index bd609b638c..8108553107 100644
--- a/indra/llimage/llimage.h
+++ b/indra/llimage/llimage.h
@@ -35,8 +35,9 @@
#include "lluuid.h"
#include "llstring.h"
-#include "llmemory.h"
+//#include "llmemory.h"
#include "llthread.h"
+#include "llmemtype.h"
const S32 MIN_IMAGE_MIP = 2; // 4x4, only used for expand/contract power of 2
const S32 MAX_IMAGE_MIP = 11; // 2048x2048
@@ -155,7 +156,7 @@ private:
BOOL mBadBufferAllocation ;
public:
- S16 mMemType; // debug
+ LLMemType::DeclareMemType& mMemType; // debug
static BOOL sSizeOverride;
};
diff --git a/indra/llimage/llimagedxt.h b/indra/llimage/llimagedxt.h
index bc2d6522d2..1a297536b4 100644
--- a/indra/llimage/llimagedxt.h
+++ b/indra/llimage/llimagedxt.h
@@ -33,6 +33,7 @@
#define LL_LLIMAGEDXT_H
#include "llimage.h"
+#include "llpointer.h"
// This class decodes and encodes LL DXT files (which may unclude uncompressed RGB or RGBA mipped data)
diff --git a/indra/llimage/llimagej2c.cpp b/indra/llimage/llimagej2c.cpp
index 1b93c21982..363486fb9c 100644
--- a/indra/llimage/llimagej2c.cpp
+++ b/indra/llimage/llimagej2c.cpp
@@ -279,7 +279,7 @@ BOOL LLImageJ2C::decode(LLImageRaw *raw_imagep, F32 decode_time)
BOOL LLImageJ2C::decodeChannels(LLImageRaw *raw_imagep, F32 decode_time, S32 first_channel, S32 max_channel_count )
{
- LLMemType mt1((LLMemType::EMemType)mMemType);
+ LLMemType mt1(mMemType);
BOOL res = TRUE;
@@ -329,7 +329,7 @@ BOOL LLImageJ2C::encode(const LLImageRaw *raw_imagep, F32 encode_time)
BOOL LLImageJ2C::encode(const LLImageRaw *raw_imagep, const char* comment_text, F32 encode_time)
{
- LLMemType mt1((LLMemType::EMemType)mMemType);
+ LLMemType mt1(mMemType);
resetLastError();
BOOL res = mImpl->encodeImpl(*this, *raw_imagep, comment_text, encode_time, mReversible);
if (!mLastError.empty())
@@ -462,7 +462,7 @@ BOOL LLImageJ2C::loadAndValidate(const std::string &filename)
BOOL LLImageJ2C::validate(U8 *data, U32 file_size)
{
- LLMemType mt1((LLMemType::EMemType)mMemType);
+ LLMemType mt1(mMemType);
resetLastError();
diff --git a/indra/llimage/llimagetga.cpp b/indra/llimage/llimagetga.cpp
index a6721bfa0f..d8f8003593 100644
--- a/indra/llimage/llimagetga.cpp
+++ b/indra/llimage/llimagetga.cpp
@@ -31,10 +31,12 @@
#include "linden_common.h"
-#include "lldir.h"
#include "llimagetga.h"
+
+#include "lldir.h"
#include "llerror.h"
#include "llmath.h"
+#include "llpointer.h"
// For expanding 5-bit pixel values to 8-bit with best rounding
// static
diff --git a/indra/llimage/llimageworker.h b/indra/llimage/llimageworker.h
index 879fcf5565..0d66695d6e 100644
--- a/indra/llimage/llimageworker.h
+++ b/indra/llimage/llimageworker.h
@@ -34,6 +34,7 @@
#define LL_LLIMAGEWORKER_H
#include "llimage.h"
+#include "llpointer.h"
#include "llworkerthread.h"
class LLImageWorker : public LLWorkerClass