From cb96ab1a6fed15da0407d2aba5e9de566417088f Mon Sep 17 00:00:00 2001
From: Dave Parks <davep@lindenlab.com>
Date: Wed, 18 Jul 2012 15:49:47 -0500
Subject: MAINT-628 Fix for seams in high res snapshots when lighting and
 shadows is enabled.

---
 indra/llrender/llrendertarget.cpp                  | 34 ++++++-------
 indra/llrender/llrendertarget.h                    |  5 +-
 .../shaders/class1/deferred/fxaaF.glsl             |  1 -
 indra/newview/llviewerwindow.cpp                   | 55 +++++++++++++++++++---
 indra/newview/pipeline.cpp                         | 29 ++++++------
 indra/newview/pipeline.h                           |  8 +++-
 6 files changed, 90 insertions(+), 42 deletions(-)

(limited to 'indra')

diff --git a/indra/llrender/llrendertarget.cpp b/indra/llrender/llrendertarget.cpp
index 846311a8d0..c1b96a43da 100644
--- a/indra/llrender/llrendertarget.cpp
+++ b/indra/llrender/llrendertarget.cpp
@@ -51,11 +51,13 @@ void check_framebuffer_status()
 }
 
 bool LLRenderTarget::sUseFBO = false;
+U32 LLRenderTarget::sCurFBO = 0;
 
 LLRenderTarget::LLRenderTarget() :
 	mResX(0),
 	mResY(0),
 	mFBO(0),
+	mPreviousFBO(0),
 	mDepth(0),
 	mStencil(0),
 	mUseDepth(false),
@@ -107,6 +109,9 @@ void LLRenderTarget::resize(U32 resx, U32 resy, U32 color_fmt)
 
 bool LLRenderTarget::allocate(U32 resx, U32 resy, U32 color_fmt, bool depth, bool stencil, LLTexUnit::eTextureType usage, bool use_fbo, S32 samples)
 {
+	resx = llmin(resx, (U32) 4096);
+	resy = llmin(resy, (U32) 4096);
+
 	stop_glerror();
 	release();
 	stop_glerror();
@@ -146,7 +151,7 @@ bool LLRenderTarget::allocate(U32 resx, U32 resy, U32 color_fmt, bool depth, boo
 				glFramebufferTexture2D(GL_FRAMEBUFFER, GL_DEPTH_ATTACHMENT, LLTexUnit::getInternalType(mUsage), mDepth, 0);
 				stop_glerror();
 			}
-			glBindFramebuffer(GL_FRAMEBUFFER, 0);
+			glBindFramebuffer(GL_FRAMEBUFFER, sCurFBO);
 		}
 		
 		stop_glerror();
@@ -233,7 +238,7 @@ bool LLRenderTarget::addColorAttachment(U32 color_fmt)
 
 		check_framebuffer_status();
 		
-		glBindFramebuffer(GL_FRAMEBUFFER, 0);
+		glBindFramebuffer(GL_FRAMEBUFFER, sCurFBO);
 	}
 
 	mTex.push_back(tex);
@@ -322,7 +327,7 @@ void LLRenderTarget::shareDepthBuffer(LLRenderTarget& target)
 
 		check_framebuffer_status();
 
-		glBindFramebuffer(GL_FRAMEBUFFER, 0);
+		glBindFramebuffer(GL_FRAMEBUFFER, sCurFBO);
 
 		target.mUseDepth = true;
 	}
@@ -385,9 +390,13 @@ void LLRenderTarget::bindTarget()
 {
 	if (mFBO)
 	{
+		mPreviousFBO = sCurFBO;
+
 		stop_glerror();
 		
 		glBindFramebuffer(GL_FRAMEBUFFER, mFBO);
+		sCurFBO = mFBO;
+
 		stop_glerror();
 		if (gGLManager.mHasDrawBuffers)
 		{ //setup multiple render targets
@@ -413,16 +422,6 @@ void LLRenderTarget::bindTarget()
 	sBoundTarget = this;
 }
 
-// static
-void LLRenderTarget::unbindTarget()
-{
-	if (gGLManager.mHasFramebufferObject)
-	{
-		glBindFramebuffer(GL_FRAMEBUFFER, 0);
-	}
-	sBoundTarget = NULL;
-}
-
 void LLRenderTarget::clear(U32 mask_in)
 {
 	U32 mask = GL_COLOR_BUFFER_BIT;
@@ -488,7 +487,8 @@ void LLRenderTarget::flush(bool fetch_depth)
 	else
 	{
 		stop_glerror();
-		glBindFramebuffer(GL_FRAMEBUFFER, 0);
+		glBindFramebuffer(GL_FRAMEBUFFER, mPreviousFBO);
+		sCurFBO = mPreviousFBO;
 		stop_glerror();
 	}
 }
@@ -518,7 +518,7 @@ void LLRenderTarget::copyContents(LLRenderTarget& source, S32 srcX0, S32 srcY0,
 		stop_glerror();
 		glCopyTexSubImage2D(LLTexUnit::getInternalType(mUsage), 0, srcX0, srcY0, dstX0, dstY0, dstX1, dstY1);
 		stop_glerror();
-		glBindFramebuffer(GL_FRAMEBUFFER, 0);
+		glBindFramebuffer(GL_FRAMEBUFFER, sCurFBO);
 		stop_glerror();
 	}
 	else
@@ -535,7 +535,7 @@ void LLRenderTarget::copyContents(LLRenderTarget& source, S32 srcX0, S32 srcY0,
 		stop_glerror();
 		glBindFramebuffer(GL_DRAW_FRAMEBUFFER, 0);
 		stop_glerror();
-		glBindFramebuffer(GL_FRAMEBUFFER, 0);
+		glBindFramebuffer(GL_FRAMEBUFFER, sCurFBO);
 		stop_glerror();
 	}
 }
@@ -561,7 +561,7 @@ void LLRenderTarget::copyContentsToFramebuffer(LLRenderTarget& source, S32 srcX0
 		stop_glerror();
 		glBlitFramebuffer(srcX0, srcY0, srcX1, srcY1, dstX0, dstY0, dstX1, dstY1, mask, filter);
 		stop_glerror();
-		glBindFramebuffer(GL_FRAMEBUFFER, 0);
+		glBindFramebuffer(GL_FRAMEBUFFER, sCurFBO);
 		stop_glerror();
 	}
 }
diff --git a/indra/llrender/llrendertarget.h b/indra/llrender/llrendertarget.h
index e1a51304f1..cf15f66d31 100644
--- a/indra/llrender/llrendertarget.h
+++ b/indra/llrender/llrendertarget.h
@@ -63,6 +63,7 @@ public:
 	//whether or not to use FBO implementation
 	static bool sUseFBO; 
 	static U32 sBytesAllocated;
+	static U32 sCurFBO;
 
 	LLRenderTarget();
 	~LLRenderTarget();
@@ -96,9 +97,6 @@ public:
 	//applies appropriate viewport
 	void bindTarget();
 
-	//unbind target for rendering
-	static void unbindTarget();
-	
 	//clear render targer, clears depth buffer if present,
 	//uses scissor rect if in copy-to-texture mode
 	void clear(U32 mask = 0xFFFFFFFF);
@@ -148,6 +146,7 @@ protected:
 	std::vector<U32> mTex;
 	std::vector<U32> mInternalFormat;
 	U32 mFBO;
+	U32 mPreviousFBO;
 	U32 mDepth;
 	bool mStencil;
 	bool mUseDepth;
diff --git a/indra/newview/app_settings/shaders/class1/deferred/fxaaF.glsl b/indra/newview/app_settings/shaders/class1/deferred/fxaaF.glsl
index e02a7b405b..2cef8f2a5d 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/fxaaF.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/fxaaF.glsl
@@ -2093,7 +2093,6 @@ uniform sampler2D diffuseMap;
 uniform vec2 rcp_screen_res;
 uniform vec4 rcp_frame_opt;
 uniform vec4 rcp_frame_opt2;
-uniform vec2 screen_res;
 VARYING vec2 vary_fragcoord;
 VARYING vec2 vary_tc;
 
diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp
index 44e6d70546..ffaf881521 100755
--- a/indra/newview/llviewerwindow.cpp
+++ b/indra/newview/llviewerwindow.cpp
@@ -4236,14 +4236,48 @@ BOOL LLViewerWindow::rawSnapshot(LLImageRaw *raw, S32 image_width, S32 image_hei
 		image_height = llmin(image_height, window_height);
 	}
 
+	S32 original_width = 0;
+	S32 original_height = 0;
+	bool reset_deferred = false;
+
+	LLRenderTarget scratch_space;
+
 	F32 scale_factor = 1.0f ;
 	if (!keep_window_aspect || (image_width > window_width) || (image_height > window_height))
 	{	
-		// if image cropping or need to enlarge the scene, compute a scale_factor
-		F32 ratio = llmin( (F32)window_width / image_width , (F32)window_height / image_height) ;
-		snapshot_width  = (S32)(ratio * image_width) ;
-		snapshot_height = (S32)(ratio * image_height) ;
-		scale_factor = llmax(1.0f, 1.0f / ratio) ;
+		if ((image_width > window_width || image_height > window_height) && LLPipeline::sRenderDeferred && !show_ui)
+		{
+			if (scratch_space.allocate(image_width, image_height, GL_RGBA, true, true))
+			{
+				original_width = gPipeline.mDeferredScreen.getWidth();
+				original_height = gPipeline.mDeferredScreen.getHeight();
+
+				if (gPipeline.allocateScreenBuffer(image_width, image_height))
+				{
+					window_width = image_width;
+					window_height = image_height;
+					snapshot_width = image_width;
+					snapshot_height = image_height;
+					reset_deferred = true;
+					mWorldViewRectRaw.set(0, image_height, image_width, 0);
+					scratch_space.bindTarget();
+				}
+				else
+				{
+					scratch_space.release();
+					gPipeline.allocateScreenBuffer(original_width, original_height);
+				}
+			}
+		}
+
+		if (!reset_deferred)
+		{
+			// if image cropping or need to enlarge the scene, compute a scale_factor
+			F32 ratio = llmin( (F32)window_width / image_width , (F32)window_height / image_height) ;
+			snapshot_width  = (S32)(ratio * image_width) ;
+			snapshot_height = (S32)(ratio * image_height) ;
+			scale_factor = llmax(1.0f, 1.0f / ratio) ;
+		}
 	}
 	
 	if (show_ui && scale_factor > 1.f)
@@ -4432,11 +4466,20 @@ BOOL LLViewerWindow::rawSnapshot(LLImageRaw *raw, S32 image_width, S32 image_hei
 		gPipeline.resetDrawOrders();
 	}
 
+	if (reset_deferred)
+	{
+		mWorldViewRectRaw = window_rect;
+		scratch_space.flush();
+		scratch_space.release();
+		gPipeline.allocateScreenBuffer(original_width, original_height);
+		
+	}
+
 	if (high_res)
 	{
 		send_agent_resume();
 	}
-
+	
 	return ret;
 }
 
diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp
index ea2dc60b07..6f8ead0943 100644
--- a/indra/newview/pipeline.cpp
+++ b/indra/newview/pipeline.cpp
@@ -779,7 +779,7 @@ void LLPipeline::allocatePhysicsBuffer()
 	}
 }
 
-void LLPipeline::allocateScreenBuffer(U32 resX, U32 resY)
+bool LLPipeline::allocateScreenBuffer(U32 resX, U32 resY)
 {
 	refreshCachedSettings();
 	U32 samples = RenderFSAASamples;
@@ -789,8 +789,13 @@ void LLPipeline::allocateScreenBuffer(U32 resX, U32 resY)
 	// - if not multisampled, shrink resolution and try again (favor X resolution over Y)
 	// Make sure to call "releaseScreenBuffers" after each failure to cleanup the partially loaded state
 
+	bool ret = true;
+
 	if (!allocateScreenBuffer(resX, resY, samples))
 	{
+		//failed to allocate at requested specification, return false
+		ret = false;
+
 		releaseScreenBuffers();
 		//reduce number of samples 
 		while (samples > 0)
@@ -798,7 +803,7 @@ void LLPipeline::allocateScreenBuffer(U32 resX, U32 resY)
 			samples /= 2;
 			if (allocateScreenBuffer(resX, resY, samples))
 			{ //success
-				return;
+				return ret;
 			}
 			releaseScreenBuffers();
 		}
@@ -811,20 +816,22 @@ void LLPipeline::allocateScreenBuffer(U32 resX, U32 resY)
 			resY /= 2;
 			if (allocateScreenBuffer(resX, resY, samples))
 			{
-				return;
+				return ret;
 			}
 			releaseScreenBuffers();
 
 			resX /= 2;
 			if (allocateScreenBuffer(resX, resY, samples))
 			{
-				return;
+				return ret;
 			}
 			releaseScreenBuffers();
 		}
 
 		llwarns << "Unable to allocate screen buffer at any resolution!" << llendl;
 	}
+
+	return ret;
 }
 
 
@@ -869,7 +876,7 @@ bool LLPipeline::allocateScreenBuffer(U32 resX, U32 resY, U32 samples)
 		if (!mScreen.allocate(resX, resY, GL_RGBA, FALSE, FALSE, LLTexUnit::TT_RECT_TEXTURE, FALSE, samples)) return false;
 		if (samples > 0)
 		{
-			if (!mFXAABuffer.allocate(nhpo2(resX), nhpo2(resY), GL_RGBA, FALSE, FALSE, LLTexUnit::TT_TEXTURE, FALSE, samples)) return false;
+			if (!mFXAABuffer.allocate(resX, resY, GL_RGBA, FALSE, FALSE, LLTexUnit::TT_TEXTURE, FALSE, samples)) return false;
 		}
 		else
 		{
@@ -903,7 +910,7 @@ bool LLPipeline::allocateScreenBuffer(U32 resX, U32 resY, U32 samples)
 			}
 		}
 
-		U32 width = nhpo2(U32(resX*scale))/2;
+		U32 width = resX*scale;
 		U32 height = width;
 
 		if (shadow_detail > 1)
@@ -7117,11 +7124,11 @@ void LLPipeline::renderBloom(BOOL for_snapshot, F32 zoom_factor, int subfield)
 
 	gGlowProgram.unbind();
 
-	if (LLRenderTarget::sUseFBO)
+	/*if (LLRenderTarget::sUseFBO)
 	{
 		LLFastTimer ftm(FTM_RENDER_BLOOM_FBO);
 		glBindFramebuffer(GL_FRAMEBUFFER, 0);
-	}
+	}*/
 
 	gGLViewport[0] = gViewerWindow->getWorldViewRectRaw().mLeft;
 	gGLViewport[1] = gViewerWindow->getWorldViewRectRaw().mBottom;
@@ -7997,10 +8004,6 @@ void LLPipeline::renderDeferredLighting()
 		gGL.popMatrix();
 		stop_glerror();
 
-		//copy depth and stencil from deferred screen
-		//mScreen.copyContents(mDeferredScreen, 0, 0, mDeferredScreen.getWidth(), mDeferredScreen.getHeight(),
-		//					0, 0, mScreen.getWidth(), mScreen.getHeight(), GL_DEPTH_BUFFER_BIT | GL_STENCIL_BUFFER_BIT, GL_NEAREST);
-
 		mScreen.bindTarget();
 		// clear color buffer here - zeroing alpha (glow) is important or it will accumulate against sky
 		glClearColor(0,0,0,0);
@@ -8772,8 +8775,6 @@ void LLPipeline::generateWaterReflection(LLCamera& camera_in)
 		}
 		last_update = LLDrawPoolWater::sNeedsReflectionUpdate && LLDrawPoolWater::sNeedsDistortionUpdate;
 
-		LLRenderTarget::unbindTarget();
-
 		LLPipeline::sReflectionRender = FALSE;
 
 		if (!LLRenderTarget::sUseFBO)
diff --git a/indra/newview/pipeline.h b/indra/newview/pipeline.h
index 7a0ca86231..c38e7fbdc1 100644
--- a/indra/newview/pipeline.h
+++ b/indra/newview/pipeline.h
@@ -119,8 +119,14 @@ public:
 	void createGLBuffers();
 	void createLUTBuffers();
 
