summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
authorLoren Shih <seraph@lindenlab.com>2010-06-04 12:56:17 -0400
committerLoren Shih <seraph@lindenlab.com>2010-06-04 12:56:17 -0400
commit6a3ff07783ce168dc113c90ca849164b44301257 (patch)
tree6ee69ec85bfb0c6a12be7d0b80f661d9fe62ef1d /indra/newview
parenta77d273e3ab448d84507bfdb763df8335eadea9e (diff)
EXT-7504 WIP Force decloud after timeout using lower res textures
Added fix for logic behind resetting upload timer.
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/lltexlayer.cpp18
-rw-r--r--indra/newview/lltexlayer.h2
2 files changed, 16 insertions, 4 deletions
diff --git a/indra/newview/lltexlayer.cpp b/indra/newview/lltexlayer.cpp
index 1d74a7be8c..edd9ae16a9 100644
--- a/indra/newview/lltexlayer.cpp
+++ b/indra/newview/lltexlayer.cpp
@@ -165,6 +165,7 @@ void LLTexLayerSetBuffer::dumpTotalByteCount()
void LLTexLayerSetBuffer::requestUpdate()
{
+ conditionalRestartUploadTimer();
mNeedsUpdate = TRUE;
// If we're in the middle of uploading a baked texture, we don't care about it any more.
// When it's downloaded, ignore it.
@@ -173,17 +174,26 @@ void LLTexLayerSetBuffer::requestUpdate()
void LLTexLayerSetBuffer::requestUpload()
{
+ conditionalRestartUploadTimer();
+ mNeedsUpload = TRUE;
+ mNumLowresUploads = 0;
+ mUploadPending = TRUE;
+}
+
+void LLTexLayerSetBuffer::conditionalRestartUploadTimer()
+{
// If we requested a new upload but haven't even uploaded
// a low res version of our last upload request, then
// keep the timer ticking instead of resetting it.
if (mNeedsUpload && (mNumLowresUploads == 0))
{
+ mNeedsUploadTimer.unpause();
+ }
+ else
+ {
mNeedsUploadTimer.reset();
+ mNeedsUploadTimer.start();
}
- mNeedsUpload = TRUE;
- mNumLowresUploads = 0;
- mUploadPending = TRUE;
- mNeedsUploadTimer.unpause();
}
void LLTexLayerSetBuffer::cancelUpload()
diff --git a/indra/newview/lltexlayer.h b/indra/newview/lltexlayer.h
index 2ee609fe60..821e718347 100644
--- a/indra/newview/lltexlayer.h
+++ b/indra/newview/lltexlayer.h
@@ -294,6 +294,8 @@ protected:
void pushProjection() const;
void popProjection() const;
BOOL isReadyToUpload() const;
+ void conditionalRestartUploadTimer();
+
private:
LLTexLayerSet* const mTexLayerSet;
BOOL mNeedsUpdate; // whether we need to update our baked textures