diff options
author | Richard Linden <none@none> | 2013-05-05 17:45:35 -0700 |
---|---|---|
committer | Richard Linden <none@none> | 2013-05-05 17:45:35 -0700 |
commit | 6b81b8629e67d82a7620e48781ded73b6e6126ea (patch) | |
tree | b029ca5925dd2eb0f6ccc952bf8d71dd23f45cf1 /indra/newview | |
parent | 41e5bf346eaa0a43646058691cc8090ddfe498e9 (diff) |
Spring cleaning: removed unused .cpp and.h files, and cleaned up header dependencies
Diffstat (limited to 'indra/newview')
61 files changed, 232 insertions, 278 deletions
diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp index 4e60127ef3..2e0fc039c4 100755 --- a/indra/newview/llagent.cpp +++ b/indra/newview/llagent.cpp @@ -2852,10 +2852,10 @@ BOOL LLAgent::isInGroup(const LLUUID& group_id, BOOL ignore_god_mode /* FALSE */ if (!ignore_god_mode && isGodlike()) return true; - S32 count = mGroups.count(); - for(S32 i = 0; i < count; ++i) + U32 count = mGroups.size(); + for(U32 i = 0; i < count; ++i) { - if(mGroups.get(i).mID == group_id) + if(mGroups[i].mID == group_id) { return TRUE; } @@ -2872,12 +2872,12 @@ BOOL LLAgent::hasPowerInGroup(const LLUUID& group_id, U64 power) const // GP_NO_POWERS can also mean no power is enough to grant an ability. if (GP_NO_POWERS == power) return FALSE; - S32 count = mGroups.count(); - for(S32 i = 0; i < count; ++i) + U32 count = mGroups.size(); + for(U32 i = 0; i < count; ++i) { - if(mGroups.get(i).mID == group_id) + if(mGroups[i].mID == group_id) { - return (BOOL)((mGroups.get(i).mPowers & power) > 0); + return (BOOL)((mGroups[i].mPowers & power) > 0); } } return FALSE; @@ -2893,12 +2893,12 @@ U64 LLAgent::getPowerInGroup(const LLUUID& group_id) const if (isGodlike()) return GP_ALL_POWERS; - S32 count = mGroups.count(); - for(S32 i = 0; i < count; ++i) + U32 count = mGroups.size(); + for(U32 i = 0; i < count; ++i) { - if(mGroups.get(i).mID == group_id) + if(mGroups[i].mID == group_id) { - return (mGroups.get(i).mPowers); + return (mGroups[i].mPowers); } } @@ -2907,12 +2907,12 @@ U64 LLAgent::getPowerInGroup(const LLUUID& group_id) const BOOL LLAgent::getGroupData(const LLUUID& group_id, LLGroupData& data) const { - S32 count = mGroups.count(); + S32 count = mGroups.size(); for(S32 i = 0; i < count; ++i) { - if(mGroups.get(i).mID == group_id) + if(mGroups[i].mID == group_id) { - data = mGroups.get(i); + data = mGroups[i]; return TRUE; } } @@ -2921,12 +2921,12 @@ BOOL LLAgent::getGroupData(const LLUUID& group_id, LLGroupData& data) const S32 LLAgent::getGroupContribution(const LLUUID& group_id) const { - S32 count = mGroups.count(); + S32 count = mGroups.size(); for(S32 i = 0; i < count; ++i) { - if(mGroups.get(i).mID == group_id) + if(mGroups[i].mID == group_id) { - S32 contribution = mGroups.get(i).mContribution; + S32 contribution = mGroups[i].mContribution; return contribution; } } @@ -2935,12 +2935,12 @@ S32 LLAgent::getGroupContribution(const LLUUID& group_id) const BOOL LLAgent::setGroupContribution(const LLUUID& group_id, S32 contribution) { - S32 count = mGroups.count(); + S32 count = mGroups.size(); for(S32 i = 0; i < count; ++i) { - if(mGroups.get(i).mID == group_id) + if(mGroups[i].mID == group_id) { - mGroups.get(i).mContribution = contribution; + mGroups[i].mContribution = contribution; LLMessageSystem* msg = gMessageSystem; msg->newMessage("SetGroupContribution"); msg->nextBlock("AgentData"); @@ -2958,13 +2958,13 @@ BOOL LLAgent::setGroupContribution(const LLUUID& group_id, S32 contribution) BOOL LLAgent::setUserGroupFlags(const LLUUID& group_id, BOOL accept_notices, BOOL list_in_profile) { - S32 count = mGroups.count(); + S32 count = mGroups.size(); for(S32 i = 0; i < count; ++i) { - if(mGroups.get(i).mID == group_id) + if(mGroups[i].mID == group_id) { - mGroups.get(i).mAcceptNotices = accept_notices; - mGroups.get(i).mListInProfile = list_in_profile; + mGroups[i].mAcceptNotices = accept_notices; + mGroups[i].mListInProfile = list_in_profile; LLMessageSystem* msg = gMessageSystem; msg->newMessage("SetGroupAcceptNotices"); msg->nextBlock("AgentData"); @@ -2984,7 +2984,7 @@ BOOL LLAgent::setUserGroupFlags(const LLUUID& group_id, BOOL accept_notices, BOO BOOL LLAgent::canJoinGroups() const { - return mGroups.count() < gMaxAgentGroups; + return (S32)mGroups.size() < gMaxAgentGroups; } LLQuaternion LLAgent::getHeadRotation() diff --git a/indra/newview/llagent.h b/indra/newview/llagent.h index a1e899b45d..f8dcfb9789 100644 --- a/indra/newview/llagent.h +++ b/indra/newview/llagent.h @@ -34,6 +34,7 @@ #include "llcharacter.h" #include "llcoordframe.h" // for mFrameAgent #include "llvoavatardefines.h" +#include "lldarray.h" #include <boost/function.hpp> #include <boost/shared_ptr.hpp> diff --git a/indra/newview/llagentwearables.cpp b/indra/newview/llagentwearables.cpp index e441f21f90..49e754a720 100644 --- a/indra/newview/llagentwearables.cpp +++ b/indra/newview/llagentwearables.cpp @@ -39,6 +39,7 @@ #include "llinventoryfunctions.h" #include "llinventoryobserver.h" #include "llinventorypanel.h" +#include "lllocaltextureobject.h" #include "llmd5.h" #include "llnotificationsutil.h" #include "lloutfitobserver.h" diff --git a/indra/newview/llavatariconctrl.cpp b/indra/newview/llavatariconctrl.cpp index b539ac38ed..5f5bded3ad 100755 --- a/indra/newview/llavatariconctrl.cpp +++ b/indra/newview/llavatariconctrl.cpp @@ -37,6 +37,7 @@ #include "lluictrlfactory.h" #include "llagentdata.h" #include "llimfloater.h" +#include "llviewertexture.h" // library includes #include "llavatarnamecache.h" diff --git a/indra/newview/llcallingcard.cpp b/indra/newview/llcallingcard.cpp index 0d55c4429a..c34c09bf87 100644 --- a/indra/newview/llcallingcard.cpp +++ b/indra/newview/llcallingcard.cpp @@ -32,13 +32,10 @@ #include "llcallingcard.h" -#include <vector> #include <algorithm> -//#include <iterator> #include "indra_constants.h" -#include "llavatarnamecache.h" -#include "llcachename.h" +//#include "llcachename.h" #include "llstl.h" #include "lltimer.h" #include "lluuid.h" @@ -46,18 +43,13 @@ #include "llagent.h" #include "llavatarnamecache.h" -#include "llbutton.h" #include "llinventoryobserver.h" #include "llinventorymodel.h" #include "llnotifications.h" -#include "llnotificationsutil.h" -#include "llresmgr.h" #include "llslurl.h" #include "llimview.h" #include "llviewercontrol.h" -#include "llviewernetwork.h" #include "llviewerobjectlist.h" -#include "llviewerwindow.h" #include "llvoavatar.h" #include "llavataractions.h" @@ -104,8 +96,6 @@ static void on_avatar_name_cache_notify(const LLUUID& agent_id, LLAvatarTracker::LLAvatarTracker() : mTrackingData(NULL), mTrackedAgentValid(false), - //mInventory(NULL), - //mInventoryObserver(NULL), mModifyMask(0x0) { } @@ -639,11 +629,11 @@ void LLAvatarTracker::processChange(LLMessageSystem* msg) payload["from_id"] = agent_id; if(LLRelationship::GRANT_MODIFY_OBJECTS & new_rights) { - LLNotificationsUtil::add("GrantedModifyRights",args, payload); + LLNotifications::instance().add("GrantedModifyRights",args, payload); } else { - LLNotificationsUtil::add("RevokedModifyRights",args, payload); + LLNotifications::instance().add("RevokedModifyRights",args, payload); } } (mBuddyInfo[agent_id])->setRightsFrom(new_rights); @@ -728,7 +718,7 @@ static void on_avatar_name_cache_notify(const LLUUID& agent_id, if (online) { notification = - LLNotificationsUtil::add("FriendOnline", + LLNotifications::instance().add("FriendOnline", args, payload.with("respond_on_mousedown", TRUE), boost::bind(&LLAvatarActions::startIM, agent_id)); @@ -736,7 +726,7 @@ static void on_avatar_name_cache_notify(const LLUUID& agent_id, else { notification = - LLNotificationsUtil::add("FriendOffline", args, payload); + LLNotifications::instance().add("FriendOffline", args, payload); } // If there's an open IM session with this agent, send a notification there too. diff --git a/indra/newview/lldrawable.cpp b/indra/newview/lldrawable.cpp index 4d72dd1343..dbd4142d44 100644 --- a/indra/newview/lldrawable.cpp +++ b/indra/newview/lldrawable.cpp @@ -79,7 +79,7 @@ LLTrace::MemStatHandle LLDrawable::sMemStat("LLDrawable"); // static U32 LLDrawable::sNumZombieDrawables = 0; F32 LLDrawable::sCurPixelAngle = 0; -LLDynamicArrayPtr<LLPointer<LLDrawable> > LLDrawable::sDeadList; +LLDynamicArray<LLPointer<LLDrawable>, 32 > LLDrawable::sDeadList; #define FORCE_INVISIBLE_AREA 16.f diff --git a/indra/newview/lldrawable.h b/indra/newview/lldrawable.h index 26796b92d0..e400a8b5f2 100644 --- a/indra/newview/lldrawable.h +++ b/indra/newview/lldrawable.h @@ -309,7 +309,7 @@ private: LLVector3 mCurrentScale; static U32 sNumZombieDrawables; - static LLDynamicArrayPtr<LLPointer<LLDrawable> > sDeadList; + static LLDynamicArray<LLPointer<LLDrawable>, 32> sDeadList; } LL_ALIGN_POSTFIX(16); diff --git a/indra/newview/lldrawpoolavatar.cpp b/indra/newview/lldrawpoolavatar.cpp index 294cecc703..67dbe6de8b 100644 --- a/indra/newview/lldrawpoolavatar.cpp +++ b/indra/newview/lldrawpoolavatar.cpp @@ -421,7 +421,7 @@ void LLDrawPoolAvatar::renderShadow(S32 pass) if (pass == 0) { - avatarp->renderSkinned(AVATAR_RENDER_PASS_SINGLE); + avatarp->renderSkinned(); } else { @@ -1246,7 +1246,7 @@ void LLDrawPoolAvatar::renderAvatars(LLVOAvatar* single_avatar, S32 pass) if( !single_avatar || (avatarp == single_avatar) ) { - avatarp->renderSkinned(AVATAR_RENDER_PASS_SINGLE); + avatarp->renderSkinned(); } } diff --git a/indra/newview/llface.h b/indra/newview/llface.h index 15c9e7856f..dda4bc9b3c 100644 --- a/indra/newview/llface.h +++ b/indra/newview/llface.h @@ -28,7 +28,6 @@ #define LL_LLFACE_H #include "llstrider.h" - #include "llrender.h" #include "v2math.h" #include "v3math.h" @@ -37,7 +36,6 @@ #include "v4coloru.h" #include "llquaternion.h" #include "xform.h" -#include "lldarrayptr.h" #include "llvertexbuffer.h" #include "llviewertexture.h" #include "lldrawable.h" @@ -47,10 +45,8 @@ class LLFacePool; class LLVolume; class LLViewerTexture; class LLTextureEntry; -class LLVertexProgram; -class LLViewerTexture; -class LLGeometryManager; class LLTextureAtlasSlot; +class LLDrawInfo; const F32 MIN_ALPHA_SIZE = 1024.f; const F32 MIN_TEX_ANIM_SIZE = 512.f; diff --git a/indra/newview/llfloateravatartextures.cpp b/indra/newview/llfloateravatartextures.cpp index 4e10b4fc2c..0fc9150314 100644 --- a/indra/newview/llfloateravatartextures.cpp +++ b/indra/newview/llfloateravatartextures.cpp @@ -36,6 +36,7 @@ #include "lluictrlfactory.h" #include "llviewerobjectlist.h" #include "llvoavatarself.h" +#include "lllocaltextureobject.h" using namespace LLVOAvatarDefines; diff --git a/indra/newview/llgroupiconctrl.cpp b/indra/newview/llgroupiconctrl.cpp index 2f9810775b..2bcee69b91 100644 --- a/indra/newview/llgroupiconctrl.cpp +++ b/indra/newview/llgroupiconctrl.cpp @@ -29,17 +29,7 @@ #include "llgroupiconctrl.h" #include "llagent.h" -/* -#include "llavatarconstants.h" -#include "llcallingcard.h" // for LLAvatarTracker -#include "llavataractions.h" -#include "llmenugl.h" -#include "lluictrlfactory.h" - -#include "llcachename.h" -#include "llagentdata.h" -#include "llimfloater.h" -*/ +#include "llviewertexture.h" static LLDefaultChildRegistry::Register<LLGroupIconCtrl> g_i("group_icon"); diff --git a/indra/newview/llgroupmgr.cpp b/indra/newview/llgroupmgr.cpp index 81eb1d397e..eb83015f4a 100644 --- a/indra/newview/llgroupmgr.cpp +++ b/indra/newview/llgroupmgr.cpp @@ -41,6 +41,7 @@ #include "llui.h" #include "message.h" #include "roles_constants.h" +#include "llhttpclient.h" #include "lltransactiontypes.h" #include "llstatusbar.h" #include "lleconomy.h" @@ -50,6 +51,7 @@ #include "llnotificationsutil.h" #include "lluictrlfactory.h" #include "lltrans.h" +#include "llviewerregion.h" #include <boost/regex.hpp> #if LL_MSVC diff --git a/indra/newview/llhudicon.h b/indra/newview/llhudicon.h index 644daa0299..2bbc9c839d 100644 --- a/indra/newview/llhudicon.h +++ b/indra/newview/llhudicon.h @@ -28,7 +28,6 @@ #define LL_LLHUDICON_H #include "llpointer.h" -#include "lldarrayptr.h" #include "llhudobject.h" #include "v4color.h" @@ -42,8 +41,6 @@ #include "lldarray.h" // Renders a 2D icon billboard floating at the location specified. -class LLDrawable; -class LLViewerObject; class LLViewerTexture; class LLHUDIcon : public LLHUDObject diff --git a/indra/newview/llhudmanager.h b/indra/newview/llhudmanager.h index 09e79acbfc..effea8f034 100644 --- a/indra/newview/llhudmanager.h +++ b/indra/newview/llhudmanager.h @@ -30,13 +30,9 @@ // Responsible for managing all HUD elements. #include "llhudobject.h" -#include "lldarrayptr.h" +#include "lldarray.h" -class LLViewerObject; class LLHUDEffect; -//Ventrella 9/16/05 -class LLHUDAnimalControls; -// End Ventrella class LLMessageSystem; class LLHUDManager : public LLSingleton<LLHUDManager> @@ -59,7 +55,7 @@ public: static LLColor4 sChildColor; protected: - LLDynamicArrayPtr<LLPointer<LLHUDEffect> > mHUDEffects; + LLDynamicArray<LLPointer<LLHUDEffect>, 32> mHUDEffects; }; #endif // LL_LLHUDMANAGER_H diff --git a/indra/newview/llimfloater.cpp b/indra/newview/llimfloater.cpp index 63eedcdfea..f68012e306 100644 --- a/indra/newview/llimfloater.cpp +++ b/indra/newview/llimfloater.cpp @@ -38,6 +38,7 @@ #include "llchiclet.h" #include "llchicletbar.h" #include "llfloaterreg.h" +#include "llhttpclient.h" #include "llimfloatercontainer.h" // to replace separate IM Floaters with multifloater container #include "llinventoryfunctions.h" #include "lllayoutstack.h" @@ -49,6 +50,7 @@ #include "lltrans.h" #include "llchathistory.h" #include "llnotifications.h" +#include "llviewerregion.h" #include "llviewerwindow.h" #include "llvoicechannel.h" #include "lltransientfloatermgr.h" diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp index 4000570872..080e1e7ad6 100644 --- a/indra/newview/llimview.cpp +++ b/indra/newview/llimview.cpp @@ -63,6 +63,7 @@ #include "lltoolbarview.h" #include "llviewercontrol.h" #include "llviewerparcelmgr.h" +#include "llviewerregion.h" const static std::string ADHOC_NAME_SUFFIX(" Conference"); diff --git a/indra/newview/llimview.h b/indra/newview/llimview.h index 7c2cd03d97..3b97ad0901 100644 --- a/indra/newview/llimview.h +++ b/indra/newview/llimview.h @@ -33,13 +33,12 @@ #include "lllogchat.h" #include "llvoicechannel.h" - +#include "lldarray.h" class LLAvatarName; class LLFriendObserver; class LLCallDialogManager; class LLIMSpeakerMgr; - /** * Timeout Timer for outgoing Ad-Hoc/Group IM sessions which being initialized by the server */ diff --git a/indra/newview/llinspectavatar.cpp b/indra/newview/llinspectavatar.cpp index 17d0b0ffbb..4f727bbd7d 100644 --- a/indra/newview/llinspectavatar.cpp +++ b/indra/newview/llinspectavatar.cpp @@ -37,6 +37,7 @@ #include "lldateutil.h" #include "llfloaterreporter.h" #include "llfloaterworldmap.h" +#include "llhttpclient.h" #include "llimview.h" #include "llinspect.h" #include "llmutelist.h" @@ -46,6 +47,7 @@ #include "llviewermenu.h" #include "llvoiceclient.h" #include "llviewerobjectlist.h" +#include "llviewerregion.h" #include "lltransientfloatermgr.h" #include "llnotificationsutil.h" diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index 949de312be..927ae090c6 100644 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -68,6 +68,7 @@ #include "llviewermenu.h" #include "llviewermessage.h" #include "llviewerobjectlist.h" +#include "llviewerregion.h" #include "llviewerwindow.h" #include "llvoavatarself.h" #include "llwearablelist.h" diff --git a/indra/newview/llinventoryicon.cpp b/indra/newview/llinventoryicon.cpp index 34734d57c5..0684734111 100644 --- a/indra/newview/llinventoryicon.cpp +++ b/indra/newview/llinventoryicon.cpp @@ -30,6 +30,7 @@ #include "lldictionary.h" #include "llinventorydefines.h" #include "llui.h" +#include "lluiimage.h" #include "llwearabletype.h" struct IconEntry : public LLDictionaryEntry @@ -47,6 +48,8 @@ public: LLIconDictionary(); }; +typedef LLPointer<LLUIImage> LLUIImagePtr; + LLIconDictionary::LLIconDictionary() { addEntry(LLInventoryIcon::ICONNAME_TEXTURE, new IconEntry("Inv_Texture")); diff --git a/indra/newview/llinventoryicon.h b/indra/newview/llinventoryicon.h index c7e2998a20..cbcddc26a9 100644 --- a/indra/newview/llinventoryicon.h +++ b/indra/newview/llinventoryicon.h @@ -30,7 +30,6 @@ #include "llassettype.h" #include "llinventorytype.h" -#include "lluiimage.h" class LLInventoryIcon { @@ -87,11 +86,11 @@ public: BOOL item_is_multi = FALSE); static const std::string& getIconName(EIconName idx); - static LLUIImagePtr getIcon(LLAssetType::EType asset_type, + static LLPointer<class LLUIImage> getIcon(LLAssetType::EType asset_type, LLInventoryType::EType inventory_type = LLInventoryType::IT_NONE, U32 misc_flag = 0, // different meanings depending on item type BOOL item_is_multi = FALSE); - static LLUIImagePtr getIcon(EIconName idx); + static LLPointer<class LLUIImage> getIcon(EIconName idx); protected: static EIconName assignWearableIcon(U32 misc_flag); diff --git a/indra/newview/llinventorymodel.h b/indra/newview/llinventorymodel.h index 8382e875b4..88463c4aa9 100644 --- a/indra/newview/llinventorymodel.h +++ b/indra/newview/llinventorymodel.h @@ -31,7 +31,7 @@ #include "llfoldertype.h" #include "lldarray.h" #include "llframetimer.h" -#include "llhttpclient.h" +#include "llcurl.h" #include "lluuid.h" #include "llpermissionsflags.h" #include "llstring.h" @@ -79,7 +79,7 @@ public: typedef LLDynamicArray<LLPointer<LLViewerInventoryItem> > item_array_t; typedef std::set<LLUUID> changed_items_t; - class fetchInventoryResponder : public LLHTTPClient::Responder + class fetchInventoryResponder : public LLCurl::Responder { public: fetchInventoryResponder(const LLSD& request_sd) : mRequestSD(request_sd) {}; diff --git a/indra/newview/lllocalbitmaps.cpp b/indra/newview/lllocalbitmaps.cpp index 97ba5b634a..ce04629104 100644 --- a/indra/newview/lllocalbitmaps.cpp +++ b/indra/newview/lllocalbitmaps.cpp @@ -48,6 +48,7 @@ /* misc headers */ #include "llscrolllistctrl.h" #include "llfilepicker.h" +#include "lllocaltextureobject.h" #include "llviewertexturelist.h" #include "llviewerobjectlist.h" #include "llviewerobject.h" diff --git a/indra/newview/lllocalbitmaps.h b/indra/newview/lllocalbitmaps.h index 7a23c7ef6e..f99fc66f4b 100644 --- a/indra/newview/lllocalbitmaps.h +++ b/indra/newview/lllocalbitmaps.h @@ -33,6 +33,8 @@ #include "llvoavatardefines.h" class LLScrollListCtrl; +class LLImageRaw; +class LLViewerObject; class LLLocalBitmap { diff --git a/indra/newview/llpanelclassified.cpp b/indra/newview/llpanelclassified.cpp index 6889b98ab1..a86f722db9 100644 --- a/indra/newview/llpanelclassified.cpp +++ b/indra/newview/llpanelclassified.cpp @@ -52,6 +52,7 @@ #include "llfloaterworldmap.h" #include "llviewergenericmessage.h" // send_generic_message #include "llviewerregion.h" +#include "llviewertexture.h" #include "lltrans.h" #include "llscrollcontainer.h" #include "llstatusbar.h" diff --git a/indra/newview/llpaneleditwearable.cpp b/indra/newview/llpaneleditwearable.cpp index 6b9edcb07c..79713ddb12 100644 --- a/indra/newview/llpaneleditwearable.cpp +++ b/indra/newview/llpaneleditwearable.cpp @@ -30,6 +30,7 @@ #include "llpanel.h" #include "llwearable.h" #include "lluictrl.h" +#include "lllocaltextureobject.h" #include "llscrollingpanellist.h" #include "llvisualparam.h" #include "lltoolmorph.h" diff --git a/indra/newview/llpanelpeople.h b/indra/newview/llpanelpeople.h index 46c58cd139..76f260cca1 100644 --- a/indra/newview/llpanelpeople.h +++ b/indra/newview/llpanelpeople.h @@ -38,6 +38,7 @@ class LLFilterEditor; class LLGroupList; class LLMenuButton; class LLTabContainer; +class LLNetMap; class LLPanelPeople : public LLPanel diff --git a/indra/newview/llpanelprofile.cpp b/indra/newview/llpanelprofile.cpp index e2e7006773..435797bf80 100755 --- a/indra/newview/llpanelprofile.cpp +++ b/indra/newview/llpanelprofile.cpp @@ -36,6 +36,7 @@ #include "lltabcontainer.h" #include "llviewercontrol.h" #include "llviewernetwork.h" +#include "llweb.h" static const std::string PANEL_PICKS = "panel_picks"; diff --git a/indra/newview/llpanelvoiceeffect.cpp b/indra/newview/llpanelvoiceeffect.cpp index 5fec6d967d..59ed53815b 100644 --- a/indra/newview/llpanelvoiceeffect.cpp +++ b/indra/newview/llpanelvoiceeffect.cpp @@ -35,6 +35,7 @@ #include "lltrans.h" #include "lltransientfloatermgr.h" #include "llvoiceclient.h" +#include "llweb.h" static LLRegisterPanelClassWrapper<LLPanelVoiceEffect> t_panel_voice_effect("panel_voice_effect"); diff --git a/indra/newview/llspeakers.cpp b/indra/newview/llspeakers.cpp index 07d2f1ad6f..5ad8165a72 100644 --- a/indra/newview/llspeakers.cpp +++ b/indra/newview/llspeakers.cpp @@ -33,7 +33,9 @@ #include "llimview.h" #include "llsdutil.h" #include "lluicolortable.h" +#include "llhttpclient.h" #include "llviewerobjectlist.h" +#include "llviewerregion.h" #include "llvoavatar.h" #include "llworld.h" diff --git a/indra/newview/lltexlayer.cpp b/indra/newview/lltexlayer.cpp index d6cd881894..1c2bbbed27 100644 --- a/indra/newview/lltexlayer.cpp +++ b/indra/newview/lltexlayer.cpp @@ -31,6 +31,7 @@ #include "llagent.h" #include "llimagej2c.h" #include "llimagetga.h" +#include "lllocaltextureobject.h" #include "llnotificationsutil.h" #include "llvfile.h" #include "llvfs.h" diff --git a/indra/newview/lltoolpie.cpp b/indra/newview/lltoolpie.cpp index a0c12df834..61d879278d 100644 --- a/indra/newview/lltoolpie.cpp +++ b/indra/newview/lltoolpie.cpp @@ -42,6 +42,7 @@ #include "llfloaterscriptdebug.h" #include "lltooltip.h" #include "llhudeffecttrail.h" +#include "llhudicon.h" #include "llhudmanager.h" #include "llkeyboard.h" #include "llmediaentry.h" diff --git a/indra/newview/lltoolselect.cpp b/indra/newview/lltoolselect.cpp index 7c604a04bf..0a9153eecb 100644 --- a/indra/newview/lltoolselect.cpp +++ b/indra/newview/lltoolselect.cpp @@ -32,6 +32,7 @@ #include "llagentcamera.h" #include "llviewercontrol.h" #include "lldrawable.h" +#include "llhudicon.h" #include "llmanip.h" #include "llmenugl.h" #include "llselectmgr.h" diff --git a/indra/newview/llviewerassetstats.h b/indra/newview/llviewerassetstats.h index 5b25d791a9..56eaa13df9 100644 --- a/indra/newview/llviewerassetstats.h +++ b/indra/newview/llviewerassetstats.h @@ -38,6 +38,7 @@ #include "llsd.h" #include "llvoavatar.h" #include "lltrace.h" +#include "llinitparam.h" /** * @class LLViewerAssetStats diff --git a/indra/newview/llvieweraudio.cpp b/indra/newview/llvieweraudio.cpp index 8d8c401dac..4e97dfb201 100644 --- a/indra/newview/llvieweraudio.cpp +++ b/indra/newview/llvieweraudio.cpp @@ -36,6 +36,7 @@ #include "llviewerwindow.h" #include "llvoiceclient.h" #include "llviewermedia.h" +#include "llviewerregion.h" #include "llprogressview.h" #include "llcallbacklist.h" #include "llstartup.h" diff --git a/indra/newview/llviewerjointmesh.cpp b/indra/newview/llviewerjointmesh.cpp index 5d1aa870a3..1850ed45d1 100644 --- a/indra/newview/llviewerjointmesh.cpp +++ b/indra/newview/llviewerjointmesh.cpp @@ -128,7 +128,6 @@ BOOL LLSkinJoint::setupSkinJoint( LLViewerJoint *joint) //----------------------------------------------------------------------------- BOOL LLViewerJointMesh::sPipelineRender = FALSE; -EAvatarRenderPass LLViewerJointMesh::sRenderPass = AVATAR_RENDER_PASS_SINGLE; U32 LLViewerJointMesh::sClothingMaskImageName = 0; LLColor4 LLViewerJointMesh::sClothingInnerColor; diff --git a/indra/newview/llviewerjointmesh.h b/indra/newview/llviewerjointmesh.h index dd5dae1dc1..614d87f2b1 100644 --- a/indra/newview/llviewerjointmesh.h +++ b/indra/newview/llviewerjointmesh.h @@ -37,13 +37,6 @@ class LLFace; class LLCharacter; class LLTexLayerSet; -typedef enum e_avatar_render_pass -{ - AVATAR_RENDER_PASS_SINGLE, - AVATAR_RENDER_PASS_CLOTHING_INNER, - AVATAR_RENDER_PASS_CLOTHING_OUTER -} EAvatarRenderPass; - class LLSkinJoint { public: @@ -84,7 +77,6 @@ public: static BOOL sPipelineRender; //RN: this is here for testing purposes static U32 sClothingMaskImageName; - static EAvatarRenderPass sRenderPass; static LLColor4 sClothingInnerColor; public: diff --git a/indra/newview/llviewerobject.cpp b/indra/newview/llviewerobject.cpp index ef28c3ad53..50b14183c7 100644 --- a/indra/newview/llviewerobject.cpp +++ b/indra/newview/llviewerobject.cpp @@ -39,6 +39,7 @@ #include "llfloaterreg.h" #include "llfontgl.h" #include "llframetimer.h" +#include "llhudicon.h" #include "llinventory.h" #include "llinventorydefines.h" #include "llmaterialtable.h" diff --git a/indra/newview/llviewerobject.h b/indra/newview/llviewerobject.h index 942eb67823..536106fb1e 100644 --- a/indra/newview/llviewerobject.h +++ b/indra/newview/llviewerobject.h @@ -30,8 +30,7 @@ #include <map> #include "llassetstorage.h" -#include "lldarrayptr.h" -#include "llhudicon.h" +//#include "llhudicon.h" #include "llinventory.h" #include "llrefcount.h" #include "llprimitive.h" @@ -43,34 +42,30 @@ #include "v3math.h" #include "llvertexbuffer.h" #include "llbbox.h" -#include "llbbox.h" class LLAgent; // TODO: Get rid of this. class LLAudioSource; class LLAudioSourceVO; -class LLDataPacker; class LLColor4; -class LLFrameTimer; +class LLDataPacker; +class LLDataPackerBinaryBuffer; class LLDrawable; -class LLHost; class LLHUDText; -class LLWorld; -class LLNameValue; -class LLNetMap; +class LLHost; class LLMessageSystem; +class LLNameValue; class LLPartSysData; -class LLPrimitive; class LLPipeline; class LLTextureEntry; -class LLViewerTexture; +class LLVOAvatar; +class LLVOInventoryListener; class LLViewerInventoryItem; class LLViewerObject; +class LLViewerObjectMedia; class LLViewerPartSourceScript; class LLViewerRegion; -class LLViewerObjectMedia; -class LLVOInventoryListener; -class LLVOAvatar; -class LLDataPackerBinaryBuffer; +class LLViewerTexture; +class LLWorld; typedef enum e_object_update_type { @@ -645,7 +640,7 @@ public: // TODO: Make all this stuff private. JC LLPointer<LLHUDText> mText; - LLPointer<LLHUDIcon> mIcon; + LLPointer<class LLHUDIcon> mIcon; static BOOL sUseSharedDrawables; static LLTrace::MemStatHandle sMemStat; diff --git a/indra/newview/llviewerobjectlist.cpp b/indra/newview/llviewerobjectlist.cpp index 4d0d3e8718..6ffd3d8fa4 100644 --- a/indra/newview/llviewerobjectlist.cpp +++ b/indra/newview/llviewerobjectlist.cpp @@ -47,6 +47,7 @@ #include "lltooltip.h" #include "llworld.h" #include "llstring.h" +#include "llhudicon.h" #include "llhudnametag.h" #include "lldrawable.h" #include "llflexibleobject.h" @@ -2275,3 +2276,10 @@ bool LLViewerObjectList::OrphanInfo::operator!=(const OrphanInfo &rhs) const } +LLDebugBeacon::~LLDebugBeacon() +{ + if (mHUDObject.notNull()) + { + mHUDObject->markDead(); + } +} diff --git a/indra/newview/llviewerobjectlist.h b/indra/newview/llviewerobjectlist.h index a7a4969768..65447156e7 100644 --- a/indra/newview/llviewerobjectlist.h +++ b/indra/newview/llviewerobjectlist.h @@ -237,20 +237,14 @@ protected: class LLDebugBeacon { public: - ~LLDebugBeacon() - { - if (mHUDObject.notNull()) - { - mHUDObject->markDead(); - } - } + ~LLDebugBeacon(); LLVector3 mPositionAgent; std::string mString; LLColor4 mColor; LLColor4 mTextColor; S32 mLineWidth; - LLPointer<LLHUDObject> mHUDObject; + LLPointer<class LLHUDObject> mHUDObject; }; diff --git a/indra/newview/llvieweroctree.cpp b/indra/newview/llvieweroctree.cpp index 926d791d1f..0eb1745cd5 100644 --- a/indra/newview/llvieweroctree.cpp +++ b/indra/newview/llvieweroctree.cpp @@ -331,6 +331,7 @@ LLviewerOctreeGroup::~LLviewerOctreeGroup() { LLViewerRegion::sCurRegionp->clearVisibleGroup(this); } + llassert(LLViewerRegion::sCurRegionp->hasVisibleGroup(this) == false); } LLviewerOctreeGroup::LLviewerOctreeGroup(OctreeNode* node) : diff --git a/indra/newview/llvieweroctree.h b/indra/newview/llvieweroctree.h index b6faf4c7ba..2f601d66f3 100644 --- a/indra/newview/llvieweroctree.h +++ b/indra/newview/llvieweroctree.h @@ -78,9 +78,6 @@ public: void setGroup(LLviewerOctreeGroup* group); void removeData(LLViewerOctreeEntryData* data); - LLViewerOctreeEntryData* getData(U32 data_type)const {return mData[data_type];} - bool hasData(U32 data_type)const {return mData[data_type] != NULL;} - LLViewerOctreeEntryData* getDrawable() const {return mData[LLDRAWABLE];} bool hasDrawable() const {return mData[LLDRAWABLE] != NULL;} LLViewerOctreeEntryData* getVOCacheEntry() const {return mData[LLVOCACHEENTRY];} diff --git a/indra/newview/llviewerpartsim.h b/indra/newview/llviewerpartsim.h index 27bfcd4343..5c71b4c49e 100644 --- a/indra/newview/llviewerpartsim.h +++ b/indra/newview/llviewerpartsim.h @@ -27,7 +27,6 @@ #ifndef LL_LLVIEWERPARTSIM_H #define LL_LLVIEWERPARTSIM_H -#include "lldarrayptr.h" #include "llframetimer.h" #include "llpointer.h" #include "llpartdata.h" @@ -36,7 +35,6 @@ class LLViewerTexture; class LLViewerPart; class LLViewerRegion; -class LLViewerTexture; class LLVOPartGroup; #define LL_MAX_PARTICLE_COUNT 8192 diff --git a/indra/newview/llviewerprecompiledheaders.h b/indra/newview/llviewerprecompiledheaders.h index cafe28356d..137849234d 100644 --- a/indra/newview/llviewerprecompiledheaders.h +++ b/indra/newview/llviewerprecompiledheaders.h @@ -54,11 +54,9 @@ // Library headers from llcommon project: #include "bitpack.h" -#include "lldeleteutils.h" #include "imageids.h" #include "indra_constants.h" #include "llinitparam.h" - #include "llallocator.h" #include "llapp.h" #include "llcriticaldamp.h" @@ -67,11 +65,7 @@ #include "llerror.h" #include "llfasttimer.h" #include "llframetimer.h" -#include "llhash.h" -#include "lllocalidhashmap.h" -#include "llnametable.h" #include "llpointer.h" -#include "llpriqueuemap.h" #include "llprocessor.h" #include "llrefcount.h" #include "llsafehandle.h" diff --git a/indra/newview/llviewerregion.cpp b/indra/newview/llviewerregion.cpp index a2ff232d02..e85c566394 100644 --- a/indra/newview/llviewerregion.cpp +++ b/indra/newview/llviewerregion.cpp @@ -94,28 +94,29 @@ typedef std::map<std::string, std::string> CapabilityMap; class LLViewerRegionImpl { public: LLViewerRegionImpl(LLViewerRegion * region, LLHost const & host) - : mHost(host), - mCompositionp(NULL), - mEventPoll(NULL), - mSeedCapMaxAttempts(MAX_CAP_REQUEST_ATTEMPTS), - mSeedCapMaxAttemptsBeforeLogin(MAX_SEED_CAP_ATTEMPTS_BEFORE_LOGIN), - mSeedCapAttempts(0), - mHttpResponderID(0), - mLastCameraUpdate(0), - mLastCameraOrigin(), - // I'd prefer to set the LLCapabilityListener name to match the region - // name -- it's disappointing that's not available at construction time. - // We could instead store an LLCapabilityListener*, making - // setRegionNameAndZone() replace the instance. Would that pose - // consistency problems? Can we even request a capability before calling - // setRegionNameAndZone()? - // For testability -- the new Michael Feathers paradigm -- - // LLCapabilityListener binds all the globals it expects to need at - // construction time. - mCapabilityListener(host.getString(), gMessageSystem, *region, - gAgent.getID(), gAgent.getSessionID()) - { - } + : mHost(host), + mCompositionp(NULL), + mEventPoll(NULL), + mSeedCapMaxAttempts(MAX_CAP_REQUEST_ATTEMPTS), + mSeedCapMaxAttemptsBeforeLogin(MAX_SEED_CAP_ATTEMPTS_BEFORE_LOGIN), + mSeedCapAttempts(0), + mHttpResponderID(0), + mLastCameraUpdate(0), + mLastCameraOrigin(), + mVOCachePartition(NULL), + mLandp(NULL), + // I'd prefer to set the LLCapabilityListener name to match the region + // name -- it's disappointing that's not available at construction time. + // We could instead store an LLCapabilityListener*, making + // setRegionNameAndZone() replace the instance. Would that pose + // consistency problems? Can we even request a capability before calling + // setRegionNameAndZone()? + // For testability -- the new Michael Feathers paradigm -- + // LLCapabilityListener binds all the globals it expects to need at + // construction time. + mCapabilityListener(host.getString(), gMessageSystem, *region, + gAgent.getID(), gAgent.getSessionID()) + {} void buildCapabilityNames(LLSD& capabilityNames); @@ -439,7 +440,7 @@ void LLViewerRegion::loadObjectCache() // Presume success. If it fails, we don't want to try again. mCacheLoaded = TRUE; - if(LLVOCache::hasInstance()) + if(LLVOCache::instanceExists()) { LLVOCache::getInstance()->readFromCache(mHandle, mImpl->mCacheID, mImpl->mCacheMap) ; if (mImpl->mCacheMap.empty()) @@ -462,7 +463,7 @@ void LLViewerRegion::saveObjectCache() return; } - if(LLVOCache::hasInstance()) + if(LLVOCache::instanceExists()) { const F32 start_time_threshold = 600.0f; //seconds bool removal_enabled = sVOCacheCullingEnabled && (mRegionTimer.getElapsedTimeF32() > start_time_threshold); //allow to remove invalid objects from object cache file. @@ -755,7 +756,7 @@ void LLViewerRegion::replaceCacheEntry(LLVOCacheEntry* old_entry, LLVOCacheEntry if(old_entry) { - old_entry->copyTo(new_entry); + old_entry->moveTo(new_entry); state = old_entry->getState(); in_vo_tree = (state == LLVOCacheEntry::INACTIVE && old_entry->getGroup() != NULL); killCacheEntry(old_entry); @@ -942,6 +943,11 @@ void LLViewerRegion::addVisibleCacheEntry(LLVOCacheEntry* entry) mImpl->mVisibleEntries.insert(entry); } +bool LLViewerRegion::hasVisibleGroup(LLviewerOctreeGroup* group) +{ + return mImpl->mVisibleGroups.find(group) != mImpl->mVisibleGroups.end(); +} + void LLViewerRegion::clearVisibleGroup(LLviewerOctreeGroup* group) { if(mDead) diff --git a/indra/newview/llviewerregion.h b/indra/newview/llviewerregion.h index 410c903f18..a73898317b 100644 --- a/indra/newview/llviewerregion.h +++ b/indra/newview/llviewerregion.h @@ -225,6 +225,7 @@ public: void removeActiveCacheEntry(LLVOCacheEntry* entry, LLDrawable* drawablep); void killCacheEntry(U32 local_id); //physically delete the cache entry void clearVisibleGroup(LLviewerOctreeGroup* group); + bool hasVisibleGroup(LLviewerOctreeGroup* group); // Like idleUpdate, but forces everything to complete regardless of // how long it takes. diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index fea44a38c6..08d296b88e 100755 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -38,6 +38,7 @@ #include "llagent.h" #include "llagentcamera.h" #include "llfloaterreg.h" +#include "llhudicon.h" #include "llmeshrepository.h" #include "llpanellogin.h" #include "llviewerkeyboard.h" diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index 5a07cdf7c9..1381cf9314 100644 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -55,7 +55,6 @@ #include "lldriverparam.h" #include "lleditingmotion.h" #include "llemote.h" -//#include "llfirstuse.h" #include "llfloatertools.h" #include "llheadrotmotion.h" #include "llhudeffecttrail.h" @@ -80,10 +79,12 @@ #include "lltexlayer.h" #include "lltoolmorph.h" #include "llviewercamera.h" +#include "llviewerjointmesh.h" #include "llviewertexturelist.h" #include "llviewermenu.h" #include "llviewerobjectlist.h" #include "llviewerparcelmgr.h" +#include "llviewerregion.h" #include "llviewershadermgr.h" #include "llviewerstats.h" #include "llvoavatarself.h" @@ -216,6 +217,24 @@ struct LLTextureMaskData S32 mLastDiscardLevel; }; +// Simple utility functions to eventually replace the common 2-line +// idiom scattered throughout the viewer codebase. Note that where +// possible we would rather be using smart pointers of some sort. + +template <class T> +inline void delete_and_clear(T*& ptr) +{ + delete ptr; + ptr = NULL; +} + +template <class T> +inline void delete_and_clear_array(T*& array_ptr) +{ + delete[] array_ptr; + array_ptr = NULL; +} + /********************************************************************************* ** ** ** Begin private LLVOAvatar Support classes @@ -824,14 +843,14 @@ LLVOAvatar::~LLVOAvatar() mRoot.removeAllChildren(); mJointMap.clear(); - deleteAndClearArray(mSkeleton); - deleteAndClearArray(mCollisionVolumes); + delete_and_clear_array(mSkeleton); + delete_and_clear_array(mCollisionVolumes); mNumJoints = 0; for (U32 i = 0; i < mBakedTextureDatas.size(); i++) { - deleteAndClear(mBakedTextureDatas[i].mTexLayerSet); + delete_and_clear(mBakedTextureDatas[i].mTexLayerSet); mBakedTextureDatas[i].mMeshes.clear(); for (morph_list_t::iterator iter2 = mBakedTextureDatas[i].mMaskedMorphs.begin(); @@ -845,9 +864,9 @@ LLVOAvatar::~LLVOAvatar() std::for_each(mAttachmentPoints.begin(), mAttachmentPoints.end(), DeletePairedPointer()); mAttachmentPoints.clear(); - deleteAndClear(mTexSkinColor); - deleteAndClear(mTexHairColor); - deleteAndClear(mTexEyeColor); + delete_and_clear(mTexSkinColor); + delete_and_clear(mTexHairColor); + delete_and_clear(mTexEyeColor); std::for_each(mMeshes.begin(), mMeshes.end(), DeletePairedPointer()); mMeshes.clear(); @@ -1234,7 +1253,7 @@ void LLVOAvatar::initClass() // parse avatar_lad.xml if (sAvatarXmlInfo) { //this can happen if a login attempt failed - deleteAndClear(sAvatarXmlInfo); + delete_and_clear(sAvatarXmlInfo); } sAvatarXmlInfo = new LLVOAvatarXmlInfo; if (!sAvatarXmlInfo->parseXmlSkeletonNode(root)) @@ -1278,7 +1297,7 @@ void LLVOAvatar::initClass() void LLVOAvatar::cleanupClass() { - deleteAndClear(sAvatarXmlInfo); + delete_and_clear(sAvatarXmlInfo); sSkeletonXMLTree.cleanup(); sXMLTree.cleanup(); } @@ -4188,7 +4207,7 @@ U32 LLVOAvatar::renderSkinnedAttachments() //----------------------------------------------------------------------------- // renderSkinned() //----------------------------------------------------------------------------- -U32 LLVOAvatar::renderSkinned(EAvatarRenderPass pass) +U32 LLVOAvatar::renderSkinned() { U32 num_indices = 0; @@ -4324,57 +4343,50 @@ U32 LLVOAvatar::renderSkinned(EAvatarRenderPass pass) //-------------------------------------------------------------------- // render all geometry attached to the skeleton //-------------------------------------------------------------------- - LLViewerJointMesh::sRenderPass = pass; - - if (pass == AVATAR_RENDER_PASS_SINGLE) - { - bool should_alpha_mask = shouldAlphaMask(); - LLGLState test(GL_ALPHA_TEST, should_alpha_mask); + bool should_alpha_mask = shouldAlphaMask(); + LLGLState test(GL_ALPHA_TEST, should_alpha_mask); - if (should_alpha_mask && !LLGLSLShader::sNoFixedFunction) - { - gGL.setAlphaRejectSettings(LLRender::CF_GREATER, 0.5f); - } + if (should_alpha_mask && !LLGLSLShader::sNoFixedFunction) + { + gGL.setAlphaRejectSettings(LLRender::CF_GREATER, 0.5f); + } - BOOL first_pass = TRUE; - if (!LLDrawPoolAvatar::sSkipOpaque) + BOOL first_pass = TRUE; + if (!LLDrawPoolAvatar::sSkipOpaque) + { + if (!isSelf() || gAgent.needsRenderHead() || LLPipeline::sShadowRender) { - if (!isSelf() || gAgent.needsRenderHead() || LLPipeline::sShadowRender) + if (isTextureVisible(TEX_HEAD_BAKED) || mIsDummy) { - if (isTextureVisible(TEX_HEAD_BAKED) || mIsDummy) - { - num_indices += mMeshLOD[MESH_ID_HEAD]->render(mAdjustedPixelArea, TRUE, mIsDummy); - first_pass = FALSE; - } - } - if (isTextureVisible(TEX_UPPER_BAKED) || mIsDummy) - { - num_indices += mMeshLOD[MESH_ID_UPPER_BODY]->render(mAdjustedPixelArea, first_pass, mIsDummy); - first_pass = FALSE; - } - - if (isTextureVisible(TEX_LOWER_BAKED) || mIsDummy) - { - num_indices += mMeshLOD[MESH_ID_LOWER_BODY]->render(mAdjustedPixelArea, first_pass, mIsDummy); + num_indices += mMeshLOD[MESH_ID_HEAD]->render(mAdjustedPixelArea, TRUE, mIsDummy); first_pass = FALSE; } } - - if (should_alpha_mask && !LLGLSLShader::sNoFixedFunction) + if (isTextureVisible(TEX_UPPER_BAKED) || mIsDummy) { - gGL.setAlphaRejectSettings(LLRender::CF_DEFAULT); + num_indices += mMeshLOD[MESH_ID_UPPER_BODY]->render(mAdjustedPixelArea, first_pass, mIsDummy); + first_pass = FALSE; } - - if (!LLDrawPoolAvatar::sSkipTransparent || LLPipeline::sImpostorRender) + + if (isTextureVisible(TEX_LOWER_BAKED) || mIsDummy) { - LLGLState blend(GL_BLEND, !mIsDummy); - LLGLState test(GL_ALPHA_TEST, !mIsDummy); - num_indices += renderTransparent(first_pass); + num_indices += mMeshLOD[MESH_ID_LOWER_BODY]->render(mAdjustedPixelArea, first_pass, mIsDummy); + first_pass = FALSE; } } - - LLViewerJointMesh::sRenderPass = AVATAR_RENDER_PASS_SINGLE; + + if (should_alpha_mask && !LLGLSLShader::sNoFixedFunction) + { + gGL.setAlphaRejectSettings(LLRender::CF_DEFAULT); + } + + if (!LLDrawPoolAvatar::sSkipTransparent || LLPipeline::sImpostorRender) + { + LLGLState blend(GL_BLEND, !mIsDummy); + LLGLState test(GL_ALPHA_TEST, !mIsDummy); + num_indices += renderTransparent(first_pass); + } return num_indices; } @@ -5331,7 +5343,7 @@ LLVector3 LLVOAvatar::getPosAgentFromGlobal(const LLVector3d &position) //----------------------------------------------------------------------------- BOOL LLVOAvatar::allocateCharacterJoints( U32 num ) { - deleteAndClearArray(mSkeleton); + delete_and_clear_array(mSkeleton); mNumJoints = 0; mSkeleton = new LLViewerJoint[num]; @@ -5355,7 +5367,7 @@ BOOL LLVOAvatar::allocateCharacterJoints( U32 num ) //----------------------------------------------------------------------------- BOOL LLVOAvatar::allocateCollisionVolumes( U32 num ) { - deleteAndClearArray(mCollisionVolumes); + delete_and_clear_array(mCollisionVolumes); mNumCollisionVolumes = 0; mCollisionVolumes = new LLViewerJointCollisionVolume[num]; @@ -7870,9 +7882,9 @@ LLVOAvatar::LLVOAvatarXmlInfo::~LLVOAvatarXmlInfo() std::for_each(mMeshInfoList.begin(), mMeshInfoList.end(), DeletePointer()); std::for_each(mSkeletalDistortionInfoList.begin(), mSkeletalDistortionInfoList.end(), DeletePointer()); std::for_each(mAttachmentInfoList.begin(), mAttachmentInfoList.end(), DeletePointer()); - deleteAndClear(mTexSkinColorInfo); - deleteAndClear(mTexHairColorInfo); - deleteAndClear(mTexEyeColorInfo); + delete_and_clear(mTexSkinColorInfo); + delete_and_clear(mTexHairColorInfo); + delete_and_clear(mTexEyeColorInfo); std::for_each(mLayerInfoList.begin(), mLayerInfoList.end(), DeletePointer()); std::for_each(mDriverInfoList.begin(), mDriverInfoList.end(), DeletePointer()); std::for_each(mMorphMaskInfoList.begin(), mMorphMaskInfoList.end(), DeletePointer()); @@ -8203,7 +8215,7 @@ BOOL LLVOAvatar::LLVOAvatarXmlInfo::parseXmlColorNodes(LLXmlTreeNode* root) mTexSkinColorInfo = new LLTexGlobalColorInfo; if( !mTexSkinColorInfo->parseXml( color_node ) ) { - deleteAndClear(mTexSkinColorInfo); + delete_and_clear(mTexSkinColorInfo); llwarns << "avatar file: mTexSkinColor->parseXml() failed" << llendl; return FALSE; } @@ -8218,7 +8230,7 @@ BOOL LLVOAvatar::LLVOAvatarXmlInfo::parseXmlColorNodes(LLXmlTreeNode* root) mTexHairColorInfo = new LLTexGlobalColorInfo; if( !mTexHairColorInfo->parseXml( color_node ) ) { - deleteAndClear(mTexHairColorInfo); + delete_and_clear(mTexHairColorInfo); llwarns << "avatar file: mTexHairColor->parseXml() failed" << llendl; return FALSE; } diff --git a/indra/newview/llvoavatar.h b/indra/newview/llvoavatar.h index 1adb680962..87d3e40b8c 100644 --- a/indra/newview/llvoavatar.h +++ b/indra/newview/llvoavatar.h @@ -33,7 +33,7 @@ #include <string> #include <vector> -#include <boost/signals2.hpp> +#include <boost/signals2/trackable.hpp> #include "imageids.h" // IMG_INVISIBLE #include "llchat.h" @@ -69,6 +69,7 @@ class LLHUDEffectSpiral; class LLTexGlobalColor; class LLVOAvatarBoneInfo; class LLVOAvatarSkeletonInfo; +class LLViewerJointMesh; //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // LLVOAvatar @@ -435,7 +436,7 @@ public: bool isVisuallyMuted() const; U32 renderRigid(); - U32 renderSkinned(EAvatarRenderPass pass); + U32 renderSkinned(); F32 getLastSkinTime() { return mLastSkinTime; } U32 renderSkinnedAttachments(); U32 renderTransparent(BOOL first_pass); diff --git a/indra/newview/llvoavatarself.cpp b/indra/newview/llvoavatarself.cpp index 4275552117..69f998f0f3 100644 --- a/indra/newview/llvoavatarself.cpp +++ b/indra/newview/llvoavatarself.cpp @@ -43,6 +43,7 @@ #include "llhudeffecttrail.h" #include "llhudmanager.h" #include "llinventoryfunctions.h" +#include "lllocaltextureobject.h" #include "llnotificationsutil.h" #include "llselectmgr.h" #include "lltoolgrab.h" // for needsRenderBeam diff --git a/indra/newview/llvocache.cpp b/indra/newview/llvocache.cpp index eba768fef4..b67a6bbacd 100644 --- a/indra/newview/llvocache.cpp +++ b/indra/newview/llvocache.cpp @@ -170,7 +170,7 @@ LLVOCacheEntry::LLVOCacheEntry(LLAPRFile* apr_file) LLVOCacheEntry::~LLVOCacheEntry() { mDP.freeBuffer(); - //llassert(mState == INACTIVE); + llassert(mState == INACTIVE); } //virtual @@ -191,7 +191,7 @@ void LLVOCacheEntry::setOctreeEntry(LLViewerOctreeEntry* entry) LLViewerOctreeEntryData::setOctreeEntry(entry); } -void LLVOCacheEntry::copyTo(LLVOCacheEntry* new_entry) +void LLVOCacheEntry::moveTo(LLVOCacheEntry* new_entry) { //copy LLViewerOctreeEntry if(mEntry.notNull()) @@ -206,6 +206,7 @@ void LLVOCacheEntry::copyTo(LLVOCacheEntry* new_entry) { new_entry->addChild(getChild(i)); } + mChildrenList.clear(); } void LLVOCacheEntry::setState(U32 state) @@ -465,37 +466,10 @@ const U32 INVALID_TIME = 0 ; const char* object_cache_dirname = "objectcache"; const char* header_filename = "object.cache"; -LLVOCache* LLVOCache::sInstance = NULL; - -//static -LLVOCache* LLVOCache::getInstance() -{ - if(!sInstance) - { - sInstance = new LLVOCache() ; - } - return sInstance ; -} - -//static -BOOL LLVOCache::hasInstance() -{ - return sInstance != NULL ; -} - -//static -void LLVOCache::destroyClass() -{ - if(sInstance) - { - delete sInstance ; - sInstance = NULL ; - } -} LLVOCache::LLVOCache(): - mInitialized(FALSE), - mReadOnly(TRUE), + mInitialized(false), + mReadOnly(true), mNumEntries(0), mCacheSize(1) { @@ -532,7 +506,7 @@ void LLVOCache::initCache(ELLPath location, U32 size, U32 cache_version) llwarns << "Cache already initialized." << llendl; return ; } - mInitialized = TRUE ; + mInitialized = true; setDirNames(location); if (!mReadOnly) @@ -580,7 +554,7 @@ void LLVOCache::removeCache(ELLPath location, bool started) LLFile::rmdir(cache_dir); clearCacheInMemory(); - mInitialized = FALSE ; + mInitialized = false; } void LLVOCache::removeCache() @@ -607,23 +581,23 @@ void LLVOCache::removeCache() void LLVOCache::removeEntry(HeaderEntryInfo* entry) { - llassert_always(mInitialized) ; + llassert_always(mInitialized); if(mReadOnly) { - return ; + return; } if(!entry) { - return ; + return; } - header_entry_queue_t::iterator iter = mHeaderEntryQueue.find(entry) ; + header_entry_queue_t::iterator iter = mHeaderEntryQueue.find(entry); if(iter != mHeaderEntryQueue.end()) { - mHandleEntryMap.erase(entry->mHandle) ; - mHeaderEntryQueue.erase(iter) ; - removeFromCache(entry) ; - delete entry ; + mHandleEntryMap.erase(entry->mHandle); + mHeaderEntryQueue.erase(iter); + removeFromCache(entry); + delete entry; mNumEntries = mHandleEntryMap.size() ; } diff --git a/indra/newview/llvocache.h b/indra/newview/llvocache.h index 2aec88537c..fc0634f133 100644 --- a/indra/newview/llvocache.h +++ b/indra/newview/llvocache.h @@ -29,7 +29,6 @@ #include "lluuid.h" #include "lldatapacker.h" -#include "lldlinked.h" #include "lldir.h" #include "llvieweroctree.h" @@ -101,7 +100,7 @@ public: void recordHit(); void recordDupe() { mDupeCount++; } - void copyTo(LLVOCacheEntry* new_entry); //copy variables + void moveTo(LLVOCacheEntry* new_entry); //copy variables /*virtual*/ void setOctreeEntry(LLViewerOctreeEntry* entry); void setParentID(U32 id) {mParentID = id;} @@ -161,9 +160,10 @@ public: // //Note: LLVOCache is not thread-safe // -class LLVOCache +class LLVOCache : public LLSingleton<LLVOCache> { private: + friend LLSingleton<LLVOCache>; struct HeaderEntryInfo { HeaderEntryInfo() : mIndex(0), mHandle(0), mTime(0) {} @@ -206,7 +206,7 @@ public: void writeToCache(U64 handle, const LLUUID& id, const LLVOCacheEntry::vocache_entry_map_t& cache_entry_map, BOOL dirty_cache, bool removal_enabled); void removeEntry(U64 handle) ; - void setReadOnly(BOOL read_only) {mReadOnly = read_only;} + void setReadOnly(bool read_only) {mReadOnly = read_only;} private: void setDirNames(ELLPath location); @@ -222,9 +222,9 @@ private: BOOL updateEntry(const HeaderEntryInfo* entry); private: - BOOL mEnabled; - BOOL mInitialized ; - BOOL mReadOnly ; + bool mEnabled; + bool mInitialized ; + bool mReadOnly ; HeaderMetaInfo mMetaInfo; U32 mCacheSize; U32 mNumEntries; @@ -233,12 +233,6 @@ private: LLVolatileAPRPool* mLocalAPRFilePoolp ; header_entry_queue_t mHeaderEntryQueue; handle_entry_map_t mHandleEntryMap; - - static LLVOCache* sInstance ; -public: - static LLVOCache* getInstance() ; - static BOOL hasInstance() ; - static void destroyClass() ; }; #endif diff --git a/indra/newview/llvoicechannel.cpp b/indra/newview/llvoicechannel.cpp index bd12328a6b..0e76a978db 100644 --- a/indra/newview/llvoicechannel.cpp +++ b/indra/newview/llvoicechannel.cpp @@ -28,12 +28,14 @@ #include "llagent.h" #include "llfloaterreg.h" +#include "llhttpclient.h" #include "llimview.h" #include "llnotifications.h" #include "llnotificationsutil.h" #include "llpanel.h" #include "llrecentpeople.h" #include "llviewercontrol.h" +#include "llviewerregion.h" #include "llvoicechannel.h" diff --git a/indra/newview/llvoiceclient.h b/indra/newview/llvoiceclient.h index c9aeea35a9..1b362545ec 100644 --- a/indra/newview/llvoiceclient.h +++ b/indra/newview/llvoiceclient.h @@ -34,7 +34,6 @@ class LLVOAvatar; #include "lliosocket.h" #include "v3math.h" #include "llframetimer.h" -#include "llviewerregion.h" #include "llcallingcard.h" // for LLFriendObserver #include "llsecapi.h" #include "llcontrol.h" diff --git a/indra/newview/llvoinventorylistener.h b/indra/newview/llvoinventorylistener.h index bf14d19b01..c50c475478 100644 --- a/indra/newview/llvoinventorylistener.h +++ b/indra/newview/llvoinventorylistener.h @@ -30,7 +30,9 @@ #ifndef LL_LLVOINVENTORYLISTENER_H #define LL_LLVOINVENTORYLISTENER_H -#include "llviewerobject.h" +#include "llinventory.h" + +class LLViewerObject; class LLVOInventoryListener { diff --git a/indra/newview/llvosurfacepatch.h b/indra/newview/llvosurfacepatch.h index a15878368e..21693e85e1 100644 --- a/indra/newview/llvosurfacepatch.h +++ b/indra/newview/llvosurfacepatch.h @@ -33,6 +33,8 @@ class LLSurfacePatch; class LLDrawPool; class LLVector2; +class LLFacePool; +class LLFace; class LLVOSurfacePatch : public LLStaticViewerObject { diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp index 12f268d324..89a2f2ee19 100644 --- a/indra/newview/llvovolume.cpp +++ b/indra/newview/llvovolume.cpp @@ -406,7 +406,7 @@ U32 LLVOVolume::processUpdateMessage(LLMessageSystem *mesgsys, dp->dumpBufferToLog(); llwarns << "Flushing cache files" << llendl; - if(LLVOCache::hasInstance() && getRegion()) + if(LLVOCache::instanceExists() && getRegion()) { LLVOCache::getInstance()->removeEntry(getRegion()->getHandle()) ; } diff --git a/indra/newview/llwearable.h b/indra/newview/llwearable.h index 3d8c53a755..ce5c882c00 100644 --- a/indra/newview/llwearable.h +++ b/indra/newview/llwearable.h @@ -34,12 +34,12 @@ #include "llassetstorage.h" #include "llwearabletype.h" #include "llfile.h" -#include "lllocaltextureobject.h" class LLViewerInventoryItem; class LLVisualParam; class LLTexGlobalColorInfo; class LLTexGlobalColor; +class LLLocalTextureObject; class LLWearable { diff --git a/indra/newview/llworld.cpp b/indra/newview/llworld.cpp index 9401773886..a123c12811 100644 --- a/indra/newview/llworld.cpp +++ b/indra/newview/llworld.cpp @@ -123,10 +123,7 @@ void LLWorld::destroyClass() LLViewerRegion* region_to_delete = *region_it++; removeRegion(region_to_delete->getHost()); } - if(LLVOCache::hasInstance()) - { - LLVOCache::getInstance()->destroyClass() ; - } + LLVOCache::deleteSingleton(); LLViewerPartSim::getInstance()->destroyClass(); mDefaultWaterTexturep = NULL ; diff --git a/indra/newview/pipeline.h b/indra/newview/pipeline.h index 36abeca295..720ddf79f5 100644 --- a/indra/newview/pipeline.h +++ b/indra/newview/pipeline.h @@ -29,8 +29,6 @@ #include "llcamera.h" #include "llerror.h" -#include "lldarrayptr.h" -#include "lldqueueptr.h" #include "lldrawpool.h" #include "llspatialpartition.h" #include "m4math.h" @@ -42,25 +40,13 @@ #include <stack> -#include <stack> - -#include <stack> - class LLViewerTexture; -class LLEdge; class LLFace; class LLViewerObject; -class LLAgent; -class LLDisplayPrimitive; class LLTextureEntry; -class LLRenderFunc; -class LLCubeMap; class LLCullResult; class LLVOAvatar; class LLGLSLShader; -class LLCurlRequest; - -class LLMeshResponder; typedef enum e_avatar_skinning_method { |