summaryrefslogtreecommitdiff
path: root/indra/newview/lltexlayer.cpp
diff options
context:
space:
mode:
authorTofu Linden <tofu.linden@lindenlab.com>2010-06-04 18:55:17 +0100
committerTofu Linden <tofu.linden@lindenlab.com>2010-06-04 18:55:17 +0100
commitc646ce4f510d9e725bff48b1bc4aba551836ecd4 (patch)
tree8db7944d2e8acdf859a3be0988286f5dbee16834 /indra/newview/lltexlayer.cpp
parentb2c39dc1e74f42f8ed24c6f69aad797e4f7e2dc6 (diff)
parente8a84927959b098b9fe81047977006dc62f2b9b8 (diff)
merge from viewer-public
Diffstat (limited to 'indra/newview/lltexlayer.cpp')
-rw-r--r--indra/newview/lltexlayer.cpp18
1 files changed, 14 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()