/** * @file llimage.h * @brief Object for managing images and their textures. * * Copyright (c) 2000-$CurrentYear$, Linden Research, Inc. * $License$ */ #ifndef LL_LLIMAGE_H #define LL_LLIMAGE_H #include "stdtypes.h" #include "lluuid.h" #include "llstring.h" #include "llmemory.h" #include "llworkerthread.h" const S32 MIN_IMAGE_MIP = 2; // 4x4, only used for expand/contract power of 2 const S32 MAX_IMAGE_MIP = 11; // 2048x2048 const S32 MAX_DISCARD_LEVEL = 5; const S32 MIN_IMAGE_SIZE = (1<& raw, S32 discard = -1, F32 decode_time=0.0); virtual BOOL requestDecodedAuxData(LLPointer& raw, S32 channel, S32 discard = -1, F32 decode_time=0.0); virtual void releaseDecodedData(); virtual BOOL encode(const LLImageRaw* raw_image, F32 encode_time=0.0) = 0; S8 getCodec() const; BOOL isDecoding() const { return mDecoding ? TRUE : FALSE; } BOOL isDecoded() const { return mDecoded ? TRUE : FALSE; } void setDiscardLevel(S8 discard_level) { mDiscardLevel = discard_level; } S8 getDiscardLevel() const { return mDiscardLevel; } protected: S8 mCodec; S8 mDecoding; S8 mDecoded; S8 mDiscardLevel; LLPointer mDecodedImage; public: static S32 sGlobalFormattedMemory; static LLWorkerThread* sWorkerThread; }; #endif