summaryrefslogtreecommitdiff
path: root/indra/llimage/llimage.h
diff options
context:
space:
mode:
Diffstat (limited to 'indra/llimage/llimage.h')
-rw-r--r--indra/llimage/llimage.h32
1 files changed, 15 insertions, 17 deletions
diff --git a/indra/llimage/llimage.h b/indra/llimage/llimage.h
index 9f8d061293..f66b1666d7 100644
--- a/indra/llimage/llimage.h
+++ b/indra/llimage/llimage.h
@@ -30,7 +30,6 @@
#include "lluuid.h"
#include "llstring.h"
#include "llpointer.h"
-#include "llsingleton.h"
#include "lltrace.h"
const S32 MIN_IMAGE_MIP = 2; // 4x4, only used for expand/contract power of 2
@@ -88,26 +87,25 @@ typedef enum e_image_codec
//============================================================================
// library initialization class
+// LLImage is frequently used in threads so do not convert it to LLSingleton
-class LLImage : public LLParamSingleton<LLImage>
+class LLImage
{
- LLSINGLETON(LLImage, bool use_new_byte_range = false, S32 minimal_reverse_byte_range_percent = 75);
- ~LLImage();
public:
+ static void initClass(bool use_new_byte_range = false, S32 minimal_reverse_byte_range_percent = 75);
+ static void cleanupClass();
- const std::string& getLastErrorMessage();
- static const std::string& getLastError() { return getInstance()->getLastErrorMessage(); };
- void setLastErrorMessage(const std::string& message);
- static void setLastError(const std::string& message) { getInstance()->setLastErrorMessage(message); }
-
- bool useNewByteRange() { return mUseNewByteRange; }
- S32 getReverseByteRangePercent() { return mMinimalReverseByteRangePercent; }
-
-private:
- LLMutex* mMutex;
- std::string mLastErrorMessage;
- bool mUseNewByteRange;
- S32 mMinimalReverseByteRangePercent;
+ static const std::string& getLastError();
+ static void setLastError(const std::string& message);
+
+ static bool useNewByteRange() { return sUseNewByteRange; }
+ static S32 getReverseByteRangePercent() { return sMinimalReverseByteRangePercent; }
+
+protected:
+ static LLMutex* sMutex;
+ static std::string sLastErrorMessage;
+ static bool sUseNewByteRange;
+ static S32 sMinimalReverseByteRangePercent;
};
//============================================================================