From d34588b7a7f280a49efb51e29a2cc3138a9db024 Mon Sep 17 00:00:00 2001
From: Xiaohong Bao <bao@lindenlab.com>
Date: Thu, 8 Apr 2010 17:08:32 -0600
Subject: fix for EXT-6278: profile picture is blurry / fuzzy if IM is opened
 first.

---
 indra/newview/llviewertexture.cpp | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/indra/newview/llviewertexture.cpp b/indra/newview/llviewertexture.cpp
index 9fbffdac35..84c5c454bd 100644
--- a/indra/newview/llviewertexture.cpp
+++ b/indra/newview/llviewertexture.cpp
@@ -1426,15 +1426,15 @@ BOOL LLViewerFetchedTexture::createTexture(S32 usename/*= 0*/)
 //virtual
 void LLViewerFetchedTexture::setKnownDrawSize(S32 width, S32 height)
 {
-	if(mKnownDrawWidth != width || mKnownDrawHeight != height)
+	if(mKnownDrawWidth < width || mKnownDrawHeight < height)
 	{
-		mKnownDrawWidth = width;
-		mKnownDrawHeight = height;
+		mKnownDrawWidth = llmax(mKnownDrawWidth, width) ;
+		mKnownDrawHeight = llmax(mKnownDrawHeight, height) ;
 
 		mKnownDrawSizeChanged = TRUE ;
 		mFullyLoaded = FALSE ;
 	}
-	addTextureStats((F32)(width * height));
+	addTextureStats((F32)(mKnownDrawWidth * mKnownDrawHeight));
 }
 
 //virtual
-- 
cgit v1.2.3