summaryrefslogtreecommitdiff
path: root/indra/newview/llviewertexturelist.cpp
diff options
context:
space:
mode:
authorXiaohong Bao <bao@lindenlab.com>2012-05-03 11:38:05 -0600
committerXiaohong Bao <bao@lindenlab.com>2012-05-03 11:38:05 -0600
commite65852e9a58ec92763b88369f53092628ab7a6b8 (patch)
treef7ba9763d15aa9b6c9963e1fdc72dcb2904ca542 /indra/newview/llviewertexturelist.cpp
parent78fec489b53434a8ac8f9c0a8e72fd883067ce42 (diff)
For SH-3086: add functions to refetch all previous textures through HTTP and from cache
Diffstat (limited to 'indra/newview/llviewertexturelist.cpp')
-rw-r--r--indra/newview/llviewertexturelist.cpp26
1 files changed, 26 insertions, 0 deletions
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)
{