-	void allocateScreenBuffer(U32 resX, U32 resY);
+	//allocate the largest screen buffer possible up to resX, resY
+	//returns true if full size buffer allocated, false if some other size is allocated
+	bool allocateScreenBuffer(U32 resX, U32 resY);
+
+	//attempt to allocate screen buffers at resX, resY
+	//returns true if allocation successful, false otherwise
 	bool allocateScreenBuffer(U32 resX, U32 resY, U32 samples);
+
 	void allocatePhysicsBuffer();
 	
 	void resetVertexBuffers(LLDrawable* drawable);
-- 
cgit v1.2.3


From 73d1b4f79ccc064ed84e66d1a55e7cc3823aa8b2 Mon Sep 17 00:00:00 2001
From: Dave Parks <davep@lindenlab.com>
Date: Mon, 26 Nov 2012 13:22:25 -0600
Subject: MAINT-1950 Add hashmarks to detail slider and put "Ultra" back in
 setGraphicsLevel

Reviewed by Simon
---
 indra/newview/llfeaturemanager.cpp                 |  4 +-
 .../default/xui/en/panel_preferences_graphics1.xml | 43 ++++++++++++++++++----
 2 files changed, 38 insertions(+), 9 deletions(-)

(limited to 'indra')

diff --git a/indra/newview/llfeaturemanager.cpp b/indra/newview/llfeaturemanager.cpp
index 6f11d4d4ca..b211027d54 100644
--- a/indra/newview/llfeaturemanager.cpp
+++ b/indra/newview/llfeaturemanager.cpp
@@ -720,7 +720,9 @@ void LLFeatureManager::setGraphicsLevel(S32 level, bool skipFeatures)
 			maskFeatures("High");
 			maskFeatures("Class5");
 			break;
-		
+		case 6:
+			maskFeatures("Ultra");
+			break;
 		default:
 			maskFeatures("Low");
 			maskFeatures("Class0");
diff --git a/indra/newview/skins/default/xui/en/panel_preferences_graphics1.xml b/indra/newview/skins/default/xui/en/panel_preferences_graphics1.xml
index f7666bdc4c..849f3ef73d 100644
--- a/indra/newview/skins/default/xui/en/panel_preferences_graphics1.xml
+++ b/indra/newview/skins/default/xui/en/panel_preferences_graphics1.xml
@@ -55,30 +55,57 @@
      name="LowGraphicsDivet"
      top_delta="-2"
      width="2" />
+  <icon
+     color="0.12 0.12 0.12 1"
+     height="14"
+     image_name="Rounded_Square"
+     layout="topleft"
+     left_pad="41"
+     name="LowMidraphicsDivet"
+     top_delta="-2"
+     width="2" />
     <icon
      color="0.12 0.12 0.12 1"
      height="14"
      image_name="Rounded_Square"
      layout="topleft"
-     left_pad="83"
+     left_pad="41"
      name="MidGraphicsDivet"
      top_delta="0"
      width="2" />
+  <icon
+     color="0.12 0.12 0.12 1"
+     height="14"
+     image_name="Rounded_Square"
+     layout="topleft"
+     left_pad="41"
+     name="MidHighGraphicsDivet"
+     top_delta="0"
+     width="2" />
     <icon
      color="0.12 0.12 0.12 1"
      height="14"
      image_name="Rounded_Square"
      layout="topleft"
-     left_pad="85"
+     left_pad="41"
      name="HighGraphicsDivet"
      top_delta="0"
      width="2" />
+  <icon
+     color="0.12 0.12 0.12 1"
+     height="14"
+     image_name="Rounded_Square"
+     layout="topleft"
+     left_pad="41"
+     name="HighUltraGraphicsDivet"
+     top_delta="0"
+     width="2" />
     <icon
      color="0.12 0.12 0.12 1"
      height="14"
      image_name="Rounded_Square"
      layout="topleft"
-     left_pad="83"
+     left_pad="41"
      name="UltraGraphicsDivet"
      top_delta="0"
      width="2" />
@@ -91,7 +118,7 @@
      initial_value="0"
      layout="topleft"
      left="120"
-     max_val="3"
+     max_val="6"
      name="QualityPerformanceSelection"
      show_text="false"
      top_delta="-2"
@@ -120,12 +147,12 @@
      height="12"
      layout="topleft"
      left_delta="87"
-     name="ShadersPrefText2"
+     name="ShadersPrefText3"
      top_delta="0"
      width="80">
         Mid
     </text>
-    <text
+  <text
      type="string"
      length="1"
      follows="left|top"
@@ -136,8 +163,8 @@
      name="ShadersPrefText3"
      top_delta="0"
      width="80">
-        High
-    </text>
+      High
+  </text>
     <text
      type="string"
      length="1"
-- 
cgit v1.2.3


From db96e3721875191cef415780b0ed35bb9ba9e4b0 Mon Sep 17 00:00:00 2001
From: Dave Parks <davep@lindenlab.com>
Date: Mon, 26 Nov 2012 14:02:32 -0600
Subject: MAINT-1953 Add NVIDIA GT 230 to gpu table

---
 indra/newview/gpu_table.txt | 1 +
 1 file changed, 1 insertion(+)

(limited to 'indra')

diff --git a/indra/newview/gpu_table.txt b/indra/newview/gpu_table.txt
index 5e8189caa5..21c3cff952 100644
--- a/indra/newview/gpu_table.txt
+++ b/indra/newview/gpu_table.txt
@@ -375,6 +375,7 @@ NVIDIA GTS 150							.*NVIDIA .*GTS *15.*					2	1	0	0
 NVIDIA 205								.*NVIDIA .*GeForce 205.*				2	1	1	3.3
 NVIDIA 210								.*NVIDIA .*GeForce 210.*				3	1	1	3.3
 NVIDIA GT 220							.*NVIDIA .*GT *22.*						2	1	1	3.3
+NVIDIA GT 230							.*NVIDIA .*GT *23.*						2	1	1	3.3
 NVIDIA GTS 240							.*NVIDIA .*GTS *24.*					4	1	1	3.3
 NVIDIA GTS 250							.*NVIDIA .*GTS *25.*					4	1	1	3.3
 NVIDIA GTX 260							.*NVIDIA .*GTX *26.*					4	1	1	3.3
-- 
cgit v1.2.3


From f175b5a20f334d0914fbe52f1e8d880e3398dc50 Mon Sep 17 00:00:00 2001
From: Monty Brandenberg <monty@lindenlab.com>
Date: Mon, 26 Nov 2012 16:19:48 -0500
Subject: BUG-768 Texture fetches hit caps throttle and need more retries.
 Bumped the default retry limit up from 5 to 8 which gives up to 15 seconds
 more dwell time should the viewer get a 503 or other recoverable error on
 access.

---
 indra/llcorehttp/_httpinternal.h | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

(limited to 'indra')

diff --git a/indra/llcorehttp/_httpinternal.h b/indra/llcorehttp/_httpinternal.h
index 465e2036b3..14f744a9f1 100644
--- a/indra/llcorehttp/_httpinternal.h
+++ b/indra/llcorehttp/_httpinternal.h
@@ -111,7 +111,15 @@ const int HTTP_TRACE_MIN = HTTP_TRACE_OFF;
 const int HTTP_TRACE_MAX = HTTP_TRACE_CURL_BODIES;
 
 // Request retry limits
-const int HTTP_RETRY_COUNT_DEFAULT = 5;
+//
+// At a minimum, retries need to extend past any throttling
+// window we're expecting from central services.  In the case
+// of Linden services running through the caps routers, there's
+// a five-second or so window for throttling with some spillover.
+// We want to span a few windows to allow transport to slow
+// after onset of the throttles and then recover without a final
+// failure.  Other systems may need other constants.
+const int HTTP_RETRY_COUNT_DEFAULT = 8;
 const int HTTP_RETRY_COUNT_MIN = 0;
 const int HTTP_RETRY_COUNT_MAX = 100;
 
-- 
cgit v1.2.3


From 72cbe5b9429b095cc2b9d940fde78dc4d2e21978 Mon Sep 17 00:00:00 2001
From: Dave Parks <davep@lindenlab.com>
Date: Mon, 26 Nov 2012 17:10:22 -0600
Subject: MAINT-1958 Fix for crash on OSX when resizing window with deferred
 rendering enabled.

Reviewed by VoidPointer
---
 indra/newview/app_settings/settings.xml | 12 ++++++++
 indra/newview/llfloaterpreference.cpp   |  5 +++-
 indra/newview/pipeline.cpp              | 51 ++++++++++++++++++++++++++-------
 indra/newview/pipeline.h                |  4 +++
 4 files changed, 60 insertions(+), 12 deletions(-)

(limited to 'indra')

diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml
index 4fa1663907..7801edb155 100755
--- a/indra/newview/app_settings/settings.xml
+++ b/indra/newview/app_settings/settings.xml
@@ -14070,5 +14070,17 @@
         <real>1.0</real>
       </array>
     </map>
+
+  <key>SimulateFBOFailure</key>
+  <map>
+    <key>Comment</key>
+    <string>[DEBUG] Make allocateScreenBuffer return false.  Used to test error handling.</string>
+    <key>Persist</key>
+    <integer>0</integer>
+    <key>Type</key>
+    <string>Boolean</string>
+    <key>Value</key>
+    <integer>0</integer>
+  </map>
 </map>
 </llsd>
diff --git a/indra/newview/llfloaterpreference.cpp b/indra/newview/llfloaterpreference.cpp
index 5752f839ce..542e96cf16 100755
--- a/indra/newview/llfloaterpreference.cpp
+++ b/indra/newview/llfloaterpreference.cpp
@@ -750,7 +750,10 @@ void LLFloaterPreference::onClose(bool app_quitting)
 {
 	gSavedSettings.setS32("LastPrefTab", getChild<LLTabContainer>("pref core")->getCurrentPanelIndex());
 	LLPanelLogin::setAlwaysRefresh(false);
-	cancel();
+	if (!app_quitting)
+	{
+		cancel();
+	}
 }
 
 void LLFloaterPreference::onOpenHardwareSettings()
diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp
index 6f8ead0943..6dd448f091 100644
--- a/indra/newview/pipeline.cpp
+++ b/indra/newview/pipeline.cpp
@@ -764,7 +764,16 @@ void LLPipeline::resizeScreenTexture()
 		GLuint resX = gViewerWindow->getWorldViewWidthRaw();
 		GLuint resY = gViewerWindow->getWorldViewHeightRaw();
 	
-		allocateScreenBuffer(resX,resY);
+		if (!allocateScreenBuffer(resX,resY))
+		{ //FAILSAFE: screen buffer allocation failed, disable deferred rendering if it's enabled
+			//NOTE: if the session closes successfully after this call, deferred rendering will be 
+			// disabled on future sessions
+			if (LLPipeline::sRenderDeferred)
+			{
+				gSavedSettings.setBOOL("RenderDeferred", FALSE);
+				LLPipeline::refreshCachedSettings();
+			}
+		}
 	}
 }
 
@@ -782,15 +791,38 @@ void LLPipeline::allocatePhysicsBuffer()
 bool LLPipeline::allocateScreenBuffer(U32 resX, U32 resY)
 {
 	refreshCachedSettings();
-	U32 samples = RenderFSAASamples;
+	
+	bool save_settings = sRenderDeferred;
+	if (save_settings)
+	{
+		// Set this flag in case we crash while resizing window or allocating space for deferred rendering targets
+		gSavedSettings.setBOOL("RenderInitError", TRUE);
+		gSavedSettings.saveToFile( gSavedSettings.getString("ClientSettingsFile"), TRUE );
+	}
+
+	bool ret = doAllocateScreenBuffer(resX, resY);
+
+	if (save_settings)
+	{
+		// don't disable shaders on next session
+		gSavedSettings.setBOOL("RenderInitError", FALSE);
+		gSavedSettings.saveToFile( gSavedSettings.getString("ClientSettingsFile"), TRUE );
+	}
+	
+	return ret;
+}
 
