summaryrefslogtreecommitdiff
path: root/indra/llimage/llimage.h
diff options
context:
space:
mode:
authorBrad Payne (Vir Linden) <vir@lindenlab.com>2010-04-02 13:10:54 -0400
committerBrad Payne (Vir Linden) <vir@lindenlab.com>2010-04-02 13:10:54 -0400
commit73827e8430c56a139cd29988217475d9a2b7b80e (patch)
tree393bae5f3518b61140872318ebb0c055dbaf6f21 /indra/llimage/llimage.h
parent5faa2444f91a65b3dfcd2047e578a54226be8577 (diff)
parent36987904d4568b5398122b3e09bea305bc49edc6 (diff)
merge
Diffstat (limited to 'indra/llimage/llimage.h')
-rw-r--r--indra/llimage/llimage.h14
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