summaryrefslogtreecommitdiff
path: root/indra
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
parent56af97063aaa35c1a70f5edaf47f4a015600860d (diff)
parentf86592e34e47b9f5b0e39c20b0e16d1367a311b9 (diff)
Pull from vir/drano
Diffstat (limited to 'indra')
-rw-r--r--indra/llmessage/llavatarnamecache.cpp20
-rwxr-xr-xindra/newview/app_settings/settings.xml11
-rw-r--r--indra/newview/llfloatertexturefetchdebugger.cpp204
-rw-r--r--indra/newview/llfloatertexturefetchdebugger.h5
-rwxr-xr-xindra/newview/lltexturefetch.cpp247
-rw-r--r--indra/newview/lltexturefetch.h44
-rw-r--r--indra/newview/llviewertexture.cpp27
-rw-r--r--indra/newview/llviewertexture.h3
-rw-r--r--indra/newview/llviewertexturelist.cpp26
-rw-r--r--indra/newview/llviewertexturelist.h1
-rw-r--r--indra/newview/skins/default/xui/en/floater_texture_fetch_debugger.xml101
11 files changed, 602 insertions, 87 deletions
diff --git a/indra/llmessage/llavatarnamecache.cpp b/indra/llmessage/llavatarnamecache.cpp
index 97f2792686..fbc3cc6de2 100644
--- a/indra/llmessage/llavatarnamecache.cpp
+++ b/indra/llmessage/llavatarnamecache.cpp
@@ -87,6 +87,9 @@ namespace LLAvatarNameCache
/// Time when unrefreshed cached names were checked last
static F64 sLastExpireCheck;
+ /// Time-to-live for a temp cache entry.
+ const F64 TEMP_CACHE_ENTRY_LIFETIME = 60.0;
+
//-----------------------------------------------------------------------
// Internal methods
//-----------------------------------------------------------------------
@@ -274,7 +277,7 @@ void LLAvatarNameCache::handleAgentError(const LLUUID& agent_id)
{
// there is no existing cache entry, so make a temporary name from legacy
LL_WARNS("AvNameCache") << "LLAvatarNameCache get legacy for agent "
- << agent_id << LL_ENDL;
+ << agent_id << LL_ENDL;
gCacheName->get(agent_id, false, // legacy compatibility
boost::bind(&LLAvatarNameCache::legacyNameCallback,
_1, _2, _3));
@@ -287,13 +290,14 @@ void LLAvatarNameCache::handleAgentError(const LLUUID& agent_id)
// Clear this agent from the pending list
LLAvatarNameCache::sPendingQueue.erase(agent_id);
- const LLAvatarName& av_name = existing->second;
+ LLAvatarName& av_name = existing->second;
LL_DEBUGS("AvNameCache") << "LLAvatarNameCache use cache for agent "
<< agent_id
<< "user '" << av_name.mUsername << "' "
<< "display '" << av_name.mDisplayName << "' "
<< "expires in " << av_name.mExpires - LLFrameTimer::getTotalSeconds() << " seconds"
<< LL_ENDL;
+ av_name.mExpires = LLFrameTimer::getTotalSeconds() + TEMP_CACHE_ENTRY_LIFETIME; // reset expiry time so we don't constantly rerequest.
}
}
@@ -402,10 +406,12 @@ void LLAvatarNameCache::legacyNameCallback(const LLUUID& agent_id,
<< LL_ENDL;
buildLegacyName(full_name, &av_name);
- // Don't add to cache, the data already exists in the legacy name system
- // cache and we don't want or need duplicate storage, because keeping the
- // two copies in sync is complex.
- processName(agent_id, av_name, false);
+ // Add to cache, because if we don't we'll keep rerequesting the
+ // same record forever. buildLegacyName should always guarantee
+ // that these records expire reasonably soon
+ // (in TEMP_CACHE_ENTRY_LIFETIME seconds), so if the failure was due
+ // to something temporary we will eventually request and get the right data.
+ processName(agent_id, av_name, true);
}
void LLAvatarNameCache::requestNamesViaLegacy()
@@ -583,7 +589,7 @@ void LLAvatarNameCache::buildLegacyName(const std::string& full_name,
av_name->mDisplayName = full_name;
av_name->mIsDisplayNameDefault = true;
av_name->mIsTemporaryName = true;
- av_name->mExpires = F64_MAX; // not used because these are not cached
+ av_name->mExpires = LLFrameTimer::getTotalSeconds() + TEMP_CACHE_ENTRY_LIFETIME;
LL_DEBUGS("AvNameCache") << "LLAvatarNameCache::buildLegacyName "
<< full_name
<< LL_ENDL;
diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml
index bd14580205..4a0006c357 100755
--- a/indra/newview/app_settings/settings.xml
+++ b/indra/newview/app_settings/settings.xml
@@ -10719,6 +10719,17 @@
<key>Value</key>
<integer>0</integer>
</map>
+ <key>TextureFetchSource</key>
+ <map>
+ <key>Comment</key>
+ <string>Debug use: Source to fetch textures</string>
+ <key>Persist</key>
+ <integer>1</integer>
+ <key>Type</key>
+ <string>S32</string>
+ <key>Value</key>
+ <integer>0</integer>
+ </map>
<key>TextureLoadFullRes</key>
<map>
<key>Comment</key>
diff --git a/indra/newview/llfloatertexturefetchdebugger.cpp b/indra/newview/llfloatertexturefetchdebugger.cpp
index 2b34b72055..02872f54a0 100644
--- a/indra/newview/llfloatertexturefetchdebugger.cpp
+++ b/indra/newview/llfloatertexturefetchdebugger.cpp
@@ -59,12 +59,15 @@ LLFloaterTextureFetchDebugger::LLFloaterTextureFetchDebugger(const LLSD& key)
mCommitCallbackRegistrar.add("TexFetchDebugger.RefetchVisCache", boost::bind(&LLFloaterTextureFetchDebugger::onClickRefetchVisCache, this));
mCommitCallbackRegistrar.add("TexFetchDebugger.RefetchVisHTTP", boost::bind(&LLFloaterTextureFetchDebugger::onClickRefetchVisHTTP, this));
+ mCommitCallbackRegistrar.add("TexFetchDebugger.RefetchAllCache", boost::bind(&LLFloaterTextureFetchDebugger::onClickRefetchAllCache, this));
+ mCommitCallbackRegistrar.add("TexFetchDebugger.RefetchAllHTTP", boost::bind(&LLFloaterTextureFetchDebugger::onClickRefetchAllHTTP, this));
}
//----------------------------------------------
BOOL LLFloaterTextureFetchDebugger::postBuild(void)
{
mDebugger = LLAppViewer::getTextureFetch()->getFetchDebugger();
+ mStartStatus = (S32)LLTextureFetchDebugger::IDLE;
//set states for buttons
mButtonStateMap["start_btn"] = true;
@@ -76,8 +79,10 @@ BOOL LLFloaterTextureFetchDebugger::postBuild(void)
mButtonStateMap["decode_btn"] = false;
mButtonStateMap["gl_btn"] = false;
- mButtonStateMap["refetchviscache_btn"] = true;
- mButtonStateMap["refetchvishttp_btn"] = true;
+ mButtonStateMap["refetchviscache_btn"] = false;
+ mButtonStateMap["refetchvishttp_btn"] = false;
+ mButtonStateMap["refetchallcache_btn"] = false;
+ mButtonStateMap["refetchallhttp_btn"] = false;
updateButtons();
@@ -89,7 +94,7 @@ BOOL LLFloaterTextureFetchDebugger::postBuild(void)
LLFloaterTextureFetchDebugger::~LLFloaterTextureFetchDebugger()
{
//stop everything
- mDebugger->stopDebug();
+ mDebugger->setStopDebug();
}
void LLFloaterTextureFetchDebugger::updateButtons()
@@ -118,47 +123,109 @@ void LLFloaterTextureFetchDebugger::disableButtons()
childDisable("gl_btn");
childDisable("refetchviscache_btn");
childDisable("refetchvishttp_btn");
+ childDisable("refetchallcache_btn");
+ childDisable("refetchallhttp_btn");
+}
+void LLFloaterTextureFetchDebugger::setStartStatus(S32 status)
+{
+ llassert_always(LLTextureFetchDebugger::IDLE == (LLTextureFetchDebugger::e_debug_state)mStartStatus) ;
+ mStartStatus = status;
+}
+
+bool LLFloaterTextureFetchDebugger::idleStart()
+{
+ switch((LLTextureFetchDebugger::e_debug_state)mStartStatus)
+ {
+ case LLTextureFetchDebugger::IDLE:
+ break;
+ case LLTextureFetchDebugger::START_DEBUG:
+ mDebugger->startDebug();
+ break;
+ case LLTextureFetchDebugger::READ_CACHE:
+ mDebugger->debugCacheRead();
+ break;
+ case LLTextureFetchDebugger::WRITE_CACHE:
+ mDebugger->debugCacheWrite();
+ break;
+ case LLTextureFetchDebugger::DECODING:
+ mDebugger->debugDecoder();
+ break;
+ case LLTextureFetchDebugger::HTTP_FETCHING:
+ mDebugger->debugHTTP();
+ break;
+ case LLTextureFetchDebugger::GL_TEX:
+ mDebugger->debugGLTextureCreation();
+ break;
+ case LLTextureFetchDebugger::REFETCH_VIS_CACHE:
+ mDebugger->debugRefetchVisibleFromCache();
+ break;
+ case LLTextureFetchDebugger::REFETCH_VIS_HTTP:
+ mDebugger->debugRefetchVisibleFromHTTP();
+ break;
+ case LLTextureFetchDebugger::REFETCH_ALL_CACHE:
+ mDebugger->debugRefetchAllFromCache();
+ break;
+ case LLTextureFetchDebugger::REFETCH_ALL_HTTP:
+ mDebugger->debugRefetchAllFromHTTP();
+ break;
+ default:
+ break;
+ }
+
+ if(mStartStatus != (S32)LLTextureFetchDebugger::IDLE)
+ {
+ mStartStatus = (S32)LLTextureFetchDebugger::IDLE;
+ return true;
+ }
+
+ return false;
}
void LLFloaterTextureFetchDebugger::idle()
{
- LLTextureFetchDebugger::e_debug_state state = mDebugger->getState();
-
+ if(idleStart())
+ {
+ return;
+ }
+
+ LLTextureFetchDebugger::e_debug_state state = mDebugger->getState();
if(mDebugger->update())
{
switch(state)
{
case LLTextureFetchDebugger::IDLE:
break;
- case LLTextureFetchDebugger::READ_CACHE:
- mButtonStateMap["cachewrite_btn"] = true;
- mButtonStateMap["decode_btn"] = true;
- updateButtons();
+ case LLTextureFetchDebugger::READ_CACHE:
+ mButtonStateMap["decode_btn"] = true;
break;
- case LLTextureFetchDebugger::WRITE_CACHE:
- updateButtons();
+ case LLTextureFetchDebugger::WRITE_CACHE:
break;
case LLTextureFetchDebugger::DECODING:
- mButtonStateMap["gl_btn"] = true;
- updateButtons();
+ mButtonStateMap["gl_btn"] = true;
break;
case LLTextureFetchDebugger::HTTP_FETCHING:
mButtonStateMap["cacheread_btn"] = true;
mButtonStateMap["cachewrite_btn"] = true;
- mButtonStateMap["decode_btn"] = true;
- updateButtons();
+ mButtonStateMap["decode_btn"] = true;
break;
- case LLTextureFetchDebugger::GL_TEX:
- updateButtons();
+ case LLTextureFetchDebugger::GL_TEX:
break;
- case LLTextureFetchDebugger::REFETCH_VIS_CACHE:
- updateButtons();
- case LLTextureFetchDebugger::REFETCH_VIS_HTTP:
- updateButtons();
+ case LLTextureFetchDebugger::REFETCH_VIS_CACHE:
+ break;
+ case LLTextureFetchDebugger::REFETCH_VIS_HTTP:
+ break;
+ case LLTextureFetchDebugger::REFETCH_ALL_CACHE:
+ break;
+ case LLTextureFetchDebugger::REFETCH_ALL_HTTP:
break;
default:
break;
}
+
+ if(state != LLTextureFetchDebugger::IDLE)
+ {
+ updateButtons();
+ }
}
}
@@ -172,11 +239,30 @@ void LLFloaterTextureFetchDebugger::onClickStart()
{
disableButtons();
- mDebugger->startDebug();
+ setStartStatus((S32)LLTextureFetchDebugger::START_DEBUG);
mButtonStateMap["start_btn"] = false;
- mButtonStateMap["cacheread_btn"] = true;
- mButtonStateMap["http_btn"] = true;
+
+ //if(LLAppViewer::getTextureFetch()->canLoadFromCache())
+ //{
+ // mButtonStateMap["cacheread_btn"] = true;
+ // mButtonStateMap["http_btn"] = false;
+ // mButtonStateMap["refetchviscache_btn"] = true;
+ // mButtonStateMap["refetchvishttp_btn"] = false;
+ // mButtonStateMap["refetchallcache_btn"] = true;
+ // mButtonStateMap["refetchallhttp_btn"] = false;
+ // mButtonStateMap["cachewrite_btn"] = false;
+ //}
+ //else
+ {
+ mButtonStateMap["cacheread_btn"] = true;
+ mButtonStateMap["http_btn"] = true;
+ mButtonStateMap["refetchviscache_btn"] = true;
+ mButtonStateMap["refetchvishttp_btn"] = true;
+ mButtonStateMap["refetchallcache_btn"] = true;
+ mButtonStateMap["refetchallhttp_btn"] = true;
+ }
+
updateButtons();
}
@@ -185,7 +271,9 @@ void LLFloaterTextureFetchDebugger::onClickClose()
setVisible(FALSE);
//stop everything
- mDebugger->stopDebug();
+ mDebugger->setStopDebug();
+
+ delete this;
}
void LLFloaterTextureFetchDebugger::onClickClear()
@@ -203,7 +291,7 @@ void LLFloaterTextureFetchDebugger::onClickClear()
updateButtons();
//stop everything
- mDebugger->stopDebug();
+ mDebugger->setStopDebug();
mDebugger->clearHistory();
}
@@ -211,49 +299,63 @@ void LLFloaterTextureFetchDebugger::onClickCacheRead()
{
disableButtons();
- mDebugger->debugCacheRead();
+ setStartStatus((S32)LLTextureFetchDebugger::READ_CACHE);
}
void LLFloaterTextureFetchDebugger::onClickCacheWrite()
{
disableButtons();
- mDebugger->debugCacheWrite();
+ setStartStatus((S32)LLTextureFetchDebugger::WRITE_CACHE);
}
void LLFloaterTextureFetchDebugger::onClickHTTPLoad()
{
disableButtons();
- mDebugger->debugHTTP();
+ setStartStatus((S32)LLTextureFetchDebugger::HTTP_FETCHING);
}
void LLFloaterTextureFetchDebugger::onClickDecode()
{
disableButtons();
- mDebugger->debugDecoder();
+ setStartStatus((S32)LLTextureFetchDebugger::DECODING);
}
void LLFloaterTextureFetchDebugger::onClickGLTexture()
{
disableButtons();
- mDebugger->debugGLTextureCreation();
+ setStartStatus((S32)LLTextureFetchDebugger::GL_TEX);
}
void LLFloaterTextureFetchDebugger::onClickRefetchVisCache()
{
disableButtons();
- mDebugger->debugRefetchVisibleFromCache();
+ setStartStatus((S32)LLTextureFetchDebugger::REFETCH_VIS_CACHE);
}
void LLFloaterTextureFetchDebugger::onClickRefetchVisHTTP()
{
disableButtons();
- mDebugger->debugRefetchVisibleFromHTTP();
+ setStartStatus((S32)LLTextureFetchDebugger::REFETCH_VIS_HTTP);
+}
+
+void LLFloaterTextureFetchDebugger::onClickRefetchAllCache()
+{
+ disableButtons();
+
+ setStartStatus((S32)LLTextureFetchDebugger::REFETCH_ALL_CACHE);
+}
+
+void LLFloaterTextureFetchDebugger::onClickRefetchAllHTTP()
+{
+ disableButtons();
+
+ setStartStatus((S32)LLTextureFetchDebugger::REFETCH_ALL_HTTP);
}
void LLFloaterTextureFetchDebugger::draw()
@@ -368,8 +470,22 @@ void LLFloaterTextureFetchDebugger::draw()
else
{
getChild<LLUICtrl>("total_time_refetch_vis_cache_label")->setTextArg("[TIME]", llformat("%.3f", mDebugger->getRefetchVisCacheTime()));
- getChild<LLUICtrl>("total_time_refetch_vis_cache_label")->setTextArg("[SIZE]", llformat("%d", mDebugger->getRefetchedData() >> 10));
- getChild<LLUICtrl>("total_time_refetch_vis_cache_label")->setTextArg("[PIXEL]", llformat("%.3f", mDebugger->getRefetchedPixels() / 1000000.f));
+ getChild<LLUICtrl>("total_time_refetch_vis_cache_label")->setTextArg("[SIZE]", llformat("%d", mDebugger->getRefetchedVisData() >> 10));
+ getChild<LLUICtrl>("total_time_refetch_vis_cache_label")->setTextArg("[PIXEL]", llformat("%.3f", mDebugger->getRefetchedVisPixels() / 1000000.f));
+ }
+
+ //total time on refetching all textures from cache
+ if(mDebugger->getRefetchAllCacheTime() < 0.f)
+ {
+ getChild<LLUICtrl>("total_time_refetch_all_cache_label")->setTextArg("[TIME]", std::string("----"));
+ getChild<LLUICtrl>("total_time_refetch_all_cache_label")->setTextArg("[SIZE]", std::string("----"));
+ getChild<LLUICtrl>("total_time_refetch_all_cache_label")->setTextArg("[PIXEL]", std::string("----"));
+ }
+ else
+ {
+ getChild<LLUICtrl>("total_time_refetch_all_cache_label")->setTextArg("[TIME]", llformat("%.3f", mDebugger->getRefetchAllCacheTime()));
+ getChild<LLUICtrl>("total_time_refetch_all_cache_label")->setTextArg("[SIZE]", llformat("%d", mDebugger->getRefetchedAllData() >> 10));
+ getChild<LLUICtrl>("total_time_refetch_all_cache_label")->setTextArg("[PIXEL]", llformat("%.3f", mDebugger->getRefetchedAllPixels() / 1000000.f));
}
//total time on refetching visible textures from http
@@ -382,8 +498,22 @@ void LLFloaterTextureFetchDebugger::draw()
else
{
getChild<LLUICtrl>("total_time_refetch_vis_http_label")->setTextArg("[TIME]", llformat("%.3f", mDebugger->getRefetchVisHTTPTime()));
- getChild<LLUICtrl>("total_time_refetch_vis_http_label")->setTextArg("[SIZE]", llformat("%d", mDebugger->getRefetchedData() >> 10));
- getChild<LLUICtrl>("total_time_refetch_vis_http_label")->setTextArg("[PIXEL]", llformat("%.3f", mDebugger->getRefetchedPixels() / 1000000.f));
+ getChild<LLUICtrl>("total_time_refetch_vis_http_label")->setTextArg("[SIZE]", llformat("%d", mDebugger->getRefetchedVisData() >> 10));
+ getChild<LLUICtrl>("total_time_refetch_vis_http_label")->setTextArg("[PIXEL]", llformat("%.3f", mDebugger->getRefetchedVisPixels() / 1000000.f));
+ }
+
+ //total time on refetching all textures from http
+ if(mDebugger->getRefetchAllHTTPTime() < 0.f)
+ {
+ getChild<LLUICtrl>("total_time_refetch_all_http_label")->setTextArg("[TIME]", std::string("----"));
+ getChild<LLUICtrl>("total_time_refetch_all_http_label")->setTextArg("[SIZE]", std::string("----"));
+ getChild<LLUICtrl>("total_time_refetch_all_http_label")->setTextArg("[PIXEL]", std::string("----"));
+ }
+ else
+ {
+ getChild<LLUICtrl>("total_time_refetch_all_http_label")->setTextArg("[TIME]", llformat("%.3f", mDebugger->getRefetchAllHTTPTime()));
+ getChild<LLUICtrl>("total_time_refetch_all_http_label")->setTextArg("[SIZE]", llformat("%d", mDebugger->getRefetchedAllData() >> 10));
+ getChild<LLUICtrl>("total_time_refetch_all_http_label")->setTextArg("[PIXEL]", llformat("%.3f", mDebugger->getRefetchedAllPixels() / 1000000.f));
}
LLFloater::draw();
diff --git a/indra/newview/llfloatertexturefetchdebugger.h b/indra/newview/llfloatertexturefetchdebugger.h
index 33012c6a3d..096ad88e07 100644
--- a/indra/newview/llfloatertexturefetchdebugger.h
+++ b/indra/newview/llfloatertexturefetchdebugger.h
@@ -53,6 +53,8 @@ public:
void onClickRefetchVisCache();
void onClickRefetchVisHTTP();
+ void onClickRefetchAllCache();
+ void onClickRefetchAllHTTP();
public:
void idle() ;
@@ -63,9 +65,12 @@ private:
void updateButtons();
void disableButtons();
+ void setStartStatus(S32 status);
+ bool idleStart();
private:
LLTextureFetchDebugger* mDebugger;
std::map<std::string, bool> mButtonStateMap;
+ S32 mStartStatus;
};
#endif // LL_FLOATER_TEXTURE_FETCH_DEBUGGER__H
diff --git a/indra/newview/lltexturefetch.cpp b/indra/newview/lltexturefetch.cpp
index f24c6c6424..35dd1c5123 100755
--- a/indra/newview/lltexturefetch.cpp
+++ b/indra/newview/lltexturefetch.cpp
@@ -695,7 +695,7 @@ LLTextureFetchWorker::LLTextureFetchWorker(LLTextureFetch* fetcher,
mMetricsStartTime(0)
{
mCanUseNET = mUrl.empty() ;
-
+
calcWorkPriority();
mType = host.isOk() ? LLImageBase::TYPE_AVATAR_BAKE : LLImageBase::TYPE_NORMAL;
// llinfos << "Create: " << mID << " mHost:" << host << " Discard=" << discard << llendl;
@@ -945,7 +945,7 @@ bool LLTextureFetchWorker::doWork(S32 param)
offset, size, responder);
mCacheReadTimer.reset();
}
- else if (mUrl.empty())
+ else if (mUrl.empty() && mFetcher->canLoadFromCache())
{
setPriority(LLWorkerThread::PRIORITY_LOW | mWorkPriority); // Set priority first since Responder may change it
@@ -954,7 +954,7 @@ bool LLTextureFetchWorker::doWork(S32 param)
offset, size, responder);
mCacheReadTimer.reset();
}
- else if(mCanUseHTTP)
+ else if(!mUrl.empty() && mCanUseHTTP)
{
if (!(mUrl.compare(0, 7, "http://") == 0))
{
@@ -1021,6 +1021,7 @@ bool LLTextureFetchWorker::doWork(S32 param)
LL_DEBUGS("Texture") << mID << ": Not in Cache" << LL_ENDL;
mState = LOAD_FROM_NETWORK;
}
+
// fall through
LLTextureFetch::sCacheHitRate.addValue(0.f);
}
@@ -1061,7 +1062,7 @@ bool LLTextureFetchWorker::doWork(S32 param)
}
if (mCanUseHTTP && !mUrl.empty())
{
- mState = LLTextureFetchWorker::SEND_HTTP_REQ;
+ mState = SEND_HTTP_REQ;
setPriority(LLWorkerThread::PRIORITY_HIGH | mWorkPriority);
if(mWriteToCacheState != NOT_WRITE)
{
@@ -1867,7 +1868,9 @@ LLTextureFetch::LLTextureFetch(LLTextureCache* cache, LLImageDecodeThread* image
mTotalHTTPRequests(0),
mCurlGetRequest(NULL),
mQAMode(qa_mode),
- mFetchDebugger(NULL)
+ mFetchDebugger(NULL),
+ mFetchSource(LLTextureFetch::FROM_ALL),
+ mOriginFetchSource(LLTextureFetch::FROM_ALL)
{
mCurlPOSTRequestCount = 0;
mMaxBandwidth = gSavedSettings.getF32("ThrottleBandwidthKBPS");
@@ -1877,6 +1880,13 @@ LLTextureFetch::LLTextureFetch(LLTextureCache* cache, LLImageDecodeThread* image
if(LLTextureFetchDebugger::isEnabled())
{
mFetchDebugger = new LLTextureFetchDebugger(this, cache, imagedecodethread) ;
+ mFetchSource = (e_tex_source)gSavedSettings.getS32("TextureFetchSource");
+ if(mFetchSource < 0 && mFetchSource >= INVALID_SOURCE)
+ {
+ mFetchSource = LLTextureFetch::FROM_ALL;
+ gSavedSettings.setS32("TextureFetchSource", 0);
+ }
+ mOriginFetchSource = mFetchSource;
}
}
@@ -2298,6 +2308,10 @@ S32 LLTextureFetch::update(F32 max_time_ms)
commonUpdate();
}
+ if(mFetchDebugger)
+ {
+ mFetchDebugger->tryToStopDebug(); //check if need to stop debugger.
+ }
return res;
}
@@ -3184,7 +3198,8 @@ LLTextureFetchDebugger::LLTextureFetchDebugger(LLTextureFetch* fetcher, LLTextur
LLTextureFetchDebugger::~LLTextureFetchDebugger()
{
mFetchingHistory.clear();
- stopDebug();
+ mStopDebug = TRUE;
+ tryToStopDebug();
}
void LLTextureFetchDebugger::init()
@@ -3199,6 +3214,8 @@ void LLTextureFetchDebugger::init()
mTotalFetchingTime = 0.f;
mRefetchVisCacheTime = -1.f;
mRefetchVisHTTPTime = -1.f;
+ mRefetchAllCacheTime = -1.f;
+ mRefetchAllHTTPTime = -1.f;
mNumFetchedTextures = 0;
mNumCacheHits = 0;
@@ -3212,10 +3229,14 @@ void LLTextureFetchDebugger::init()
mRenderedDecodedData = 0;
mFetchedPixels = 0;
mRenderedPixels = 0;
- mRefetchedData = 0;
- mRefetchedPixels = 0;
+ mRefetchedVisData = 0;
+ mRefetchedVisPixels = 0;
+ mRefetchedAllData = 0;
+ mRefetchedAllPixels = 0;
mFreezeHistory = FALSE;
+ mStopDebug = FALSE;
+ mClearHistory = FALSE;
}
void LLTextureFetchDebugger::startDebug()
@@ -3223,6 +3244,7 @@ void LLTextureFetchDebugger::startDebug()
//lock the fetcher
mFetcher->lockFetcher(true);
mFreezeHistory = TRUE;
+ mFetcher->resetLoadSource();
//clear the current fetching queue
gTextureList.clearFetchingRequests();
@@ -3278,8 +3300,13 @@ void LLTextureFetchDebugger::startDebug()
mNumFetchedTextures = fetched_textures.size();
}
-void LLTextureFetchDebugger::stopDebug()
+void LLTextureFetchDebugger::tryToStopDebug()
{
+ if(!mStopDebug)
+ {
+ return;
+ }
+
//clear the current debug work
S32 size = mFetchingHistory.size();
switch(mState)
@@ -3308,37 +3335,71 @@ void LLTextureFetchDebugger::stopDebug()
break;
case GL_TEX:
break;
+ case REFETCH_VIS_CACHE:
+ break;
+ case REFETCH_VIS_HTTP:
+ break;
+ case REFETCH_ALL_CACHE:
+ mRefetchList.clear();
+ break;
+ case REFETCH_ALL_HTTP:
+ mRefetchList.clear();
+ break;
default:
break;
}
- while(1)
+ if(update())
{
- if(update())
+ //unlock the fetcher
+ mFetcher->lockFetcher(false);
+ mFetcher->resetLoadSource();
+ mFreezeHistory = FALSE;
+ mStopDebug = FALSE;
+
+ if(mClearHistory)
{
- break;
+ mFetchingHistory.clear();
+ init();
+ mTotalFetchingTime = gDebugTimers[0].getElapsedTimeF32(); //reset
}
}
-
- //unlock the fetcher
- mFetcher->lockFetcher(false);
- mFreezeHistory = FALSE;
- mTotalFetchingTime = gDebugTimers[0].getElapsedTimeF32(); //reset
}
//called in the main thread and when the fetching queue is empty
void LLTextureFetchDebugger::clearHistory()
{
- mFetchingHistory.clear();
- init();
+ mClearHistory = TRUE;
}
void LLTextureFetchDebugger::addHistoryEntry(LLTextureFetchWorker* worker)
{
+ if(worker->mRawImage.isNull() || worker->mFormattedImage.isNull())
+ {
+ return;
+ }
+
if(mFreezeHistory)
{
- mRefetchedPixels += worker->mRawImage->getWidth() * worker->mRawImage->getHeight();
- mRefetchedData += worker->mFormattedImage->getDataSize();
+ if(mState == REFETCH_VIS_CACHE || mState == REFETCH_VIS_HTTP)
+ {
+ mRefetchedVisPixels += worker->mRawImage->getWidth() * worker->mRawImage->getHeight();
+ mRefetchedVisData += worker->mFormattedImage->getDataSize();
+ }
+ else
+ {
+ mRefetchedAllPixels += worker->mRawImage->getWidth() * worker->mRawImage->getHeight();
+ mRefetchedAllData += worker->mFormattedImage->getDataSize();
+
+ LLViewerFetchedTexture* tex = LLViewerTextureManager::findFetchedTexture(worker->mID);
+ if(tex && mRefetchList[tex].begin() != mRefetchList[tex].end())
+ {
+ if(worker->mDecodedDiscard == mFetchingHistory[mRefetchList[tex][0]].mDecodedLevel)
+ {
+ mRefetchList[tex].erase(mRefetchList[tex].begin());
+ }
+ }
+ }
return;
}
@@ -3350,9 +3411,8 @@ void LLTextureFetchDebugger::addHistoryEntry(LLTextureFetchWorker* worker)
mDecodedData += worker->mRawImage->getDataSize();
mFetchedPixels += worker->mRawImage->getWidth() * worker->mRawImage->getHeight();
- mFetchingHistory.push_back(FetchEntry(worker->mID, worker->mDesiredSize, worker->mDecodedDiscard, worker->mFormattedImage->getDataSize(), worker->mRawImage->getDataSize()));
- //mFetchingHistory.push_back(FetchEntry(worker->mID, worker->mDesiredSize, worker->mHaveAllData ? 0 : worker->mLoadedDiscard, worker->mFormattedImage->getComponents(),
- //worker->mDecodedDiscard, worker->mFormattedImage->getDataSize(), worker->mRawImage->getDataSize()));
+ mFetchingHistory.push_back(FetchEntry(worker->mID, worker->mDesiredSize, worker->mDecodedDiscard,
+ worker->mFormattedImage->getDataSize(), worker->mRawImage->getDataSize()));
}
void LLTextureFetchDebugger::lockCache()
@@ -3369,6 +3429,7 @@ void LLTextureFetchDebugger::debugCacheRead()
llassert_always(mState == IDLE);
mTimer.reset();
mState = READ_CACHE;
+ mCacheReadTime = -1.f;
S32 size = mFetchingHistory.size();
for(S32 i = 0 ; i < size ; i++)
@@ -3404,6 +3465,7 @@ void LLTextureFetchDebugger::debugCacheWrite()
llassert_always(mState == IDLE);
mTimer.reset();
mState = WRITE_CACHE;
+ mCacheWriteTime = -1.f;
S32 size = mFetchingHistory.size();
for(S32 i = 0 ; i < size ; i++)
@@ -3432,6 +3494,7 @@ void LLTextureFetchDebugger::debugDecoder()
llassert_always(mState == IDLE);
mTimer.reset();
mState = DECODING;
+ mDecodingTime = -1.f;
S32 size = mFetchingHistory.size();
for(S32 i = 0 ; i < size ; i++)
@@ -3467,6 +3530,7 @@ void LLTextureFetchDebugger::debugHTTP()
mTimer.reset();
mState = HTTP_FETCHING;
+ mHTTPTime = -1.f;
S32 size = mFetchingHistory.size();
for (S32 i = 0 ; i < size ; i++)
@@ -3483,6 +3547,12 @@ void LLTextureFetchDebugger::debugHTTP()
S32 LLTextureFetchDebugger::fillCurlQueue()
{
+ if(mStopDebug) //stop
+ {
+ mNbCurlCompleted = mFetchingHistory.size();
+ return 0;
+ }
+
if (mNbCurlRequests == 24)
return mNbCurlRequests;
@@ -3538,6 +3608,8 @@ void LLTextureFetchDebugger::debugGLTextureCreation()
}
mTimer.reset();
+ mGLCreationTime = -1.f;
+
S32 j = 0 ;
S32 size1 = tex_list.size();
for(S32 i = 0 ; i < size && j < size1; i++)
@@ -3570,15 +3642,62 @@ void LLTextureFetchDebugger::clearTextures()
}
}
+void LLTextureFetchDebugger::makeRefetchList()
+{
+ mRefetchList.clear();
+ S32 size = mFetchingHistory.size();
+ for(S32 i = 0 ; i < size; i++)
+ {
+ LLViewerFetchedTexture* tex = LLViewerTextureManager::getFetchedTexture(mFetchingHistory[i].mID);
+ if(tex && tex->isJustBound()) //visible
+ {
+ continue; //the texture fetch pipeline will take care of visible textures.
+ }
+
+ mRefetchList[tex].push_back(i);
+ }
+}
+
+void LLTextureFetchDebugger::scanRefetchList()
+{
+ if(mStopDebug)
+ {
+ return;
+ }
+ if(!mRefetchNonVis)
+ {
+ return;
+ }
+
+ for(std::map< LLPointer<LLViewerFetchedTexture>, std::vector<S32> >::iterator iter = mRefetchList.begin();
+ iter != mRefetchList.end(); )
+ {
+ if(iter->second.empty())
+ {
+ gTextureList.setDebugFetching(iter->first, -1);
+ iter = mRefetchList.erase(iter);
+ }
+ else
+ {
+ gTextureList.setDebugFetching(iter->first, mFetchingHistory[iter->second[0]].mDecodedLevel);
+ ++iter;
+ }
+ }
+}
+
void LLTextureFetchDebugger::debugRefetchVisibleFromCache()
{
llassert_always(mState == IDLE);
mState = REFETCH_VIS_CACHE;
clearTextures();
-
+ mFetcher->setLoadSource(LLTextureFetch::FROM_ALL);
+
mTimer.reset();
mFetcher->lockFetcher(false);
+ mRefetchVisCacheTime = -1.f;
+ mRefetchedVisData = 0;
+ mRefetchedVisPixels = 0;
}
void LLTextureFetchDebugger::debugRefetchVisibleFromHTTP()
@@ -3586,11 +3705,48 @@ void LLTextureFetchDebugger::debugRefetchVisibleFromHTTP()
llassert_always(mState == IDLE);
mState = REFETCH_VIS_HTTP;
- clearCache();
clearTextures();
+ mFetcher->setLoadSource(LLTextureFetch::FROM_HTTP_ONLY);
mTimer.reset();
mFetcher->lockFetcher(false);
+ mRefetchVisHTTPTime = -1.f;
+ mRefetchedVisData = 0;
+ mRefetchedVisPixels = 0;
+}
+
+void LLTextureFetchDebugger::debugRefetchAllFromCache()
+{
+ llassert_always(mState == IDLE);
+ mState = REFETCH_ALL_CACHE;
+
+ clearTextures();
+ makeRefetchList();
+ mFetcher->setLoadSource(LLTextureFetch::FROM_ALL);
+
+ mTimer.reset();
+ mFetcher->lockFetcher(false);
+ mRefetchAllCacheTime = -1.f;
+ mRefetchedAllData = 0;
+ mRefetchedAllPixels = 0;
+ mRefetchNonVis = FALSE;
+}
+
+void LLTextureFetchDebugger::debugRefetchAllFromHTTP()
+{
+ llassert_always(mState == IDLE);
+ mState = REFETCH_ALL_HTTP;
+
+ clearTextures();
+ makeRefetchList();
+ mFetcher->setLoadSource(LLTextureFetch::FROM_HTTP_ONLY);
+
+ mTimer.reset();
+ mFetcher->lockFetcher(false);
+ mRefetchAllHTTPTime = -1.f;
+ mRefetchedAllData = 0;
+ mRefetchedAllPixels = 0;
+ mRefetchNonVis = TRUE;
}
bool LLTextureFetchDebugger::update()
@@ -3636,17 +3792,50 @@ bool LLTextureFetchDebugger::update()
case REFETCH_VIS_CACHE:
if (LLAppViewer::getTextureFetch()->getNumRequests() == 0)
{
- mRefetchVisCacheTime = gDebugTimers[0].getElapsedTimeF32() - mTotalFetchingTime;
+ mRefetchVisCacheTime = mTimer.getElapsedTimeF32() ;
mState = IDLE;
mFetcher->lockFetcher(true);
+ mFetcher->resetLoadSource();
}
break;
case REFETCH_VIS_HTTP:
if (LLAppViewer::getTextureFetch()->getNumRequests() == 0)
{
- mRefetchVisHTTPTime = gDebugTimers[0].getElapsedTimeF32() - mTotalFetchingTime;
+ mRefetchVisHTTPTime = mTimer.getElapsedTimeF32() ;
+ mState = IDLE;
+ mFetcher->lockFetcher(true);
+ mFetcher->resetLoadSource();
+ }
+ break;
+ case REFETCH_ALL_CACHE:
+ scanRefetchList();
+ if (LLAppViewer::getTextureFetch()->getNumRequests() == 0)
+ {
+ if(!mRefetchNonVis)
+ {
+ mRefetchNonVis = TRUE; //start to fetch non-vis
+ scanRefetchList();
+ break;
+ }
+
+ mRefetchAllCacheTime = mTimer.getElapsedTimeF32() ;
+ mState = IDLE;
+ mFetcher->lockFetcher(true);
+ mFetcher->resetLoadSource();
+ mRefetchList.clear();
+ mRefetchNonVis = FALSE;
+ }
+ break;
+ case REFETCH_ALL_HTTP:
+ scanRefetchList();
+ if (LLAppViewer::getTextureFetch()->getNumRequests() == 0)
+ {
+ mRefetchAllHTTPTime = mTimer.getElapsedTimeF32() ;
mState = IDLE;
mFetcher->lockFetcher(true);
+ mFetcher->resetLoadSource();
+ mRefetchList.clear();
+ mRefetchNonVis = FALSE;
}
break;
default:
@@ -3701,7 +3890,7 @@ void LLTextureFetchDebugger::callbackHTTP(S32 id, const LLChannelDescriptors& ch
U8* d_buffer = (U8*)ALLOCATE_MEM(LLImageBase::getPrivatePool(), data_size);
buffer->readAfter(channels.in(), NULL, d_buffer, data_size);
- llassert_always(mFetchingHistory[id].mFormattedImage.isNull());
+ mFetchingHistory[id].mFormattedImage = NULL;
{
// For now, create formatted image based on extension
std::string texture_url = mHTTPUrl + "/?texture_id=" + mFetchingHistory[id].mID.asString().c_str();
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();
diff --git a/indra/newview/llviewertexture.cpp b/indra/newview/llviewertexture.cpp
index ea329f6aac..511fc13973 100644
--- a/indra/newview/llviewertexture.cpp
+++ b/indra/newview/llviewertexture.cpp
@@ -409,7 +409,11 @@ void LLViewerTextureManager::cleanup()
void LLViewerTexture::initClass()
{
LLImageGL::sDefaultGLTexture = LLViewerFetchedTexture::sDefaultImagep->getGLTexture() ;
- sTexelPixelRatio = gSavedSettings.getF32("TexelPixelRatio");
+
+ if(gSavedSettings.getBOOL("TextureFetchDebuggerEnabled"))
+ {
+ sTexelPixelRatio = gSavedSettings.getF32("TexelPixelRatio");
+ }
}
// static
@@ -1266,6 +1270,8 @@ void LLViewerFetchedTexture::init(bool firstinit)
mLastReferencedSavedRawImageTime = 0.0f ;
mKeptSavedRawImageTime = 0.f ;
mLastCallBackActiveTime = 0.f;
+
+ mInDebug = FALSE;
}
LLViewerFetchedTexture::~LLViewerFetchedTexture()
@@ -1898,6 +1904,20 @@ S32 LLViewerFetchedTexture::getCurrentDiscardLevelForFetching()
return current_discard ;
}
+bool LLViewerFetchedTexture::setDebugFetching(S32 debug_level)
+{
+ if(debug_level < 0)
+ {
+ mInDebug = FALSE;
+ return false;
+ }
+ mInDebug = TRUE;
+
+ mDesiredDiscardLevel = debug_level;
+
+ return true;
+}
+
bool LLViewerFetchedTexture::updateFetch()
{
static LLCachedControl<bool> textures_decode_disabled(gSavedSettings,"TextureDecodeDisabled");
@@ -2152,7 +2172,10 @@ bool LLViewerFetchedTexture::updateFetch()
void LLViewerFetchedTexture::clearFetchedResults()
{
- llassert_always(!mNeedsCreateTexture && !mIsFetching);
+ if(mNeedsCreateTexture || mIsFetching)
+ {
+ return ;
+ }
cleanup();
destroyGLTexture();
diff --git a/indra/newview/llviewertexture.h b/indra/newview/llviewertexture.h
index 41bf625225..c1ebbd9ebe 100644
--- a/indra/newview/llviewertexture.h
+++ b/indra/newview/llviewertexture.h
@@ -433,6 +433,8 @@ public:
void setMinDiscardLevel(S32 discard) { mMinDesiredDiscardLevel = llmin(mMinDesiredDiscardLevel,(S8)discard); }
bool updateFetch();
+ bool setDebugFetching(S32 debug_level);
+ bool isInDebug() {return mInDebug;}
void clearFetchedResults(); //clear all fetched results, for debug use.
@@ -513,6 +515,7 @@ private:
private:
BOOL mFullyLoaded;
+ BOOL mInDebug;
protected:
std::string mLocalFileName;
diff --git a/indra/newview/llviewertexturelist.cpp b/indra/newview/llviewertexturelist.cpp
index 2008a884db..e3b633dc0e 100644
--- a/indra/newview/llviewertexturelist.cpp
+++ b/indra/newview/llviewertexturelist.cpp
@@ -701,6 +701,11 @@ void LLViewerTextureList::updateImagesDecodePriorities()
LLPointer<LLViewerFetchedTexture> imagep = iter->second;
++iter; // safe to incrament now
+ if(imagep->isInDebug())
+ {
+ continue; //is in debug, ignore.
+ }
+
//
// Flush formatted images using a lazy flush
//
@@ -773,6 +778,27 @@ void LLViewerTextureList::updateImagesDecodePriorities()
}
}
+void LLViewerTextureList::setDebugFetching(LLViewerFetchedTexture* tex, S32 debug_level)
+{
+ if(!tex->setDebugFetching(debug_level))
+ {
+ return;
+ }
+
+ const F32 DEBUG_PRIORITY = 100000.f;
+ F32 old_priority_test = llmax(tex->getDecodePriority(), 0.0f);
+ F32 decode_priority_test = DEBUG_PRIORITY;
+
+ // Ignore < 20% difference
+ if ((decode_priority_test < old_priority_test * .8f) ||
+ (decode_priority_test > old_priority_test * 1.25f))
+ {
+ removeImageFromList(tex);
+ tex->setDecodePriority(decode_priority_test);
+ addImageToList(tex);
+ }
+}
+
/*
static U8 get_image_type(LLViewerFetchedTexture* imagep, LLHost target_host)
{
diff --git a/indra/newview/llviewertexturelist.h b/indra/newview/llviewertexturelist.h
index 7038ea24ce..86429fa899 100644
--- a/indra/newview/llviewertexturelist.h
+++ b/indra/newview/llviewertexturelist.h
@@ -110,6 +110,7 @@ public:
void doPrefetchImages();
void clearFetchingRequests();
+ void setDebugFetching(LLViewerFetchedTexture* tex, S32 debug_level);
static S32 getMinVideoRamSetting();
static S32 getMaxVideoRamSetting(bool get_recommended = false);
diff --git a/indra/newview/skins/default/xui/en/floater_texture_fetch_debugger.xml b/indra/newview/skins/default/xui/en/floater_texture_fetch_debugger.xml
index 44b6a63bca..6fbdd8a318 100644
--- a/indra/newview/skins/default/xui/en/floater_texture_fetch_debugger.xml
+++ b/indra/newview/skins/default/xui/en/floater_texture_fetch_debugger.xml
@@ -2,7 +2,7 @@
<floater
legacy_header_height="18"
can_minimize="false"
- height="550"
+ height="600"
layout="topleft"
name="TexFetchDebugger"
help_topic="texfetchdebugger"
@@ -195,10 +195,34 @@
height="25"
layout="topleft"
left_delta="0"
+ name="total_time_refetch_all_cache_label"
+ top_delta="25"
+ width="540">
+ 16, Refetching all textures from cache, Time: [TIME] seconds, Fetched: [SIZE]KB, [PIXEL]MPixels
+ </text>
+ <text
+ type="string"
+ length="1"
+ follows="left|top"
+ height="25"
+ layout="topleft"
+ left_delta="0"
name="total_time_refetch_vis_http_label"
top_delta="25"
width="540">
- 16, Refetching visibles from HTTP, Time: [TIME] seconds, Fetched: [SIZE]KB, [PIXEL]MPixels
+ 17, Refetching visibles from HTTP, Time: [TIME] seconds, Fetched: [SIZE]KB, [PIXEL]MPixels
+ </text>
+ <text
+ type="string"
+ length="1"
+ follows="left|top"
+ height="25"
+ layout="topleft"
+ left_delta="0"
+ name="total_time_refetch_all_http_label"
+ top_delta="25"
+ width="540">
+ 18, Refetching all textures from HTTP, Time: [TIME] seconds, Fetched: [SIZE]KB, [PIXEL]MPixels
</text>
<spinner
decimal_digits="2"
@@ -206,7 +230,7 @@
height="20"
increment="0.01"
initial_value="1.0"
- label="17, Ratio of Texel/Pixel:"
+ label="19, Ratio of Texel/Pixel:"
label_width="130"
layout="topleft"
left_delta="0"
@@ -218,14 +242,53 @@
<spinner.commit_callback
function="TexFetchDebugger.ChangeTexelPixelRatio" />
</spinner>
+ <text
+ type="string"
+ length="1"
+ follows="left|top"
+ height="25"
+ layout="topleft"
+ left_delta="0"
+ name="texture_source_label"
+ top_delta="30"
+ width="110">
+ 20, Texture Source:
+ </text>
+ <radio_group
+ control_name="TextureFetchSource"
+ follows="top|left"
+ draw_border="false"
+ height="25"
+ layout="topleft"
+ left_pad="0"
+ name="texture_source"
+ top_delta="0"
+ width="264">
+ <radio_item
+ height="16"
+ label="Cache + HTTP"
+ layout="topleft"
+ left="3"
+ name="0"
+ top="0"
+ width="100" />
+ <radio_item
+ height="16"
+ label="HTTP Only"
+ layout="topleft"
+ left_delta="100"
+ name="1"
+ top_delta="0"
+ width="200" />
+ </radio_group>
<button
follows="left|top"
height="20"
label="Start"
layout="topleft"
- left_delta="0"
+ left="10"
name="start_btn"
- top_delta="30"
+ top_delta="20"
width="70">
<button.commit_callback
function="TexFetchDebugger.Start" />
@@ -261,7 +324,7 @@
layout="topleft"
left="10"
name="cacheread_btn"
- top_delta="30"
+ top_delta="20"
width="80">
<button.commit_callback
function="TexFetchDebugger.CacheRead" />
@@ -321,7 +384,7 @@
layout="topleft"
left="10"
name="refetchviscache_btn"
- top_delta="30"
+ top_delta="20"
width="120">
<button.commit_callback
function="TexFetchDebugger.RefetchVisCache" />
@@ -329,6 +392,18 @@
<button
follows="left|top"
height="20"
+ label="Refetch All Cache"
+ layout="topleft"
+ left_pad="7"
+ name="refetchallcache_btn"
+ top_delta="0"
+ width="120">
+ <button.commit_callback
+ function="TexFetchDebugger.RefetchAllCache" />
+ </button>
+ <button
+ follows="left|top"
+ height="20"
label="Refetch Vis HTTP"
layout="topleft"
left_pad="7"
@@ -338,4 +413,16 @@
<button.commit_callback
function="TexFetchDebugger.RefetchVisHTTP" />
</button>
+ <button
+ follows="left|top"
+ height="20"
+ label="Refetch All HTTP"
+ layout="topleft"
+ left_pad="7"
+ name="refetchallhttp_btn"
+ top_delta="0"
+ width="120">
+ <button.commit_callback
+ function="TexFetchDebugger.RefetchAllHTTP" />
+ </button>
</floater>