+
+bool LLPipeline::doAllocateScreenBuffer(U32 resX, U32 resY)
+{
 	//try to allocate screen buffers at requested resolution and samples
 	// - on failure, shrink number of samples and try again
 	// - if not multisampled, shrink resolution and try again (favor X resolution over Y)
 	// Make sure to call "releaseScreenBuffers" after each failure to cleanup the partially loaded state
 
-	bool ret = true;
+	U32 samples = RenderFSAASamples;
 
+	bool ret = true;
 	if (!allocateScreenBuffer(resX, resY, samples))
 	{
 		//failed to allocate at requested specification, return false
@@ -834,7 +866,6 @@ bool LLPipeline::allocateScreenBuffer(U32 resX, U32 resY)
 	return ret;
 }
 
-
 bool LLPipeline::allocateScreenBuffer(U32 resX, U32 resY, U32 samples)
 {
 	refreshCachedSettings();
@@ -861,10 +892,6 @@ bool LLPipeline::allocateScreenBuffer(U32 resX, U32 resY, U32 samples)
 
 	if (LLPipeline::sRenderDeferred)
 	{
-		// Set this flag in case we crash while resizing window or allocating space for deferred rendering targets
-		gSavedSettings.setBOOL("RenderInitError", TRUE);
-		gSavedSettings.saveToFile( gSavedSettings.getString("ClientSettingsFile"), TRUE );
-
 		S32 shadow_detail = RenderShadowDetail;
 		BOOL ssao = RenderDeferredSSAO;
 		
@@ -929,9 +956,11 @@ bool LLPipeline::allocateScreenBuffer(U32 resX, U32 resY, U32 samples)
 			}
 		}
 
-		// don't disable shaders on next session
-		gSavedSettings.setBOOL("RenderInitError", FALSE);
-		gSavedSettings.saveToFile( gSavedSettings.getString("ClientSettingsFile"), TRUE );
+		//HACK make screenbuffer allocations start failing after 30 seconds
+		if (gSavedSettings.getBOOL("SimulateFBOFailure"))
+		{
+			return false;
+		}
 	}
 	else
 	{
diff --git a/indra/newview/pipeline.h b/indra/newview/pipeline.h
index c38e7fbdc1..e5a11d5fc6 100644
--- a/indra/newview/pipeline.h
+++ b/indra/newview/pipeline.h
@@ -122,6 +122,10 @@ public:
 	//allocate the largest screen buffer possible up to resX, resY
 	//returns true if full size buffer allocated, false if some other size is allocated
 	bool allocateScreenBuffer(U32 resX, U32 resY);
+private:
+	//implementation of above, wrapped for easy error handling
+	bool doAllocateScreenBuffer(U32 resX, U32 resY);
+public:
 
 	//attempt to allocate screen buffers at resX, resY
 	//returns true if allocation successful, false otherwise
-- 
cgit v1.2.3


From a1c52b7cd1f4aa9ad0023efff30af53ca52727ec Mon Sep 17 00:00:00 2001
From: Xiaohong Bao <bao@lindenlab.com>
Date: Mon, 26 Nov 2012 17:27:25 -0700
Subject: fix for MAINT-1955: Viewer crashes while login after clearing cache

---
 indra/newview/lltexturecache.cpp | 15 +++++++++++++--
 1 file changed, 13 insertions(+), 2 deletions(-)

(limited to 'indra')

diff --git a/indra/newview/lltexturecache.cpp b/indra/newview/lltexturecache.cpp
index a61e2d5c86..2d463f0afa 100644
--- a/indra/newview/lltexturecache.cpp
+++ b/indra/newview/lltexturecache.cpp
@@ -1861,7 +1861,12 @@ LLPointer<LLImageRaw> LLTextureCache::readFromFastCache(const LLUUID& id, S32& d
 
 		mFastCachep->seek(APR_SET, offset);		
 	
-		llassert_always(mFastCachep->read(head, TEXTURE_FAST_CACHE_ENTRY_OVERHEAD) == TEXTURE_FAST_CACHE_ENTRY_OVERHEAD);
+		if(mFastCachep->read(head, TEXTURE_FAST_CACHE_ENTRY_OVERHEAD) != TEXTURE_FAST_CACHE_ENTRY_OVERHEAD)
+		{
+			//cache corrupted or under thread race condition
+			closeFastCache(); 
+			return NULL;
+		}
 		
 		S32 image_size = head[0] * head[1] * head[2];
 		if(!image_size) //invalid
@@ -1872,7 +1877,13 @@ LLPointer<LLImageRaw> LLTextureCache::readFromFastCache(const LLUUID& id, S32& d
 		discardlevel = head[3];
 		
 		data =  (U8*)ALLOCATE_MEM(LLImageBase::getPrivatePool(), image_size);
-		llassert_always(mFastCachep->read(data, image_size) == image_size);
+		if(mFastCachep->read(data, image_size) != image_size)
+		{
+			FREE_MEM(LLImageBase::getPrivatePool(), data);
+			closeFastCache();
+			return NULL;
+		}
+
 		closeFastCache();
 	}
 	LLPointer<LLImageRaw> raw = new LLImageRaw(data, head[0], head[1], head[2], true);
-- 
cgit v1.2.3


From 4d65c754d6e20906770d8c84abf00b2dd7645d80 Mon Sep 17 00:00:00 2001
From: Monty Brandenberg <monty@lindenlab.com>
Date: Tue, 27 Nov 2012 18:09:01 +0000
Subject: Tweak the example program (used as a performance tester) so that it
 will run with higher connection concurrencies.  I'm using this to test the
 listener queue length reporting on apaches and everything is consistent and
 as expected with this change (stuck at eight before).

---
 indra/llcorehttp/examples/http_texture_load.cpp | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

(limited to 'indra')

diff --git a/indra/llcorehttp/examples/http_texture_load.cpp b/indra/llcorehttp/examples/http_texture_load.cpp
index 998dc9240b..40ad4f047d 100644
--- a/indra/llcorehttp/examples/http_texture_load.cpp
+++ b/indra/llcorehttp/examples/http_texture_load.cpp
@@ -153,6 +153,7 @@ public:
 //
 int main(int argc, char** argv)
 {
+	LLCore::HttpStatus status;
 	bool do_random(false);
 	bool do_verbose(false);
 	
@@ -215,6 +216,9 @@ int main(int argc, char** argv)
 	// Initialization
 	init_curl();
 	LLCore::HttpRequest::createService();
+	LLCore::HttpRequest::setPolicyClassOption(LLCore::HttpRequest::DEFAULT_POLICY_ID,
+											  LLCore::HttpRequest::CP_CONNECTION_LIMIT,
+											  concurrency_limit);
 	LLCore::HttpRequest::startThread();
 	
 	// Get service point
@@ -228,7 +232,7 @@ int main(int argc, char** argv)
 	ws.loadTextureUuids(uuids);
 	ws.mRandomRange = do_random;
 	ws.mVerbose = do_verbose;
-	ws.mMaxConcurrency = concurrency_limit;
+	ws.mMaxConcurrency = 100;
 	
 	if (! ws.mTextures.size())
 	{
-- 
cgit v1.2.3


From 9a8cf6603fbfc96595d047c770817eba7631a067 Mon Sep 17 00:00:00 2001
From: Dave Parks <davep@lindenlab.com>
Date: Fri, 30 Nov 2012 12:21:01 -0600
Subject: MAINT-1958 Fix for linux build after transplant.

---
 indra/newview/pipeline.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

(limited to 'indra')

diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp
index 6dd448f091..5360a67538 100644
--- a/indra/newview/pipeline.cpp
+++ b/indra/newview/pipeline.cpp
@@ -937,7 +937,7 @@ bool LLPipeline::allocateScreenBuffer(U32 resX, U32 resY, U32 samples)
 			}
 		}
 
-		U32 width = resX*scale;
+		U32 width = (U32) (resX*scale);
 		U32 height = width;
 
 		if (shadow_detail > 1)
-- 
cgit v1.2.3


From 9c205ee9e2cb857566569a3640766d42f5a4416e Mon Sep 17 00:00:00 2001
From: Dave Parks <davep@lindenlab.com>
Date: Fri, 30 Nov 2012 17:47:12 -0600
Subject: MAINT-1958 More robust error handling -- handle the case where the
 FBO allocation failure occurs when enabling lighting and shadows.

---
 indra/newview/pipeline.cpp | 38 ++++++++++++++++++++------------------
 indra/newview/pipeline.h   |  9 ++++++++-
 2 files changed, 28 insertions(+), 19 deletions(-)

(limited to 'indra')

diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp
index 5360a67538..d049e0af45 100644
--- a/indra/newview/pipeline.cpp
+++ b/indra/newview/pipeline.cpp
@@ -764,16 +764,7 @@ void LLPipeline::resizeScreenTexture()
 		GLuint resX = gViewerWindow->getWorldViewWidthRaw();
 		GLuint resY = gViewerWindow->getWorldViewHeightRaw();
 	
-		if (!allocateScreenBuffer(resX,resY))
-		{ //FAILSAFE: screen buffer allocation failed, disable deferred rendering if it's enabled
-			//NOTE: if the session closes successfully after this call, deferred rendering will be 
-			// disabled on future sessions
-			if (LLPipeline::sRenderDeferred)
-			{
-				gSavedSettings.setBOOL("RenderDeferred", FALSE);
-				LLPipeline::refreshCachedSettings();
-			}
-		}
+		allocateScreenBuffer(resX,resY);
 	}
 }
 
@@ -800,7 +791,7 @@ bool LLPipeline::allocateScreenBuffer(U32 resX, U32 resY)
 		gSavedSettings.saveToFile( gSavedSettings.getString("ClientSettingsFile"), TRUE );
 	}
 
-	bool ret = doAllocateScreenBuffer(resX, resY);
+	eFBOStatus ret = doAllocateScreenBuffer(resX, resY);
 
 	if (save_settings)
 	{
@@ -809,11 +800,22 @@ bool LLPipeline::allocateScreenBuffer(U32 resX, U32 resY)
 		gSavedSettings.saveToFile( gSavedSettings.getString("ClientSettingsFile"), TRUE );
 	}
 	
-	return ret;
+	if (ret == FBO_FAILURE)
+	{ //FAILSAFE: screen buffer allocation failed, disable deferred rendering if it's enabled
+		//NOTE: if the session closes successfully after this call, deferred rendering will be 
+		// disabled on future sessions
+		if (LLPipeline::sRenderDeferred)
+		{
+			gSavedSettings.setBOOL("RenderDeferred", FALSE);
+			LLPipeline::refreshCachedSettings();
+		}
+	}
+
+	return ret == FBO_SUCCESS_FULLRES;
 }
 
 
-bool LLPipeline::doAllocateScreenBuffer(U32 resX, U32 resY)
+LLPipeline::eFBOStatus LLPipeline::doAllocateScreenBuffer(U32 resX, U32 resY)
 {
 	//try to allocate screen buffers at requested resolution and samples
 	// - on failure, shrink number of samples and try again
@@ -822,11 +824,11 @@ bool LLPipeline::doAllocateScreenBuffer(U32 resX, U32 resY)
 
 	U32 samples = RenderFSAASamples;
 
-	bool ret = true;
+	eFBOStatus ret = FBO_SUCCESS_FULLRES;
 	if (!allocateScreenBuffer(resX, resY, samples))
 	{
 		//failed to allocate at requested specification, return false
-		ret = false;
+		ret = FBO_FAILURE;
 
 		releaseScreenBuffers();
 		//reduce number of samples 
@@ -835,7 +837,7 @@ bool LLPipeline::doAllocateScreenBuffer(U32 resX, U32 resY)
 			samples /= 2;
 			if (allocateScreenBuffer(resX, resY, samples))
 			{ //success
-				return ret;
+				return FBO_SUCCESS_LOWRES;
 			}
 			releaseScreenBuffers();
 		}
@@ -848,14 +850,14 @@ bool LLPipeline::doAllocateScreenBuffer(U32 resX, U32 resY)
 			resY /= 2;
 			if (allocateScreenBuffer(resX, resY, samples))
 			{
-				return ret;
+				return FBO_SUCCESS_LOWRES;
 			}
 			releaseScreenBuffers();
 
 			resX /= 2;
 			if (allocateScreenBuffer(resX, resY, samples))
 			{
-				return ret;
+				return FBO_SUCCESS_LOWRES;
 			}
 			releaseScreenBuffers();
 		}
diff --git a/indra/newview/pipeline.h b/indra/newview/pipeline.h
index e5a11d5fc6..36abeca295 100644
--- a/indra/newview/pipeline.h
+++ b/indra/newview/pipeline.h
@@ -122,9 +122,16 @@ public:
 	//allocate the largest screen buffer possible up to resX, resY
 	//returns true if full size buffer allocated, false if some other size is allocated
 	bool allocateScreenBuffer(U32 resX, U32 resY);
+
+	typedef enum {
+		FBO_SUCCESS_FULLRES = 0,
+		FBO_SUCCESS_LOWRES,
+		FBO_FAILURE
+	} eFBOStatus;
+
 private:
 	//implementation of above, wrapped for easy error handling
-	bool doAllocateScreenBuffer(U32 resX, U32 resY);
+	eFBOStatus doAllocateScreenBuffer(U32 resX, U32 resY);
 public:
 
 	//attempt to allocate screen buffers at resX, resY
-- 
cgit v1.2.3


From 99c5b21ee763e1a7815b5f5e2bdada9581f0b0a1 Mon Sep 17 00:00:00 2001
From: Dave Parks <davep@lindenlab.com>
Date: Fri, 30 Nov 2012 19:32:22 -0600
Subject: MAINT-1958 Trivial change to kick teamcity into behaving.

---
 indra/newview/pipeline.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

(limited to 'indra')

diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp
index d049e0af45..ab45bd3d3b 100644
--- a/indra/newview/pipeline.cpp
+++ b/indra/newview/pipeline.cpp
@@ -817,7 +817,7 @@ bool LLPipeline::allocateScreenBuffer(U32 resX, U32 resY)
 
 LLPipeline::eFBOStatus LLPipeline::doAllocateScreenBuffer(U32 resX, U32 resY)
 {
-	//try to allocate screen buffers at requested resolution and samples
+	// try to allocate screen buffers at requested resolution and samples
 	// - on failure, shrink number of samples and try again
 	// - if not multisampled, shrink resolution and try again (favor X resolution over Y)
 	// Make sure to call "releaseScreenBuffers" after each failure to cleanup the partially loaded state
-- 
cgit v1.2.3


From 5c22524f29e4ab1f287f0e443bbdbea2f516c0d2 Mon Sep 17 00:00:00 2001
From: Kelly Washington <kelly@lindenlab.com>
Date: Mon, 3 Dec 2012 16:37:05 -0800
Subject: MAINT-1979 Viewer crashes while attempting to join group in the
 moment of loading group members * Fix one race condition that could
 dereference a dangling pointer. reviewed with Simon and Baker.

---
 indra/newview/llgroupmgr.cpp          | 14 ++++++++----
 indra/newview/llgroupmgr.h            |  5 +++++
 indra/newview/llpanelgroupgeneral.cpp | 13 ++++++-----
 indra/newview/llpanelgroupgeneral.h   |  3 +--
 indra/newview/llpanelgrouproles.cpp   | 41 ++++++++++++++++-------------------
 indra/newview/llpanelgrouproles.h     |  7 ++----
 6 files changed, 45 insertions(+), 38 deletions(-)

(limited to 'indra')

diff --git a/indra/newview/llgroupmgr.cpp b/indra/newview/llgroupmgr.cpp
index 6916cf813a..81eb1d397e 100644
--- a/indra/newview/llgroupmgr.cpp
+++ b/indra/newview/llgroupmgr.cpp
@@ -238,6 +238,7 @@ LLGroupMgrGroupData::LLGroupMgrGroupData(const LLUUID& id) :
 	mPendingRoleMemberRequest(FALSE),
 	mAccessTime(0.0f)
 {
+	mMemberVersion.generate();
 }
 
 void LLGroupMgrGroupData::setAccessed()
@@ -318,14 +319,14 @@ void LLGroupMgrGroupData::setRoleData(const LLUUID& role_id, LLRoleData role_dat
 			role_data.mChangeType = RC_UPDATE_DATA;
 		}
 		else
-	{
+		{
 			role_data.mChangeType = RC_UPDATE_POWERS;
 		}
 
 		mRoleChanges[role_id] = role_data;
 	}
 	else
-		{
+	{
 		llwarns << "Change being made to non-existant role " << role_id << llendl;
 	}
 }
@@ -424,6 +425,7 @@ void LLGroupMgrGroupData::removeMemberData()
 	}
 	mMembers.clear();
 	mMemberDataComplete = FALSE;
+	mMemberVersion.generate();
 }
 
 void LLGroupMgrGroupData::removeRoleData()
@@ -945,6 +947,8 @@ void LLGroupMgr::processGroupMembersReply(LLMessageSystem* msg, void** data)
 		}
 	}
 
+	group_datap->mMemberVersion.generate();
+
 	if (group_datap->mMembers.size() ==  (U32)group_datap->mMemberCount)
 	{
 		group_datap->mMemberDataComplete = TRUE;
@@ -1771,8 +1775,6 @@ void LLGroupMgr::sendGroupMemberEjects(const LLUUID& group_id,
 	bool start_message = true;
 	LLMessageSystem* msg = gMessageSystem;
 
-	
-
 	LLGroupMgrGroupData* group_datap = LLGroupMgr::getInstance()->getGroupData(group_id);
 	if (!group_datap) return;
 
@@ -1833,6 +1835,8 @@ void LLGroupMgr::sendGroupMemberEjects(const LLUUID& group_id,
 	{
 		gAgent.sendReliableMessage();
 	}
+
+	group_datap->mMemberVersion.generate();
 }
 
 
@@ -1990,6 +1994,8 @@ void LLGroupMgr::processCapGroupMembersRequest(const LLSD& content)
 		group_datap->mMembers[member_id] = data;
 	}
 
+	group_datap->mMemberVersion.generate();
+
 	// Technically, we have this data, but to prevent completely overhauling
 	// this entire system (it would be nice, but I don't have the time), 
 	// I'm going to be dumb and just call services I most likely don't need 
diff --git a/indra/newview/llgroupmgr.h b/indra/newview/llgroupmgr.h
index 62b2978f21..d8c1ab7ef5 100644
--- a/indra/newview/llgroupmgr.h
+++ b/indra/newview/llgroupmgr.h
@@ -236,6 +236,8 @@ public:
 	F32 getAccessTime() const { return mAccessTime; }
 	void setAccessed();
 
+	const LLUUID& getMemberVersion() const { return mMemberVersion; }
+
 public:
 	typedef	std::map<LLUUID,LLGroupMemberData*> member_list_t;
 	typedef	std::map<LLUUID,LLGroupRoleData*> role_list_t;
@@ -284,6 +286,9 @@ private:
 
 	BOOL				mPendingRoleMemberRequest;
 	F32					mAccessTime;
+
+	// Generate a new ID every time mMembers
+	LLUUID				mMemberVersion;
 };
 
 struct LLRoleAction
diff --git a/indra/newview/llpanelgroupgeneral.cpp b/indra/newview/llpanelgroupgeneral.cpp
index 51b4d2ea65..993ffb7825 100644
--- a/indra/newview/llpanelgroupgeneral.cpp
+++ b/indra/newview/llpanelgroupgeneral.cpp
@@ -670,7 +670,6 @@ void LLPanelGroupGeneral::update(LLGroupChange gc)
 		{
 			mMemberProgress = gdatap->mMembers.begin();
 			mPendingMemberUpdate = TRUE;
-			mUdpateSessionID.generate();
 
 			sSDTime = 0.0f;
 			sElementTime = 0.0f;
@@ -730,7 +729,7 @@ void LLPanelGroupGeneral::updateMembers()
 			// If name is not cached, onNameCache() should be called when it is cached and add this member to list.
 			LLAvatarNameCache::get(mMemberProgress->first, 
 									boost::bind(&LLPanelGroupGeneral::onNameCache,
-												this, mUdpateSessionID, member, _1, _2));
+												this, gdatap->getMemberVersion(), member, _2));
 		}
 	}
 
