From 6a3ff07783ce168dc113c90ca849164b44301257 Mon Sep 17 00:00:00 2001 From: Loren Shih Date: Fri, 4 Jun 2010 12:56:17 -0400 Subject: EXT-7504 WIP Force decloud after timeout using lower res textures Added fix for logic behind resetting upload timer. --- indra/newview/lltexlayer.cpp | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) (limited to 'indra/newview/lltexlayer.cpp') 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. @@ -172,18 +173,27 @@ 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() -- cgit v1.2.3 From 4ec55cdb5b52d69a998630b1468a64982e612d7a Mon Sep 17 00:00:00 2001 From: Loren Shih Date: Fri, 4 Jun 2010 13:14:41 -0400 Subject: EXT-7504 WIP Force decloud after timeout using lower res textures Trivial change to texture debug readout. --- indra/newview/lltexlayer.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview/lltexlayer.cpp') diff --git a/indra/newview/lltexlayer.cpp b/indra/newview/lltexlayer.cpp index edd9ae16a9..fc611fa9c8 100644 --- a/indra/newview/lltexlayer.cpp +++ b/indra/newview/lltexlayer.cpp @@ -2289,7 +2289,7 @@ const std::string LLTexLayerSetBuffer::dumpTextureInfo() const const U32 upload_time = (U32)mNeedsUploadTimer.getElapsedTimeF32(); const BOOL is_uploaded = !mUploadPending; const std::string local_texture_info = gAgentAvatarp->debugDumpLocalTextureDataInfo(mTexLayerSet); - std::string text = llformat("[ HiRes:%d LoRes:%d Uploaded:%d ] [ Timer:%d ] %s", + std::string text = llformat("[ HiRes:%d LoRes:%d Done:%d ] [ Timer:%d ] %s", is_high_res, num_low_res, is_uploaded, upload_time, local_texture_info.c_str()); -- cgit v1.2.3 From f457eaf67d60c8e526ae19950e4cc67fa290c2bb Mon Sep 17 00:00:00 2001 From: Loren Shih Date: Fri, 4 Jun 2010 14:14:36 -0400 Subject: EXT-7526 WIP Add baked texture information to texture view Added color, emphasis, and more information to texture view. --- indra/newview/lltexlayer.cpp | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'indra/newview/lltexlayer.cpp') diff --git a/indra/newview/lltexlayer.cpp b/indra/newview/lltexlayer.cpp index fc611fa9c8..1847ebb456 100644 --- a/indra/newview/lltexlayer.cpp +++ b/indra/newview/lltexlayer.cpp @@ -317,7 +317,7 @@ BOOL LLTexLayerSetBuffer::render() return success; } -bool LLTexLayerSetBuffer::isInitialized(void) const +BOOL LLTexLayerSetBuffer::isInitialized(void) const { return mGLTexturep.notNull() && mGLTexturep->isGLTextureCreated(); } @@ -2287,10 +2287,13 @@ const std::string LLTexLayerSetBuffer::dumpTextureInfo() const const BOOL is_high_res = !mNeedsUpload; const U32 num_low_res = mNumLowresUploads; const U32 upload_time = (U32)mNeedsUploadTimer.getElapsedTimeF32(); - const BOOL is_uploaded = !mUploadPending; const std::string local_texture_info = gAgentAvatarp->debugDumpLocalTextureDataInfo(mTexLayerSet); - std::string text = llformat("[ HiRes:%d LoRes:%d Done:%d ] [ Timer:%d ] %s", - is_high_res, num_low_res, is_uploaded, + std::string status = "CREATING "; + if (mUploadPending) status = "UPLOADING"; + if (!mNeedsUpload) status = " DONE "; + std::string text = llformat("[ %s ] [ HiRes:%d LoRes:%d ] [ Timer:%d ] %s", + status.c_str(), + is_high_res, num_low_res, upload_time, local_texture_info.c_str()); return text; -- cgit v1.2.3 From cfc98d7e374d0e9a236ed4e1bd78faeecfb5ba2a Mon Sep 17 00:00:00 2001 From: Loren Shih Date: Fri, 4 Jun 2010 14:17:13 -0400 Subject: EXT-7526 WIP Add baked texture information to texture view Minor logic fix for status display. --- indra/newview/lltexlayer.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview/lltexlayer.cpp') diff --git a/indra/newview/lltexlayer.cpp b/indra/newview/lltexlayer.cpp index 1847ebb456..871231a1f5 100644 --- a/indra/newview/lltexlayer.cpp +++ b/indra/newview/lltexlayer.cpp @@ -2289,8 +2289,8 @@ const std::string LLTexLayerSetBuffer::dumpTextureInfo() const const U32 upload_time = (U32)mNeedsUploadTimer.getElapsedTimeF32(); const std::string local_texture_info = gAgentAvatarp->debugDumpLocalTextureDataInfo(mTexLayerSet); std::string status = "CREATING "; - if (mUploadPending) status = "UPLOADING"; if (!mNeedsUpload) status = " DONE "; + if (mUploadPending) status = "UPLOADING"; std::string text = llformat("[ %s ] [ HiRes:%d LoRes:%d ] [ Timer:%d ] %s", status.c_str(), is_high_res, num_low_res, -- cgit v1.2.3 From 36a10312a5c7d9dec7124cf969039ff5d1ac24c0 Mon Sep 17 00:00:00 2001 From: Loren Shih Date: Fri, 4 Jun 2010 14:56:24 -0400 Subject: EXT-7526 WIP Add baked texture information to texture view More informative logic added in to track when an upload is actually happening. Did some minor reformatting. --- indra/newview/lltexlayer.cpp | 25 +++++++++++++++++++++---- 1 file changed, 21 insertions(+), 4 deletions(-) (limited to 'indra/newview/lltexlayer.cpp') diff --git a/indra/newview/lltexlayer.cpp b/indra/newview/lltexlayer.cpp index 871231a1f5..d001d692a3 100644 --- a/indra/newview/lltexlayer.cpp +++ b/indra/newview/lltexlayer.cpp @@ -322,6 +322,21 @@ BOOL LLTexLayerSetBuffer::isInitialized(void) const return mGLTexturep.notNull() && mGLTexturep->isGLTextureCreated(); } +BOOL LLTexLayerSetBuffer::uploadPending() const +{ + return mUploadPending; +} + +BOOL LLTexLayerSetBuffer::uploadNeeded() const +{ + return mNeedsUpload; +} + +BOOL LLTexLayerSetBuffer::uploadInProgress() const +{ + return !mUploadID.isNull(); +} + BOOL LLTexLayerSetBuffer::isReadyToUpload() const { if (!mNeedsUpload) return FALSE; // Don't need to upload if we haven't requested one. @@ -2288,10 +2303,12 @@ const std::string LLTexLayerSetBuffer::dumpTextureInfo() const const U32 num_low_res = mNumLowresUploads; const U32 upload_time = (U32)mNeedsUploadTimer.getElapsedTimeF32(); const std::string local_texture_info = gAgentAvatarp->debugDumpLocalTextureDataInfo(mTexLayerSet); - std::string status = "CREATING "; - if (!mNeedsUpload) status = " DONE "; - if (mUploadPending) status = "UPLOADING"; - std::string text = llformat("[ %s ] [ HiRes:%d LoRes:%d ] [ Timer:%d ] %s", + + std::string status = "CREATING "; + if (!uploadNeeded()) status = "DONE "; + if (uploadInProgress()) status = "UPLOADING"; + + std::string text = llformat("[%s] [HiRes:%d LoRes:%d] [Elapsed:%d] %s", status.c_str(), is_high_res, num_low_res, upload_time, -- cgit v1.2.3