summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/llviewertexture.cpp29
-rw-r--r--indra/newview/llviewertexture.h7
2 files changed, 35 insertions, 1 deletions
diff --git a/indra/newview/llviewertexture.cpp b/indra/newview/llviewertexture.cpp
index 7edfa6adfa..12835002d3 100644
--- a/indra/newview/llviewertexture.cpp
+++ b/indra/newview/llviewertexture.cpp
@@ -698,6 +698,28 @@ void LLViewerTexture::setBoostLevel(S32 level)
}
+bool LLViewerTexture::isActiveFetching()
+{
+ return false;
+}
+
+bool LLViewerTexture::bindDebugImage(const S32 stage)
+{
+ if (stage < 0) return false;
+
+ bool res = true;
+ if (LLViewerTexture::sCheckerBoardImagep.notNull() && (this != LLViewerTexture::sCheckerBoardImagep.get()))
+ {
+ res = gGL.getTexUnit(stage)->bind(LLViewerTexture::sCheckerBoardImagep);
+ }
+
+ if(!res)
+ {
+ return bindDefaultImage(stage);
+ }
+
+ return res;
+}
bool LLViewerTexture::bindDefaultImage(S32 stage)
{
@@ -1990,6 +2012,13 @@ bool LLViewerFetchedTexture::setDebugFetching(S32 debug_level)
return true;
}
+bool LLViewerFetchedTexture::isActiveFetching()
+{
+ static LLCachedControl<bool> monitor_enabled(gSavedSettings,"DebugShowTextureInfo");
+
+ return mFetchState > 7 && mFetchState < 10 && monitor_enabled; //in state of WAIT_HTTP_REQ or DECODE_IMAGE.
+}
+
bool LLViewerFetchedTexture::updateFetch()
{
static LLCachedControl<bool> textures_decode_disabled(gSavedSettings,"TextureDecodeDisabled");
diff --git a/indra/newview/llviewertexture.h b/indra/newview/llviewertexture.h
index 0a9778ce76..d69a0ffb72 100644
--- a/indra/newview/llviewertexture.h
+++ b/indra/newview/llviewertexture.h
@@ -167,8 +167,10 @@ public:
virtual void dump(); // debug info to llinfos
/*virtual*/ bool bindDefaultImage(const S32 stage = 0) ;
+ /*virtual*/ bool bindDebugImage(const S32 stage = 0) ;
/*virtual*/ void forceImmediateUpdate() ;
-
+ /*virtual*/ bool isActiveFetching();
+
const LLUUID& getID() const { return mID; }
void setBoostLevel(S32 level);
@@ -506,6 +508,9 @@ public:
void loadFromFastCache();
void setInFastCacheList(bool in_list) { mInFastCacheList = in_list; }
bool isInFastCacheList() { return mInFastCacheList; }
+
+ /*virtual*/bool isActiveFetching(); //is actively in fetching by the fetching pipeline.
+
protected:
/*virtual*/ void switchToCachedImage();
S32 getCurrentDiscardLevelForFetching() ;