@@ -768,11 +767,15 @@ void LLPanelGroupGeneral::addMember(LLGroupMemberData* member)
 	}
 }
 
-void LLPanelGroupGeneral::onNameCache(const LLUUID& update_id, LLGroupMemberData* member, const LLUUID& id, const LLAvatarName& av_name)
+void LLPanelGroupGeneral::onNameCache(const LLUUID& update_id, LLGroupMemberData* member, const LLAvatarName& av_name)
 {
-	if (!member 
-		|| update_id != mUdpateSessionID)
+	LLGroupMgrGroupData* gdatap = LLGroupMgr::getInstance()->getGroupData(mGroupID);
+
+	if (!gdatap
+		|| !gdatap->isMemberDataComplete()
+		|| gdatap->getMemberVersion() != update_id)
 	{
+		// Stale data
 		return;
 	}
 
diff --git a/indra/newview/llpanelgroupgeneral.h b/indra/newview/llpanelgroupgeneral.h
index b179f78c56..1b4e8e2645 100644
--- a/indra/newview/llpanelgroupgeneral.h
+++ b/indra/newview/llpanelgroupgeneral.h
@@ -63,7 +63,7 @@ public:
 
 	virtual void setupCtrls	(LLPanel* parent);
 
-	void onNameCache(const LLUUID& update_id, LLGroupMemberData* member, const LLUUID& id, const LLAvatarName& av_name);
+	void onNameCache(const LLUUID& update_id, LLGroupMemberData* member, const LLAvatarName& av_name);
 private:
 	void	reset();
 
@@ -90,7 +90,6 @@ private:
 	BOOL			mChanged;
 	BOOL			mFirstUse;
 	std::string		mIncompleteMemberDataStr;
-	LLUUID			mUdpateSessionID;
 
 	// Group information (include any updates in updateChanged)
 	LLLineEditor		*mGroupNameEditor;
diff --git a/indra/newview/llpanelgrouproles.cpp b/indra/newview/llpanelgrouproles.cpp
index 5720168f81..ff106882f4 100644
--- a/indra/newview/llpanelgrouproles.cpp
+++ b/indra/newview/llpanelgrouproles.cpp
@@ -745,7 +745,6 @@ LLPanelGroupMembersSubTab::LLPanelGroupMembersSubTab()
 	mHasMatch(FALSE),
 	mNumOwnerAdditions(0)
 {
-	mUdpateSessionID = LLUUID::null;
 }
 
 LLPanelGroupMembersSubTab::~LLPanelGroupMembersSubTab()
@@ -1427,13 +1426,20 @@ U64 LLPanelGroupMembersSubTab::getAgentPowersBasedOnRoleChanges(const LLUUID& ag
 		return GP_NO_POWERS;
 	}
 
-	LLGroupMemberData* member_data = gdatap->mMembers[agent_id];
-	if ( !member_data )
+	LLGroupMgrGroupData::member_list_t::iterator iter = gdatap->mMembers.find(agent_id);
+	if ( iter == gdatap->mMembers.end() )
 	{
 		llwarns << "LLPanelGroupMembersSubTab::getAgentPowersBasedOnRoleChanges() -- No member data for member with UUID " << agent_id << llendl;
 		return GP_NO_POWERS;
 	}
 
+	LLGroupMemberData* member_data = (*iter).second;
+	if (!member_data)
+	{
+		llwarns << "LLPanelGroupMembersSubTab::getAgentPowersBasedOnRoleChanges() -- Null member data for member with UUID " << agent_id << llendl;
+		return GP_NO_POWERS;
+	}
+
 	//see if there are unsaved role changes for this agent
 	role_change_data_map_t* role_change_datap = NULL;
 	member_role_changes_map_t::iterator member = mMemberRoleChangeData.find(agent_id);
@@ -1548,10 +1554,6 @@ void LLPanelGroupMembersSubTab::update(LLGroupChange gc)
 		mMemberProgress = gdatap->mMembers.begin();
 		mPendingMemberUpdate = TRUE;
 		mHasMatch = FALSE;
-		// Generate unique ID for current updateMembers()- see onNameCache for details.
-		// Using unique UUID is perhaps an overkill but this way we are perfectly safe
-		// from coincidences.
-		mUdpateSessionID.generate();
 	}
 	else
 	{
@@ -1579,14 +1581,14 @@ void LLPanelGroupMembersSubTab::update(LLGroupChange gc)
 	}
 }
 
