diff options
| author | Tofu Linden <tofu.linden@lindenlab.com> | 2010-06-04 18:55:17 +0100 |
|---|---|---|
| committer | Tofu Linden <tofu.linden@lindenlab.com> | 2010-06-04 18:55:17 +0100 |
| commit | 1e198fbe4c81624b162f6bad7d6cc645f731eac9 (patch) | |
| tree | 8db7944d2e8acdf859a3be0988286f5dbee16834 /indra/newview/lltexlayer.cpp | |
| parent | aa32bd877cb0a9c34fef04b6c8ee09f04f88c924 (diff) | |
| parent | e8a84927959b098b9fe81047977006dc62f2b9b8 (diff) | |
merge from viewer-public
Diffstat (limited to 'indra/newview/lltexlayer.cpp')
| -rw-r--r-- | indra/newview/lltexlayer.cpp | 18 |
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() |
