diff options
author | Loren Shih <seraph@lindenlab.com> | 2010-04-02 13:14:12 -0400 |
---|---|---|
committer | Loren Shih <seraph@lindenlab.com> | 2010-04-02 13:14:12 -0400 |
commit | fd04b26d3465bc48644cd71bea728c5dcfb7c231 (patch) | |
tree | e8b2cb54166dab2cb4be60cb437a99c5e0507515 /indra/llimage/llimage.h | |
parent | 873de2daae04a63c796661ff6d4db6aa912041bf (diff) | |
parent | 36987904d4568b5398122b3e09bea305bc49edc6 (diff) |
automated merge
Diffstat (limited to 'indra/llimage/llimage.h')
-rw-r--r-- | indra/llimage/llimage.h | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/indra/llimage/llimage.h b/indra/llimage/llimage.h index 686f583886..10444e7f89 100644 --- a/indra/llimage/llimage.h +++ b/indra/llimage/llimage.h @@ -48,7 +48,7 @@ const S32 MAX_IMAGE_SIZE = (1<<MAX_IMAGE_MIP); // 2048 const S32 MIN_IMAGE_AREA = MIN_IMAGE_SIZE * MIN_IMAGE_SIZE; const S32 MAX_IMAGE_AREA = MAX_IMAGE_SIZE * MAX_IMAGE_SIZE; const S32 MAX_IMAGE_COMPONENTS = 8; -const S32 MAX_IMAGE_DATA_SIZE = MAX_IMAGE_AREA * MAX_IMAGE_COMPONENTS; +const S32 MAX_IMAGE_DATA_SIZE = MAX_IMAGE_AREA * MAX_IMAGE_COMPONENTS; //2048 * 2048 * 8 = 16 MB // Note! These CANNOT be changed without modifying simulator code // *TODO: change both to 1024 when SIM texture fetching is deprecated @@ -124,10 +124,12 @@ public: const U8 *getData() const ; U8 *getData() ; - BOOL isBufferInvalid() ; + bool isBufferInvalid() ; void setSize(S32 width, S32 height, S32 ncomponents); U8* allocateDataSize(S32 width, S32 height, S32 ncomponents, S32 size = -1); // setSize() + allocateData() + void enableOverSize() {mAllowOverSize = true ;} + void disableOverSize() {mAllowOverSize = false; } protected: // special accessor to allow direct setting of mData and mDataSize by LLImageFormatted @@ -140,8 +142,6 @@ public: // <= 0 priority means that there's no need for more data. static F32 calc_download_priority(F32 virtual_size, F32 visible_area, S32 bytes_sent); - static void setSizeOverride(BOOL enabled) { sSizeOverride = enabled; } - static EImageCodec getCodecFromExtension(const std::string& exten); private: @@ -153,12 +153,10 @@ private: S8 mComponents; - BOOL mBadBufferAllocation ; - + bool mBadBufferAllocation ; + bool mAllowOverSize ; public: LLMemType::DeclareMemType& mMemType; // debug - - static BOOL sSizeOverride; }; // Raw representation of an image (used for textures, and other uncompressed formats |