V2 llimage merge

This commit is contained in:
Shyotl
2011-02-22 18:21:02 -06:00
parent 97d5e8f154
commit a207a71066
5 changed files with 30 additions and 20 deletions

View File

@@ -123,14 +123,16 @@ 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
void setDataAndSize(U8 *data, S32 size) { mData = data; mDataSize = size; };
void setDataAndSize(U8 *data, S32 size) { mData = data; mDataSize = size; }
public:
static void generateMip(const U8 *indata, U8* mipdata, int width, int height, S32 nchannels);
@@ -139,8 +141,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:
@@ -152,11 +152,10 @@ private:
S8 mComponents;
BOOL mBadBufferAllocation ;
bool mBadBufferAllocation ;
bool mAllowOverSize ;
public:
S16 mMemType; // debug
static BOOL sSizeOverride;
};
// Raw representation of an image (used for textures, and other uncompressed formats