/** * @file llimage.h * @brief Object for managing images and their textures. * * Copyright (c) 2000-2007, Linden Research, Inc. * * The source code in this file ("Source Code") is provided by Linden Lab * to you under the terms of the GNU General Public License, version 2.0 * ("GPL"), unless you have obtained a separate licensing agreement * ("Other License"), formally executed by you and Linden Lab. Terms of * the GPL can be found in doc/GPL-license.txt in this distribution, or * online at http://secondlife.com/developers/opensource/gplv2 * * There are special exceptions to the terms and conditions of the GPL as * it is applied to this Source Code. View the full text of the exception * in the file doc/FLOSS-exception.txt in this software distribution, or * online at http://secondlife.com/developers/opensource/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, * and agree to abide by those obligations. * * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, * COMPLETENESS OR PERFORMANCE. */ #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