diff options
Diffstat (limited to 'indra')
-rw-r--r-- | indra/newview/lltexlayer.cpp | 18 | ||||
-rw-r--r-- | indra/newview/lltexlayer.h | 2 |
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 |