diff options
author | Brad Payne (Vir Linden) <vir@lindenlab.com> | 2012-05-03 17:25:40 -0400 |
---|---|---|
committer | Brad Payne (Vir Linden) <vir@lindenlab.com> | 2012-05-03 17:25:40 -0400 |
commit | 32c024c41d8edb2bbf5441178d83f3365182ed61 (patch) | |
tree | 8c0ad45af0e645584807f98eef6942f83c4f0698 /indra/newview/lltexturefetch.h | |
parent | 30140f66be90b78006b29b7f3740ddc473a0ac96 (diff) | |
parent | c143a4f87ee465c797a0fcf06e267bd32b9e52c7 (diff) |
merge
Diffstat (limited to 'indra/newview/lltexturefetch.h')
-rw-r--r-- | indra/newview/lltexturefetch.h | 40 |
1 files changed, 36 insertions, 4 deletions
diff --git a/indra/newview/lltexturefetch.h b/indra/newview/lltexturefetch.h index 107e1623b0..ff78d34eda 100644 --- a/indra/newview/lltexturefetch.h +++ b/indra/newview/lltexturefetch.h @@ -216,18 +216,36 @@ 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_CACHE_ONLY, + FROM_NETWORK_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_NETWORK_ONLY;} + bool canLoadFromNetwork() { return mFetchSource != FROM_CACHE_ONLY;} }; //debug use +class LLViewerFetchedTexture; class LLTextureFetchDebugger { friend class LLTextureFetch; @@ -301,6 +319,8 @@ private: F32 mTotalFetchingTime; F32 mRefetchVisCacheTime; F32 mRefetchVisHTTPTime; + F32 mRefetchAllCacheTime; + F32 mRefetchAllHTTPTime; LLTimer mTimer; @@ -321,8 +341,10 @@ private: U32 mRenderedDecodedData; U32 mFetchedPixels; U32 mRenderedPixels; - U32 mRefetchedData; - U32 mRefetchedPixels; + U32 mRefetchedVisData; + U32 mRefetchedVisPixels; + U32 mRefetchedAllData; + U32 mRefetchedAllPixels; BOOL mFreezeHistory; @@ -330,6 +352,8 @@ private: S32 mNbCurlRequests; S32 mNbCurlCompleted; + std::map< LLPointer<LLViewerFetchedTexture>, std::vector<S32> > mRefetchList; + F32 mRefetchStartTime; public: bool update(); //called in the main thread once per frame @@ -348,6 +372,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 +398,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 +411,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(); |