From 94655359aaa45ef5849cb589f637331b3bcc394c Mon Sep 17 00:00:00 2001
From: Monroe Linden <monroe@lindenlab.com>
Date: Thu, 29 Jul 2010 15:50:20 -0700
Subject: Yet more cleanup around llmediadataclient.

In LLVOVolume, added a count of LLMediaDataClientObjectImpl objects referencing each LLVOVolume object.  This allows LLVOVolume::markDead() to skip the relatively expensive calls to removeFromQueue() when the LLVOVolume is known to have no active references.

Refactored LLMediaDataClient and its two child classes so that only LLObjectMediaDataClient has the round-robin queue (LLObjectMediaNavigateClient doesn't need it), and cleaned up some of the virtual function hierarchy around queue processing.

In LLMediaDataClient, added tracking for requests that aren't currently in a queue (i.e. requests that are in flight or waiting for retries) so they can be found when their objects are marked dead.

LLMediaDataClient::Request now directly keeps track of the object ID and face associated with the request.

Removed the "markedSent" concept from requests.  Requests that have been sent are no longer kept in a queue.

The Retry timer now references the Request object instead of the Responder.

Replaced LLMediaDataClient::findOrRemove() with separate template functions for find and remove.
---
 indra/newview/llvovolume.h | 5 +++++
 1 file changed, 5 insertions(+)

(limited to 'indra/newview/llvovolume.h')

diff --git a/indra/newview/llvovolume.h b/indra/newview/llvovolume.h
index fbae011ffc..1bd6a0fafe 100644
--- a/indra/newview/llvovolume.h
+++ b/indra/newview/llvovolume.h
@@ -274,6 +274,10 @@ public:
 	
 	// Returns the "last fetched" media version, or -1 if not fetched yet
 	S32 getLastFetchedMediaVersion() const { return mLastFetchedMediaVersion; }
+
+	void addMDCImpl() { ++mMDCImplCount; }
+	void removeMDCImpl() { --mMDCImplCount; }
+	S32 getMDCImplCount() { return mMDCImplCount; }
 	
 protected:
 	S32	computeLODDetail(F32	distance, F32 radius);
@@ -307,6 +311,7 @@ private:
 	media_list_t mMediaImplList;
 	S32			mLastFetchedMediaVersion; // as fetched from the server, starts as -1
 	S32 mIndexInTex;
+	S32 mMDCImplCount;
 	// statics
 public:
 	static F32 sLODSlopDistanceFactor;// Changing this to zero, effectively disables the LOD transition slop 
-- 
cgit v1.2.3