-void LLPanelGroupMembersSubTab::addMemberToList(LLUUID id, LLGroupMemberData* data)
+void LLPanelGroupMembersSubTab::addMemberToList(LLGroupMemberData* data)
 {
 	if (!data) return;
 	LLUIString donated = getString("donation_area");
 	donated.setArg("[AREA]", llformat("%d", data->getContribution()));
 
 	LLNameListCtrl::NameItem item_params;
-	item_params.value = id;
+	item_params.value = data->getID();
 
 	item_params.columns.add().column("name").font.name("SANSSERIF_SMALL").style("NORMAL");
 
@@ -1600,17 +1602,12 @@ void LLPanelGroupMembersSubTab::addMemberToList(LLUUID id, LLGroupMemberData* da
 	mHasMatch = TRUE;
 }
 
-void LLPanelGroupMembersSubTab::onNameCache(const LLUUID& update_id, LLGroupMemberData* member, const LLUUID& id, const LLAvatarName& av_name)
+void LLPanelGroupMembersSubTab::onNameCache(const LLUUID& update_id, LLGroupMemberData* member, const LLAvatarName& av_name)
 {
-	// Update ID is used to determine whether member whose id is passed
-	// into onNameCache() was passed after current or previous user-initiated update.
-	// This is needed to avoid probable duplication of members in list after changing filter
-	// or adding of members of another group if gets for their names were called on
-	// previous update. If this id is from get() called from older update,
-	// we do nothing.
-	if (mUdpateSessionID != update_id) return;
-	
-	if (!member)
+	LLGroupMgrGroupData* gdatap = LLGroupMgr::getInstance()->getGroupData(mGroupID);
+	if (!gdatap
+		|| gdatap->getMemberVersion() != update_id
+		|| !member)
 	{
 		return;
 	}
@@ -1618,7 +1615,7 @@ void LLPanelGroupMembersSubTab::onNameCache(const LLUUID& update_id, LLGroupMemb
 	// trying to avoid unnecessary hash lookups
 	if (matchesSearchFilter(av_name.getLegacyName()))
 	{
-		addMemberToList(id, member);
+		addMemberToList(member);
 		if(!mMembersList->getEnabled())
 		{
 			mMembersList->setEnabled(TRUE);
@@ -1672,14 +1669,14 @@ void LLPanelGroupMembersSubTab::updateMembers()
 		{
 			if (matchesSearchFilter(av_name.getLegacyName()))
 			{
-				addMemberToList(mMemberProgress->first, mMemberProgress->second);
+				addMemberToList(mMemberProgress->second);
 			}
 		}
 		else
 		{
 			// If name is not cached, onNameCache() should be called when it is cached and add this member to list.
 			LLAvatarNameCache::get(mMemberProgress->first, boost::bind(&LLPanelGroupMembersSubTab::onNameCache,
-																	   this, mUdpateSessionID, mMemberProgress->second, _1, _2));
+									this, gdatap->getMemberVersion(), mMemberProgress->second, _2));
 		}
 	}
 
diff --git a/indra/newview/llpanelgrouproles.h b/indra/newview/llpanelgrouproles.h
index 8b454e020a..bead8bd85b 100644
--- a/indra/newview/llpanelgrouproles.h
+++ b/indra/newview/llpanelgrouproles.h
@@ -187,8 +187,8 @@ public:
 
 	virtual void setGroupID(const LLUUID& id);
 
-	void addMemberToList(LLUUID id, LLGroupMemberData* data);
-	void onNameCache(const LLUUID& update_id, LLGroupMemberData* member, const LLUUID& id, const LLAvatarName& av_name);
+	void addMemberToList(LLGroupMemberData* data);
+	void onNameCache(const LLUUID& update_id, LLGroupMemberData* member, const LLAvatarName& av_name);
 
 protected:
 	typedef std::map<LLUUID, LLRoleMemberChangeType> role_change_data_map_t;
@@ -210,9 +210,6 @@ protected:
 	BOOL mPendingMemberUpdate;
 	BOOL mHasMatch;
 
-	// This id is generated after each user initiated member list update(opening Roles or changing filter)
-	LLUUID mUdpateSessionID;
-
 	member_role_changes_map_t mMemberRoleChangeData;
 	U32 mNumOwnerAdditions;
 
-- 
cgit v1.2.3


From 11bebcbcac4c0ae4ecbffd9703b3d815e69da3d3 Mon Sep 17 00:00:00 2001
From: Xiaohong Bao <bao@lindenlab.com>
Date: Mon, 3 Dec 2012 21:34:36 -0700
Subject: more for MAINT-1955: Viewer crashes while login after clearing cache

---
 indra/newview/lltexturecache.cpp | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

(limited to 'indra')

diff --git a/indra/newview/lltexturecache.cpp b/indra/newview/lltexturecache.cpp
index 2d463f0afa..305f6fca0f 100644
--- a/indra/newview/lltexturecache.cpp
+++ b/indra/newview/lltexturecache.cpp
@@ -1937,7 +1937,11 @@ bool LLTextureCache::writeToFastCache(S32 id, LLPointer<LLImageRaw> raw, S32 dis
 		openFastCache();
 
 		mFastCachep->seek(APR_SET, offset);	
-		llassert_always(mFastCachep->write(mFastCachePadBuffer, TEXTURE_FAST_CACHE_ENTRY_SIZE) == TEXTURE_FAST_CACHE_ENTRY_SIZE);
+		
+		//no need to do this assertion check. When it fails, let it fail quietly.
+		//this failure could happen because other viewer removes the fast cache file when clearing cache.
+		//--> llassert_always(mFastCachep->write(mFastCachePadBuffer, TEXTURE_FAST_CACHE_ENTRY_SIZE) == TEXTURE_FAST_CACHE_ENTRY_SIZE);
+		mFastCachep->write(mFastCachePadBuffer, TEXTURE_FAST_CACHE_ENTRY_SIZE);
 
 		closeFastCache(true);
 	}
-- 
cgit v1.2.3


From 1f2b88803e83e2f35d8ed658783d6c4c3110c088 Mon Sep 17 00:00:00 2001
From: Dave Parks <davep@lindenlab.com>
Date: Tue, 4 Dec 2012 16:10:15 -0600
Subject: MAINT-1953 Run through viewer stats and update GPU table with missing
 entries and new expected OpenGL versions

---
 indra/newview/gpu_table.txt        | 124 +++++++++++++++++++++----------------
 indra/newview/llfeaturemanager.cpp |  14 ++++-
 2 files changed, 81 insertions(+), 57 deletions(-)

(limited to 'indra')

diff --git a/indra/newview/gpu_table.txt b/indra/newview/gpu_table.txt
index 21c3cff952..4c39014c8b 100644
--- a/indra/newview/gpu_table.txt
+++ b/indra/newview/gpu_table.txt
@@ -70,11 +70,11 @@ ATI ASUS EAH58xx						.*ATI.*ASUS.*EAH58.*					5	1	1	4.1
 ATI ASUS EAH62xx						.*ATI.*ASUS.*EAH62.*					2	1	0	0
 ATI ASUS EAH63xx						.*ATI.*ASUS.*EAH63.*					2	1	0	0
 ATI ASUS EAH64xx						.*ATI.*ASUS.*EAH64.*					2	1	0	0
-ATI ASUS EAH65xx						.*ATI.*ASUS.*EAH65.*					2	1	0	0
-ATI ASUS EAH66xx						.*ATI.*ASUS.*EAH66.*					3	1	0	0
+ATI ASUS EAH65xx						.*ATI.*ASUS.*EAH65.*					2	1	0	4.1
+ATI ASUS EAH66xx						.*ATI.*ASUS.*EAH66.*					3	1	0	4.1
 ATI ASUS EAH67xx						.*ATI.*ASUS.*EAH67.*					3	1	0	0
-ATI ASUS EAH68xx						.*ATI.*ASUS.*EAH68.*					5	1	0	0
-ATI ASUS EAH69xx						.*ATI.*ASUS.*EAH69.*					5	1	0	0
+ATI ASUS EAH68xx						.*ATI.*ASUS.*EAH68.*					5	1	0	4
+ATI ASUS EAH69xx						.*ATI.*ASUS.*EAH69.*					5	1	0	4.1
 ATI ASUS Radeon X1xxx					.*ATI.*ASUS.*X1.*						2	1	1	2.1
 ATI Radeon X7xx							.*ATI.*ASUS.*X7.*						1	1	0	0
 ATI Radeon X19xx						.*ATI.*(Radeon|Diamond) X19.* ?.*		2	1	1	2.1
@@ -108,13 +108,22 @@ ATI Radeon HD 65xx						.*ATI.*AMD Radeon.* HD [67]5..[MG]		2	1	1	4.2
 ATI Radeon HD 66xx						.*ATI.*AMD Radeon.* HD [67]6..[MG]		3	1	1	4.2
 ATI Radeon HD 7100						.*ATI.*AMD Radeon.* HD 71.*				2	1	0	0
 ATI Radeon HD 7200						.*ATI.*AMD Radeon.* HD 72.*				2	1	0	0
-ATI Radeon HD 7300						.*ATI.*AMD Radeon.* HD 73.*				2	1	0	0
-ATI Radeon HD 7400						.*ATI.*AMD Radeon.* HD 74.*				2	1	0	0
+ATI Radeon HD 7300						.*ATI.*AMD Radeon.* HD 73.*				2	1	0	4.2
+ATI Radeon HD 7400						.*ATI.*AMD Radeon.* HD 74.*				2	1	0	4.2
 ATI Radeon HD 7500						.*ATI.*AMD Radeon.* HD 75.*				3	1	1	4.2
-ATI Radeon HD 7600						.*ATI.*AMD Radeon.* HD 76.*				3	1	0	0
+ATI Radeon HD 7600						.*ATI.*AMD Radeon.* HD 76.*				3	1	0	4.2
 ATI Radeon HD 7700						.*ATI.*AMD Radeon.* HD 77.*				4	1	1	4.2
 ATI Radeon HD 7800						.*ATI.*AMD Radeon.* HD 78.*				5	1	1	4.2
 ATI Radeon HD 7900						.*ATI.*AMD Radeon.* HD 79.*				5	1	1	4.2
+ATI ASUS HD7100							.*ATI.*ASUS.* HD71.*					2	1	0	0
+ATI ASUS HD7200							.*ATI.*ASUS.* HD72.*					2	1	0	0
+ATI ASUS HD7300							.*ATI.*ASUS.* HD73.*					2	1	0	0
+ATI ASUS HD7400							.*ATI.*ASUS.* HD74.*					2	1	0	0
+ATI ASUS HD7500							.*ATI.*ASUS.* HD75.*					3	1	1	4.2
+ATI ASUS HD7600							.*ATI.*ASUS.* HD76.*					3	1	0	0
+ATI ASUS HD7700							.*ATI.*ASUS.* HD77.*					4	1	1	4.2
+ATI ASUS HD7800							.*ATI.*ASUS.* HD78.*					5	1	1	4.2
+ATI ASUS HD7900							.*ATI.*ASUS.* HD79.*					5	1	1	4.2
 ATI Mobility Radeon 4100				.*ATI.*Mobility.*41..					1	1	1	3.3
 ATI Mobility Radeon 7xxx				.*ATI.*Mobility.*Radeon 7.*				0	1	1	1.3
 ATI Mobility Radeon 8xxx				.*ATI.*Mobility.*Radeon 8.*				0	1	0	0
@@ -167,6 +176,7 @@ ATI Radeon HD 3400						.*ATI.*Radeon HD *34..					1	1	1	4
 ATI Radeon HD 3500						.*ATI.*Radeon HD *35..					2	1	0	0
 ATI Radeon HD 3600						.*ATI.*Radeon HD *36..					3	1	1	3.3
 ATI Radeon HD 3700						.*ATI.*Radeon HD *37..					3	1	0	0
+ATI HD3700								.*ATI.* HD37..							3	1	0	3.3
 ATI Radeon HD 3800						.*ATI.*Radeon HD *38..					3	1	1	4
 ATI Radeon HD 4100						.*ATI.*Radeon HD *41..					1	1	0	0
 ATI Radeon HD 4200						.*ATI.*Radeon HD *42..					1	1	1	4
@@ -176,8 +186,10 @@ ATI Radeon HD 4500						.*ATI.*Radeon HD *45..					2	1	1	3.3
 ATI Radeon HD 4600						.*ATI.*Radeon HD *46..					3	1	1	4
 ATI Radeon HD 4700						.*ATI.*Radeon HD *47..					3	1	1	3.3
 ATI Radeon HD 4800						.*ATI.*Radeon HD *48..					3	1	1	4
+ATI ASUS EAH5400						.*ATI.*ASUS EAH54..						3	1	1	4.2
 ATI Radeon HD 5400						.*ATI.*Radeon HD *54..					3	1	1	4.2
 ATI Radeon HD 5500						.*ATI.*Radeon HD *55..					3	1	1	4.2
+ATI ASUS EAH5500						.*ATI.*ASUS EAH55..						3	1	1	4.2
 ATI Radeon HD 5600						.*ATI.*Radeon HD *56..					3	1	1	4.2
 ATI Radeon HD 5700						.*ATI.*Radeon HD *57..					3	1	1	4.2
 ATI Radeon HD 5800						.*ATI.*Radeon HD *58..					4	1	1	4.2
@@ -270,7 +282,7 @@ ATI FirePro 5000						.*ATI.*FirePro V5.*						3	1	0	0
 ATI FirePro 7000						.*ATI.*FirePro V7.*						3	1	0	0
 ATI FirePro M							.*ATI.*FirePro M.*						3	1	1	4.2
 ATI R300 (9700)							.*R300.*								0	1	1	2.1
-ATI Radeon								.*ATI.*(Diamond|Radeon).*				0	1	0	0
+ATI Radeon								.*ATI.*(Diamond|Radeon).*				0	1	0	4.2
 Intel X3100								.*Intel.*X3100.*						1	1	1	2.1
 Intel GMA 3600							.*Intel.* 3600.*						0	1	1	3
 Intel 830M								.*Intel.*830M							0	0	0	0
@@ -293,9 +305,9 @@ Intel Brookdale							.*Intel.*Brookdale.*					0	0	1	1.3
 Intel Cantiga							.*Intel.*Cantiga.*						0	0	1	2
 Intel Eaglelake							.*Intel.*Eaglelake.*					1	1	1	2
 Intel Graphics Media HD					.*Intel.*Graphics Media.*HD.*			1	1	1	2.1
-Intel HD Graphics 2000					.*Intel.*HD Graphics 2.*				2	1	0	0
+Intel HD Graphics 2000					.*Intel.*HD Graphics 2.*				2	1	0	4
 Intel HD Graphics 3000					.*Intel.*HD Graphics 3.*				3	1	1	3.1
-Intel HD Graphics 4000					.*Intel.*HD Graphics 4.*				3	1	1	3.3
+Intel HD Graphics 4000					.*Intel.*HD Graphics 4.*				3	1	1	4
 Intel HD2000							.*Intel.*HD2000.*						2	1	0	0
 Intel HD3000							.*Intel.*HD3000.*						3	1	0	0
 Intel HD Graphics						.*Intel.*HD Graphics.*					2	1	1	4
@@ -341,8 +353,8 @@ NVIDIA GT 325M							.*NVIDIA .*GT *32*M.*					3	1	1	3.3
 NVIDIA GT 330M							.*NVIDIA .*GT *33*M.*					3	1	1	3.3
 NVIDIA GT 340M							.*NVIDIA .*GT *34*M.*					4	1	1	3.3
 NVIDIA GTS 350M							.*NVIDIA .*GTS *35*M.*					4	1	1	3.3
-NVIDIA GTS 360M							.*NVIDIA .*GTS *36*M.*					5	1	1	3.3
-NVIDIA 405M								.*NVIDIA .* 40*M.*						2	1	0	0
+NVIDIA GTS 360M							.*NVIDIA .*GTS *360M.*					5	1	1	3.3
+NVIDIA 405M								.*NVIDIA .* 40*M.*						2	1	0	4.2
 NVIDIA 410M								.*NVIDIA .* 41*M.*						3	1	0	0
 NVIDIA GT 415M							.*NVIDIA .*GT *41*M.*					3	1	1	4.2
 NVIDIA GT 420M							.*NVIDIA .*GT *42*M.*					3	1	1	4.2
@@ -369,47 +381,51 @@ NVIDIA GTX 670M							.*NVIDIA .*GTX *67*M.*					5	1	1	4.2
 NVIDIA GTX 680M							.*NVIDIA .*GTX *68*M.*					5	1	0	0
 NVIDIA GTX 690M							.*NVIDIA .*GTX *69*M.*					5	1	0	0
 NVIDIA G100								.*NVIDIA .*G10.*						3	1	1	4.2
-NVIDIA GT 120							.*NVIDIA .*GT *12.*						2	1	0	0
-NVIDIA GT 130							.*NVIDIA .*GT *13.*						2	1	0	0
+NVIDIA GT 120							.*NVIDIA .*GT *12.*						2	1	0	3
+NVIDIA GT 130							.*NVIDIA .*GT *13.*						2	1	0	3.3
 NVIDIA GTS 150							.*NVIDIA .*GTS *15.*					2	1	0	0
-NVIDIA 205								.*NVIDIA .*GeForce 205.*				2	1	1	3.3
+NVIDIA 200								.*NVIDIA .*GeForce 20.*					2	1	1	3.3
+NVIDIA G200								.*NVIDIA .*GeForce G20.*				2	1	1	3.3
+NVIDIA G210								.*NVIDIA .*GeForce G210.*				3	1	1	3.3
 NVIDIA 210								.*NVIDIA .*GeForce 210.*				3	1	1	3.3
 NVIDIA GT 220							.*NVIDIA .*GT *22.*						2	1	1	3.3
 NVIDIA GT 230							.*NVIDIA .*GT *23.*						2	1	1	3.3
+NVIDIA GT 240							.*NVIDIA .*GT *24.*						4	1	1	3.3
 NVIDIA GTS 240							.*NVIDIA .*GTS *24.*					4	1	1	3.3
 NVIDIA GTS 250							.*NVIDIA .*GTS *25.*					4	1	1	3.3
 NVIDIA GTX 260							.*NVIDIA .*GTX *26.*					4	1	1	3.3
-NVIDIA GTX 270							.*NVIDIA .*GTX *27.*					4	1	0	0
+NVIDIA GTX 270							.*NVIDIA .*GTX *27.*					4	1	0	3.3
 NVIDIA GTX 280							.*NVIDIA .*GTX *28.*					4	1	1	3.3
-NVIDIA GTX 290							.*NVIDIA .*GTX *29.*					5	1	0	0
+NVIDIA GTX 290							.*NVIDIA .*GTX *29.*					5	1	0	3.3
 NVIDIA 310								.*NVIDIA .*GeForce 310.*				3	1	1	3.3
 NVIDIA 315								.*NVIDIA .*GeForce 315.*				3	1	1	3.3
-NVIDIA GT 320							.*NVIDIA .*GT *32.*						3	1	0	0
-NVIDIA GT 330							.*NVIDIA .*GT *33.*						3	1	0	0
+NVIDIA GT 320							.*NVIDIA .*GT *32.*						3	1	0	3.3
+NVIDIA GT 330							.*NVIDIA .*GT *33.*						3	1	0	3.3
 NVIDIA GT 340							.*NVIDIA .*GT *34.*						3	1	0	0
-NVIDIA 405								.*NVIDIA .* 405.*						3	1	0	0
+NVIDIA 405								.*NVIDIA .* 405.*						3	1	0	3.3
 NVIDIA GT 420							.*NVIDIA .*GT *42.*						3	1	1	4.2
-NVIDIA GT 430							.*NVIDIA .*GT *43.*						3	1	1	4.1
-NVIDIA GT 440							.*NVIDIA .*GT *44.*						4	1	0	0
+NVIDIA GT 430							.*NVIDIA .*GT *43.*						3	1	1	4.2
+NVIDIA GT 440							.*NVIDIA .*GT *44.*						4	1	0	4.2
 NVIDIA GTS 450							.*NVIDIA .*GTS *45.*					4	1	1	4.2
-NVIDIA GTX 460							.*NVIDIA .*GTX *46.*					5	1	1	4.2
+NVIDIA GTX 460							.*NVIDIA .*GTX *46.*					5	1	1	4.3
 NVIDIA GTX 470							.*NVIDIA .*GTX *47.*					5	1	1	4.2
 NVIDIA GTX 480							.*NVIDIA .*GTX *48.*					5	1	1	4.2
 NVIDIA 510								.*NVIDIA .* 510.*						3	1	0	0
 NVIDIA GT 520							.*NVIDIA .*GT *52.*						3	1	1	4.2
 NVIDIA GT 530							.*NVIDIA .*GT *53.*						3	1	1	4.2
 NVIDIA GT 540							.*NVIDIA .*GT *54.*						3	1	1	4.2
-NVIDIA GTX 550							.*NVIDIA .*GTX *55.*					5	1	1	4.2
+NVIDIA GTX 550							.*NVIDIA .*GTX *55.*					5	1	1	4.3
 NVIDIA GTX 560							.*NVIDIA .*GTX *56.*					5	1	1	4.2
 NVIDIA GTX 570							.*NVIDIA .*GTX *57.*					5	1	1	4.2
-NVIDIA GTX 580							.*NVIDIA .*GTX *58.*					5	1	1	4.2
+NVIDIA GTX 580							.*NVIDIA .*GTX *58.*					5	1	1	4.3
 NVIDIA GTX 590							.*NVIDIA .*GTX *59.*					5	1	1	4.2
 NVIDIA GT 610							.*NVIDIA .*GT *61.*						3	1	1	4.2
-NVIDIA GT 620							.*NVIDIA .*GT *62.*						3	1	0	0
-NVIDIA GT 630							.*NVIDIA .*GT *63.*						3	1	0	0
-NVIDIA GT 640							.*NVIDIA .*GT *64.*						3	1	0	0
+NVIDIA GT 620							.*NVIDIA .*GT *62.*						3	1	0	4.2
+NVIDIA GT 630							.*NVIDIA .*GT *63.*						3	1	0	4.2
+NVIDIA GT 640							.*NVIDIA .*GT *64.*						3	1	0	4.3
 NVIDIA GT 650							.*NVIDIA .*GT *65.*						3	1	1	4.2
-NVIDIA GTX 660							.*NVIDIA .*GTX *66.*					5	1	0	0
+NVIDIA GTX 650							.*NVIDIA .*GTX *65.*					3	1	1	4.2
+NVIDIA GTX 660							.*NVIDIA .*GTX *66.*					5	1	0	4.3
 NVIDIA GTX 670							.*NVIDIA .*GTX *67.*					5	1	1	4.2
 NVIDIA GTX 680							.*NVIDIA .*GTX *68.*					5	1	1	4.2
 NVIDIA GTX 690							.*NVIDIA .*GTX *69.*					5	1	1	4.2
@@ -443,8 +459,8 @@ NVIDIA GeForce 7600						.*NVIDIA .*GeForce 76.*					2	1	1	2.1
 NVIDIA GeForce 7800						.*NVIDIA .*GeForce 78.*					2	1	1	2.1
 NVIDIA GeForce 7900						.*NVIDIA .*GeForce 79.*					3	1	1	2.1
 NVIDIA GeForce 8100						.*NVIDIA .*GeForce 81.*					1	1	0	0
-NVIDIA GeForce 8200M					.*NVIDIA .*GeForce 8200M.*				1	1	0	0
-NVIDIA GeForce 8200						.*NVIDIA .*GeForce 82.*					1	1	0	0
+NVIDIA GeForce 8200M					.*NVIDIA .*GeForce 8200M.*				1	1	0	3.3
+NVIDIA GeForce 8200						.*NVIDIA .*GeForce 82.*					1	1	0	2.1
 NVIDIA GeForce 8300						.*NVIDIA .*GeForce 83.*					3	1	1	3.3
 NVIDIA GeForce 8400M					.*NVIDIA .*GeForce 8400M.*				1	1	1	3.3
 NVIDIA GeForce 8400						.*NVIDIA .*GeForce 84.*					2	1	1	3.3
@@ -456,9 +472,9 @@ NVIDIA GeForce 8700						.*NVIDIA .*GeForce 87.*					3	1	0	0
 NVIDIA GeForce 8800M					.*NVIDIA .*GeForce 8800M.*				2	1	1	3.3
 NVIDIA GeForce 8800						.*NVIDIA .*GeForce 88.*					3	1	1	3.3
 NVIDIA GeForce 9100M					.*NVIDIA .*GeForce 9100M.*				0	1	0	0
-NVIDIA GeForce 9100						.*NVIDIA .*GeForce 91.*					0	1	0	0
-NVIDIA GeForce 9200M					.*NVIDIA .*GeForce 9200M.*				1	1	0	0
-NVIDIA GeForce 9200						.*NVIDIA .*GeForce 92.*					1	1	0	0
+NVIDIA GeForce 9100						.*NVIDIA .*GeForce 91.*					0	1	0	3.3
+NVIDIA GeForce 9200M					.*NVIDIA .*GeForce 9200M.*				1	1	0	3.1
+NVIDIA GeForce 9200						.*NVIDIA .*GeForce 92.*					1	1	0	3.3
 NVIDIA GeForce 9300M					.*NVIDIA .*GeForce 9300M.*				1	1	1	3.3
 NVIDIA GeForce 9300						.*NVIDIA .*GeForce 93.*					1	1	1	3.3
 NVIDIA GeForce 9400M					.*NVIDIA .*GeForce 9400M.*				2	1	1	3.3
@@ -471,7 +487,7 @@ NVIDIA GeForce 9700M					.*NVIDIA .*GeForce 9700M.*				0	1	1	3.3
 NVIDIA GeForce 9800M					.*NVIDIA .*GeForce 9800M.*				2	1	1	3.3
 NVIDIA GeForce 9800						.*NVIDIA .*GeForce 98.*					3	1	1	3.3
 NVIDIA GeForce FX 5100					.*NVIDIA .*GeForce FX 51.*				0	1	0	0
-NVIDIA GeForce FX 5200					.*NVIDIA .*GeForce FX 52.*				0	1	0	0
+NVIDIA GeForce FX 5200					.*NVIDIA .*GeForce FX 52.*				0	1	0	2.1
 NVIDIA GeForce FX 5300					.*NVIDIA .*GeForce FX 53.*				0	1	0	0
 NVIDIA GeForce FX 5500					.*NVIDIA .*GeForce FX 55.*				0	1	1	2.1
 NVIDIA GeForce FX 5600					.*NVIDIA .*GeForce FX 56.*				1	1	1	2.1
@@ -506,7 +522,7 @@ NVIDIA D9M								.*NVIDIA .*D9M.*						1	1	0	0
 NVIDIA G94								.*NVIDIA .*G94.*						3	1	0	0
 NVIDIA GeForce Go 6						.*GeForce Go 6.*						1	1	0	0
 NVIDIA ION 2							.*NVIDIA .*ION 2.*						2	1	0	0
-NVIDIA ION 								.*NVIDIA Corporation.*ION.*				2	1	1	0
+NVIDIA ION 								.*NVIDIA Corporation.*ION.*				2	1	1	3.3
 NVIDIA NB8M								.*NVIDIA .*NB8M.*						1	1	0	0
 NVIDIA NB8P								.*NVIDIA .*NB8P.*						2	1	0	0
 NVIDIA NB9E								.*NVIDIA .*NB9E.*						3	1	0	0
@@ -514,7 +530,7 @@ NVIDIA NB9M								.*NVIDIA .*NB9M.*						1	1	0	0
 NVIDIA NB9P								.*NVIDIA .*NB9P.*						2	1	0	0
 NVIDIA N10								.*NVIDIA .*N10.*						1	1	0	0
 NVIDIA GeForce PCX						.*GeForce PCX.*							0	1	0	0
-NVIDIA Generic							.*NVIDIA .*Unknown.*					0	0	0	0
+NVIDIA Generic							.*NVIDIA .*Unknown.*					0	0	0	3
 NVIDIA NV17								.*NVIDIA .*NV17.*						0	1	0	0
 NVIDIA NV34								.*NVIDIA .*NV34.*						0	1	0	0
 NVIDIA NV35								.*NVIDIA .*NV35.*						0	1	0	0
@@ -522,7 +538,7 @@ NVIDIA NV36								.*NVIDIA .*NV36.*						1	1	0	0
 NVIDIA NV41								.*NVIDIA .*NV41.*						1	1	0	0
 NVIDIA NV43								.*NVIDIA .*NV43.*						1	1	0	0
 NVIDIA NV44								.*NVIDIA .*NV44.*						1	1	0	0
-NVIDIA nForce							.*NVIDIA .*nForce.*						0	0	0	0
+NVIDIA nForce							.*NVIDIA .*nForce.*						0	0	0	3.3
 NVIDIA MCP51							.*NVIDIA .*MCP51.*						1	1	0	0
 NVIDIA MCP61							.*NVIDIA .*MCP61.*						1	1	0	0
 NVIDIA MCP67							.*NVIDIA .*MCP67.*						1	1	0	0
@@ -533,40 +549,40 @@ NVIDIA MCP78							.*NVIDIA .*MCP78.*						1	1	0	0
 NVIDIA MCP79							.*NVIDIA .*MCP79.*						1	1	0	0
 NVIDIA MCP7A							.*NVIDIA .*MCP7A.*						1	1	0	0
 NVIDIA Quadro2							.*Quadro2.*								0	1	0	0
-NVIDIA Quadro 1000M						.*Quadro.*1000M.*						2	1	0	0
-NVIDIA Quadro 2000 M/D					.*Quadro.*2000.*						3	1	0	0
+NVIDIA Quadro 1000M						.*Quadro.*1000M.*						2	1	0	4.2
+NVIDIA Quadro 2000 M/D					.*Quadro.*2000.*						3	1	0	4.2
 NVIDIA Quadro 3000M						.*Quadro.*3000M.*						3	1	0	0
 NVIDIA Quadro 4000M						.*Quadro.*4000M.*						3	1	0	0
-NVIDIA Quadro 4000						.*Quadro *4000.*						3	1	0	0
+NVIDIA Quadro 4000						.*Quadro *4000.*						3	1	0	4.2
 NVIDIA Quadro 50x0 M					.*Quadro.*50.0.*						3	1	0	0
 NVIDIA Quadro 6000						.*Quadro.*6000.*						3	1	0	0
-NVIDIA Quadro 400						.*Quadro.*400.*							2	1	0	0
-NVIDIA Quadro 600						.*Quadro.*600.*							2	1	0	0
+NVIDIA Quadro 400						.*Quadro.*400.*							2	1	0	3.3
+NVIDIA Quadro 600						.*Quadro.*600.*							2	1	0	3.3
 NVIDIA Quadro4							.*Quadro4.*								0	1	0	0
 NVIDIA Quadro DCC						.*Quadro DCC.*							0	1	0	0
 NVIDIA Quadro CX						.*Quadro.*CX.*							3	1	0	0
 NVIDIA Quadro FX 770M					.*Quadro.*FX *770M.*					2	1	0	0
-NVIDIA Quadro FX 1500M					.*Quadro.*FX *1500M.*					1	1	0	0
+NVIDIA Quadro FX 1500M					.*Quadro.*FX *1500M.*					1	1	0	2.1
 NVIDIA Quadro FX 1600M					.*Quadro.*FX *1600M.*					2	1	0	0
 NVIDIA Quadro FX 2500M					.*Quadro.*FX *2500M.*					2	1	0	0
 NVIDIA Quadro FX 2700M					.*Quadro.*FX *2700M.*					3	1	0	0
-NVIDIA Quadro FX 2800M					.*Quadro.*FX *2800M.*					3	1	0	0
-NVIDIA Quadro FX 3500					.*Quadro.*FX *3500.*					2	1	0	0
+NVIDIA Quadro FX 2800M					.*Quadro.*FX *2800M.*					3	1	0	3.3
+NVIDIA Quadro FX 3500					.*Quadro.*FX *3500.*					2	1	0	2.1
 NVIDIA Quadro FX 3600					.*Quadro.*FX *3600.*					3	1	0	0
-NVIDIA Quadro FX 3700					.*Quadro.*FX *3700.*					3	1	0	0
-NVIDIA Quadro FX 3800					.*Quadro.*FX *3800.*					3	1	0	0
+NVIDIA Quadro FX 3700					.*Quadro.*FX *3700.*					3	1	0	3.3
+NVIDIA Quadro FX 3800					.*Quadro.*FX *3800.*					3	1	0	3.2
 NVIDIA Quadro FX 4500					.*Quadro.*FX *45.*						3	1	0	0
-NVIDIA Quadro FX 880M					.*Quadro.*FX *880M.*					3	1	0	0
+NVIDIA Quadro FX 880M					.*Quadro.*FX *880M.*					3	1	0	3.3
 NVIDIA Quadro FX 4800					.*NVIDIA .*Quadro *FX *4800.*			3	1	0	0
-NVIDIA Quadro FX						.*Quadro FX.*							1	1	0	0
-NVIDIA Quadro NVS 1xxM					.*Quadro NVS *1.[05]M.*					0	1	1	2.1
+NVIDIA Quadro FX						.*Quadro FX.*							1	1	0	3.3
+NVIDIA Quadro NVS 1xxM					.*Quadro NVS *1.[05]M.*					0	1	1	3.3
 NVIDIA Quadro NVS 300M					.*NVIDIA .*NVS *300M.*					2	1	0	0
 NVIDIA Quadro NVS 320M					.*NVIDIA .*NVS *320M.*					2	1	0	0
 NVIDIA Quadro NVS 2100M					.*NVIDIA .*NVS *2100M.*					2	1	0	0
 NVIDIA Quadro NVS 3100M					.*NVIDIA .*NVS *3100M.*					2	1	0	0
-NVIDIA Quadro NVS 4200M					.*NVIDIA .*NVS *4200M.*					2	1	0	0
+NVIDIA Quadro NVS 4200M					.*NVIDIA .*NVS *4200M.*					2	1	0	4.1
 NVIDIA Quadro NVS 5100M					.*NVIDIA .*NVS *5100M.*					2	1	0	0
-NVIDIA Quadro NVS						.*NVIDIA .*NVS							0	1	0	0
+NVIDIA Quadro NVS						.*NVIDIA .*NVS							0	1	0	3.2
 NVIDIA Corporation N12P					.*NVIDIA .*N12P.*						1	1	1	4.1
 NVIDIA Corporation N11M					.*NVIDIA .*N11M.*						2	1	0	0
 NVIDIA RIVA TNT							.*RIVA TNT.*							0	0	0	0
@@ -580,5 +596,3 @@ Apple Generic							Apple.*Generic.*						0	0	0	0
 Apple Software Renderer					Apple.*Software Renderer.*				0	0	0	0
 Humper									Humper.*								0	1	1	2.1
 PowerVR SGX545							.*PowerVR SGX.*							1	1	1	3
-
-
diff --git a/indra/newview/llfeaturemanager.cpp b/indra/newview/llfeaturemanager.cpp
index 6f11d4d4ca..36bf5a6842 100644
--- a/indra/newview/llfeaturemanager.cpp
+++ b/indra/newview/llfeaturemanager.cpp
@@ -419,7 +419,7 @@ void LLFeatureManager::parseGPUTable(std::string filename)
 
 		// setup the tokenizer
 		std::string buf(buffer);
-		std::string cls, label, expr, supported;
+		std::string cls, label, expr, supported, stats_based, expected_gl_version;
 		boost_tokenizer tokens(buf, boost::char_separator<char>("\t\n"));
 		boost_tokenizer::iterator token_iter = tokens.begin();
 
@@ -440,6 +440,14 @@ void LLFeatureManager::parseGPUTable(std::string filename)
 		{
 			supported = *token_iter++;
 		}
+		if (token_iter != tokens.end())
+		{
+			stats_based = *token_iter++;
+		}
+		if (token_iter != tokens.end())
+		{
+			expected_gl_version = *token_iter++;
+		}
 
 		if (label.empty() || expr.empty() || cls.empty() || supported.empty())
 		{
@@ -450,7 +458,9 @@ void LLFeatureManager::parseGPUTable(std::string filename)
 		json << "{'label' : '" << label << "',\n" << 
 			"'regexp' : '" << expr << "',\n" <<
 			"'class' : '" << cls << "',\n" <<
-			"'supported' : '" << supported << "'\n},\n";
+			"'supported' : '" << supported << "',\n" <<
+			"'stats_based' : " << stats_based <<  ",\n" <<
+			"'gl_version' : " << expected_gl_version << "\n},\n";
 #endif
 
 		for (U32 i = 0; i < expr.length(); i++)	 /*Flawfinder: ignore*/
-- 
cgit v1.2.3


From 34558181c7fad95c235bca1e29c282ca09d136ba Mon Sep 17 00:00:00 2001
From: Gilbert Gonzales <gilbert@lindenlab.com>
Date: Tue, 11 Dec 2012 17:49:43 -0800
Subject: CHUI-545: Problem: Sometimes the speaker indicator icons were not
 visible in the conversations panel. Resolution: The problem was that the
 visibility was set incorrectly. When the speaking indicator was not in the
 visible chain the state of the visiblity would be stored in a pending
 variable. If the visiblity changed before the pending variable was used, then
 this meant the pending variable overrode the most recent visibiltiy changes.
 So as a solution, if the visiblity changes then prevent the pending visiblity
 from being used.

---
 indra/newview/lloutputmonitorctrl.cpp | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

(limited to 'indra')

diff --git a/indra/newview/lloutputmonitorctrl.cpp b/indra/newview/lloutputmonitorctrl.cpp
index e4621a7fc3..27c552b626 100644
--- a/indra/newview/lloutputmonitorctrl.cpp
+++ b/indra/newview/lloutputmonitorctrl.cpp
@@ -333,7 +333,9 @@ void LLOutputMonitorCtrl::switchIndicator(bool switch_on)
 		LL_DEBUGS("SpeakingIndicator") << "Indicator is in visible chain, notifying parent: " << mSpeakerId << LL_ENDL;
 		setVisible((BOOL)switch_on);
 		notifyParentVisibilityChanged();
-	}
+	    //Visibility has just been updated so make sure not to use the pending visibility when ::draw executes (if one is pending)
+        mIsSwitchDirty = false;
+    }
 
 	// otherwise remember necessary state and mark itself as dirty.
 	// State will be applied in next draw when parents chain becomes visible.
-- 
cgit v1.2.3


From 3d7aaaada853d950888a2fd0fe3e2f375bd5bbb0 Mon Sep 17 00:00:00 2001
From: "maxim@mnikolenko" <maxim@mnikolenko>
Date: Wed, 12 Dec 2012 13:14:52 +0200
Subject: CHUI-427 FIXED Added callback to track changing in mUserPTTState.
 It's needed to synchronize both buttons

---
 indra/newview/llfloaterimcontainer.cpp  | 7 ++++++-
 indra/newview/llfloaterimcontainer.h    | 1 +
 indra/newview/llfloaterimsessiontab.cpp | 1 -
 indra/newview/llvoiceclient.cpp         | 1 +
 indra/newview/llvoiceclient.h           | 6 ++++++
 5 files changed, 14 insertions(+), 2 deletions(-)

(limited to 'indra')

diff --git a/indra/newview/llfloaterimcontainer.cpp b/indra/newview/llfloaterimcontainer.cpp
index cc053ca658..75b311eecf 100644
--- a/indra/newview/llfloaterimcontainer.cpp
+++ b/indra/newview/llfloaterimcontainer.cpp
@@ -88,6 +88,11 @@ LLFloaterIMContainer::~LLFloaterIMContainer()
 	mNewMessageConnection.disconnect();
 	LLTransientFloaterMgr::getInstance()->removeControlView(LLTransientFloaterMgr::IM, this);
 
+	if (mMicroChangedSignal.connected())
+	{
+		mMicroChangedSignal.disconnect();
+	}
+
 	gSavedPerAccountSettings.setBOOL("ConversationsListPaneCollapsed", mConversationsPane->isCollapsed());
 	gSavedPerAccountSettings.setBOOL("ConversationsMessagePaneCollapsed", mMessagesPane->isCollapsed());
 
@@ -213,7 +218,7 @@ BOOL LLFloaterIMContainer::postBuild()
 	collapseMessagesPane(gSavedPerAccountSettings.getBOOL("ConversationsMessagePaneCollapsed"));
 	collapseConversationsPane(gSavedPerAccountSettings.getBOOL("ConversationsListPaneCollapsed"));
 	LLAvatarNameCache::addUseDisplayNamesCallback(boost::bind(&LLFloaterIMSessionTab::processChatHistoryStyleUpdate));
-
+	mMicroChangedSignal = LLVoiceClient::getInstance()->MicroChangedCallback(boost::bind(&LLFloaterIMContainer::updateSpeakBtnState, this));
 	if (! mMessagesPane->isCollapsed())
 	{
 		S32 list_width = gSavedPerAccountSettings.getS32("ConversationsListPaneWidth");
diff --git a/indra/newview/llfloaterimcontainer.h b/indra/newview/llfloaterimcontainer.h
index 3818645037..4f1bb96d9b 100644
--- a/indra/newview/llfloaterimcontainer.h
+++ b/indra/newview/llfloaterimcontainer.h
@@ -176,6 +176,7 @@ public:
 	void updateSpeakBtnState();
 	static bool isConversationLoggingAllowed();
 	void flashConversationItemWidget(const LLUUID& session_id, bool is_flashes);
+	boost::signals2::connection mMicroChangedSignal;
 
 private:
 	LLConversationViewSession* createConversationItemWidget(LLConversationItem* item);
diff --git a/indra/newview/llfloaterimsessiontab.cpp b/indra/newview/llfloaterimsessiontab.cpp
index 4c6d8fa5a0..0eb0289f49 100644
--- a/indra/newview/llfloaterimsessiontab.cpp
+++ b/indra/newview/llfloaterimsessiontab.cpp
@@ -693,7 +693,6 @@ void LLFloaterIMSessionTab::updateCallBtnState(bool callIsActive)
 	voiceButton->setToolTip(
 			callIsActive? getString("end_call_button_tooltip") : getString("start_call_button_tooltip"));
 
-	LLFloaterIMContainer::getInstance()->updateSpeakBtnState();
 	enableDisableCallBtn();
 
 }
diff --git a/indra/newview/llvoiceclient.cpp b/indra/newview/llvoiceclient.cpp
index 730f022c50..dd529d74e9 100644
--- a/indra/newview/llvoiceclient.cpp
+++ b/indra/newview/llvoiceclient.cpp
@@ -551,6 +551,7 @@ void LLVoiceClient::setUserPTTState(bool ptt)
 {
 	mUserPTTState = ptt;
 	updateMicMuteLogic();
+	mMicroChangedSignal();
 }
 
 bool LLVoiceClient::getUserPTTState()
diff --git a/indra/newview/llvoiceclient.h b/indra/newview/llvoiceclient.h
index c9aeea35a9..714dd6a9f2 100644
--- a/indra/newview/llvoiceclient.h
+++ b/indra/newview/llvoiceclient.h
@@ -303,6 +303,9 @@ public:
 	LLVoiceClient();	
 	~LLVoiceClient();
 
+	typedef boost::signals2::signal<void(void)> micro_changed_signal_t;
+	micro_changed_signal_t mMicroChangedSignal;
+
 	void init(LLPumpIO *pump);	// Call this once at application startup (creates connector)
 	void terminate();	// Call this to clean up during shutdown
 	
@@ -401,6 +404,8 @@ public:
 	void keyUp(KEY key, MASK mask);
 	void middleMouseState(bool down);
 	
+	boost::signals2::connection MicroChangedCallback(const micro_changed_signal_t::slot_type& cb ) { return mMicroChangedSignal.connect(cb); }
+
 	
 	/////////////////////////////
 	// Accessors for data related to nearby speakers
@@ -456,6 +461,7 @@ protected:
 	LLVoiceModuleInterface* mVoiceModule;
 	LLPumpIO *m_servicePump;
 
+
 	LLCachedControl<bool> mVoiceEffectEnabled;
 	LLCachedControl<std::string> mVoiceEffectDefault;
 
-- 
cgit v1.2.3


From 9275379e3ce20f6a27341e595481ce57c3a6b954 Mon Sep 17 00:00:00 2001
From: AlexanderP ProductEngine <apaschenko@productengine.com>
Date: Wed, 12 Dec 2012 18:59:24 +0200
Subject: CHUI-584 : WIP : Viewer crash when clicking on view/sort options drop
 down in conversation floater: Renaming of local vfriables in accordance with
 the code convention

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

(limited to 'indra')

diff --git a/indra/newview/llfloaterimcontainer.cpp b/indra/newview/llfloaterimcontainer.cpp
index 75b311eecf..5d41f46b3f 100644
--- a/indra/newview/llfloaterimcontainer.cpp
+++ b/indra/newview/llfloaterimcontainer.cpp
@@ -891,37 +891,37 @@ void LLFloaterIMContainer::getSelectedUUIDs(uuid_vec_t& selected_uuids)
 
 const LLConversationItem * LLFloaterIMContainer::getCurSelectedViewModelItem()
 {
-    LLConversationItem * conversationItem = NULL;
+    LLConversationItem * conversation_item = NULL;
 
     if(mConversationsRoot && 
         mConversationsRoot->getCurSelectedItem() && 
         mConversationsRoot->getCurSelectedItem()->getViewModelItem())
     {
-		LLFloaterIMSessionTab *selectedSession = LLFloaterIMSessionTab::getConversation(mSelectedSession);
-		if (selectedSession && selectedSession->isTornOff())
+		LLFloaterIMSessionTab *selected_session_floater = LLFloaterIMSessionTab::getConversation(mSelectedSession);
+		if (selected_session_floater && !selected_session_floater->getHost())
 		{
-			conversationItem = selectedSession->getCurSelectedViewModelItem();
+			conversation_item = selected_session_floater->getCurSelectedViewModelItem();
 		}
 		else
 		{
-			conversationItem = static_cast<LLConversationItem *>(mConversationsRoot->getCurSelectedItem()->getViewModelItem());
+			conversation_item = static_cast<LLConversationItem *>(mConversationsRoot->getCurSelectedItem()->getViewModelItem());
 		}
 	}
 
-    return conversationItem;
+    return conversation_item;
 }
 
 void LLFloaterIMContainer::getParticipantUUIDs(uuid_vec_t& selected_uuids)
 {
     //Find the conversation floater associated with the selected id
-    const LLConversationItem * conversationItem = getCurSelectedViewModelItem();
+    const LLConversationItem * conversation_item = getCurSelectedViewModelItem();
 
     if(conversationItem->getType() == LLConversationItem::CONV_PARTICIPANT)
     {
         getSelectedUUIDs(selected_uuids);
     }
     //When a one-on-one conversation exists, retrieve the participant id from the conversation floater
-    else if(conversationItem->getType() == LLConversationItem::CONV_SESSION_1_ON_1)
+    else if(conversation_item->getType() == LLConversationItem::CONV_SESSION_1_ON_1)
     {
         LLFloaterIMSession *conversationFloater = LLFloaterIMSession::findInstance(conversationItem->getUUID());
         LLUUID participantID = conversationFloater->getOtherParticipantUUID();
-- 
cgit v1.2.3


From 322fb006306524481ee09e88a079457b86fcd95a Mon Sep 17 00:00:00 2001
From: AlexanderP ProductEngine <apaschenko@productengine.com>
Date: Wed, 12 Dec 2012 19:05:40 +0200
Subject: CHUI-584 : Fixed : Viewer crash when clicking on view/sort options
 drop down in conversation floater: Protection from a lack of the current
 selection. It need for the newly created floater, which still is not finished
 adding the first conversation item.

---
 indra/newview/llfloaterimcontainer.cpp | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

(limited to 'indra')

diff --git a/indra/newview/llfloaterimcontainer.cpp b/indra/newview/llfloaterimcontainer.cpp
index 5d41f46b3f..82bcd8efa4 100644
--- a/indra/newview/llfloaterimcontainer.cpp
+++ b/indra/newview/llfloaterimcontainer.cpp
@@ -916,7 +916,12 @@ void LLFloaterIMContainer::getParticipantUUIDs(uuid_vec_t& selected_uuids)
     //Find the conversation floater associated with the selected id
     const LLConversationItem * conversation_item = getCurSelectedViewModelItem();
 
-    if(conversationItem->getType() == LLConversationItem::CONV_PARTICIPANT)
+	if (NULL == conversation_item)
+	{
+		return;
+	}
+
+    if (conversation_item->getType() == LLConversationItem::CONV_PARTICIPANT)
     {
         getSelectedUUIDs(selected_uuids);
     }
-- 
cgit v1.2.3


From 4c20cc3e46d0392c63ecec304858493c8f59059b Mon Sep 17 00:00:00 2001
From: AlexanderP ProductEngine <apaschenko@productengine.com>
Date: Wed, 12 Dec 2012 18:53:06 +0200
Subject: CHUI-584 : Addit. fix : Viewer crash when clicking on view/sort
 options drop down in conversation floater: Cancelled unconditional receiving
 a instance of the floater (LLFloaterReg::getInstance()) from
 LLFloaterIMContainer::selectConversationPair(), because in some situations
 this method is called from LLFloaterIMNearbyChat::postBuild() - In other
 words, while the unfinished process of creation of this floater

---
 indra/newview/llfloaterimcontainer.cpp | 57 ++++++++++++++++++----------------
 1 file changed, 31 insertions(+), 26 deletions(-)

(limited to 'indra')

diff --git a/indra/newview/llfloaterimcontainer.cpp b/indra/newview/llfloaterimcontainer.cpp
index 82bcd8efa4..3a5f2ae854 100644
--- a/indra/newview/llfloaterimcontainer.cpp
+++ b/indra/newview/llfloaterimcontainer.cpp
@@ -928,9 +928,9 @@ void LLFloaterIMContainer::getParticipantUUIDs(uuid_vec_t& selected_uuids)
     //When a one-on-one conversation exists, retrieve the participant id from the conversation floater
     else if(conversation_item->getType() == LLConversationItem::CONV_SESSION_1_ON_1)
     {
-        LLFloaterIMSession *conversationFloater = LLFloaterIMSession::findInstance(conversationItem->getUUID());
-        LLUUID participantID = conversationFloater->getOtherParticipantUUID();
-        selected_uuids.push_back(participantID);
+        LLFloaterIMSession * conversation_floaterp = LLFloaterIMSession::findInstance(conversation_item->getUUID());
+        LLUUID participant_id = conversation_floaterp->getOtherParticipantUUID();
+        selected_uuids.push_back(participant_id);
     }    
 }
 
@@ -1239,13 +1239,13 @@ void LLFloaterIMContainer::showConversation(const LLUUID& session_id)
 void LLFloaterIMContainer::selectConversation(const LLUUID& session_id)
 {
     selectConversationPair(session_id, true);
-	}
+}
 
 // Synchronous select the conversation item and the conversation floater
 BOOL LLFloaterIMContainer::selectConversationPair(const LLUUID& session_id, bool select_widget)
 {
     BOOL handled = TRUE;
-    LLFloaterIMSessionTab* session_floater = LLFloaterIMSessionTab::getConversation(session_id);
+    LLFloaterIMSessionTab* session_floater = LLFloaterIMSessionTab::findConversation(session_id);
 
     /* widget processing */
     if (select_widget)
@@ -1259,26 +1259,29 @@ BOOL LLFloaterIMContainer::selectConversationPair(const LLUUID& session_id, bool
 
     /* floater processing */
 
-    if (session_id != getSelectedSession())
-    {
-        // Store the active session
-        setSelectedSession(session_id);
+	if (NULL != session_floater)
+	{
+		if (session_id != getSelectedSession())
+		{
+			// Store the active session
+			setSelectedSession(session_id);
 
 		
 
-		if (session_floater->getHost())
-		{
-			// Always expand the message pane if the panel is hosted by the container
-			collapseMessagesPane(false);
-			// Switch to the conversation floater that is being selected
-			selectFloater(session_floater);
+			if (session_floater->getHost())
+			{
+				// Always expand the message pane if the panel is hosted by the container
+				collapseMessagesPane(false);
+				// Switch to the conversation floater that is being selected
+				selectFloater(session_floater);
+			}
 		}
-    }
 
-	// Set the focus on the selected floater
-	if (!session_floater->hasFocus())
-	{
-		session_floater->setFocus(TRUE);
+		// Set the focus on the selected floater
+		if (!session_floater->hasFocus())
+		{
+			session_floater->setFocus(TRUE);
+		}
 	}
 
     return handled;
@@ -1388,12 +1391,14 @@ LLConversationItem* LLFloaterIMContainer::addConversationListItem(const LLUUID&
 	// set the widget to minimized mode if conversations pane is collapsed
 	widget->toggleCollapsedMode(mConversationsPane->isCollapsed());
 
-    if (isWidgetSelected)
-    {
-        selectConversation(uuid);
-        // scroll to newly added item
-        mConversationsRoot->scrollToShowSelection();
-    }
+	if (isWidgetSelected || 0 == mConversationsRoot->getSelectedCount())
+	{
+		selectConversationPair(uuid, true);
+		widget->requestArrange();
+
+		// scroll to newly added item
+		mConversationsRoot->scrollToShowSelection();
+	}
 
 	return item;
 }
-- 
cgit v1.2.3


From 89671fa1ad4ef13acb264d0e047fb24b9ee5d8a4 Mon Sep 17 00:00:00 2001
From: Gilbert Gonzales <gilbert@lindenlab.com>
Date: Wed, 12 Dec 2012 16:59:57 -0800
Subject: CHUI-545: Adjusted fix because the old implementation of
 ::switchIndicator was not very clean and relied on the visiblity of the
 OutputMonitorCtrl to have a visibility of true even when it wasn't. The fix
 implemented makes it so that the visibility of OutputMonitorCtrl is always
 correct and the parent of this ctrl can use this information to adjust
 children adjacent to OutputMonitorCtrl.

---
 indra/newview/llavatarlistitem.cpp    | 11 +++++++
 indra/newview/llavatarlistitem.h      |  1 +
 indra/newview/lloutputmonitorctrl.cpp | 61 +++++++++++------------------------
 indra/newview/lloutputmonitorctrl.h   |  6 ++--
 4 files changed, 34 insertions(+), 45 deletions(-)

(limited to 'indra')

diff --git a/indra/newview/llavatarlistitem.cpp b/indra/newview/llavatarlistitem.cpp
index 84e177d4a4..e52677925e 100644
--- a/indra/newview/llavatarlistitem.cpp
+++ b/indra/newview/llavatarlistitem.cpp
@@ -141,6 +141,17 @@ BOOL  LLAvatarListItem::postBuild()
 	return TRUE;
 }
 
+void LLAvatarListItem::handleVisibilityChange ( BOOL new_visibility )
+{
+    //Adjust positions of icons (info button etc) when 
+    //speaking indicator visibility was changed/toggled while panel was closed (not visible)
+    if(new_visibility && mSpeakingIndicator->getIndicatorToggled())
+    {
+        updateChildren();
+        mSpeakingIndicator->setIndicatorToggled(false);
+    }
+}
+
 void LLAvatarListItem::fetchAvatarName()
 {
 	if (mAvatarNameCacheConnection.connected())
diff --git a/indra/newview/llavatarlistitem.h b/indra/newview/llavatarlistitem.h
index 41853b6b51..96aed20016 100644
--- a/indra/newview/llavatarlistitem.h
+++ b/indra/newview/llavatarlistitem.h
@@ -84,6 +84,7 @@ public:
 	/**
 	 * Processes notification from speaker indicator to update children when indicator's visibility is changed.
 	 */
+    virtual void handleVisibilityChange ( BOOL new_visibility );
 	virtual S32	notifyParent(const LLSD& info);
 	virtual void onMouseLeave(S32 x, S32 y, MASK mask);
 	virtual void onMouseEnter(S32 x, S32 y, MASK mask);
diff --git a/indra/newview/lloutputmonitorctrl.cpp b/indra/newview/lloutputmonitorctrl.cpp
index 27c552b626..88a52caf27 100644
--- a/indra/newview/lloutputmonitorctrl.cpp
+++ b/indra/newview/lloutputmonitorctrl.cpp
@@ -73,8 +73,7 @@ LLOutputMonitorCtrl::LLOutputMonitorCtrl(const LLOutputMonitorCtrl::Params& p)
 	mAutoUpdate(p.auto_update),
 	mSpeakerId(p.speaker_id),
 	mIsAgentControl(false),
-	mIsSwitchDirty(false),
-	mShouldSwitchOn(false),
+	mIndicatorToggled(false),
 	mShowParticipantsSpeaking(false)
 {
 	//static LLUIColor output_monitor_muted_color = LLUIColorTable::instance().getColor("OutputMonitorMutedColor", LLColor4::orange);
@@ -116,26 +115,6 @@ void LLOutputMonitorCtrl::setPower(F32 val)
 
 void LLOutputMonitorCtrl::draw()
 {
-	// see also switchIndicator()
-	if (mIsSwitchDirty)
-	{
-		mIsSwitchDirty = false;
-		if (mShouldSwitchOn)
-		{
-			// just notify parent visibility may have changed
-			notifyParentVisibilityChanged();
-		}
-		else
-		{
-			// make itself invisible and notify parent about this
-			setVisible(FALSE);
-			notifyParentVisibilityChanged();
-
-			// no needs to render for invisible element
-			return;
-		}
-	}
-
 	// Copied from llmediaremotectrl.cpp
 	// *TODO: Give the LLOutputMonitorCtrl an agent-id to monitor, then
 	// call directly into LLVoiceClient::getInstance() to ask if that agent-id is muted, is
@@ -323,28 +302,26 @@ void LLOutputMonitorCtrl::onChange()
 // virtual
 void LLOutputMonitorCtrl::switchIndicator(bool switch_on)
 {
-	// ensure indicator is visible in case it is not in visible chain
-	// to be called when parent became visible next time to notify parent that visibility is changed.
-	setVisible(TRUE);
 
-	// if parent is in visible chain apply switch_on state and notify it immediately
-	if (getParent() && getParent()->isInVisibleChain())
-	{
-		LL_DEBUGS("SpeakingIndicator") << "Indicator is in visible chain, notifying parent: " << mSpeakerId << LL_ENDL;
-		setVisible((BOOL)switch_on);
-		notifyParentVisibilityChanged();
-	    //Visibility has just been updated so make sure not to use the pending visibility when ::draw executes (if one is pending)
-        mIsSwitchDirty = false;
-    }
+    if(getVisible() != (BOOL)switch_on)
+    {
+        setVisible(switch_on);
+        
+        //Let parent adjust positioning of icons adjacent to speaker indicator
+        //(when speaker indicator hidden, adjacent icons move to right and when speaker
+        //indicator visible, adjacent icons move to the left) 
+        if (getParent() && getParent()->isInVisibleChain())
+        {
+            notifyParentVisibilityChanged();
+        }
+        else
+        {
+            //Makes sure to only adjust adjacent icons when parent becomes visible
+            //(!mIndicatorToggled ensures that changes of TFT and FTF are discarded, real state changes are TF or FT)
+            mIndicatorToggled = !mIndicatorToggled;
+        }
 
-	// otherwise remember necessary state and mark itself as dirty.
-	// State will be applied in next draw when parents chain becomes visible.
-	else
-	{
-		LL_DEBUGS("SpeakingIndicator") << "Indicator is not in visible chain, parent won't be notified: " << mSpeakerId << LL_ENDL;
-		mIsSwitchDirty = true;
-		mShouldSwitchOn = switch_on;
-	}
+    }
 }
 
 //////////////////////////////////////////////////////////////////////////
diff --git a/indra/newview/lloutputmonitorctrl.h b/indra/newview/lloutputmonitorctrl.h
index 1fa6ef41f8..7671a736d6 100644
--- a/indra/newview/lloutputmonitorctrl.h
+++ b/indra/newview/lloutputmonitorctrl.h
@@ -108,6 +108,8 @@ public:
 	 * It will be applied in next draw and parent will be notified.
 	 */
 	virtual void	switchIndicator(bool switch_on);
+    bool getIndicatorToggled() { return mIndicatorToggled;}
+    void setIndicatorToggled(bool value) { mIndicatorToggled = value;}
 
 private:
 
@@ -148,9 +150,7 @@ private:
 	/** uuid of a speaker being monitored */
 	LLUUID			mSpeakerId;
 
-	/** indicates if the instance is dirty and should notify parent */
-	bool			mIsSwitchDirty;
-	bool			mShouldSwitchOn;
+    bool mIndicatorToggled;
 };
 
 #endif
-- 
cgit v1.2.3


From 37e95e837968935fba1744ec59b3fdd32b7034bf Mon Sep 17 00:00:00 2001
From: Gilbert Gonzales <gilbert@lindenlab.com>
Date: Wed, 12 Dec 2012 17:43:15 -0800
Subject: CHUI-545: Minor logic fix, inside ::switchIndicator(), make sure that
 in the case that the parent is visible and the parent makes the visibility
 changes...that mIndicatorToggled becomes false because the parent has already
 made the visiblity changes.

---
 indra/newview/lloutputmonitorctrl.cpp | 2 ++
 1 file changed, 2 insertions(+)

(limited to 'indra')

diff --git a/indra/newview/lloutputmonitorctrl.cpp b/indra/newview/lloutputmonitorctrl.cpp
index 88a52caf27..02841e9831 100644
--- a/indra/newview/lloutputmonitorctrl.cpp
+++ b/indra/newview/lloutputmonitorctrl.cpp
@@ -313,6 +313,8 @@ void LLOutputMonitorCtrl::switchIndicator(bool switch_on)
         if (getParent() && getParent()->isInVisibleChain())
         {
             notifyParentVisibilityChanged();
+            //Ignore toggled state in case it was set when parent visibility was hidden
+            mIndicatorToggled = false;
         }
         else
         {
-- 
cgit v1.2.3


From b6f3c4d07e96f3529f048a93863aa9b0f28cbad4 Mon Sep 17 00:00:00 2001
From: Gilbert Gonzales <gilbert@lindenlab.com>
Date: Wed, 12 Dec 2012 18:02:13 -0800
Subject: CHUI-526: Slight bug fix. Problem was that the 'Teleport Offer' sound
 was turn on by default when the user cleared their settings. Resolution:
 Inside settings.xml changed the PlaySoundTeleportOffer to no longer have an
 intial value of 1 (true). Now it is 0 (false).

---
 indra/newview/app_settings/settings.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

(limited to 'indra')

diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml
index 3e0de834b4..24fa0a0cd4 100755
--- a/indra/newview/app_settings/settings.xml
+++ b/indra/newview/app_settings/settings.xml
@@ -6909,7 +6909,7 @@
       <key>Type</key>
       <string>Boolean</string>
       <key>Value</key>
-      <integer>1</integer>
+      <integer>0</integer>
     </map>
     <key>PluginAttachDebuggerToPlugins</key>
     <map>
-- 
cgit v1.2.3


From be6f3286f4a969a4de73d8f3af7b8262fe70bfb9 Mon Sep 17 00:00:00 2001
From: AlexanderP ProductEngine <apaschenko@productengine.com>
Date: Thu, 13 Dec 2012 18:43:52 +0200
Subject: Fixed path for correct assembly of the project

---
 indra/newview/llavatariconctrl.h     | 2 +-
 indra/newview/llconversationmodel.h  | 4 ++--
 indra/newview/llconversationview.h   | 4 ++--
 indra/newview/llfloaterimcontainer.h | 6 +++---
 indra/newview/llimview.h             | 2 +-
 indra/newview/lloutputmonitorctrl.h  | 4 ++--
 indra/newview/llviewermenu.h         | 2 +-
 7 files changed, 12 insertions(+), 12 deletions(-)

(limited to 'indra')

diff --git a/indra/newview/llavatariconctrl.h b/indra/newview/llavatariconctrl.h
index f55967926a..4929efb7d0 100644
--- a/indra/newview/llavatariconctrl.h
+++ b/indra/newview/llavatariconctrl.h
@@ -29,7 +29,7 @@
 
 #include <boost/signals2.hpp>
 
-#include "lliconctrl.h"
+#include "../llui/lliconctrl.h"
 #include "llavatarpropertiesprocessor.h"
 #include "llviewermenu.h"
 
diff --git a/indra/newview/llconversationmodel.h b/indra/newview/llconversationmodel.h
index 7177d3a414..743a6ba40b 100755
--- a/indra/newview/llconversationmodel.h
+++ b/indra/newview/llconversationmodel.h
@@ -30,8 +30,8 @@
 #include <boost/signals2.hpp>
 
 #include "llavatarname.h"
-#include "llfolderviewitem.h"
-#include "llfolderviewmodel.h"
+#include "../llui/llfolderviewitem.h"
+#include "../llui/llfolderviewmodel.h"
 #include "llviewerfoldertype.h"
 
 // Implementation of conversations list
diff --git a/indra/newview/llconversationview.h b/indra/newview/llconversationview.h
index a6f408403b..fb2834f26a 100755
--- a/indra/newview/llconversationview.h
+++ b/indra/newview/llconversationview.h
@@ -27,10 +27,10 @@
 #ifndef LL_LLCONVERSATIONVIEW_H
 #define LL_LLCONVERSATIONVIEW_H
 
-#include "llfolderviewitem.h"
+#include "../llui/llfolderviewitem.h"
 
 #include "llavatariconctrl.h"
-#include "llbutton.h"
+#include "../llui/llbutton.h"
 #include "lloutputmonitorctrl.h"
 
 class LLTextBox;
diff --git a/indra/newview/llfloaterimcontainer.h b/indra/newview/llfloaterimcontainer.h
index 4f1bb96d9b..1a3e64f759 100644
--- a/indra/newview/llfloaterimcontainer.h
+++ b/indra/newview/llfloaterimcontainer.h
@@ -32,11 +32,11 @@
 
 #include "llimview.h"
 #include "llevents.h"
-#include "llfloater.h"
-#include "llmultifloater.h"
+#include "../llui/llfloater.h"
+#include "../llui/llmultifloater.h"
 #include "llavatarpropertiesprocessor.h"
 #include "llgroupmgr.h"
-#include "lltrans.h"
+#include "../llui/lltrans.h"
 #include "llconversationmodel.h"
 #include "llconversationview.h"
 
diff --git a/indra/newview/llimview.h b/indra/newview/llimview.h
index 19b738069c..9dbbd7738a 100644
--- a/indra/newview/llimview.h
+++ b/indra/newview/llimview.h
@@ -27,7 +27,7 @@
 #ifndef LL_LLIMVIEW_H
 #define LL_LLIMVIEW_H
 
-#include "lldockablefloater.h"
+#include "../llui/lldockablefloater.h"
 #include "lleventtimer.h"
 #include "llinstantmessage.h"
 
diff --git a/indra/newview/lloutputmonitorctrl.h b/indra/newview/lloutputmonitorctrl.h
index 1fa6ef41f8..c3d3c35fd5 100644
--- a/indra/newview/lloutputmonitorctrl.h
+++ b/indra/newview/lloutputmonitorctrl.h
@@ -28,10 +28,10 @@
 #define LL_LLOUTPUTMONITORCTRL_H
 
 #include "v4color.h"
-#include "llview.h"
+#include "../llui/llview.h"
 #include "llmutelist.h"
 #include "llspeakingindicatormanager.h"
-#include "lluiimage.h"
+#include "../llui/lluiimage.h"
 
 class LLTextBox;
 class LLUICtrlFactory;
diff --git a/indra/newview/llviewermenu.h b/indra/newview/llviewermenu.h
index 139f898b76..c0376ba114 100644
--- a/indra/newview/llviewermenu.h
+++ b/indra/newview/llviewermenu.h
@@ -27,7 +27,7 @@
 #ifndef LL_LLVIEWERMENU_H
 #define LL_LLVIEWERMENU_H
 
-#include "llmenugl.h"
+#include "../llui/llmenugl.h"
 #include "llsafehandle.h"
 
 class LLMessageSystem;
-- 
cgit v1.2.3


From 179ab5c7353150ebaeac6e32fa55f96670c3c256 Mon Sep 17 00:00:00 2001
From: William Todd Stinson <stinson@lindenlab.com>
Date: Thu, 13 Dec 2012 15:54:49 -0800
Subject: CHUI-595, CHU-554: Updating the people panel to new specs.

---
 indra/newview/skins/default/xui/en/floater_people.xml | 2 +-
 indra/newview/skins/default/xui/en/panel_people.xml   | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

(limited to 'indra')

diff --git a/indra/newview/skins/default/xui/en/floater_people.xml b/indra/newview/skins/default/xui/en/floater_people.xml
index 8e143623ab..5f475baa93 100644
--- a/indra/newview/skins/default/xui/en/floater_people.xml
+++ b/indra/newview/skins/default/xui/en/floater_people.xml
@@ -7,7 +7,7 @@
   height="570"
   help_topic="sidebar_people"
   min_height="440"
-  min_width="390"
+  min_width="260"
   layout="topleft"
   name="floater_people"
   save_rect="true"
diff --git a/indra/newview/skins/default/xui/en/panel_people.xml b/indra/newview/skins/default/xui/en/panel_people.xml
index 7433ad828d..7ce2627be9 100644
--- a/indra/newview/skins/default/xui/en/panel_people.xml
+++ b/indra/newview/skins/default/xui/en/panel_people.xml
@@ -229,7 +229,7 @@ Looking for people to hang out with? Try the [secondlife:///app/worldmap World M
          bg_opaque_color="DkGray"
          bottom="-1"
          follows="all"
-         label="MY FRIENDS"
+         label="FRIENDS"
          layout="topleft"
          left="0"
          help_topic="people_friends_tab"
@@ -385,7 +385,7 @@ Looking for people to hang out with? Try the [secondlife:///app/worldmap World M
          bg_opaque_color="DkGray"
          bottom="-1"
          follows="all"
-         label="MY GROUPS"
+         label="GROUPS"
          layout="topleft"
          left="0"
          help_topic="people_groups_tab"
-- 
cgit v1.2.3


From 569701cfc898091a414dad0650f89471b1962d49 Mon Sep 17 00:00:00 2001
From: Merov Linden <merov@lindenlab.com>
Date: Thu, 13 Dec 2012 17:15:18 -0800
Subject: CHUI-574, CHUI-575 : Fixed inventory regressions : select the first
 filtered item when searching the inventory, simply made the folder selection
 secondary to item selection.

---
 indra/llui/llfolderview.h              | 16 ++++++++++++++--
 indra/newview/llinventoryfunctions.cpp | 10 ++++------
 2 files changed, 18 insertions(+), 8 deletions(-)

(limited to 'indra')

diff --git a/indra/llui/llfolderview.h b/indra/llui/llfolderview.h
index 525efe425a..d4a1434c73 100644
--- a/indra/llui/llfolderview.h
+++ b/indra/llui/llfolderview.h
@@ -341,16 +341,28 @@ public:
 	virtual void doItem(LLFolderViewItem* item) = 0;
 };
 
+//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+// Class LLSelectFirstFilteredItem
+//
+// This will select the first *item* found in the hierarchy. If no item can be
+// selected, the first matching folder will.
+// Since doFolder() is done first but we prioritize item selection, we let the 
+// first filtered folder set the selection and raise a folder flag.
+// The selection might be overridden by the first filtered item in doItem()  
+// which checks an item flag. Since doFolder() checks the item flag too, the first
+// item will still be selected if items were to be done first and folders second.
+//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 class LLSelectFirstFilteredItem : public LLFolderViewFunctor
 {
 public:
-	LLSelectFirstFilteredItem() : mItemSelected(FALSE) {}
+	LLSelectFirstFilteredItem() : mItemSelected(FALSE), mFolderSelected(FALSE) {}
 	virtual ~LLSelectFirstFilteredItem() {}
 	virtual void doFolder(LLFolderViewFolder* folder);
 	virtual void doItem(LLFolderViewItem* item);
-	BOOL wasItemSelected() { return mItemSelected; }
+	BOOL wasItemSelected() { return mItemSelected || mFolderSelected; }
 protected:
 	BOOL mItemSelected;
+	BOOL mFolderSelected;
 };
 
 class LLOpenFilteredFolders : public LLFolderViewFunctor
diff --git a/indra/newview/llinventoryfunctions.cpp b/indra/newview/llinventoryfunctions.cpp
index 1426567196..6474d56414 100644
--- a/indra/newview/llinventoryfunctions.cpp
+++ b/indra/newview/llinventoryfunctions.cpp
@@ -1031,14 +1031,12 @@ void LLSelectFirstFilteredItem::doItem(LLFolderViewItem *item)
 
 void LLSelectFirstFilteredItem::doFolder(LLFolderViewFolder* folder)
 {
-	if (folder->LLFolderViewItem::passedFilter() && !mItemSelected)
+	// Skip if folder or item already found, if not filtered or if no parent (root folder is not selectable)
+	if (!mFolderSelected && !mItemSelected && folder->LLFolderViewItem::passedFilter() && folder->getParentFolder())
 	{
 		folder->getRoot()->setSelection(folder, FALSE, FALSE);
-		if (folder->getParentFolder())
-		{
-			folder->getParentFolder()->setOpenArrangeRecursively(TRUE, LLFolderViewFolder::RECURSE_UP);
-		}
-		mItemSelected = TRUE;
+		folder->getParentFolder()->setOpenArrangeRecursively(TRUE, LLFolderViewFolder::RECURSE_UP);
+		mFolderSelected = TRUE;
 	}
 }
 
-- 
cgit v1.2.3


From 08cc82ec483fab8299d52ba979f04df95e525acb Mon Sep 17 00:00:00 2001
From: Merov Linden <merov@lindenlab.com>
Date: Thu, 13 Dec 2012 22:45:47 -0800
Subject: CHUI-599 : Fixed : Avatar name provides now a method to get the
 regular account name.

---
 indra/llcommon/llavatarname.h     | 3 +++
 indra/newview/llavataractions.cpp | 8 ++------
 2 files changed, 5 insertions(+), 6 deletions(-)

(limited to 'indra')

diff --git a/indra/llcommon/llavatarname.h b/indra/llcommon/llavatarname.h
index 2f8c534974..4827353018 100644
--- a/indra/llcommon/llavatarname.h
+++ b/indra/llcommon/llavatarname.h
@@ -74,6 +74,9 @@ public:
 	// Also used for backwards compatibility with systems like voice and muting
 	std::string getUserName() const;
 	
+	// Returns "james.linden" or the legacy name for very old names
+	std::string getAccountName() const { return mUsername; }
+
 	// Debug print of the object
 	void dump() const;
 	
diff --git a/indra/newview/llavataractions.cpp b/indra/newview/llavataractions.cpp
index 59b862503c..23d528901a 100755
--- a/indra/newview/llavataractions.cpp
+++ b/indra/newview/llavataractions.cpp
@@ -315,15 +315,11 @@ static const char* get_profile_floater_name(const LLUUID& avatar_id)
 
 static void on_avatar_name_show_profile(const LLUUID& agent_id, const LLAvatarName& av_name)
 {
-	std::string username = av_name.getUserName();
-	
-	llinfos << "opening web profile for " << username << llendl;		
-	std::string url = getProfileURL(username);
+	std::string url = getProfileURL(av_name.getAccountName());
 
 	// PROFILES: open in webkit window
 	LLFloaterWebContent::Params p;
-	p.url(url).
-		id(agent_id.asString());
+	p.url(url).id(agent_id.asString());
 	LLFloaterReg::showInstance(get_profile_floater_name(agent_id), p);
 }
 
-- 
cgit v1.2.3