diff options
| -rw-r--r-- | indra/newview/lltexlayer.cpp | 11 | ||||
| -rw-r--r-- | indra/newview/lltexlayer.h | 9 | ||||
| -rw-r--r-- | indra/newview/lltextureview.cpp | 16 | 
3 files changed, 28 insertions, 8 deletions
| 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; diff --git a/indra/newview/lltexlayer.h b/indra/newview/lltexlayer.h index 821e718347..fa49b245bc 100644 --- a/indra/newview/lltexlayer.h +++ b/indra/newview/lltexlayer.h @@ -275,12 +275,15 @@ public:  	virtual void			postRender(BOOL success);  	virtual BOOL			render();  	BOOL					updateImmediate(); -	bool					isInitialized(void) const; + +	BOOL					isInitialized(void) const; +	BOOL					uploadPending() const { return mUploadPending; } +	BOOL					uploadNeeded() const { return mNeedsUpload; } +  	/*virtual*/ BOOL		needsRender();  	void					requestUpdate();  	void					requestUpload();  	void					cancelUpload(); -	BOOL					uploadPending() const { return mUploadPending; }  	BOOL					render(S32 x, S32 y, S32 width, S32 height);  	void					readBackAndUpload();  	static void				onTextureUploadComplete(const LLUUID& uuid, @@ -290,6 +293,8 @@ public:  	const std::string		dumpTextureInfo() const;  	virtual void 			restoreGLTexture();  	virtual void 			destroyGLTexture(); + +  protected:  	void					pushProjection() const;  	void					popProjection() const; diff --git a/indra/newview/lltextureview.cpp b/indra/newview/lltextureview.cpp index 377449cc8b..9a946f4631 100644 --- a/indra/newview/lltextureview.cpp +++ b/indra/newview/lltextureview.cpp @@ -421,7 +421,6 @@ void LLAvatarTexBar::draw()  	//----------------------------------------------------------------------------  	LLGLSUIDefault gls_ui; -	LLColor4 text_color(1.f, 1.f, 1.f, 1.f);  	LLColor4 color;  	U32 line_num = 1; @@ -434,6 +433,17 @@ void LLAvatarTexBar::draw()  		if (!layerset) continue;  		const LLTexLayerSetBuffer *layerset_buffer = layerset->getComposite();  		if (!layerset_buffer) continue; + +		LLColor4 text_color = LLColor4::white; +		 +		if (layerset_buffer->uploadNeeded()) +		{ +			text_color = LLColor4::red; +		} + 		if (layerset_buffer->uploadPending()) +		{ +			text_color = LLColor4::magenta; +		}  		std::string text = layerset_buffer->dumpTextureInfo();  		LLFontGL::getFontMonospace()->renderUTF8(text, 0, 0, v_offset + line_height*line_num,  												 text_color, LLFontGL::LEFT, LLFontGL::TOP); //, LLFontGL::BOLD, LLFontGL::DROP_SHADOW_SOFT); @@ -442,11 +452,13 @@ void LLAvatarTexBar::draw()  	const U32 texture_timeout = gSavedSettings.getU32("AvatarBakedTextureTimeout");  	const U32 override_tex_discard_level = gSavedSettings.getU32("TextureDiscardLevel"); +	LLColor4 header_color(1.f, 1.f, 1.f, 0.9f); +  	const std::string texture_timeout_str = texture_timeout ? llformat("%d",texture_timeout) : "Disabled";  	const std::string override_tex_discard_level_str = override_tex_discard_level ? llformat("%d",override_tex_discard_level) : "Disabled";  	std::string header_text = llformat("[ Timeout('AvatarBakedTextureTimeout'):%s ] [ LOD_Override('TextureDiscardLevel'):%s ]", texture_timeout_str.c_str(), override_tex_discard_level_str.c_str());  	LLFontGL::getFontMonospace()->renderUTF8(header_text, 0, 0, v_offset + line_height*line_num, -											 text_color, LLFontGL::LEFT, LLFontGL::TOP); //, LLFontGL::BOLD, LLFontGL::DROP_SHADOW_SOFT); +											 header_color, LLFontGL::LEFT, LLFontGL::TOP, LLFontGL::BOLD, LLFontGL::DROP_SHADOW_SOFT);  }  BOOL LLAvatarTexBar::handleMouseDown(S32 x, S32 y, MASK mask) | 
