summaryrefslogtreecommitdiff
path: root/indra/newview/lltexturefetch.h
diff options
context:
space:
mode:
authorMerov Linden <merov@lindenlab.com>2012-05-07 10:44:27 -0700
committerMerov Linden <merov@lindenlab.com>2012-05-07 10:44:27 -0700
commit2259cef803a8a3d74779ade5153e72f8806a6dab (patch)
tree827b001f17cf5e8eb8f7d1fb1a19b0d7d7df43c7 /indra/newview/lltexturefetch.h
parent56af97063aaa35c1a70f5edaf47f4a015600860d (diff)
parentf86592e34e47b9f5b0e39c20b0e16d1367a311b9 (diff)
Pull from vir/drano
Diffstat (limited to 'indra/newview/lltexturefetch.h')
-rw-r--r--indra/newview/lltexturefetch.h44
1 files changed, 39 insertions, 5 deletions
diff --git a/indra/newview/lltexturefetch.h b/indra/newview/lltexturefetch.h
index 107e1623b0..436306398e 100644
--- a/indra/newview/lltexturefetch.h
+++ b/indra/newview/lltexturefetch.h
@@ -216,18 +216,34 @@ public:
// reporting due to either startup or a problem POSTing data.
static volatile bool svMetricsDataBreak;
+public:
+ //debug use
+ enum e_tex_source
+ {
+ FROM_ALL = 0,
+ FROM_HTTP_ONLY,
+ INVALID_SOURCE
+ };
private:
//debug use
LLTextureFetchDebugger* mFetchDebugger;
bool mFetcherLocked;
+
+ e_tex_source mFetchSource;
+ e_tex_source mOriginFetchSource;
public:
//debug use
LLTextureFetchDebugger* getFetchDebugger() { return mFetchDebugger;}
void lockFetcher(bool lock) { mFetcherLocked = lock;}
+
+ void setLoadSource(e_tex_source source) {mFetchSource = source;}
+ void resetLoadSource() {mFetchSource = mOriginFetchSource;}
+ bool canLoadFromCache() { return mFetchSource != FROM_HTTP_ONLY;}
};
//debug use
+class LLViewerFetchedTexture;
class LLTextureFetchDebugger
{
friend class LLTextureFetch;
@@ -239,6 +255,7 @@ public:
enum e_debug_state
{
IDLE = 0,
+ START_DEBUG,
READ_CACHE,
WRITE_CACHE,
DECODING,
@@ -301,6 +318,8 @@ private:
F32 mTotalFetchingTime;
F32 mRefetchVisCacheTime;
F32 mRefetchVisHTTPTime;
+ F32 mRefetchAllCacheTime;
+ F32 mRefetchAllHTTPTime;
LLTimer mTimer;
@@ -321,15 +340,21 @@ private:
U32 mRenderedDecodedData;
U32 mFetchedPixels;
U32 mRenderedPixels;
- U32 mRefetchedData;
- U32 mRefetchedPixels;
+ U32 mRefetchedVisData;
+ U32 mRefetchedVisPixels;
+ U32 mRefetchedAllData;
+ U32 mRefetchedAllPixels;
BOOL mFreezeHistory;
+ BOOL mStopDebug;
+ BOOL mClearHistory;
+ BOOL mRefetchNonVis;
std::string mHTTPUrl;
S32 mNbCurlRequests;
S32 mNbCurlCompleted;
+ std::map< LLPointer<LLViewerFetchedTexture>, std::vector<S32> > mRefetchList;
public:
bool update(); //called in the main thread once per frame
@@ -340,7 +365,8 @@ public:
void setCurlGetRequest(LLCurlRequest* request) { mCurlGetRequest = request;}
void startDebug();
- void stopDebug(); //stop everything
+ void setStopDebug() {mStopDebug = TRUE;}
+ void tryToStopDebug(); //stop everything
void debugCacheRead();
void debugCacheWrite();
void debugHTTP();
@@ -348,6 +374,8 @@ public:
void debugGLTextureCreation();
void debugRefetchVisibleFromCache();
void debugRefetchVisibleFromHTTP();
+ void debugRefetchAllFromCache();
+ void debugRefetchAllFromHTTP();
void callbackCacheRead(S32 id, bool success, LLImageFormatted* image,
S32 imagesize, BOOL islocal);
@@ -372,8 +400,10 @@ public:
U32 getRenderedDecodedData() {return mRenderedDecodedData;}
U32 getFetchedPixels() {return mFetchedPixels;}
U32 getRenderedPixels() {return mRenderedPixels;}
- U32 getRefetchedData() {return mRefetchedData;}
- U32 getRefetchedPixels() {return mRefetchedPixels;}
+ U32 getRefetchedVisData() {return mRefetchedVisData;}
+ U32 getRefetchedVisPixels() {return mRefetchedVisPixels;}
+ U32 getRefetchedAllData() {return mRefetchedAllData;}
+ U32 getRefetchedAllPixels() {return mRefetchedAllPixels;}
F32 getCacheReadTime() {return mCacheReadTime;}
F32 getCacheWriteTime() {return mCacheWriteTime;}
@@ -383,11 +413,15 @@ public:
F32 getTotalFetchingTime() {return mTotalFetchingTime;}
F32 getRefetchVisCacheTime() {return mRefetchVisCacheTime;}
F32 getRefetchVisHTTPTime() {return mRefetchVisHTTPTime;}
+ F32 getRefetchAllCacheTime() {return mRefetchAllCacheTime;}
+ F32 getRefetchAllHTTPTime() {return mRefetchAllHTTPTime;}
private:
void init();
void clearTextures();//clear fetching results of all textures.
void clearCache();
+ void makeRefetchList();
+ void scanRefetchList();
void lockFetcher();
void unlockFetcher();