summaryrefslogtreecommitdiff
path: root/indra/llrender/llimagegl.h
diff options
context:
space:
mode:
authorOz Linden <oz@lindenlab.com>2014-05-07 11:09:04 -0400
committerOz Linden <oz@lindenlab.com>2014-05-07 11:09:04 -0400
commita98b4b6bee1b062722ce5eb03948a0fd33b74265 (patch)
tree88c030cef0c480f19ab9ff0a187b5c866da3a24a /indra/llrender/llimagegl.h
parent9353868d91dfe2c4539c81c0b96bfe9efb497b2c (diff)
parentd0ef02c23a7a37c8c9bfe3a86bae88bb811fc9fe (diff)
merge changes for 3.7.7-release
Diffstat (limited to 'indra/llrender/llimagegl.h')
-rwxr-xr-xindra/llrender/llimagegl.h17
1 files changed, 9 insertions, 8 deletions
diff --git a/indra/llrender/llimagegl.h b/indra/llrender/llimagegl.h
index 0c62dd0d33..6ca814af6f 100755
--- a/indra/llrender/llimagegl.h
+++ b/indra/llrender/llimagegl.h
@@ -34,6 +34,7 @@
#include "llpointer.h"
#include "llrefcount.h"
#include "v2math.h"
+#include "llunits.h"
#include "llrender.h"
class LLTextureAtlas ;
@@ -41,7 +42,7 @@ class LLTextureAtlas ;
#define MEGA_BYTES_TO_BYTES(x) ((x) << 20)
//============================================================================
-class LLImageGL : public LLRefCount
+class LLImageGL : public LLRefCount, public LLTrace::MemTrackable<LLImageGL>
{
friend class LLTexUnit;
public:
@@ -55,7 +56,7 @@ public:
static S32 dataFormatBytes(S32 dataformat, S32 width, S32 height);
static S32 dataFormatComponents(S32 dataformat);
- BOOL updateBindStats(S32 tex_mem) const ;
+ BOOL updateBindStats(S32Bytes tex_mem) const ;
F32 getTimePassedSinceLastBound();
void forceUpdateBindStats(void) const;
@@ -68,7 +69,7 @@ public:
static void dirtyTexOptions();
// Sometimes called externally for textures not using LLImageGL (should go away...)
- static S32 updateBoundTexMem(const S32 mem, const S32 ncomponents, S32 category) ;
+ static S32 updateBoundTexMem(const S32Bytes mem, const S32 ncomponents, S32 category) ;
static bool checkSize(S32 width, S32 height);
@@ -91,7 +92,7 @@ protected:
void calcAlphaChannelOffsetAndStride();
public:
- virtual void dump(); // debugging info to llinfos
+ virtual void dump(); // debugging info to LL_INFOS()
void setSize(S32 width, S32 height, S32 ncomponents, S32 discard_level = -1);
void setComponents(S32 ncomponents) { mComponents = (S8)ncomponents ;}
@@ -181,7 +182,7 @@ public:
public:
// Various GL/Rendering options
- S32 mTextureMemory;
+ S32Bytes mTextureMemory;
mutable F32 mLastBindTime; // last time this was bound, by discard level
private:
@@ -238,9 +239,9 @@ public:
static F32 sLastFrameTime;
// Global memory statistics
- static S32 sGlobalTextureMemoryInBytes; // Tracks main memory texmem
- static S32 sBoundTextureMemoryInBytes; // Tracks bound texmem for last completed frame
- static S32 sCurBoundTextureMemory; // Tracks bound texmem for current frame
+ static S32Bytes sGlobalTextureMemory; // Tracks main memory texmem
+ static S32Bytes sBoundTextureMemory; // Tracks bound texmem for last completed frame
+ static S32Bytes sCurBoundTextureMemory; // Tracks bound texmem for current frame
static U32 sBindCount; // Tracks number of texture binds for current frame
static U32 sUniqueCount; // Tracks number of unique texture binds for current frame
static BOOL sGlobalUseAnisotropic;