diff options
Diffstat (limited to 'indra/newview/lltexturefetch.h')
-rw-r--r-- | indra/newview/lltexturefetch.h | 127 |
1 files changed, 116 insertions, 11 deletions
diff --git a/indra/newview/lltexturefetch.h b/indra/newview/lltexturefetch.h index 107e1623b0..8c3d762319 100644 --- a/indra/newview/lltexturefetch.h +++ b/indra/newview/lltexturefetch.h @@ -65,6 +65,7 @@ public: bool createRequest(const std::string& url, const LLUUID& id, const LLHost& host, F32 priority, S32 w, S32 h, S32 c, S32 discard, bool needs_aux, bool can_use_http); void deleteRequest(const LLUUID& id, bool cancel); + void deleteAllRequests(); bool getRequestFinished(const LLUUID& id, S32& discard_level, LLPointer<LLImageRaw>& raw, LLPointer<LLImageRaw>& aux); bool updateRequestPriority(const LLUUID& id, F32 priority); @@ -81,8 +82,6 @@ public: U32& fetch_priority_p, F32& fetch_dtime_p, F32& request_dtime_p, bool& can_use_http); void dump(); S32 getNumRequests() ; - S32 getNumHTTPRequests() ; - U32 getTotalNumHTTPRequests() ; // Public for access by callbacks S32 getPending(); @@ -101,7 +100,7 @@ public: LLViewerAssetStats * main_stats); void commandDataBreak(); - LLCurlRequest & getCurlRequest() { return *mCurlGetRequest; } + LLCurlTextureRequest & getCurlRequest() { return *mCurlGetRequest; } bool isQAMode() const { return mQAMode; } @@ -113,7 +112,6 @@ protected: void addToNetworkQueue(LLTextureFetchWorker* worker); void removeFromNetworkQueue(LLTextureFetchWorker* worker, bool cancel); void addToHTTPQueue(const LLUUID& id); - void removeFromHTTPQueue(const LLUUID& id, S32 received_size = 0); void removeRequest(LLTextureFetchWorker* worker, bool cancel); // Overrides from the LLThread tree @@ -172,8 +170,8 @@ private: LLTextureCache* mTextureCache; LLImageDecodeThread* mImageDecodeThread; - LLCurlRequest* mCurlGetRequest; - + LLCurlTextureRequest* mCurlGetRequest; + // Map of all requests by UUID typedef std::map<LLUUID,LLTextureFetchWorker*> map_t; map_t mRequestMap; @@ -188,11 +186,6 @@ private: F32 mMaxBandwidth; LLTextureInfo mTextureInfo; - U32 mHTTPTextureBits; - - //debug use - U32 mTotalHTTPRequests ; - // Out-of-band cross-thread command queue. This command queue // is logically tied to LLQueuedThread's list of // QueuedRequest instances and so must be covered by the @@ -216,18 +209,46 @@ public: // reporting due to either startup or a problem POSTing data. static volatile bool svMetricsDataBreak; +<<<<<<< local +public: + //debug use + enum e_tex_source + { + FROM_ALL = 0, + FROM_HTTP_ONLY, + INVALID_SOURCE + }; +======= +>>>>>>> other private: //debug use LLTextureFetchDebugger* mFetchDebugger; bool mFetcherLocked; +<<<<<<< local + + e_tex_source mFetchSource; + e_tex_source mOriginFetchSource; +======= +>>>>>>> other public: //debug use LLTextureFetchDebugger* getFetchDebugger() { return mFetchDebugger;} void lockFetcher(bool lock) { mFetcherLocked = lock;} +<<<<<<< local + + void setLoadSource(e_tex_source source) {mFetchSource = source;} + void resetLoadSource() {mFetchSource = mOriginFetchSource;} + bool canLoadFromCache() { return mFetchSource != FROM_HTTP_ONLY;} +======= +>>>>>>> other }; //debug use +<<<<<<< local +class LLViewerFetchedTexture; +======= +>>>>>>> other class LLTextureFetchDebugger { friend class LLTextureFetch; @@ -239,6 +260,10 @@ public: enum e_debug_state { IDLE = 0, +<<<<<<< local + START_DEBUG, +======= +>>>>>>> other READ_CACHE, WRITE_CACHE, DECODING, @@ -301,13 +326,22 @@ private: F32 mTotalFetchingTime; F32 mRefetchVisCacheTime; F32 mRefetchVisHTTPTime; +<<<<<<< local + F32 mRefetchAllCacheTime; + F32 mRefetchAllHTTPTime; +======= +>>>>>>> other LLTimer mTimer; LLTextureFetch* mFetcher; LLTextureCache* mTextureCache; LLImageDecodeThread* mImageDecodeThread; +<<<<<<< local + LLCurlTextureRequest* mCurlGetRequest; +======= LLCurlRequest* mCurlGetRequest; +>>>>>>> other S32 mNumFetchedTextures; S32 mNumCacheHits; @@ -321,22 +355,51 @@ private: U32 mRenderedDecodedData; U32 mFetchedPixels; U32 mRenderedPixels; +<<<<<<< local + U32 mRefetchedVisData; + U32 mRefetchedVisPixels; + U32 mRefetchedAllData; + U32 mRefetchedAllPixels; +======= U32 mRefetchedData; U32 mRefetchedPixels; +>>>>>>> other BOOL mFreezeHistory; +<<<<<<< local + BOOL mStopDebug; + BOOL mClearHistory; + BOOL mRefetchNonVis; +======= +>>>>>>> other std::string mHTTPUrl; S32 mNbCurlRequests; S32 mNbCurlCompleted; +<<<<<<< local + std::map< LLPointer<LLViewerFetchedTexture>, std::vector<S32> > mRefetchList; + std::vector< LLPointer<LLViewerFetchedTexture> > mTempTexList; + S32 mTempIndex; + S32 mHistoryListIndex; + +======= +>>>>>>> other public: +<<<<<<< local + bool update(F32 max_time); //called in the main thread once per frame +======= bool update(); //called in the main thread once per frame +>>>>>>> other //fetching history void clearHistory(); void addHistoryEntry(LLTextureFetchWorker* worker); +<<<<<<< local + void setCurlGetRequest(LLCurlTextureRequest* request) { mCurlGetRequest = request;} + LLCurlTextureRequest* getCurlGetRequest() { return mCurlGetRequest;} +======= void setCurlGetRequest(LLCurlRequest* request) { mCurlGetRequest = request;} void startDebug(); @@ -348,7 +411,15 @@ public: void debugGLTextureCreation(); void debugRefetchVisibleFromCache(); void debugRefetchVisibleFromHTTP(); +>>>>>>> other +<<<<<<< local + void startWork(e_debug_state state); + void setStopDebug() {mStopDebug = TRUE;} + void tryToStopDebug(); //stop everything + +======= +>>>>>>> other void callbackCacheRead(S32 id, bool success, LLImageFormatted* image, S32 imagesize, BOOL islocal); void callbackCacheWrite(S32 id, bool success); @@ -372,8 +443,15 @@ public: U32 getRenderedDecodedData() {return mRenderedDecodedData;} U32 getFetchedPixels() {return mFetchedPixels;} U32 getRenderedPixels() {return mRenderedPixels;} +<<<<<<< local + U32 getRefetchedVisData() {return mRefetchedVisData;} + U32 getRefetchedVisPixels() {return mRefetchedVisPixels;} + U32 getRefetchedAllData() {return mRefetchedAllData;} + U32 getRefetchedAllPixels() {return mRefetchedAllPixels;} +======= U32 getRefetchedData() {return mRefetchedData;} U32 getRefetchedPixels() {return mRefetchedPixels;} +>>>>>>> other F32 getCacheReadTime() {return mCacheReadTime;} F32 getCacheWriteTime() {return mCacheWriteTime;} @@ -383,11 +461,21 @@ public: F32 getTotalFetchingTime() {return mTotalFetchingTime;} F32 getRefetchVisCacheTime() {return mRefetchVisCacheTime;} F32 getRefetchVisHTTPTime() {return mRefetchVisHTTPTime;} +<<<<<<< local + F32 getRefetchAllCacheTime() {return mRefetchAllCacheTime;} + F32 getRefetchAllHTTPTime() {return mRefetchAllHTTPTime;} +======= +>>>>>>> other private: void init(); void clearTextures();//clear fetching results of all textures. void clearCache(); +<<<<<<< local + void makeRefetchList(); + void scanRefetchList(); +======= +>>>>>>> other void lockFetcher(); void unlockFetcher(); @@ -400,6 +488,23 @@ private: S32 fillCurlQueue(); +<<<<<<< local + void startDebug(); + void debugCacheRead(); + void debugCacheWrite(); + void debugHTTP(); + void debugDecoder(); + void debugGLTextureCreation(); + void debugRefetchVisibleFromCache(); + void debugRefetchVisibleFromHTTP(); + void debugRefetchAllFromCache(); + void debugRefetchAllFromHTTP(); + + bool processStartDebug(F32 max_time); + bool processGLCreation(F32 max_time); + +======= +>>>>>>> other private: static bool sDebuggerEnabled; public: |