diff options
| -rw-r--r-- | indra/llui/lliconctrl.cpp | 7 | ||||
| -rw-r--r-- | indra/llui/lliconctrl.h | 5 | ||||
| -rw-r--r-- | indra/llui/llui.cpp | 8 | ||||
| -rw-r--r-- | indra/llui/llui.h | 8 | ||||
| -rw-r--r-- | indra/newview/llagent.cpp | 6 | ||||
| -rw-r--r-- | indra/newview/llavatariconctrl.cpp | 2 | ||||
| -rw-r--r-- | indra/newview/llfloaterland.cpp | 6 | ||||
| -rw-r--r-- | indra/newview/llimview.cpp | 38 | ||||
| -rw-r--r-- | indra/newview/llimview.h | 13 | ||||
| -rw-r--r-- | indra/newview/llpanelplaceinfo.cpp | 15 | ||||
| -rw-r--r-- | indra/newview/llpanelplaceinfo.h | 3 | ||||
| -rw-r--r-- | indra/newview/llpanelplaces.cpp | 11 | ||||
| -rw-r--r-- | indra/newview/llviewermenu.cpp | 1 | ||||
| -rw-r--r-- | indra/newview/llviewertexture.cpp | 8 | ||||
| -rw-r--r-- | indra/newview/llviewertexture.h | 8 | ||||
| -rw-r--r-- | indra/newview/llviewertexturelist.cpp | 72 | ||||
| -rw-r--r-- | indra/newview/llviewertexturelist.h | 10 | ||||
| -rw-r--r-- | indra/newview/llworldmapview.cpp | 2 | 
18 files changed, 104 insertions, 119 deletions
| diff --git a/indra/llui/lliconctrl.cpp b/indra/llui/lliconctrl.cpp index 0330a2b374..66c2ba682f 100644 --- a/indra/llui/lliconctrl.cpp +++ b/indra/llui/lliconctrl.cpp @@ -56,7 +56,8 @@ LLIconCtrl::Params::Params()  LLIconCtrl::LLIconCtrl(const LLIconCtrl::Params& p)  :	LLUICtrl(p),  	mColor(p.color()), -	mImagep(p.image) +	mImagep(p.image), +	mPriority(0)  {  	if (mImagep.notNull())  	{ @@ -93,11 +94,11 @@ void LLIconCtrl::setValue(const LLSD& value )  	LLUICtrl::setValue(tvalue);  	if (tvalue.isUUID())  	{ -		mImagep = LLUI::getUIImageByID(tvalue.asUUID()); +		mImagep = LLUI::getUIImageByID(tvalue.asUUID(), mPriority);  	}  	else  	{ -		mImagep = LLUI::getUIImage(tvalue.asString()); +		mImagep = LLUI::getUIImage(tvalue.asString(), mPriority);  	}  } diff --git a/indra/llui/lliconctrl.h b/indra/llui/lliconctrl.h index ff25b0d53e..90f1693060 100644 --- a/indra/llui/lliconctrl.h +++ b/indra/llui/lliconctrl.h @@ -72,10 +72,13 @@ public:  	std::string	getImageName() const;  	void			setColor(const LLColor4& color) { mColor = color; } +	 +protected: +	S32 mPriority;  private:  	LLUIColor mColor; -	LLPointer<LLUIImage>	mImagep; +	LLPointer<LLUIImage> mImagep;  };  #endif diff --git a/indra/llui/llui.cpp b/indra/llui/llui.cpp index da9384f876..48504a1e54 100644 --- a/indra/llui/llui.cpp +++ b/indra/llui/llui.cpp @@ -1807,11 +1807,11 @@ void LLUI::glRectToScreen(const LLRect& gl, LLRect *screen)  }  //static -LLPointer<LLUIImage> LLUI::getUIImageByID(const LLUUID& image_id) +LLPointer<LLUIImage> LLUI::getUIImageByID(const LLUUID& image_id, S32 priority)  {  	if (sImageProvider)  	{ -		return sImageProvider->getUIImageByID(image_id); +		return sImageProvider->getUIImageByID(image_id, priority);  	}  	else  	{ @@ -1820,10 +1820,10 @@ LLPointer<LLUIImage> LLUI::getUIImageByID(const LLUUID& image_id)  }  //static  -LLPointer<LLUIImage> LLUI::getUIImage(const std::string& name) +LLPointer<LLUIImage> LLUI::getUIImage(const std::string& name, S32 priority)  {  	if (!name.empty() && sImageProvider) -		return sImageProvider->getUIImage(name); +		return sImageProvider->getUIImage(name, priority);  	else  		return NULL;  } diff --git a/indra/llui/llui.h b/indra/llui/llui.h index 6ab78ab3cd..efb1b0a36f 100644 --- a/indra/llui/llui.h +++ b/indra/llui/llui.h @@ -195,8 +195,8 @@ public:  	static void getMousePositionLocal(const LLView* viewp, S32 *x, S32 *y);  	static void setScaleFactor(const LLVector2& scale_factor);  	static void setLineWidth(F32 width); -	static LLPointer<LLUIImage> getUIImageByID(const LLUUID& image_id); -	static LLPointer<LLUIImage> getUIImage(const std::string& name); +	static LLPointer<LLUIImage> getUIImageByID(const LLUUID& image_id, S32 priority = 0); +	static LLPointer<LLUIImage> getUIImage(const std::string& name, S32 priority = 0);  	static LLVector2 getWindowSize();  	static void screenPointToGL(S32 screen_x, S32 screen_y, S32 *gl_x, S32 *gl_y);  	static void glPointToScreen(S32 gl_x, S32 gl_y, S32 *screen_x, S32 *screen_y); @@ -241,8 +241,8 @@ protected:  	LLImageProviderInterface() {};  	virtual ~LLImageProviderInterface() {};  public: -	virtual LLPointer<LLUIImage> getUIImage(const std::string& name) = 0; -	virtual LLPointer<LLUIImage> getUIImageByID(const LLUUID& id) = 0; +	virtual LLPointer<LLUIImage> getUIImage(const std::string& name, S32 priority) = 0; +	virtual LLPointer<LLUIImage> getUIImageByID(const LLUUID& id, S32 priority) = 0;  	virtual void cleanUp() = 0;  }; diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp index f62606cc50..5800db482f 100644 --- a/indra/newview/llagent.cpp +++ b/indra/newview/llagent.cpp @@ -5391,12 +5391,6 @@ void update_group_floaters(const LLUUID& group_id)  	//*TODO Implement group update for Profile View   	// still actual as of July 31, 2009 (DZ) -	if (gIMMgr) -	{ -		// update the talk view -		gIMMgr->refresh(); -	} -  	gAgent.fireEvent(new LLOldEvents::LLEvent(&gAgent, "new group"), "");  } diff --git a/indra/newview/llavatariconctrl.cpp b/indra/newview/llavatariconctrl.cpp index 7ae1b5cd4a..ebcda13dd4 100644 --- a/indra/newview/llavatariconctrl.cpp +++ b/indra/newview/llavatariconctrl.cpp @@ -152,6 +152,8 @@ LLAvatarIconCtrl::LLAvatarIconCtrl(const LLAvatarIconCtrl::Params& p)  :	LLIconCtrl(p),  	mDrawTooltip(p.draw_tooltip)  { +	mPriority = LLViewerFetchedTexture::BOOST_ICON; +	  	LLRect rect = p.rect;  	static LLUICachedControl<S32> llavatariconctrl_symbol_hpad("UIAvatariconctrlSymbolHPad", 2); diff --git a/indra/newview/llfloaterland.cpp b/indra/newview/llfloaterland.cpp index 488d71aa70..bdf9842b01 100644 --- a/indra/newview/llfloaterland.cpp +++ b/indra/newview/llfloaterland.cpp @@ -1054,9 +1054,9 @@ BOOL LLPanelLandObjects::postBuild()  	mBtnReturnOwnerList = getChild<LLButton>("Return objects...");  	mBtnReturnOwnerList->setClickedCallback(onClickReturnOwnerList, this); -	mIconAvatarOnline = LLUIImageList::getInstance()->getUIImage("icon_avatar_online.tga"); -	mIconAvatarOffline = LLUIImageList::getInstance()->getUIImage("icon_avatar_offline.tga"); -	mIconGroup = LLUIImageList::getInstance()->getUIImage("icon_group.tga"); +	mIconAvatarOnline = LLUIImageList::getInstance()->getUIImage("icon_avatar_online.tga", 0); +	mIconAvatarOffline = LLUIImageList::getInstance()->getUIImage("icon_avatar_offline.tga", 0); +	mIconGroup = LLUIImageList::getInstance()->getUIImage("icon_group.tga", 0);  	mOwnerList = getChild<LLNameListCtrl>("owner list");  	mOwnerList->sortByColumnIndex(3, FALSE); diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp index 8d72ffdfcc..fa7e1170be 100644 --- a/indra/newview/llimview.cpp +++ b/indra/newview/llimview.cpp @@ -1114,29 +1114,6 @@ void LLIncomingCallDialog::processCallResponse(S32 response)  	}  } -//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// Class LLIMViewFriendObserver -// -// Bridge to suport knowing when the inventory has changed. -//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -class LLIMViewFriendObserver : public LLFriendObserver -{ -public: -	LLIMViewFriendObserver(LLIMMgr* tv) : mTV(tv) {} -	virtual ~LLIMViewFriendObserver() {} -	virtual void changed(U32 mask) -	{ -		if(mask & (LLFriendObserver::ADD | LLFriendObserver::REMOVE | LLFriendObserver::ONLINE)) -		{ -			mTV->refresh(); -		} -	} -protected: -	LLIMMgr* mTV; -}; - -  bool inviteUserResponse(const LLSD& notification, const LLSD& response)  {  	const LLSD& payload = notification["payload"]; @@ -1237,7 +1214,6 @@ bool inviteUserResponse(const LLSD& notification, const LLSD& response)  //  LLIMMgr::LLIMMgr() : -	mFriendObserver(NULL),  	mIMReceived(FALSE)  {  	static bool registered_dialog = false; @@ -1246,21 +1222,11 @@ LLIMMgr::LLIMMgr() :  		LLFloaterReg::add("incoming_call", "floater_incoming_call.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLIncomingCallDialog>);  		registered_dialog = true;  	} -		 -	mFriendObserver = new LLIMViewFriendObserver(this); -	LLAvatarTracker::instance().addObserver(mFriendObserver);  	mPendingInvitations = LLSD::emptyMap();  	mPendingAgentListUpdates = LLSD::emptyMap();  } -LLIMMgr::~LLIMMgr() -{ -	LLAvatarTracker::instance().removeObserver(mFriendObserver); -	delete mFriendObserver; -	// Children all cleaned up by default view destructor. -} -  // Add a message to a session.   void LLIMMgr::addMessage(  	const LLUUID& session_id, @@ -1714,10 +1680,6 @@ void LLIMMgr::onInviteNameLookup(LLSD payload, const LLUUID& id, const std::stri  	}  } -void LLIMMgr::refresh() -{ -} -  void LLIMMgr::disconnectAllSessions()  {  	LLFloaterIMPanel* floater = NULL; diff --git a/indra/newview/llimview.h b/indra/newview/llimview.h index 79513fb7d5..6991017e8f 100644 --- a/indra/newview/llimview.h +++ b/indra/newview/llimview.h @@ -183,7 +183,7 @@ public:  	};  	LLIMMgr(); -	virtual ~LLIMMgr(); +	virtual ~LLIMMgr() {};  	// Add a message to a session. The session can keyed to sesion id  	// or agent id. @@ -245,9 +245,6 @@ public:  	void processIMTypingStart(const LLIMInfo* im_info);  	void processIMTypingStop(const LLIMInfo* im_info); -	// Rebuild stuff -	void refresh(); -  	void notifyNewIM();  	void clearNewIMNotification(); @@ -263,10 +260,6 @@ public:  	// good connection.  	void disconnectAllSessions(); -	// This is a helper function to determine what kind of im session -	// should be used for the given agent. -	static EInstantMessage defaultIMTypeForAgent(const LLUUID& agent_id); -  	BOOL hasSession(const LLUUID& session_id);  	// This method returns the im panel corresponding to the uuid @@ -285,6 +278,7 @@ public:  	void clearPendingAgentListUpdates(const LLUUID& session_id);  	//HACK: need a better way of enumerating existing session, or listening to session create/destroy events +	//@deprecated, is used only by LLToolBox, which is not used anywhere, right? (IB)  	const std::set<LLHandle<LLFloater> >& getIMFloaterHandles() { return mFloaters; }  	void addSessionObserver(LLIMSessionObserver *); @@ -335,8 +329,9 @@ private:  	void notifyObserverSessionIDUpdated(const LLUUID& old_session_id, const LLUUID& new_session_id);  private: +	 +	//*TODO should be deleted when Communicate Floater is being deleted  	std::set<LLHandle<LLFloater> > mFloaters; -	LLFriendObserver* mFriendObserver;  	typedef std::list <LLIMSessionObserver *> session_observers_list_t;  	session_observers_list_t mSessionObservers; diff --git a/indra/newview/llpanelplaceinfo.cpp b/indra/newview/llpanelplaceinfo.cpp index cb9f7184f0..2edb2bba06 100644 --- a/indra/newview/llpanelplaceinfo.cpp +++ b/indra/newview/llpanelplaceinfo.cpp @@ -76,7 +76,6 @@  typedef std::pair<LLUUID, std::string> folder_pair_t;  static bool cmp_folders(const folder_pair_t& left, const folder_pair_t& right); -static std::string getFullFolderName(const LLViewerInventoryCategory* cat);  static void collectLandmarkFolders(LLInventoryModel::cat_array_t& cats);  static LLRegisterPanelClassWrapper<LLPanelPlaceInfo> t_place_info("panel_place_info"); @@ -1028,14 +1027,9 @@ void LLPanelPlaceInfo::onForSaleBannerClick()  } -  -static bool cmp_folders(const folder_pair_t& left, const folder_pair_t& right) -{ -	return left.second < right.second; -} - -static std::string getFullFolderName(const LLViewerInventoryCategory* cat) +/*static*/ +std::string LLPanelPlaceInfo::getFullFolderName(const LLViewerInventoryCategory* cat)  {  	std::string name = cat->getName();  	LLUUID parent_id; @@ -1057,6 +1051,11 @@ static std::string getFullFolderName(const LLViewerInventoryCategory* cat)  	return name;  } +static bool cmp_folders(const folder_pair_t& left, const folder_pair_t& right) +{ +	return left.second < right.second; +} +  static void collectLandmarkFolders(LLInventoryModel::cat_array_t& cats)  {  	LLUUID landmarks_id = gInventory.findCategoryUUIDForType(LLAssetType::AT_LANDMARK); diff --git a/indra/newview/llpanelplaceinfo.h b/indra/newview/llpanelplaceinfo.h index 7b3a8f050b..aa2485cbb4 100644 --- a/indra/newview/llpanelplaceinfo.h +++ b/indra/newview/llpanelplaceinfo.h @@ -52,6 +52,7 @@ class LLTextBox;  class LLTextEditor;  class LLTextureCtrl;  class LLViewerRegion; +class LLViewerInventoryCategory;  class LLPanelPlaceInfo : public LLPanel, LLRemoteParcelInfoObserver  { @@ -131,6 +132,8 @@ public:  	/*virtual*/ void processParcelInfo(const LLParcelData& parcel_data);  	/*virtual*/ void handleVisibilityChange (BOOL new_visibility); +	 +	 static std::string getFullFolderName(const LLViewerInventoryCategory* cat);  private: diff --git a/indra/newview/llpanelplaces.cpp b/indra/newview/llpanelplaces.cpp index 5ab823b6e5..b2e9110e96 100644 --- a/indra/newview/llpanelplaces.cpp +++ b/indra/newview/llpanelplaces.cpp @@ -351,7 +351,16 @@ void LLPanelPlaces::setItem(LLInventoryItem* item)  	if (is_landmark_editable)  	{ -		mPlaceInfo->setLandmarkFolder(mItem->getParentUUID()); +		if(!mPlaceInfo->setLandmarkFolder(mItem->getParentUUID()) && !mItem->getParentUUID().isNull()) +		{ +			const LLViewerInventoryCategory* cat = gInventory.getCategory(mItem->getParentUUID()); +			if(cat) +			{ +				std::string cat_fullname = LLPanelPlaceInfo::getFullFolderName(cat); +				LLComboBox* folderList = mPlaceInfo->getChild<LLComboBox>("folder_combo"); +				folderList->add(cat_fullname, cat->getUUID(),ADD_TOP); +			} +		}  	}  	mPlaceInfo->displayItemInfo(mItem); diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index a1c15d9d0f..d46f155ad6 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -3511,7 +3511,6 @@ void set_god_level(U8 god_level)  {  	U8 old_god_level = gAgent.getGodLevel();  	gAgent.setGodLevel( god_level ); -	gIMMgr->refresh();  	LLViewerParcelMgr::getInstance()->notifyObservers();  	// God mode changes sim visibility diff --git a/indra/newview/llviewertexture.cpp b/indra/newview/llviewertexture.cpp index 95459a7116..e5c53c91c9 100644 --- a/indra/newview/llviewertexture.cpp +++ b/indra/newview/llviewertexture.cpp @@ -191,25 +191,25 @@ LLPointer<LLViewerTexture> LLViewerTextureManager::getLocalTexture(const U32 wid  LLViewerFetchedTexture* LLViewerTextureManager::getFetchedTexture(  	                                               const LLUUID &image_id,											         												   BOOL usemipmaps, -												   BOOL level_immediate, +												   S32 boost_priority,  												   S8 texture_type,  												   LLGLint internal_format,  												   LLGLenum primary_format,  												   LLHost request_from_host)  { -	return gTextureList.getImage(image_id, usemipmaps, level_immediate, texture_type, internal_format, primary_format, request_from_host) ; +	return gTextureList.getImage(image_id, usemipmaps, boost_priority, texture_type, internal_format, primary_format, request_from_host) ;  }  LLViewerFetchedTexture* LLViewerTextureManager::getFetchedTextureFromFile(  	                                               const std::string& filename,												     												   BOOL usemipmaps, -												   BOOL level_immediate, +												   S32 boost_priority,  												   S8 texture_type,  												   LLGLint internal_format,  												   LLGLenum primary_format,   												   const LLUUID& force_id)  { -	return gTextureList.getImageFromFile(filename, usemipmaps, level_immediate, texture_type, internal_format, primary_format, force_id) ; +	return gTextureList.getImageFromFile(filename, usemipmaps, boost_priority, texture_type, internal_format, primary_format, force_id) ;  }  LLViewerFetchedTexture* LLViewerTextureManager::getFetchedTextureFromHost(const LLUUID& image_id, LLHost host)  diff --git a/indra/newview/llviewertexture.h b/indra/newview/llviewertexture.h index 596bfea670..480e1c1cbc 100644 --- a/indra/newview/llviewertexture.h +++ b/indra/newview/llviewertexture.h @@ -118,10 +118,10 @@ public:  		BOOST_SELECTED		= 12,  		BOOST_HUD			= 13,  		BOOST_AVATAR_BAKED_SELF	= 14, -		BOOST_UI			= 15, -		BOOST_PREVIEW		= 16, -		BOOST_MAP			= 17, -		BOOST_MAP_LAYER		= 18, +		BOOST_ICON			= 15, +		BOOST_UI			= 16, +		BOOST_PREVIEW		= 17, +		BOOST_MAP			= 18,  		BOOST_AVATAR_SELF	= 19, // needed for baking avatar  		BOOST_MAX_LEVEL  	}; diff --git a/indra/newview/llviewertexturelist.cpp b/indra/newview/llviewertexturelist.cpp index 4ad4c8e1ea..b5986c70f5 100644 --- a/indra/newview/llviewertexturelist.cpp +++ b/indra/newview/llviewertexturelist.cpp @@ -111,10 +111,10 @@ void LLViewerTextureList::doPreloadImages()  	LL_DEBUGS("ViewerImages") << "Preloading images..." << LL_ENDL;  	// Set the "missing asset" image -	LLViewerFetchedTexture::sMissingAssetImagep = LLViewerTextureManager::getFetchedTextureFromFile("missing_asset.tga", MIPMAP_NO, IMMEDIATE_YES); +	LLViewerFetchedTexture::sMissingAssetImagep = LLViewerTextureManager::getFetchedTextureFromFile("missing_asset.tga", MIPMAP_NO, LLViewerFetchedTexture::BOOST_UI);  	// Set the "white" image -	LLViewerFetchedTexture::sWhiteImagep = LLViewerTextureManager::getFetchedTextureFromFile("white.tga", MIPMAP_NO, IMMEDIATE_YES); +	LLViewerFetchedTexture::sWhiteImagep = LLViewerTextureManager::getFetchedTextureFromFile("white.tga", MIPMAP_NO, LLViewerFetchedTexture::BOOST_UI);  	LLUIImageList* image_list = LLUIImageList::getInstance(); @@ -131,31 +131,31 @@ void LLViewerTextureList::doPreloadImages()  	// prefetch specific UUIDs  	LLViewerTextureManager::getFetchedTexture(IMG_SHOT, TRUE);  	LLViewerTextureManager::getFetchedTexture(IMG_SMOKE_POOF, TRUE); -	LLViewerFetchedTexture* image = LLViewerTextureManager::getFetchedTextureFromFile("silhouette.j2c", MIPMAP_YES, IMMEDIATE_YES); +	LLViewerFetchedTexture* image = LLViewerTextureManager::getFetchedTextureFromFile("silhouette.j2c", MIPMAP_YES, LLViewerFetchedTexture::BOOST_UI);  	if (image)   	{  		image->setAddressMode(LLTexUnit::TAM_WRAP);  		mImagePreloads.insert(image);  	} -	image = LLViewerTextureManager::getFetchedTextureFromFile("world/NoEntryLines.png", MIPMAP_YES, IMMEDIATE_YES); +	image = LLViewerTextureManager::getFetchedTextureFromFile("world/NoEntryLines.png", MIPMAP_YES, LLViewerFetchedTexture::BOOST_UI);  	if (image)   	{  		image->setAddressMode(LLTexUnit::TAM_WRAP);	  		mImagePreloads.insert(image);  	} -	image = LLViewerTextureManager::getFetchedTextureFromFile("world/NoEntryPassLines.png", MIPMAP_YES, IMMEDIATE_YES); +	image = LLViewerTextureManager::getFetchedTextureFromFile("world/NoEntryPassLines.png", MIPMAP_YES, LLViewerFetchedTexture::BOOST_UI);  	if (image)   	{  		image->setAddressMode(LLTexUnit::TAM_WRAP);  		mImagePreloads.insert(image);  	} -	image = LLViewerTextureManager::getFetchedTexture(DEFAULT_WATER_NORMAL, MIPMAP_YES, IMMEDIATE_YES); +	image = LLViewerTextureManager::getFetchedTexture(DEFAULT_WATER_NORMAL, MIPMAP_YES, LLViewerFetchedTexture::BOOST_UI);  	if (image)   	{  		image->setAddressMode(LLTexUnit::TAM_WRAP);	  		mImagePreloads.insert(image);  	} -	image = LLViewerTextureManager::getFetchedTextureFromFile("transparent.j2c", MIPMAP_YES, IMMEDIATE_YES, LLViewerTexture::FETCHED_TEXTURE, +	image = LLViewerTextureManager::getFetchedTextureFromFile("transparent.j2c", MIPMAP_YES, LLViewerFetchedTexture::BOOST_UI, LLViewerTexture::FETCHED_TEXTURE,  		0,0,LLUUID("8dcd4a48-2d37-4909-9f78-f7a9eb4ef903"));  	if (image)   	{ @@ -315,7 +315,7 @@ void LLViewerTextureList::restoreGL()  LLViewerFetchedTexture* LLViewerTextureList::getImageFromFile(const std::string& filename,												     												   BOOL usemipmaps, -												   BOOL level_immediate, +												   S32 boost_priority,  												   S8 texture_type,  												   LLGLint internal_format,  												   LLGLenum primary_format,  @@ -369,10 +369,14 @@ LLViewerFetchedTexture* LLViewerTextureList::getImageFromFile(const std::string&  		addImage(imagep); -		if (level_immediate) +		if (boost_priority != 0)  		{ -			imagep->dontDiscard(); -			imagep->setBoostLevel(LLViewerFetchedTexture::BOOST_UI); +			if (boost_priority == LLViewerFetchedTexture::BOOST_UI || +				boost_priority == LLViewerFetchedTexture::BOOST_ICON) +			{ +				imagep->dontDiscard(); +			} +			imagep->setBoostLevel(boost_priority);  		}  	} @@ -384,7 +388,7 @@ LLViewerFetchedTexture* LLViewerTextureList::getImageFromFile(const std::string&  LLViewerFetchedTexture* LLViewerTextureList::getImage(const LLUUID &image_id,											         												   BOOL usemipmaps, -												   BOOL level_immediate, +												   S32 boost_priority,  												   S8 texture_type,  												   LLGLint internal_format,  												   LLGLenum primary_format, @@ -403,7 +407,7 @@ LLViewerFetchedTexture* LLViewerTextureList::getImage(const LLUUID &image_id,  	if (imagep.isNull())  	{ -		imagep = createImage(image_id, usemipmaps, level_immediate, texture_type, internal_format, primary_format, request_from_host) ; +		imagep = createImage(image_id, usemipmaps, boost_priority, texture_type, internal_format, primary_format, request_from_host) ;  	}  	imagep->setGLTextureCreated(true); @@ -414,7 +418,7 @@ LLViewerFetchedTexture* LLViewerTextureList::getImage(const LLUUID &image_id,  //when this function is called, there is no such texture in the gTextureList with image_id.  LLViewerFetchedTexture* LLViewerTextureList::createImage(const LLUUID &image_id,											         												   BOOL usemipmaps, -												   BOOL level_immediate, +												   S32 boost_priority,  												   S8 texture_type,  												   LLGLint internal_format,  												   LLGLenum primary_format, @@ -443,16 +447,20 @@ LLViewerFetchedTexture* LLViewerTextureList::createImage(const LLUUID &image_id,  	addImage(imagep); -	if (level_immediate) +	if (boost_priority != 0)  	{ -		imagep->dontDiscard(); -		imagep->setBoostLevel(LLViewerFetchedTexture::BOOST_UI); +		if (boost_priority == LLViewerFetchedTexture::BOOST_UI || +			boost_priority == LLViewerFetchedTexture::BOOST_ICON) +		{ +			imagep->dontDiscard(); +		} +		imagep->setBoostLevel(boost_priority);  	}  	else  	{  		//by default, the texure can not be removed from memory even if it is not used.  		//here turn this off -		//if this texture should be set to NO_DELETE, either pass level_immediate == TRUE here, or call setNoDelete() afterwards. +		//if this texture should be set to NO_DELETE, call setNoDelete() afterwards.  		imagep->forceActive() ;  	} @@ -1286,7 +1294,7 @@ void LLUIImageList::cleanUp()  	mUITextureList.clear() ;  } -LLUIImagePtr LLUIImageList::getUIImageByID(const LLUUID& image_id) +LLUIImagePtr LLUIImageList::getUIImageByID(const LLUUID& image_id, S32 priority)  {  	// use id as image name  	std::string image_name = image_id.asString(); @@ -1298,10 +1306,12 @@ LLUIImagePtr LLUIImageList::getUIImageByID(const LLUUID& image_id)  		return found_it->second;  	} -	return loadUIImageByID(image_id); +	const BOOL use_mips = FALSE; +	const LLRect scale_rect = LLRect::null; +	return loadUIImageByID(image_id, use_mips, scale_rect, priority);  } -LLUIImagePtr LLUIImageList::getUIImage(const std::string& image_name) +LLUIImagePtr LLUIImageList::getUIImage(const std::string& image_name, S32 priority)  {  	// look for existing image  	uuid_ui_image_map_t::iterator found_it = mUIImages.find(image_name); @@ -1310,18 +1320,24 @@ LLUIImagePtr LLUIImageList::getUIImage(const std::string& image_name)  		return found_it->second;  	} -	return loadUIImageByName(image_name, image_name); +	const BOOL use_mips = FALSE; +	const LLRect scale_rect = LLRect::null; +	return loadUIImageByName(image_name, image_name, use_mips, scale_rect, priority);  } -LLUIImagePtr LLUIImageList::loadUIImageByName(const std::string& name, const std::string& filename, BOOL use_mips, const LLRect& scale_rect) +LLUIImagePtr LLUIImageList::loadUIImageByName(const std::string& name, const std::string& filename, +											  BOOL use_mips, const LLRect& scale_rect, S32 boost_priority )  { -	LLViewerFetchedTexture* imagep = LLViewerTextureManager::getFetchedTextureFromFile(filename, MIPMAP_NO, IMMEDIATE_YES); +	if (boost_priority == 0) boost_priority = LLViewerFetchedTexture::BOOST_UI; +	LLViewerFetchedTexture* imagep = LLViewerTextureManager::getFetchedTextureFromFile(filename, MIPMAP_NO, boost_priority);  	return loadUIImage(imagep, name, use_mips, scale_rect);  } -LLUIImagePtr LLUIImageList::loadUIImageByID(const LLUUID& id, BOOL use_mips, const LLRect& scale_rect) +LLUIImagePtr LLUIImageList::loadUIImageByID(const LLUUID& id, +											BOOL use_mips, const LLRect& scale_rect, S32 boost_priority)  { -	LLViewerFetchedTexture* imagep = LLViewerTextureManager::getFetchedTexture(id, MIPMAP_NO, IMMEDIATE_YES); +	if (boost_priority == 0) boost_priority = LLViewerFetchedTexture::BOOST_UI; +	LLViewerFetchedTexture* imagep = LLViewerTextureManager::getFetchedTexture(id, MIPMAP_NO, boost_priority);  	return loadUIImage(imagep, id.asString(), use_mips, scale_rect);  } @@ -1332,11 +1348,11 @@ LLUIImagePtr LLUIImageList::loadUIImage(LLViewerFetchedTexture* imagep, const st  	imagep->setAddressMode(LLTexUnit::TAM_CLAMP);  	//all UI images are non-deletable -	imagep->setNoDelete() ; +	imagep->setNoDelete();  	LLUIImagePtr new_imagep = new LLUIImage(name, imagep);  	mUIImages.insert(std::make_pair(name, new_imagep)); -	mUITextureList.push_back(imagep) ; +	mUITextureList.push_back(imagep);  	LLUIImageLoadData* datap = new LLUIImageLoadData;  	datap->mImageName = name; diff --git a/indra/newview/llviewertexturelist.h b/indra/newview/llviewertexturelist.h index 11d1dd855f..fda57ce981 100644 --- a/indra/newview/llviewertexturelist.h +++ b/indra/newview/llviewertexturelist.h @@ -202,8 +202,8 @@ class LLUIImageList : public LLImageProviderInterface, public LLSingleton<LLUIIm  {  public:  	// LLImageProviderInterface -	LLUIImagePtr getUIImageByID(const LLUUID& id); -	LLUIImagePtr getUIImage(const std::string& name); +	/*virtual*/ LLUIImagePtr getUIImageByID(const LLUUID& id, S32 priority); +	/*virtual*/ LLUIImagePtr getUIImage(const std::string& name, S32 priority);  	void cleanUp();  	bool initFromFile(); @@ -212,8 +212,10 @@ public:  	static void onUIImageLoaded( BOOL success, LLViewerFetchedTexture *src_vi, LLImageRaw* src, LLImageRaw* src_aux, S32 discard_level, BOOL final, void* userdata );  private: -	LLUIImagePtr loadUIImageByName(const std::string& name, const std::string& filename, BOOL use_mips = FALSE, const LLRect& scale_rect = LLRect::null); -	LLUIImagePtr loadUIImageByID(const LLUUID& id, BOOL use_mips = FALSE, const LLRect& scale_rect = LLRect::null); +	LLUIImagePtr loadUIImageByName(const std::string& name, const std::string& filename, +								   BOOL use_mips = FALSE, const LLRect& scale_rect = LLRect::null, S32 boost_priority = 0); +	LLUIImagePtr loadUIImageByID(const LLUUID& id, +								 BOOL use_mips = FALSE, const LLRect& scale_rect = LLRect::null, S32 boost_priority = 0);  	LLUIImagePtr loadUIImage(LLViewerFetchedTexture* imagep, const std::string& name, BOOL use_mips = FALSE, const LLRect& scale_rect = LLRect::null); diff --git a/indra/newview/llworldmapview.cpp b/indra/newview/llworldmapview.cpp index 3aad5c7378..823db027ee 100644 --- a/indra/newview/llworldmapview.cpp +++ b/indra/newview/llworldmapview.cpp @@ -368,7 +368,7 @@ void LLWorldMapView::draw()  			continue;  		} -		current_image->setBoostLevel(LLViewerTexture::BOOST_MAP_LAYER); +		current_image->setBoostLevel(LLViewerTexture::BOOST_MAP);  		current_image->setKnownDrawSize(llround(pix_width * LLUI::sGLScaleFactor.mV[VX]), llround(pix_height * LLUI::sGLScaleFactor.mV[VY]));  		if (!current_image->hasGLTexture()) | 
