summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
authorRichard Linden <none@none>2014-03-12 12:48:43 -0700
committerRichard Linden <none@none>2014-03-12 12:48:43 -0700
commit5b846ed2a6dce6c5801aa74d0f36a1c7525fbcba (patch)
tree438dd649dbcc0584709251c6926a476b0db02f85 /indra/newview
parentcb91708332b8b8ddfe27808602ec5f43f11c24c2 (diff)
parent5f513242890068f569df7e50a5ac0ba3bdd23f05 (diff)
merge with release
Diffstat (limited to 'indra/newview')
-rwxr-xr-xindra/newview/CMakeLists.txt34
-rwxr-xr-xindra/newview/app_settings/logcontrol.xml1
-rwxr-xr-xindra/newview/app_settings/settings.xml256
-rw-r--r--indra/newview/app_settings/shaders/class1/interface/onetexturefilterF.glsl49
-rw-r--r--indra/newview/app_settings/shaders/class1/interface/onetexturefilterV.glsl38
-rw-r--r--indra/newview/app_settings/shaders/class1/interface/twotexturecompareF.glsl58
-rw-r--r--indra/newview/app_settings/shaders/class1/interface/twotexturecompareV.glsl41
-rwxr-xr-xindra/newview/llaccountingcost.h55
-rwxr-xr-xindra/newview/llaccountingcostmanager.cpp8
-rwxr-xr-xindra/newview/llagent.cpp207
-rwxr-xr-xindra/newview/llagent.h11
-rwxr-xr-xindra/newview/llagentcamera.cpp59
-rwxr-xr-xindra/newview/llagentlistener.cpp10
-rwxr-xr-xindra/newview/llagentpicksinfo.cpp6
-rwxr-xr-xindra/newview/llagentpilot.cpp61
-rwxr-xr-xindra/newview/llagentpilot.h3
-rwxr-xr-xindra/newview/llagentwearables.cpp215
-rwxr-xr-xindra/newview/llagentwearables.h2
-rwxr-xr-xindra/newview/llagentwearablesfetch.cpp54
-rwxr-xr-xindra/newview/llappearancemgr.cpp351
-rwxr-xr-xindra/newview/llappearancemgr.h1
-rwxr-xr-xindra/newview/llappviewer.cpp661
-rwxr-xr-xindra/newview/llappviewer.h17
-rwxr-xr-xindra/newview/llappviewerlinux.cpp18
-rwxr-xr-xindra/newview/llappviewerlinux_api_dbus.cpp6
-rwxr-xr-xindra/newview/llappviewermacosx.cpp8
-rwxr-xr-xindra/newview/llappviewerwin32.cpp50
-rwxr-xr-xindra/newview/llassetuploadqueue.cpp10
-rwxr-xr-xindra/newview/llassetuploadresponders.cpp46
-rwxr-xr-xindra/newview/llattachmentsmgr.cpp2
-rwxr-xr-xindra/newview/llavataractions.cpp20
-rwxr-xr-xindra/newview/llavataractions.h1
-rwxr-xr-xindra/newview/llavatariconctrl.cpp72
-rwxr-xr-xindra/newview/llavatariconctrl.h46
-rwxr-xr-xindra/newview/llavatarlist.cpp2
-rwxr-xr-xindra/newview/llavatarpropertiesprocessor.cpp5
-rwxr-xr-xindra/newview/llavatarpropertiesprocessor.h8
-rw-r--r--indra/newview/llavatarrenderinfoaccountant.cpp66
-rwxr-xr-xindra/newview/llblocklist.cpp2
-rwxr-xr-xindra/newview/llbuycurrencyhtml.cpp2
-rwxr-xr-xindra/newview/llcallbacklist.cpp30
-rwxr-xr-xindra/newview/llcallingcard.cpp54
-rwxr-xr-xindra/newview/llcaphttpsender.cpp4
-rwxr-xr-xindra/newview/llchannelmanager.cpp4
-rwxr-xr-xindra/newview/llchatbar.cpp33
-rwxr-xr-xindra/newview/llchathistory.cpp4
-rwxr-xr-xindra/newview/llchiclet.cpp6
-rwxr-xr-xindra/newview/llchiclet.h8
-rwxr-xr-xindra/newview/llchicletbar.cpp22
-rwxr-xr-xindra/newview/llclassifiedstatsresponder.cpp19
-rwxr-xr-xindra/newview/llcofwearables.cpp6
-rwxr-xr-xindra/newview/llcolorswatch.cpp15
-rwxr-xr-xindra/newview/llcolorswatch.h29
-rwxr-xr-xindra/newview/llcommandlineparser.cpp30
-rwxr-xr-xindra/newview/llcompilequeue.cpp246
-rwxr-xr-xindra/newview/llcompilequeue.h22
-rwxr-xr-xindra/newview/llconversationlog.cpp86
-rwxr-xr-xindra/newview/llconversationlog.h9
-rwxr-xr-xindra/newview/llconversationloglist.cpp6
-rwxr-xr-xindra/newview/llconversationmodel.cpp6
-rw-r--r--indra/newview/llconversationview.cpp7
-rwxr-xr-xindra/newview/lldaycyclemanager.cpp2
-rwxr-xr-xindra/newview/lldebugmessagebox.cpp6
-rwxr-xr-xindra/newview/lldebugmessagebox.h1
-rwxr-xr-xindra/newview/lldebugview.cpp14
-rwxr-xr-xindra/newview/lldebugview.h2
-rwxr-xr-xindra/newview/lldirpicker.cpp2
-rwxr-xr-xindra/newview/lldirpicker.h5
-rwxr-xr-xindra/newview/lldonotdisturbnotificationstorage.cpp8
-rwxr-xr-xindra/newview/lldrawable.cpp403
-rwxr-xr-xindra/newview/lldrawable.h74
-rwxr-xr-xindra/newview/lldrawpool.cpp12
-rwxr-xr-xindra/newview/lldrawpoolalpha.cpp40
-rwxr-xr-xindra/newview/lldrawpoolavatar.cpp38
-rwxr-xr-xindra/newview/lldrawpoolbump.cpp94
-rw-r--r--indra/newview/lldrawpoolmaterials.cpp4
-rwxr-xr-xindra/newview/lldrawpoolsimple.cpp60
-rwxr-xr-xindra/newview/lldrawpoolsky.cpp2
-rwxr-xr-xindra/newview/lldrawpoolterrain.cpp20
-rwxr-xr-xindra/newview/lldrawpooltree.cpp16
-rwxr-xr-xindra/newview/lldrawpoolwater.cpp8
-rwxr-xr-xindra/newview/lldrawpoolwlsky.cpp18
-rwxr-xr-xindra/newview/lldynamictexture.cpp2
-rwxr-xr-xindra/newview/lldynamictexture.h6
-rwxr-xr-xindra/newview/llenvmanager.cpp30
-rwxr-xr-xindra/newview/llestateinfomodel.cpp10
-rwxr-xr-xindra/newview/lleventnotifier.cpp2
-rwxr-xr-xindra/newview/lleventpoll.cpp42
-rwxr-xr-xindra/newview/llexternaleditor.cpp18
-rwxr-xr-xindra/newview/llface.cpp288
-rwxr-xr-xindra/newview/llface.h27
-rwxr-xr-xindra/newview/llface.inl6
-rw-r--r--indra/newview/llfacebookconnect.cpp4
-rwxr-xr-xindra/newview/llfasttimerview.cpp1667
-rwxr-xr-xindra/newview/llfasttimerview.h112
-rwxr-xr-xindra/newview/llfavoritesbar.cpp46
-rwxr-xr-xindra/newview/llfeaturemanager.cpp19
-rwxr-xr-xindra/newview/llfilepicker.cpp16
-rwxr-xr-xindra/newview/llfilepicker.h1
-rwxr-xr-xindra/newview/llfirstuse.cpp5
-rwxr-xr-xindra/newview/llflexibleobject.cpp30
-rwxr-xr-xindra/newview/llflexibleobject.h2
-rwxr-xr-xindra/newview/llfloaterabout.cpp7
-rwxr-xr-xindra/newview/llfloaterauction.cpp22
-rwxr-xr-xindra/newview/llfloateravatarpicker.cpp14
-rwxr-xr-xindra/newview/llfloateravatartextures.cpp7
-rwxr-xr-xindra/newview/llfloaterbulkpermission.cpp35
-rwxr-xr-xindra/newview/llfloaterbulkpermission.h6
-rwxr-xr-xindra/newview/llfloaterbump.cpp4
-rwxr-xr-xindra/newview/llfloaterbuy.cpp6
-rwxr-xr-xindra/newview/llfloaterbuycontents.cpp6
-rwxr-xr-xindra/newview/llfloaterbuycurrencyhtml.cpp2
-rwxr-xr-xindra/newview/llfloaterbuyland.cpp8
-rwxr-xr-xindra/newview/llfloaterbvhpreview.cpp10
-rwxr-xr-xindra/newview/llfloatercolorpicker.cpp11
-rwxr-xr-xindra/newview/llfloatercolorpicker.h5
-rwxr-xr-xindra/newview/llfloaterdeleteenvpreset.cpp4
-rwxr-xr-xindra/newview/llfloaterdisplayname.cpp2
-rwxr-xr-xindra/newview/llfloatereditdaycycle.cpp22
-rwxr-xr-xindra/newview/llfloatereditsky.cpp6
-rwxr-xr-xindra/newview/llfloatereditwater.cpp6
-rwxr-xr-xindra/newview/llfloaterevent.cpp1
-rwxr-xr-xindra/newview/llfloatergesture.cpp8
-rwxr-xr-xindra/newview/llfloatergodtools.cpp8
-rwxr-xr-xindra/newview/llfloatergroupinvite.cpp2
-rwxr-xr-xindra/newview/llfloatergroups.cpp10
-rwxr-xr-xindra/newview/llfloaterhardwaresettings.cpp11
-rwxr-xr-xindra/newview/llfloaterimcontainer.cpp27
-rwxr-xr-xindra/newview/llfloaterimnearbychat.cpp21
-rwxr-xr-xindra/newview/llfloaterimnearbychathandler.cpp18
-rw-r--r--[-rwxr-xr-x]indra/newview/llfloaterimsession.cpp26
-rw-r--r--[-rwxr-xr-x]indra/newview/llfloaterimsession.h2
-rwxr-xr-xindra/newview/llfloaterimsessiontab.cpp36
-rwxr-xr-xindra/newview/llfloaterjoystick.cpp27
-rwxr-xr-xindra/newview/llfloaterjoystick.h1
-rwxr-xr-xindra/newview/llfloaterlagmeter.cpp375
-rwxr-xr-xindra/newview/llfloaterlagmeter.h80
-rwxr-xr-xindra/newview/llfloaterland.cpp22
-rwxr-xr-xindra/newview/llfloaterland.h2
-rwxr-xr-xindra/newview/llfloaterlandholdings.cpp10
-rwxr-xr-xindra/newview/llfloatermodelpreview.cpp172
-rwxr-xr-xindra/newview/llfloatermodeluploadbase.cpp2
-rwxr-xr-xindra/newview/llfloaternotificationsconsole.cpp2
-rwxr-xr-xindra/newview/llfloaterobjectweights.cpp2
-rwxr-xr-xindra/newview/llfloateroutbox.cpp4
-rwxr-xr-xindra/newview/llfloaterpathfindingconsole.cpp2
-rwxr-xr-xindra/newview/llfloaterpreference.cpp7
-rwxr-xr-xindra/newview/llfloaterproperties.cpp10
-rwxr-xr-xindra/newview/llfloaterregiondebugconsole.cpp4
-rwxr-xr-xindra/newview/llfloaterregioninfo.cpp84
-rwxr-xr-xindra/newview/llfloaterregioninfo.h2
-rwxr-xr-xindra/newview/llfloaterreporter.cpp24
-rw-r--r--indra/newview/llfloatersceneloadstats.cpp40
-rw-r--r--indra/newview/llfloatersceneloadstats.h43
-rwxr-xr-xindra/newview/llfloaterscriptlimits.cpp60
-rwxr-xr-xindra/newview/llfloatersettingsdebug.cpp4
-rwxr-xr-xindra/newview/llfloatersidepanelcontainer.h2
-rwxr-xr-xindra/newview/llfloatersnapshot.cpp46
-rw-r--r--indra/newview/llfloatersocial.cpp22
-rw-r--r--indra/newview/llfloatersocial.h4
-rwxr-xr-xindra/newview/llfloatertools.cpp6
-rwxr-xr-xindra/newview/llfloatertopobjects.h16
-rwxr-xr-xindra/newview/llfloatertranslationsettings.cpp2
-rwxr-xr-xindra/newview/llfloateruipreview.cpp8
-rwxr-xr-xindra/newview/llfloaterwebcontent.cpp14
-rwxr-xr-xindra/newview/llfloaterwebcontent.h4
-rwxr-xr-xindra/newview/llfloaterwebprofile.cpp6
-rwxr-xr-xindra/newview/llfloaterworldmap.cpp33
-rwxr-xr-xindra/newview/llfloaterworldmap.h5
-rwxr-xr-xindra/newview/llfolderviewmodelinventory.cpp4
-rwxr-xr-xindra/newview/llfollowcam.cpp16
-rwxr-xr-xindra/newview/llfriendcard.cpp54
-rwxr-xr-xindra/newview/llgesturelistener.cpp8
-rwxr-xr-xindra/newview/llgesturemgr.cpp30
-rwxr-xr-xindra/newview/llgiveinventory.cpp32
-rwxr-xr-xindra/newview/llglsandbox.cpp6
-rwxr-xr-xindra/newview/llgroupactions.cpp18
-rwxr-xr-xindra/newview/llgroupiconctrl.cpp28
-rwxr-xr-xindra/newview/llgrouplist.cpp6
-rwxr-xr-xindra/newview/llgroupmgr.cpp114
-rwxr-xr-xindra/newview/llgroupmgr.h11
-rwxr-xr-xindra/newview/llhomelocationresponder.cpp4
-rwxr-xr-xindra/newview/llhudeffect.cpp2
-rwxr-xr-xindra/newview/llhudeffectbeam.cpp10
-rwxr-xr-xindra/newview/llhudeffectlookat.cpp12
-rwxr-xr-xindra/newview/llhudeffectpointat.cpp8
-rwxr-xr-xindra/newview/llhudeffecttrail.cpp4
-rwxr-xr-xindra/newview/llhudicon.h4
-rwxr-xr-xindra/newview/llhudmanager.cpp36
-rwxr-xr-xindra/newview/llhudmanager.h7
-rwxr-xr-xindra/newview/llhudnametag.cpp9
-rwxr-xr-xindra/newview/llhudobject.cpp10
-rwxr-xr-xindra/newview/llhudtext.cpp2
-rwxr-xr-xindra/newview/llimpanel.cpp14
-rwxr-xr-xindra/newview/llimview.cpp83
-rwxr-xr-xindra/newview/llimview.h12
-rwxr-xr-xindra/newview/llinspect.cpp2
-rwxr-xr-xindra/newview/llinspectavatar.cpp2
-rwxr-xr-xindra/newview/llinspecttoast.cpp4
-rwxr-xr-xindra/newview/llinventorybridge.cpp173
-rwxr-xr-xindra/newview/llinventoryfilter.cpp10
-rwxr-xr-xindra/newview/llinventoryfunctions.cpp4
-rwxr-xr-xindra/newview/llinventoryicon.cpp3
-rwxr-xr-xindra/newview/llinventoryicon.h5
-rwxr-xr-xindra/newview/llinventoryitemslist.cpp8
-rwxr-xr-xindra/newview/llinventoryitemslist.h4
-rwxr-xr-xindra/newview/llinventorymodel.cpp394
-rwxr-xr-xindra/newview/llinventorymodel.h9
-rwxr-xr-xindra/newview/llinventorymodelbackgroundfetch.cpp20
-rwxr-xr-xindra/newview/llinventoryobserver.cpp32
-rwxr-xr-xindra/newview/llinventorypanel.cpp32
-rwxr-xr-xindra/newview/llinventorypanel.h1
-rwxr-xr-xindra/newview/lljoystickbutton.cpp14
-rwxr-xr-xindra/newview/lllandmarkactions.cpp6
-rwxr-xr-xindra/newview/lllandmarklist.cpp9
-rwxr-xr-xindra/newview/lllistcontextmenu.cpp2
-rwxr-xr-xindra/newview/lllocalbitmaps.cpp37
-rwxr-xr-xindra/newview/lllocalbitmaps.h2
-rwxr-xr-xindra/newview/lllocationhistory.cpp14
-rwxr-xr-xindra/newview/lllocationinputctrl.cpp4
-rwxr-xr-xindra/newview/lllogchat.cpp192
-rwxr-xr-xindra/newview/lllogchat.h1
-rwxr-xr-xindra/newview/lllogininstance.cpp36
-rwxr-xr-xindra/newview/llmainlooprepeater.cpp2
-rwxr-xr-xindra/newview/llmanip.cpp4
-rwxr-xr-xindra/newview/llmaniprotate.cpp26
-rwxr-xr-xindra/newview/llmanipscale.cpp10
-rwxr-xr-xindra/newview/llmaniptranslate.cpp36
-rwxr-xr-xindra/newview/llmarketplacefunctions.cpp26
-rw-r--r--indra/newview/llmaterialmgr.cpp4
-rwxr-xr-xindra/newview/llmediactrl.cpp14
-rwxr-xr-xindra/newview/llmediactrl.h4
-rwxr-xr-xindra/newview/llmeshrepository.cpp399
-rwxr-xr-xindra/newview/llmimetypes.cpp4
-rwxr-xr-xindra/newview/llmoveview.cpp8
-rwxr-xr-xindra/newview/llmutelist.cpp28
-rwxr-xr-xindra/newview/llnamelistctrl.cpp8
-rwxr-xr-xindra/newview/llnavigationbar.cpp4
-rwxr-xr-xindra/newview/llnetmap.cpp2
-rwxr-xr-xindra/newview/llnotificationhandlerutil.cpp6
-rwxr-xr-xindra/newview/lloutfitslist.cpp4
-rwxr-xr-xindra/newview/llpanelavatar.cpp3
-rwxr-xr-xindra/newview/llpanelblockedlist.cpp2
-rwxr-xr-xindra/newview/llpanelclassified.cpp23
-rwxr-xr-xindra/newview/llpanelcontents.h1
-rwxr-xr-xindra/newview/llpaneleditwearable.cpp51
-rwxr-xr-xindra/newview/llpanelface.cpp151
-rwxr-xr-xindra/newview/llpanelface.h2
-rwxr-xr-xindra/newview/llpanelgroup.cpp12
-rwxr-xr-xindra/newview/llpanelgroupgeneral.cpp8
-rwxr-xr-xindra/newview/llpanelgroupinvite.cpp2
-rwxr-xr-xindra/newview/llpanelgrouplandmoney.cpp68
-rwxr-xr-xindra/newview/llpanelgrouplandmoney.h5
-rwxr-xr-xindra/newview/llpanelgroupnotices.cpp16
-rwxr-xr-xindra/newview/llpanelgrouproles.cpp84
-rwxr-xr-xindra/newview/llpanelland.cpp2
-rwxr-xr-xindra/newview/llpanellandmarkinfo.cpp10
-rwxr-xr-xindra/newview/llpanellandmarks.cpp14
-rwxr-xr-xindra/newview/llpanellogin.cpp37
-rwxr-xr-xindra/newview/llpanelmaininventory.cpp6
-rwxr-xr-xindra/newview/llpanelmarketplaceinboxinventory.cpp4
-rwxr-xr-xindra/newview/llpanelme.cpp1
-rwxr-xr-xindra/newview/llpanelnearbymedia.cpp2
-rwxr-xr-xindra/newview/llpanelnearbymedia.h2
-rwxr-xr-xindra/newview/llpanelobject.cpp22
-rwxr-xr-xindra/newview/llpanelobjectinventory.cpp52
-rwxr-xr-xindra/newview/llpaneloutfitedit.cpp20
-rwxr-xr-xindra/newview/llpaneloutfitedit.h2
-rwxr-xr-xindra/newview/llpaneloutfitsinventory.cpp14
-rwxr-xr-xindra/newview/llpanelpeople.cpp30
-rwxr-xr-xindra/newview/llpanelpeople.h1
-rwxr-xr-xindra/newview/llpanelpermissions.cpp13
-rwxr-xr-xindra/newview/llpanelpicks.cpp15
-rwxr-xr-xindra/newview/llpanelplaceprofile.cpp4
-rwxr-xr-xindra/newview/llpanelplaceprofile.h4
-rwxr-xr-xindra/newview/llpanelplaces.cpp16
-rwxr-xr-xindra/newview/llpanelplaces.h2
-rwxr-xr-xindra/newview/llpanelprimmediacontrols.cpp4
-rwxr-xr-xindra/newview/llpanelprofile.cpp13
-rwxr-xr-xindra/newview/llpanelsnapshot.cpp2
-rwxr-xr-xindra/newview/llpanelsnapshotoptions.cpp2
-rwxr-xr-xindra/newview/llpanelsnapshotpostcard.cpp2
-rwxr-xr-xindra/newview/llpanelteleporthistory.cpp24
-rwxr-xr-xindra/newview/llpanelteleporthistory.h2
-rwxr-xr-xindra/newview/llpaneltopinfobar.cpp4
-rwxr-xr-xindra/newview/llpaneltopinfobar.h2
-rwxr-xr-xindra/newview/llpanelvoicedevicesettings.cpp2
-rwxr-xr-xindra/newview/llpanelvoicedevicesettings.h2
-rwxr-xr-xindra/newview/llpanelvoiceeffect.cpp1
-rwxr-xr-xindra/newview/llpanelvolume.cpp4
-rwxr-xr-xindra/newview/llpanelvolumepulldown.cpp2
-rwxr-xr-xindra/newview/llpanelvolumepulldown.h2
-rwxr-xr-xindra/newview/llpanelwearing.cpp2
-rwxr-xr-xindra/newview/llpatchvertexarray.cpp2
-rwxr-xr-xindra/newview/llpathfindingmanager.cpp20
-rwxr-xr-xindra/newview/llpathfindingnavmesh.cpp10
-rwxr-xr-xindra/newview/llpersistentnotificationstorage.cpp16
-rwxr-xr-xindra/newview/llphysicsmotion.cpp2
-rwxr-xr-xindra/newview/llphysicsshapebuilderutil.h2
-rwxr-xr-xindra/newview/llplacesfolderview.cpp2
-rwxr-xr-xindra/newview/llplacesinventorybridge.cpp2
-rwxr-xr-xindra/newview/llpostcard.cpp18
-rwxr-xr-xindra/newview/llpreview.cpp5
-rwxr-xr-xindra/newview/llpreviewgesture.cpp30
-rwxr-xr-xindra/newview/llpreviewgesture.h2
-rwxr-xr-xindra/newview/llpreviewnotecard.cpp34
-rwxr-xr-xindra/newview/llpreviewscript.cpp85
-rwxr-xr-xindra/newview/llpreviewscript.h3
-rwxr-xr-xindra/newview/llproductinforequest.cpp6
-rwxr-xr-xindra/newview/llregioninfomodel.cpp6
-rwxr-xr-xindra/newview/llremoteparcelrequest.cpp4
-rwxr-xr-xindra/newview/llremoteparcelrequest.h3
-rw-r--r--indra/newview/llscenemonitor.cpp763
-rw-r--r--indra/newview/llscenemonitor.h124
-rwxr-xr-xindra/newview/llsceneview.cpp2
-rwxr-xr-xindra/newview/llsceneview.h2
-rwxr-xr-xindra/newview/llscreenchannel.cpp20
-rwxr-xr-xindra/newview/llscriptfloater.cpp16
-rwxr-xr-xindra/newview/llsecapi.h2
-rwxr-xr-xindra/newview/llsechandler_basic.cpp6
-rwxr-xr-xindra/newview/llselectmgr.cpp85
-rwxr-xr-xindra/newview/llselectmgr.h27
-rwxr-xr-xindra/newview/llsidepanelappearance.cpp8
-rwxr-xr-xindra/newview/llsidepanelappearance.h4
-rwxr-xr-xindra/newview/llsidepanelinventory.cpp4
-rwxr-xr-xindra/newview/llsidepaneliteminfo.cpp12
-rwxr-xr-xindra/newview/llsidepaneltaskinfo.cpp13
-rwxr-xr-xindra/newview/llsidepaneltaskinfo.h2
-rwxr-xr-xindra/newview/llsimplestat.h152
-rw-r--r--indra/newview/llsnapshotlivepreview.cpp32
-rwxr-xr-xindra/newview/llspatialpartition.cpp1489
-rwxr-xr-xindra/newview/llspatialpartition.h201
-rwxr-xr-xindra/newview/llspeakers.cpp28
-rwxr-xr-xindra/newview/llspeakingindicatormanager.cpp2
-rwxr-xr-xindra/newview/llsrv.cpp2
-rwxr-xr-xindra/newview/llstartup.cpp128
-rwxr-xr-xindra/newview/llstartup.h12
-rwxr-xr-xindra/newview/llstatusbar.cpp37
-rwxr-xr-xindra/newview/llsurface.cpp22
-rwxr-xr-xindra/newview/llsurface.h1
-rwxr-xr-xindra/newview/llsurfacepatch.cpp9
-rwxr-xr-xindra/newview/llsyswellwindow.cpp14
-rwxr-xr-xindra/newview/llteleporthistory.cpp10
-rwxr-xr-xindra/newview/llteleporthistorystorage.cpp12
-rwxr-xr-xindra/newview/lltextureatlas.cpp6
-rwxr-xr-xindra/newview/lltexturecache.cpp78
-rwxr-xr-xindra/newview/lltexturecache.h6
-rwxr-xr-xindra/newview/lltexturectrl.cpp18
-rwxr-xr-xindra/newview/lltexturectrl.h4
-rwxr-xr-x[-rw-r--r--]indra/newview/lltexturefetch.cpp321
-rwxr-xr-xindra/newview/lltexturefetch.h12
-rwxr-xr-xindra/newview/lltextureinfo.cpp90
-rwxr-xr-xindra/newview/lltextureinfo.h32
-rwxr-xr-xindra/newview/lltextureinfodetails.cpp4
-rwxr-xr-xindra/newview/lltextureinfodetails.h14
-rwxr-xr-xindra/newview/lltexturestats.cpp5
-rwxr-xr-xindra/newview/lltexturestatsuploader.cpp12
-rwxr-xr-xindra/newview/lltexturestatsuploader.h4
-rwxr-xr-xindra/newview/lltextureview.cpp70
-rwxr-xr-xindra/newview/lltoast.cpp2
-rwxr-xr-xindra/newview/lltoastalertpanel.cpp5
-rwxr-xr-xindra/newview/lltoastgroupnotifypanel.cpp2
-rwxr-xr-xindra/newview/lltoastgroupnotifypanel.h1
-rwxr-xr-xindra/newview/lltoastimpanel.cpp6
-rwxr-xr-xindra/newview/lltoastnotifypanel.cpp2
-rwxr-xr-xindra/newview/lltoastnotifypanel.h2
-rwxr-xr-xindra/newview/lltoastscripttextbox.cpp2
-rwxr-xr-xindra/newview/lltool.cpp26
-rwxr-xr-xindra/newview/lltoolbarview.cpp22
-rwxr-xr-xindra/newview/lltoolbrush.cpp6
-rwxr-xr-xindra/newview/lltooldraganddrop.cpp132
-rwxr-xr-xindra/newview/lltooldraganddrop.h2
-rwxr-xr-xindra/newview/lltoolfocus.cpp8
-rwxr-xr-xindra/newview/lltoolgrab.cpp28
-rwxr-xr-xindra/newview/lltoolgun.cpp4
-rwxr-xr-xindra/newview/lltoolmgr.cpp2
-rwxr-xr-xindra/newview/lltoolobjpicker.cpp4
-rwxr-xr-xindra/newview/lltoolpie.cpp13
-rwxr-xr-xindra/newview/lltoolplacer.cpp8
-rwxr-xr-xindra/newview/lltoolselect.cpp1
-rwxr-xr-xindra/newview/lltoolselectland.cpp8
-rwxr-xr-xindra/newview/lltoolselectrect.cpp5
-rwxr-xr-xindra/newview/lltoolview.cpp2
-rwxr-xr-xindra/newview/lltracker.cpp85
-rwxr-xr-xindra/newview/lltracker.h5
-rwxr-xr-xindra/newview/lltranslate.cpp2
-rwxr-xr-xindra/newview/lluploadfloaterobservers.cpp4
-rwxr-xr-xindra/newview/llurl.cpp14
-rwxr-xr-xindra/newview/llurldispatcher.cpp2
-rwxr-xr-xindra/newview/llurlhistory.cpp10
-rwxr-xr-xindra/newview/llurlwhitelist.cpp2
-rwxr-xr-xindra/newview/llviewerassetstats.cpp818
-rwxr-xr-xindra/newview/llviewerassetstats.h234
-rwxr-xr-xindra/newview/llviewerassetstorage.cpp36
-rwxr-xr-xindra/newview/llviewerassetstorage.h4
-rwxr-xr-xindra/newview/llviewerassettype.h1
-rwxr-xr-xindra/newview/llvieweraudio.cpp9
-rwxr-xr-xindra/newview/llviewercamera.cpp16
-rwxr-xr-xindra/newview/llviewercamera.h18
-rwxr-xr-xindra/newview/llviewerchat.cpp2
-rwxr-xr-xindra/newview/llviewercontrol.cpp14
-rwxr-xr-xindra/newview/llviewerdisplay.cpp141
-rwxr-xr-xindra/newview/llviewerdisplayname.cpp12
-rwxr-xr-xindra/newview/llviewerfloaterreg.cpp32
-rw-r--r--indra/newview/llviewerfoldertype.cpp12
-rwxr-xr-xindra/newview/llviewergenericmessage.cpp6
-rwxr-xr-xindra/newview/llviewergesture.cpp4
-rwxr-xr-xindra/newview/llviewergesture.h1
-rwxr-xr-xindra/newview/llviewerinventory.cpp46
-rwxr-xr-xindra/newview/llviewerinventory.h4
-rwxr-xr-xindra/newview/llviewerjointattachment.cpp8
-rwxr-xr-xindra/newview/llviewerjointmesh.cpp15
-rwxr-xr-xindra/newview/llviewerjoystick.cpp22
-rwxr-xr-xindra/newview/llviewerkeyboard.cpp40
-rwxr-xr-xindra/newview/llviewermedia.cpp140
-rwxr-xr-xindra/newview/llviewermedia_streamingaudio.cpp14
-rwxr-xr-xindra/newview/llviewermediafocus.cpp28
-rwxr-xr-xindra/newview/llviewermenu.cpp146
-rwxr-xr-xindra/newview/llviewermenufile.cpp75
-rwxr-xr-xindra/newview/llviewermenufile.h2
-rwxr-xr-xindra/newview/llviewermessage.cpp265
-rwxr-xr-xindra/newview/llviewermessage.h1
-rwxr-xr-xindra/newview/llviewernetwork.cpp4
-rwxr-xr-xindra/newview/llviewerobject.cpp512
-rwxr-xr-xindra/newview/llviewerobject.h61
-rwxr-xr-xindra/newview/llviewerobjectlist.cpp468
-rwxr-xr-xindra/newview/llviewerobjectlist.h26
-rw-r--r--indra/newview/llvieweroctree.cpp1560
-rw-r--r--indra/newview/llvieweroctree.h420
-rwxr-xr-xindra/newview/llviewerparcelmedia.cpp4
-rwxr-xr-xindra/newview/llviewerparcelmgr.cpp63
-rwxr-xr-xindra/newview/llviewerparcelmgr.h3
-rwxr-xr-xindra/newview/llviewerparceloverlay.cpp91
-rwxr-xr-xindra/newview/llviewerparceloverlay.h7
-rwxr-xr-xindra/newview/llviewerpartsim.cpp42
-rwxr-xr-xindra/newview/llviewerpartsim.h4
-rwxr-xr-xindra/newview/llviewerpartsource.cpp4
-rwxr-xr-xindra/newview/llviewerprecompiledheaders.h12
-rwxr-xr-xindra/newview/llviewerregion.cpp1333
-rwxr-xr-xindra/newview/llviewerregion.h132
-rwxr-xr-xindra/newview/llviewershadermgr.cpp49
-rwxr-xr-xindra/newview/llviewershadermgr.h4
-rwxr-xr-xindra/newview/llviewerstats.cpp615
-rwxr-xr-xindra/newview/llviewerstats.h391
-rwxr-xr-xindra/newview/llviewerstatsrecorder.cpp16
-rwxr-xr-xindra/newview/llviewertexlayer.cpp26
-rwxr-xr-xindra/newview/llviewertexteditor.cpp14
-rwxr-xr-xindra/newview/llviewertexteditor.h2
-rwxr-xr-xindra/newview/llviewertexture.cpp1591
-rwxr-xr-xindra/newview/llviewertexture.h47
-rwxr-xr-xindra/newview/llviewertexturelist.cpp356
-rwxr-xr-xindra/newview/llviewertexturelist.h40
-rwxr-xr-xindra/newview/llviewerthrottle.cpp15
-rw-r--r--indra/newview/llviewerwearable.cpp17
-rw-r--r--indra/newview/llviewerwearable.h1
-rwxr-xr-xindra/newview/llviewerwindow.cpp209
-rwxr-xr-xindra/newview/llviewerwindow.h7
-rwxr-xr-xindra/newview/llvlcomposition.cpp13
-rwxr-xr-xindra/newview/llvlmanager.cpp42
-rwxr-xr-xindra/newview/llvlmanager.h19
-rwxr-xr-xindra/newview/llvoavatar.cpp574
-rwxr-xr-xindra/newview/llvoavatar.h48
-rwxr-xr-xindra/newview/llvoavatarself.cpp158
-rwxr-xr-xindra/newview/llvoavatarself.h16
-rwxr-xr-xindra/newview/llvocache.cpp980
-rwxr-xr-xindra/newview/llvocache.h187
-rwxr-xr-xindra/newview/llvograss.cpp41
-rwxr-xr-xindra/newview/llvograss.h1
-rwxr-xr-xindra/newview/llvoicechannel.cpp2
-rwxr-xr-xindra/newview/llvoiceclient.h1
-rwxr-xr-xindra/newview/llvoicevisualizer.cpp6
-rwxr-xr-xindra/newview/llvoicevivox.cpp10
-rwxr-xr-xindra/newview/llvoinventorylistener.h4
-rwxr-xr-xindra/newview/llvopartgroup.cpp38
-rwxr-xr-xindra/newview/llvosky.cpp12
-rwxr-xr-xindra/newview/llvosurfacepatch.cpp16
-rwxr-xr-xindra/newview/llvosurfacepatch.h2
-rwxr-xr-xindra/newview/llvotree.cpp26
-rwxr-xr-xindra/newview/llvotree.h1
-rwxr-xr-xindra/newview/llvotreenew.h218
-rwxr-xr-xindra/newview/llvovolume.cpp291
-rwxr-xr-xindra/newview/llvowater.cpp11
-rwxr-xr-xindra/newview/llvowlsky.cpp16
-rwxr-xr-xindra/newview/llwatchdog.cpp5
-rwxr-xr-xindra/newview/llwaterparammanager.cpp12
-rwxr-xr-xindra/newview/llwearableitemslist.cpp18
-rwxr-xr-xindra/newview/llwearableitemslist.h2
-rwxr-xr-xindra/newview/llwearablelist.cpp5
-rwxr-xr-xindra/newview/llweb.cpp2
-rwxr-xr-xindra/newview/llwebprofile.cpp24
-rwxr-xr-xindra/newview/llwind.h2
-rwxr-xr-xindra/newview/llwindebug.h1
-rwxr-xr-xindra/newview/llwldaycycle.cpp30
-rwxr-xr-xindra/newview/llwlparammanager.cpp26
-rwxr-xr-xindra/newview/llwlparamset.cpp4
-rwxr-xr-xindra/newview/llworld.cpp200
-rwxr-xr-xindra/newview/llworld.h10
-rwxr-xr-xindra/newview/llworldmap.h12
-rwxr-xr-xindra/newview/llworldmapmessage.cpp2
-rwxr-xr-xindra/newview/llworldmapmessage.h2
-rwxr-xr-xindra/newview/llworldmapview.cpp6
-rwxr-xr-xindra/newview/llxmlrpctransaction.cpp22
-rwxr-xr-xindra/newview/pipeline.cpp719
-rwxr-xr-xindra/newview/pipeline.h68
-rwxr-xr-xindra/newview/roles_constants.h192
-rwxr-xr-xindra/newview/skins/default/textures/textures.xml4
-rw-r--r--indra/newview/skins/default/textures/widgets/horizontal_drag_handle.pngbin197 -> 217 bytes
-rw-r--r--indra/newview/skins/default/textures/widgets/vertical_drag_handle.pngbin196 -> 238 bytes
-rwxr-xr-xindra/newview/skins/default/xui/da/floater_lagmeter.xml151
-rwxr-xr-xindra/newview/skins/default/xui/da/sidepanel_inventory.xml2
-rwxr-xr-xindra/newview/skins/default/xui/de/floater_lagmeter.xml151
-rwxr-xr-xindra/newview/skins/default/xui/de/sidepanel_inventory.xml2
-rwxr-xr-xindra/newview/skins/default/xui/en/floater_conversation_preview.xml1
-rwxr-xr-xindra/newview/skins/default/xui/en/floater_fast_timers.xml69
-rwxr-xr-xindra/newview/skins/default/xui/en/floater_im_session.xml2
-rwxr-xr-xindra/newview/skins/default/xui/en/floater_joystick.xml11
-rwxr-xr-xindra/newview/skins/default/xui/en/floater_lagmeter.xml336
-rwxr-xr-xindra/newview/skins/default/xui/en/floater_model_preview.xml8
-rw-r--r--indra/newview/skins/default/xui/en/floater_scene_load_stats.xml446
-rwxr-xr-xindra/newview/skins/default/xui/en/floater_stats.xml1260
-rwxr-xr-xindra/newview/skins/default/xui/en/floater_toybox.xml1
-rwxr-xr-xindra/newview/skins/default/xui/en/menu_viewer.xml28
-rwxr-xr-xindra/newview/skins/default/xui/en/panel_bottomtray_lite.xml1
-rwxr-xr-xindra/newview/skins/default/xui/en/panel_main_inventory.xml2
-rwxr-xr-xindra/newview/skins/default/xui/en/panel_nearby_chat_bar.xml1
-rwxr-xr-xindra/newview/skins/default/xui/en/panel_outfit_edit.xml963
-rwxr-xr-xindra/newview/skins/default/xui/en/panel_people.xml2
-rwxr-xr-xindra/newview/skins/default/xui/en/sidepanel_inventory.xml105
-rwxr-xr-xindra/newview/skins/default/xui/en/strings.xml1
-rwxr-xr-xindra/newview/skins/default/xui/en/widgets/avatar_icon.xml12
-rwxr-xr-xindra/newview/skins/default/xui/en/widgets/floater.xml1
-rwxr-xr-xindra/newview/skins/default/xui/es/floater_lagmeter.xml154
-rwxr-xr-xindra/newview/skins/default/xui/es/sidepanel_inventory.xml2
-rwxr-xr-xindra/newview/skins/default/xui/fr/floater_lagmeter.xml151
-rwxr-xr-xindra/newview/skins/default/xui/fr/sidepanel_inventory.xml2
-rwxr-xr-xindra/newview/skins/default/xui/it/floater_lagmeter.xml154
-rwxr-xr-xindra/newview/skins/default/xui/it/sidepanel_inventory.xml2
-rwxr-xr-xindra/newview/skins/default/xui/ja/floater_lagmeter.xml151
-rwxr-xr-xindra/newview/skins/default/xui/ja/sidepanel_inventory.xml2
-rwxr-xr-xindra/newview/skins/default/xui/pl/floater_lagmeter.xml151
-rwxr-xr-xindra/newview/skins/default/xui/pl/sidepanel_inventory.xml2
-rwxr-xr-xindra/newview/skins/default/xui/pt/floater_lagmeter.xml154
-rwxr-xr-xindra/newview/skins/default/xui/pt/sidepanel_inventory.xml2
-rwxr-xr-xindra/newview/skins/default/xui/ru/floater_lagmeter.xml151
-rwxr-xr-xindra/newview/skins/default/xui/ru/sidepanel_inventory.xml2
-rwxr-xr-xindra/newview/skins/default/xui/tr/floater_lagmeter.xml151
-rwxr-xr-xindra/newview/skins/default/xui/tr/sidepanel_inventory.xml2
-rwxr-xr-xindra/newview/skins/default/xui/zh/floater_lagmeter.xml151
-rwxr-xr-xindra/newview/skins/default/xui/zh/sidepanel_inventory.xml2
-rwxr-xr-xindra/newview/tests/llcapabilitylistener_test.cpp12
-rwxr-xr-xindra/newview/tests/llsimplestat_test.cpp580
-rwxr-xr-xindra/newview/tests/lltexturestatsuploader_test.cpp2
-rwxr-xr-xindra/newview/tests/llviewerassetstats_test.cpp686
-rwxr-xr-xindra/newview/tests/llxmlrpclistener_test.cpp8
554 files changed, 18542 insertions, 17481 deletions
diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt
index 17e340d136..2b0c431015 100755
--- a/indra/newview/CMakeLists.txt
+++ b/indra/newview/CMakeLists.txt
@@ -239,10 +239,12 @@ set(viewer_SOURCE_FILES
llfloaterhelpbrowser.cpp
llfloaterhud.cpp
llfloaterimagepreview.cpp
+ llfloaterimsessiontab.cpp
+ llfloaterimsession.cpp
+ llfloaterimcontainer.cpp
llfloaterinspect.cpp
llfloaterinventory.cpp
llfloaterjoystick.cpp
- llfloaterlagmeter.cpp
llfloaterland.cpp
llfloaterlandholdings.cpp
llfloatermap.cpp
@@ -268,6 +270,7 @@ set(viewer_SOURCE_FILES
llfloaterregioninfo.cpp
llfloaterreporter.cpp
llfloaterregionrestarting.cpp
+ llfloatersceneloadstats.cpp
llfloaterscriptdebug.cpp
llfloaterscriptlimits.cpp
llfloatersearch.cpp
@@ -323,9 +326,6 @@ set(viewer_SOURCE_FILES
llhudrender.cpp
llhudtext.cpp
llhudview.cpp
- llfloaterimsessiontab.cpp
- llfloaterimsession.cpp
- llfloaterimcontainer.cpp
llimhandler.cpp
llimview.cpp
llinspect.cpp
@@ -492,6 +492,7 @@ set(viewer_SOURCE_FILES
llremoteparcelrequest.cpp
llsavedsettingsglue.cpp
llsaveoutfitcombobtn.cpp
+ llscenemonitor.cpp
llsceneview.cpp
llscreenchannel.cpp
llscriptfloater.cpp
@@ -614,6 +615,7 @@ set(viewer_SOURCE_FILES
llviewernetwork.cpp
llviewerobject.cpp
llviewerobjectlist.cpp
+ llvieweroctree.cpp
llviewerparcelmedia.cpp
llviewerparcelmediaautoplay.cpp
llviewerparcelmgr.cpp
@@ -686,6 +688,7 @@ set(viewer_HEADER_FILES
CMakeLists.txt
ViewerInstall.cmake
groupchatlistener.h
+ llaccountingcost.h
llaccountingcostmanager.h
llagent.h
llagentaccess.h
@@ -828,10 +831,15 @@ set(viewer_HEADER_FILES
llfloaterhelpbrowser.h
llfloaterhud.h
llfloaterimagepreview.h
+ llfloaterimnearbychat.h
+ llfloaterimnearbychathandler.h
+ llfloaterimnearbychatlistener.h
+ llfloaterimsessiontab.h
+ llfloaterimsession.h
+ llfloaterimcontainer.h
llfloaterinspect.h
llfloaterinventory.h
llfloaterjoystick.h
- llfloaterlagmeter.h
llfloaterland.h
llfloaterlandholdings.h
llfloatermap.h
@@ -857,6 +865,7 @@ set(viewer_HEADER_FILES
llfloaterregioninfo.h
llfloaterreporter.h
llfloaterregionrestarting.h
+ llfloatersceneloadstats.h
llfloaterscriptdebug.h
llfloaterscriptlimits.h
llfloatersearch.h
@@ -911,9 +920,6 @@ set(viewer_HEADER_FILES
llhudrender.h
llhudtext.h
llhudview.h
- llfloaterimsessiontab.h
- llfloaterimsession.h
- llfloaterimcontainer.h
llimview.h
llinspect.h
llinspectavatar.h
@@ -965,9 +971,6 @@ set(viewer_HEADER_FILES
llnameeditor.h
llnamelistctrl.h
llnavigationbar.h
- llfloaterimnearbychat.h
- llfloaterimnearbychathandler.h
- llfloaterimnearbychatlistener.h
llnetmap.h
llnotificationhandler.h
llnotificationmanager.h
@@ -1071,6 +1074,7 @@ set(viewer_HEADER_FILES
llrootview.h
llsavedsettingsglue.h
llsaveoutfitcombobtn.h
+ llscenemonitor.h
llsceneview.h
llscreenchannel.h
llscriptfloater.h
@@ -1193,6 +1197,7 @@ set(viewer_HEADER_FILES
llviewernetwork.h
llviewerobject.h
llviewerobjectlist.h
+ llvieweroctree.h
llviewerparcelmedia.h
llviewerparcelmediaautoplay.h
llviewerparcelmgr.h
@@ -1229,7 +1234,6 @@ set(viewer_HEADER_FILES
llvosky.h
llvosurfacepatch.h
llvotree.h
- llvotreenew.h
llvovolume.h
llvowater.h
llvowlsky.h
@@ -1258,6 +1262,7 @@ set(viewer_HEADER_FILES
macmain.h
noise.h
pipeline.h
+ roles_constants.h
VertexCache.h
VorbisFramework.h
)
@@ -2280,11 +2285,6 @@ if (LL_TESTS)
"${test_libs}"
)
- LL_ADD_INTEGRATION_TEST(llsimplestat
- ""
- "${test_libs}"
- )
-
LL_ADD_INTEGRATION_TEST(llviewerassetstats
llviewerassetstats.cpp
"${test_libs}"
diff --git a/indra/newview/app_settings/logcontrol.xml b/indra/newview/app_settings/logcontrol.xml
index 92a241857e..7da047aed5 100755
--- a/indra/newview/app_settings/logcontrol.xml
+++ b/indra/newview/app_settings/logcontrol.xml
@@ -43,6 +43,7 @@
<key>tags</key>
<array>
<!-- sample entry for debugging specific items
+ <string>SceneLoadTiming</string>
<string>Avatar</string>
<string>Voice</string>
-->
diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml
index d39bf6c3c2..6e66737fe9 100755
--- a/indra/newview/app_settings/settings.xml
+++ b/indra/newview/app_settings/settings.xml
@@ -731,7 +731,6 @@
<key>Value</key>
<integer>0</integer>
</map>
-
<key>BackgroundYieldTime</key>
<map>
<key>Comment</key>
@@ -1434,6 +1433,17 @@
<real>0.0</real>
</array>
</map>
+ <key>RestoreCameraPosOnLogin</key>
+ <map>
+ <key>Comment</key>
+ <string>Reset camera position to location at logout</string>
+ <key>Persist</key>
+ <integer>1</integer>
+ <key>Type</key>
+ <string>Boolean</string>
+ <key>Value</key>
+ <integer>0</integer>
+ </map>
<key>CameraPositionSmoothing</key>
<map>
<key>Comment</key>
@@ -2972,6 +2982,17 @@
<key>Value</key>
<string>Female Shape &amp; Outfit</string>
</map>
+ <key>DefaultLoginLocation</key>
+ <map>
+ <key>Comment</key>
+ <string>Startup destination default (if not specified on command line)</string>
+ <key>Persist</key>
+ <integer>0</integer>
+ <key>Type</key>
+ <string>String</string>
+ <key>Value</key>
+ <string/>
+ </map>
<key>DefaultMaleAvatar</key>
<map>
<key>Comment</key>
@@ -6426,6 +6447,28 @@
<key>Value</key>
<integer>130</integer>
</map>
+ <key>NewObjectCreationThrottle</key>
+ <map>
+ <key>Comment</key>
+ <string>maximum number of new objects created per frame, -1 to disable this throttle</string>
+ <key>Persist</key>
+ <integer>1</integer>
+ <key>Type</key>
+ <string>S32</string>
+ <key>Value</key>
+ <integer>200</integer>
+ </map>
+ <key>NewObjectCreationThrottleDelayTime</key>
+ <map>
+ <key>Comment</key>
+ <string>time in seconds NewObjectCreationThrottle to take effect after the progress screen is lifted</string>
+ <key>Persist</key>
+ <integer>1</integer>
+ <key>Type</key>
+ <string>F32</string>
+ <key>Value</key>
+ <real>2.0</real>
+ </map>
<key>NextOwnerCopy</key>
<map>
<key>Comment</key>
@@ -6525,6 +6568,17 @@
<key>Value</key>
<integer>0</integer>
</map>
+ <key>NonvisibleObjectsInMemoryTime</key>
+ <map>
+ <key>Comment</key>
+ <string>Number of frames non-visible objects stay in memory before being removed. 0 means never to remove.</string>
+ <key>Persist</key>
+ <integer>1</integer>
+ <key>Type</key>
+ <string>U32</string>
+ <key>Value</key>
+ <integer>300</integer>
+ </map>
<key>NoPreload</key>
<map>
<key>Comment</key>
@@ -6845,6 +6899,17 @@
<key>Value</key>
<integer>1</integer>
</map>
+ <key>RequestFullRegionCache</key>
+ <map>
+ <key>Comment</key>
+ <string>If set, ask sim to send full region object cache. Needs to restart viewer.</string>
+ <key>Persist</key>
+ <integer>1</integer>
+ <key>Type</key>
+ <string>Boolean</string>
+ <key>Value</key>
+ <integer>1</integer>
+ </map>
<key>OpenDebugStatAdvanced</key>
<map>
<key>Comment</key>
@@ -7047,7 +7112,6 @@
<real>0.75</real>
</array>
</map>
-
<key>ParcelMediaAutoPlayEnable</key>
<map>
<key>Comment</key>
@@ -7414,6 +7478,17 @@
<key>Value</key>
<real>6.0</real>
</map>
+ <key>ClothingLoadingDelay</key>
+ <map>
+ <key>Comment</key>
+ <string>Time to wait for avatar appearance to resolve before showing world (seconds)</string>
+ <key>Persist</key>
+ <integer>1</integer>
+ <key>Type</key>
+ <string>F32</string>
+ <key>Value</key>
+ <real>10.0</real>
+ </map>
<key>PreferredMaturity</key>
<map>
<key>Comment</key>
@@ -7969,7 +8044,6 @@
<key>Value</key>
<integer>1</integer>
</map>
-
<key>OctreeMaxNodeCapacity</key>
<map>
<key>Comment</key>
@@ -10189,6 +10263,105 @@
<key>Value</key>
<integer>0</integer>
</map>
+ <key>SceneLoadFrontPixelThreshold</key>
+ <map>
+ <key>Comment</key>
+ <string>in pixels, all objects in view frustum whose screen area is greater than this threshold will be loaded</string>
+ <key>Persist</key>
+ <integer>1</integer>
+ <key>Type</key>
+ <string>F32</string>
+ <key>Value</key>
+ <real>100.0</real>
+ </map>
+ <key>SceneLoadHighMemoryBound</key>
+ <map>
+ <key>Comment</key>
+ <string>in MB, when total memory usage above this threshold, minimum invisible objects are kept in memory </string>
+ <key>Persist</key>
+ <integer>1</integer>
+ <key>Type</key>
+ <string>U32</string>
+ <key>Value</key>
+ <real>1024</real>
+ </map>
+ <key>SceneLoadLowMemoryBound</key>
+ <map>
+ <key>Comment</key>
+ <string>in MB, when total memory usage above this threshold, start to reduce invisible objects kept in memory </string>
+ <key>Persist</key>
+ <integer>1</integer>
+ <key>Type</key>
+ <string>U32</string>
+ <key>Value</key>
+ <real>750</real>
+ </map>
+ <key>SceneLoadMinRadius</key>
+ <map>
+ <key>Comment</key>
+ <string>in meters, all objects (visible or invisible) within this radius will remain loaded in memory</string>
+ <key>Persist</key>
+ <integer>1</integer>
+ <key>Type</key>
+ <string>F32</string>
+ <key>Value</key>
+ <real>32.0</real>
+ </map>
+ <key>SceneLoadRearMaxRadiusFraction</key>
+ <map>
+ <key>Comment</key>
+ <string>a percentage of draw distance beyond which all objects outside of view frustum will be unloaded, regardless of pixel threshold</string>
+ <key>Persist</key>
+ <integer>1</integer>
+ <key>Type</key>
+ <string>F32</string>
+ <key>Value</key>
+ <real>75.0</real>
+ </map>
+ <key>SceneLoadRearPixelThreshold</key>
+ <map>
+ <key>Comment</key>
+ <string>in pixels, all objects out of view frustum whose screen area is greater than this threshold will remain loaded</string>
+ <key>Persist</key>
+ <integer>1</integer>
+ <key>Type</key>
+ <string>F32</string>
+ <key>Value</key>
+ <real>400.0</real>
+ </map>
+ <key>SceneLoadingMonitorEnabled</key>
+ <map>
+ <key>Comment</key>
+ <string>Enabled scene loading monitor if set</string>
+ <key>Persist</key>
+ <integer>0</integer>
+ <key>Type</key>
+ <string>Boolean</string>
+ <key>Value</key>
+ <integer>0</integer>
+ </map>
+ <key>SceneLoadingMonitorSampleTime</key>
+ <map>
+ <key>Comment</key>
+ <string>Time between screen samples when monitor scene load (seconds)</string>
+ <key>Persist</key>
+ <integer>1</integer>
+ <key>Type</key>
+ <string>F32</string>
+ <key>Value</key>
+ <real>0.25</real>
+ </map>
+ <key>SceneLoadingMonitorPixelDiffThreshold</key>
+ <map>
+ <key>Comment</key>
+ <string>Amount of pixels changed required to consider the scene as still loading (square root of fraction of pixels on screen)</string>
+ <key>Persist</key>
+ <integer>1</integer>
+ <key>Type</key>
+ <string>F32</string>
+ <key>Value</key>
+ <real>0.02</real>
+ </map>
<key>ScriptHelpFollowsCursor</key>
<map>
<key>Comment</key>
@@ -11927,50 +12100,6 @@
<key>Value</key>
<integer>1</integer>
</map>
- <key>UIAvatariconctrlSymbolHPad</key>
- <map>
- <key>Comment</key>
- <string>UI Avatar Icon Control Symbol Horizontal Pad</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>S32</string>
- <key>Value</key>
- <real>2</real>
- </map>
- <key>UIAvatariconctrlSymbolVPad</key>
- <map>
- <key>Comment</key>
- <string>UI Avatar Icon Control Symbol Vertical Pad</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>S32</string>
- <key>Value</key>
- <real>2</real>
- </map>
- <key>UIAvatariconctrlSymbolSize</key>
- <map>
- <key>Comment</key>
- <string>UI Avatar Icon Control Symbol Size</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>S32</string>
- <key>Value</key>
- <real>5</real>
- </map>
- <key>UIAvatariconctrlSymbolPosition</key>
- <map>
- <key>Comment</key>
- <string>UI Avatar Icon Control Symbol Position (TopLeft|TopRight|BottomLeft|BottomRight)</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>String</string>
- <key>Value</key>
- <string>BottomRight</string>
- </map>
<key>UIButtonOrigHPad</key>
<map>
<key>Comment</key>
@@ -13148,6 +13277,17 @@
<key>Value</key>
<integer>1</integer>
</map>
+ <key>UseObjectCacheOcclusion</key>
+ <map>
+ <key>Comment</key>
+ <string>Enable object cache level object culling based on occlusion (coverage) by other objects</string>
+ <key>Persist</key>
+ <integer>1</integer>
+ <key>Type</key>
+ <string>Boolean</string>
+ <key>Value</key>
+ <integer>1</integer>
+ </map>
<key>RenderSynchronousOcclusion</key>
<map>
<key>Comment</key>
@@ -14925,6 +15065,28 @@
<key>Value</key>
<integer>0</integer>
</map>
+ <key>TeleportArrivalDelay</key>
+ <map>
+ <key>Comment</key>
+ <string>Time to wait before displaying world during teleport (seconds)</string>
+ <key>Persist</key>
+ <integer>1</integer>
+ <key>Type</key>
+ <string>F32</string>
+ <key>Value</key>
+ <real>2</real>
+ </map>
+ <key>TeleportLocalDelay</key>
+ <map>
+ <key>Comment</key>
+ <string>Delay to prevent teleports after starting an in-sim teleport. (seconds)</string>
+ <key>Persist</key>
+ <integer>1</integer>
+ <key>Type</key>
+ <string>F32</string>
+ <key>Value</key>
+ <real>1</real>
+ </map>
<key>FMODExProfilerEnable</key>
<map>
<key>Comment</key>
diff --git a/indra/newview/app_settings/shaders/class1/interface/onetexturefilterF.glsl b/indra/newview/app_settings/shaders/class1/interface/onetexturefilterF.glsl
new file mode 100644
index 0000000000..f1400c9b44
--- /dev/null
+++ b/indra/newview/app_settings/shaders/class1/interface/onetexturefilterF.glsl
@@ -0,0 +1,49 @@
+/**
+ * @file onetexturefilterF.glsl
+ *
+ * $LicenseInfo:firstyear=2007&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2007, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
+ * $/LicenseInfo$
+ */
+
+#ifdef DEFINE_GL_FRAGCOLOR
+out vec4 frag_color;
+#else
+#define frag_color gl_FragColor
+#endif
+
+uniform sampler2D tex0;
+uniform float tolerance;
+
+VARYING vec2 vary_texcoord0;
+
+void main()
+{
+ frag_color = texture2D(tex0, vary_texcoord0.xy);
+
+ if(frag_color[0] + frag_color[1] + frag_color[2] < tolerance)
+ {
+ discard;
+ }
+ else
+ {
+ frag_color[3] = 0.95f;
+ }
+}
diff --git a/indra/newview/app_settings/shaders/class1/interface/onetexturefilterV.glsl b/indra/newview/app_settings/shaders/class1/interface/onetexturefilterV.glsl
new file mode 100644
index 0000000000..a33ef7e92c
--- /dev/null
+++ b/indra/newview/app_settings/shaders/class1/interface/onetexturefilterV.glsl
@@ -0,0 +1,38 @@
+/**
+ * @file onetexturefilterV.glsl
+ *
+ * $LicenseInfo:firstyear=2007&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2007, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
+ * $/LicenseInfo$
+ */
+
+uniform mat4 modelview_projection_matrix;
+
+ATTRIBUTE vec3 position;
+ATTRIBUTE vec2 texcoord0;
+
+VARYING vec2 vary_texcoord0;
+
+void main()
+{
+ gl_Position = modelview_projection_matrix * vec4(position.xyz, 1.0);
+ vary_texcoord0 = texcoord0;
+}
+
diff --git a/indra/newview/app_settings/shaders/class1/interface/twotexturecompareF.glsl b/indra/newview/app_settings/shaders/class1/interface/twotexturecompareF.glsl
new file mode 100644
index 0000000000..6eeb2596b2
--- /dev/null
+++ b/indra/newview/app_settings/shaders/class1/interface/twotexturecompareF.glsl
@@ -0,0 +1,58 @@
+/**
+ * @file twotexturecompareF.glsl
+ *
+ * $LicenseInfo:firstyear=2007&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2007, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
+ * $/LicenseInfo$
+ */
+
+#ifdef DEFINE_GL_FRAGCOLOR
+out vec4 frag_color;
+#else
+#define frag_color gl_FragColor
+#endif
+
+uniform sampler2D tex0;
+uniform sampler2D tex1;
+uniform sampler2D dither_tex;
+uniform float dither_scale;
+uniform float dither_scale_s;
+uniform float dither_scale_t;
+
+VARYING vec2 vary_texcoord0;
+VARYING vec2 vary_texcoord1;
+
+void main()
+{
+ frag_color = abs(texture2D(tex0, vary_texcoord0.xy) - texture2D(tex1, vary_texcoord0.xy));
+
+ vec2 dither_coord;
+ dither_coord[0] = vary_texcoord0[0] * dither_scale_s;
+ dither_coord[1] = vary_texcoord0[1] * dither_scale_t;
+ vec4 dither_vec = texture(dither_tex, dither_coord.xy);
+
+ for(int i = 0; i < 3; i++)
+ {
+ if(frag_color[i] < dither_vec[i] * dither_scale)
+ {
+ frag_color[i] = 0.f;
+ }
+ }
+}
diff --git a/indra/newview/app_settings/shaders/class1/interface/twotexturecompareV.glsl b/indra/newview/app_settings/shaders/class1/interface/twotexturecompareV.glsl
new file mode 100644
index 0000000000..67c6674f0c
--- /dev/null
+++ b/indra/newview/app_settings/shaders/class1/interface/twotexturecompareV.glsl
@@ -0,0 +1,41 @@
+/**
+ * @file twotexturecompareV.glsl
+ *
+ * $LicenseInfo:firstyear=2007&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2007, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
+ * $/LicenseInfo$
+ */
+
+uniform mat4 modelview_projection_matrix;
+
+ATTRIBUTE vec3 position;
+ATTRIBUTE vec2 texcoord0;
+ATTRIBUTE vec2 texcoord1;
+
+VARYING vec2 vary_texcoord0;
+VARYING vec2 vary_texcoord1;
+
+void main()
+{
+ gl_Position = modelview_projection_matrix * vec4(position.xyz, 1.0);
+ vary_texcoord0 = texcoord0;
+ vary_texcoord1 = texcoord1;
+}
+
diff --git a/indra/newview/llaccountingcost.h b/indra/newview/llaccountingcost.h
new file mode 100755
index 0000000000..bc770fe1d2
--- /dev/null
+++ b/indra/newview/llaccountingcost.h
@@ -0,0 +1,55 @@
+/**
+ * @file llaccountingcost.h
+ * @
+ *
+ * $LicenseInfo:firstyear=2001&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2011, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
+ * $/LicenseInfo$
+ */
+
+#ifndef LL_ACCOUNTINGQUOTA_H
+#define LL_ACCOUNTINGQUOTA_H
+
+//SelectionQuota atm does not require a id
+struct SelectionCost
+{
+ SelectionCost( /*LLTransactionID transactionId, */ F32 physicsCost, F32 networkCost, F32 simulationCost )
+ //: mTransactionId( transactionId)
+ : mPhysicsCost( physicsCost )
+ , mNetworkCost( networkCost )
+ , mSimulationCost( simulationCost )
+ {
+ }
+ SelectionCost()
+ : mPhysicsCost( 0.0f )
+ , mNetworkCost( 0.0f )
+ , mSimulationCost( 0.0f )
+ {}
+
+ F32 mPhysicsCost, mNetworkCost, mSimulationCost;
+ //LLTransactionID mTransactionId;
+};
+
+typedef enum { Roots = 0 , Prims } eSelectionType;
+
+#endif
+
+
+
diff --git a/indra/newview/llaccountingcostmanager.cpp b/indra/newview/llaccountingcostmanager.cpp
index 7662a9689d..150b97baa5 100755
--- a/indra/newview/llaccountingcostmanager.cpp
+++ b/indra/newview/llaccountingcostmanager.cpp
@@ -58,7 +58,7 @@ public:
void errorWithContent( U32 statusNum, const std::string& reason, const LLSD& content )
{
- llwarns << "Transport error [status:" << statusNum << "]: " << content <<llendl;
+ LL_WARNS() << "Transport error [status:" << statusNum << "]: " << content <<LL_ENDL;
clearPendingRequests();
LLAccountingCostObserver* observer = mObserverHandle.get();
@@ -73,7 +73,7 @@ public:
//Check for error
if ( !content.isMap() || content.has("error") )
{
- llwarns << "Error on fetched data"<< llendl;
+ LL_WARNS() << "Error on fetched data"<< LL_ENDL;
}
else if (content.has("selected"))
{
@@ -148,7 +148,7 @@ void LLAccountingCostManager::fetchCosts( eSelectionType selectionType,
}
else
{
- llinfos<<"Invalid selection type "<<llendl;
+ LL_INFOS()<<"Invalid selection type "<<LL_ENDL;
mObjectList.clear();
mPendingObjectQuota.clear();
return;
@@ -163,7 +163,7 @@ void LLAccountingCostManager::fetchCosts( eSelectionType selectionType,
else
{
//url was empty - warn & continue
- llwarns<<"Supplied url is empty "<<llendl;
+ LL_WARNS()<<"Supplied url is empty "<<LL_ENDL;
mObjectList.clear();
mPendingObjectQuota.clear();
}
diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp
index f150ceda67..eb9ca542a3 100755
--- a/indra/newview/llagent.cpp
+++ b/indra/newview/llagent.cpp
@@ -755,7 +755,7 @@ void LLAgent::setFlying(BOOL fly)
}
if( !was_flying )
{
- LLViewerStats::getInstance()->incStat(LLViewerStats::ST_FLY_COUNT);
+ add(LLStatViewer::FLY, 1);
}
setControlFlags(AGENT_CONTROL_FLY);
}
@@ -812,7 +812,7 @@ void LLAgent::standUp()
void LLAgent::handleServerBakeRegionTransition(const LLUUID& region_id)
{
- llinfos << "called" << llendl;
+ LL_INFOS() << "called" << LL_ENDL;
// Old-style appearance entering a server-bake region.
@@ -820,7 +820,7 @@ void LLAgent::handleServerBakeRegionTransition(const LLUUID& region_id)
!gAgentAvatarp->isUsingServerBakes() &&
(mRegionp->getCentralBakeVersion()>0))
{
- llinfos << "update requested due to region transition" << llendl;
+ LL_INFOS() << "update requested due to region transition" << LL_ENDL;
LLAppearanceMgr::instance().requestServerAppearanceUpdate();
}
// new-style appearance entering a non-bake region,
@@ -851,12 +851,12 @@ boost::signals2::connection LLAgent::addParcelChangedCallback(parcel_changed_cal
void LLAgent::setRegion(LLViewerRegion *regionp)
{
bool notifyRegionChange;
-
+
llassert(regionp);
if (mRegionp != regionp)
{
notifyRegionChange = true;
-
+
std::string ip = regionp->getHost().getString();
LL_INFOS("AgentLocation") << "Moving agent into region: " << regionp->getName()
<< " located at " << ip << LL_ENDL;
@@ -1011,12 +1011,12 @@ void LLAgent::sendMessage()
{
if (gDisconnected)
{
- llwarns << "Trying to send message when disconnected!" << llendl;
+ LL_WARNS() << "Trying to send message when disconnected!" << LL_ENDL;
return;
}
if (!mRegionp)
{
- llerrs << "No region for agent yet!" << llendl;
+ LL_ERRS() << "No region for agent yet!" << LL_ENDL;
return;
}
gMessageSystem->sendMessage(mRegionp->getHost());
@@ -1030,12 +1030,12 @@ void LLAgent::sendReliableMessage()
{
if (gDisconnected)
{
- lldebugs << "Trying to send message when disconnected!" << llendl;
+ LL_DEBUGS() << "Trying to send message when disconnected!" << LL_ENDL;
return;
}
if (!mRegionp)
{
- lldebugs << "LLAgent::sendReliableMessage No region for agent yet, not sending message!" << llendl;
+ LL_DEBUGS() << "LLAgent::sendReliableMessage No region for agent yet, not sending message!" << LL_ENDL;
return;
}
gMessageSystem->sendReliable(mRegionp->getHost());
@@ -1064,7 +1064,7 @@ void LLAgent::setPositionAgent(const LLVector3 &pos_agent)
{
if (!pos_agent.isFinite())
{
- llerrs << "setPositionAgent is not a number" << llendl;
+ LL_ERRS() << "setPositionAgent is not a number" << LL_ENDL;
}
if (isAgentAvatarValid() && gAgentAvatarp->getParent())
@@ -1196,7 +1196,7 @@ void LLAgent::resetAxes(const LLVector3 &look_at)
LLVector3 cross(look_at % skyward);
if (cross.isNull())
{
- llinfos << "LLAgent::resetAxes cross-product is zero" << llendl;
+ LL_INFOS() << "LLAgent::resetAxes cross-product is zero" << LL_ENDL;
return;
}
@@ -2073,7 +2073,7 @@ void LLAgent::endAnimationUpdateUI()
im_box->getDetachedConversationFloaters(conversations);
BOOST_FOREACH(LLFloater* conversation, conversations)
{
- llinfos << "skip_list.insert(session_floater): " << conversation->getTitle() << llendl;
+ LL_INFOS() << "skip_list.insert(session_floater): " << conversation->getTitle() << LL_ENDL;
skip_list.insert(conversation);
}
@@ -2336,7 +2336,7 @@ void LLAgent::setStartPosition( U32 location_id )
object = gObjectList.findObject(gAgentID);
if (! object)
{
- llinfos << "setStartPosition - Can't find agent viewerobject id " << gAgentID << llendl;
+ LL_INFOS() << "setStartPosition - Can't find agent viewerobject id " << gAgentID << LL_ENDL;
return;
}
// we've got the viewer object
@@ -2437,7 +2437,7 @@ void LLAgent::requestStopMotion( LLMotion* motion )
// if motion is not looping, it could have stopped by running out of time
// so we need to tell the server this
-// llinfos << "Sending stop for motion " << motion->getName() << llendl;
+// LL_INFOS() << "Sending stop for motion " << motion->getName() << LL_ENDL;
sendAnimationRequest( anim_state, ANIM_REQUEST_STOP );
}
@@ -2600,19 +2600,19 @@ void LLMaturityPreferencesResponder::result(const LLSD &pContent)
if (actualMaturity != mPreferredMaturity)
{
- llwarns << "while attempting to change maturity preference from '" << LLViewerRegion::accessToString(mPreviousMaturity)
+ LL_WARNS() << "while attempting to change maturity preference from '" << LLViewerRegion::accessToString(mPreviousMaturity)
<< "' to '" << LLViewerRegion::accessToString(mPreferredMaturity) << "', the server responded with '"
<< LLViewerRegion::accessToString(actualMaturity) << "' [value:" << static_cast<U32>(actualMaturity) << ", llsd:"
- << pContent << "]" << llendl;
+ << pContent << "]" << LL_ENDL;
}
mAgent->handlePreferredMaturityResult(actualMaturity);
}
void LLMaturityPreferencesResponder::errorWithContent(U32 pStatus, const std::string& pReason, const LLSD& pContent)
{
- llwarns << "while attempting to change maturity preference from '" << LLViewerRegion::accessToString(mPreviousMaturity)
+ LL_WARNS() << "while attempting to change maturity preference from '" << LLViewerRegion::accessToString(mPreviousMaturity)
<< "' to '" << LLViewerRegion::accessToString(mPreferredMaturity) << "', we got an error with [status:"
- << pStatus << "]: " << (pContent.isDefined() ? pContent : LLSD(pReason)) << llendl;
+ << pStatus << "]: " << (pContent.isDefined() ? pContent : LLSD(pReason)) << LL_ENDL;
mAgent->handlePreferredMaturityError();
}
@@ -2661,8 +2661,8 @@ void LLAgent::handlePreferredMaturityResult(U8 pServerMaturity)
// server by re-sending our last known request. Cap the re-tries at 3 just to be safe.
else if (++mMaturityPreferenceNumRetries <= 3)
{
- llinfos << "Retrying attempt #" << mMaturityPreferenceNumRetries << " to set viewer preferred maturity to '"
- << LLViewerRegion::accessToString(mLastKnownRequestMaturity) << "'" << llendl;
+ LL_INFOS() << "Retrying attempt #" << mMaturityPreferenceNumRetries << " to set viewer preferred maturity to '"
+ << LLViewerRegion::accessToString(mLastKnownRequestMaturity) << "'" << LL_ENDL;
sendMaturityPreferenceToServer(mLastKnownRequestMaturity);
}
// Else, the viewer is style out of sync with the server after 3 retries, so inform the user
@@ -2689,8 +2689,8 @@ void LLAgent::handlePreferredMaturityError()
// the server, but not quite sure why we are
if (mLastKnownRequestMaturity == mLastKnownResponseMaturity)
{
- llwarns << "Got an error but maturity preference '" << LLViewerRegion::accessToString(mLastKnownRequestMaturity)
- << "' seems to be in sync with the server" << llendl;
+ LL_WARNS() << "Got an error but maturity preference '" << LLViewerRegion::accessToString(mLastKnownRequestMaturity)
+ << "' seems to be in sync with the server" << LL_ENDL;
reportPreferredMaturitySuccess();
}
// Else, the more likely case is that the last request does not match the last response,
@@ -2744,7 +2744,7 @@ void LLAgent::reportPreferredMaturityError()
{
bool tmpIsDoSendMaturityPreferenceToServer = mIsDoSendMaturityPreferenceToServer;
mIsDoSendMaturityPreferenceToServer = false;
- llinfos << "Setting viewer preferred maturity to '" << LLViewerRegion::accessToString(mLastKnownResponseMaturity) << "'" << llendl;
+ LL_INFOS() << "Setting viewer preferred maturity to '" << LLViewerRegion::accessToString(mLastKnownResponseMaturity) << "'" << LL_ENDL;
gSavedSettings.setU32("PreferredMaturity", static_cast<U32>(mLastKnownResponseMaturity));
mIsDoSendMaturityPreferenceToServer = tmpIsDoSendMaturityPreferenceToServer;
}
@@ -2793,8 +2793,8 @@ void LLAgent::sendMaturityPreferenceToServer(U8 pPreferredMaturity)
LLSD body = LLSD::emptyMap();
body["access_prefs"] = access_prefs;
- llinfos << "Sending viewer preferred maturity to '" << LLViewerRegion::accessToString(pPreferredMaturity)
- << "' via capability to: " << url << llendl;
+ LL_INFOS() << "Sending viewer preferred maturity to '" << LLViewerRegion::accessToString(pPreferredMaturity)
+ << "' via capability to: " << url << LL_ENDL;
LLSD headers;
LLHTTPClient::post(url, body, responderPtr, headers, 30.0f);
}
@@ -2869,10 +2869,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;
}
@@ -2889,12 +2889,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;
@@ -2910,12 +2910,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);
}
}
@@ -2924,12 +2924,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;
}
}
@@ -2938,12 +2938,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;
}
}
@@ -2952,12 +2952,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");
@@ -2975,13 +2975,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");
@@ -3001,7 +3001,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()
@@ -3030,7 +3030,7 @@ LLQuaternion LLAgent::getHeadRotation()
return rot;
}
-void LLAgent::sendAnimationRequests(LLDynamicArray<LLUUID> &anim_ids, EAnimRequest request)
+void LLAgent::sendAnimationRequests(const std::vector<LLUUID> &anim_ids, EAnimRequest request)
{
if (gAgentID.isNull())
{
@@ -3045,7 +3045,7 @@ void LLAgent::sendAnimationRequests(LLDynamicArray<LLUUID> &anim_ids, EAnimReque
msg->addUUIDFast(_PREHASH_AgentID, getID());
msg->addUUIDFast(_PREHASH_SessionID, getSessionID());
- for (S32 i = 0; i < anim_ids.count(); i++)
+ for (S32 i = 0; i < anim_ids.size(); i++)
{
if (anim_ids[i].isNull())
{
@@ -3282,7 +3282,7 @@ void LLAgent::processAgentDropGroup(LLMessageSystem *msg, void **)
if (agent_id != gAgentID)
{
- llwarns << "processAgentDropGroup for agent other than me" << llendl;
+ LL_WARNS() << "processAgentDropGroup for agent other than me" << LL_ENDL;
return;
}
@@ -3292,10 +3292,10 @@ void LLAgent::processAgentDropGroup(LLMessageSystem *msg, void **)
// Remove the group if it already exists remove it and add the new data to pick up changes.
LLGroupData gd;
gd.mID = group_id;
- S32 index = gAgent.mGroups.find(gd);
- if (index != -1)
+ std::vector<LLGroupData>::iterator found_it = std::find(gAgent.mGroups.begin(), gAgent.mGroups.end(), gd);
+ if (found_it != gAgent.mGroups.end())
{
- gAgent.mGroups.remove(index);
+ gAgent.mGroups.erase(found_it);
if (gAgent.getGroupID() == group_id)
{
gAgent.mGroupID.setNull();
@@ -3313,7 +3313,7 @@ void LLAgent::processAgentDropGroup(LLMessageSystem *msg, void **)
}
else
{
- llwarns << "processAgentDropGroup, agent is not part of group " << group_id << llendl;
+ LL_WARNS() << "processAgentDropGroup, agent is not part of group " << group_id << LL_ENDL;
}
}
@@ -3346,7 +3346,7 @@ class LLAgentDropGroupViewerNode : public LLHTTPNode
body["AgentData"].isArray() &&
body["AgentData"][0].isMap() )
{
- llinfos << "VALID DROP GROUP" << llendl;
+ LL_INFOS() << "VALID DROP GROUP" << LL_ENDL;
//there is only one set of data in the AgentData block
LLSD agent_data = body["AgentData"][0];
@@ -3358,8 +3358,8 @@ class LLAgentDropGroupViewerNode : public LLHTTPNode
if (agent_id != gAgentID)
{
- llwarns
- << "AgentDropGroup for agent other than me" << llendl;
+ LL_WARNS()
+ << "AgentDropGroup for agent other than me" << LL_ENDL;
response->notFound();
return;
@@ -3369,10 +3369,10 @@ class LLAgentDropGroupViewerNode : public LLHTTPNode
// and add the new data to pick up changes.
LLGroupData gd;
gd.mID = group_id;
- S32 index = gAgent.mGroups.find(gd);
- if (index != -1)
+ std::vector<LLGroupData>::iterator found_it = std::find(gAgent.mGroups.begin(), gAgent.mGroups.end(), gd);
+ if (found_it != gAgent.mGroups.end())
{
- gAgent.mGroups.remove(index);
+ gAgent.mGroups.erase(found_it);
if (gAgent.getGroupID() == group_id)
{
gAgent.mGroupID.setNull();
@@ -3390,9 +3390,9 @@ class LLAgentDropGroupViewerNode : public LLHTTPNode
}
else
{
- llwarns
+ LL_WARNS()
<< "AgentDropGroup, agent is not part of group "
- << group_id << llendl;
+ << group_id << LL_ENDL;
}
response->result(LLSD());
@@ -3419,13 +3419,12 @@ void LLAgent::processAgentGroupDataUpdate(LLMessageSystem *msg, void **)
if (agent_id != gAgentID)
{
- llwarns << "processAgentGroupDataUpdate for agent other than me" << llendl;
+ LL_WARNS() << "processAgentGroupDataUpdate for agent other than me" << LL_ENDL;
return;
}
S32 count = msg->getNumberOfBlocksFast(_PREHASH_GroupData);
LLGroupData group;
- S32 index = -1;
bool need_floater_update = false;
for(S32 i = 0; i < count; ++i)
{
@@ -3440,12 +3439,12 @@ void LLAgent::processAgentGroupDataUpdate(LLMessageSystem *msg, void **)
{
need_floater_update = true;
// Remove the group if it already exists remove it and add the new data to pick up changes.
- index = gAgent.mGroups.find(group);
- if (index != -1)
+ std::vector<LLGroupData>::iterator found_it = std::find(gAgent.mGroups.begin(), gAgent.mGroups.end(), group);
+ if (found_it != gAgent.mGroups.end())
{
- gAgent.mGroups.remove(index);
+ gAgent.mGroups.erase(found_it);
}
- gAgent.mGroups.put(group);
+ gAgent.mGroups.push_back(group);
}
if (need_floater_update)
{
@@ -3469,7 +3468,7 @@ class LLAgentGroupDataUpdateViewerNode : public LLHTTPNode
if (agent_id != gAgentID)
{
- llwarns << "processAgentGroupDataUpdate for agent other than me" << llendl;
+ LL_WARNS() << "processAgentGroupDataUpdate for agent other than me" << LL_ENDL;
return;
}
@@ -3484,7 +3483,6 @@ class LLAgentGroupDataUpdateViewerNode : public LLHTTPNode
{
LLGroupData group;
- S32 index = -1;
bool need_floater_update = false;
group.mID = (*iter_group)["GroupID"].asUUID();
@@ -3501,12 +3499,12 @@ class LLAgentGroupDataUpdateViewerNode : public LLHTTPNode
{
need_floater_update = true;
// Remove the group if it already exists remove it and add the new data to pick up changes.
- index = gAgent.mGroups.find(group);
- if (index != -1)
+ std::vector<LLGroupData>::iterator found_it = std::find(gAgent.mGroups.begin(), gAgent.mGroups.end(), group);
+ if (found_it != gAgent.mGroups.end())
{
- gAgent.mGroups.remove(index);
+ gAgent.mGroups.erase(found_it);
}
- gAgent.mGroups.put(group);
+ gAgent.mGroups.push_back(group);
}
if (need_floater_update)
{
@@ -3528,7 +3526,7 @@ void LLAgent::processAgentDataUpdate(LLMessageSystem *msg, void **)
if (agent_id != gAgentID)
{
- llwarns << "processAgentDataUpdate for agent other than me" << llendl;
+ LL_WARNS() << "processAgentDataUpdate for agent other than me" << LL_ENDL;
return;
}
@@ -3696,7 +3694,7 @@ void LLAgent::processAgentCachedTextureResponse(LLMessageSystem *mesgsys, void *
if (!isAgentAvatarValid() || gAgentAvatarp->isDead())
{
- llwarns << "No avatar for user in cached texture update!" << llendl;
+ LL_WARNS() << "No avatar for user in cached texture update!" << LL_ENDL;
return;
}
@@ -3733,7 +3731,7 @@ void LLAgent::processAgentCachedTextureResponse(LLMessageSystem *mesgsys, void *
{
if (texture_id.notNull())
{
- //llinfos << "Received cached texture " << (U32)texture_index << ": " << texture_id << llendl;
+ //LL_INFOS() << "Received cached texture " << (U32)texture_index << ": " << texture_id << LL_ENDL;
gAgentAvatarp->setCachedBakedTexture((ETextureIndex)texture_index, texture_id);
//gAgentAvatarp->setTETexture( LLVOAvatar::sBakedTextureIndices[texture_index], texture_id );
gAgentQueryManager.mActiveCacheQueries[baked_index] = 0;
@@ -3748,7 +3746,7 @@ void LLAgent::processAgentCachedTextureResponse(LLMessageSystem *mesgsys, void *
}
}
}
- llinfos << "Received cached texture response for " << num_results << " textures." << llendl;
+ LL_INFOS() << "Received cached texture response for " << num_results << " textures." << LL_ENDL;
gAgentAvatarp->outputRezTiming("Fetched agent wearables textures from cache. Will now load them");
gAgentAvatarp->updateMeshTextures();
@@ -3826,7 +3824,7 @@ bool LLAgent::teleportCore(bool is_local)
{
if ((TELEPORT_NONE != mTeleportState) && (mTeleportState != TELEPORT_PENDING))
{
- llwarns << "Attempt to teleport when already teleporting." << llendl;
+ LL_WARNS() << "Attempt to teleport when already teleporting." << LL_ENDL;
return false;
}
@@ -3880,7 +3878,7 @@ bool LLAgent::teleportCore(bool is_local)
gAgentCamera.resetView(FALSE);
// local logic
- LLViewerStats::getInstance()->incStat(LLViewerStats::ST_TELEPORT_COUNT);
+ add(LLStatViewer::TELEPORT, 1);
if (is_local)
{
gAgent.setTeleportState( LLAgent::TELEPORT_LOCAL );
@@ -3892,6 +3890,7 @@ bool LLAgent::teleportCore(bool is_local)
//release geometry from old location
gPipeline.resetVertexBuffers();
+ LLSpatialPartition::sTeleportRequested = TRUE;
}
make_ui_sound("UISndTeleportOut");
@@ -4104,6 +4103,7 @@ void LLAgent::teleportCancel()
}
clearTeleportRequest();
gAgent.setTeleportState( LLAgent::TELEPORT_NONE );
+ gPipeline.resetVertexBuffers();
}
@@ -4136,7 +4136,7 @@ void LLAgent::doTeleportViaLocation(const LLVector3d& pos_global)
else if(regionp &&
teleportCore(regionp->getHandle() == to_region_handle_global((F32)pos_global.mdV[VX], (F32)pos_global.mdV[VY])))
{
- llwarns << "Using deprecated teleportlocationrequest." << llendl;
+ LL_WARNS() << "Using deprecated teleportlocationrequest." << LL_ENDL;
// send the message
LLMessageSystem* msg = gMessageSystem;
msg->newMessageFast(_PREHASH_TeleportLocationRequest);
@@ -4197,7 +4197,7 @@ void LLAgent::setTeleportState(ETeleportState state)
case TELEPORT_ARRIVING:
// First two position updates after a teleport tend to be weird
- LLViewerStats::getInstance()->mAgentPositionSnaps.mCountOfNextUpdatesToIgnore = 2;
+ //LLViewerStats::getInstance()->mAgentPositionSnaps.mCountOfNextUpdatesToIgnore = 2;
// Let the interested parties know we've teleported.
LLViewerParcelMgr::getInstance()->onTeleportFinished(false, getPositionGlobal());
@@ -4214,7 +4214,7 @@ void LLAgent::stopCurrentAnimations()
// avatar, propagating this change back to the server.
if (isAgentAvatarValid())
{
- LLDynamicArray<LLUUID> anim_ids;
+ std::vector<LLUUID> anim_ids;
for ( LLVOAvatar::AnimIterator anim_it =
gAgentAvatarp->mPlayingAnimations.begin();
@@ -4310,11 +4310,12 @@ void LLAgent::fidget()
void LLAgent::stopFidget()
{
- LLDynamicArray<LLUUID> anims;
- anims.put(ANIM_AGENT_STAND_1);
- anims.put(ANIM_AGENT_STAND_2);
- anims.put(ANIM_AGENT_STAND_3);
- anims.put(ANIM_AGENT_STAND_4);
+ std::vector<LLUUID> anims;
+ anims.reserve(4);
+ anims.push_back(ANIM_AGENT_STAND_1);
+ anims.push_back(ANIM_AGENT_STAND_2);
+ anims.push_back(ANIM_AGENT_STAND_3);
+ anims.push_back(ANIM_AGENT_STAND_4);
gAgent.sendAnimationRequests(anims, ANIM_REQUEST_STOP);
}
@@ -4365,7 +4366,7 @@ void LLAgent::dumpSentAppearance(const std::string& dump_prefix)
}
else
{
- LL_DEBUGS("Avatar") << "dumping sent appearance message to " << fullpath << llendl;
+ LL_DEBUGS("Avatar") << "dumping sent appearance message to " << fullpath << LL_ENDL;
}
LLVisualParam* appearance_version_param = gAgentAvatarp->getVisualParam(11000);
@@ -4408,7 +4409,7 @@ void LLAgent::sendAgentSetAppearance()
gAgentAvatarp->bakedTextureOriginCounts(sb_count, host_count, both_count, neither_count);
if (both_count != 0 || neither_count != 0)
{
- llwarns << "bad bake texture state " << sb_count << "," << host_count << "," << both_count << "," << neither_count << llendl;
+ LL_WARNS() << "bad bake texture state " << sb_count << "," << host_count << "," << both_count << "," << neither_count << LL_ENDL;
}
if (sb_count != 0 && host_count == 0)
{
@@ -4420,7 +4421,7 @@ void LLAgent::sendAgentSetAppearance()
}
else if (sb_count + host_count > 0)
{
- llwarns << "unclear baked texture state, not sending appearance" << llendl;
+ LL_WARNS() << "unclear baked texture state, not sending appearance" << LL_ENDL;
return;
}
@@ -4464,7 +4465,7 @@ void LLAgent::sendAgentSetAppearance()
// IMG_DEFAULT_AVATAR means not baked. 0 index should be ignored for baked textures
if (!gAgentAvatarp->isTextureDefined(texture_index, 0))
{
- LL_DEBUGS("Avatar") << "texture not current for baked " << (S32)baked_index << " local " << (S32)texture_index << llendl;
+ LL_DEBUGS("Avatar") << "texture not current for baked " << (S32)baked_index << " local " << (S32)texture_index << LL_ENDL;
textures_current = FALSE;
break;
}
@@ -4532,7 +4533,7 @@ void LLAgent::sendAgentSetAppearance()
}
}
-// llinfos << "Avatar XML num VisualParams transmitted = " << transmitted_params << llendl;
+ //LL_INFOS() << "Avatar XML num VisualParams transmitted = " << transmitted_params << LL_ENDL;
sendReliableMessage();
}
@@ -4573,8 +4574,8 @@ void LLAgent::parseTeleportMessages(const std::string& xml_filename)
if (!success || !root || !root->hasName( "teleport_messages" ))
{
- llerrs << "Problem reading teleport string XML file: "
- << xml_filename << llendl;
+ LL_ERRS() << "Problem reading teleport string XML file: "
+ << xml_filename << LL_ENDL;
return;
}
@@ -4638,11 +4639,11 @@ void LLAgent::sendAgentUpdateUserInfo(bool im_via_email, const std::string& dire
// static
void LLAgent::dumpGroupInfo()
{
- llinfos << "group " << gAgent.mGroupName << llendl;
- llinfos << "ID " << gAgent.mGroupID << llendl;
- llinfos << "powers " << gAgent.mGroupPowers << llendl;
- llinfos << "title " << gAgent.mGroupTitle << llendl;
- //llinfos << "insig " << gAgent.mGroupInsigniaID << llendl;
+ LL_INFOS() << "group " << gAgent.mGroupName << LL_ENDL;
+ LL_INFOS() << "ID " << gAgent.mGroupID << LL_ENDL;
+ LL_INFOS() << "powers " << gAgent.mGroupPowers << LL_ENDL;
+ LL_INFOS() << "title " << gAgent.mGroupTitle << LL_ENDL;
+ //LL_INFOS() << "insig " << gAgent.mGroupInsigniaID << LL_ENDL;
}
// Draw a representation of current autopilot target
diff --git a/indra/newview/llagent.h b/indra/newview/llagent.h
index 0766407494..1a573d32ce 100755
--- a/indra/newview/llagent.h
+++ b/indra/newview/llagent.h
@@ -29,12 +29,12 @@
#include "indra_constants.h"
#include "llevent.h" // LLObservable base class
-#include "llagentconstants.h"
#include "llagentdata.h" // gAgentID, gAgentSessionID
#include "llcharacter.h"
#include "llcoordframe.h" // for mFrameAgent
#include "llavatarappearancedefines.h"
#include "llpermissionsflags.h"
+#include "v3dmath.h"
#include <boost/function.hpp>
#include <boost/shared_ptr.hpp>
@@ -247,7 +247,7 @@ private:
//--------------------------------------------------------------------
// Region
//--------------------------------------------------------------------
- public:
+public:
void setRegion(LLViewerRegion *regionp);
LLViewerRegion *getRegion() const;
LLHost getRegionHost() const;
@@ -276,7 +276,7 @@ private:
boost::signals2::connection addRegionChangedCallback(const region_changed_signal_t::slot_type& cb);
void removeRegionChangedCallback(boost::signals2::connection callback);
- private:
+private:
LLViewerRegion *mRegionp;
region_changed_signal_t mRegionChangedSignal;
@@ -290,6 +290,7 @@ public:
const LLVector3d &getLastPositionGlobal() const { return mLastPositionGlobal; }
void setLastPositionGlobal(const LLVector3d &pos) { mLastPositionGlobal = pos; }
+
private:
std::set<U64> mRegionsVisited; // Stat - what distinct regions has the avatar been to?
F64 mDistanceTraveled; // Stat - how far has the avatar moved?
@@ -468,7 +469,7 @@ public:
void stopCurrentAnimations();
void requestStopMotion(LLMotion* motion);
void onAnimStop(const LLUUID& id);
- void sendAnimationRequests(LLDynamicArray<LLUUID> &anim_ids, EAnimRequest request);
+ void sendAnimationRequests(const std::vector<LLUUID> &anim_ids, EAnimRequest request);
void sendAnimationRequest(const LLUUID &anim_id, EAnimRequest request);
void sendAnimationStateReset();
void sendRevokePermissions(const LLUUID & target, U32 permissions);
@@ -841,7 +842,7 @@ protected:
// Only used for building titles.
BOOL isGroupMember() const { return !mGroupID.isNull(); }
public:
- LLDynamicArray<LLGroupData> mGroups;
+ std::vector<LLGroupData> mGroups;
//--------------------------------------------------------------------
// Group Title
diff --git a/indra/newview/llagentcamera.cpp b/indra/newview/llagentcamera.cpp
index 488a134aa2..d1dfbe3315 100755
--- a/indra/newview/llagentcamera.cpp
+++ b/indra/newview/llagentcamera.cpp
@@ -337,7 +337,7 @@ void LLAgentCamera::resetView(BOOL reset_camera, BOOL change_camera)
LLVector3 agent_at_axis = gAgent.getAtAxis();
agent_at_axis -= projected_vec(agent_at_axis, gAgent.getReferenceUpVector());
agent_at_axis.normalize();
- gAgent.resetAxes(lerp(gAgent.getAtAxis(), agent_at_axis, LLCriticalDamp::getInterpolant(0.3f)));
+ gAgent.resetAxes(lerp(gAgent.getAtAxis(), agent_at_axis, LLSmoothInterpolation::getInterpolant(0.3f)));
}
setFocusOnAvatar(TRUE, ANIMATE);
@@ -563,10 +563,10 @@ BOOL LLAgentCamera::calcCameraMinDistance(F32 &obj_min_distance)
if (mFocusObject->mDrawable.isNull())
{
#ifdef LL_RELEASE_FOR_DOWNLOAD
- llwarns << "Focus object with no drawable!" << llendl;
+ LL_WARNS() << "Focus object with no drawable!" << LL_ENDL;
#else
mFocusObject->dump();
- llerrs << "Focus object with no drawable!" << llendl;
+ LL_ERRS() << "Focus object with no drawable!" << LL_ENDL;
#endif
obj_min_distance = 0.f;
return TRUE;
@@ -1070,8 +1070,8 @@ void LLAgentCamera::updateLookAt(const S32 mouse_x, const S32 mouse_y)
LLQuaternion av_inv_rot = ~gAgentAvatarp->mRoot->getWorldRotation();
LLVector3 root_at = LLVector3::x_axis * gAgentAvatarp->mRoot->getWorldRotation();
- if ((gViewerWindow->getMouseVelocityStat()->getCurrent() < 0.01f) &&
- (root_at * last_at_axis > 0.95f))
+ if (LLTrace::get_frame_recording().getLastRecording().getLastValue(*gViewerWindow->getMouseVelocityStat()) < 0.01f
+ && (root_at * last_at_axis > 0.95f))
{
LLVector3 vel = gAgentAvatarp->getVelocity();
if (vel.magVecSquared() > 4.f)
@@ -1126,13 +1126,14 @@ void LLAgentCamera::updateLookAt(const S32 mouse_x, const S32 mouse_y)
}
}
+static LLTrace::BlockTimerStatHandle FTM_UPDATE_CAMERA("Camera");
+
//-----------------------------------------------------------------------------
// updateCamera()
//-----------------------------------------------------------------------------
void LLAgentCamera::updateCamera()
{
- static LLFastTimer::DeclareTimer ftm("Camera");
- LLFastTimer t(ftm);
+ LL_RECORD_BLOCK_TIME(FTM_UPDATE_CAMERA);
// - changed camera_skyward to the new global "mCameraUpVector"
mCameraUpVector = LLVector3::z_axis;
@@ -1234,7 +1235,7 @@ void LLAgentCamera::updateCamera()
gAgentCamera.clearPanKeys();
// lerp camera focus offset
- mCameraFocusOffset = lerp(mCameraFocusOffset, mCameraFocusOffsetTarget, LLCriticalDamp::getInterpolant(CAMERA_FOCUS_HALF_LIFE));
+ mCameraFocusOffset = lerp(mCameraFocusOffset, mCameraFocusOffsetTarget, LLSmoothInterpolation::getInterpolant(CAMERA_FOCUS_HALF_LIFE));
if ( mCameraMode == CAMERA_MODE_FOLLOW )
{
@@ -1352,7 +1353,7 @@ void LLAgentCamera::updateCamera()
{
const F32 SMOOTHING_HALF_LIFE = 0.02f;
- F32 smoothing = LLCriticalDamp::getInterpolant(gSavedSettings.getF32("CameraPositionSmoothing") * SMOOTHING_HALF_LIFE, FALSE);
+ F32 smoothing = LLSmoothInterpolation::getInterpolant(gSavedSettings.getF32("CameraPositionSmoothing") * SMOOTHING_HALF_LIFE, FALSE);
if (!mFocusObject) // we differentiate on avatar mode
{
@@ -1382,9 +1383,9 @@ void LLAgentCamera::updateCamera()
}
- mCameraCurrentFOVZoomFactor = lerp(mCameraCurrentFOVZoomFactor, mCameraFOVZoomFactor, LLCriticalDamp::getInterpolant(FOV_ZOOM_HALF_LIFE));
+ mCameraCurrentFOVZoomFactor = lerp(mCameraCurrentFOVZoomFactor, mCameraFOVZoomFactor, LLSmoothInterpolation::getInterpolant(FOV_ZOOM_HALF_LIFE));
-// llinfos << "Current FOV Zoom: " << mCameraCurrentFOVZoomFactor << " Target FOV Zoom: " << mCameraFOVZoomFactor << " Object penetration: " << mFocusObjectDist << llendl;
+// LL_INFOS() << "Current FOV Zoom: " << mCameraCurrentFOVZoomFactor << " Target FOV Zoom: " << mCameraFOVZoomFactor << " Object penetration: " << mFocusObjectDist << LL_ENDL;
LLVector3 focus_agent = gAgent.getPosAgentFromGlobal(mFocusGlobal);
@@ -1688,7 +1689,7 @@ LLVector3d LLAgentCamera::calcCameraPositionTargetGlobal(BOOL *hit_limit)
{
if (!isAgentAvatarValid() || gAgentAvatarp->mDrawable.isNull())
{
- llwarns << "Null avatar drawable!" << llendl;
+ LL_WARNS() << "Null avatar drawable!" << LL_ENDL;
return LLVector3d::zero;
}
head_offset.clearVec();
@@ -1796,7 +1797,7 @@ LLVector3d LLAgentCamera::calcCameraPositionTargetGlobal(BOOL *hit_limit)
if (mTargetCameraDistance != mCurrentCameraDistance)
{
- F32 camera_lerp_amt = LLCriticalDamp::getInterpolant(CAMERA_ZOOM_HALF_LIFE);
+ F32 camera_lerp_amt = LLSmoothInterpolation::getInterpolant(CAMERA_ZOOM_HALF_LIFE);
mCurrentCameraDistance = lerp(mCurrentCameraDistance, mTargetCameraDistance, camera_lerp_amt);
}
@@ -1813,7 +1814,7 @@ LLVector3d LLAgentCamera::calcCameraPositionTargetGlobal(BOOL *hit_limit)
if (isAgentAvatarValid())
{
LLVector3d camera_lag_d;
- F32 lag_interp = LLCriticalDamp::getInterpolant(CAMERA_LAG_HALF_LIFE);
+ F32 lag_interp = LLSmoothInterpolation::getInterpolant(CAMERA_LAG_HALF_LIFE);
LLVector3 target_lag;
LLVector3 vel = gAgent.getVelocity();
@@ -1858,7 +1859,7 @@ LLVector3d LLAgentCamera::calcCameraPositionTargetGlobal(BOOL *hit_limit)
}
else
{
- mCameraLag = lerp(mCameraLag, LLVector3::zero, LLCriticalDamp::getInterpolant(0.15f));
+ mCameraLag = lerp(mCameraLag, LLVector3::zero, LLSmoothInterpolation::getInterpolant(0.15f));
}
camera_lag_d.setVec(mCameraLag);
@@ -2267,22 +2268,22 @@ void LLAgentCamera::changeCameraToCustomizeAvatar()
gFocusMgr.setKeyboardFocus( NULL );
gFocusMgr.setMouseCapture( NULL );
- // Remove any pitch or rotation from the avatar
- LLVector3 at = gAgent.getAtAxis();
- at.mV[VZ] = 0.f;
- at.normalize();
- gAgent.resetAxes(at);
+ // Remove any pitch or rotation from the avatar
+ LLVector3 at = gAgent.getAtAxis();
+ at.mV[VZ] = 0.f;
+ at.normalize();
+ gAgent.resetAxes(at);
- gAgent.sendAnimationRequest(ANIM_AGENT_CUSTOMIZE, ANIM_REQUEST_START);
- gAgent.setCustomAnim(TRUE);
- gAgentAvatarp->startMotion(ANIM_AGENT_CUSTOMIZE);
- LLMotion* turn_motion = gAgentAvatarp->findMotion(ANIM_AGENT_CUSTOMIZE);
+ gAgent.sendAnimationRequest(ANIM_AGENT_CUSTOMIZE, ANIM_REQUEST_START);
+ gAgent.setCustomAnim(TRUE);
+ gAgentAvatarp->startMotion(ANIM_AGENT_CUSTOMIZE);
+ LLMotion* turn_motion = gAgentAvatarp->findMotion(ANIM_AGENT_CUSTOMIZE);
- if (turn_motion)
- {
- // delay camera animation long enough to play through turn animation
- setAnimationDuration(turn_motion->getDuration() + CUSTOMIZE_AVATAR_CAMERA_ANIM_SLOP);
- }
+ if (turn_motion)
+ {
+ // delay camera animation long enough to play through turn animation
+ setAnimationDuration(turn_motion->getDuration() + CUSTOMIZE_AVATAR_CAMERA_ANIM_SLOP);
+ }
}
LLVector3 agent_at = gAgent.getAtAxis();
diff --git a/indra/newview/llagentlistener.cpp b/indra/newview/llagentlistener.cpp
index a4c0b056ac..7887184a11 100755
--- a/indra/newview/llagentlistener.cpp
+++ b/indra/newview/llagentlistener.cpp
@@ -193,8 +193,8 @@ void LLAgentListener::requestSit(LLSD const & event_data) const
}
else
{
- llwarns << "LLAgent requestSit could not find the sit target: "
- << event_data << llendl;
+ LL_WARNS() << "LLAgent requestSit could not find the sit target: "
+ << event_data << LL_ENDL;
}
}
@@ -276,8 +276,8 @@ void LLAgentListener::requestTouch(LLSD const & event_data) const
}
else
{
- llwarns << "LLAgent requestTouch could not find the touch target "
- << event_data["obj_uuid"].asUUID() << llendl;
+ LL_WARNS() << "LLAgent requestTouch could not find the touch target "
+ << event_data["obj_uuid"].asUUID() << LL_ENDL;
}
}
@@ -504,7 +504,7 @@ void LLAgentListener::lookAt(LLSD const & event_data) const
void LLAgentListener::getGroups(const LLSD& event) const
{
LLSD reply(LLSD::emptyArray());
- for (LLDynamicArray<LLGroupData>::const_iterator
+ for (std::vector<LLGroupData>::const_iterator
gi(mAgent.mGroups.begin()), gend(mAgent.mGroups.end());
gi != gend; ++gi)
{
diff --git a/indra/newview/llagentpicksinfo.cpp b/indra/newview/llagentpicksinfo.cpp
index 192ed141c7..799060eeab 100755
--- a/indra/newview/llagentpicksinfo.cpp
+++ b/indra/newview/llagentpicksinfo.cpp
@@ -28,9 +28,11 @@
#include "llagentpicksinfo.h"
#include "llagent.h"
-#include "llavatarconstants.h"
#include "llavatarpropertiesprocessor.h"
+const S32 MAX_AVATAR_PICKS = 10;
+
+
class LLAgentPicksInfo::LLAgentPicksObserver : public LLAvatarPropertiesObserver
{
public:
@@ -117,7 +119,7 @@ void LLAgentPicksInfo::onServerRespond(LLAvatarPicks* picks)
{
if(!picks)
{
- llerrs << "Unexpected value" << llendl;
+ LL_ERRS() << "Unexpected value" << LL_ENDL;
return;
}
diff --git a/indra/newview/llagentpilot.cpp b/indra/newview/llagentpilot.cpp
index c7872fc5f6..44589f0d57 100755
--- a/indra/newview/llagentpilot.cpp
+++ b/indra/newview/llagentpilot.cpp
@@ -72,7 +72,7 @@ void LLAgentPilot::load()
}
else
{
- lldebugs << "no autopilot file found" << llendl;
+ LL_DEBUGS() << "no autopilot file found" << LL_ENDL;
return;
}
}
@@ -88,20 +88,21 @@ void LLAgentPilot::loadTxt(const std::string& filename)
if (!file)
{
- lldebugs << "Couldn't open " << filename
- << ", aborting agentpilot load!" << llendl;
+ LL_DEBUGS() << "Couldn't open " << filename
+ << ", aborting agentpilot load!" << LL_ENDL;
return;
}
else
{
- llinfos << "Opening pilot file " << filename << llendl;
+ LL_INFOS() << "Opening pilot file " << filename << LL_ENDL;
}
- mActions.reset();
+ mActions.clear();
S32 num_actions;
file >> num_actions;
+ mActions.reserve(num_actions);
for (S32 i = 0; i < num_actions; i++)
{
S32 action_type;
@@ -109,7 +110,7 @@ void LLAgentPilot::loadTxt(const std::string& filename)
file >> new_action.mTime >> action_type;
file >> new_action.mTarget.mdV[VX] >> new_action.mTarget.mdV[VY] >> new_action.mTarget.mdV[VZ];
new_action.mType = (EActionType)action_type;
- mActions.put(new_action);
+ mActions.push_back(new_action);
}
mOverrideCamera = false;
@@ -128,16 +129,16 @@ void LLAgentPilot::loadXML(const std::string& filename)
if (!file)
{
- lldebugs << "Couldn't open " << filename
- << ", aborting agentpilot load!" << llendl;
+ LL_DEBUGS() << "Couldn't open " << filename
+ << ", aborting agentpilot load!" << LL_ENDL;
return;
}
else
{
- llinfos << "Opening pilot file " << filename << llendl;
+ LL_INFOS() << "Opening pilot file " << filename << LL_ENDL;
}
- mActions.reset();
+ mActions.clear();
LLSD record;
while (!file.eof() && LLSDParser::PARSE_FAILURE != LLSDSerialize::fromXML(record, file))
{
@@ -150,7 +151,7 @@ void LLAgentPilot::loadXML(const std::string& filename)
action.mCameraXAxis = ll_vector3_from_sd(record["camera_xaxis"]);
action.mCameraYAxis = ll_vector3_from_sd(record["camera_yaxis"]);
action.mCameraZAxis = ll_vector3_from_sd(record["camera_zaxis"]);
- mActions.put(action);
+ mActions.push_back(action);
}
mOverrideCamera = true;
file.close();
@@ -171,13 +172,13 @@ void LLAgentPilot::saveTxt(const std::string& filename)
if (!file)
{
- llinfos << "Couldn't open " << filename << ", aborting agentpilot save!" << llendl;
+ LL_INFOS() << "Couldn't open " << filename << ", aborting agentpilot save!" << LL_ENDL;
}
- file << mActions.count() << '\n';
+ file << mActions.size() << '\n';
S32 i;
- for (i = 0; i < mActions.count(); i++)
+ for (i = 0; i < mActions.size(); i++)
{
file << mActions[i].mTime << "\t" << mActions[i].mType << "\t";
file << std::setprecision(32) << mActions[i].mTarget.mdV[VX] << "\t" << mActions[i].mTarget.mdV[VY] << "\t" << mActions[i].mTarget.mdV[VZ];
@@ -194,11 +195,11 @@ void LLAgentPilot::saveXML(const std::string& filename)
if (!file)
{
- llinfos << "Couldn't open " << filename << ", aborting agentpilot save!" << llendl;
+ LL_INFOS() << "Couldn't open " << filename << ", aborting agentpilot save!" << LL_ENDL;
}
S32 i;
- for (i = 0; i < mActions.count(); i++)
+ for (i = 0; i < mActions.size(); i++)
{
Action& action = mActions[i];
LLSD record;
@@ -217,7 +218,7 @@ void LLAgentPilot::saveXML(const std::string& filename)
void LLAgentPilot::startRecord()
{
- mActions.reset();
+ mActions.clear();
mTimer.reset();
addAction(STRAIGHT);
mRecording = TRUE;
@@ -232,7 +233,7 @@ void LLAgentPilot::stopRecord()
void LLAgentPilot::addAction(enum EActionType action_type)
{
- llinfos << "Adding waypoint: " << gAgent.getPositionGlobal() << llendl;
+ LL_INFOS() << "Adding waypoint: " << gAgent.getPositionGlobal() << LL_ENDL;
Action action;
action.mType = action_type;
action.mTarget = gAgent.getPositionGlobal();
@@ -244,7 +245,7 @@ void LLAgentPilot::addAction(enum EActionType action_type)
action.mCameraYAxis = cam->getYAxis();
action.mCameraZAxis = cam->getZAxis();
mLastRecordTime = (F32)action.mTime;
- mActions.put(action);
+ mActions.push_back(action);
}
void LLAgentPilot::startPlayback()
@@ -255,16 +256,16 @@ void LLAgentPilot::startPlayback()
mCurrentAction = 0;
mTimer.reset();
- if (mActions.count())
+ if (mActions.size())
{
- llinfos << "Starting playback, moving to waypoint 0" << llendl;
+ LL_INFOS() << "Starting playback, moving to waypoint 0" << LL_ENDL;
gAgent.startAutoPilotGlobal(mActions[0].mTarget);
moveCamera();
mStarted = FALSE;
}
else
{
- llinfos << "No autopilot data, cancelling!" << llendl;
+ LL_INFOS() << "No autopilot data, cancelling!" << LL_ENDL;
mPlaying = FALSE;
}
}
@@ -291,7 +292,7 @@ void LLAgentPilot::moveCamera()
if (!getOverrideCamera())
return;
- if (mCurrentAction<mActions.count())
+ if (mCurrentAction<mActions.size())
{
S32 start_index = llmax(mCurrentAction-1,0);
S32 end_index = mCurrentAction;
@@ -305,7 +306,7 @@ void LLAgentPilot::moveCamera()
if ((t<0.0)||(t>1.0))
{
- llwarns << "mCurrentAction is invalid, t = " << t << llendl;
+ LL_WARNS() << "mCurrentAction is invalid, t = " << t << LL_ENDL;
return;
}
@@ -331,7 +332,7 @@ void LLAgentPilot::updateTarget()
{
if (mPlaying)
{
- if (mCurrentAction < mActions.count())
+ if (mCurrentAction < mActions.size())
{
if (0 == mCurrentAction)
{
@@ -344,7 +345,7 @@ void LLAgentPilot::updateTarget()
{
if (!mStarted)
{
- llinfos << "At start, beginning playback" << llendl;
+ LL_INFOS() << "At start, beginning playback" << LL_ENDL;
mTimer.reset();
mStarted = TRUE;
}
@@ -355,7 +356,7 @@ void LLAgentPilot::updateTarget()
//gAgent.stopAutoPilot();
mCurrentAction++;
- if (mCurrentAction < mActions.count())
+ if (mCurrentAction < mActions.size())
{
gAgent.startAutoPilotGlobal(mActions[mCurrentAction].mTarget);
moveCamera();
@@ -368,17 +369,17 @@ void LLAgentPilot::updateTarget()
{
if ((mNumRuns < 0) || (mNumRuns > 0))
{
- llinfos << "Looping, restarting playback" << llendl;
+ LL_INFOS() << "Looping, restarting playback" << LL_ENDL;
startPlayback();
}
else if (mQuitAfterRuns)
{
- llinfos << "Done with all runs, quitting viewer!" << llendl;
+ LL_INFOS() << "Done with all runs, quitting viewer!" << LL_ENDL;
LLAppViewer::instance()->forceQuit();
}
else
{
- llinfos << "Done with all runs, disabling pilot" << llendl;
+ LL_INFOS() << "Done with all runs, disabling pilot" << LL_ENDL;
stopPlayback();
}
}
diff --git a/indra/newview/llagentpilot.h b/indra/newview/llagentpilot.h
index dd1709ec0c..f6b6376086 100755
--- a/indra/newview/llagentpilot.h
+++ b/indra/newview/llagentpilot.h
@@ -30,7 +30,6 @@
#include "stdtypes.h"
#include "lltimer.h"
#include "v3dmath.h"
-#include "lldarray.h"
// Class that drives the agent around according to a "script".
@@ -113,7 +112,7 @@ private:
LLVector3 mCameraZAxis;
};
- LLDynamicArray<Action> mActions;
+ std::vector<Action> mActions;
LLTimer mTimer;
};
diff --git a/indra/newview/llagentwearables.cpp b/indra/newview/llagentwearables.cpp
index fa810aac76..58981d0e06 100755
--- 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"
@@ -62,15 +63,15 @@ using namespace LLAvatarAppearanceDefines;
// Callback to wear and start editing an item that has just been created.
void wear_and_edit_cb(const LLUUID& inv_item)
- {
- if (inv_item.isNull()) return;
-
- // Request editing the item after it gets worn.
- gAgentWearables.requestEditingWearable(inv_item);
-
- // Wear it.
- LLAppearanceMgr::instance().wearItemOnAvatar(inv_item);
- }
+{
+ if (inv_item.isNull()) return;
+
+ // Request editing the item after it gets worn.
+ gAgentWearables.requestEditingWearable(inv_item);
+
+ // Wear it.
+ LLAppearanceMgr::instance().wearItemOnAvatar(inv_item);
+}
///////////////////////////////////////////////////////////////////////////////
@@ -90,48 +91,48 @@ void checkWearableAgainstInventory(LLViewerWearable *wearable)
{
if (!item->isWearableType())
{
- llwarns << "wearable associated with non-wearable item" << llendl;
+ LL_WARNS() << "wearable associated with non-wearable item" << LL_ENDL;
}
if (item->getWearableType() != wearable->getType())
{
- llwarns << "type mismatch: wearable " << wearable->getName()
+ LL_WARNS() << "type mismatch: wearable " << wearable->getName()
<< " has type " << wearable->getType()
<< " but inventory item " << item->getName()
- << " has type " << item->getWearableType() << llendl;
+ << " has type " << item->getWearableType() << LL_ENDL;
}
}
else
{
- llwarns << "wearable inventory item not found" << wearable->getName()
- << " itemID " << wearable->getItemID().asString() << llendl;
+ LL_WARNS() << "wearable inventory item not found" << wearable->getName()
+ << " itemID " << wearable->getItemID().asString() << LL_ENDL;
}
}
void LLAgentWearables::dump()
{
- llinfos << "LLAgentWearablesDump" << llendl;
+ LL_INFOS() << "LLAgentWearablesDump" << LL_ENDL;
for (S32 i = 0; i < LLWearableType::WT_COUNT; i++)
{
U32 count = getWearableCount((LLWearableType::EType)i);
- llinfos << "Type: " << i << " count " << count << llendl;
+ LL_INFOS() << "Type: " << i << " count " << count << LL_ENDL;
for (U32 j=0; j<count; j++)
{
LLViewerWearable* wearable = getViewerWearable((LLWearableType::EType)i,j);
if (wearable == NULL)
{
- llinfos << " " << j << " NULL wearable" << llendl;
+ LL_INFOS() << " " << j << " NULL wearable" << LL_ENDL;
}
- llinfos << " " << j << " Name " << wearable->getName()
- << " description " << wearable->getDescription() << llendl;
+ LL_INFOS() << " " << j << " Name " << wearable->getName()
+ << " description " << wearable->getDescription() << LL_ENDL;
}
}
- llinfos << "Total items awaiting wearable update " << mItemsAwaitingWearableUpdate.size() << llendl;
+ LL_INFOS() << "Total items awaiting wearable update " << mItemsAwaitingWearableUpdate.size() << LL_ENDL;
for (std::set<LLUUID>::iterator it = mItemsAwaitingWearableUpdate.begin();
it != mItemsAwaitingWearableUpdate.end();
++it)
{
- llinfos << (*it).asString() << llendl;
+ LL_INFOS() << (*it).asString() << LL_ENDL;
}
}
@@ -140,15 +141,15 @@ struct LLAgentDumper
LLAgentDumper(std::string name):
mName(name)
{
- llinfos << llendl;
- llinfos << "LLAgentDumper " << mName << llendl;
+ LL_INFOS() << LL_ENDL;
+ LL_INFOS() << "LLAgentDumper " << mName << LL_ENDL;
gAgentWearables.dump();
}
~LLAgentDumper()
{
- llinfos << llendl;
- llinfos << "~LLAgentDumper " << mName << llendl;
+ LL_INFOS() << LL_ENDL;
+ LL_INFOS() << "~LLAgentDumper " << mName << LL_ENDL;
gAgentWearables.dump();
}
@@ -180,17 +181,17 @@ void LLAgentWearables::initClass()
}
void LLAgentWearables::setAvatarObject(LLVOAvatarSelf *avatar)
-{
+{
llassert(avatar);
- avatar->outputRezTiming("Sending wearables request");
- sendAgentWearablesRequest();
+ avatar->outputRezTiming("Sending wearables request");
+ sendAgentWearablesRequest();
setAvatarAppearance(avatar);
}
// wearables
LLAgentWearables::createStandardWearablesAllDoneCallback::~createStandardWearablesAllDoneCallback()
{
- llinfos << "destructor - all done?" << llendl;
+ LL_INFOS() << "destructor - all done?" << LL_ENDL;
gAgentWearables.createStandardWearablesAllDone();
}
@@ -218,14 +219,14 @@ LLAgentWearables::addWearableToAgentInventoryCallback::addWearableToAgentInvento
mCB(cb),
mDescription(description)
{
- llinfos << "constructor" << llendl;
+ LL_INFOS() << "constructor" << LL_ENDL;
}
void LLAgentWearables::addWearableToAgentInventoryCallback::fire(const LLUUID& inv_item)
{
if (mTodo & CALL_CREATESTANDARDDONE)
{
- llinfos << "callback fired, inv_item " << inv_item.asString() << llendl;
+ LL_INFOS() << "callback fired, inv_item " << inv_item.asString() << LL_ENDL;
}
if (inv_item.isNull())
@@ -265,7 +266,7 @@ void LLAgentWearables::addWearabletoAgentInventoryDone(const LLWearableType::ETy
const LLUUID& item_id,
LLViewerWearable* wearable)
{
- llinfos << "type " << type << " index " << index << " item " << item_id.asString() << llendl;
+ LL_INFOS() << "type " << type << " index " << index << " item " << item_id.asString() << LL_ENDL;
if (item_id.isNull())
return;
@@ -343,7 +344,7 @@ void LLAgentWearables::sendAgentWearablesUpdate()
gMessageSystem->addUUIDFast(_PREHASH_AgentID, gAgent.getID());
gMessageSystem->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID());
- lldebugs << "sendAgentWearablesUpdate()" << llendl;
+ LL_DEBUGS() << "sendAgentWearablesUpdate()" << LL_ENDL;
// MULTI-WEARABLE: DEPRECATED: HACK: index to 0- server database tables don't support concept of multiwearables.
for (S32 type=0; type < LLWearableType::WT_COUNT; ++type)
{
@@ -355,7 +356,7 @@ void LLAgentWearables::sendAgentWearablesUpdate()
LLViewerWearable* wearable = getViewerWearable((LLWearableType::EType)type, 0);
if (wearable)
{
- //llinfos << "Sending wearable " << wearable->getName() << llendl;
+ //LL_INFOS() << "Sending wearable " << wearable->getName() << LL_ENDL;
LLUUID item_id = wearable->getItemID();
const LLViewerInventoryItem *item = gInventory.getItem(item_id);
if (item && item->getIsLinkType())
@@ -368,11 +369,11 @@ void LLAgentWearables::sendAgentWearablesUpdate()
}
else
{
- //llinfos << "Not wearing wearable type " << LLWearableType::getTypeName((LLWearableType::EType)i) << llendl;
+ //LL_INFOS() << "Not wearing wearable type " << LLWearableType::getTypeName((LLWearableType::EType)i) << LL_ENDL;
gMessageSystem->addUUIDFast(_PREHASH_ItemID, LLUUID::null);
}
- lldebugs << " " << LLWearableType::getTypeLabel((LLWearableType::EType)type) << ": " << (wearable ? wearable->getAssetID() : LLUUID::null) << llendl;
+ LL_DEBUGS() << " " << LLWearableType::getTypeLabel((LLWearableType::EType)type) << ": " << (wearable ? wearable->getAssetID() : LLUUID::null) << LL_ENDL;
}
gAgent.sendReliableMessage();
}
@@ -401,7 +402,7 @@ void LLAgentWearables::saveWearable(const LLWearableType::EType type, const U32
std::string item_name = item->getName();
if (name_changed)
{
- llinfos << "saveWearable changing name from " << item->getName() << " to " << new_name << llendl;
+ LL_INFOS() << "saveWearable changing name from " << item->getName() << " to " << new_name << LL_ENDL;
item_name = new_name;
}
// Update existing inventory item
@@ -461,20 +462,20 @@ void LLAgentWearables::saveWearableAs(const LLWearableType::EType type,
{
if (!isWearableCopyable(type, index))
{
- llwarns << "LLAgent::saveWearableAs() not copyable." << llendl;
+ LL_WARNS() << "LLAgent::saveWearableAs() not copyable." << LL_ENDL;
return;
}
LLViewerWearable* old_wearable = getViewerWearable(type, index);
if (!old_wearable)
{
- llwarns << "LLAgent::saveWearableAs() no old wearable." << llendl;
+ LL_WARNS() << "LLAgent::saveWearableAs() no old wearable." << LL_ENDL;
return;
}
LLInventoryItem* item = gInventory.getItem(getWearableItemID(type,index));
if (!item)
{
- llwarns << "LLAgent::saveWearableAs() no inventory item." << llendl;
+ LL_WARNS() << "LLAgent::saveWearableAs() no inventory item." << LL_ENDL;
return;
}
std::string trunc_name(new_name);
@@ -706,7 +707,7 @@ LLViewerWearable* LLAgentWearables::getViewerWearable(const LLWearableType::ETyp
}
const LLViewerWearable* LLAgentWearables::getViewerWearable(const LLWearableType::EType type, U32 index /*= 0*/) const
- {
+{
return dynamic_cast<const LLViewerWearable*> (getWearable(type, index));
}
@@ -714,39 +715,39 @@ const LLViewerWearable* LLAgentWearables::getViewerWearable(const LLWearableType
BOOL LLAgentWearables::selfHasWearable(LLWearableType::EType type)
{
return (gAgentWearables.getWearableCount(type) > 0);
- }
-
+}
+
// virtual
void LLAgentWearables::wearableUpdated(LLWearable *wearable, BOOL removed)
- {
+{
if (isAgentAvatarValid())
{
const BOOL upload_result = removed;
gAgentAvatarp->wearableUpdated(wearable->getType(), upload_result);
-}
+ }
LLWearableData::wearableUpdated(wearable, removed);
if (!removed)
-{
+ {
LLViewerWearable* viewer_wearable = dynamic_cast<LLViewerWearable*>(wearable);
viewer_wearable->refreshName();
- // Hack pt 2. If the wearable we just loaded has definition version 24,
- // then force a re-save of this wearable after slamming the version number to 22.
- // This number was incorrectly incremented for internal builds before release, and
- // this fix will ensure that the affected wearables are re-saved with the right version number.
- // the versions themselves are compatible. This code can be removed before release.
- if( wearable->getDefinitionVersion() == 24 )
- {
- wearable->setDefinitionVersion(22);
- U32 index = getWearableIndex(wearable);
- llinfos << "forcing wearable type " << wearable->getType() << " to version 22 from 24" << llendl;
- saveWearable(wearable->getType(),index,TRUE);
- }
+ // Hack pt 2. If the wearable we just loaded has definition version 24,
+ // then force a re-save of this wearable after slamming the version number to 22.
+ // This number was incorrectly incremented for internal builds before release, and
+ // this fix will ensure that the affected wearables are re-saved with the right version number.
+ // the versions themselves are compatible. This code can be removed before release.
+ if( wearable->getDefinitionVersion() == 24 )
+ {
+ wearable->setDefinitionVersion(22);
+ U32 index = getWearableIndex(wearable);
+ LL_INFOS() << "forcing wearable type " << wearable->getType() << " to version 22 from 24" << LL_ENDL;
+ saveWearable(wearable->getType(),index,TRUE);
+ }
checkWearableAgainstInventory(viewer_wearable);
-}
+ }
}
BOOL LLAgentWearables::itemUpdatePending(const LLUUID& item_id) const
@@ -830,7 +831,7 @@ void LLAgentWearables::processAgentInitialWearablesUpdate(LLMessageSystem* mesgs
const LLUUID current_outfit_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_CURRENT_OUTFIT);
LLInitialWearablesFetch* outfit = new LLInitialWearablesFetch(current_outfit_id);
- //lldebugs << "processAgentInitialWearablesUpdate()" << llendl;
+ //LL_DEBUGS() << "processAgentInitialWearablesUpdate()" << LL_ENDL;
// Add wearables
// MULTI-WEARABLE: DEPRECATED: Message only supports one wearable per type, will be ignored in future.
gAgentWearables.mItemsAwaitingWearableUpdate.clear();
@@ -869,7 +870,7 @@ void LLAgentWearables::processAgentInitialWearablesUpdate(LLMessageSystem* mesgs
outfit->add(wearable_data);
}
- lldebugs << " " << LLWearableType::getTypeLabel(type) << llendl;
+ LL_DEBUGS() << " " << LLWearableType::getTypeLabel(type) << LL_ENDL;
}
// Get the complete information on the items in the inventory and set up an observer
@@ -897,7 +898,7 @@ void LLAgentWearables::recoverMissingWearable(const LLWearableType::EType type,
{
// Try to recover by replacing missing wearable with a new one.
LLNotificationsUtil::add("ReplacedMissingWearable");
- lldebugs << "Wearable " << LLWearableType::getTypeLabel(type) << " could not be downloaded. Replaced inventory item with default wearable." << llendl;
+ LL_DEBUGS() << "Wearable " << LLWearableType::getTypeLabel(type) << " could not be downloaded. Replaced inventory item with default wearable." << LL_ENDL;
LLViewerWearable* new_wearable = LLWearableList::instance().createNewWearable(type, gAgentAvatarp);
setWearable(type,index,new_wearable);
@@ -938,7 +939,7 @@ void LLAgentWearables::addLocalTextureObject(const LLWearableType::EType wearabl
LLViewerWearable* wearable = getViewerWearable((LLWearableType::EType)wearable_type, wearable_index);
if (!wearable)
{
- llerrs << "Tried to add local texture object to invalid wearable with type " << wearable_type << " and index " << wearable_index << llendl;
+ LL_ERRS() << "Tried to add local texture object to invalid wearable with type " << wearable_type << " and index " << wearable_index << LL_ENDL;
return;
}
LLLocalTextureObject lto;
@@ -951,28 +952,28 @@ public:
OnWearableItemCreatedCB():
mWearablesAwaitingItems(LLWearableType::WT_COUNT,NULL)
{
- llinfos << "created callback" << llendl;
+ LL_INFOS() << "created callback" << LL_ENDL;
}
/* virtual */ void fire(const LLUUID& inv_item)
{
- llinfos << "One item created " << inv_item.asString() << llendl;
+ LL_INFOS() << "One item created " << inv_item.asString() << LL_ENDL;
LLViewerInventoryItem *item = gInventory.getItem(inv_item);
- mItemsToLink.put(item);
+ mItemsToLink.push_back(item);
updatePendingWearable(inv_item);
}
~OnWearableItemCreatedCB()
{
- llinfos << "All items created" << llendl;
+ LL_INFOS() << "All items created" << LL_ENDL;
LLPointer<LLInventoryCallback> link_waiter = new LLUpdateAppearanceOnDestroy;
LLAppearanceMgr::instance().linkAll(LLAppearanceMgr::instance().getCOF(),
- mItemsToLink,
- link_waiter);
+ mItemsToLink,
+ link_waiter);
}
void addPendingWearable(LLViewerWearable *wearable)
{
if (!wearable)
{
- llwarns << "no wearable" << llendl;
+ LL_WARNS() << "no wearable" << LL_ENDL;
return;
}
LLWearableType::EType type = wearable->getType();
@@ -982,7 +983,7 @@ public:
}
else
{
- llwarns << "invalid type " << type << llendl;
+ LL_WARNS() << "invalid type " << type << LL_ENDL;
}
}
void updatePendingWearable(const LLUUID& inv_item)
@@ -990,12 +991,12 @@ public:
LLViewerInventoryItem *item = gInventory.getItem(inv_item);
if (!item)
{
- llwarns << "no item found" << llendl;
+ LL_WARNS() << "no item found" << LL_ENDL;
return;
}
if (!item->isWearableType())
{
- llwarns << "non-wearable item found" << llendl;
+ LL_WARNS() << "non-wearable item found" << LL_ENDL;
return;
}
if (item && item->isWearableType())
@@ -1009,7 +1010,7 @@ public:
}
else
{
- llwarns << "invalid wearable type " << type << llendl;
+ LL_WARNS() << "invalid wearable type " << type << LL_ENDL;
}
}
}
@@ -1021,7 +1022,7 @@ private:
void LLAgentWearables::createStandardWearables()
{
- llwarns << "Creating standard wearables" << llendl;
+ LL_WARNS() << "Creating standard wearables" << LL_ENDL;
if (!isAgentAvatarValid()) return;
@@ -1069,7 +1070,7 @@ void LLAgentWearables::createStandardWearables()
void LLAgentWearables::createStandardWearablesDone(S32 type, U32 index)
{
- llinfos << "type " << type << " index " << index << llendl;
+ LL_INFOS() << "type " << type << " index " << index << LL_ENDL;
if (!isAgentAvatarValid()) return;
gAgentAvatarp->updateVisualParams();
@@ -1079,7 +1080,7 @@ void LLAgentWearables::createStandardWearablesAllDone()
{
// ... because sendAgentWearablesUpdate will notify inventory
// observers.
- llinfos << "all done?" << llendl;
+ LL_INFOS() << "all done?" << LL_ENDL;
mWearablesLoaded = TRUE;
checkWearablesLoaded();
@@ -1234,10 +1235,10 @@ void LLAgentWearables::removeWearableFinal(const LLWearableType::EType type, boo
// Assumes existing wearables are not dirty.
void LLAgentWearables::setWearableOutfit(const LLInventoryItem::item_array_t& items,
- const LLDynamicArray< LLViewerWearable* >& wearables,
+ const std::vector< LLViewerWearable* >& wearables,
BOOL remove)
{
- llinfos << "setWearableOutfit() start" << llendl;
+ LL_INFOS() << "setWearableOutfit() start" << LL_ENDL;
// TODO: Removed check for ensuring that teens don't remove undershirt and underwear. Handle later
if (remove)
@@ -1253,8 +1254,8 @@ void LLAgentWearables::setWearableOutfit(const LLInventoryItem::item_array_t& it
}
}
- S32 count = wearables.count();
- llassert(items.count() == count);
+ S32 count = wearables.size();
+ llassert(items.size() == count);
S32 i;
for (i = 0; i < count; i++)
@@ -1311,7 +1312,7 @@ void LLAgentWearables::setWearableOutfit(const LLInventoryItem::item_array_t& it
gAgentAvatarp->dumpAvatarTEs("setWearableOutfit");
- lldebugs << "setWearableOutfit() end" << llendl;
+ LL_DEBUGS() << "setWearableOutfit() end" << LL_ENDL;
}
@@ -1321,7 +1322,7 @@ void LLAgentWearables::setWearableItem(LLInventoryItem* new_item, LLViewerWearab
//LLAgentDumper dumper("setWearableItem");
if (isWearingItem(new_item->getUUID()))
{
- llwarns << "wearable " << new_item->getUUID() << " is already worn" << llendl;
+ LL_WARNS() << "wearable " << new_item->getUUID() << " is already worn" << LL_ENDL;
return;
}
@@ -1338,7 +1339,7 @@ void LLAgentWearables::setWearableItem(LLInventoryItem* new_item, LLViewerWearab
if ((old_wearable->getAssetID() == new_wearable->getAssetID()) &&
(old_item_id == new_item->getUUID()))
{
- lldebugs << "No change to wearable asset and item: " << LLWearableType::getTypeName(type) << llendl;
+ LL_DEBUGS() << "No change to wearable asset and item: " << LLWearableType::getTypeName(type) << LL_ENDL;
return;
}
@@ -1402,8 +1403,8 @@ void LLAgentWearables::setWearableFinal(LLInventoryItem* new_item, LLViewerWeara
new_wearable->setItemID(new_item->getUUID());
const bool trigger_updated = false;
pushWearable(type, new_wearable, trigger_updated);
- llinfos << "Added additional wearable for type " << type
- << " size is now " << getWearableCount(type) << llendl;
+ LL_INFOS() << "Added additional wearable for type " << type
+ << " size is now " << getWearableCount(type) << LL_ENDL;
checkWearableAgainstInventory(new_wearable);
}
else
@@ -1425,11 +1426,11 @@ void LLAgentWearables::setWearableFinal(LLInventoryItem* new_item, LLViewerWeara
gInventory.addChangedMask(LLInventoryObserver::LABEL, old_item_id);
gInventory.notifyObservers();
}
- llinfos << "Replaced current element 0 for type " << type
- << " size is now " << getWearableCount(type) << llendl;
+ LL_INFOS() << "Replaced current element 0 for type " << type
+ << " size is now " << getWearableCount(type) << LL_ENDL;
}
- //llinfos << "LLVOAvatar::setWearableItem()" << llendl;
+ //LL_INFOS() << "LLVOAvatar::setWearableItem()" << LL_ENDL;
queryWearableCache();
//new_wearable->writeToAvatar(TRUE);
@@ -1469,7 +1470,7 @@ void LLAgentWearables::queryWearableCache()
ETextureIndex te_index = LLAvatarAppearanceDictionary::bakedToLocalTextureIndex((EBakedTextureIndex)baked_index);
- //llinfos << "Requesting texture for hash " << hash << " in baked texture slot " << baked_index << llendl;
+ //LL_INFOS() << "Requesting texture for hash " << hash << " in baked texture slot " << baked_index << LL_ENDL;
gMessageSystem->nextBlockFast(_PREHASH_WearableData);
gMessageSystem->addUUIDFast(_PREHASH_ID, hash_id);
gMessageSystem->addU8Fast(_PREHASH_TextureIndex, (U8)te_index);
@@ -1496,12 +1497,12 @@ void LLAgentWearables::queryWearableCache()
// virtual
void LLAgentWearables::invalidateBakedTextureHash(LLMD5& hash) const
{
- // Add some garbage into the hash so that it becomes invalid.
- if (isAgentAvatarValid())
- {
- hash.update((const unsigned char*)gAgentAvatarp->getID().mData, UUID_BYTES);
- }
- }
+ // Add some garbage into the hash so that it becomes invalid.
+ if (isAgentAvatarValid())
+ {
+ hash.update((const unsigned char*)gAgentAvatarp->getID().mData, UUID_BYTES);
+ }
+}
// User has picked "remove from avatar" from a menu.
// static
@@ -1537,10 +1538,10 @@ void LLAgentWearables::userUpdateAttachments(LLInventoryModel::item_array_t& obj
std::set<LLUUID> requested_item_ids;
std::set<LLUUID> current_item_ids;
- for (S32 i=0; i<obj_item_array.count(); i++)
+ for (S32 i=0; i<obj_item_array.size(); i++)
{
const LLUUID & requested_id = obj_item_array[i].get()->getLinkedUUID();
- //llinfos << "Requested attachment id " << requested_id << llendl;
+ //LL_INFOS() << "Requested attachment id " << requested_id << LL_ENDL;
requested_item_ids.insert(requested_id);
}
@@ -1573,12 +1574,12 @@ void LLAgentWearables::userUpdateAttachments(LLInventoryModel::item_array_t& obj
if (remove_attachment)
{
- // llinfos << "found object to remove, id " << objectp->getID() << ", item " << objectp->getAttachmentItemID() << llendl;
+ // LL_INFOS() << "found object to remove, id " << objectp->getID() << ", item " << objectp->getAttachmentItemID() << LL_ENDL;
objects_to_remove.push_back(objectp);
}
else
{
- // llinfos << "found object to keep, id " << objectp->getID() << ", item " << objectp->getAttachmentItemID() << llendl;
+ // LL_INFOS() << "found object to keep, id " << objectp->getID() << ", item " << objectp->getAttachmentItemID() << LL_ENDL;
current_item_ids.insert(object_item_id);
}
}
@@ -1603,7 +1604,7 @@ void LLAgentWearables::userUpdateAttachments(LLInventoryModel::item_array_t& obj
}
// S32 remove_count = objects_to_remove.size();
// S32 add_count = items_to_add.size();
- // llinfos << "remove " << remove_count << " add " << add_count << llendl;
+ // LL_INFOS() << "remove " << remove_count << " add " << add_count << LL_ENDL;
// Remove everything in objects_to_remove
userRemoveMultipleAttachments(objects_to_remove);
@@ -1638,7 +1639,7 @@ void LLAgentWearables::userRemoveMultipleAttachments(llvo_vec_t& objects_to_remo
void LLAgentWearables::userAttachMultipleAttachments(LLInventoryModel::item_array_t& obj_item_array)
{
// Build a compound message to send all the objects that need to be rezzed.
- S32 obj_count = obj_item_array.count();
+ S32 obj_count = obj_item_array.size();
// Limit number of packets to send
const S32 MAX_PACKETS_TO_SEND = 10;
@@ -1669,7 +1670,7 @@ void LLAgentWearables::userAttachMultipleAttachments(LLInventoryModel::item_arra
msg->addBOOLFast(_PREHASH_FirstDetachAll, false );
}
- const LLInventoryItem* item = obj_item_array.get(i).get();
+ const LLInventoryItem* item = obj_item_array.at(i).get();
msg->nextBlockFast(_PREHASH_ObjectData );
msg->addUUIDFast(_PREHASH_ItemID, item->getLinkedUUID());
msg->addUUIDFast(_PREHASH_OwnerID, item->getPermissions().getOwner());
@@ -1830,20 +1831,20 @@ void LLAgentWearables::editWearable(const LLUUID& item_id)
LLViewerInventoryItem* item = gInventory.getLinkedItem(item_id);
if (!item)
{
- llwarns << "Failed to get linked item" << llendl;
+ LL_WARNS() << "Failed to get linked item" << LL_ENDL;
return;
}
LLViewerWearable* wearable = gAgentWearables.getWearableFromItemID(item_id);
if (!wearable)
{
- llwarns << "Cannot get wearable" << llendl;
+ LL_WARNS() << "Cannot get wearable" << LL_ENDL;
return;
}
if (!gAgentWearables.isWearableModifiable(item->getUUID()))
{
- llwarns << "Cannot modify wearable" << llendl;
+ LL_WARNS() << "Cannot modify wearable" << LL_ENDL;
return;
}
@@ -1877,7 +1878,7 @@ void LLAgentWearables::updateServer()
void LLAgentWearables::populateMyOutfitsFolder(void)
{
- llinfos << "starting outfit population" << llendl;
+ LL_INFOS() << "starting outfit population" << LL_ENDL;
const LLUUID& my_outfits_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_MY_OUTFITS);
LLLibraryOutfitsFetch* outfits = new LLLibraryOutfitsFetch(my_outfits_id);
diff --git a/indra/newview/llagentwearables.h b/indra/newview/llagentwearables.h
index 5be4648636..02d24892b5 100755
--- a/indra/newview/llagentwearables.h
+++ b/indra/newview/llagentwearables.h
@@ -107,7 +107,7 @@ private:
/*virtual*/void wearableUpdated(LLWearable *wearable, BOOL removed);
public:
void setWearableItem(LLInventoryItem* new_item, LLViewerWearable* wearable, bool do_append = false);
- void setWearableOutfit(const LLInventoryItem::item_array_t& items, const LLDynamicArray< LLViewerWearable* >& wearables, BOOL remove);
+ void setWearableOutfit(const LLInventoryItem::item_array_t& items, const std::vector< LLViewerWearable* >& wearables, BOOL remove);
void setWearableName(const LLUUID& item_id, const std::string& new_name);
// *TODO: Move this into llappearance/LLWearableData ?
void addLocalTextureObject(const LLWearableType::EType wearable_type, const LLAvatarAppearanceDefines::ETextureIndex texture_type, U32 wearable_index);
diff --git a/indra/newview/llagentwearablesfetch.cpp b/indra/newview/llagentwearablesfetch.cpp
index 8b6b6db525..af0f02861d 100755
--- a/indra/newview/llagentwearablesfetch.cpp
+++ b/indra/newview/llagentwearablesfetch.cpp
@@ -39,7 +39,7 @@ void order_my_outfits_cb()
{
if (!LLApp::isRunning())
{
- llwarns << "called during shutdown, skipping" << llendl;
+ LL_WARNS() << "called during shutdown, skipping" << LL_ENDL;
return;
}
@@ -54,11 +54,11 @@ void order_my_outfits_cb()
//My Outfits should at least contain saved initial outfit and one another outfit
if (cats->size() < 2)
{
- llwarning("My Outfits category was not populated properly", 0);
+ LL_WARNS() << "My Outfits category was not populated properly" << LL_ENDL;
return;
}
- llinfos << "Starting updating My Outfits with wearables ordering information" << llendl;
+ LL_INFOS() << "Starting updating My Outfits with wearables ordering information" << LL_ENDL;
for (LLInventoryModel::cat_array_t::iterator outfit_iter = cats->begin();
outfit_iter != cats->end(); ++outfit_iter)
@@ -72,7 +72,7 @@ void order_my_outfits_cb()
LLAppearanceMgr::getInstance()->updateClothingOrderingInfo(cat_id);
}
- llinfos << "Finished updating My Outfits with wearables ordering information" << llendl;
+ LL_INFOS() << "Finished updating My Outfits with wearables ordering information" << LL_ENDL;
}
LLInitialWearablesFetch::LLInitialWearablesFetch(const LLUUID& cof_id) :
@@ -127,7 +127,7 @@ void LLInitialWearablesFetch::processContents()
LLInventoryModel::EXCLUDE_TRASH, is_wearable);
LLAppearanceMgr::instance().setAttachmentInvLinkEnable(true);
- if (wearable_array.count() > 0)
+ if (wearable_array.size() > 0)
{
gAgentWearables.notifyLoadingStarted();
LLAppearanceMgr::instance().updateAppearanceFromCOF();
@@ -165,7 +165,7 @@ public:
LLViewerInventoryItem *item = gInventory.getItem(*it);
if (!item)
{
- llwarns << "fetch failed!" << llendl;
+ LL_WARNS() << "fetch failed!" << LL_ENDL;
continue;
}
@@ -197,8 +197,8 @@ void LLInitialWearablesFetch::processWearablesMessage()
}
else
{
- llinfos << "Invalid wearable, type " << wearable_data->mType << " itemID "
- << wearable_data->mItemID << " assetID " << wearable_data->mAssetID << llendl;
+ LL_INFOS() << "Invalid wearable, type " << wearable_data->mType << " itemID "
+ << wearable_data->mItemID << " assetID " << wearable_data->mAssetID << LL_ENDL;
delete wearable_data;
}
}
@@ -249,7 +249,7 @@ LLLibraryOutfitsFetch::LLLibraryOutfitsFetch(const LLUUID& my_outfits_id) :
mCurrFetchStep(LOFS_FOLDER),
mOutfitsPopulated(false)
{
- llinfos << "created" << llendl;
+ LL_INFOS() << "created" << LL_ENDL;
mMyOutfitsID = LLUUID::null;
mClothingID = LLUUID::null;
@@ -260,12 +260,12 @@ LLLibraryOutfitsFetch::LLLibraryOutfitsFetch(const LLUUID& my_outfits_id) :
LLLibraryOutfitsFetch::~LLLibraryOutfitsFetch()
{
- llinfos << "destroyed" << llendl;
+ LL_INFOS() << "destroyed" << LL_ENDL;
}
void LLLibraryOutfitsFetch::done()
{
- llinfos << "start" << llendl;
+ LL_INFOS() << "start" << LL_ENDL;
// Delay this until idle() routine, since it's a heavy operation and
// we also can't have it run within notifyObservers.
@@ -275,7 +275,7 @@ void LLLibraryOutfitsFetch::done()
void LLLibraryOutfitsFetch::doneIdle()
{
- llinfos << "start" << llendl;
+ LL_INFOS() << "start" << LL_ENDL;
gInventory.addObserver(this); // Add this back in since it was taken out during ::done()
@@ -301,7 +301,7 @@ void LLLibraryOutfitsFetch::doneIdle()
contentsDone();
break;
default:
- llwarns << "Got invalid state for outfit fetch: " << mCurrFetchStep << llendl;
+ LL_WARNS() << "Got invalid state for outfit fetch: " << mCurrFetchStep << LL_ENDL;
mOutfitsPopulated = TRUE;
break;
}
@@ -317,7 +317,7 @@ void LLLibraryOutfitsFetch::doneIdle()
void LLLibraryOutfitsFetch::folderDone()
{
- llinfos << "start" << llendl;
+ LL_INFOS() << "start" << LL_ENDL;
LLInventoryModel::cat_array_t cat_array;
LLInventoryModel::item_array_t wearable_array;
@@ -326,7 +326,7 @@ void LLLibraryOutfitsFetch::folderDone()
// Early out if we already have items in My Outfits
// except the case when My Outfits contains just initial outfit
- if (cat_array.count() > 1)
+ if (cat_array.size() > 1)
{
mOutfitsPopulated = true;
return;
@@ -342,9 +342,9 @@ void LLLibraryOutfitsFetch::folderDone()
cat_array, wearable_array,
LLInventoryModel::EXCLUDE_TRASH,
matchFolderFunctor);
- if (cat_array.count() > 0)
+ if (cat_array.size() > 0)
{
- const LLViewerInventoryCategory *cat = cat_array.get(0);
+ const LLViewerInventoryCategory *cat = cat_array.at(0);
mLibraryClothingID = cat->getUUID();
}
@@ -364,7 +364,7 @@ void LLLibraryOutfitsFetch::folderDone()
void LLLibraryOutfitsFetch::outfitsDone()
{
- llinfos << "start" << llendl;
+ LL_INFOS() << "start" << LL_ENDL;
LLInventoryModel::cat_array_t cat_array;
LLInventoryModel::item_array_t wearable_array;
@@ -374,7 +374,7 @@ void LLLibraryOutfitsFetch::outfitsDone()
gInventory.collectDescendents(mLibraryClothingID, cat_array, wearable_array,
LLInventoryModel::EXCLUDE_TRASH);
- llassert(cat_array.count() > 0);
+ llassert(cat_array.size() > 0);
for (LLInventoryModel::cat_array_t::const_iterator iter = cat_array.begin();
iter != cat_array.end();
++iter)
@@ -401,7 +401,7 @@ void LLLibraryOutfitsFetch::outfitsDone()
matchFolderFunctor);
if (cat_array.size() > 0)
{
- const LLViewerInventoryCategory *cat = cat_array.get(0);
+ const LLViewerInventoryCategory *cat = cat_array.at(0);
mImportedClothingID = cat->getUUID();
}
@@ -443,7 +443,7 @@ private:
// Copy the clothing folders from the library into the imported clothing folder
void LLLibraryOutfitsFetch::libraryDone()
{
- llinfos << "start" << llendl;
+ LL_INFOS() << "start" << LL_ENDL;
if (mImportedClothingID != LLUUID::null)
{
@@ -468,13 +468,13 @@ void LLLibraryOutfitsFetch::libraryDone()
const LLViewerInventoryCategory *cat = gInventory.getCategory(src_folder_id);
if (!cat)
{
- llwarns << "Library folder import for uuid:" << src_folder_id << " failed to find folder." << llendl;
+ LL_WARNS() << "Library folder import for uuid:" << src_folder_id << " failed to find folder." << LL_ENDL;
continue;
}
if (!LLAppearanceMgr::getInstance()->getCanMakeFolderIntoOutfit(src_folder_id))
{
- llinfos << "Skipping non-outfit folder name:" << cat->getName() << llendl;
+ LL_INFOS() << "Skipping non-outfit folder name:" << cat->getName() << LL_ENDL;
continue;
}
@@ -500,7 +500,7 @@ void LLLibraryOutfitsFetch::libraryDone()
void LLLibraryOutfitsFetch::importedFolderFetch()
{
- llinfos << "start" << llendl;
+ LL_INFOS() << "start" << LL_ENDL;
// Fetch the contents of the Imported Clothing Folder
uuid_vec_t folders;
@@ -517,7 +517,7 @@ void LLLibraryOutfitsFetch::importedFolderFetch()
void LLLibraryOutfitsFetch::importedFolderDone()
{
- llinfos << "start" << llendl;
+ LL_INFOS() << "start" << LL_ENDL;
LLInventoryModel::cat_array_t cat_array;
LLInventoryModel::item_array_t wearable_array;
@@ -549,7 +549,7 @@ void LLLibraryOutfitsFetch::importedFolderDone()
void LLLibraryOutfitsFetch::contentsDone()
{
- llinfos << "start" << llendl;
+ LL_INFOS() << "start" << LL_ENDL;
LLInventoryModel::cat_array_t cat_array;
LLInventoryModel::item_array_t wearable_array;
@@ -564,7 +564,7 @@ void LLLibraryOutfitsFetch::contentsDone()
const LLViewerInventoryCategory *cat = gInventory.getCategory(folder_id);
if (!cat)
{
- llwarns << "Library folder import for uuid:" << folder_id << " failed to find folder." << llendl;
+ LL_WARNS() << "Library folder import for uuid:" << folder_id << " failed to find folder." << LL_ENDL;
continue;
}
diff --git a/indra/newview/llappearancemgr.cpp b/indra/newview/llappearancemgr.cpp
index da1609297e..81f713502f 100755
--- a/indra/newview/llappearancemgr.cpp
+++ b/indra/newview/llappearancemgr.cpp
@@ -148,16 +148,16 @@ LLUUID findDescendentCategoryIDByName(const LLUUID& parent_id, const std::string
item_array,
LLInventoryModel::EXCLUDE_TRASH,
has_name);
- if (0 == cat_array.count())
+ if (0 == cat_array.size())
return LLUUID();
else
{
- LLViewerInventoryCategory *cat = cat_array.get(0);
+ LLViewerInventoryCategory *cat = cat_array.at(0);
if (cat)
return cat->getUUID();
else
{
- llwarns << "null cat" << llendl;
+ LL_WARNS() << "null cat" << LL_ENDL;
return LLUUID();
}
}
@@ -216,11 +216,11 @@ public:
// Request or re-request operation for specified item.
void addItem(const LLUUID& item_id)
{
- LL_DEBUGS("Avatar") << "item_id " << item_id << llendl;
+ LL_DEBUGS("Avatar") << "item_id " << item_id << LL_ENDL;
if (!requestOperation(item_id))
{
- LL_DEBUGS("Avatar") << "item_id " << item_id << " requestOperation false, skipping" << llendl;
+ LL_DEBUGS("Avatar") << "item_id " << item_id << " requestOperation false, skipping" << LL_ENDL;
return;
}
@@ -243,20 +243,20 @@ public:
{
if (ll_frand() < gSavedSettings.getF32("InventoryDebugSimulateLateOpRate"))
{
- llwarns << "Simulating late operation by punting handling to later" << llendl;
+ LL_WARNS() << "Simulating late operation by punting handling to later" << LL_ENDL;
doAfterInterval(boost::bind(&LLCallAfterInventoryBatchMgr::onOp,this,src_id,dst_id,timestamp),
mRetryAfter);
return;
}
mPendingRequests--;
F32 elapsed = timestamp.getElapsedTimeF32();
- LL_DEBUGS("Avatar") << "op done, src_id " << src_id << " dst_id " << dst_id << " after " << elapsed << " seconds" << llendl;
+ LL_DEBUGS("Avatar") << "op done, src_id " << src_id << " dst_id " << dst_id << " after " << elapsed << " seconds" << LL_ENDL;
if (mWaitTimes.find(src_id) == mWaitTimes.end())
{
// No longer waiting for this item - either serviced
// already or gave up after too many retries.
- llwarns << "duplicate or late operation, src_id " << src_id << "dst_id " << dst_id
- << " elapsed " << elapsed << " after end " << (S32) mCompletionOrFailureCalled << llendl;
+ LL_WARNS() << "duplicate or late operation, src_id " << src_id << "dst_id " << dst_id
+ << " elapsed " << elapsed << " after end " << (S32) mCompletionOrFailureCalled << LL_ENDL;
}
mTimeStats.push(elapsed);
mWaitTimes.erase(src_id);
@@ -291,13 +291,13 @@ public:
void onFailure()
{
- llinfos << "failed" << llendl;
+ LL_INFOS() << "failed" << LL_ENDL;
mOnFailureFunc();
}
void onCompletion()
{
- llinfos << "done" << llendl;
+ LL_INFOS() << "done" << LL_ENDL;
mOnCompletionFunc();
}
@@ -316,7 +316,7 @@ public:
if (!mWaitTimes.empty())
{
- llwarns << "still waiting on " << mWaitTimes.size() << " items" << llendl;
+ LL_WARNS() << "still waiting on " << mWaitTimes.size() << " items" << LL_ENDL;
for (std::map<LLUUID,LLTimer>::iterator it = mWaitTimes.begin();
it != mWaitTimes.end();)
{
@@ -331,13 +331,13 @@ public:
if (retries < mMaxRetries)
{
LL_DEBUGS("Avatar") << "Waited " << time_waited <<
- " for " << curr_it->first << ", retrying" << llendl;
+ " for " << curr_it->first << ", retrying" << LL_ENDL;
mRetryCount++;
addItem(curr_it->first);
}
else
{
- llwarns << "Giving up on " << curr_it->first << " after too many retries" << llendl;
+ LL_WARNS() << "Giving up on " << curr_it->first << " after too many retries" << LL_ENDL;
mWaitTimes.erase(curr_it);
mFailCount++;
}
@@ -354,16 +354,16 @@ public:
void reportStats()
{
- LL_DEBUGS("Avatar") << "Phase: " << mTrackingPhase << llendl;
- LL_DEBUGS("Avatar") << "mFailCount: " << mFailCount << llendl;
- LL_DEBUGS("Avatar") << "mRetryCount: " << mRetryCount << llendl;
- LL_DEBUGS("Avatar") << "Times: n " << mTimeStats.getCount() << " min " << mTimeStats.getMinValue() << " max " << mTimeStats.getMaxValue() << llendl;
- LL_DEBUGS("Avatar") << "Mean " << mTimeStats.getMean() << " stddev " << mTimeStats.getStdDev() << llendl;
+ LL_DEBUGS("Avatar") << "Phase: " << mTrackingPhase << LL_ENDL;
+ LL_DEBUGS("Avatar") << "mFailCount: " << mFailCount << LL_ENDL;
+ LL_DEBUGS("Avatar") << "mRetryCount: " << mRetryCount << LL_ENDL;
+ LL_DEBUGS("Avatar") << "Times: n " << mTimeStats.getCount() << " min " << mTimeStats.getMinValue() << " max " << mTimeStats.getMaxValue() << LL_ENDL;
+ LL_DEBUGS("Avatar") << "Mean " << mTimeStats.getMean() << " stddev " << mTimeStats.getStdDev() << LL_ENDL;
}
virtual ~LLCallAfterInventoryBatchMgr()
{
- LL_DEBUGS("Avatar") << "deleting" << llendl;
+ LL_DEBUGS("Avatar") << "deleting" << LL_ENDL;
}
protected:
@@ -402,10 +402,10 @@ public:
{
LLViewerInventoryItem *item = gInventory.getItem(item_id);
llassert(item);
- LL_DEBUGS("Avatar") << "copying item " << item_id << llendl;
+ LL_DEBUGS("Avatar") << "copying item " << item_id << LL_ENDL;
if (ll_frand() < gSavedSettings.getF32("InventoryDebugSimulateOpFailureRate"))
{
- LL_DEBUGS("Avatar") << "simulating failure by not sending request for item " << item_id << llendl;
+ LL_DEBUGS("Avatar") << "simulating failure by not sending request for item " << item_id << LL_ENDL;
return true;
}
copy_inventory_item(
@@ -444,14 +444,14 @@ public:
{
if (item->getParentUUID() == mDstCatID)
{
- LL_DEBUGS("Avatar") << "item " << item_id << " name " << item->getName() << " is already a child of " << mDstCatID << llendl;
+ LL_DEBUGS("Avatar") << "item " << item_id << " name " << item->getName() << " is already a child of " << mDstCatID << LL_ENDL;
return false;
}
- LL_DEBUGS("Avatar") << "linking item " << item_id << " name " << item->getName() << " to " << mDstCatID << llendl;
+ LL_DEBUGS("Avatar") << "linking item " << item_id << " name " << item->getName() << " to " << mDstCatID << LL_ENDL;
// create an inventory item link.
if (ll_frand() < gSavedSettings.getF32("InventoryDebugSimulateOpFailureRate"))
{
- LL_DEBUGS("Avatar") << "simulating failure by not sending request for item " << item_id << llendl;
+ LL_DEBUGS("Avatar") << "simulating failure by not sending request for item " << item_id << LL_ENDL;
return true;
}
link_inventory_item(gAgent.getID(),
@@ -470,7 +470,7 @@ public:
LLViewerInventoryCategory *catp = gInventory.getCategory(item_id);
if (!catp)
{
- llwarns << "link request failed, id not found as inventory item or category " << item_id << llendl;
+ LL_WARNS() << "link request failed, id not found as inventory item or category " << item_id << LL_ENDL;
return false;
}
const LLUUID cof = LLAppearanceMgr::instance().getCOF();
@@ -482,10 +482,10 @@ public:
{
if (ll_frand() < gSavedSettings.getF32("InventoryDebugSimulateOpFailureRate"))
{
- LL_DEBUGS("Avatar") << "simulating failure by not sending request for item " << item_id << llendl;
+ LL_DEBUGS("Avatar") << "simulating failure by not sending request for item " << item_id << LL_ENDL;
return true;
}
- LL_DEBUGS("Avatar") << "linking folder " << item_id << " name " << catp->getName() << " to cof " << cof << llendl;
+ LL_DEBUGS("Avatar") << "linking folder " << item_id << " name " << catp->getName() << " to cof " << cof << LL_ENDL;
link_inventory_item(gAgent.getID(), item_id, cof, catp->getName(), "",
LLAssetType::AT_LINK_FOLDER,
new LLBoostFuncInventoryCallback(
@@ -621,11 +621,11 @@ LLWearableHoldingPattern::LLWearableHoldingPattern():
{
if (sActiveHoldingPatterns.size()>0)
{
- llinfos << "Creating LLWearableHoldingPattern when "
+ LL_INFOS() << "Creating LLWearableHoldingPattern when "
<< sActiveHoldingPatterns.size()
<< " other attempts are active."
<< " Flagging others as invalid."
- << llendl;
+ << LL_ENDL;
for (type_set_hp::iterator it = sActiveHoldingPatterns.begin();
it != sActiveHoldingPatterns.end();
++it)
@@ -692,7 +692,7 @@ void LLWearableHoldingPattern::checkMissingWearables()
if (!isMostRecent())
{
// runway why don't we actually skip here?
- llwarns << self_av_string() << "skipping because LLWearableHolding pattern is invalid (superceded by later outfit request)" << llendl;
+ LL_WARNS() << self_av_string() << "skipping because LLWearableHolding pattern is invalid (superceded by later outfit request)" << LL_ENDL;
}
std::vector<S32> found_by_type(LLWearableType::WT_COUNT,0);
@@ -710,7 +710,7 @@ void LLWearableHoldingPattern::checkMissingWearables()
{
if (requested_by_type[type] > found_by_type[type])
{
- llwarns << self_av_string() << "got fewer wearables than requested, type " << type << ": requested " << requested_by_type[type] << ", found " << found_by_type[type] << llendl;
+ LL_WARNS() << self_av_string() << "got fewer wearables than requested, type " << type << ": requested " << requested_by_type[type] << ", found " << found_by_type[type] << LL_ENDL;
}
if (found_by_type[type] > 0)
continue;
@@ -727,7 +727,7 @@ void LLWearableHoldingPattern::checkMissingWearables()
mTypesToRecover.insert(type);
mTypesToLink.insert(type);
recoverMissingWearable((LLWearableType::EType)type);
- llwarns << self_av_string() << "need to replace " << type << llendl;
+ LL_WARNS() << self_av_string() << "need to replace " << type << LL_ENDL;
}
}
@@ -750,13 +750,13 @@ void LLWearableHoldingPattern::onAllComplete()
if (!isMostRecent())
{
// runway need to skip here?
- llwarns << self_av_string() << "skipping because LLWearableHolding pattern is invalid (superceded by later outfit request)" << llendl;
+ LL_WARNS() << self_av_string() << "skipping because LLWearableHolding pattern is invalid (superceded by later outfit request)" << LL_ENDL;
}
// Activate all gestures in this folder
- if (mGestItems.count() > 0)
+ if (mGestItems.size() > 0)
{
- LL_DEBUGS("Avatar") << self_av_string() << "Activating " << mGestItems.count() << " gestures" << LL_ENDL;
+ LL_DEBUGS("Avatar") << self_av_string() << "Activating " << mGestItems.size() << " gestures" << LL_ENDL;
LLGestureMgr::instance().activateGestures(mGestItems);
@@ -779,7 +779,7 @@ void LLWearableHoldingPattern::onAllComplete()
// Update attachments to match those requested.
if (isAgentAvatarValid())
{
- LL_DEBUGS("Avatar") << self_av_string() << "Updating " << mObjItems.count() << " attachments" << LL_ENDL;
+ LL_DEBUGS("Avatar") << self_av_string() << "Updating " << mObjItems.size() << " attachments" << LL_ENDL;
LLAgentWearables::userUpdateAttachments(mObjItems);
}
@@ -802,7 +802,7 @@ void LLWearableHoldingPattern::onFetchCompletion()
if (!isMostRecent())
{
// runway skip here?
- llwarns << self_av_string() << "skipping because LLWearableHolding pattern is invalid (superceded by later outfit request)" << llendl;
+ LL_WARNS() << self_av_string() << "skipping because LLWearableHolding pattern is invalid (superceded by later outfit request)" << LL_ENDL;
}
checkMissingWearables();
@@ -814,7 +814,7 @@ bool LLWearableHoldingPattern::pollFetchCompletion()
if (!isMostRecent())
{
// runway skip here?
- llwarns << self_av_string() << "skipping because LLWearableHolding pattern is invalid (superceded by later outfit request)" << llendl;
+ LL_WARNS() << self_av_string() << "skipping because LLWearableHolding pattern is invalid (superceded by later outfit request)" << LL_ENDL;
}
bool completed = isFetchCompleted();
@@ -830,7 +830,7 @@ bool LLWearableHoldingPattern::pollFetchCompletion()
if (timed_out)
{
- llwarns << self_av_string() << "Exceeded max wait time for wearables, updating appearance based on what has arrived" << llendl;
+ LL_WARNS() << self_av_string() << "Exceeded max wait time for wearables, updating appearance based on what has arrived" << LL_ENDL;
}
onFetchCompletion();
@@ -842,11 +842,11 @@ void recovered_item_link_cb(const LLUUID& item_id, LLWearableType::EType type, L
{
if (!holder->isMostRecent())
{
- llwarns << "skipping because LLWearableHolding pattern is invalid (superceded by later outfit request)" << llendl;
+ LL_WARNS() << "skipping because LLWearableHolding pattern is invalid (superceded by later outfit request)" << LL_ENDL;
// runway skip here?
}
- llinfos << "Recovered item link for type " << type << llendl;
+ LL_INFOS() << "Recovered item link for type " << type << LL_ENDL;
holder->eraseTypeToLink(type);
// Add wearable to FoundData for actual wearing
LLViewerInventoryItem *item = gInventory.getItem(item_id);
@@ -870,12 +870,12 @@ void recovered_item_link_cb(const LLUUID& item_id, LLWearableType::EType type, L
}
else
{
- llwarns << self_av_string() << "inventory item not found for recovered wearable" << llendl;
+ LL_WARNS() << self_av_string() << "inventory item not found for recovered wearable" << LL_ENDL;
}
}
else
{
- llwarns << self_av_string() << "inventory link not found for recovered wearable" << llendl;
+ LL_WARNS() << self_av_string() << "inventory link not found for recovered wearable" << LL_ENDL;
}
}
@@ -884,7 +884,7 @@ void recovered_item_cb(const LLUUID& item_id, LLWearableType::EType type, LLView
if (!holder->isMostRecent())
{
// runway skip here?
- llwarns << self_av_string() << "skipping because LLWearableHolding pattern is invalid (superceded by later outfit request)" << llendl;
+ LL_WARNS() << self_av_string() << "skipping because LLWearableHolding pattern is invalid (superceded by later outfit request)" << LL_ENDL;
}
LL_DEBUGS("Avatar") << self_av_string() << "Recovered item for type " << type << LL_ENDL;
@@ -910,13 +910,13 @@ void LLWearableHoldingPattern::recoverMissingWearable(LLWearableType::EType type
if (!isMostRecent())
{
// runway skip here?
- llwarns << self_av_string() << "skipping because LLWearableHolding pattern is invalid (superceded by later outfit request)" << llendl;
+ LL_WARNS() << self_av_string() << "skipping because LLWearableHolding pattern is invalid (superceded by later outfit request)" << LL_ENDL;
}
// Try to recover by replacing missing wearable with a new one.
LLNotificationsUtil::add("ReplacedMissingWearable");
- lldebugs << "Wearable " << LLWearableType::getTypeLabel(type)
- << " could not be downloaded. Replaced inventory item with default wearable." << llendl;
+ LL_DEBUGS() << "Wearable " << LLWearableType::getTypeLabel(type)
+ << " could not be downloaded. Replaced inventory item with default wearable." << LL_ENDL;
LLViewerWearable* wearable = LLWearableList::instance().createNewWearable(type, gAgentAvatarp);
// Add a new one in the lost and found folder.
@@ -960,7 +960,7 @@ bool LLWearableHoldingPattern::pollMissingWearables()
if (!isMostRecent())
{
// runway skip here?
- llwarns << self_av_string() << "skipping because LLWearableHolding pattern is invalid (superceded by later outfit request)" << llendl;
+ LL_WARNS() << self_av_string() << "skipping because LLWearableHolding pattern is invalid (superceded by later outfit request)" << LL_ENDL;
}
bool timed_out = isTimedOut();
@@ -1009,11 +1009,11 @@ void LLWearableHoldingPattern::handleLateArrivals()
}
if (!isMostRecent())
{
- llwarns << self_av_string() << "Late arrivals not handled - outfit change no longer valid" << llendl;
+ LL_WARNS() << self_av_string() << "Late arrivals not handled - outfit change no longer valid" << LL_ENDL;
}
if (!mIsAllComplete)
{
- llwarns << self_av_string() << "Late arrivals not handled - in middle of missing wearables processing" << llendl;
+ LL_WARNS() << self_av_string() << "Late arrivals not handled - in middle of missing wearables processing" << LL_ENDL;
}
LL_INFOS("Avatar") << self_av_string() << "Need to handle " << mLateArrivals.size() << " late arriving wearables" << LL_ENDL;
@@ -1092,19 +1092,19 @@ void LLWearableHoldingPattern::onWearableAssetFetch(LLViewerWearable *wearable)
{
if (!isMostRecent())
{
- llwarns << self_av_string() << "skipping because LLWearableHolding pattern is invalid (superceded by later outfit request)" << llendl;
+ LL_WARNS() << self_av_string() << "skipping because LLWearableHolding pattern is invalid (superceded by later outfit request)" << LL_ENDL;
}
mResolved += 1; // just counting callbacks, not successes.
LL_DEBUGS("Avatar") << self_av_string() << "resolved " << mResolved << "/" << getFoundList().size() << LL_ENDL;
if (!wearable)
{
- llwarns << self_av_string() << "no wearable found" << llendl;
+ LL_WARNS() << self_av_string() << "no wearable found" << LL_ENDL;
}
if (mFired)
{
- llwarns << self_av_string() << "called after holder fired" << llendl;
+ LL_WARNS() << self_av_string() << "called after holder fired" << LL_ENDL;
if (wearable)
{
mLateArrivals.insert(wearable);
@@ -1130,7 +1130,7 @@ void LLWearableHoldingPattern::onWearableAssetFetch(LLViewerWearable *wearable)
// Failing this means inventory or asset server are corrupted in a way we don't handle.
if ((data.mWearableType >= LLWearableType::WT_COUNT) || (wearable->getType() != data.mWearableType))
{
- llwarns << self_av_string() << "recovered wearable but type invalid. inventory wearable type: " << data.mWearableType << " asset wearable type: " << wearable->getType() << llendl;
+ LL_WARNS() << self_av_string() << "recovered wearable but type invalid. inventory wearable type: " << data.mWearableType << " asset wearable type: " << wearable->getType() << LL_ENDL;
break;
}
@@ -1155,9 +1155,9 @@ static void removeDuplicateItems(LLInventoryModel::item_array_t& items)
// encountered, so we actually keep the *last* of each duplicate
// item. This is needed to give the right priority when adding
// duplicate items to an existing outfit.
- for (S32 i=items.count()-1; i>=0; i--)
+ for (S32 i=items.size()-1; i>=0; i--)
{
- LLViewerInventoryItem *item = items.get(i);
+ LLViewerInventoryItem *item = items.at(i);
LLUUID item_id = item->getLinkedUUID();
if (items_seen.find(item_id)!=items_seen.end())
continue;
@@ -1168,7 +1168,7 @@ static void removeDuplicateItems(LLInventoryModel::item_array_t& items)
it != tmp_list.end();
++it)
{
- new_items.put(*it);
+ new_items.push_back(*it);
}
items = new_items;
}
@@ -1251,7 +1251,7 @@ const LLUUID LLAppearanceMgr::getBaseOutfitUUID()
if (outfit_cat->getPreferredType() != LLFolderType::FT_OUTFIT)
{
- llwarns << "Expected outfit type:" << LLFolderType::FT_OUTFIT << " but got type:" << outfit_cat->getType() << " for folder name:" << outfit_cat->getName() << llendl;
+ LL_WARNS() << "Expected outfit type:" << LLFolderType::FT_OUTFIT << " but got type:" << outfit_cat->getType() << " for folder name:" << outfit_cat->getName() << LL_ENDL;
return LLUUID::null;
}
@@ -1440,10 +1440,10 @@ void LLAppearanceMgr::shallowCopyCategory(const LLUUID& src_id, const LLUUID& ds
LLInventoryCategory *src_cat = gInventory.getCategory(src_id);
if (!src_cat)
{
- llwarns << "folder not found for src " << src_id.asString() << llendl;
+ LL_WARNS() << "folder not found for src " << src_id.asString() << LL_ENDL;
return;
}
- llinfos << "starting, src_id " << src_id << " name " << src_cat->getName() << " dst_id " << dst_id << llendl;
+ LL_INFOS() << "starting, src_id " << src_id << " name " << src_cat->getName() << " dst_id " << dst_id << LL_ENDL;
LLUUID parent_id = dst_id;
if(parent_id.isNull())
{
@@ -1464,7 +1464,7 @@ void LLAppearanceMgr::shallowCopyCategoryContents(const LLUUID& src_id, const LL
LLInventoryModel::cat_array_t* cats;
LLInventoryModel::item_array_t* items;
gInventory.getDirectDescendentsOf(src_id, cats, items);
- llinfos << "copying " << items->count() << " items" << llendl;
+ LL_INFOS() << "copying " << items->size() << " items" << LL_ENDL;
for (LLInventoryModel::item_array_t::const_iterator iter = items->begin();
iter != items->end();
++iter)
@@ -1504,7 +1504,7 @@ void LLAppearanceMgr::shallowCopyCategoryContents(const LLUUID& src_id, const LL
case LLAssetType::AT_BODYPART:
case LLAssetType::AT_GESTURE:
{
- llinfos << "copying inventory item " << item->getName() << llendl;
+ LL_INFOS() << "copying inventory item " << item->getName() << LL_ENDL;
copy_inventory_item(gAgent.getID(),
item->getPermissions().getOwner(),
item->getUUID(),
@@ -1644,9 +1644,9 @@ void LLAppearanceMgr::purgeBaseOutfitLink(const LLUUID& category)
LLInventoryModel::item_array_t items;
gInventory.collectDescendents(category, cats, items,
LLInventoryModel::EXCLUDE_TRASH);
- for (S32 i = 0; i < items.count(); ++i)
+ for (S32 i = 0; i < items.size(); ++i)
{
- LLViewerInventoryItem *item = items.get(i);
+ LLViewerInventoryItem *item = items.at(i);
if (item->getActualType() != LLAssetType::AT_LINK_FOLDER)
continue;
if (item->getIsLinkType())
@@ -1666,9 +1666,9 @@ void LLAppearanceMgr::purgeCategory(const LLUUID& category, bool keep_outfit_lin
LLInventoryModel::item_array_t items;
gInventory.collectDescendents(category, cats, items,
LLInventoryModel::EXCLUDE_TRASH);
- for (S32 i = 0; i < items.count(); ++i)
+ for (S32 i = 0; i < items.size(); ++i)
{
- LLViewerInventoryItem *item = items.get(i);
+ LLViewerInventoryItem *item = items.at(i);
if (keep_outfit_links && (item->getActualType() == LLAssetType::AT_LINK_FOLDER))
continue;
if (item->getIsLinkType())
@@ -1676,7 +1676,7 @@ void LLAppearanceMgr::purgeCategory(const LLUUID& category, bool keep_outfit_lin
#if 0
if (keep_items && keep_items->find(item) != LLInventoryModel::item_array_t::FAIL)
{
- llinfos << "preserved item" << llendl;
+ LL_INFOS() << "preserved item" << LL_ENDL;
}
else
{
@@ -1718,9 +1718,9 @@ void LLAppearanceMgr::linkAll(const LLUUID& cat_uuid,
LLInventoryModel::item_array_t& items,
LLPointer<LLInventoryCallback> cb)
{
- for (S32 i=0; i<items.count(); i++)
+ for (S32 i=0; i<items.size(); i++)
{
- const LLInventoryItem* item = items.get(i).get();
+ const LLInventoryItem* item = items.at(i).get();
link_inventory_item(gAgent.getID(),
item->getLinkedUUID(),
cat_uuid,
@@ -1749,9 +1749,9 @@ void LLAppearanceMgr::updateCOF(const LLUUID& category, bool append)
{
LLInventoryModel::item_array_t gest_items;
getDescendentsOfAssetType(cof, gest_items, LLAssetType::AT_GESTURE, false);
- for(S32 i = 0; i < gest_items.count(); ++i)
+ for(S32 i = 0; i < gest_items.size(); ++i)
{
- LLViewerInventoryItem *gest_item = gest_items.get(i);
+ LLViewerInventoryItem *gest_item = gest_items.at(i);
if ( LLGestureMgr::instance().isGestureActive( gest_item->getLinkedUUID()) )
{
LLGestureMgr::instance().deactivateGesture( gest_item->getLinkedUUID() );
@@ -1798,10 +1798,10 @@ void LLAppearanceMgr::updateCOF(const LLUUID& category, bool append)
// Create links to new COF contents.
LLInventoryModel::item_array_t all_items;
- all_items += body_items;
- all_items += wear_items;
- all_items += obj_items;
- all_items += gest_items;
+ std::copy(body_items.begin(), body_items.end(), std::back_inserter(all_items));
+ std::copy(wear_items.begin(), wear_items.end(), std::back_inserter(all_items));
+ std::copy(obj_items.begin(), obj_items.end(), std::back_inserter(all_items));
+ std::copy(gest_items.begin(), gest_items.end(), std::back_inserter(all_items));
// Will link all the above items.
LLPointer<LLInventoryCallback> link_waiter = new LLUpdateAppearanceOnDestroy;
@@ -1854,9 +1854,10 @@ void LLAppearanceMgr::createBaseOutfitLink(const LLUUID& category, LLPointer<LLI
void LLAppearanceMgr::updateAgentWearables(LLWearableHoldingPattern* holder, bool append)
{
- lldebugs << "updateAgentWearables()" << llendl;
+ LL_DEBUGS() << "updateAgentWearables()" << LL_ENDL;
LLInventoryItem::item_array_t items;
- LLDynamicArray< LLViewerWearable* > wearables;
+ std::vector< LLViewerWearable* > wearables;
+ wearables.reserve(32);
// For each wearable type, find the wearables of that type.
for( S32 i = 0; i < LLWearableType::WT_COUNT; i++ )
@@ -1871,14 +1872,14 @@ void LLAppearanceMgr::updateAgentWearables(LLWearableHoldingPattern* holder, boo
LLViewerInventoryItem* item = (LLViewerInventoryItem*)gInventory.getItem(data.mItemID);
if( item && (item->getAssetUUID() == wearable->getAssetID()) )
{
- items.put(item);
- wearables.put(wearable);
+ items.push_back(item);
+ wearables.push_back(wearable);
}
}
}
}
- if(wearables.count() > 0)
+ if(wearables.size() > 0)
{
gAgentWearables.setWearableOutfit(items, wearables, !append);
}
@@ -1905,7 +1906,7 @@ bool sort_by_actual_description(const LLInventoryItem* item1, const LLInventoryI
{
if (!item1 || !item2)
{
- llwarning("either item1 or item2 is NULL", 0);
+ LL_WARNS() << "either item1 or item2 is NULL" << LL_ENDL;
return true;
}
@@ -1922,7 +1923,7 @@ void item_array_diff(LLInventoryModel::item_array_t& full_list,
++it)
{
LLViewerInventoryItem *item = *it;
- if (keep_list.find(item) < 0) // Why on earth does LLDynamicArray need to redefine find()?
+ if (std::find(keep_list.begin(), keep_list.end(), item) == keep_list.end())
{
kill_list.push_back(item);
}
@@ -1987,7 +1988,7 @@ void LLAppearanceMgr::updateAppearanceFromCOF(bool update_base_outfit_ordering)
{
if (mIsInUpdateAppearanceFromCOF)
{
- llwarns << "Called updateAppearanceFromCOF inside updateAppearanceFromCOF, skipping" << llendl;
+ LL_WARNS() << "Called updateAppearanceFromCOF inside updateAppearanceFromCOF, skipping" << LL_ENDL;
return;
}
@@ -2023,7 +2024,7 @@ void LLAppearanceMgr::updateAppearanceFromCOF(bool update_base_outfit_ordering)
LLUUID current_outfit_id = getCOF();
// Find all the wearables that are in the COF's subtree.
- lldebugs << "LLAppearanceMgr::updateFromCOF()" << llendl;
+ LL_DEBUGS() << "LLAppearanceMgr::updateFromCOF()" << LL_ENDL;
LLInventoryModel::item_array_t wear_items;
LLInventoryModel::item_array_t obj_items;
LLInventoryModel::item_array_t gest_items;
@@ -2036,7 +2037,7 @@ void LLAppearanceMgr::updateAppearanceFromCOF(bool update_base_outfit_ordering)
dumpItemArray(wear_items,"asset_dump: wear_item");
dumpItemArray(obj_items,"asset_dump: obj_item");
- if(!wear_items.count())
+ if(!wear_items.size())
{
LLNotificationsUtil::add("CouldNotPutOnOutfit");
return;
@@ -2056,9 +2057,9 @@ void LLAppearanceMgr::updateAppearanceFromCOF(bool update_base_outfit_ordering)
// callback will be called (and this object deleted)
// before the final getNextData().
- for(S32 i = 0; i < wear_items.count(); ++i)
+ for(S32 i = 0; i < wear_items.size(); ++i)
{
- LLViewerInventoryItem *item = wear_items.get(i);
+ LLViewerInventoryItem *item = wear_items.at(i);
LLViewerInventoryItem *linked_item = item ? item->getLinkedItem() : NULL;
// Fault injection: use debug setting to test asset
@@ -2086,11 +2087,11 @@ void LLAppearanceMgr::updateAppearanceFromCOF(bool update_base_outfit_ordering)
{
if (!item)
{
- llwarns << "Attempt to wear a null item " << llendl;
+ LL_WARNS() << "Attempt to wear a null item " << LL_ENDL;
}
else if (!linked_item)
{
- llwarns << "Attempt to wear a broken link [ name:" << item->getName() << " ] " << llendl;
+ LL_WARNS() << "Attempt to wear a broken link [ name:" << item->getName() << " ] " << LL_ENDL;
}
}
}
@@ -2102,7 +2103,7 @@ void LLAppearanceMgr::updateAppearanceFromCOF(bool update_base_outfit_ordering)
{
LLFoundData& found = *it;
- lldebugs << self_av_string() << "waiting for onWearableAssetFetch callback, asset " << found.mAssetID.asString() << llendl;
+ LL_DEBUGS() << self_av_string() << "waiting for onWearableAssetFetch callback, asset " << found.mAssetID.asString() << LL_ENDL;
// Fetch the wearables about to be worn.
LLWearableList::instance().getAsset(found.mAssetID,
@@ -2301,10 +2302,10 @@ void LLAppearanceMgr::wearOutfitByName(const std::string& name)
has_name);
bool copy_items = false;
LLInventoryCategory* cat = NULL;
- if (cat_array.count() > 0)
+ if (cat_array.size() > 0)
{
// Just wear the first one that matches
- cat = cat_array.get(0);
+ cat = cat_array.at(0);
}
else
{
@@ -2313,9 +2314,9 @@ void LLAppearanceMgr::wearOutfitByName(const std::string& name)
item_array,
LLInventoryModel::EXCLUDE_TRASH,
has_name);
- if(cat_array.count() > 0)
+ if(cat_array.size() > 0)
{
- cat = cat_array.get(0);
+ cat = cat_array.at(0);
copy_items = true;
}
}
@@ -2326,8 +2327,8 @@ void LLAppearanceMgr::wearOutfitByName(const std::string& name)
}
else
{
- llwarns << "Couldn't find outfit " <<name<< " in wearOutfitByName()"
- << llendl;
+ LL_WARNS() << "Couldn't find outfit " <<name<< " in wearOutfitByName()"
+ << LL_ENDL;
}
}
@@ -2412,7 +2413,7 @@ void LLAppearanceMgr::addCOFItemLink(const LLInventoryItem *item, bool do_update
const LLViewerInventoryItem *vitem = dynamic_cast<const LLViewerInventoryItem*>(item);
if (!vitem)
{
- llwarns << "not an llviewerinventoryitem, failed" << llendl;
+ LL_WARNS() << "not an llviewerinventoryitem, failed" << LL_ENDL;
return;
}
@@ -2426,10 +2427,10 @@ void LLAppearanceMgr::addCOFItemLink(const LLInventoryItem *item, bool do_update
LLInventoryModel::EXCLUDE_TRASH);
bool linked_already = false;
U32 count = 0;
- for (S32 i=0; i<item_array.count(); i++)
+ for (S32 i=0; i<item_array.size(); i++)
{
// Are these links to the same object?
- const LLViewerInventoryItem* inv_item = item_array.get(i).get();
+ const LLViewerInventoryItem* inv_item = item_array.at(i).get();
const LLWearableType::EType wearable_type = inv_item->getWearableType();
const bool is_body_part = (wearable_type == LLWearableType::WT_SHAPE)
@@ -2502,12 +2503,12 @@ LLInventoryModel::item_array_t LLAppearanceMgr::findCOFItemLinks(const LLUUID& i
cat_array,
item_array,
LLInventoryModel::EXCLUDE_TRASH);
- for (S32 i=0; i<item_array.count(); i++)
+ for (S32 i=0; i<item_array.size(); i++)
{
- const LLViewerInventoryItem* inv_item = item_array.get(i).get();
+ const LLViewerInventoryItem* inv_item = item_array.at(i).get();
if (inv_item->getLinkedUUID() == vitem->getLinkedUUID())
{
- result.put(item_array.get(i));
+ result.push_back(item_array.at(i));
}
}
}
@@ -2579,9 +2580,9 @@ void LLAppearanceMgr::removeCOFItemLinks(const LLUUID& item_id)
cat_array,
item_array,
LLInventoryModel::EXCLUDE_TRASH);
- for (S32 i=0; i<item_array.count(); i++)
+ for (S32 i=0; i<item_array.size(); i++)
{
- const LLInventoryItem* item = item_array.get(i).get();
+ const LLInventoryItem* item = item_array.at(i).get();
if (item->getIsLinkType() && item->getLinkedUUID() == item_id)
{
gInventory.purgeObject(item->getUUID());
@@ -2611,7 +2612,7 @@ bool sort_by_linked_uuid(const LLViewerInventoryItem* item1, const LLViewerInven
{
if (!item1 || !item2)
{
- llwarning("item1, item2 cannot be null, something is very wrong", 0);
+ LL_WARNS() << "item1, item2 cannot be null, something is very wrong" << LL_ENDL;
return true;
}
@@ -2653,7 +2654,7 @@ void LLAppearanceMgr::updateIsDirty()
gInventory.collectDescendentsIf(base_outfit, outfit_cats, outfit_items,
LLInventoryModel::EXCLUDE_TRASH, collector);
- if(outfit_items.count() != cof_items.count())
+ if(outfit_items.size() != cof_items.size())
{
// Current outfit folder should have one more item than the outfit folder.
// this one item is the link back to the outfit folder itself.
@@ -2667,8 +2668,8 @@ void LLAppearanceMgr::updateIsDirty()
for (U32 i = 0; i < cof_items.size(); ++i)
{
- LLViewerInventoryItem *item1 = cof_items.get(i);
- LLViewerInventoryItem *item2 = outfit_items.get(i);
+ LLViewerInventoryItem *item1 = cof_items.at(i);
+ LLViewerInventoryItem *item2 = outfit_items.at(i);
if (item1->getLinkedUUID() != item2->getLinkedUUID() ||
item1->getName() != item2->getName() ||
@@ -2698,7 +2699,7 @@ void LLAppearanceMgr::copyLibraryGestures()
gInventory.findLibraryCategoryUUIDForType(LLFolderType::FT_GESTURE,false);
if (lib_gesture_cat_id.isNull())
{
- llwarns << "Unable to copy gestures, source category not found" << llendl;
+ LL_WARNS() << "Unable to copy gestures, source category not found" << LL_ENDL;
}
LLUUID dst_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_GESTURE);
@@ -2747,7 +2748,7 @@ void LLAppearanceMgr::copyLibraryGestures()
LLUUID cat_id = findDescendentCategoryIDByName(lib_gesture_cat_id,folder_name);
if (cat_id.isNull())
{
- llwarns << self_av_string() << "failed to find gesture folder for " << folder_name << llendl;
+ LL_WARNS() << self_av_string() << "failed to find gesture folder for " << folder_name << LL_ENDL;
}
else
{
@@ -2839,12 +2840,12 @@ void LLAppearanceMgr::divvyWearablesByType(const LLInventoryModel::item_array_t&
items_by_type.resize(LLWearableType::WT_COUNT);
if (items.empty()) return;
- for (S32 i=0; i<items.count(); i++)
+ for (S32 i=0; i<items.size(); i++)
{
- LLViewerInventoryItem *item = items.get(i);
+ LLViewerInventoryItem *item = items.at(i);
if (!item)
{
- LL_WARNS("Appearance") << "NULL item found" << llendl;
+ LL_WARNS("Appearance") << "NULL item found" << LL_ENDL;
continue;
}
// Ignore non-wearables.
@@ -2879,7 +2880,7 @@ struct WearablesOrderComparator
{
if (!item1 || !item2)
{
- llwarning("either item1 or item2 is NULL", 0);
+ LL_WARNS() << "either item1 or item2 is NULL" << LL_ENDL;
return true;
}
@@ -3044,7 +3045,7 @@ public:
// Error
/*virtual*/ void errorWithContent(U32 status, const std::string& reason, const LLSD& content)
{
- llwarns << "appearance update request failed, status: " << status << " reason: " << reason << " code: " << content["code"].asInteger() << " error: \"" << content["error"].asString() << "\"" << llendl;
+ LL_WARNS() << "appearance update request failed, status: " << status << " reason: " << reason << " code: " << content["code"].asInteger() << " error: \"" << content["error"].asString() << "\"" << LL_ENDL;
if (gSavedSettings.getBOOL("DebugAvatarAppearanceMessage"))
{
dumpContents(gAgentAvatarp->getFullname() + "_appearance_request_error", content);
@@ -3059,7 +3060,7 @@ public:
F32 seconds_to_wait;
if (mRetryPolicy->shouldRetry(status,seconds_to_wait))
{
- llinfos << "retrying" << llendl;
+ LL_INFOS() << "retrying" << LL_ENDL;
doAfterInterval(boost::bind(&LLAppearanceMgr::requestServerAppearanceUpdate,
LLAppearanceMgr::getInstance(),
LLCurl::ResponderPtr(this)),
@@ -3067,7 +3068,7 @@ public:
}
else
{
- llwarns << "giving up after too many retries" << llendl;
+ LL_WARNS() << "giving up after too many retries" << LL_ENDL;
}
}
@@ -3082,7 +3083,7 @@ public:
void debugCOF(const LLSD& content)
{
- LL_DEBUGS("Avatar") << "AIS COF, version found: " << content["expected"].asInteger() << llendl;
+ LL_DEBUGS("Avatar") << "AIS COF, version found: " << content["expected"].asInteger() << LL_ENDL;
std::set<LLUUID> ais_items, local_items;
const LLSD& cof_raw = content["cof_raw"];
for (LLSD::array_const_iterator it = cof_raw.beginArray();
@@ -3097,14 +3098,14 @@ public:
LL_DEBUGS("Avatar") << "Link: item_id: " << item["item_id"].asUUID()
<< " linked_item_id: " << item["asset_id"].asUUID()
<< " name: " << item["name"].asString()
- << llendl;
+ << LL_ENDL;
}
else if (item["type"].asInteger() == 25) // folder link
{
LL_DEBUGS("Avatar") << "Folder link: item_id: " << item["item_id"].asUUID()
<< " linked_item_id: " << item["asset_id"].asUUID()
<< " name: " << item["name"].asString()
- << llendl;
+ << LL_ENDL;
}
else
@@ -3112,38 +3113,38 @@ public:
LL_DEBUGS("Avatar") << "Other: item_id: " << item["item_id"].asUUID()
<< " linked_item_id: " << item["asset_id"].asUUID()
<< " name: " << item["name"].asString()
- << llendl;
+ << LL_ENDL;
}
}
}
- LL_DEBUGS("Avatar") << llendl;
- LL_DEBUGS("Avatar") << "Local COF, version requested: " << content["observed"].asInteger() << llendl;
+ LL_DEBUGS("Avatar") << LL_ENDL;
+ LL_DEBUGS("Avatar") << "Local COF, version requested: " << content["observed"].asInteger() << LL_ENDL;
LLInventoryModel::cat_array_t cat_array;
LLInventoryModel::item_array_t item_array;
gInventory.collectDescendents(LLAppearanceMgr::instance().getCOF(),
cat_array,item_array,LLInventoryModel::EXCLUDE_TRASH);
- for (S32 i=0; i<item_array.count(); i++)
+ for (S32 i=0; i<item_array.size(); i++)
{
- const LLViewerInventoryItem* inv_item = item_array.get(i).get();
+ const LLViewerInventoryItem* inv_item = item_array.at(i).get();
local_items.insert(inv_item->getUUID());
LL_DEBUGS("Avatar") << "item_id: " << inv_item->getUUID()
<< " linked_item_id: " << inv_item->getLinkedUUID()
<< " name: " << inv_item->getName()
- << llendl;
+ << LL_ENDL;
}
- LL_DEBUGS("Avatar") << llendl;
+ LL_DEBUGS("Avatar") << LL_ENDL;
for (std::set<LLUUID>::iterator it = local_items.begin(); it != local_items.end(); ++it)
{
if (ais_items.find(*it) == ais_items.end())
{
- LL_DEBUGS("Avatar") << "LOCAL ONLY: " << *it << llendl;
+ LL_DEBUGS("Avatar") << "LOCAL ONLY: " << *it << LL_ENDL;
}
}
for (std::set<LLUUID>::iterator it = ais_items.begin(); it != ais_items.end(); ++it)
{
if (local_items.find(*it) == local_items.end())
{
- LL_DEBUGS("Avatar") << "AIS ONLY: " << *it << llendl;
+ LL_DEBUGS("Avatar") << "AIS ONLY: " << *it << LL_ENDL;
}
}
}
@@ -3159,9 +3160,9 @@ LLSD LLAppearanceMgr::dumpCOF() const
LLInventoryModel::cat_array_t cat_array;
LLInventoryModel::item_array_t item_array;
gInventory.collectDescendents(getCOF(),cat_array,item_array,LLInventoryModel::EXCLUDE_TRASH);
- for (S32 i=0; i<item_array.count(); i++)
+ for (S32 i=0; i<item_array.size(); i++)
{
- const LLViewerInventoryItem* inv_item = item_array.get(i).get();
+ const LLViewerInventoryItem* inv_item = item_array.at(i).get();
LLSD item;
LLUUID item_id(inv_item->getUUID());
md5.update((unsigned char*)item_id.mData, 16);
@@ -3177,17 +3178,17 @@ LLSD LLAppearanceMgr::dumpCOF() const
const LLViewerInventoryItem* linked_item = inv_item->getLinkedItem();
if (NULL == linked_item)
{
- llwarns << "Broken link for item '" << inv_item->getName()
+ LL_WARNS() << "Broken link for item '" << inv_item->getName()
<< "' (" << inv_item->getUUID()
- << ") during requestServerAppearanceUpdate" << llendl;
+ << ") during requestServerAppearanceUpdate" << LL_ENDL;
continue;
}
// Some assets may be 'hidden' and show up as null in the viewer.
//if (linked_item->getAssetUUID().isNull())
//{
- // llwarns << "Broken link (null asset) for item '" << inv_item->getName()
+ // LL_WARNS() << "Broken link (null asset) for item '" << inv_item->getName()
// << "' (" << inv_item->getUUID()
- // << ") during requestServerAppearanceUpdate" << llendl;
+ // << ") during requestServerAppearanceUpdate" << LL_ENDL;
// continue;
//}
LLUUID linked_asset_id(linked_item->getAssetUUID());
@@ -3197,10 +3198,10 @@ LLSD LLAppearanceMgr::dumpCOF() const
}
else if (LLAssetType::AT_LINK_FOLDER != inv_item->getActualType())
{
- llwarns << "Non-link item '" << inv_item->getName()
+ LL_WARNS() << "Non-link item '" << inv_item->getName()
<< "' (" << inv_item->getUUID()
<< ") type " << (S32) inv_item->getActualType()
- << " during requestServerAppearanceUpdate" << llendl;
+ << " during requestServerAppearanceUpdate" << LL_ENDL;
continue;
}
links.append(item);
@@ -3224,17 +3225,17 @@ void LLAppearanceMgr::requestServerAppearanceUpdate(LLCurl::ResponderPtr respond
if (!gAgent.getRegion())
{
- llwarns << "Region not set, cannot request server appearance update" << llendl;
+ LL_WARNS() << "Region not set, cannot request server appearance update" << LL_ENDL;
return;
}
if (gAgent.getRegion()->getCentralBakeVersion()==0)
{
- llwarns << "Region does not support baking" << llendl;
+ LL_WARNS() << "Region does not support baking" << LL_ENDL;
}
std::string url = gAgent.getRegion()->getCapability("UpdateAvatarAppearance");
if (url.empty())
{
- llwarns << "No cap for UpdateAvatarAppearance." << llendl;
+ LL_WARNS() << "No cap for UpdateAvatarAppearance." << LL_ENDL;
return;
}
@@ -3252,7 +3253,7 @@ void LLAppearanceMgr::requestServerAppearanceUpdate(LLCurl::ResponderPtr respond
body["cof_version"] = cof_version+999;
}
}
- LL_DEBUGS("Avatar") << "request url " << url << " my_cof_version " << cof_version << llendl;
+ LL_DEBUGS("Avatar") << "request url " << url << " my_cof_version " << cof_version << LL_ENDL;
//LLCurl::ResponderPtr responder_ptr;
if (!responder_ptr.get())
@@ -3278,7 +3279,7 @@ public:
virtual void result(const LLSD &pContent)
{
- llinfos << "Successfully incremented agent's COF." << llendl;
+ LL_INFOS() << "Successfully incremented agent's COF." << LL_ENDL;
S32 new_version = pContent["category"]["version"].asInteger();
// cof_version should have increased
@@ -3288,12 +3289,12 @@ public:
}
virtual void errorWithContent(U32 pStatus, const std::string& pReason, const LLSD& content)
{
- llwarns << "While attempting to increment the agent's cof we got an error with [status:"
- << pStatus << "]: " << content << llendl;
+ LL_WARNS() << "While attempting to increment the agent's cof we got an error with [status:"
+ << pStatus << "]: " << content << LL_ENDL;
F32 seconds_to_wait;
if (mRetryPolicy->shouldRetry(pStatus,seconds_to_wait))
{
- llinfos << "retrying" << llendl;
+ LL_INFOS() << "retrying" << LL_ENDL;
doAfterInterval(boost::bind(&LLAppearanceMgr::incrementCofVersion,
LLAppearanceMgr::getInstance(),
LLHTTPClient::ResponderPtr(this)),
@@ -3301,7 +3302,7 @@ public:
}
else
{
- llwarns << "giving up after too many retries" << llendl;
+ LL_WARNS() << "giving up after too many retries" << LL_ENDL;
}
}
@@ -3313,19 +3314,19 @@ void LLAppearanceMgr::incrementCofVersion(LLHTTPClient::ResponderPtr responder_p
// If we don't have a region, report it as an error
if (gAgent.getRegion() == NULL)
{
- llwarns << "Region not set, cannot request cof_version increment" << llendl;
+ LL_WARNS() << "Region not set, cannot request cof_version increment" << LL_ENDL;
return;
}
std::string url = gAgent.getRegion()->getCapability("IncrementCofVersion");
if (url.empty())
{
- llwarns << "No cap for IncrementCofVersion." << llendl;
+ LL_WARNS() << "No cap for IncrementCofVersion." << LL_ENDL;
return;
}
- llinfos << "Requesting cof_version be incremented via capability to: "
- << url << llendl;
+ LL_INFOS() << "Requesting cof_version be incremented via capability to: "
+ << url << LL_ENDL;
LLSD headers;
LLSD body = LLSD::emptyMap();
@@ -3350,7 +3351,7 @@ void show_created_outfit(LLUUID& folder_id, bool show_panel = true)
{
if (!LLApp::isRunning())
{
- llwarns << "called during shutdown, skipping" << llendl;
+ LL_WARNS() << "called during shutdown, skipping" << LL_ENDL;
return;
}
@@ -3412,7 +3413,7 @@ void LLAppearanceMgr::removeItemsFromAvatar(const uuid_vec_t& ids_to_remove)
{
if (ids_to_remove.empty())
{
- llwarns << "called with empty list, nothing to do" << llendl;
+ LL_WARNS() << "called with empty list, nothing to do" << LL_ENDL;
}
for (uuid_vec_t::const_iterator it = ids_to_remove.begin(); it != ids_to_remove.end(); ++it)
{
@@ -3442,7 +3443,7 @@ void LLAppearanceMgr::addDoomedTempAttachment(const LLUUID& id_to_remove)
{ // If this is a temp attachment and we want to remove it, record the ID
// so it will be deleted when attachments are synced up with COF
mDoomedTempAttachmentIDs.insert(id_to_remove);
- //llinfos << "Will remove temp attachment id " << id_to_remove << llendl;
+ //LL_INFOS() << "Will remove temp attachment id " << id_to_remove << LL_ENDL;
}
}
@@ -3531,26 +3532,26 @@ void LLAppearanceMgr::dumpCat(const LLUUID& cat_id, const std::string& msg)
gInventory.collectDescendents(cat_id, cats, items, LLInventoryModel::EXCLUDE_TRASH);
#ifdef DUMP_CAT_VERBOSE
- llinfos << llendl;
- llinfos << str << llendl;
+ LL_INFOS() << LL_ENDL;
+ LL_INFOS() << str << LL_ENDL;
S32 hitcount = 0;
- for(S32 i=0; i<items.count(); i++)
+ for(S32 i=0; i<items.size(); i++)
{
LLViewerInventoryItem *item = items.get(i);
if (item)
hitcount++;
- llinfos << i <<" "<< item->getName() <<llendl;
+ LL_INFOS() << i <<" "<< item->getName() <<LL_ENDL;
}
#endif
- llinfos << msg << " count " << items.count() << llendl;
+ LL_INFOS() << msg << " count " << items.size() << LL_ENDL;
}
void LLAppearanceMgr::dumpItemArray(const LLInventoryModel::item_array_t& items,
const std::string& msg)
{
- for (S32 i=0; i<items.count(); i++)
+ for (S32 i=0; i<items.size(); i++)
{
- LLViewerInventoryItem *item = items.get(i);
+ LLViewerInventoryItem *item = items.at(i);
LLViewerInventoryItem *linked_item = item ? item->getLinkedItem() : NULL;
LLUUID asset_id;
if (linked_item)
@@ -3585,13 +3586,13 @@ LLAppearanceMgr::~LLAppearanceMgr()
void LLAppearanceMgr::setAttachmentInvLinkEnable(bool val)
{
- LL_DEBUGS("Avatar") << "setAttachmentInvLinkEnable => " << (int) val << llendl;
+ LL_DEBUGS("Avatar") << "setAttachmentInvLinkEnable => " << (int) val << LL_ENDL;
mAttachmentInvLinkEnabled = val;
}
void dumpAttachmentSet(const std::set<LLUUID>& atts, const std::string& msg)
{
- llinfos << msg << llendl;
+ LL_INFOS() << msg << LL_ENDL;
for (std::set<LLUUID>::const_iterator it = atts.begin();
it != atts.end();
++it)
@@ -3599,11 +3600,11 @@ void dumpAttachmentSet(const std::set<LLUUID>& atts, const std::string& msg)
LLUUID item_id = *it;
LLViewerInventoryItem *item = gInventory.getItem(item_id);
if (item)
- llinfos << "atts " << item->getName() << llendl;
+ LL_INFOS() << "atts " << item->getName() << LL_ENDL;
else
- llinfos << "atts " << "UNKNOWN[" << item_id.asString() << "]" << llendl;
+ LL_INFOS() << "atts " << "UNKNOWN[" << item_id.asString() << "]" << LL_ENDL;
}
- llinfos << llendl;
+ LL_INFOS() << LL_ENDL;
}
void LLAppearanceMgr::registerAttachment(const LLUUID& item_id)
@@ -3619,7 +3620,7 @@ void LLAppearanceMgr::registerAttachment(const LLUUID& item_id)
}
else
{
- //llinfos << "no link changes, inv link not enabled" << llendl;
+ //LL_INFOS() << "no link changes, inv link not enabled" << LL_ENDL;
}
}
@@ -3633,7 +3634,7 @@ void LLAppearanceMgr::unregisterAttachment(const LLUUID& item_id)
}
else
{
- //llinfos << "no link changes, inv link not enabled" << llendl;
+ //LL_INFOS() << "no link changes, inv link not enabled" << LL_ENDL;
}
}
@@ -3699,8 +3700,8 @@ public:
}
virtual void done()
{
- llinfos << this << " done with incomplete " << mIncomplete.size()
- << " complete " << mComplete.size() << " calling callable" << llendl;
+ LL_INFOS() << this << " done with incomplete " << mIncomplete.size()
+ << " complete " << mComplete.size() << " calling callable" << LL_ENDL;
gInventory.removeObserver(this);
doOnIdleOneTime(mCallable);
@@ -3732,11 +3733,11 @@ public:
cat_array,
item_array,
LLInventoryModel::EXCLUDE_TRASH);
- S32 count = item_array.count();
+ S32 count = item_array.size();
if(!count)
{
- llwarns << "Nothing fetched in category " << mComplete.front()
- << llendl;
+ LL_WARNS() << "Nothing fetched in category " << mComplete.front()
+ << LL_ENDL;
gInventory.removeObserver(this);
doOnIdleOneTime(mCallable);
@@ -3744,11 +3745,11 @@ public:
return;
}
- llinfos << "stage1 got " << item_array.count() << " items, passing to stage2 " << llendl;
+ LL_INFOS() << "stage1 got " << item_array.size() << " items, passing to stage2 " << LL_ENDL;
uuid_vec_t ids;
for(S32 i = 0; i < count; ++i)
{
- ids.push_back(item_array.get(i)->getUUID());
+ ids.push_back(item_array.at(i)->getUUID());
}
gInventory.removeObserver(this);
diff --git a/indra/newview/llappearancemgr.h b/indra/newview/llappearancemgr.h
index 5ec80f1cf0..b5ef0bd935 100755
--- a/indra/newview/llappearancemgr.h
+++ b/indra/newview/llappearancemgr.h
@@ -34,6 +34,7 @@
#include "llinventorymodel.h"
#include "llinventoryobserver.h"
#include "llviewerinventory.h"
+#include "llhttpclient.h"
class LLWearableHoldingPattern;
class LLInventoryCallback;
diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp
index e3c89f1a5f..4936fee795 100755
--- a/indra/newview/llappviewer.cpp
+++ b/indra/newview/llappviewer.cpp
@@ -63,7 +63,8 @@
#include "llconversationlog.h"
#include "lldxhardware.h"
#include "lltexturestats.h"
-#include "lltexturestats.h"
+#include "lltrace.h"
+#include "lltracethreadrecorder.h"
#include "llviewerwindow.h"
#include "llviewerdisplay.h"
#include "llviewermedia.h"
@@ -94,10 +95,10 @@
#include "llvocache.h"
#include "llvopartgroup.h"
#include "llweb.h"
-#include "llsecondlifeurls.h"
#include "llupdaterservice.h"
#include "llfloatertexturefetchdebugger.h"
#include "llspellcheck.h"
+#include "llscenemonitor.h"
#include "llavatarrenderinfoaccountant.h"
// Linden library includes
@@ -299,12 +300,12 @@ U32 gFrameCount = 0;
U32 gForegroundFrameCount = 0; // number of frames that app window was in foreground
LLPumpIO* gServicePump = NULL;
-U64 gFrameTime = 0;
-F32 gFrameTimeSeconds = 0.f;
-F32 gFrameIntervalSeconds = 0.f;
+U64MicrosecondsImplicit gFrameTime = 0;
+F32SecondsImplicit gFrameTimeSeconds = 0.f;
+F32SecondsImplicit gFrameIntervalSeconds = 0.f;
F32 gFPSClamped = 10.f; // Pretend we start at target rate.
F32 gFrameDTClamped = 0.f; // Time between adjacent checks to network for packets
-U64 gStartTime = 0; // gStartTime is "private", used only to calculate gFrameTimeSeconds
+U64MicrosecondsImplicit gStartTime = 0; // gStartTime is "private", used only to calculate gFrameTimeSeconds
U32 gFrameStalls = 0;
const F64 FRAME_STALL_THRESHOLD = 1.0;
@@ -330,7 +331,7 @@ BOOL gUseWireframe = FALSE;
LLVFS* gStaticVFS = NULL;
LLMemoryInfo gSysMemory;
-U64 gMemoryAllocated = 0; // updated in display_stats() in llviewerdisplay.cpp
+U64Bytes gMemoryAllocated(0); // updated in display_stats() in llviewerdisplay.cpp
std::string gLastVersionChannel;
@@ -632,7 +633,7 @@ public:
while (!LLAppViewer::instance()->isQuitting())
{
- LLFastTimer::writeLog(os);
+ LLTrace::BlockTimer::writeLog(os);
os.flush();
ms_sleep(32);
}
@@ -665,8 +666,13 @@ LLTextureCache* LLAppViewer::sTextureCache = NULL;
LLImageDecodeThread* LLAppViewer::sImageDecodeThread = NULL;
LLTextureFetch* LLAppViewer::sTextureFetch = NULL;
-LLAppViewer::LLAppViewer() :
- mMarkerFile(),
+std::string getRuntime()
+{
+ return llformat("%.4f", (F32)LLTimer::getElapsedSeconds().value());
+}
+
+LLAppViewer::LLAppViewer()
+: mMarkerFile(),
mLogoutMarkerFile(),
mReportedCrash(false),
mNumSessions(0),
@@ -688,7 +694,7 @@ LLAppViewer::LLAppViewer() :
{
if(NULL != sInstance)
{
- llerrs << "Oh no! An instance of LLAppViewer already exists! LLAppViewer is sort of like a singleton." << llendl;
+ LL_ERRS() << "Oh no! An instance of LLAppViewer already exists! LLAppViewer is sort of like a singleton." << LL_ENDL;
}
setupErrorHandling();
@@ -730,9 +736,6 @@ bool LLAppViewer::init()
// into the log files during normal startup until AFTER
// we run the "program crashed last time" error handler below.
//
- LLFastTimer::reset();
-
-
#ifdef LL_DARWIN
mMainLoopInitialized = false;
#endif
@@ -757,7 +760,7 @@ bool LLAppViewer::init()
initLoggingAndGetLastDuration();
processMarkerFiles();
-
+
//
// OK to write stuff to logs now, we've now crash reported if necessary
//
@@ -1053,9 +1056,8 @@ bool LLAppViewer::init()
// get RAM data from XML
std::stringstream minRAMString(LLNotifications::instance().getGlobalString("UnsupportedRAMAmount"));
- U64 minRAM = 0;
+ U64Bytes minRAM;
minRAMString >> minRAM;
- minRAM = minRAM * 1024 * 1024;
if(!LLFeatureManager::getInstance()->isGPUSupported() && LLFeatureManager::getInstance()->getGPUClass() != GPU_CLASS_UNKNOWN)
{
@@ -1209,7 +1211,7 @@ void LLAppViewer::initMaxHeapSize()
//currently SL is built under 32-bit setting, we set its max heap size no more than 1.6 GB.
//F32 max_heap_size_gb = llmin(1.6f, (F32)gSavedSettings.getF32("MaxHeapSize")) ;
- F32 max_heap_size_gb = gSavedSettings.getF32("MaxHeapSize") ;
+ F32Gigabytes max_heap_size_gb = (F32Gigabytes)gSavedSettings.getF32("MaxHeapSize") ;
BOOL enable_mem_failure_prevention = (BOOL)gSavedSettings.getBOOL("MemoryFailurePreventionEnabled") ;
LLMemory::initMaxHeapSizeGB(max_heap_size_gb, enable_mem_failure_prevention) ;
@@ -1232,8 +1234,8 @@ void LLAppViewer::checkMemory()
}
mMemCheckTimer.reset() ;
- //update the availability of memory
- LLMemory::updateMemoryInfo() ;
+ //update the availability of memory
+ LLMemory::updateMemoryInfo() ;
bool is_low = LLMemory::isMemoryPoolLow() ;
@@ -1245,24 +1247,25 @@ void LLAppViewer::checkMemory()
}
}
-static LLFastTimer::DeclareTimer FTM_MESSAGES("System Messages");
-static LLFastTimer::DeclareTimer FTM_SLEEP("Sleep");
-static LLFastTimer::DeclareTimer FTM_YIELD("Yield");
-
-static LLFastTimer::DeclareTimer FTM_TEXTURE_CACHE("Texture Cache");
-static LLFastTimer::DeclareTimer FTM_DECODE("Image Decode");
-static LLFastTimer::DeclareTimer FTM_VFS("VFS Thread");
-static LLFastTimer::DeclareTimer FTM_LFS("LFS Thread");
-static LLFastTimer::DeclareTimer FTM_PAUSE_THREADS("Pause Threads");
-static LLFastTimer::DeclareTimer FTM_IDLE("Idle");
-static LLFastTimer::DeclareTimer FTM_PUMP("Pump");
-static LLFastTimer::DeclareTimer FTM_PUMP_ARES("Ares");
-static LLFastTimer::DeclareTimer FTM_PUMP_SERVICE("Service");
-static LLFastTimer::DeclareTimer FTM_SERVICE_CALLBACK("Callback");
-static LLFastTimer::DeclareTimer FTM_AGENT_AUTOPILOT("Autopilot");
-static LLFastTimer::DeclareTimer FTM_AGENT_UPDATE("Update");
-
-LLFastTimer::DeclareTimer FTM_FRAME("Frame", true);
+static LLTrace::BlockTimerStatHandle FTM_MESSAGES("System Messages");
+static LLTrace::BlockTimerStatHandle FTM_SLEEP("Sleep");
+static LLTrace::BlockTimerStatHandle FTM_YIELD("Yield");
+
+static LLTrace::BlockTimerStatHandle FTM_TEXTURE_CACHE("Texture Cache");
+static LLTrace::BlockTimerStatHandle FTM_DECODE("Image Decode");
+static LLTrace::BlockTimerStatHandle FTM_VFS("VFS Thread");
+static LLTrace::BlockTimerStatHandle FTM_LFS("LFS Thread");
+static LLTrace::BlockTimerStatHandle FTM_PAUSE_THREADS("Pause Threads");
+static LLTrace::BlockTimerStatHandle FTM_IDLE("Idle");
+static LLTrace::BlockTimerStatHandle FTM_PUMP("Pump");
+static LLTrace::BlockTimerStatHandle FTM_PUMP_ARES("Ares");
+static LLTrace::BlockTimerStatHandle FTM_PUMP_SERVICE("Service");
+static LLTrace::BlockTimerStatHandle FTM_SERVICE_CALLBACK("Callback");
+static LLTrace::BlockTimerStatHandle FTM_AGENT_AUTOPILOT("Autopilot");
+static LLTrace::BlockTimerStatHandle FTM_AGENT_UPDATE("Update");
+
+// externally visible timers
+LLTrace::BlockTimerStatHandle FTM_FRAME("Frame");
bool LLAppViewer::mainLoop()
{
@@ -1270,6 +1273,7 @@ bool LLAppViewer::mainLoop()
if (!mMainLoopInitialized)
#endif
{
+ LL_INFOS() << "Entering main_loop" << LL_ENDL;
mMainloopTimeout = new LLWatchdogTimeout();
//-------------------------------------------
@@ -1318,11 +1322,15 @@ bool LLAppViewer::mainLoop()
while (!LLApp::isExiting())
#endif
{
- LLFastTimer _(FTM_FRAME);
- LLFastTimer::nextFrame();
+ LL_RECORD_BLOCK_TIME(FTM_FRAME);
+ LLTrace::BlockTimer::processTimes();
+ LLTrace::get_frame_recording().nextPeriod();
+ LLTrace::BlockTimer::logStats();
+
+ LLTrace::get_thread_recorder()->pullFromChildren();
//clear call stack records
- llclearcallstacks;
+ LL_CLEAR_CALLSTACKS();
//check memory availability information
checkMemory() ;
@@ -1333,7 +1341,7 @@ bool LLAppViewer::mainLoop()
if (gViewerWindow)
{
- LLFastTimer t2(FTM_MESSAGES);
+ LL_RECORD_BLOCK_TIME(FTM_MESSAGES);
gViewerWindow->getWindow()->processMiscNativeEvents();
}
@@ -1341,10 +1349,10 @@ bool LLAppViewer::mainLoop()
if (gViewerWindow)
{
- LLFastTimer t2(FTM_MESSAGES);
+ LL_RECORD_BLOCK_TIME(FTM_MESSAGES);
if (!restoreErrorTrap())
{
- llwarns << " Someone took over my signal/exception handler (post messagehandling)!" << llendl;
+ LL_WARNS() << " Someone took over my signal/exception handler (post messagehandling)!" << LL_ENDL;
}
gViewerWindow->getWindow()->gatherInput();
@@ -1391,24 +1399,24 @@ bool LLAppViewer::mainLoop()
{
pauseMainloopTimeout(); // *TODO: Remove. Messages shouldn't be stalling for 20+ seconds!
- LLFastTimer t3(FTM_IDLE);
+ LL_RECORD_BLOCK_TIME(FTM_IDLE);
idle();
if (gAres != NULL && gAres->isInitialized())
{
pingMainloopTimeout("Main:ServicePump");
- LLFastTimer t4(FTM_PUMP);
+ LL_RECORD_BLOCK_TIME(FTM_PUMP);
{
- LLFastTimer t(FTM_PUMP_ARES);
+ LL_RECORD_BLOCK_TIME(FTM_PUMP_ARES);
gAres->process();
}
{
- LLFastTimer t(FTM_PUMP_SERVICE);
+ LL_RECORD_BLOCK_TIME(FTM_PUMP_SERVICE);
// this pump is necessary to make the login screen show up
gServicePump->pump();
{
- LLFastTimer t(FTM_SERVICE_CALLBACK);
+ LL_RECORD_BLOCK_TIME(FTM_SERVICE_CALLBACK);
gServicePump->callback();
}
}
@@ -1436,7 +1444,6 @@ bool LLAppViewer::mainLoop()
LLFloaterSnapshot::update(); // take snapshots
gGLActive = FALSE;
}
-
}
pingMainloopTimeout("Main:Sleep");
@@ -1445,12 +1452,12 @@ bool LLAppViewer::mainLoop()
// Sleep and run background threads
{
- LLFastTimer t2(FTM_SLEEP);
+ LL_RECORD_BLOCK_TIME(FTM_SLEEP);
// yield some time to the os based on command line option
if(mYieldTime >= 0)
{
- LLFastTimer t(FTM_YIELD);
+ LL_RECORD_BLOCK_TIME(FTM_YIELD);
ms_sleep(mYieldTime);
}
@@ -1479,11 +1486,11 @@ bool LLAppViewer::mainLoop()
if (mPeriodicSlowFrame
&& (gFrameCount % 10 == 0))
{
- llinfos << "Periodic slow frame - sleeping 500 ms" << llendl;
+ LL_INFOS() << "Periodic slow frame - sleeping 500 ms" << LL_ENDL;
ms_sleep(500);
}
- const F64 max_idle_time = llmin(.005*10.0*gFrameTimeSeconds, 0.005); // 5 ms a second
+ const F64Milliseconds max_idle_time = llmin(.005f*10.f*(F32Milliseconds)gFrameTimeSeconds, F32Milliseconds(5)); // 5 ms a second
idleTimer.reset();
S32 total_work_pending = 0;
S32 total_io_pending = 0;
@@ -1491,27 +1498,16 @@ bool LLAppViewer::mainLoop()
{
S32 work_pending = 0;
S32 io_pending = 0;
- F32 max_time = llmin(gFrameIntervalSeconds*10.f, 1.f);
+ F32 max_time = llmin(gFrameIntervalSeconds.value() *10.f, 1.f);
- {
- LLFastTimer ftm(FTM_TEXTURE_CACHE);
- work_pending += LLAppViewer::getTextureCache()->update(max_time); // unpauses the texture cache thread
- }
- {
- LLFastTimer ftm(FTM_DECODE);
- work_pending += LLAppViewer::getImageDecodeThread()->update(max_time); // unpauses the image thread
- }
- {
- LLFastTimer ftm(FTM_DECODE);
- work_pending += LLAppViewer::getTextureFetch()->update(max_time); // unpauses the texture fetch thread
- }
+ work_pending += updateTextureThreads(max_time);
{
- LLFastTimer ftm(FTM_VFS);
+ LL_RECORD_BLOCK_TIME(FTM_VFS);
io_pending += LLVFSThread::updateClass(1);
}
{
- LLFastTimer ftm(FTM_LFS);
+ LL_RECORD_BLOCK_TIME(FTM_LFS);
io_pending += LLLFSThread::updateClass(1);
}
@@ -1580,14 +1576,14 @@ bool LLAppViewer::mainLoop()
if(mem_leak_instance)
{
mem_leak_instance->stop() ;
- llwarns << "Bad memory allocation in LLAppViewer::mainLoop()!" << llendl ;
+ LL_WARNS() << "Bad memory allocation in LLAppViewer::mainLoop()!" << LL_ENDL ;
}
else
{
//output possible call stacks to log file.
LLError::LLCallStacks::print() ;
- llerrs << "Bad memory allocation in LLAppViewer::mainLoop()!" << llendl ;
+ LL_ERRS() << "Bad memory allocation in LLAppViewer::mainLoop()!" << LL_ENDL ;
}
}
}
@@ -1603,7 +1599,7 @@ bool LLAppViewer::mainLoop()
}
catch(std::bad_alloc)
{
- llwarns << "Bad memory allocation when saveFinalSnapshot() is called!" << llendl ;
+ LL_WARNS() << "Bad memory allocation when saveFinalSnapshot() is called!" << LL_ENDL ;
//stop memory leaking simulation
LLFloaterMemLeak* mem_leak_instance =
@@ -1619,12 +1615,30 @@ bool LLAppViewer::mainLoop()
destroyMainloopTimeout();
- llinfos << "Exiting main_loop" << llendflush;
+ LL_INFOS() << "Exiting main_loop" << LL_ENDL;
}
return LLApp::isExiting();
}
+S32 LLAppViewer::updateTextureThreads(F32 max_time)
+{
+ S32 work_pending = 0;
+ {
+ LL_RECORD_BLOCK_TIME(FTM_TEXTURE_CACHE);
+ work_pending += LLAppViewer::getTextureCache()->update(max_time); // unpauses the texture cache thread
+ }
+ {
+ LL_RECORD_BLOCK_TIME(FTM_DECODE);
+ work_pending += LLAppViewer::getImageDecodeThread()->update(max_time); // unpauses the image thread
+ }
+ {
+ LL_RECORD_BLOCK_TIME(FTM_DECODE);
+ work_pending += LLAppViewer::getTextureFetch()->update(max_time); // unpauses the texture fetch thread
+ }
+ return work_pending;
+}
+
void LLAppViewer::flushVFSIO()
{
while (1)
@@ -1635,7 +1649,7 @@ void LLAppViewer::flushVFSIO()
{
break;
}
- llinfos << "Waiting for pending IO to finish: " << pending << llendflush;
+ LL_INFOS() << "Waiting for pending IO to finish: " << pending << LL_ENDL;
ms_sleep(100);
}
}
@@ -1650,12 +1664,15 @@ bool LLAppViewer::cleanup()
// workaround for DEV-35406 crash on shutdown
LLEventPumps::instance().reset();
+ //dump scene loading monitor results
+ LLSceneMonitor::instance().dumpToFile(gDirUtilp->getExpandedFilename(LL_PATH_LOGS, "scene_monitor_results.csv"));
+
if (LLFastTimerView::sAnalyzePerformance)
{
- llinfos << "Analyzing performance" << llendl;
- std::string baseline_name = LLFastTimer::sLogName + "_baseline.slp";
- std::string current_name = LLFastTimer::sLogName + ".slp";
- std::string report_name = LLFastTimer::sLogName + "_report.csv";
+ LL_INFOS() << "Analyzing performance" << LL_ENDL;
+ std::string baseline_name = LLTrace::BlockTimer::sLogName + "_baseline.slp";
+ std::string current_name = LLTrace::BlockTimer::sLogName + ".slp";
+ std::string report_name = LLTrace::BlockTimer::sLogName + "_report.csv";
LLFastTimerView::doAnalysis(
gDirUtilp->getExpandedFilename(LL_PATH_LOGS, baseline_name),
@@ -1698,7 +1715,7 @@ bool LLAppViewer::cleanup()
disconnectViewer();
- llinfos << "Viewer disconnected" << llendflush;
+ LL_INFOS() << "Viewer disconnected" << LL_ENDL;
display_cleanup();
@@ -1706,7 +1723,7 @@ bool LLAppViewer::cleanup()
LLError::logToFixedBuffer(NULL);
- llinfos << "Cleaning Up" << llendflush;
+ LL_INFOS() << "Cleaning Up" << LL_ENDL;
// shut down mesh streamer
gMeshRepo.shutdown();
@@ -1721,7 +1738,7 @@ bool LLAppViewer::cleanup()
LLHUDObject::updateAll();
LLHUDManager::getInstance()->cleanupEffects();
LLHUDObject::cleanupHUDObjects();
- llinfos << "HUD Objects cleaned up" << llendflush;
+ LL_INFOS() << "HUD Objects cleaned up" << LL_ENDL;
}
LLKeyframeDataCache::clear();
@@ -1752,7 +1769,7 @@ bool LLAppViewer::cleanup()
LLCalc::cleanUp();
- llinfos << "Global stuff deleted" << llendflush;
+ LL_INFOS() << "Global stuff deleted" << LL_ENDL;
if (gAudiop)
{
@@ -1763,7 +1780,7 @@ bool LLAppViewer::cleanup()
gAudiop->setStreamingAudioImpl(NULL);
// shut down the audio subsystem
- gAudiop->shutdown();
+ gAudiop->shutdown();
delete gAudiop;
gAudiop = NULL;
@@ -1776,7 +1793,7 @@ bool LLAppViewer::cleanup()
// such that we can suck rectangle information out of
// it.
cleanupSavedSettings();
- llinfos << "Settings patched up" << llendflush;
+ LL_INFOS() << "Settings patched up" << LL_ENDL;
// delete some of the files left around in the cache.
removeCacheFiles("*.wav");
@@ -1787,29 +1804,29 @@ bool LLAppViewer::cleanup()
removeCacheFiles("*.bodypart");
removeCacheFiles("*.clothing");
- llinfos << "Cache files removed" << llendflush;
+ LL_INFOS() << "Cache files removed" << LL_ENDL;
// Wait for any pending VFS IO
flushVFSIO();
- llinfos << "Shutting down Views" << llendflush;
+ LL_INFOS() << "Shutting down Views" << LL_ENDL;
// Destroy the UI
if( gViewerWindow)
gViewerWindow->shutdownViews();
- llinfos << "Cleaning up Inventory" << llendflush;
+ LL_INFOS() << "Cleaning up Inventory" << LL_ENDL;
// Cleanup Inventory after the UI since it will delete any remaining observers
// (Deleted observers should have already removed themselves)
gInventory.cleanupInventory();
- llinfos << "Cleaning up Selections" << llendflush;
+ LL_INFOS() << "Cleaning up Selections" << LL_ENDL;
// Clean up selection managers after UI is destroyed, as UI may be observing them.
// Clean up before GL is shut down because we might be holding on to objects with texture references
LLSelectMgr::cleanupGlobals();
- llinfos << "Shutting down OpenGL" << llendflush;
+ LL_INFOS() << "Shutting down OpenGL" << LL_ENDL;
// Shut down OpenGL
if( gViewerWindow)
@@ -1821,10 +1838,10 @@ bool LLAppViewer::cleanup()
// Therefore must do this before destroying the message system.
delete gViewerWindow;
gViewerWindow = NULL;
- llinfos << "ViewerWindow deleted" << llendflush;
+ LL_INFOS() << "ViewerWindow deleted" << LL_ENDL;
}
- llinfos << "Cleaning up Keyboard & Joystick" << llendflush;
+ LL_INFOS() << "Cleaning up Keyboard & Joystick" << LL_ENDL;
// viewer UI relies on keyboard so keep it aound until viewer UI isa gone
delete gKeyboard;
@@ -1833,7 +1850,7 @@ bool LLAppViewer::cleanup()
// Turn off Space Navigator and similar devices
LLViewerJoystick::getInstance()->terminate();
- llinfos << "Cleaning up Objects" << llendflush;
+ LL_INFOS() << "Cleaning up Objects" << LL_ENDL;
LLViewerObject::cleanupVOClasses();
@@ -1855,11 +1872,11 @@ bool LLAppViewer::cleanup()
LLVolumeMgr* volume_manager = LLPrimitive::getVolumeManager();
if (!volume_manager->cleanup())
{
- llwarns << "Remaining references in the volume manager!" << llendflush;
+ LL_WARNS() << "Remaining references in the volume manager!" << LL_ENDL;
}
LLPrimitive::cleanupVolumeManager();
- llinfos << "Additional Cleanup..." << llendflush;
+ LL_INFOS() << "Additional Cleanup..." << LL_ENDL;
LLViewerParcelMgr::cleanupGlobals();
@@ -1880,10 +1897,10 @@ bool LLAppViewer::cleanup()
// Also after shutting down the messaging system since it has VFS dependencies
//
- llinfos << "Cleaning up VFS" << llendflush;
+ LL_INFOS() << "Cleaning up VFS" << LL_ENDL;
LLVFile::cleanupClass();
- llinfos << "Saving Data" << llendflush;
+ LL_INFOS() << "Saving Data" << LL_ENDL;
// Store the time of our current logoff
gSavedPerAccountSettings.setU32("LastLogoff", time_corrected());
@@ -1898,19 +1915,19 @@ bool LLAppViewer::cleanup()
// *FIX:Mani This should get really saved in a "logoff" mode.
if (gSavedSettings.getString("PerAccountSettingsFile").empty())
{
- llinfos << "Not saving per-account settings; don't know the account name yet." << llendl;
+ LL_INFOS() << "Not saving per-account settings; don't know the account name yet." << LL_ENDL;
}
// Only save per account settings if the previous login succeeded, otherwise
// we might end up with a cleared out settings file in case a previous login
// failed after loading per account settings.
else if (!mSavePerAccountSettings)
{
- llinfos << "Not saving per-account settings; last login was not successful." << llendl;
+ LL_INFOS() << "Not saving per-account settings; last login was not successful." << LL_ENDL;
}
else
{
gSavedPerAccountSettings.saveToFile(gSavedSettings.getString("PerAccountSettingsFile"), TRUE);
- llinfos << "Saved settings" << llendflush;
+ LL_INFOS() << "Saved settings" << LL_ENDL;
}
std::string warnings_settings_filename = gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS, getSettingsFilename("Default", "Warnings"));
@@ -1927,7 +1944,7 @@ bool LLAppViewer::cleanup()
if (mPurgeOnExit)
{
- llinfos << "Purging all cache files on exit" << llendflush;
+ LL_INFOS() << "Purging all cache files on exit" << LL_ENDL;
gDirUtilp->deleteFilesInDir(gDirUtilp->getExpandedFilename(LL_PATH_CACHE,""), "*.*");
}
@@ -1944,7 +1961,7 @@ bool LLAppViewer::cleanup()
// Stop the plugin read thread if it's running.
LLPluginProcessParent::setUseReadThread(false);
- llinfos << "Shutting down Threads" << llendflush;
+ LL_INFOS() << "Shutting down Threads" << LL_ENDL;
// Let threads finish
LLTimer idleTimer;
@@ -1966,7 +1983,7 @@ bool LLAppViewer::cleanup()
}
else if(idle_time >= max_idle_time)
{
- llwarns << "Quitting with pending background tasks." << llendl;
+ LL_WARNS() << "Quitting with pending background tasks." << LL_ENDL;
break;
}
}
@@ -1982,7 +1999,7 @@ bool LLAppViewer::cleanup()
sTextureFetch->shutDownTextureCacheThread() ;
sTextureFetch->shutDownImageDecodeThread() ;
- llinfos << "Shutting down message system" << llendflush;
+ LL_INFOS() << "Shutting down message system" << LL_ENDL;
end_messaging_system();
// *NOTE:Mani - The following call is not thread safe.
@@ -2007,11 +2024,11 @@ bool LLAppViewer::cleanup()
if (LLFastTimerView::sAnalyzePerformance)
{
- llinfos << "Analyzing performance" << llendl;
+ LL_INFOS() << "Analyzing performance" << LL_ENDL;
- std::string baseline_name = LLFastTimer::sLogName + "_baseline.slp";
- std::string current_name = LLFastTimer::sLogName + ".slp";
- std::string report_name = LLFastTimer::sLogName + "_report.csv";
+ std::string baseline_name = LLTrace::BlockTimer::sLogName + "_baseline.slp";
+ std::string current_name = LLTrace::BlockTimer::sLogName + ".slp";
+ std::string report_name = LLTrace::BlockTimer::sLogName + "_report.csv";
LLFastTimerView::doAnalysis(
gDirUtilp->getExpandedFilename(LL_PATH_LOGS, baseline_name),
@@ -2021,7 +2038,7 @@ bool LLAppViewer::cleanup()
LLMetricPerformanceTesterBasic::cleanClass() ;
- llinfos << "Cleaning up Media and Textures" << llendflush;
+ LL_INFOS() << "Cleaning up Media and Textures" << LL_ENDL;
//Note:
//LLViewerMedia::cleanupClass() has to be put before gTextureList.shutdown()
@@ -2037,14 +2054,14 @@ bool LLAppViewer::cleanup()
LLLFSThread::cleanupClass();
#ifndef LL_RELEASE_FOR_DOWNLOAD
- llinfos << "Auditing VFS" << llendl;
+ LL_INFOS() << "Auditing VFS" << LL_ENDL;
if(gVFS)
{
gVFS->audit();
}
#endif
- llinfos << "Misc Cleanup" << llendflush;
+ LL_INFOS() << "Misc Cleanup" << LL_ENDL;
// For safety, the LLVFS has to be deleted *after* LLVFSThread. This should be cleaned up.
// (LLVFS doesn't know about LLVFSThread so can't kill pending requests) -Steve
@@ -2064,7 +2081,7 @@ bool LLAppViewer::cleanup()
// is at the right resolution before we launch IE.
if (!gLaunchFileOnQuit.empty())
{
- llinfos << "Launch file on quit." << llendflush;
+ LL_INFOS() << "Launch file on quit." << LL_ENDL;
#if LL_WINDOWS
// Indicate an application is starting.
SetCursor(LoadCursor(NULL, IDC_WAIT));
@@ -2074,9 +2091,9 @@ bool LLAppViewer::cleanup()
ms_sleep(1000);
LLWeb::loadURLExternal( gLaunchFileOnQuit, false );
- llinfos << "File launched." << llendflush;
+ LL_INFOS() << "File launched." << LL_ENDL;
}
- llinfos << "Cleaning up LLProxy." << llendl;
+ LL_INFOS() << "Cleaning up LLProxy." << LL_ENDL;
LLProxy::cleanupClass();
LLWearableType::cleanupClass();
@@ -2088,15 +2105,13 @@ bool LLAppViewer::cleanup()
ll_close_fail_log();
- MEM_TRACK_RELEASE
-
- llinfos << "Goodbye!" << llendflush;
+ LL_INFOS() << "Goodbye!" << LL_ENDL;
// return 0;
return true;
}
-// A callback for llerrs to call during the watchdog error.
+// A callback for LL_ERRS() to call during the watchdog error.
void watchdog_llerrs_callback(const std::string &error_string)
{
gLLErrorActivated = true;
@@ -2112,16 +2127,12 @@ void watchdog_llerrs_callback(const std::string &error_string)
void watchdog_killer_callback()
{
LLError::setFatalFunction(watchdog_llerrs_callback);
- llerrs << "Watchdog killer event" << llendl;
+ LL_ERRS() << "Watchdog killer event" << LL_ENDL;
}
bool LLAppViewer::initThreads()
{
-#if MEM_TRACK_MEM
- static const bool enable_threads = false;
-#else
static const bool enable_threads = true;
-#endif
LLImage::initClass(gSavedSettings.getBOOL("TextureNewByteRange"),gSavedSettings.getS32("TextureReverseByteRange"));
@@ -2136,10 +2147,10 @@ bool LLAppViewer::initThreads()
enable_threads && true,
app_metrics_qa_mode);
- if (LLFastTimer::sLog || LLFastTimer::sMetricLog)
+ if (LLTrace::BlockTimer::sLog || LLTrace::BlockTimer::sMetricLog)
{
- LLFastTimer::sLogLock = new LLMutex(NULL);
- mFastTimerLogThread = new LLFastTimerLogThread(LLFastTimer::sLogName);
+ LLTrace::BlockTimer::setLogLock(new LLMutex(NULL));
+ mFastTimerLogThread = new LLFastTimerLogThread(LLTrace::BlockTimer::sLogName);
mFastTimerLogThread->start();
}
@@ -2172,6 +2183,7 @@ void LLAppViewer::initLoggingAndGetLastDuration()
LLError::initForApplication(
gDirUtilp->getExpandedFilename(LL_PATH_APP_SETTINGS, ""));
LLError::setFatalFunction(errorCallback);
+ //LLError::setTimeFunction(getRuntime);
// Remove the last ".old" log file.
std::string old_log_file = gDirUtilp->getExpandedFilename(LL_PATH_LOGS,
@@ -2240,7 +2252,7 @@ bool LLAppViewer::loadSettingsFromDirectory(const std::string& location_key,
{
if (!mSettingsLocationList)
{
- llerrs << "Invalid settings location list" << llendl;
+ LL_ERRS() << "Invalid settings location list" << LL_ENDL;
}
BOOST_FOREACH(const SettingsGroup& group, mSettingsLocationList->groups)
@@ -2251,7 +2263,7 @@ bool LLAppViewer::loadSettingsFromDirectory(const std::string& location_key,
ELLPath path_index = (ELLPath)group.path_index();
if(path_index <= LL_PATH_NONE || path_index >= LL_PATH_LAST)
{
- llerrs << "Out of range path index in app_settings/settings_files.xml" << llendl;
+ LL_ERRS() << "Out of range path index in app_settings/settings_files.xml" << LL_ENDL;
return false;
}
@@ -2298,7 +2310,7 @@ bool LLAppViewer::loadSettingsFromDirectory(const std::string& location_key,
{ // failed to load
if(file.required)
{
- llerrs << "Error: Cannot load required settings file from: " << full_settings_path << llendl;
+ LL_ERRS() << "Error: Cannot load required settings file from: " << full_settings_path << LL_ENDL;
return false;
}
else
@@ -2345,9 +2357,9 @@ namespace
{
void handleCommandLineError(LLControlGroupCLP& clp)
{
- llwarns << "Error parsing command line options. Command Line options ignored." << llendl;
+ LL_WARNS() << "Error parsing command line options. Command Line options ignored." << LL_ENDL;
- llinfos << "Command line usage:\n" << clp << llendl;
+ LL_INFOS() << "Command line usage:\n" << clp << LL_ENDL;
OSMessageBox(STRINGIZE(LLTrans::getString("MBCmdLineError") << clp.getErrorMessage()),
LLStringUtil::null,
@@ -2363,7 +2375,7 @@ bool LLAppViewer::initConfiguration()
BOOL success = LLXMLNode::parseFile(settings_file_list, root, NULL);
if (!success)
{
- llerrs << "Cannot load default configuration file " << settings_file_list << llendl;
+ LL_ERRS() << "Cannot load default configuration file " << settings_file_list << LL_ENDL;
}
mSettingsLocationList = new SettingsFiles();
@@ -2373,7 +2385,7 @@ bool LLAppViewer::initConfiguration()
if (!mSettingsLocationList->validateBlock())
{
- llerrs << "Invalid settings file list " << settings_file_list << llendl;
+ LL_ERRS() << "Invalid settings file list " << settings_file_list << LL_ENDL;
}
// The settings and command line parsing have a fragile
@@ -2509,7 +2521,7 @@ bool LLAppViewer::initConfiguration()
// ASAP or we might miss init issue etc.
if(gSavedSettings.getBOOL("DisableCrashLogger"))
{
- llwarns << "Crashes will be handled by system, stack trace logs and crash logger are both disabled" << llendl;
+ LL_WARNS() << "Crashes will be handled by system, stack trace logs and crash logger are both disabled" << LL_ENDL;
LLAppViewer::instance()->disableCrashlogger();
}
@@ -2524,7 +2536,7 @@ bool LLAppViewer::initConfiguration()
{
std::ostringstream msg;
msg << LLTrans::getString("MBCmdLineUsg") << "\n" << clp;
- llinfos << msg.str() << llendl;
+ LL_INFOS() << msg.str() << LL_ENDL;
OSMessageBox(
msg.str().c_str(),
@@ -2539,7 +2551,7 @@ bool LLAppViewer::initConfiguration()
const LLCommandLineParser::token_vector_t& set_values = clp.getOption("set");
if(0x1 & set_values.size())
{
- llwarns << "Invalid '--set' parameter count." << llendl;
+ LL_WARNS() << "Invalid '--set' parameter count." << LL_ENDL;
}
else
{
@@ -2558,13 +2570,13 @@ bool LLAppViewer::initConfiguration()
{
group_part = name.substr(0, pos);
name_part = name.substr(pos+1);
- llinfos << "Setting " << group_part << "." << name_part << " to " << value << llendl;
+ LL_INFOS() << "Setting " << group_part << "." << name_part << " to " << value << LL_ENDL;
LLControlGroup* g = LLControlGroup::getInstance(group_part);
if (g) control = g->getControl(name_part);
}
else
{
- llinfos << "Setting Global." << name << " to " << value << llendl;
+ LL_INFOS() << "Setting Global." << name << " to " << value << LL_ENDL;
control = gSavedSettings.getControl(name);
}
@@ -2574,11 +2586,11 @@ bool LLAppViewer::initConfiguration()
}
else
{
- llwarns << "Failed --set " << name << ": setting name unknown." << llendl;
- }
+ LL_WARNS() << "Failed --set " << name << ": setting name unknown." << LL_ENDL;
}
}
}
+ }
if (clp.hasOption("logevents")) {
LLViewerEventRecorder::instance().setEventLoggingOn();
@@ -2586,7 +2598,7 @@ bool LLAppViewer::initConfiguration()
std::string CmdLineChannel(gSavedSettings.getString("CmdLineChannel"));
if(! CmdLineChannel.empty())
- {
+ {
LLVersionInfo::resetChannel(CmdLineChannel);
}
@@ -2595,19 +2607,19 @@ bool LLAppViewer::initConfiguration()
if (gSavedSettings.getBOOL("LogPerformance"))
{
- LLFastTimer::sLog = TRUE;
- LLFastTimer::sLogName = std::string("performance");
+ LLTrace::BlockTimer::sLog = true;
+ LLTrace::BlockTimer::sLogName = std::string("performance");
}
-
+
std::string test_name(gSavedSettings.getString("LogMetrics"));
if (! test_name.empty())
- {
- LLFastTimer::sMetricLog = TRUE ;
+ {
+ LLTrace::BlockTimer::sMetricLog = TRUE;
// '--logmetrics' is specified with a named test metric argument so the data gathering is done only on that test
// In the absence of argument, every metric would be gathered (makes for a rather slow run and hard to decipher report...)
- llinfos << "'--logmetrics' argument : " << test_name << llendl;
- LLFastTimer::sLogName = test_name;
- }
+ LL_INFOS() << "'--logmetrics' argument : " << test_name << LL_ENDL;
+ LLTrace::BlockTimer::sLogName = test_name;
+ }
if (clp.hasOption("graphicslevel"))
{
@@ -2616,14 +2628,14 @@ bool LLAppViewer::initConfiguration()
// that value for validity.
U32 graphicslevel = gSavedSettings.getU32("RenderQualityPerformance");
if (LLFeatureManager::instance().isValidGraphicsLevel(graphicslevel))
- {
+ {
// graphicslevel is valid: save it and engage it later. Capture
// the requested value separately from the settings variable
// because, if this is the first run, LLViewerWindow's constructor
// will call LLFeatureManager::applyRecommendedSettings(), which
// overwrites this settings variable!
mForceGraphicsLevel = graphicslevel;
- }
+ }
}
LLFastTimerView::sAnalyzePerformance = gSavedSettings.getBOOL("AnalyzePerformance");
@@ -2654,32 +2666,47 @@ bool LLAppViewer::initConfiguration()
// What can happen is that someone can use IE (or potentially
// other browsers) and do the rough equivalent of command
// injection and steal passwords. Phoenix. SL-55321
- LLSLURL start_slurl;
- std::string CmdLineLoginLocation(gSavedSettings.getString("CmdLineLoginLocation"));
- if(! CmdLineLoginLocation.empty())
+
+ std::string starting_location;
+
+ std::string cmd_line_login_location(gSavedSettings.getString("CmdLineLoginLocation"));
+ if(! cmd_line_login_location.empty())
{
- start_slurl = CmdLineLoginLocation;
- LLStartUp::setStartSLURL(start_slurl);
- if(start_slurl.getType() == LLSLURL::LOCATION)
+ starting_location = cmd_line_login_location;
+ }
+ else
{
- LLGridManager::getInstance()->setGridChoice(start_slurl.getGrid());
+ std::string default_login_location(gSavedSettings.getString("DefaultLoginLocation"));
+ if (! default_login_location.empty())
+ {
+ starting_location = default_login_location;
}
}
+ if (! starting_location.empty())
+ {
+ LLSLURL start_slurl(starting_location);
+ LLStartUp::setStartSLURL(start_slurl);
+ if(start_slurl.getType() == LLSLURL::LOCATION)
+ {
+ LLGridManager::getInstance()->setGridChoice(start_slurl.getGrid());
+ }
+ }
+
//RN: if we received a URL, hand it off to the existing instance.
// don't call anotherInstanceRunning() when doing URL handoff, as
// it relies on checking a marker file which will not work when running
// out of different directories
- if (start_slurl.isValid() &&
+ if (LLStartUp::getStartSLURL().isValid() &&
(gSavedSettings.getBOOL("SLURLPassToOtherInstance")))
{
- if (sendURLToOtherInstance(start_slurl.getSLURLString()))
- {
+ if (sendURLToOtherInstance(LLStartUp::getStartSLURL().getSLURLString()))
+ {
// successfully handed off URL to existing instance, exit
return false;
}
- }
+ }
const LLControlVariable* skinfolder = gSavedSettings.getControl("SkinCurrent");
if(skinfolder && LLStringUtil::null != skinfolder->getValue().asString())
@@ -2714,7 +2741,7 @@ bool LLAppViewer::initConfiguration()
// if (!skin_def_tree.parseFile(skin_def_file))
// {
- // llerrs << "Failed to parse skin definition." << llendl;
+ // LL_ERRS() << "Failed to parse skin definition." << LL_ENDL;
// }
//}
@@ -2903,10 +2930,10 @@ namespace {
void apply_update_callback(LLSD const & notification, LLSD const & response)
{
- lldebugs << "LLUpdate user response: " << response << llendl;
+ LL_DEBUGS() << "LLUpdate user response: " << response << LL_ENDL;
if(response["OK_okcancelbuttons"].asBoolean())
{
- llinfos << "LLUpdate restarting viewer" << llendl;
+ LL_INFOS() << "LLUpdate restarting viewer" << LL_ENDL;
static const bool install_if_ready = true;
// *HACK - this lets us launch the installer immediately for now
LLUpdaterService().startChecking(install_if_ready);
@@ -2915,7 +2942,7 @@ namespace {
void apply_update_ok_callback(LLSD const & notification, LLSD const & response)
{
- llinfos << "LLUpdate restarting viewer" << llendl;
+ LL_INFOS() << "LLUpdate restarting viewer" << LL_ENDL;
static const bool install_if_ready = true;
// *HACK - this lets us launch the installer immediately for now
LLUpdaterService().startChecking(install_if_ready);
@@ -2996,26 +3023,26 @@ namespace {
{
LL_WARNS("UpdaterService") << "no info url supplied - defaulting to hard coded release notes pattern" << LL_ENDL;
- // truncate version at the rightmost '.'
- std::string version_short(data["version"]);
- size_t short_length = version_short.rfind('.');
- if (short_length != std::string::npos)
- {
- version_short.resize(short_length);
- }
+ // truncate version at the rightmost '.'
+ std::string version_short(data["version"]);
+ size_t short_length = version_short.rfind('.');
+ if (short_length != std::string::npos)
+ {
+ version_short.resize(short_length);
+ }
- LLUIString relnotes_url("[RELEASE_NOTES_BASE_URL][CHANNEL_URL]/[VERSION_SHORT]");
- relnotes_url.setArg("[VERSION_SHORT]", version_short);
+ LLUIString relnotes_url("[RELEASE_NOTES_BASE_URL][CHANNEL_URL]/[VERSION_SHORT]");
+ relnotes_url.setArg("[VERSION_SHORT]", version_short);
- // *TODO thread the update service's response through to this point
- std::string const & channel = LLVersionInfo::getChannel();
- boost::shared_ptr<char> channel_escaped(curl_escape(channel.c_str(), channel.size()), &curl_free);
+ // *TODO thread the update service's response through to this point
+ std::string const & channel = LLVersionInfo::getChannel();
+ boost::shared_ptr<char> channel_escaped(curl_escape(channel.c_str(), channel.size()), &curl_free);
- relnotes_url.setArg("[CHANNEL_URL]", channel_escaped.get());
- relnotes_url.setArg("[RELEASE_NOTES_BASE_URL]", LLTrans::getString("RELEASE_NOTES_BASE_URL"));
+ relnotes_url.setArg("[CHANNEL_URL]", channel_escaped.get());
+ relnotes_url.setArg("[RELEASE_NOTES_BASE_URL]", LLTrans::getString("RELEASE_NOTES_BASE_URL"));
substitutions["INFO_URL"] = relnotes_url.getString();
}
-
+
LLNotificationsUtil::add(notification_name, substitutions, LLSD(), apply_callback);
}
@@ -3120,7 +3147,7 @@ void LLAppViewer::checkForCrash(void)
#if LL_SEND_CRASH_REPORTS
if (gLastExecEvent == LAST_EXEC_FROZE)
{
- llinfos << "Last execution froze, sending a crash report." << llendl;
+ LL_INFOS() << "Last execution froze, sending a crash report." << LL_ENDL;
bool report_freeze = true;
handleCrashReporting(report_freeze);
@@ -3136,8 +3163,7 @@ bool LLAppViewer::meetsRequirementsForMaximizedStart()
{
bool maximizedOk = (LLFeatureManager::getInstance()->getGPUClass() >= GPU_CLASS_2);
- const U32 one_gigabyte_kb = 1024 * 1024;
- maximizedOk &= (gSysMemory.getPhysicalMemoryKB() >= one_gigabyte_kb);
+ maximizedOk &= (gSysMemory.getPhysicalMemoryKB() >= U32Gigabytes(1));
return maximizedOk;
}
@@ -3204,7 +3230,7 @@ bool LLAppViewer::initWindow()
LLFeatureManager::getInstance()->setGraphicsLevel(*mForceGraphicsLevel, false);
gSavedSettings.setU32("RenderQualityPerformance", *mForceGraphicsLevel);
}
-
+
// Set this flag in case we crash while initializing GL
gSavedSettings.setBOOL("RenderInitError", TRUE);
gSavedSettings.saveToFile( gSavedSettings.getString("ClientSettingsFile"), TRUE );
@@ -3251,13 +3277,14 @@ bool LLAppViewer::initWindow()
//gViewerWindow->getWindow()->show();
LL_INFOS("AppInit") << "Window initialization done." << LL_ENDL;
+
return true;
}
void LLAppViewer::writeDebugInfo()
{
std::string debug_filename = gDirUtilp->getExpandedFilename(LL_PATH_LOGS,"debug_info.log");
- llinfos << "Opening debug file " << debug_filename << llendl;
+ LL_INFOS() << "Opening debug file " << debug_filename << LL_ENDL;
llofstream out_file(debug_filename);
LLSDSerialize::toPrettyXML(gDebugInfo, out_file);
out_file.close();
@@ -3317,7 +3344,7 @@ LLSD LLAppViewer::getViewerInfo() const
// CPU
info["CPU"] = gSysCPU.getCPUString();
- info["MEMORY_MB"] = LLSD::Integer(gSysMemory.getPhysicalMemoryKB() / 1024);
+ info["MEMORY_MB"] = LLSD::Integer(gSysMemory.getPhysicalMemoryKB().valueInUnits<LLUnits::Megabytes>());
// Moved hack adjustment to Windows memory size into llsys.cpp
info["OS_VERSION"] = LLAppViewer::instance()->getOSInfo().getOSString();
info["GRAPHICS_CARD_VENDOR"] = (const char*)(glGetString(GL_VENDOR));
@@ -3353,8 +3380,9 @@ LLSD LLAppViewer::getViewerInfo() const
if (gPacketsIn > 0)
{
- info["PACKETS_LOST"] = LLViewerStats::getInstance()->mPacketsLostStat.getCurrent();
- info["PACKETS_IN"] = F32(gPacketsIn);
+ LLTrace::Recording& last_frame = LLTrace::get_frame_recording().getLastRecording();
+ info["PACKETS_LOST"] = last_frame.getSum(LLStatViewer::PACKETS_LOST);
+ info["PACKETS_IN"] = last_frame.getSum(LLStatViewer::PACKETS_IN);
info["PACKETS_PCT"] = 100.f*info["PACKETS_LOST"].asReal() / info["PACKETS_IN"].asReal();
}
@@ -3505,8 +3533,8 @@ void LLAppViewer::writeSystemInfo()
gDebugInfo["CPUInfo"]["CPUSSE"] = gSysCPU.hasSSE();
gDebugInfo["CPUInfo"]["CPUSSE2"] = gSysCPU.hasSSE2();
- gDebugInfo["RAMInfo"]["Physical"] = (LLSD::Integer)(gSysMemory.getPhysicalMemoryKB());
- gDebugInfo["RAMInfo"]["Allocated"] = (LLSD::Integer)(gMemoryAllocated>>10); // MB -> KB
+ gDebugInfo["RAMInfo"]["Physical"] = (LLSD::Integer)(gSysMemory.getPhysicalMemoryKB().value());
+ gDebugInfo["RAMInfo"]["Allocated"] = (LLSD::Integer)(gMemoryAllocated.valueInUnits<LLUnits::Kilobytes>());
gDebugInfo["OSInfo"] = getOSInfo().getOSStringSimple();
// The user is not logged on yet, but record the current grid choice login url
@@ -3557,9 +3585,9 @@ void LLAppViewer::writeSystemInfo()
void LLAppViewer::handleViewerCrash()
{
- llinfos << "Handle viewer crash entry." << llendl;
+ LL_INFOS() << "Handle viewer crash entry." << LL_ENDL;
- llinfos << "Last render pool type: " << LLPipeline::sCurRenderPoolType << llendl ;
+ LL_INFOS() << "Last render pool type: " << LLPipeline::sCurRenderPoolType << LL_ENDL ;
LLMemory::logMemoryInfo(true) ;
@@ -3664,9 +3692,9 @@ void LLAppViewer::handleViewerCrash()
if (gDirUtilp)
{
std::string crash_marker_file_name = gDirUtilp->getExpandedFilename(LL_PATH_LOGS,
- gLLErrorActivated
- ? LLERROR_MARKER_FILE_NAME
- : ERROR_MARKER_FILE_NAME);
+ gLLErrorActivated
+ ? LLERROR_MARKER_FILE_NAME
+ : ERROR_MARKER_FILE_NAME);
LLAPRFile crash_marker_file ;
crash_marker_file.open(crash_marker_file_name, LL_APR_WB);
if (crash_marker_file.getFileHandle())
@@ -3677,7 +3705,7 @@ void LLAppViewer::handleViewerCrash()
else
{
LL_WARNS("MarkerFile") << "Cannot create error marker file " << crash_marker_file_name << LL_ENDL;
- }
+ }
}
else
{
@@ -3691,7 +3719,7 @@ void LLAppViewer::handleViewerCrash()
llofstream file(filename, llofstream::binary);
if(file.good())
{
- llinfos << "Handle viewer crash generating stats log." << llendl;
+ LL_INFOS() << "Handle viewer crash generating stats log." << LL_ENDL;
gMessageSystem->summarizeLogs(file);
file.close();
}
@@ -3816,7 +3844,7 @@ void LLAppViewer::processMarkerFiles()
}
if (mSecondInstance)
- {
+ {
LL_INFOS("MarkerFile") << "Exec marker '"<< mMarkerFileName << "' owned by another instance" << LL_ENDL;
}
else if (marker_is_same_version)
@@ -3830,7 +3858,7 @@ void LLAppViewer::processMarkerFiles()
{
LL_INFOS("MarkerFile") << "Exec marker '"<< mMarkerFileName << "' found, but versions did not match" << LL_ENDL;
}
- }
+ }
else // marker did not exist... last exec (if any) did not freeze
{
// Create the marker file for this execution & lock it; it will be deleted on a clean exit
@@ -3884,12 +3912,12 @@ void LLAppViewer::processMarkerFiles()
{
gLastExecEvent = LAST_EXEC_LOGOUT_CRASH;
LL_INFOS("MarkerFile") << "LLError marker '"<< llerror_marker_file << "' crashed, setting LastExecEvent to LOGOUT_CRASH" << LL_ENDL;
- }
- else
- {
+ }
+ else
+ {
gLastExecEvent = LAST_EXEC_LLERROR_CRASH;
LL_INFOS("MarkerFile") << "LLError marker '"<< llerror_marker_file << "' crashed, setting LastExecEvent to LLERROR_CRASH" << LL_ENDL;
- }
+ }
}
else
{
@@ -3902,20 +3930,20 @@ void LLAppViewer::processMarkerFiles()
if(LLAPRFile::isExist(error_marker_file, NULL, LL_APR_RB))
{
if (markerIsSameVersion(error_marker_file))
- {
- if (gLastExecEvent == LAST_EXEC_LOGOUT_FROZE)
{
+ if (gLastExecEvent == LAST_EXEC_LOGOUT_FROZE)
+ {
gLastExecEvent = LAST_EXEC_LOGOUT_CRASH;
LL_INFOS("MarkerFile") << "Error marker '"<< error_marker_file << "' crashed, setting LastExecEvent to LOGOUT_CRASH" << LL_ENDL;
- }
- else
- {
+ }
+ else
+ {
gLastExecEvent = LAST_EXEC_OTHER_CRASH;
LL_INFOS("MarkerFile") << "Error marker '"<< error_marker_file << "' crashed, setting LastExecEvent to " << gLastExecEvent << LL_ENDL;
+ }
}
- }
- else
- {
+ else
+ {
LL_INFOS("MarkerFile") << "Error marker '"<< error_marker_file << "' marker found, but versions did not match" << LL_ENDL;
}
LLAPRFile::remove(error_marker_file);
@@ -3927,29 +3955,29 @@ void LLAppViewer::removeMarkerFile(bool leave_logout_marker)
if (!mSecondInstance)
{
LL_DEBUGS("MarkerFile") << (leave_logout_marker?"leave":"remove") <<" logout" << LL_ENDL;
- if (mMarkerFile.getFileHandle())
- {
+ if (mMarkerFile.getFileHandle())
+ {
LL_DEBUGS("MarkerFile") << "removing exec marker '"<<mMarkerFileName<<"'"<< LL_ENDL;
mMarkerFile.close() ;
- LLAPRFile::remove( mMarkerFileName );
- }
- else
- {
- LL_WARNS("MarkerFile") << "marker '"<<mMarkerFileName<<"' not open"<< LL_ENDL;
- }
- if (!leave_logout_marker)
- {
- if (mLogoutMarkerFile.getFileHandle())
- {
- LL_DEBUGS("MarkerFile") << "removing logout marker '"<<mLogoutMarkerFileName<<"'"<< LL_ENDL;
- mLogoutMarkerFile.close();
+ LLAPRFile::remove( mMarkerFileName );
}
else
{
+ LL_WARNS("MarkerFile") << "marker '"<<mMarkerFileName<<"' not open"<< LL_ENDL;
+ }
+ if (!leave_logout_marker)
+ {
+ if (mLogoutMarkerFile.getFileHandle())
+ {
+ LL_DEBUGS("MarkerFile") << "removing logout marker '"<<mLogoutMarkerFileName<<"'"<< LL_ENDL;
+ mLogoutMarkerFile.close();
+ }
+ else
+ {
LL_WARNS("MarkerFile") << "logout marker '"<<mLogoutMarkerFileName<<"' not open"<< LL_ENDL;
+ }
+ LLAPRFile::remove( mLogoutMarkerFileName );
}
- LLAPRFile::remove( mLogoutMarkerFileName );
- }
}
else
{
@@ -3981,7 +4009,7 @@ void LLAppViewer::fastQuit(S32 error_code)
void LLAppViewer::requestQuit()
{
- llinfos << "requestQuit" << llendl;
+ LL_INFOS() << "requestQuit" << LL_ENDL;
LLViewerRegion* region = gAgent.getRegion();
@@ -4066,7 +4094,7 @@ static bool finish_early_exit(const LLSD& notification, const LLSD& response)
void LLAppViewer::earlyExit(const std::string& name, const LLSD& substitutions)
{
- llwarns << "app_early_exit: " << name << llendl;
+ LL_WARNS() << "app_early_exit: " << name << LL_ENDL;
gDoDisconnect = TRUE;
LLNotificationsUtil::add(name, substitutions, LLSD(), finish_early_exit);
}
@@ -4074,14 +4102,14 @@ void LLAppViewer::earlyExit(const std::string& name, const LLSD& substitutions)
// case where we need the viewer to exit without any need for notifications
void LLAppViewer::earlyExitNoNotify()
{
- llwarns << "app_early_exit with no notification: " << llendl;
+ LL_WARNS() << "app_early_exit with no notification: " << LL_ENDL;
gDoDisconnect = TRUE;
finish_early_exit( LLSD(), LLSD() );
}
void LLAppViewer::abortQuit()
{
- llinfos << "abortQuit()" << llendl;
+ LL_INFOS() << "abortQuit()" << LL_ENDL;
mQuitRequested = false;
}
@@ -4113,7 +4141,7 @@ void LLAppViewer::migrateCacheDirectory()
if (gDirUtilp->fileExists(old_cache_dir))
{
- llinfos << "Migrating cache from " << old_cache_dir << " to " << new_cache_dir << llendl;
+ LL_INFOS() << "Migrating cache from " << old_cache_dir << " to " << new_cache_dir << LL_ENDL;
// Migrate inventory cache to avoid pain to inventory database after mass update
S32 file_count = 0;
@@ -4131,7 +4159,7 @@ void LLAppViewer::migrateCacheDirectory()
file_count++;
}
}
- llinfos << "Moved " << file_count << " files" << llendl;
+ LL_INFOS() << "Moved " << file_count << " files" << LL_ENDL;
// Nuke the old cache
gDirUtilp->setCacheDir(old_cache_dir);
@@ -4148,7 +4176,7 @@ void LLAppViewer::migrateCacheDirectory()
#endif
if (LLFile::rmdir(old_cache_dir) != 0)
{
- llwarns << "could not delete old cache directory " << old_cache_dir << llendl;
+ LL_WARNS() << "could not delete old cache directory " << old_cache_dir << LL_ENDL;
}
}
}
@@ -4157,10 +4185,10 @@ void LLAppViewer::migrateCacheDirectory()
void dumpVFSCaches()
{
- llinfos << "======= Static VFS ========" << llendl;
+ LL_INFOS() << "======= Static VFS ========" << LL_ENDL;
gStaticVFS->listFiles();
#if LL_WINDOWS
- llinfos << "======= Dumping static VFS to StaticVFSDump ========" << llendl;
+ LL_INFOS() << "======= Dumping static VFS to StaticVFSDump ========" << LL_ENDL;
WCHAR w_str[MAX_PATH];
GetCurrentDirectory(MAX_PATH, w_str);
S32 res = LLFile::mkdir("StaticVFSDump");
@@ -4168,7 +4196,7 @@ void dumpVFSCaches()
{
if (errno != EEXIST)
{
- llwarns << "Couldn't create dir StaticVFSDump" << llendl;
+ LL_WARNS() << "Couldn't create dir StaticVFSDump" << LL_ENDL;
}
}
SetCurrentDirectory(utf8str_to_utf16str("StaticVFSDump").c_str());
@@ -4176,16 +4204,16 @@ void dumpVFSCaches()
SetCurrentDirectory(w_str);
#endif
- llinfos << "========= Dynamic VFS ====" << llendl;
+ LL_INFOS() << "========= Dynamic VFS ====" << LL_ENDL;
gVFS->listFiles();
#if LL_WINDOWS
- llinfos << "========= Dumping dynamic VFS to VFSDump ====" << llendl;
+ LL_INFOS() << "========= Dumping dynamic VFS to VFSDump ====" << LL_ENDL;
res = LLFile::mkdir("VFSDump");
if (res == -1)
{
if (errno != EEXIST)
{
- llwarns << "Couldn't create dir VFSDump" << llendl;
+ LL_WARNS() << "Couldn't create dir VFSDump" << LL_ENDL;
}
}
SetCurrentDirectory(utf8str_to_utf16str("VFSDump").c_str());
@@ -4363,7 +4391,7 @@ bool LLAppViewer::initCache()
{
sscanf(found_file.substr(start_pos+1).c_str(), "%d", &old_salt);
}
- LL_DEBUGS("AppCache") << "Default vfs data file not present, found: " << old_vfs_data_file << " Old salt: " << old_salt << llendl;
+ LL_DEBUGS("AppCache") << "Default vfs data file not present, found: " << old_vfs_data_file << " Old salt: " << old_salt << LL_ENDL;
}
}
@@ -4465,6 +4493,14 @@ void LLAppViewer::purgeCache()
gDirUtilp->deleteFilesInDir(gDirUtilp->getExpandedFilename(LL_PATH_CACHE, ""), "*.*");
}
+//purge cache immediately, do not wait until the next login.
+void LLAppViewer::purgeCacheImmediate()
+{
+ LL_INFOS("AppCache") << "Purging Object Cache and Texture Cache immediately..." << LL_ENDL;
+ LLAppViewer::getTextureCache()->purgeCache(LL_PATH_CACHE, false);
+ LLVOCache::getInstance()->removeCache(LL_PATH_CACHE, true);
+}
+
std::string LLAppViewer::getSecondLifeTitle() const
{
return LLTrans::getString("APP_NAME");
@@ -4637,18 +4673,20 @@ public:
}
};
-static LLFastTimer::DeclareTimer FTM_AUDIO_UPDATE("Update Audio");
-static LLFastTimer::DeclareTimer FTM_CLEANUP("Cleanup");
-static LLFastTimer::DeclareTimer FTM_CLEANUP_DRAWABLES("Drawables");
-static LLFastTimer::DeclareTimer FTM_CLEANUP_OBJECTS("Objects");
-static LLFastTimer::DeclareTimer FTM_IDLE_CB("Idle Callbacks");
-static LLFastTimer::DeclareTimer FTM_LOD_UPDATE("Update LOD");
-static LLFastTimer::DeclareTimer FTM_OBJECTLIST_UPDATE("Update Objectlist");
-static LLFastTimer::DeclareTimer FTM_REGION_UPDATE("Update Region");
-static LLFastTimer::DeclareTimer FTM_WORLD_UPDATE("Update World");
-static LLFastTimer::DeclareTimer FTM_NETWORK("Network");
-static LLFastTimer::DeclareTimer FTM_AGENT_NETWORK("Agent Network");
-static LLFastTimer::DeclareTimer FTM_VLMANAGER("VL Manager");
+static LLTrace::BlockTimerStatHandle FTM_AUDIO_UPDATE("Update Audio");
+static LLTrace::BlockTimerStatHandle FTM_CLEANUP("Cleanup");
+static LLTrace::BlockTimerStatHandle FTM_CLEANUP_DRAWABLES("Drawables");
+static LLTrace::BlockTimerStatHandle FTM_CLEANUP_OBJECTS("Objects");
+static LLTrace::BlockTimerStatHandle FTM_IDLE_CB("Idle Callbacks");
+static LLTrace::BlockTimerStatHandle FTM_LOD_UPDATE("Update LOD");
+static LLTrace::BlockTimerStatHandle FTM_OBJECTLIST_UPDATE("Update Objectlist");
+static LLTrace::BlockTimerStatHandle FTM_REGION_UPDATE("Update Region");
+static LLTrace::BlockTimerStatHandle FTM_WORLD_UPDATE("Update World");
+static LLTrace::BlockTimerStatHandle FTM_NETWORK("Network");
+static LLTrace::BlockTimerStatHandle FTM_AGENT_NETWORK("Agent Network");
+static LLTrace::BlockTimerStatHandle FTM_VLMANAGER("VL Manager");
+static LLTrace::BlockTimerStatHandle FTM_AGENT_POSITION("Agent Position");
+static LLTrace::BlockTimerStatHandle FTM_HUD_EFFECTS("HUD Effects");
///////////////////////////////////////////////////////
// idle()
@@ -4667,7 +4705,7 @@ void LLAppViewer::idle()
LLFrameTimer::updateFrameCount();
LLEventTimer::updateClass();
LLNotificationsUI::LLToast::updateClass();
- LLCriticalDamp::updateInterpolants();
+ LLSmoothInterpolation::updateInterpolants();
LLMortician::updateClass();
LLFilePickerThread::clearDead(); //calls LLFilePickerThread::notify()
@@ -4692,6 +4730,7 @@ void LLAppViewer::idle()
{
if (gRenderStartTime.getElapsedTimeF32() > qas)
{
+ LL_INFOS() << "Quitting after " << qas << " seconds. See setting \"QuitAfterSeconds\"." << LL_ENDL;
LLAppViewer::instance()->forceQuit();
}
}
@@ -4721,9 +4760,9 @@ void LLAppViewer::idle()
if (!gDisconnected)
{
- LLFastTimer t(FTM_NETWORK);
+ LL_RECORD_BLOCK_TIME(FTM_NETWORK);
// Update spaceserver timeinfo
- LLWorld::getInstance()->setSpaceTimeUSec(LLWorld::getInstance()->getSpaceTimeUSec() + (U32)(dt_raw * SEC_TO_MICROSEC));
+ LLWorld::getInstance()->setSpaceTimeUSec(LLWorld::getInstance()->getSpaceTimeUSec() + LLUnits::Seconds::fromValue(dt_raw));
//////////////////////////////////////
@@ -4737,7 +4776,7 @@ void LLAppViewer::idle()
}
{
- LLFastTimer t(FTM_AGENT_AUTOPILOT);
+ LL_RECORD_BLOCK_TIME(FTM_AGENT_AUTOPILOT);
// Handle automatic walking towards points
gAgentPilot.updateTarget();
gAgent.autoPilot(&yaw);
@@ -4752,7 +4791,7 @@ void LLAppViewer::idle()
if (flags_changed || (agent_update_time > (1.0f / (F32) AGENT_UPDATES_PER_SECOND)))
{
- LLFastTimer t(FTM_AGENT_UPDATE);
+ LL_RECORD_BLOCK_TIME(FTM_AGENT_UPDATE);
// Send avatar and camera info
last_control_flags = gAgent.getControlFlags();
send_agent_update(TRUE);
@@ -4775,7 +4814,7 @@ void LLAppViewer::idle()
// *FIX: (???) SAMANTHA
if (viewer_stats_timer.getElapsedTimeF32() >= SEND_STATS_PERIOD && !gDisconnected)
{
- llinfos << "Transmitting sessions stats" << llendl;
+ LL_INFOS() << "Transmitting sessions stats" << LL_ENDL;
send_stats();
viewer_stats_timer.reset();
}
@@ -4787,25 +4826,21 @@ void LLAppViewer::idle()
object_debug_timer.reset();
if (gObjectList.mNumDeadObjectUpdates)
{
- llinfos << "Dead object updates: " << gObjectList.mNumDeadObjectUpdates << llendl;
+ LL_INFOS() << "Dead object updates: " << gObjectList.mNumDeadObjectUpdates << LL_ENDL;
gObjectList.mNumDeadObjectUpdates = 0;
}
if (gObjectList.mNumUnknownUpdates)
{
- llinfos << "Unknown object updates: " << gObjectList.mNumUnknownUpdates << llendl;
+ LL_INFOS() << "Unknown object updates: " << gObjectList.mNumUnknownUpdates << LL_ENDL;
gObjectList.mNumUnknownUpdates = 0;
}
- // ViewerMetrics FPS piggy-backing on the debug timer.
- // The 5-second interval is nice for this purpose. If the object debug
- // bit moves or is disabled, please give this a suitable home.
- LLViewerAssetStatsFF::record_fps_main(gFPSClamped);
}
}
if (!gDisconnected)
{
- LLFastTimer t(FTM_NETWORK);
+ LL_RECORD_BLOCK_TIME(FTM_NETWORK);
////////////////////////////////////////////////
//
@@ -4833,7 +4868,7 @@ void LLAppViewer::idle()
//
{
-// LLFastTimer t(FTM_IDLE_CB);
+// LL_RECORD_BLOCK_TIME(FTM_IDLE_CB);
// Do event notifications if necessary. Yes, we may want to move this elsewhere.
gEventNotifier.update();
@@ -4880,15 +4915,14 @@ void LLAppViewer::idle()
{
// Handle pending gesture processing
- static LLFastTimer::DeclareTimer ftm("Agent Position");
- LLFastTimer t(ftm);
+ LL_RECORD_BLOCK_TIME(FTM_AGENT_POSITION);
LLGestureMgr::instance().update();
gAgent.updateAgentPosition(gFrameDTClamped, yaw, current_mouse.mX, current_mouse.mY);
}
{
- LLFastTimer t(FTM_OBJECTLIST_UPDATE);
+ LL_RECORD_BLOCK_TIME(FTM_OBJECTLIST_UPDATE);
if (!(logoutRequestSent() && hasSavedFinalSnapshot()))
{
@@ -4903,13 +4937,13 @@ void LLAppViewer::idle()
//
{
- LLFastTimer t(FTM_CLEANUP);
+ LL_RECORD_BLOCK_TIME(FTM_CLEANUP);
{
- LLFastTimer t(FTM_CLEANUP_OBJECTS);
+ LL_RECORD_BLOCK_TIME(FTM_CLEANUP_OBJECTS);
gObjectList.cleanDeadObjects();
}
{
- LLFastTimer t(FTM_CLEANUP_DRAWABLES);
+ LL_RECORD_BLOCK_TIME(FTM_CLEANUP_DRAWABLES);
LLDrawable::cleanupDeadDrawables();
}
}
@@ -4928,8 +4962,7 @@ void LLAppViewer::idle()
//
{
- static LLFastTimer::DeclareTimer ftm("HUD Effects");
- LLFastTimer t(ftm);
+ LL_RECORD_BLOCK_TIME(FTM_HUD_EFFECTS);
LLSelectMgr::getInstance()->updateEffects();
LLHUDManager::getInstance()->cleanupEffects();
LLHUDManager::getInstance()->sendEffects();
@@ -4941,7 +4974,7 @@ void LLAppViewer::idle()
//
{
- LLFastTimer t(FTM_NETWORK);
+ LL_RECORD_BLOCK_TIME(FTM_NETWORK);
gVLManager.unpackData();
}
@@ -4953,7 +4986,7 @@ void LLAppViewer::idle()
LLWorld::getInstance()->updateVisibilities();
{
const F32 max_region_update_time = .001f; // 1ms
- LLFastTimer t(FTM_REGION_UPDATE);
+ LL_RECORD_BLOCK_TIME(FTM_REGION_UPDATE);
LLWorld::getInstance()->updateRegions(max_region_update_time);
}
@@ -4990,7 +5023,7 @@ void LLAppViewer::idle()
// Here, particles are updated and drawables are moved.
//
- LLFastTimer t(FTM_WORLD_UPDATE);
+ LL_RECORD_BLOCK_TIME(FTM_WORLD_UPDATE);
gPipeline.updateMove();
LLWorld::getInstance()->updateParticles();
@@ -5022,7 +5055,7 @@ void LLAppViewer::idle()
// objects and camera should be in sync, do LOD calculations now
{
- LLFastTimer t(FTM_LOD_UPDATE);
+ LL_RECORD_BLOCK_TIME(FTM_LOD_UPDATE);
gObjectList.updateApparentAngles(gAgent);
}
@@ -5030,7 +5063,7 @@ void LLAppViewer::idle()
LLAvatarRenderInfoAccountant::idle();
{
- LLFastTimer t(FTM_AUDIO_UPDATE);
+ LL_RECORD_BLOCK_TIME(FTM_AUDIO_UPDATE);
if (gAudiop)
{
@@ -5249,12 +5282,12 @@ void LLAppViewer::idleNameCache()
static F32 CheckMessagesMaxTime = CHECK_MESSAGES_DEFAULT_MAX_TIME;
#endif
-static LLFastTimer::DeclareTimer FTM_IDLE_NETWORK("Idle Network");
-static LLFastTimer::DeclareTimer FTM_MESSAGE_ACKS("Message Acks");
-static LLFastTimer::DeclareTimer FTM_RETRANSMIT("Retransmit");
-static LLFastTimer::DeclareTimer FTM_TIMEOUT_CHECK("Timeout Check");
-static LLFastTimer::DeclareTimer FTM_DYNAMIC_THROTTLE("Dynamic Throttle");
-static LLFastTimer::DeclareTimer FTM_CHECK_REGION_CIRCUIT("Check Region Circuit");
+static LLTrace::BlockTimerStatHandle FTM_IDLE_NETWORK("Idle Network");
+static LLTrace::BlockTimerStatHandle FTM_MESSAGE_ACKS("Message Acks");
+static LLTrace::BlockTimerStatHandle FTM_RETRANSMIT("Retransmit");
+static LLTrace::BlockTimerStatHandle FTM_TIMEOUT_CHECK("Timeout Check");
+static LLTrace::BlockTimerStatHandle FTM_DYNAMIC_THROTTLE("Dynamic Throttle");
+static LLTrace::BlockTimerStatHandle FTM_CHECK_REGION_CIRCUIT("Check Region Circuit");
void LLAppViewer::idleNetwork()
{
@@ -5265,7 +5298,7 @@ void LLAppViewer::idleNetwork()
if (!gSavedSettings.getBOOL("SpeedTest"))
{
- LLFastTimer t(FTM_IDLE_NETWORK); // decode
+ LL_RECORD_BLOCK_TIME(FTM_IDLE_NETWORK); // decode
LLTimer check_message_timer;
// Read all available packets from network
@@ -5327,16 +5360,16 @@ void LLAppViewer::idleNetwork()
if( remaining_possible_decodes <= 0 )
{
- llinfos << "Maxed out number of messages per frame at " << MESSAGE_MAX_PER_FRAME << llendl;
+ LL_INFOS() << "Maxed out number of messages per frame at " << MESSAGE_MAX_PER_FRAME << LL_ENDL;
}
if (gPrintMessagesThisFrame)
{
- llinfos << "Decoded " << total_decoded << " msgs this frame!" << llendl;
+ LL_INFOS() << "Decoded " << total_decoded << " msgs this frame!" << LL_ENDL;
gPrintMessagesThisFrame = FALSE;
}
}
- LLViewerStats::getInstance()->mNumNewObjectsStat.addValue(gObjectList.mNumNewObjects);
+ add(LLStatViewer::NUM_NEW_OBJECTS, gObjectList.mNumNewObjects);
// Retransmit unacknowledged packets.
gXferManager->retransmitUnackedPackets();
@@ -5371,7 +5404,7 @@ void LLAppViewer::disconnectViewer()
//
// Save snapshot for next time, if we made it through initialization
- llinfos << "Disconnecting viewer!" << llendl;
+ LL_INFOS() << "Disconnecting viewer!" << LL_ENDL;
// Dump our frame statistics
@@ -5415,6 +5448,7 @@ void LLAppViewer::disconnectViewer()
{
LLWorld::getInstance()->destroyClass();
}
+ LLVOCache::deleteSingleton();
// call all self-registered classes
LLDestroyClassList::instance().fireCallbacks();
@@ -5429,12 +5463,12 @@ void LLAppViewer::disconnectViewer()
void LLAppViewer::forceErrorLLError()
{
- llerrs << "This is a deliberate llerror" << llendl;
+ LL_ERRS() << "This is a deliberate llerror" << LL_ENDL;
}
void LLAppViewer::forceErrorBreakpoint()
{
- llwarns << "Forcing a deliberate breakpoint" << llendl;
+ LL_WARNS() << "Forcing a deliberate breakpoint" << LL_ENDL;
#ifdef LL_WINDOWS
DebugBreak();
#endif
@@ -5443,7 +5477,7 @@ void LLAppViewer::forceErrorBreakpoint()
void LLAppViewer::forceErrorBadMemoryAccess()
{
- llwarns << "Forcing a deliberate bad memory access" << llendl;
+ LL_WARNS() << "Forcing a deliberate bad memory access" << LL_ENDL;
S32* crash = NULL;
*crash = 0xDEADBEEF;
return;
@@ -5451,7 +5485,7 @@ void LLAppViewer::forceErrorBadMemoryAccess()
void LLAppViewer::forceErrorInfiniteLoop()
{
- llwarns << "Forcing a deliberate infinite loop" << llendl;
+ LL_WARNS() << "Forcing a deliberate infinite loop" << LL_ENDL;
while(true)
{
;
@@ -5461,14 +5495,14 @@ void LLAppViewer::forceErrorInfiniteLoop()
void LLAppViewer::forceErrorSoftwareException()
{
- llwarns << "Forcing a deliberate exception" << llendl;
+ LL_WARNS() << "Forcing a deliberate exception" << LL_ENDL;
// *FIX: Any way to insure it won't be handled?
throw;
}
void LLAppViewer::forceErrorDriverCrash()
{
- llwarns << "Forcing a deliberate driver crash" << llendl;
+ LL_WARNS() << "Forcing a deliberate driver crash" << LL_ENDL;
glDeleteTextures(1, NULL);
}
@@ -5516,7 +5550,7 @@ void LLAppViewer::pingMainloopTimeout(const std::string& state, F32 secs)
{
// if(!restoreErrorTrap())
// {
-// llwarns << "!!!!!!!!!!!!! Its an error trap!!!!" << state << llendl;
+// LL_WARNS() << "!!!!!!!!!!!!! Its an error trap!!!!" << state << LL_ENDL;
// }
if(mMainloopTimeout)
@@ -5575,13 +5609,13 @@ void LLAppViewer::handleLoginComplete()
writeDebugInfo();
// we logged in successfully, so save settings on logout
- llinfos << "Login successful, per account settings will be saved on log out." << llendl;
+ LL_INFOS() << "Login successful, per account settings will be saved on log out." << LL_ENDL;
mSavePerAccountSettings=true;
}
void LLAppViewer::launchUpdater()
{
- LLSD query_map = LLSD::emptyMap();
+ LLSD query_map = LLSD::emptyMap();
query_map["os"] = gPlatform;
// *TODO change userserver to be grid on both viewer and sim, since
@@ -5678,7 +5712,7 @@ void LLAppViewer::launchUpdater()
// Although we already have the full set of paths with the filename
// appended, the linux-updater.bin command-line switches require us to
// snip the filename OFF and pass it as a separate switch argument. :-P
- llinfos << "Got a XUI path: " << this_skin_path << llendl;
+ LL_INFOS() << "Got a XUI path: " << this_skin_path << LL_ENDL;
xml_search_paths.append(delim);
xml_search_paths.append(gDirUtilp->getDirName(this_skin_path));
delim = ",";
@@ -5700,9 +5734,9 @@ void LLAppViewer::launchUpdater()
GError *error = NULL;
if (!g_spawn_command_line_async(LLAppViewer::sUpdaterInfo->mUpdateExePath.c_str(), &error))
{
- llerrs << "Failed to launch updater: "
+ LL_ERRS() << "Failed to launch updater: "
<< error->message
- << llendl;
+ << LL_ENDL;
}
if (error) {
g_error_free(error);
@@ -5743,17 +5777,7 @@ void LLAppViewer::metricsUpdateRegion(U64 region_handle)
{
if (0 != region_handle)
{
- LLViewerAssetStatsFF::set_region_main(region_handle);
- if (LLAppViewer::sTextureFetch)
- {
- // Send a region update message into 'thread1' to get the new region.
- LLAppViewer::sTextureFetch->commandSetRegion(region_handle);
- }
- else
- {
- // No 'thread1', a.k.a. TextureFetch, so update directly
- LLViewerAssetStatsFF::set_region_thread1(region_handle);
- }
+ LLViewerAssetStatsFF::set_region(region_handle);
}
}
@@ -5764,7 +5788,7 @@ void LLAppViewer::metricsUpdateRegion(U64 region_handle)
*/
void LLAppViewer::metricsSend(bool enable_reporting)
{
- if (! gViewerAssetStatsMain)
+ if (! gViewerAssetStats)
return;
if (LLAppViewer::sTextureFetch)
@@ -5777,8 +5801,9 @@ void LLAppViewer::metricsSend(bool enable_reporting)
// Make a copy of the main stats to send into another thread.
// Receiving thread takes ownership.
- LLViewerAssetStats * main_stats(new LLViewerAssetStats(*gViewerAssetStatsMain));
-
+ LLViewerAssetStats * main_stats(new LLViewerAssetStats(*gViewerAssetStats));
+ main_stats->stop();
+
// Send a report request into 'thread1' to get the rest of the data
// and provide some additional parameters while here.
LLAppViewer::sTextureFetch->commandSendMetrics(caps_url,
@@ -5796,6 +5821,6 @@ void LLAppViewer::metricsSend(bool enable_reporting)
// Reset even if we can't report. Rather than gather up a huge chunk of
// data, we'll keep to our sampling interval and retain the data
// resolution in time.
- gViewerAssetStatsMain->reset();
+ gViewerAssetStats->restart();
}
diff --git a/indra/newview/llappviewer.h b/indra/newview/llappviewer.h
index 05326c2baf..54bff2d11c 100755
--- a/indra/newview/llappviewer.h
+++ b/indra/newview/llappviewer.h
@@ -32,7 +32,6 @@
#include "llsys.h" // for LLOSInfo
#include "lltimer.h"
#include "llappcorehttp.h"
-#include <boost/optional.hpp>
class LLCommandLineParser;
class LLFrameTimer;
@@ -44,7 +43,7 @@ class LLWatchdogTimeout;
class LLUpdaterService;
class LLViewerJoystick;
-extern LLFastTimer::DeclareTimer FTM_FRAME;
+extern LLTrace::BlockTimerStatHandle FTM_FRAME;
class LLAppViewer : public LLApp
@@ -175,6 +174,8 @@ public:
void addOnIdleCallback(const boost::function<void()>& cb); // add a callback to fire (once) when idle
void purgeCache(); // Clear the local cache.
+ void purgeCacheImmediate(); //clear local cache immediately.
+ S32 updateTextureThreads(F32 max_time);
// mute/unmute the system's master audio
virtual void setMasterSystemAudioMute(bool mute);
@@ -278,7 +279,7 @@ private:
LLWatchdogTimeout* mMainloopTimeout;
// For performance and metric gathering
- LLThread* mFastTimerLogThread;
+ class LLThread* mFastTimerLogThread;
// for tracking viewer<->region circuit death
bool mAgentRegionLastAlive;
@@ -341,12 +342,12 @@ extern U32 gForegroundFrameCount;
extern LLPumpIO* gServicePump;
-extern U64 gFrameTime; // The timestamp of the most-recently-processed frame
-extern F32 gFrameTimeSeconds; // Loses msec precision after ~4.5 hours...
-extern F32 gFrameIntervalSeconds; // Elapsed time between current and previous gFrameTimeSeconds
+extern U64MicrosecondsImplicit gStartTime;
+extern U64MicrosecondsImplicit gFrameTime; // The timestamp of the most-recently-processed frame
+extern F32SecondsImplicit gFrameTimeSeconds; // Loses msec precision after ~4.5 hours...
+extern F32SecondsImplicit gFrameIntervalSeconds; // Elapsed time between current and previous gFrameTimeSeconds
extern F32 gFPSClamped; // Frames per second, smoothed, weighted toward last frame
extern F32 gFrameDTClamped;
-extern U64 gStartTime;
extern U32 gFrameStalls;
extern LLTimer gRenderStartTime;
@@ -374,7 +375,7 @@ class LLVFS;
extern LLVFS *gStaticVFS;
extern LLMemoryInfo gSysMemory;
-extern U64 gMemoryAllocated;
+extern U64Bytes gMemoryAllocated;
extern std::string gLastVersionChannel;
diff --git a/indra/newview/llappviewerlinux.cpp b/indra/newview/llappviewerlinux.cpp
index b16bb573e1..80f249612a 100755
--- a/indra/newview/llappviewerlinux.cpp
+++ b/indra/newview/llappviewerlinux.cpp
@@ -87,7 +87,7 @@ int main( int argc, char **argv )
bool ok = viewer_app_ptr->init();
if(!ok)
{
- llwarns << "Application init failed." << llendl;
+ LL_WARNS() << "Application init failed." << LL_ENDL;
return -1;
}
@@ -207,7 +207,7 @@ void viewerappapi_init(ViewerAppAPI *server)
}
else
{
- llwarns << "Unable to register service name: " << error->message << llendl;
+ LL_WARNS() << "Unable to register service name: " << error->message << LL_ENDL;
}
g_object_unref(serverproxy);
@@ -226,7 +226,7 @@ gboolean viewer_app_api_GoSLURL(ViewerAppAPI *obj, gchar *slurl, gboolean **succ
{
bool success = false;
- llinfos << "Was asked to go to slurl: " << slurl << llendl;
+ LL_INFOS() << "Was asked to go to slurl: " << slurl << LL_ENDL;
std::string url = slurl;
LLMediaCtrl* web = NULL;
@@ -292,14 +292,14 @@ bool LLAppViewerLinux::sendURLToOtherInstance(const std::string& url)
}
else
{
- llinfos << "Call-out to other instance failed (perhaps not running): " << error->message << llendl;
+ LL_INFOS() << "Call-out to other instance failed (perhaps not running): " << error->message << LL_ENDL;
}
g_object_unref(G_OBJECT(remote_object));
}
else
{
- llwarns << "Couldn't connect to session bus: " << error->message << llendl;
+ LL_WARNS() << "Couldn't connect to session bus: " << error->message << LL_ENDL;
}
if (error)
@@ -343,7 +343,7 @@ void LLAppViewerLinux::handleCrashReporting(bool reportFreeze)
if (pid == 0)
{ // child
execv(cmd.c_str(), cmdargv); /* Flawfinder: Ignore */
- llwarns << "execv failure when trying to start " << cmd << llendl;
+ LL_WARNS() << "execv failure when trying to start " << cmd << LL_ENDL;
_exit(1); // avoid atexit()
} else {
if (pid > 0)
@@ -352,7 +352,7 @@ void LLAppViewerLinux::handleCrashReporting(bool reportFreeze)
int childExitStatus;
waitpid(pid, &childExitStatus, 0);
} else {
- llwarns << "fork failure." << llendl;
+ LL_WARNS() << "fork failure." << LL_ENDL;
}
}
}
@@ -371,7 +371,7 @@ void LLAppViewerLinux::handleCrashReporting(bool reportFreeze)
if (pid == 0)
{ // child
execv(cmd.c_str(), (char* const*) cmdargv); /* Flawfinder: ignore */
- llwarns << "execv failure when trying to start " << cmd << llendl;
+ LL_WARNS() << "execv failure when trying to start " << cmd << LL_ENDL;
_exit(1); // avoid atexit()
}
else
@@ -386,7 +386,7 @@ void LLAppViewerLinux::handleCrashReporting(bool reportFreeze)
}
else
{
- llwarns << "fork failure." << llendl;
+ LL_WARNS() << "fork failure." << LL_ENDL;
}
}
// Sometimes signals don't seem to quit the viewer. Also, we may
diff --git a/indra/newview/llappviewerlinux_api_dbus.cpp b/indra/newview/llappviewerlinux_api_dbus.cpp
index 32e7e0a83d..6ac30bd9b8 100755
--- a/indra/newview/llappviewerlinux_api_dbus.cpp
+++ b/indra/newview/llappviewerlinux_api_dbus.cpp
@@ -35,9 +35,9 @@ extern "C" {
#include "apr_dso.h"
}
-#define DEBUGMSG(...) do { lldebugs << llformat(__VA_ARGS__) << llendl; } while(0)
-#define INFOMSG(...) do { llinfos << llformat(__VA_ARGS__) << llendl; } while(0)
-#define WARNMSG(...) do { llwarns << llformat(__VA_ARGS__) << llendl; } while(0)
+#define DEBUGMSG(...) do { LL_DEBUGS() << llformat(__VA_ARGS__) << LL_ENDL; } while(0)
+#define INFOMSG(...) do { LL_INFOS() << llformat(__VA_ARGS__) << LL_ENDL; } while(0)
+#define WARNMSG(...) do { LL_WARNS() << llformat(__VA_ARGS__) << LL_ENDL; } while(0)
#define LL_DBUS_SYM(REQUIRED, DBUSSYM, RTN, ...) RTN (*ll##DBUSSYM)(__VA_ARGS__) = NULL
#include "llappviewerlinux_api_dbus_syms_raw.inc"
diff --git a/indra/newview/llappviewermacosx.cpp b/indra/newview/llappviewermacosx.cpp
index 2723f0b90d..ae0d0b4e94 100755
--- a/indra/newview/llappviewermacosx.cpp
+++ b/indra/newview/llappviewermacosx.cpp
@@ -79,9 +79,9 @@ bool initViewer()
// Set the working dir to <bundle>/Contents/Resources
if (chdir(gDirUtilp->getAppRODataDir().c_str()) == -1)
{
- llwarns << "Could not change directory to "
- << gDirUtilp->getAppRODataDir() << ": " << strerror(errno)
- << llendl;
+ LL_WARNS() << "Could not change directory to "
+ << gDirUtilp->getAppRODataDir() << ": " << strerror(errno)
+ << LL_ENDL;
}
gViewerAppPtr = new LLAppViewerMacOSX();
@@ -93,7 +93,7 @@ bool initViewer()
bool ok = gViewerAppPtr->init();
if(!ok)
{
- llwarns << "Application init failed." << llendl;
+ LL_WARNS() << "Application init failed." << LL_ENDL;
}
return ok;
diff --git a/indra/newview/llappviewerwin32.cpp b/indra/newview/llappviewerwin32.cpp
index 2764025d75..70b979bebb 100755
--- a/indra/newview/llappviewerwin32.cpp
+++ b/indra/newview/llappviewerwin32.cpp
@@ -29,11 +29,12 @@
#ifdef INCLUDE_VLD
#include "vld.h"
#endif
+#include "llwin32headers.h"
-#include "llappviewerwin32.h"
+#include "llwindowwin32.h" // *FIX: for setting gIconResource.
+#include "llappviewerwin32.h"
-#include "llwindowwin32.h" // *FIX: for setting gIconResource.
#include "llgl.h"
#include "res/resource.h" // *FIX: for setting gIconResource.
@@ -52,7 +53,6 @@
#include <stdlib.h>
#include "llweb.h"
-#include "llsecondlifeurls.h"
#include "llviewernetwork.h"
#include "llmd5.h"
@@ -73,7 +73,7 @@
extern "C" {
void _wassert(const wchar_t * _Message, const wchar_t *_File, unsigned _Line)
{
- llerrs << _Message << llendl;
+ LL_ERRS() << _Message << LL_ENDL;
}
}
#endif
@@ -89,7 +89,7 @@ void nvapi_error(NvAPI_Status status)
{
NvAPI_ShortString szDesc = {0};
NvAPI_GetErrorMessage(status, szDesc);
- llwarns << szDesc << llendl;
+ LL_WARNS() << szDesc << LL_ENDL;
//should always trigger when asserts are enabled
//llassert(status == NVAPI_OK);
@@ -245,7 +245,7 @@ int APIENTRY WINMAIN(HINSTANCE hInstance,
bool ok = viewer_app_ptr->init();
if(!ok)
{
- llwarns << "Application init failed." << llendl;
+ LL_WARNS() << "Application init failed." << LL_ENDL;
return -1;
}
@@ -273,12 +273,12 @@ int APIENTRY WINMAIN(HINSTANCE hInstance,
// Have to wait until after logging is initialized to display LFH info
if (num_heaps > 0)
{
- llinfos << "Attempted to enable LFH for " << num_heaps << " heaps." << llendl;
+ LL_INFOS() << "Attempted to enable LFH for " << num_heaps << " heaps." << LL_ENDL;
for(S32 i = 0; i < num_heaps; i++)
{
if (heap_enable_lfh_error[i])
{
- llinfos << " Failed to enable LFH for heap: " << i << " Error: " << heap_enable_lfh_error[i] << llendl;
+ LL_INFOS() << " Failed to enable LFH for heap: " << i << " Error: " << heap_enable_lfh_error[i] << LL_ENDL;
}
}
}
@@ -297,14 +297,14 @@ int APIENTRY WINMAIN(HINSTANCE hInstance,
// app cleanup if there was a problem.
//
#if WINDOWS_CRT_MEM_CHECKS
- llinfos << "CRT Checking memory:" << llendflush;
+ LL_INFOS() << "CRT Checking memory:" << LL_ENDL;
if (!_CrtCheckMemory())
{
- llwarns << "_CrtCheckMemory() failed at prior to cleanup!" << llendflush;
+ LL_WARNS() << "_CrtCheckMemory() failed at prior to cleanup!" << LL_ENDL;
}
else
{
- llinfos << " No corruption detected." << llendflush;
+ LL_INFOS() << " No corruption detected." << LL_ENDL;
}
#endif
@@ -313,14 +313,14 @@ int APIENTRY WINMAIN(HINSTANCE hInstance,
viewer_app_ptr->cleanup();
#if WINDOWS_CRT_MEM_CHECKS
- llinfos << "CRT Checking memory:" << llendflush;
+ LL_INFOS() << "CRT Checking memory:" << LL_ENDL;
if (!_CrtCheckMemory())
{
- llwarns << "_CrtCheckMemory() failed after cleanup!" << llendflush;
+ LL_WARNS() << "_CrtCheckMemory() failed after cleanup!" << LL_ENDL;
}
else
{
- llinfos << " No corruption detected." << llendflush;
+ LL_INFOS() << " No corruption detected." << LL_ENDL;
}
#endif
@@ -391,11 +391,11 @@ void LLAppViewerWin32::disableWinErrorReporting()
if( 0 == pAddERExcludedApplicationA( executable_name ) )
{
U32 error_code = GetLastError();
- llinfos << "AddERExcludedApplication() failed with error code " << error_code << llendl;
+ LL_INFOS() << "AddERExcludedApplication() failed with error code " << error_code << LL_ENDL;
}
else
{
- llinfos << "AddERExcludedApplication() success for " << executable_name << llendl;
+ LL_INFOS() << "AddERExcludedApplication() success for " << executable_name << LL_ENDL;
}
}
FreeLibrary( fault_rep_dll_handle );
@@ -426,7 +426,7 @@ void create_console()
h_con_handle = _open_osfhandle(l_std_handle, _O_TEXT);
if (h_con_handle == -1)
{
- llwarns << "create_console() failed to open stdout handle" << llendl;
+ LL_WARNS() << "create_console() failed to open stdout handle" << LL_ENDL;
}
else
{
@@ -440,7 +440,7 @@ void create_console()
h_con_handle = _open_osfhandle(l_std_handle, _O_TEXT);
if (h_con_handle == -1)
{
- llwarns << "create_console() failed to open stdin handle" << llendl;
+ LL_WARNS() << "create_console() failed to open stdin handle" << LL_ENDL;
}
else
{
@@ -454,7 +454,7 @@ void create_console()
h_con_handle = _open_osfhandle(l_std_handle, _O_TEXT);
if (h_con_handle == -1)
{
- llwarns << "create_console() failed to open stderr handle" << llendl;
+ LL_WARNS() << "create_console() failed to open stderr handle" << LL_ENDL;
}
else
{
@@ -481,7 +481,7 @@ bool LLAppViewerWin32::init()
// (Don't send our data to Microsoft--at least until we are Logo approved and have a way
// of getting the data back from them.)
//
- // llinfos << "Turning off Windows error reporting." << llendl;
+ // LL_INFOS() << "Turning off Windows error reporting." << LL_ENDL;
disableWinErrorReporting();
#ifndef LL_RELEASE_FOR_DOWNLOAD
@@ -558,7 +558,7 @@ bool LLAppViewerWin32::initHardwareTest()
if (OSBTN_NO== button)
{
LL_INFOS("AppInit") << "User quitting after failed DirectX 9 detection" << LL_ENDL;
- LLWeb::loadURLExternal(DIRECTX_9_URL, false);
+ LLWeb::loadURLExternal("http://secondlife.com/support/", false);
return false;
}
gWarningSettings.setBOOL("AboutDirectX9", FALSE);
@@ -660,7 +660,7 @@ bool LLAppViewerWin32::sendURLToOtherInstance(const std::string& url)
if (other_window != NULL)
{
- lldebugs << "Found other window with the name '" << getWindowTitle() << "'" << llendl;
+ LL_DEBUGS() << "Found other window with the name '" << getWindowTitle() << "'" << LL_ENDL;
COPYDATASTRUCT cds;
const S32 SLURL_MESSAGE_TYPE = 0;
cds.dwData = SLURL_MESSAGE_TYPE;
@@ -668,8 +668,8 @@ bool LLAppViewerWin32::sendURLToOtherInstance(const std::string& url)
cds.lpData = (void*)url.c_str();
LRESULT msg_result = SendMessage(other_window, WM_COPYDATA, NULL, (LPARAM)&cds);
- lldebugs << "SendMessage(WM_COPYDATA) to other window '"
- << getWindowTitle() << "' returned " << msg_result << llendl;
+ LL_DEBUGS() << "SendMessage(WM_COPYDATA) to other window '"
+ << getWindowTitle() << "' returned " << msg_result << LL_ENDL;
return true;
}
return false;
@@ -701,7 +701,7 @@ std::string LLAppViewerWin32::generateSerialNumber()
}
else
{
- llwarns << "GetVolumeInformation failed" << llendl;
+ LL_WARNS() << "GetVolumeInformation failed" << LL_ENDL;
}
return serial_md5;
}
diff --git a/indra/newview/llassetuploadqueue.cpp b/indra/newview/llassetuploadqueue.cpp
index 4bdb690225..2b428aec4b 100755
--- a/indra/newview/llassetuploadqueue.cpp
+++ b/indra/newview/llassetuploadqueue.cpp
@@ -71,8 +71,8 @@ public:
virtual void errorWithContent(U32 statusNum, const std::string& reason, const LLSD& content)
{
- llwarns << "LLAssetUploadChainResponder Error [status:"
- << statusNum << "]: " << content << llendl;
+ LL_WARNS() << "LLAssetUploadChainResponder Error [status:"
+ << statusNum << "]: " << content << LL_ENDL;
LLUpdateTaskInventoryResponder::errorWithContent(statusNum, reason, content);
LLAssetUploadQueue *queue = mSupplier->get();
if (queue)
@@ -102,7 +102,7 @@ public:
std::string uploader = content["uploader"];
mSupplier->log(std::string("Compiling " + mScriptName).c_str());
- llinfos << "Compiling " << llendl;
+ LL_INFOS() << "Compiling " << LL_ENDL;
// postRaw takes ownership of mData and will delete it.
LLHTTPClient::postRaw(uploader, mData, mDataSize, this);
@@ -116,7 +116,7 @@ public:
if (content["compiled"])
{
mSupplier->log("Compilation succeeded");
- llinfos << "Compiled!" << llendl;
+ LL_INFOS() << "Compiled!" << LL_ENDL;
}
else
{
@@ -127,7 +127,7 @@ public:
std::string str = line->asString();
str.erase(std::remove(str.begin(), str.end(), '\n'), str.end());
mSupplier->log(str);
- llinfos << content["errors"] << llendl;
+ LL_INFOS() << content["errors"] << LL_ENDL;
}
}
LLUpdateTaskInventoryResponder::uploadComplete(content);
diff --git a/indra/newview/llassetuploadresponders.cpp b/indra/newview/llassetuploadresponders.cpp
index 2564802387..d86e63589f 100755
--- a/indra/newview/llassetuploadresponders.cpp
+++ b/indra/newview/llassetuploadresponders.cpp
@@ -135,7 +135,7 @@ void on_new_single_inventory_upload_complete(
inventory_item_flags = (U32) server_response["inventory_flags"].asInteger();
if (inventory_item_flags != 0)
{
- llinfos << "inventory_item_flags " << inventory_item_flags << llendl;
+ LL_INFOS() << "inventory_item_flags " << inventory_item_flags << LL_ENDL;
}
}
S32 creation_date_now = time_corrected();
@@ -173,7 +173,7 @@ void on_new_single_inventory_upload_complete(
}
else
{
- llwarns << "Can't find a folder to put it in" << llendl;
+ LL_WARNS() << "Can't find a folder to put it in" << LL_ENDL;
}
// remove the "Uploading..." message
@@ -197,7 +197,7 @@ LLAssetUploadResponder::LLAssetUploadResponder(const LLSD &post_data,
{
if (!gVFS->getExists(vfile_id, asset_type))
{
- llwarns << "LLAssetUploadResponder called with nonexistant vfile_id" << llendl;
+ LL_WARNS() << "LLAssetUploadResponder called with nonexistant vfile_id" << LL_ENDL;
mVFileID.setNull();
mAssetType = LLAssetType::AT_NONE;
return;
@@ -227,8 +227,8 @@ LLAssetUploadResponder::~LLAssetUploadResponder()
// virtual
void LLAssetUploadResponder::errorWithContent(U32 statusNum, const std::string& reason, const LLSD& content)
{
- llinfos << "LLAssetUploadResponder::error [status:"
- << statusNum << "]: " << content << llendl;
+ LL_INFOS() << "LLAssetUploadResponder::error [status:"
+ << statusNum << "]: " << content << LL_ENDL;
LLSD args;
switch(statusNum)
{
@@ -253,7 +253,7 @@ void LLAssetUploadResponder::errorWithContent(U32 statusNum, const std::string&
//virtual
void LLAssetUploadResponder::result(const LLSD& content)
{
- lldebugs << "LLAssetUploadResponder::result from capabilities" << llendl;
+ LL_DEBUGS() << "LLAssetUploadResponder::result from capabilities" << LL_ENDL;
std::string state = content["state"];
@@ -267,7 +267,7 @@ void LLAssetUploadResponder::result(const LLSD& content)
if (mFileName.empty())
{
// rename the file in the VFS to the actual asset id
- // llinfos << "Changing uploaded asset UUID to " << content["new_asset"].asUUID() << llendl;
+ // LL_INFOS() << "Changing uploaded asset UUID to " << content["new_asset"].asUUID() << LL_ENDL;
gVFS->renameFile(mVFileID, mAssetType, content["new_asset"].asUUID(), mAssetType);
}
uploadComplete(content);
@@ -358,11 +358,11 @@ void LLNewAgentInventoryResponder::uploadFailure(const LLSD& content)
//virtual
void LLNewAgentInventoryResponder::uploadComplete(const LLSD& content)
{
- lldebugs << "LLNewAgentInventoryResponder::result from capabilities" << llendl;
+ LL_DEBUGS() << "LLNewAgentInventoryResponder::result from capabilities" << LL_ENDL;
//std::ostringstream llsdxml;
//LLSDSerialize::toXML(content, llsdxml);
- //llinfos << "upload complete content:\n " << llsdxml.str() << llendl;
+ //LL_INFOS() << "upload complete content:\n " << llsdxml.str() << LL_ENDL;
LLAssetType::EType asset_type = LLAssetType::lookup(mPostData["asset_type"].asString());
LLInventoryType::EType inventory_type = LLInventoryType::lookup(mPostData["inventory_type"].asString());
@@ -473,7 +473,7 @@ void LLSendTexLayerResponder::uploadComplete(const LLSD& content)
std::string result = content["state"];
LLUUID new_id = content["new_asset"];
- llinfos << "result: " << result << " new_id: " << new_id << llendl;
+ LL_INFOS() << "result: " << result << " new_id: " << new_id << LL_ENDL;
if (result == "complete"
&& mBakedUploadData != NULL)
{ // Invoke
@@ -489,8 +489,8 @@ void LLSendTexLayerResponder::uploadComplete(const LLSD& content)
void LLSendTexLayerResponder::errorWithContent(U32 statusNum, const std::string& reason, const LLSD& content)
{
- llinfos << "LLSendTexLayerResponder error [status:"
- << statusNum << "]: " << content << llendl;
+ LL_INFOS() << "LLSendTexLayerResponder error [status:"
+ << statusNum << "]: " << content << LL_ENDL;
// Invoke the original callback with an error result
LLViewerTexLayerSetBuffer::onTextureUploadComplete(LLUUID(), (void*) mBakedUploadData, -1, LL_EXSTAT_NONE);
@@ -516,14 +516,14 @@ LLUpdateAgentInventoryResponder::LLUpdateAgentInventoryResponder(
//virtual
void LLUpdateAgentInventoryResponder::uploadComplete(const LLSD& content)
{
- llinfos << "LLUpdateAgentInventoryResponder::result from capabilities" << llendl;
+ LL_INFOS() << "LLUpdateAgentInventoryResponder::result from capabilities" << LL_ENDL;
LLUUID item_id = mPostData["item_id"];
LLViewerInventoryItem* item = (LLViewerInventoryItem*)gInventory.getItem(item_id);
if(!item)
{
- llwarns << "Inventory item for " << mVFileID
- << " is no longer in agent inventory." << llendl;
+ LL_WARNS() << "Inventory item for " << mVFileID
+ << " is no longer in agent inventory." << LL_ENDL;
return;
}
@@ -533,8 +533,8 @@ void LLUpdateAgentInventoryResponder::uploadComplete(const LLSD& content)
gInventory.updateItem(new_item);
gInventory.notifyObservers();
- llinfos << "Inventory item " << item->getName() << " saved into "
- << content["new_asset"].asString() << llendl;
+ LL_INFOS() << "Inventory item " << item->getName() << " saved into "
+ << content["new_asset"].asString() << LL_ENDL;
LLInventoryType::EType inventory_type = new_item->getInventoryType();
switch(inventory_type)
@@ -630,7 +630,7 @@ LLUpdateTaskInventoryResponder::LLUpdateTaskInventoryResponder(const LLSD& post_
//virtual
void LLUpdateTaskInventoryResponder::uploadComplete(const LLSD& content)
{
- llinfos << "LLUpdateTaskInventoryResponder::result from capabilities" << llendl;
+ LL_INFOS() << "LLUpdateTaskInventoryResponder::result from capabilities" << LL_ENDL;
LLUUID item_id = mPostData["item_id"];
LLUUID task_id = mPostData["task_id"];
@@ -711,9 +711,9 @@ public:
{
if (!gVFS->getExists(vfile_id, asset_type))
{
- llwarns
+ LL_WARNS()
<< "LLAssetUploadResponder called with nonexistant "
- << "vfile_id " << vfile_id << llendl;
+ << "vfile_id " << vfile_id << LL_ENDL;
mVFileID.setNull();
mAssetType = LLAssetType::AT_NONE;
}
@@ -1014,9 +1014,9 @@ void LLNewAgentInventoryVariablePriceResponder::errorWithContent(
const std::string& reason,
const LLSD& content)
{
- lldebugs
+ LL_DEBUGS()
<< "LLNewAgentInventoryVariablePrice::error " << statusNum
- << " reason: " << reason << llendl;
+ << " reason: " << reason << LL_ENDL;
if ( content.has("error") )
{
@@ -1060,7 +1060,7 @@ void LLNewAgentInventoryVariablePriceResponder::result(const LLSD& content)
if (mImpl->getFilename().empty())
{
// rename the file in the VFS to the actual asset id
- // llinfos << "Changing uploaded asset UUID to " << content["new_asset"].asUUID() << llendl;
+ // LL_INFOS() << "Changing uploaded asset UUID to " << content["new_asset"].asUUID() << LL_ENDL;
gVFS->renameFile(
mImpl->getVFileID(),
asset_type,
diff --git a/indra/newview/llattachmentsmgr.cpp b/indra/newview/llattachmentsmgr.cpp
index ea0b8f00a4..256980eb04 100755
--- a/indra/newview/llattachmentsmgr.cpp
+++ b/indra/newview/llattachmentsmgr.cpp
@@ -110,7 +110,7 @@ void LLAttachmentsMgr::onIdle()
LLViewerInventoryItem* item = gInventory.getItem(attachment.mItemID);
if (!item)
{
- llinfos << "Attempted to add non-existant item ID:" << attachment.mItemID << llendl;
+ LL_INFOS() << "Attempted to add non-existant item ID:" << attachment.mItemID << LL_ENDL;
continue;
}
S32 attachment_pt = attachment.mAttachmentPt;
diff --git a/indra/newview/llavataractions.cpp b/indra/newview/llavataractions.cpp
index 70cc48f12b..c5b1dc94b2 100755
--- a/indra/newview/llavataractions.cpp
+++ b/indra/newview/llavataractions.cpp
@@ -33,7 +33,6 @@
#include "llavatarnamecache.h" // IDEVO
#include "llsd.h"
-#include "lldarray.h"
#include "llnotifications.h"
#include "llnotificationsutil.h"
#include "roles_constants.h" // for GP_MEMBER_INVITE
@@ -76,6 +75,12 @@
#include "llavatarname.h"
#include "llagentui.h"
+// Flags for kick message
+const U32 KICK_FLAGS_DEFAULT = 0x0;
+const U32 KICK_FLAGS_FREEZE = 1 << 0;
+const U32 KICK_FLAGS_UNFREEZE = 1 << 1;
+
+
// static
void LLAvatarActions::requestFriendshipDialog(const LLUUID& id, const std::string& name)
{
@@ -166,7 +171,7 @@ void LLAvatarActions::offerTeleport(const LLUUID& invitee)
if (invitee.isNull())
return;
- LLDynamicArray<LLUUID> ids;
+ std::vector<LLUUID> ids;
ids.push_back(invitee);
offerTeleport(ids);
}
@@ -244,8 +249,9 @@ void LLAvatarActions::startAdhocCall(const uuid_vec_t& ids, const LLUUID& floate
return;
}
- // convert vector into LLDynamicArray for addSession
- LLDynamicArray<LLUUID> id_array;
+ // convert vector into std::vector for addSession
+ std::vector<LLUUID> id_array;
+ id_array.reserve(ids.size());
for (uuid_vec_t::const_iterator it = ids.begin(); it != ids.end(); ++it)
{
id_array.push_back(*it);
@@ -290,7 +296,9 @@ bool LLAvatarActions::canCall()
void LLAvatarActions::startConference(const uuid_vec_t& ids, const LLUUID& floater_id)
{
// *HACK: Copy into dynamic array
- LLDynamicArray<LLUUID> id_array;
+ std::vector<LLUUID> id_array;
+
+ id_array.reserve(ids.size());
for (uuid_vec_t::const_iterator it = ids.begin(); it != ids.end(); ++it)
{
id_array.push_back(*it);
@@ -1039,7 +1047,7 @@ bool LLAvatarActions::handleRemove(const LLSD& notification, const LLSD& respons
case 1: // NO
default:
- llinfos << "No removal performed." << llendl;
+ LL_INFOS() << "No removal performed." << LL_ENDL;
break;
}
}
diff --git a/indra/newview/llavataractions.h b/indra/newview/llavataractions.h
index 403414558e..85813f2152 100755
--- a/indra/newview/llavataractions.h
+++ b/indra/newview/llavataractions.h
@@ -27,7 +27,6 @@
#ifndef LL_LLAVATARACTIONS_H
#define LL_LLAVATARACTIONS_H
-#include "lldarray.h"
#include "llsd.h"
#include "lluuid.h"
diff --git a/indra/newview/llavatariconctrl.cpp b/indra/newview/llavatariconctrl.cpp
index f34ad23769..746b541f9d 100755
--- a/indra/newview/llavatariconctrl.cpp
+++ b/indra/newview/llavatariconctrl.cpp
@@ -32,7 +32,6 @@
// viewer includes
#include "llagent.h"
-#include "llavatarconstants.h"
#include "llcallingcard.h" // for LLAvatarTracker
#include "llavataractions.h"
#include "llmenugl.h"
@@ -50,6 +49,18 @@
static LLDefaultChildRegistry::Register<LLAvatarIconCtrl> r("avatar_icon");
+namespace LLInitParam
+{
+ void TypeValues<LLAvatarIconCtrlEnums::ESymbolPos>::declareValues()
+ {
+ declare("BottomLeft", LLAvatarIconCtrlEnums::BOTTOM_LEFT);
+ declare("BottomRight", LLAvatarIconCtrlEnums::BOTTOM_RIGHT);
+ declare("TopLeft", LLAvatarIconCtrlEnums::TOP_LEFT);
+ declare("TopRight", LLAvatarIconCtrlEnums::TOP_RIGHT);
+ }
+}
+
+
bool LLAvatarIconIDCache::LLAvatarIconIDCacheItem::expired()
{
const F64 SEC_PER_DAY_PLUS_HOUR = (24.0 + 1.0) * 60.0 * 60.0;
@@ -61,7 +72,7 @@ bool LLAvatarIconIDCache::LLAvatarIconIDCacheItem::expired()
void LLAvatarIconIDCache::load ()
{
- llinfos << "Loading avatar icon id cache." << llendl;
+ LL_INFOS() << "Loading avatar icon id cache." << LL_ENDL;
// build filename for each user
std::string resolved_filename = gDirUtilp->getExpandedFilename(LL_PATH_CACHE, mFilename);
@@ -106,7 +117,7 @@ void LLAvatarIconIDCache::save ()
llofstream file (resolved_filename);
if (!file.is_open())
{
- llwarns << "can't open avatar icons cache file\"" << mFilename << "\" for writing" << llendl;
+ LL_WARNS() << "can't open avatar icons cache file\"" << mFilename << "\" for writing" << LL_ENDL;
return;
}
@@ -146,52 +157,63 @@ void LLAvatarIconIDCache::remove (const LLUUID& avatar_id)
LLAvatarIconCtrl::Params::Params()
: avatar_id("avatar_id"),
draw_tooltip("draw_tooltip", true),
- default_icon_name("default_icon_name")
+ default_icon_name("default_icon_name"),
+ symbol_hpad("symbol_hpad"),
+ symbol_vpad("symbol_vpad"),
+ symbol_size("symbol_size", 1),
+ symbol_pos("symbol_pos", LLAvatarIconCtrlEnums::BOTTOM_RIGHT)
{
+ changeDefault(min_width, 32);
+ changeDefault(min_height, 32);
}
LLAvatarIconCtrl::LLAvatarIconCtrl(const LLAvatarIconCtrl::Params& p)
- : LLIconCtrl(p),
+: LLIconCtrl(p),
LLAvatarPropertiesObserver(),
mAvatarId(),
mFullName(),
mDrawTooltip(p.draw_tooltip),
mDefaultIconName(p.default_icon_name),
- mAvatarNameCacheConnection()
+ mAvatarNameCacheConnection(),
+ mSymbolHpad(p.symbol_hpad),
+ mSymbolVpad(p.symbol_vpad),
+ mSymbolSize(p.symbol_size),
+ mSymbolPos(p.symbol_pos)
{
mPriority = LLViewerFetchedTexture::BOOST_ICON;
LLRect rect = p.rect;
- mDrawWidth = llmax(32, rect.getWidth()) ;
- mDrawHeight = llmax(32, rect.getHeight()) ;
-
- static LLUICachedControl<S32> llavatariconctrl_symbol_hpad("UIAvatariconctrlSymbolHPad", 2);
- static LLUICachedControl<S32> llavatariconctrl_symbol_vpad("UIAvatariconctrlSymbolVPad", 2);
- static LLUICachedControl<S32> llavatariconctrl_symbol_size("UIAvatariconctrlSymbolSize", 5);
- static LLUICachedControl<std::string> llavatariconctrl_symbol_pos("UIAvatariconctrlSymbolPosition", "BottomRight");
// BottomRight is the default position
- S32 left = rect.getWidth() - llavatariconctrl_symbol_size - llavatariconctrl_symbol_hpad;
- S32 bottom = llavatariconctrl_symbol_vpad;
+ S32 left = rect.getWidth() - mSymbolSize - mSymbolHpad;
+ S32 bottom = mSymbolVpad;
- if ("BottomLeft" == (std::string)llavatariconctrl_symbol_pos)
+ switch(mSymbolPos)
+ {
+ case LLAvatarIconCtrlEnums::BOTTOM_LEFT:
{
- left = llavatariconctrl_symbol_hpad;
- bottom = llavatariconctrl_symbol_vpad;
+ left = mSymbolHpad;
+ bottom = mSymbolVpad;
}
- else if ("TopLeft" == (std::string)llavatariconctrl_symbol_pos)
+
+ case LLAvatarIconCtrlEnums::TOP_LEFT:
{
- left = llavatariconctrl_symbol_hpad;
- bottom = rect.getHeight() - llavatariconctrl_symbol_size - llavatariconctrl_symbol_vpad;
+ left = mSymbolHpad;
+ bottom = rect.getHeight() - mSymbolSize - mSymbolVpad;
}
- else if ("TopRight" == (std::string)llavatariconctrl_symbol_pos)
+
+ case LLAvatarIconCtrlEnums::TOP_RIGHT:
{
- left = rect.getWidth() - llavatariconctrl_symbol_size - llavatariconctrl_symbol_hpad;
- bottom = rect.getHeight() - llavatariconctrl_symbol_size - llavatariconctrl_symbol_vpad;
+ left = rect.getWidth() - mSymbolSize - mSymbolHpad;
+ bottom = rect.getHeight() - mSymbolSize - mSymbolVpad;
}
- rect.setOriginAndSize(left, bottom, llavatariconctrl_symbol_size, llavatariconctrl_symbol_size);
+ case LLAvatarIconCtrlEnums::BOTTOM_RIGHT:
+ // fallthrough, is default
+ default:
+ rect.setOriginAndSize(left, bottom, mSymbolSize, mSymbolSize);
+ }
if (p.avatar_id.isProvided())
{
diff --git a/indra/newview/llavatariconctrl.h b/indra/newview/llavatariconctrl.h
index 4929efb7d0..5b5720f4ac 100755
--- a/indra/newview/llavatariconctrl.h
+++ b/indra/newview/llavatariconctrl.h
@@ -29,7 +29,7 @@
#include <boost/signals2.hpp>
-#include "../llui/lliconctrl.h"
+#include "lliconctrl.h"
#include "llavatarpropertiesprocessor.h"
#include "llviewermenu.h"
@@ -41,14 +41,14 @@ public:
struct LLAvatarIconIDCacheItem
{
LLUUID icon_id;
- LLDate cached_time;
+ LLDate cached_time;
bool expired();
};
- LLAvatarIconIDCache():mFilename("avatar_icons_cache.txt")
- {
- }
+ LLAvatarIconIDCache()
+ : mFilename("avatar_icons_cache.txt")
+ {}
void load ();
void save ();
@@ -64,15 +64,41 @@ protected:
std::map<LLUUID,LLAvatarIconIDCacheItem> mCache;//we cache only LLUID and time
};
+namespace LLAvatarIconCtrlEnums
+{
+ enum ESymbolPos
+ {
+ BOTTOM_LEFT,
+ BOTTOM_RIGHT,
+ TOP_LEFT,
+ TOP_RIGHT
+ };
+}
+
+
+namespace LLInitParam
+{
+ template<>
+ struct TypeValues<LLAvatarIconCtrlEnums::ESymbolPos> : public TypeValuesHelper<LLAvatarIconCtrlEnums::ESymbolPos>
+ {
+ static void declareValues();
+ };
+}
+
class LLAvatarIconCtrl
: public LLIconCtrl, public LLAvatarPropertiesObserver
{
public:
struct Params : public LLInitParam::Block<Params, LLIconCtrl::Params>
{
- Optional <LLUUID> avatar_id;
- Optional <bool> draw_tooltip;
- Optional <std::string> default_icon_name;
+ Optional<LLUUID> avatar_id;
+ Optional<bool> draw_tooltip;
+ Optional<std::string> default_icon_name;
+ Optional<S32> symbol_hpad,
+ symbol_vpad,
+ symbol_size;
+ Optional<LLAvatarIconCtrlEnums::ESymbolPos> symbol_pos;
+
Params();
};
@@ -98,6 +124,10 @@ protected:
std::string mFullName;
bool mDrawTooltip;
std::string mDefaultIconName;
+ S32 mSymbolHpad,
+ mSymbolVpad,
+ mSymbolSize;
+ LLAvatarIconCtrlEnums::ESymbolPos mSymbolPos;
bool updateFromCache();
diff --git a/indra/newview/llavatarlist.cpp b/indra/newview/llavatarlist.cpp
index 9f02f301a1..8846d1317d 100755
--- a/indra/newview/llavatarlist.cpp
+++ b/indra/newview/llavatarlist.cpp
@@ -586,7 +586,7 @@ bool LLAvatarItemComparator::compare(const LLPanel* item1, const LLPanel* item2)
if (!avatar_item1 || !avatar_item2)
{
- llerror("item1 and item2 cannot be null", 0);
+ LL_ERRS() << "item1 and item2 cannot be null" << LL_ENDL;
return true;
}
diff --git a/indra/newview/llavatarpropertiesprocessor.cpp b/indra/newview/llavatarpropertiesprocessor.cpp
index 706bc42ea0..856eb3414e 100755
--- a/indra/newview/llavatarpropertiesprocessor.cpp
+++ b/indra/newview/llavatarpropertiesprocessor.cpp
@@ -36,7 +36,6 @@
#include "llstartup.h"
// Linden library includes
-#include "llavatarconstants.h" // AVATAR_TRANSACTED, etc.
#include "lldate.h"
#include "lltrans.h"
#include "llui.h" // LLUI::getLanguage()
@@ -171,11 +170,11 @@ void LLAvatarPropertiesProcessor::sendAvatarPropertiesUpdate(const LLAvatarData*
{
if (!gAgent.isInitialized() || (gAgent.getID() == LLUUID::null))
{
- llwarns << "Sending avatarinfo update DENIED - invalid agent" << llendl;
+ LL_WARNS() << "Sending avatarinfo update DENIED - invalid agent" << LL_ENDL;
return;
}
- llinfos << "Sending avatarinfo update" << llendl;
+ LL_INFOS() << "Sending avatarinfo update" << LL_ENDL;
// This value is required by sendAvatarPropertiesUpdate method.
//A profile should never be mature. (From the original code)
diff --git a/indra/newview/llavatarpropertiesprocessor.h b/indra/newview/llavatarpropertiesprocessor.h
index fdb88a41a1..1dcd2c9b90 100755
--- a/indra/newview/llavatarpropertiesprocessor.h
+++ b/indra/newview/llavatarpropertiesprocessor.h
@@ -33,6 +33,14 @@
#include <list>
#include <map>
+// For Flags in AvatarPropertiesReply
+const U32 AVATAR_ALLOW_PUBLISH = 0x1 << 0; // whether profile is externally visible or not
+const U32 AVATAR_MATURE_PUBLISH = 0x1 << 1; // profile is "mature"
+const U32 AVATAR_IDENTIFIED = 0x1 << 2; // whether avatar has provided payment info
+const U32 AVATAR_TRANSACTED = 0x1 << 3; // whether avatar has actively used payment info
+const U32 AVATAR_ONLINE = 0x1 << 4; // the online status of this avatar, if known.
+const U32 AVATAR_AGEVERIFIED = 0x1 << 5; // whether avatar has been age-verified
+
/*
*TODO Vadim: This needs some refactoring:
- Remove EAvatarProcessorType in favor of separate observers, derived from a common parent (to get rid of void*).
diff --git a/indra/newview/llavatarrenderinfoaccountant.cpp b/indra/newview/llavatarrenderinfoaccountant.cpp
index d6a72b0c05..38e153137c 100644
--- a/indra/newview/llavatarrenderinfoaccountant.cpp
+++ b/indra/newview/llavatarrenderinfoaccountant.cpp
@@ -70,18 +70,18 @@ public:
LLViewerRegion * regionp = LLWorld::getInstance()->getRegionFromHandle(mRegionHandle);
if (regionp)
{
- llwarns << "HTTP error result for avatar weight GET: " << statusNum
+ LL_WARNS() << "HTTP error result for avatar weight GET: " << statusNum
<< ", " << reason
<< " returned by region " << regionp->getName()
- << llendl;
+ << LL_ENDL;
}
else
{
- llwarns << "Avatar render weight GET error recieved but region not found for "
+ LL_WARNS() << "Avatar render weight GET error recieved but region not found for "
<< mRegionHandle
<< ", error " << statusNum
<< ", " << reason
- << llendl;
+ << LL_ENDL;
}
}
@@ -93,7 +93,7 @@ public:
{
if (LLAvatarRenderInfoAccountant::logRenderInfo())
{
- llinfos << "LRI: Result for avatar weights request for region " << regionp->getName() << ":" << llendl;
+ LL_INFOS() << "LRI: Result for avatar weights request for region " << regionp->getName() << ":" << LL_ENDL;
}
if (content.isMap())
@@ -116,8 +116,8 @@ public:
if (LLAvatarRenderInfoAccountant::logRenderInfo())
{
- llinfos << "LRI: Agent " << target_agent_id
- << ": " << agent_info_map << llendl;
+ LL_INFOS() << "LRI: Agent " << target_agent_id
+ << ": " << agent_info_map << LL_ENDL;
}
if (agent_info_map.has(KEY_WEIGHT))
@@ -132,18 +132,18 @@ public:
else if (content.has(KEY_ERROR))
{
const LLSD & error = content[KEY_ERROR];
- llwarns << "Avatar render info GET error: "
+ LL_WARNS() << "Avatar render info GET error: "
<< error[KEY_IDENTIFIER]
<< ": " << error[KEY_MESSAGE]
<< " from region " << regionp->getName()
- << llendl;
+ << LL_ENDL;
}
}
}
else
{
- llinfos << "Avatar render weight info recieved but region not found for "
- << mRegionHandle << llendl;
+ LL_INFOS() << "Avatar render weight info recieved but region not found for "
+ << mRegionHandle << LL_ENDL;
}
}
@@ -165,18 +165,18 @@ public:
LLViewerRegion * regionp = LLWorld::getInstance()->getRegionFromHandle(mRegionHandle);
if (regionp)
{
- llwarns << "HTTP error result for avatar weight POST: " << statusNum
+ LL_WARNS() << "HTTP error result for avatar weight POST: " << statusNum
<< ", " << reason
<< " returned by region " << regionp->getName()
- << llendl;
+ << LL_ENDL;
}
else
{
- llwarns << "Avatar render weight POST error recieved but region not found for "
+ LL_WARNS() << "Avatar render weight POST error recieved but region not found for "
<< mRegionHandle
<< ", error " << statusNum
<< ", " << reason
- << llendl;
+ << LL_ENDL;
}
}
@@ -187,8 +187,8 @@ public:
{
if (LLAvatarRenderInfoAccountant::logRenderInfo())
{
- llinfos << "LRI: Result for avatar weights POST for region " << regionp->getName()
- << ": " << content << llendl;
+ LL_INFOS() << "LRI: Result for avatar weights POST for region " << regionp->getName()
+ << ": " << content << LL_ENDL;
}
if (content.isMap())
@@ -196,18 +196,18 @@ public:
if (content.has(KEY_ERROR))
{
const LLSD & error = content[KEY_ERROR];
- llwarns << "Avatar render info POST error: "
+ LL_WARNS() << "Avatar render info POST error: "
<< error[KEY_IDENTIFIER]
<< ": " << error[KEY_MESSAGE]
<< " from region " << regionp->getName()
- << llendl;
+ << LL_ENDL;
}
}
}
else
{
- llinfos << "Avatar render weight POST result recieved but region not found for "
- << mRegionHandle << llendl;
+ LL_INFOS() << "Avatar render weight POST result recieved but region not found for "
+ << mRegionHandle << LL_ENDL;
}
}
@@ -225,10 +225,10 @@ void LLAvatarRenderInfoAccountant::sendRenderInfoToRegion(LLViewerRegion * regio
{
if (logRenderInfo())
{
- llinfos << "LRI: Sending avatar render info to region "
+ LL_INFOS() << "LRI: Sending avatar render info to region "
<< regionp->getName()
<< " from " << url
- << llendl;
+ << LL_ENDL;
}
// Build the render info to POST to the region
@@ -254,11 +254,11 @@ void LLAvatarRenderInfoAccountant::sendRenderInfoToRegion(LLViewerRegion * regio
if (logRenderInfo())
{
- llinfos << "LRI: Sending avatar render info for " << avatar->getID()
- << ": " << info << llendl;
- llinfos << "LRI: other info geometry " << avatar->getAttachmentGeometryBytes()
+ LL_INFOS() << "LRI: Sending avatar render info for " << avatar->getID()
+ << ": " << info << LL_ENDL;
+ LL_INFOS() << "LRI: other info geometry " << avatar->getAttachmentGeometryBytes()
<< ", area " << avatar->getAttachmentSurfaceArea()
- << llendl;
+ << LL_ENDL;
}
}
}
@@ -285,10 +285,10 @@ void LLAvatarRenderInfoAccountant::getRenderInfoFromRegion(LLViewerRegion * regi
{
if (logRenderInfo())
{
- llinfos << "LRI: Requesting avatar render info for region "
+ LL_INFOS() << "LRI: Requesting avatar render info for region "
<< regionp->getName()
<< " from " << url
- << llendl;
+ << LL_ENDL;
}
// First send a request to get the latest data
@@ -310,8 +310,8 @@ void LLAvatarRenderInfoAccountant::idle()
if (logRenderInfo())
{
- llinfos << "LRI: Scanning all regions and checking for render info updates"
- << llendl;
+ LL_INFOS() << "LRI: Scanning all regions and checking for render info updates"
+ << LL_ENDL;
}
// Check all regions and see if it's time to fetch/send data
@@ -375,9 +375,9 @@ void LLAvatarRenderInfoAccountant::expireRenderInfoReportTimer(const LLUUID& reg
{
if (logRenderInfo())
{
- llinfos << "LRI: Viewer has new region capabilities, clearing global render info timer"
+ LL_INFOS() << "LRI: Viewer has new region capabilities, clearing global render info timer"
<< " and timer for region " << region_id
- << llendl;
+ << LL_ENDL;
}
// Reset the global timer so it will scan regions immediately
diff --git a/indra/newview/llblocklist.cpp b/indra/newview/llblocklist.cpp
index 3849fbeb54..1c68fabf8b 100755
--- a/indra/newview/llblocklist.cpp
+++ b/indra/newview/llblocklist.cpp
@@ -324,7 +324,7 @@ bool LLBlockListItemComparator::compare(const LLPanel* item1, const LLPanel* ite
if (!blocked_item1 || !blocked_item2)
{
- llerror("blocked_item1 and blocked_item2 cannot be null", 0);
+ LL_ERRS() << "blocked_item1 and blocked_item2 cannot be null" << LL_ENDL;
return true;
}
diff --git a/indra/newview/llbuycurrencyhtml.cpp b/indra/newview/llbuycurrencyhtml.cpp
index 459123a5d8..1c69dadb12 100755
--- a/indra/newview/llbuycurrencyhtml.cpp
+++ b/indra/newview/llbuycurrencyhtml.cpp
@@ -148,7 +148,7 @@ void LLBuyCurrencyHTML::showDialog( bool specific_sum_requested, const std::stri
}
else
{
- llwarns << "Buy Currency (HTML) Floater not found" << llendl;
+ LL_WARNS() << "Buy Currency (HTML) Floater not found" << LL_ENDL;
};
}
diff --git a/indra/newview/llcallbacklist.cpp b/indra/newview/llcallbacklist.cpp
index 79ec43dfe9..59ecbdd0ea 100755
--- a/indra/newview/llcallbacklist.cpp
+++ b/indra/newview/llcallbacklist.cpp
@@ -56,7 +56,7 @@ void LLCallbackList::addFunction( callback_t func, void *data)
{
if (!func)
{
- llerrs << "LLCallbackList::addFunction - function is NULL" << llendl;
+ LL_ERRS() << "LLCallbackList::addFunction - function is NULL" << LL_ENDL;
return;
}
@@ -234,14 +234,14 @@ void doPeriodically(bool_func_t callable, F32 seconds)
void test1(void *data)
{
S32 *s32_data = (S32 *)data;
- llinfos << "testfunc1 " << *s32_data << llendl;
+ LL_INFOS() << "testfunc1 " << *s32_data << LL_ENDL;
}
void test2(void *data)
{
S32 *s32_data = (S32 *)data;
- llinfos << "testfunc2 " << *s32_data << llendl;
+ LL_INFOS() << "testfunc2 " << *s32_data << LL_ENDL;
}
@@ -252,54 +252,54 @@ LLCallbackList::test()
S32 b = 2;
LLCallbackList *list = new LLCallbackList;
- llinfos << "Testing LLCallbackList" << llendl;
+ LL_INFOS() << "Testing LLCallbackList" << LL_ENDL;
if (!list->deleteFunction(NULL))
{
- llinfos << "passed 1" << llendl;
+ LL_INFOS() << "passed 1" << LL_ENDL;
}
else
{
- llinfos << "error, removed function from empty list" << llendl;
+ LL_INFOS() << "error, removed function from empty list" << LL_ENDL;
}
- // llinfos << "This should crash" << llendl;
+ // LL_INFOS() << "This should crash" << LL_ENDL;
// list->addFunction(NULL);
list->addFunction(&test1, &a);
list->addFunction(&test1, &a);
- llinfos << "Expect: test1 1, test1 1" << llendl;
+ LL_INFOS() << "Expect: test1 1, test1 1" << LL_ENDL;
list->callFunctions();
list->addFunction(&test1, &b);
list->addFunction(&test2, &b);
- llinfos << "Expect: test1 1, test1 1, test1 2, test2 2" << llendl;
+ LL_INFOS() << "Expect: test1 1, test1 1, test1 2, test2 2" << LL_ENDL;
list->callFunctions();
if (list->deleteFunction(&test1, &b))
{
- llinfos << "passed 3" << llendl;
+ LL_INFOS() << "passed 3" << LL_ENDL;
}
else
{
- llinfos << "error removing function" << llendl;
+ LL_INFOS() << "error removing function" << LL_ENDL;
}
- llinfos << "Expect: test1 1, test1 1, test2 2" << llendl;
+ LL_INFOS() << "Expect: test1 1, test1 1, test2 2" << LL_ENDL;
list->callFunctions();
list->deleteAllFunctions();
- llinfos << "Expect nothing" << llendl;
+ LL_INFOS() << "Expect nothing" << LL_ENDL;
list->callFunctions();
- llinfos << "nothing :-)" << llendl;
+ LL_INFOS() << "nothing :-)" << LL_ENDL;
delete list;
- llinfos << "test complete" << llendl;
+ LL_INFOS() << "test complete" << LL_ENDL;
}
#endif // _DEBUG
diff --git a/indra/newview/llcallingcard.cpp b/indra/newview/llcallingcard.cpp
index 91741c2a77..afbb73ee08 100755
--- 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,19 +43,14 @@
#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 "lltrans.h"
#include "llviewercontrol.h"
-#include "llviewernetwork.h"
#include "llviewerobjectlist.h"
-#include "llviewerwindow.h"
#include "llvoavatar.h"
#include "llavataractions.h"
@@ -105,8 +97,6 @@ static void on_avatar_name_cache_notify(const LLUUID& agent_id,
LLAvatarTracker::LLAvatarTracker() :
mTrackingData(NULL),
mTrackedAgentValid(false),
- //mInventory(NULL),
- //mInventoryObserver(NULL),
mModifyMask(0x0)
{
}
@@ -265,21 +255,21 @@ S32 LLAvatarTracker::addBuddyList(const LLAvatarTracker::buddy_map_t& buds)
// IDEVO: is this necessary? name is unused?
gCacheName->getFullName(agent_id, full_name);
addChangedMask(LLFriendObserver::ADD, agent_id);
- lldebugs << "Added buddy " << agent_id
+ LL_DEBUGS() << "Added buddy " << agent_id
<< ", " << (mBuddyInfo[agent_id]->isOnline() ? "Online" : "Offline")
<< ", TO: " << mBuddyInfo[agent_id]->getRightsGrantedTo()
<< ", FROM: " << mBuddyInfo[agent_id]->getRightsGrantedFrom()
- << llendl;
+ << LL_ENDL;
}
else
{
LLRelationship* e_r = (*existing_buddy).second;
LLRelationship* n_r = (*itr).second;
- llwarns << "!! Add buddy for existing buddy: " << agent_id
+ LL_WARNS() << "!! Add buddy for existing buddy: " << agent_id
<< " [" << (e_r->isOnline() ? "Online" : "Offline") << "->" << (n_r->isOnline() ? "Online" : "Offline")
<< ", " << e_r->getRightsGrantedTo() << "->" << n_r->getRightsGrantedTo()
<< ", " << e_r->getRightsGrantedTo() << "->" << n_r->getRightsGrantedTo()
- << "]" << llendl;
+ << "]" << LL_ENDL;
}
}
notifyObservers();
@@ -300,7 +290,7 @@ void LLAvatarTracker::copyBuddyList(buddy_map_t& buddies) const
void LLAvatarTracker::terminateBuddy(const LLUUID& id)
{
- lldebugs << "LLAvatarTracker::terminateBuddy()" << llendl;
+ LL_DEBUGS() << "LLAvatarTracker::terminateBuddy()" << LL_ENDL;
LLRelationship* buddy = get_ptr_in_map(mBuddyInfo, id);
if(!buddy) return;
mBuddyInfo.erase(id);
@@ -338,12 +328,12 @@ void LLAvatarTracker::setBuddyOnline(const LLUUID& id, bool is_online)
{
info->online(is_online);
addChangedMask(LLFriendObserver::ONLINE, id);
- lldebugs << "Set buddy " << id << (is_online ? " Online" : " Offline") << llendl;
+ LL_DEBUGS() << "Set buddy " << id << (is_online ? " Online" : " Offline") << LL_ENDL;
}
else
{
- llwarns << "!! No buddy info found for " << id
- << ", setting to " << (is_online ? "Online" : "Offline") << llendl;
+ LL_WARNS() << "!! No buddy info found for " << id
+ << ", setting to " << (is_online ? "Online" : "Offline") << LL_ENDL;
}
}
@@ -390,7 +380,7 @@ void LLAvatarTracker::empower(const LLUUID& id, bool grant)
void LLAvatarTracker::empowerList(const buddy_map_t& list, bool grant)
{
- llwarns << "LLAvatarTracker::empowerList() not implemented." << llendl;
+ LL_WARNS() << "LLAvatarTracker::empowerList() not implemented." << LL_ENDL;
/*
LLMessageSystem* msg = gMessageSystem;
const char* message_name;
@@ -602,14 +592,14 @@ void LLAvatarTracker::agentFound(const LLUUID& prey,
// static
void LLAvatarTracker::processOnlineNotification(LLMessageSystem* msg, void**)
{
- lldebugs << "LLAvatarTracker::processOnlineNotification()" << llendl;
+ LL_DEBUGS() << "LLAvatarTracker::processOnlineNotification()" << LL_ENDL;
instance().processNotify(msg, true);
}
// static
void LLAvatarTracker::processOfflineNotification(LLMessageSystem* msg, void**)
{
- lldebugs << "LLAvatarTracker::processOfflineNotification()" << llendl;
+ LL_DEBUGS() << "LLAvatarTracker::processOfflineNotification()" << LL_ENDL;
instance().processNotify(msg, false);
}
@@ -643,11 +633,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);
@@ -661,7 +651,7 @@ void LLAvatarTracker::processChange(LLMessageSystem* msg)
void LLAvatarTracker::processChangeUserRights(LLMessageSystem* msg, void**)
{
- lldebugs << "LLAvatarTracker::processChangeUserRights()" << llendl;
+ LL_DEBUGS() << "LLAvatarTracker::processChangeUserRights()" << LL_ENDL;
instance().processChange(msg);
}
@@ -670,7 +660,7 @@ void LLAvatarTracker::processNotify(LLMessageSystem* msg, bool online)
S32 count = msg->getNumberOfBlocksFast(_PREHASH_AgentBlock);
BOOL chat_notify = gSavedSettings.getBOOL("ChatOnlineNotification");
- lldebugs << "Received " << count << " online notifications **** " << llendl;
+ LL_DEBUGS() << "Received " << count << " online notifications **** " << LL_ENDL;
if(count > 0)
{
LLUUID agent_id;
@@ -692,8 +682,8 @@ void LLAvatarTracker::processNotify(LLMessageSystem* msg, bool online)
}
else
{
- llwarns << "Received online notification for unknown buddy: "
- << agent_id << " is " << (online ? "ONLINE" : "OFFLINE") << llendl;
+ LL_WARNS() << "Received online notification for unknown buddy: "
+ << agent_id << " is " << (online ? "ONLINE" : "OFFLINE") << LL_ENDL;
}
if(tracking_id == agent_id)
@@ -731,7 +721,7 @@ static void on_avatar_name_cache_notify(const LLUUID& agent_id,
if (online)
{
notification =
- LLNotificationsUtil::add("FriendOnlineOffline",
+ LLNotifications::instance().add("FriendOnlineOffline",
args,
payload.with("respond_on_mousedown", TRUE),
boost::bind(&LLAvatarActions::startIM, agent_id));
@@ -739,7 +729,7 @@ static void on_avatar_name_cache_notify(const LLUUID& agent_id,
else
{
notification =
- LLNotificationsUtil::add("FriendOnlineOffline", args, payload);
+ LLNotifications::instance().add("FriendOnlineOffline", args, payload);
}
// If there's an open IM session with this agent, send a notification there too.
@@ -805,8 +795,8 @@ void LLTrackingData::agentFound(const LLUUID& prey,
{
if(prey != mAvatarID)
{
- llwarns << "LLTrackingData::agentFound() - found " << prey
- << " but looking for " << mAvatarID << llendl;
+ LL_WARNS() << "LLTrackingData::agentFound() - found " << prey
+ << " but looking for " << mAvatarID << LL_ENDL;
}
mHaveInfo = true;
mAgentGone.setTimerExpirySec(OFFLINE_SECONDS);
diff --git a/indra/newview/llcaphttpsender.cpp b/indra/newview/llcaphttpsender.cpp
index 16bb48da93..b2524d14f8 100755
--- a/indra/newview/llcaphttpsender.cpp
+++ b/indra/newview/llcaphttpsender.cpp
@@ -40,8 +40,8 @@ void LLCapHTTPSender::send(const LLHost& host, const std::string& message,
const LLSD& body,
LLHTTPClient::ResponderPtr response) const
{
- llinfos << "LLCapHTTPSender::send: message " << message
- << " to host " << host << llendl;
+ LL_INFOS() << "LLCapHTTPSender::send: message " << message
+ << " to host " << host << LL_ENDL;
LLSD llsd;
llsd["message"] = message;
llsd["body"] = body;
diff --git a/indra/newview/llchannelmanager.cpp b/indra/newview/llchannelmanager.cpp
index fa23251d95..928c3baafa 100755
--- a/indra/newview/llchannelmanager.cpp
+++ b/indra/newview/llchannelmanager.cpp
@@ -50,7 +50,7 @@ LLChannelManager::LLChannelManager()
if(!gViewerWindow)
{
- llerrs << "LLChannelManager::LLChannelManager() - viwer window is not initialized yet" << llendl;
+ LL_ERRS() << "LLChannelManager::LLChannelManager() - viwer window is not initialized yet" << LL_ENDL;
}
}
@@ -251,7 +251,7 @@ LLNotificationsUI::LLScreenChannel* LLChannelManager::getNotificationScreenChann
if (channel == NULL)
{
- llwarns << "Can't find screen channel by NotificationChannelUUID" << llendl;
+ LL_WARNS() << "Can't find screen channel by NotificationChannelUUID" << LL_ENDL;
llassert(!"Can't find screen channel by NotificationChannelUUID");
}
diff --git a/indra/newview/llchatbar.cpp b/indra/newview/llchatbar.cpp
index b3bc0ba966..00fa6dd979 100755
--- a/indra/newview/llchatbar.cpp
+++ b/indra/newview/llchatbar.cpp
@@ -28,7 +28,6 @@
#include "llchatbar.h"
-#include "imageids.h"
#include "llfontgl.h"
#include "llrect.h"
#include "llerror.h"
@@ -522,10 +521,10 @@ void LLChatBar::onInputEditorKeystroke( LLLineEditor* caller, void* userdata )
}
}
- //llinfos << "GESTUREDEBUG " << trigger
+ //LL_INFOS() << "GESTUREDEBUG " << trigger
// << " len " << length
// << " outlen " << out_str.getLength()
- // << llendl;
+ // << LL_ENDL;
}
}
@@ -589,22 +588,22 @@ void LLChatBar::sendChatFromViewer(const LLWString &wtext, EChatType type, BOOL
{
if (type == CHAT_TYPE_WHISPER)
{
- lldebugs << "You whisper " << utf8_text << llendl;
+ LL_DEBUGS() << "You whisper " << utf8_text << LL_ENDL;
gAgent.sendAnimationRequest(ANIM_AGENT_WHISPER, ANIM_REQUEST_START);
}
else if (type == CHAT_TYPE_NORMAL)
{
- lldebugs << "You say " << utf8_text << llendl;
+ LL_DEBUGS() << "You say " << utf8_text << LL_ENDL;
gAgent.sendAnimationRequest(ANIM_AGENT_TALK, ANIM_REQUEST_START);
}
else if (type == CHAT_TYPE_SHOUT)
{
- lldebugs << "You shout " << utf8_text << llendl;
+ LL_DEBUGS() << "You shout " << utf8_text << LL_ENDL;
gAgent.sendAnimationRequest(ANIM_AGENT_SHOUT, ANIM_REQUEST_START);
}
else
{
- llinfos << "send_chat_from_viewer() - invalid volume" << llendl;
+ LL_INFOS() << "send_chat_from_viewer() - invalid volume" << LL_ENDL;
return;
}
}
@@ -612,30 +611,12 @@ void LLChatBar::sendChatFromViewer(const LLWString &wtext, EChatType type, BOOL
{
if (type != CHAT_TYPE_START && type != CHAT_TYPE_STOP)
{
- lldebugs << "Channel chat: " << utf8_text << llendl;
+ LL_DEBUGS() << "Channel chat: " << utf8_text << LL_ENDL;
}
}
send_chat_from_viewer(utf8_out_text, type, channel);
}
-/*
-void send_chat_from_viewer(const std::string& utf8_out_text, EChatType type, S32 channel)
-{
- LLMessageSystem* msg = gMessageSystem;
- msg->newMessageFast(_PREHASH_ChatFromViewer);
- msg->nextBlockFast(_PREHASH_AgentData);
- msg->addUUIDFast(_PREHASH_AgentID, gAgent.getID());
- msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID());
- msg->nextBlockFast(_PREHASH_ChatData);
- msg->addStringFast(_PREHASH_Message, utf8_out_text);
- msg->addU8Fast(_PREHASH_Type, type);
- msg->addS32("Channel", channel);
-
- gAgent.sendReliableMessage();
-
- LLViewerStats::getInstance()->incStat(LLViewerStats::ST_CHAT_COUNT);
-}
-*/
void LLChatBar::onCommitGesture(LLUICtrl* ctrl)
{
diff --git a/indra/newview/llchathistory.cpp b/indra/newview/llchathistory.cpp
index abeaf958eb..05c4181714 100755
--- a/indra/newview/llchathistory.cpp
+++ b/indra/newview/llchathistory.cpp
@@ -839,11 +839,11 @@ void LLChatHistory::clear()
mLastFromID = LLUUID::null;
}
-static LLFastTimer::DeclareTimer FTM_APPEND_MESSAGE("Append Chat Message");
+static LLTrace::BlockTimerStatHandle FTM_APPEND_MESSAGE("Append Chat Message");
void LLChatHistory::appendMessage(const LLChat& chat, const LLSD &args, const LLStyle::Params& input_append_params)
{
- LLFastTimer _(FTM_APPEND_MESSAGE);
+ LL_RECORD_BLOCK_TIME(FTM_APPEND_MESSAGE);
bool use_plain_text_chat_history = args["use_plain_text_chat_history"].asBoolean();
bool square_brackets = false; // square brackets necessary for a system messages
diff --git a/indra/newview/llchiclet.cpp b/indra/newview/llchiclet.cpp
index 131aea9da3..b1dce42dfd 100755
--- a/indra/newview/llchiclet.cpp
+++ b/indra/newview/llchiclet.cpp
@@ -192,7 +192,7 @@ void LLNotificationChiclet::createMenu()
{
if(mContextMenu)
{
- llwarns << "Menu already exists" << llendl;
+ LL_WARNS() << "Menu already exists" << LL_ENDL;
return;
}
@@ -379,7 +379,7 @@ bool LLIMChiclet::canCreateMenu()
{
if(mPopupMenu)
{
- llwarns << "Menu already exists" << llendl;
+ LL_WARNS() << "Menu already exists" << LL_ENDL;
return false;
}
if(getSessionId().isNull())
@@ -725,7 +725,7 @@ void LLChicletPanel::setChicletToggleState(const LLUUID& session_id, bool toggle
{
if(session_id.isNull())
{
- llwarns << "Null Session ID" << llendl;
+ LL_WARNS() << "Null Session ID" << LL_ENDL;
}
// toggle off all chiclets, except specified
diff --git a/indra/newview/llchiclet.h b/indra/newview/llchiclet.h
index efaf03384a..d5e3a55fdf 100755
--- a/indra/newview/llchiclet.h
+++ b/indra/newview/llchiclet.h
@@ -825,13 +825,13 @@ T* LLChicletPanel::createChiclet(const LLUUID& session_id, S32 index)
T* chiclet = LLUICtrlFactory::create<T>(params);
if(!chiclet)
{
- llwarns << "Could not create chiclet" << llendl;
+ LL_WARNS() << "Could not create chiclet" << LL_ENDL;
return NULL;
}
if(!addChiclet(chiclet, index))
{
delete chiclet;
- llwarns << "Could not add chiclet to chiclet panel" << llendl;
+ LL_WARNS() << "Could not add chiclet to chiclet panel" << LL_ENDL;
return NULL;
}
@@ -871,7 +871,7 @@ T* LLChicletPanel::findChiclet(const LLUUID& im_session_id)
T* result = dynamic_cast<T*>(chiclet);
if(!result)
{
- llwarns << "Found chiclet but of wrong type " << llendl;
+ LL_WARNS() << "Found chiclet but of wrong type " << LL_ENDL;
continue;
}
return result;
@@ -891,7 +891,7 @@ template<class T> T* LLChicletPanel::getChiclet(S32 index)
T*result = dynamic_cast<T*>(chiclet);
if(!result && chiclet)
{
- llwarns << "Found chiclet but of wrong type " << llendl;
+ LL_WARNS() << "Found chiclet but of wrong type " << LL_ENDL;
}
return result;
}
diff --git a/indra/newview/llchicletbar.cpp b/indra/newview/llchicletbar.cpp
index a51c844775..28e367fbe1 100755
--- a/indra/newview/llchicletbar.cpp
+++ b/indra/newview/llchicletbar.cpp
@@ -90,16 +90,16 @@ void LLChicletBar::log(LLView* panel, const std::string& descr)
void LLChicletBar::reshape(S32 width, S32 height, BOOL called_from_parent)
{
static S32 debug_calling_number = 0;
- lldebugs << "**************************************** " << ++debug_calling_number << llendl;
+ LL_DEBUGS() << "**************************************** " << ++debug_calling_number << LL_ENDL;
S32 current_width = getRect().getWidth();
S32 delta_width = width - current_width;
- lldebugs << "Reshaping: "
+ LL_DEBUGS() << "Reshaping: "
<< ", width: " << width
<< ", cur width: " << current_width
<< ", delta_width: " << delta_width
<< ", called_from_parent: " << called_from_parent
- << llendl;
+ << LL_ENDL;
if (mChicletPanel) log(mChicletPanel, "before");
@@ -155,7 +155,7 @@ void LLChicletBar::reshape(S32 width, S32 height, BOOL called_from_parent)
if (should_be_reshaped)
{
- lldebugs << "Reshape all children with width: " << width << llendl;
+ LL_DEBUGS() << "Reshape all children with width: " << width << LL_ENDL;
LLPanel::reshape(width, height, called_from_parent);
}
@@ -174,23 +174,23 @@ S32 LLChicletBar::processWidthDecreased(S32 delta_width)
// we have some space to decrease chiclet panel
S32 shrink_by = llmin(-delta_width, chiclet_panel_shrink_headroom);
- lldebugs << "delta_width: " << delta_width
+ LL_DEBUGS() << "delta_width: " << delta_width
<< ", panel_delta_min: " << chiclet_panel_shrink_headroom
<< ", shrink_by: " << shrink_by
- << llendl;
+ << LL_ENDL;
// is chiclet panel wide enough to process resizing?
delta_width += chiclet_panel_shrink_headroom;
still_should_be_processed = delta_width < 0;
- lldebugs << "Shrinking chiclet panel by " << shrink_by << " px" << llendl;
+ LL_DEBUGS() << "Shrinking chiclet panel by " << shrink_by << " px" << LL_ENDL;
mChicletPanel->getParent()->reshape(mChicletPanel->getParent()->getRect().getWidth() - shrink_by, mChicletPanel->getParent()->getRect().getHeight());
log(mChicletPanel, "after processing panel decreasing via chiclet panel");
- lldebugs << "RS_CHICLET_PANEL"
+ LL_DEBUGS() << "RS_CHICLET_PANEL"
<< ", delta_width: " << delta_width
- << llendl;
+ << LL_ENDL;
}
S32 extra_shrink_width = 0;
@@ -198,8 +198,8 @@ S32 LLChicletBar::processWidthDecreased(S32 delta_width)
if (still_should_be_processed)
{
extra_shrink_width = -delta_width;
- llwarns << "There is no enough width to reshape all children: "
- << extra_shrink_width << llendl;
+ LL_WARNS() << "There is no enough width to reshape all children: "
+ << extra_shrink_width << LL_ENDL;
}
return extra_shrink_width;
diff --git a/indra/newview/llclassifiedstatsresponder.cpp b/indra/newview/llclassifiedstatsresponder.cpp
index e3cd83e174..bc7815fba2 100755
--- a/indra/newview/llclassifiedstatsresponder.cpp
+++ b/indra/newview/llclassifiedstatsresponder.cpp
@@ -38,10 +38,8 @@
#include "message.h"
LLClassifiedStatsResponder::LLClassifiedStatsResponder(LLUUID classified_id)
-:
-mClassifiedID(classified_id)
-{
-}
+: mClassifiedID(classified_id)
+{}
/*virtual*/
void LLClassifiedStatsResponder::result(const LLSD& content)
@@ -53,16 +51,15 @@ void LLClassifiedStatsResponder::result(const LLSD& content)
S32 search_map = content["search_map_clicks"].asInteger();
S32 search_profile = content["search_profile_clicks"].asInteger();
- LLPanelClassifiedInfo::setClickThrough(
- mClassifiedID,
- teleport + search_teleport,
- map + search_map,
- profile + search_profile,
- true);
+ LLPanelClassifiedInfo::setClickThrough( mClassifiedID,
+ teleport + search_teleport,
+ map + search_map,
+ profile + search_profile,
+ true);
}
/*virtual*/
void LLClassifiedStatsResponder::errorWithContent(U32 status, const std::string& reason, const LLSD& content)
{
- llinfos << "LLClassifiedStatsResponder::error [status:" << status << "]: " << content << llendl;
+ LL_INFOS() << "LLClassifiedStatsResponder::error [status:" << status << "]: " << content << LL_ENDL;
}
diff --git a/indra/newview/llcofwearables.cpp b/indra/newview/llcofwearables.cpp
index e200e0ee9e..8ce5aca909 100755
--- a/indra/newview/llcofwearables.cpp
+++ b/indra/newview/llcofwearables.cpp
@@ -382,14 +382,14 @@ void LLCOFWearables::refresh()
const LLUUID cof_id = LLAppearanceMgr::instance().getCOF();
if (cof_id.isNull())
{
- llwarns << "COF ID cannot be NULL" << llendl;
+ LL_WARNS() << "COF ID cannot be NULL" << LL_ENDL;
return;
}
LLViewerInventoryCategory* catp = gInventory.getCategory(cof_id);
if (!catp)
{
- llwarns << "COF category cannot be NULL" << llendl;
+ LL_WARNS() << "COF category cannot be NULL" << LL_ENDL;
return;
}
@@ -477,7 +477,7 @@ void LLCOFWearables::populateAttachmentsAndBodypartsLists(const LLInventoryModel
{
for (U32 i = 0; i < cof_items.size(); ++i)
{
- LLViewerInventoryItem* item = cof_items.get(i);
+ LLViewerInventoryItem* item = cof_items.at(i);
if (!item) continue;
const LLAssetType::EType item_type = item->getType();
diff --git a/indra/newview/llcolorswatch.cpp b/indra/newview/llcolorswatch.cpp
index f1f7da5fd1..a03178adf6 100755
--- a/indra/newview/llcolorswatch.cpp
+++ b/indra/newview/llcolorswatch.cpp
@@ -37,13 +37,11 @@
#include "llui.h"
#include "llrender.h"
#include "lluiconstants.h"
-#include "llviewercontrol.h"
#include "llbutton.h"
-#include "lltextbox.h"
#include "llfloatercolorpicker.h"
#include "llviewborder.h"
-#include "llviewertexturelist.h"
#include "llfocusmgr.h"
+#include "lltextbox.h"
static LLDefaultChildRegistry::Register<LLColorSwatchCtrl> r("color_swatch");
@@ -239,16 +237,9 @@ void LLColorSwatchCtrl::draw()
}
else
{
- if (!mFallbackImageName.empty())
+ if (mFallbackImage.notNull())
{
- LLPointer<LLViewerFetchedTexture> fallback_image = LLViewerTextureManager::getFetchedTextureFromFile(mFallbackImageName, FTT_LOCAL_FILE, TRUE,
- LLGLTexture::BOOST_NONE, LLViewerTexture::LOD_TEXTURE);
- if( fallback_image->getComponents() == 4 )
- {
- gl_rect_2d_checkerboard( interior );
- }
- gl_draw_scaled_image( interior.mLeft, interior.mBottom, interior.getWidth(), interior.getHeight(), fallback_image, LLColor4::white % alpha);
- fallback_image->addTextureStats( (F32)(interior.getWidth() * interior.getHeight()) );
+ mFallbackImage->draw(interior.mLeft, interior.mBottom, interior.getWidth(), interior.getHeight(), LLColor4::white % alpha);
}
else
{
diff --git a/indra/newview/llcolorswatch.h b/indra/newview/llcolorswatch.h
index 5bdd1712d2..df907567ab 100755
--- a/indra/newview/llcolorswatch.h
+++ b/indra/newview/llcolorswatch.h
@@ -30,16 +30,13 @@
#include "lluictrl.h"
#include "v4color.h"
#include "llfloater.h"
-#include "llviewertexture.h"
#include "lltextbox.h"
//
// Classes
//
class LLColor4;
-class LLTextBox;
class LLFloaterColorPicker;
-class LLViewerTexture;
class LLColorSwatchCtrl
: public LLUICtrl
@@ -87,7 +84,7 @@ public:
void setCanApplyImmediately(BOOL apply) { mCanApplyImmediately = apply; }
void setOnCancelCallback(commit_callback_t cb) { mOnCancelCallback = cb; }
void setOnSelectCallback(commit_callback_t cb) { mOnSelectCallback = cb; }
- void setFallbackImageName(const std::string& name) { mFallbackImageName = name; }
+ void setFallbackImage(LLPointer<LLUIImage> image) { mFallbackImage = image; }
void showPicker(BOOL take_focus);
@@ -103,20 +100,20 @@ public:
void closeFloaterColorPicker();
protected:
- BOOL mValid;
- LLColor4 mColor;
- LLUIColor mBorderColor;
- LLTextBox* mCaption;
- LLHandle<LLFloater> mPickerHandle;
- LLViewBorder* mBorder;
- BOOL mCanApplyImmediately;
- commit_callback_t mOnCancelCallback;
- commit_callback_t mOnSelectCallback;
- S32 mLabelWidth;
- S32 mLabelHeight;
+ bool mValid;
+ LLColor4 mColor;
+ LLUIColor mBorderColor;
+ LLTextBox* mCaption;
+ LLHandle<LLFloater> mPickerHandle;
+ class LLViewBorder* mBorder;
+ bool mCanApplyImmediately;
+ commit_callback_t mOnCancelCallback,
+ mOnSelectCallback;
+ S32 mLabelWidth,
+ mLabelHeight;
LLPointer<LLUIImage> mAlphaGradientImage;
- std::string mFallbackImageName;
+ LLPointer<LLUIImage> mFallbackImage;
};
#endif // LL_LLBUTTON_H
diff --git a/indra/newview/llcommandlineparser.cpp b/indra/newview/llcommandlineparser.cpp
index a6384ded12..06164e9597 100755
--- a/indra/newview/llcommandlineparser.cpp
+++ b/indra/newview/llcommandlineparser.cpp
@@ -302,13 +302,13 @@ bool LLCommandLineParser::parseAndStoreResults(po::command_line_parser& clp)
}
catch(po::error& e)
{
- llwarns << "Caught Error:" << e.what() << llendl;
+ LL_WARNS() << "Caught Error:" << e.what() << LL_ENDL;
mErrorMsg = e.what();
return false;
}
catch(LLCLPError& e)
{
- llwarns << "Caught Error:" << e.what() << llendl;
+ LL_WARNS() << "Caught Error:" << e.what() << LL_ENDL;
mErrorMsg = e.what();
return false;
}
@@ -348,7 +348,7 @@ bool LLCommandLineParser::parseAndStoreResults(po::command_line_parser& clp)
<< last_option << " "
<< last_value;
- llwarns << msg.str() << llendl;
+ LL_WARNS() << msg.str() << LL_ENDL;
mErrorMsg = msg.str();
return false;
}
@@ -412,7 +412,7 @@ bool LLCommandLineParser::notify()
}
catch (const LLCLPError& e)
{
- llwarns << "Caught Error: " << e.what() << llendl;
+ LL_WARNS() << "Caught Error: " << e.what() << LL_ENDL;
mErrorMsg = e.what();
return false;
}
@@ -430,7 +430,7 @@ void LLCommandLineParser::printOptions() const
{
oss << t_itr->c_str() << " ";
}
- llinfos << oss.str() << llendl;
+ LL_INFOS() << oss.str() << LL_ENDL;
}
}
@@ -470,8 +470,8 @@ onevalue(const std::string& option,
}
else if (value.size() > 1)
{
- llwarns << "Ignoring extra tokens specified for --"
- << option << "." << llendl;
+ LL_WARNS() << "Ignoring extra tokens specified for --"
+ << option << "." << LL_ENDL;
}
return value[0];
}
@@ -609,8 +609,8 @@ void setControlValueCB(const LLCommandLineParser::token_vector_t& value,
// This isn't anything a user can affect -- it's a misconfiguration on
// the part of the coder. Rub the coder's nose in the problem right
// away so even preliminary testing will surface it.
- llerrs << "Command Line option --" << option
- << " maps to unknown setting!" << llendl;
+ LL_ERRS() << "Command Line option --" << option
+ << " maps to unknown setting!" << LL_ENDL;
}
}
} // anonymous namespace
@@ -681,8 +681,8 @@ void LLControlGroupCLP::configure(const std::string& config_filename, LLControlG
std::set<std::string>::const_iterator found = unmapped_options.find(long_name);
if (found == unmapped_options.end())
{
- llerrs << "New command-line option " << long_name
- << " should map-to a variable in settings.xml" << llendl;
+ LL_ERRS() << "New command-line option " << long_name
+ << " should map-to a variable in settings.xml" << LL_ENDL;
}
}
else // option specifies map-to
@@ -690,15 +690,15 @@ void LLControlGroupCLP::configure(const std::string& config_filename, LLControlG
std::string controlName = option_params["map-to"].asString();
if (! controlGroup)
{
- llerrs << "Must pass gSavedSettings to LLControlGroupCLP::configure() for "
- << long_name << " (map-to " << controlName << ")" << llendl;
+ LL_ERRS() << "Must pass gSavedSettings to LLControlGroupCLP::configure() for "
+ << long_name << " (map-to " << controlName << ")" << LL_ENDL;
}
LLControlVariable* ctrl = controlGroup->getControl(controlName);
if (! ctrl)
{
- llerrs << "Option " << long_name << " specifies map-to " << controlName
- << " which does not exist" << llendl;
+ LL_ERRS() << "Option " << long_name << " specifies map-to " << controlName
+ << " which does not exist" << LL_ENDL;
}
callback = boost::bind(setControlValueCB, _1, long_name, ctrl);
diff --git a/indra/newview/llcompilequeue.cpp b/indra/newview/llcompilequeue.cpp
index 4588424474..b0916d769a 100755
--- a/indra/newview/llcompilequeue.cpp
+++ b/indra/newview/llcompilequeue.cpp
@@ -45,7 +45,6 @@
#include "llviewerobject.h"
#include "llviewerobjectlist.h"
#include "llviewerregion.h"
-#include "lscript_rt_interface.h"
#include "llviewercontrol.h"
#include "llviewerobject.h"
#include "llviewerregion.h"
@@ -112,8 +111,8 @@ void LLFloaterScriptQueue::inventoryChanged(LLViewerObject* viewer_object,
S32,
void* q_id)
{
- llinfos << "LLFloaterScriptQueue::inventoryChanged() for object "
- << viewer_object->getID() << llendl;
+ LL_INFOS() << "LLFloaterScriptQueue::inventoryChanged() for object "
+ << viewer_object->getID() << LL_ENDL;
//Remove this listener from the object since its
//listener callback is now being executed.
@@ -138,8 +137,8 @@ void LLFloaterScriptQueue::inventoryChanged(LLViewerObject* viewer_object,
// something went wrong...
// note that we're not working on this one, and move onto the
// next object in the list.
- llwarns << "No inventory for " << mCurrentObjectID
- << llendl;
+ LL_WARNS() << "No inventory for " << mCurrentObjectID
+ << LL_ENDL;
nextObject();
}
}
@@ -154,7 +153,7 @@ void LLFloaterScriptQueue::onCloseBtn(void* user_data)
void LLFloaterScriptQueue::addObject(const LLUUID& id)
{
- mObjectIDs.put(id);
+ mObjectIDs.push_back(id);
}
BOOL LLFloaterScriptQueue::start()
@@ -163,7 +162,7 @@ BOOL LLFloaterScriptQueue::start()
LLStringUtil::format_map_t args;
args["[START]"] = mStartString;
- args["[COUNT]"] = llformat ("%d", mObjectIDs.count());
+ args["[COUNT]"] = llformat ("%d", mObjectIDs.size());
buffer = getString ("Starting", args);
getChild<LLScrollListCtrl>("queue output")->addSimpleElement(buffer, ADD_BOTTOM);
@@ -173,29 +172,29 @@ BOOL LLFloaterScriptQueue::start()
BOOL LLFloaterScriptQueue::isDone() const
{
- return (mCurrentObjectID.isNull() && (mObjectIDs.count() == 0));
+ return (mCurrentObjectID.isNull() && (mObjectIDs.size() == 0));
}
// go to the next object. If no objects left, it falls out silently
// and waits to be killed by the window being closed.
BOOL LLFloaterScriptQueue::nextObject()
{
- S32 count;
+ U32 count;
BOOL successful_start = FALSE;
do
{
- count = mObjectIDs.count();
- llinfos << "LLFloaterScriptQueue::nextObject() - " << count
- << " objects left to process." << llendl;
+ count = mObjectIDs.size();
+ LL_INFOS() << "LLFloaterScriptQueue::nextObject() - " << count
+ << " objects left to process." << LL_ENDL;
mCurrentObjectID.setNull();
if(count > 0)
{
successful_start = popNext();
}
- llinfos << "LLFloaterScriptQueue::nextObject() "
+ LL_INFOS() << "LLFloaterScriptQueue::nextObject() "
<< (successful_start ? "successful" : "unsuccessful")
- << llendl;
- } while((mObjectIDs.count() > 0) && !successful_start);
+ << LL_ENDL;
+ } while((mObjectIDs.size() > 0) && !successful_start);
if(isDone() && !mDone)
{
mDone = true;
@@ -212,18 +211,18 @@ BOOL LLFloaterScriptQueue::popNext()
// get the first element off of the container, and attempt to get
// the inventory.
BOOL rv = FALSE;
- S32 count = mObjectIDs.count();
+ S32 count = mObjectIDs.size();
if(mCurrentObjectID.isNull() && (count > 0))
{
- mCurrentObjectID = mObjectIDs.get(0);
- llinfos << "LLFloaterScriptQueue::popNext() - mCurrentID: "
- << mCurrentObjectID << llendl;
- mObjectIDs.remove(0);
+ mCurrentObjectID = mObjectIDs.at(0);
+ LL_INFOS() << "LLFloaterScriptQueue::popNext() - mCurrentID: "
+ << mCurrentObjectID << LL_ENDL;
+ mObjectIDs.erase(mObjectIDs.begin());
LLViewerObject* obj = gObjectList.findObject(mCurrentObjectID);
if(obj)
{
- llinfos << "LLFloaterScriptQueue::popNext() requesting inv for "
- << mCurrentObjectID << llendl;
+ LL_INFOS() << "LLFloaterScriptQueue::popNext() requesting inv for "
+ << mCurrentObjectID << LL_ENDL;
LLUUID* id = new LLUUID(getKey().asUUID());
registerVOInventoryListener(obj,id);
requestVOInventory();
@@ -306,7 +305,7 @@ void LLFloaterCompileQueue::handleInventory(LLViewerObject *viewer_object,
item->getPermissions().allowCopyBy(gAgent.getID(), gAgent.getGroupID()) )
{
LLPointer<LLViewerInventoryItem> script = new LLViewerInventoryItem(item);
- mCurrentScripts.put(script);
+ mCurrentScripts.push_back(script);
asset_item_map.insert(std::make_pair(item->getAssetUUID(), item));
}
}
@@ -329,7 +328,7 @@ void LLFloaterCompileQueue::handleInventory(LLViewerObject *viewer_object,
viewer_object->getID(),
itemp->getUUID());
- //llinfos << "ITEM NAME 2: " << names.get(i) << llendl;
+ //LL_INFOS() << "ITEM NAME 2: " << names.get(i) << LL_ENDL;
gAssetStorage->getInvItemAsset(viewer_object->getRegion()->getHost(),
gAgent.getID(),
gAgent.getSessionID(),
@@ -350,7 +349,7 @@ void LLFloaterCompileQueue::scriptArrived(LLVFS *vfs, const LLUUID& asset_id,
LLAssetType::EType type,
void* user_data, S32 status, LLExtStat ext_status)
{
- llinfos << "LLFloaterCompileQueue::scriptArrived()" << llendl;
+ LL_INFOS() << "LLFloaterCompileQueue::scriptArrived()" << LL_ENDL;
LLScriptQueueData* data = (LLScriptQueueData*)user_data;
if(!data)
{
@@ -361,7 +360,7 @@ void LLFloaterCompileQueue::scriptArrived(LLVFS *vfs, const LLUUID& asset_id,
std::string buffer;
if(queue && (0 == status))
{
- //llinfos << "ITEM NAME 3: " << data->mScriptName << llendl;
+ //LL_INFOS() << "ITEM NAME 3: " << data->mScriptName << LL_ENDL;
// Dump this into a file on the local disk so we can compile it.
std::string filename;
@@ -388,44 +387,12 @@ void LLFloaterCompileQueue::scriptArrived(LLVFS *vfs, const LLUUID& asset_id,
}
else
{
- // It's now in the file, now compile it.
- buffer = LLTrans::getString("CompileQueueDownloadedCompiling") + (": ") + data->mScriptName;
-
- // Write script to local file for compilation.
- LLFILE *fp = LLFile::fopen(filename, "wb"); /*Flawfinder: ignore*/
- if (fp)
- {
- const S32 buf_size = 65536;
- U8 copy_buf[buf_size];
-
- while (file.read(copy_buf, buf_size)) /*Flawfinder: ignore*/
- {
- if (fwrite(copy_buf, file.getLastBytesRead(), 1, fp) < 1)
- {
- // return a bad file error if we can't write the whole thing
- status = LL_ERR_CANNOT_OPEN_FILE;
- }
- }
-
- fclose(fp);
- }
- else
- {
- llerrs << "Unable to find object to compile" << llendl;
- }
-
- // TODO: babbage: No compile if no cap.
- queue->compile(filename, data->mItemId);
-
- // Delete it after we're done compiling?
- LLFile::remove(filename);
+ buffer = LLTrans::getString("CompileQueueServiceUnavailable") + (": ") + data->mScriptName;
}
}
}
else
{
- LLViewerStats::getInstance()->incStat( LLViewerStats::ST_DOWNLOAD_FAILED );
-
if( LL_ERR_ASSET_REQUEST_NOT_IN_DATABASE == status )
{
LLSD args;
@@ -447,7 +414,7 @@ void LLFloaterCompileQueue::scriptArrived(LLVFS *vfs, const LLUUID& asset_id,
buffer = LLTrans::getString("CompileQueueUnknownFailure") + (" ") + data->mScriptName;
}
- llwarns << "Problem downloading script asset." << llendl;
+ LL_WARNS() << "Problem downloading script asset." << LL_ENDL;
if(queue) queue->removeItemByItemID(data->mItemId);
}
if(queue && (buffer.size() > 0))
@@ -457,138 +424,6 @@ void LLFloaterCompileQueue::scriptArrived(LLVFS *vfs, const LLUUID& asset_id,
delete data;
}
-// static
-void LLFloaterCompileQueue::onSaveTextComplete(const LLUUID& asset_id, void* user_data, S32 status, LLExtStat ext_status) // StoreAssetData callback (fixed)
-{
- llinfos << "LLFloaterCompileQueue::onSaveTextComplete()" << llendl;
- if (status)
- {
- llwarns << "Unable to save text for script." << llendl;
- LLSD args;
- args["REASON"] = std::string(LLAssetStorage::getErrorString(status));
- LLNotificationsUtil::add("CompileQueueSaveText", args);
- }
-}
-
-// static
-void LLFloaterCompileQueue::onSaveBytecodeComplete(const LLUUID& asset_id, void* user_data, S32 status, LLExtStat ext_status) // StoreAssetData callback (fixed)
-{
- llinfos << "LLFloaterCompileQueue::onSaveBytecodeComplete()" << llendl;
- LLCompileQueueData* data = (LLCompileQueueData*)user_data;
- LLFloaterCompileQueue* queue = LLFloaterReg::findTypedInstance<LLFloaterCompileQueue>("compile_queue", data->mQueueID);
- if(queue && (0 == status) && data)
- {
- queue->saveItemByItemID(data->mItemId);
- queue->removeItemByItemID(data->mItemId);
- }
- else
- {
- llwarns << "Unable to save bytecode for script." << llendl;
- LLSD args;
- args["REASON"] = std::string(LLAssetStorage::getErrorString(status));
- LLNotificationsUtil::add("CompileQueueSaveBytecode", args);
- }
- delete data;
- data = NULL;
-}
-
-// compile the file given and save it out.
-void LLFloaterCompileQueue::compile(const std::string& filename,
- const LLUUID& item_id)
-{
- LLUUID new_asset_id;
- LLTransactionID tid;
- tid.generate();
- new_asset_id = tid.makeAssetID(gAgent.getSecureSessionID());
-
- std::string uuid_string;
- new_asset_id.toString(uuid_string);
- std::string dst_filename;
- dst_filename = gDirUtilp->getExpandedFilename(LL_PATH_CACHE,uuid_string) + ".lso";
- std::string err_filename;
- err_filename = gDirUtilp->getExpandedFilename(LL_PATH_CACHE,uuid_string) + ".out";
-
- gAssetStorage->storeAssetData(filename, tid,
- LLAssetType::AT_LSL_TEXT,
- &onSaveTextComplete, NULL, FALSE);
-
- const BOOL compile_to_mono = FALSE;
- if(!lscript_compile(filename.c_str(), dst_filename.c_str(),
- err_filename.c_str(), compile_to_mono,
- uuid_string.c_str(), gAgent.isGodlike()))
- {
- llwarns << "compile failed" << llendl;
- removeItemByItemID(item_id);
- }
- else
- {
- llinfos << "compile successful." << llendl;
-
- // Save LSL bytecode
- LLCompileQueueData* data = new LLCompileQueueData(getKey().asUUID(), item_id);
- gAssetStorage->storeAssetData(dst_filename, new_asset_id,
- LLAssetType::AT_LSL_BYTECODE,
- &LLFloaterCompileQueue::onSaveBytecodeComplete,
- (void*)data, FALSE);
- }
-}
-
-void LLFloaterCompileQueue::removeItemByItemID(const LLUUID& asset_id)
-{
- llinfos << "LLFloaterCompileQueue::removeItemByAssetID()" << llendl;
- for(S32 i = 0; i < mCurrentScripts.count(); )
- {
- if(asset_id == mCurrentScripts.get(i)->getUUID())
- {
- mCurrentScripts.remove(i);
- }
- else
- {
- ++i;
- }
- }
- if(mCurrentScripts.count() == 0)
- {
- nextObject();
- }
-}
-
-const LLInventoryItem* LLFloaterCompileQueue::findItemByItemID(const LLUUID& asset_id) const
-{
- LLInventoryItem* result = NULL;
- S32 count = mCurrentScripts.count();
- for(S32 i = 0; i < count; ++i)
- {
- if(asset_id == mCurrentScripts.get(i)->getUUID())
- {
- result = mCurrentScripts.get(i);
- }
- }
- return result;
-}
-
-void LLFloaterCompileQueue::saveItemByItemID(const LLUUID& asset_id)
-{
- llinfos << "LLFloaterCompileQueue::saveItemByAssetID()" << llendl;
- LLViewerObject* viewer_object = gObjectList.findObject(mCurrentObjectID);
- if(viewer_object)
- {
- S32 count = mCurrentScripts.count();
- for(S32 i = 0; i < count; ++i)
- {
- if(asset_id == mCurrentScripts.get(i)->getUUID())
- {
- // *FIX: this auto-resets active to TRUE. That might
- // be a bad idea.
- viewer_object->saveScript(mCurrentScripts.get(i), TRUE, false);
- }
- }
- }
- else
- {
- llwarns << "Unable to finish save!" << llendl;
- }
-}
///----------------------------------------------------------------------------
/// Class LLFloaterResetQueue
@@ -610,8 +445,7 @@ void LLFloaterResetQueue::handleInventory(LLViewerObject* viewer_obj,
{
// find all of the lsl, leaving off duplicates. We'll remove
// all matching asset uuids on compilation success.
- LLDynamicArray<const char*> names;
-
+
LLInventoryObject::object_list_t::const_iterator it = inv->begin();
LLInventoryObject::object_list_t::const_iterator end = inv->end();
for ( ; it != end; ++it)
@@ -662,8 +496,6 @@ void LLFloaterRunQueue::handleInventory(LLViewerObject* viewer_obj,
{
// find all of the lsl, leaving off duplicates. We'll remove
// all matching asset uuids on compilation success.
- LLDynamicArray<const char*> names;
-
LLInventoryObject::object_list_t::const_iterator it = inv->begin();
LLInventoryObject::object_list_t::const_iterator end = inv->end();
for ( ; it != end; ++it)
@@ -712,13 +544,31 @@ LLFloaterNotRunQueue::~LLFloaterNotRunQueue()
{
}
+void LLFloaterCompileQueue::removeItemByItemID(const LLUUID& asset_id)
+{
+ LL_INFOS() << "LLFloaterCompileQueue::removeItemByAssetID()" << LL_ENDL;
+ for(S32 i = 0; i < mCurrentScripts.size(); )
+ {
+ if(asset_id == mCurrentScripts.at(i)->getUUID())
+ {
+ vector_replace_with_last(mCurrentScripts, mCurrentScripts.begin() + i);
+ }
+ else
+ {
+ ++i;
+ }
+ }
+ if(mCurrentScripts.empty())
+ {
+ nextObject();
+ }
+}
+
void LLFloaterNotRunQueue::handleInventory(LLViewerObject* viewer_obj,
LLInventoryObject::object_list_t* inv)
{
// find all of the lsl, leaving off duplicates. We'll remove
// all matching asset uuids on compilation success.
- LLDynamicArray<const char*> names;
-
LLInventoryObject::object_list_t::const_iterator it = inv->begin();
LLInventoryObject::object_list_t::const_iterator end = inv->end();
for ( ; it != end; ++it)
diff --git a/indra/newview/llcompilequeue.h b/indra/newview/llcompilequeue.h
index 4ddab29d00..28f4625de8 100755
--- a/indra/newview/llcompilequeue.h
+++ b/indra/newview/llcompilequeue.h
@@ -27,11 +27,9 @@
#ifndef LL_LLCOMPILEQUEUE_H
#define LL_LLCOMPILEQUEUE_H
-#include "lldarray.h"
#include "llinventory.h"
#include "llviewerobject.h"
#include "llvoinventorylistener.h"
-#include "llmap.h"
#include "lluuid.h"
#include "llfloater.h"
@@ -96,7 +94,7 @@ protected:
LLButton* mCloseBtn;
// Object Queue
- LLDynamicArray<LLUUID> mObjectIDs;
+ std::vector<LLUUID> mObjectIDs;
LLUUID mCurrentObjectID;
bool mDone;
@@ -146,24 +144,6 @@ protected:
LLAssetType::EType type,
void* user_data, S32 status, LLExtStat ext_status);
- static void onSaveTextComplete(const LLUUID& asset_id, void* user_data, S32 status, LLExtStat ext_status);
-
- static void onSaveBytecodeComplete(const LLUUID& asset_id,
- void* user_data,
- S32 status, LLExtStat ext_status);
-
- // compile the file given and save it out.
- void compile(const std::string& filename, const LLUUID& asset_id);
-
- // remove any object in mScriptScripts with the matching uuid.
- void removeItemByAssetID(const LLUUID& asset_id);
-
- // save the items indicated by the item id.
- void saveItemByItemID(const LLUUID& item_id);
-
- // find InventoryItem given item id.
- const LLInventoryItem* findItemByItemID(const LLUUID& item_id) const;
-
protected:
LLViewerInventoryItem::item_array_t mCurrentScripts;
diff --git a/indra/newview/llconversationlog.cpp b/indra/newview/llconversationlog.cpp
index 7883e4cb89..05c7e6caa5 100755
--- a/indra/newview/llconversationlog.cpp
+++ b/indra/newview/llconversationlog.cpp
@@ -35,23 +35,18 @@
#include <boost/foreach.hpp>
#include "boost/lexical_cast.hpp"
-const int CONVERSATION_LIFETIME = 30; // lifetime of LLConversation is 30 days by spec
-
-struct ConversationParams
-{
- ConversationParams(time_t time)
- : mTime(time),
- mTimestamp(LLConversation::createTimestamp(time))
- {}
-
- time_t mTime;
- std::string mTimestamp;
- SessionType mConversationType;
- std::string mConversationName;
- std::string mHistoryFileName;
- LLUUID mSessionID;
- LLUUID mParticipantID;
- bool mHasOfflineIMs;
+const S32Days CONVERSATION_LIFETIME = (S32Days)30; // lifetime of LLConversation is 30 days by spec
+
+struct ConversationParams : public LLInitParam::Block<ConversationParams>
+{
+ Mandatory<U64Seconds > time;
+ Mandatory<std::string> timestamp;
+ Mandatory<SessionType> conversation_type;
+ Mandatory<std::string> conversation_name,
+ history_filename;
+ Mandatory<LLUUID> session_id,
+ participant_id;
+ Mandatory<bool> has_offline_ims;
};
/************************************************************************/
@@ -59,14 +54,14 @@ struct ConversationParams
/************************************************************************/
LLConversation::LLConversation(const ConversationParams& params)
-: mTime(params.mTime),
- mTimestamp(params.mTimestamp),
- mConversationType(params.mConversationType),
- mConversationName(params.mConversationName),
- mHistoryFileName(params.mHistoryFileName),
- mSessionID(params.mSessionID),
- mParticipantID(params.mParticipantID),
- mHasOfflineIMs(params.mHasOfflineIMs)
+: mTime(params.time),
+ mTimestamp(params.timestamp.isProvided() ? params.timestamp : createTimestamp(params.time)),
+ mConversationType(params.conversation_type),
+ mConversationName(params.conversation_name),
+ mHistoryFileName(params.history_filename),
+ mSessionID(params.session_id),
+ mParticipantID(params.participant_id),
+ mHasOfflineIMs(params.has_offline_ims)
{
setListenIMFloaterOpened();
}
@@ -77,7 +72,7 @@ LLConversation::LLConversation(const LLIMModel::LLIMSession& session)
mConversationType(session.mSessionType),
mConversationName(session.mName),
mHistoryFileName(session.mHistoryFileName),
- mSessionID(session.isOutgoingAdHoc() ? session.generateOutgouigAdHocHash() : session.mSessionID),
+ mSessionID(session.isOutgoingAdHoc() ? session.generateOutgoingAdHocHash() : session.mSessionID),
mParticipantID(session.mOtherParticipantID),
mHasOfflineIMs(session.mHasOfflineMessage)
{
@@ -105,7 +100,7 @@ LLConversation::~LLConversation()
void LLConversation::updateTimestamp()
{
- mTime = time_corrected();
+ mTime = (U64Seconds)time_corrected();
mTimestamp = createTimestamp(mTime);
}
@@ -118,11 +113,11 @@ void LLConversation::onIMFloaterShown(const LLUUID& session_id)
}
// static
-const std::string LLConversation::createTimestamp(const time_t& utc_time)
+const std::string LLConversation::createTimestamp(const U64Seconds& utc_time)
{
std::string timeStr;
LLSD substitution;
- substitution["datetime"] = (S32) utc_time;
+ substitution["datetime"] = (S32)utc_time.value();
timeStr = "["+LLTrans::getString ("TimeMonth")+"]/["
+LLTrans::getString ("TimeDay")+"]/["
@@ -135,10 +130,10 @@ const std::string LLConversation::createTimestamp(const time_t& utc_time)
return timeStr;
}
-bool LLConversation::isOlderThan(U32 days) const
+bool LLConversation::isOlderThan(U32Days days) const
{
- time_t now = time_corrected();
- U32 age = (U32)((now - mTime) / SEC_PER_DAY); // age of conversation in days
+ U64Seconds now(time_corrected());
+ U32Days age = now - mTime;
return age > days;
}
@@ -318,7 +313,7 @@ LLConversation* LLConversationLog::findConversation(const LLIMModel::LLIMSession
{
if (session)
{
- const LLUUID session_id = session->isOutgoingAdHoc() ? session->generateOutgouigAdHocHash() : session->mSessionID;
+ const LLUUID session_id = session->isOutgoingAdHoc() ? session->generateOutgoingAdHocHash() : session->mSessionID;
conversations_vec_t::iterator conv_it = mConversations.begin();
for(; conv_it != mConversations.end(); ++conv_it)
@@ -460,14 +455,14 @@ bool LLConversationLog::saveToFile(const std::string& filename)
{
if (!filename.size())
{
- llwarns << "Call log list filename is empty!" << llendl;
+ LL_WARNS() << "Call log list filename is empty!" << LL_ENDL;
return false;
}
LLFILE* fp = LLFile::fopen(filename, "wb");
if (!fp)
{
- llwarns << "Couldn't open call log list" << filename << llendl;
+ LL_WARNS() << "Couldn't open call log list" << filename << LL_ENDL;
return false;
}
@@ -485,7 +480,7 @@ bool LLConversationLog::saveToFile(const std::string& filename)
// [1343222639] 2 0 0 Ad-hoc Conference| c3g67c89-c479-4c97-b21d-32869bcfe8rc 68f1c33e-4135-3e3e-a897-8c9b23115c09 Ad-hoc Conference hash597394a0-9982-766d-27b8-c75560213b9a|
fprintf(fp, "[%lld] %d %d %d %s| %s %s %s|\n",
- (S64)conv_it->getTime(),
+ (S64)conv_it->getTime().value(),
(S32)conv_it->getConversationType(),
(S32)0,
(S32)conv_it->hasOfflineMessages(),
@@ -501,14 +496,14 @@ bool LLConversationLog::loadFromFile(const std::string& filename)
{
if(!filename.size())
{
- llwarns << "Call log list filename is empty!" << llendl;
+ LL_WARNS() << "Call log list filename is empty!" << LL_ENDL;
return false;
}
LLFILE* fp = LLFile::fopen(filename, "rb");
if (!fp)
{
- llwarns << "Couldn't open call log list" << filename << llendl;
+ LL_WARNS() << "Couldn't open call log list" << filename << LL_ENDL;
return false;
}
@@ -539,13 +534,14 @@ bool LLConversationLog::loadFromFile(const std::string& filename)
conv_id_buffer,
history_file_name);
- ConversationParams params((time_t)time);
- params.mConversationType = (SessionType)stype;
- params.mHasOfflineIMs = has_offline_ims;
- params.mConversationName = std::string(conv_name_buffer);
- params.mParticipantID = LLUUID(part_id_buffer);
- params.mSessionID = LLUUID(conv_id_buffer);
- params.mHistoryFileName = std::string(history_file_name);
+ ConversationParams params;
+ params.time(LLUnits::Seconds::fromValue(time))
+ .conversation_type((SessionType)stype)
+ .has_offline_ims(has_offline_ims)
+ .conversation_name(conv_name_buffer)
+ .participant_id(LLUUID(part_id_buffer))
+ .session_id(LLUUID(conv_id_buffer))
+ .history_filename(history_file_name);
LLConversation conversation(params);
diff --git a/indra/newview/llconversationlog.h b/indra/newview/llconversationlog.h
index 265b1f0ef0..b38d472156 100755
--- a/indra/newview/llconversationlog.h
+++ b/indra/newview/llconversationlog.h
@@ -55,12 +55,13 @@ public:
const LLUUID& getSessionID() const { return mSessionID; }
const LLUUID& getParticipantID() const { return mParticipantID; }
const std::string& getTimestamp() const { return mTimestamp; }
- const time_t& getTime() const { return mTime; }
+ const U64Seconds&
+ getTime() const { return mTime; }
bool hasOfflineMessages() const { return mHasOfflineIMs; }
void setConversationName(std::string conv_name) { mConversationName = conv_name; }
void setOfflineMessages(bool new_messages) { mHasOfflineIMs = new_messages; }
- bool isOlderThan(U32 days) const;
+ bool isOlderThan(U32Days days) const;
/*
* updates last interaction time
@@ -75,7 +76,7 @@ public:
/*
* returns string representation(in form of: mm/dd/yyyy hh:mm) of time when conversation was started
*/
- static const std::string createTimestamp(const time_t& utc_time);
+ static const std::string createTimestamp(const U64Seconds& utc_time);
private:
@@ -87,7 +88,7 @@ private:
boost::signals2::connection mIMFloaterShowedConnection;
- time_t mTime; // last interaction time
+ U64Seconds mTime; // last interaction time
SessionType mConversationType;
std::string mConversationName;
std::string mHistoryFileName;
diff --git a/indra/newview/llconversationloglist.cpp b/indra/newview/llconversationloglist.cpp
index 44212298cf..ffc235bdbf 100755
--- a/indra/newview/llconversationloglist.cpp
+++ b/indra/newview/llconversationloglist.cpp
@@ -494,7 +494,7 @@ bool LLConversationLogListItemComparator::compare(const LLPanel* item1, const LL
if (!conversation_item1 || !conversation_item2)
{
- llerror("conversation_item1 and conversation_item2 cannot be null", 0);
+ LL_ERRS() << "conversation_item1 and conversation_item2 cannot be null" << LL_ENDL;
return true;
}
@@ -522,8 +522,8 @@ bool LLConversationLogListNameComparator::doCompare(const LLConversationLogListI
bool LLConversationLogListDateComparator::doCompare(const LLConversationLogListItem* conversation1, const LLConversationLogListItem* conversation2) const
{
- time_t date1 = conversation1->getConversation()->getTime();
- time_t date2 = conversation2->getConversation()->getTime();
+ U64Seconds date1 = conversation1->getConversation()->getTime();
+ U64Seconds date2 = conversation2->getConversation()->getTime();
const LLUUID& id1 = conversation1->getConversation()->getParticipantID();
const LLUUID& id2 = conversation2->getConversation()->getParticipantID();
diff --git a/indra/newview/llconversationmodel.cpp b/indra/newview/llconversationmodel.cpp
index affa24f78c..74b77f760d 100755
--- a/indra/newview/llconversationmodel.cpp
+++ b/indra/newview/llconversationmodel.cpp
@@ -361,7 +361,7 @@ void LLConversationItemSession::setDistance(const LLUUID& participant_id, F64 di
void LLConversationItemSession::buildContextMenu(LLMenuGL& menu, U32 flags)
{
- lldebugs << "LLConversationItemParticipant::buildContextMenu()" << llendl;
+ LL_DEBUGS() << "LLConversationItemParticipant::buildContextMenu()" << LL_ENDL;
menuentry_vec_t items;
menuentry_vec_t disabled_items;
if((flags & ITEM_IN_MULTI_SELECTION) && (this->getType() != CONV_SESSION_NEARBY))
@@ -439,7 +439,7 @@ const bool LLConversationItemSession::getTime(F64& time) const
void LLConversationItemSession::dumpDebugData(bool dump_children)
{
// Session info
- llinfos << "Merov debug : session " << this << ", uuid = " << mUUID << ", name = " << mName << ", is loaded = " << mIsLoaded << llendl;
+ LL_INFOS() << "Merov debug : session " << this << ", uuid = " << mUUID << ", name = " << mName << ", is loaded = " << mIsLoaded << LL_ENDL;
// Children info
if (dump_children)
{
@@ -557,7 +557,7 @@ LLConversationItemSession* LLConversationItemParticipant::getParentSession()
void LLConversationItemParticipant::dumpDebugData()
{
- llinfos << "Merov debug : participant, uuid = " << mUUID << ", name = " << mName << ", display name = " << mDisplayName << ", muted = " << isVoiceMuted() << ", moderator = " << mIsModerator << llendl;
+ LL_INFOS() << "Merov debug : participant, uuid = " << mUUID << ", name = " << mName << ", display name = " << mDisplayName << ", muted = " << isVoiceMuted() << ", moderator = " << mIsModerator << LL_ENDL;
}
void LLConversationItemParticipant::setDisplayModeratorRole(bool displayRole)
diff --git a/indra/newview/llconversationview.cpp b/indra/newview/llconversationview.cpp
index 90800fee58..4250aeacd6 100644
--- a/indra/newview/llconversationview.cpp
+++ b/indra/newview/llconversationview.cpp
@@ -127,10 +127,11 @@ void LLConversationViewSession::setHighlightState(bool hihglight_state)
void LLConversationViewSession::startFlashing()
{
- LLFloaterIMContainer* im_box = LLFloaterReg::getTypedInstance<LLFloaterIMContainer>("im_container");
-
// Need to start flashing only when "Conversations" is opened or brought on top
- if (isInVisibleChain() && !im_box->isMinimized() && mFlashStateOn && !mFlashStarted)
+ if (isInVisibleChain()
+ && mFlashStateOn
+ && !mFlashStarted
+ && ! LLFloaterReg::getTypedInstance<LLFloaterIMContainer>("im_container")->isMinimized() )
{
mFlashStarted = true;
mFlashTimer->startFlashing();
diff --git a/indra/newview/lldaycyclemanager.cpp b/indra/newview/lldaycyclemanager.cpp
index 8af2f4ea33..131675310e 100755
--- a/indra/newview/lldaycyclemanager.cpp
+++ b/indra/newview/lldaycyclemanager.cpp
@@ -193,7 +193,7 @@ bool LLDayCycleManager::loadPreset(const std::string& path)
LLSD data = LLWLDayCycle::loadDayCycleFromPath(path);
if (data.isUndefined())
{
- llwarns << "Error loading day cycle from " << path << llendl;
+ LL_WARNS() << "Error loading day cycle from " << path << LL_ENDL;
return false;
}
diff --git a/indra/newview/lldebugmessagebox.cpp b/indra/newview/lldebugmessagebox.cpp
index 9ad812ab1e..c8b9b1ac63 100755
--- a/indra/newview/lldebugmessagebox.cpp
+++ b/indra/newview/lldebugmessagebox.cpp
@@ -112,7 +112,7 @@ LLDebugVarMessageBox::LLDebugVarMessageBox(const std::string& title, EDebugVarTy
addChild(mSlider3);
break;
default:
- llwarns << "Unhandled var type " << var_type << llendl;
+ LL_WARNS() << "Unhandled var type " << var_type << LL_ENDL;
break;
}
@@ -234,7 +234,7 @@ void LLDebugVarMessageBox::sliderChanged(const LLSD& data)
break;
}
default:
- llwarns << "Unhandled var type " << mVarType << llendl;
+ LL_WARNS() << "Unhandled var type " << mVarType << LL_ENDL;
break;
}
}
@@ -263,7 +263,7 @@ void LLDebugVarMessageBox::draw()
break;
}
default:
- llwarns << "Unhandled var type " << mVarType << llendl;
+ LL_WARNS() << "Unhandled var type " << mVarType << LL_ENDL;
break;
}
mText->setText(text);
diff --git a/indra/newview/lldebugmessagebox.h b/indra/newview/lldebugmessagebox.h
index 211af9e074..87a0910662 100755
--- a/indra/newview/lldebugmessagebox.h
+++ b/indra/newview/lldebugmessagebox.h
@@ -28,7 +28,6 @@
#ifndef LL_LLDEBUGMESSAGEBOX_H
#define LL_LLDEBUGMESSAGEBOX_H
-#include "lldarray.h"
#include "llfloater.h"
#include "v3math.h"
#include "lltextbox.h"
diff --git a/indra/newview/lldebugview.cpp b/indra/newview/lldebugview.cpp
index aeecf054b8..dc1c085c88 100755
--- a/indra/newview/lldebugview.cpp
+++ b/indra/newview/lldebugview.cpp
@@ -33,14 +33,13 @@
#include "llconsole.h"
#include "lltextureview.h"
#include "llresmgr.h"
-#include "imageids.h"
#include "llviewercontrol.h"
#include "llviewerwindow.h"
#include "llappviewer.h"
#include "llsceneview.h"
#include "llviewertexture.h"
#include "llfloaterreg.h"
-
+#include "llscenemonitor.h"
//
// Globals
//
@@ -55,7 +54,6 @@ static LLDefaultChildRegistry::Register<LLDebugView> r("debug_view");
LLDebugView::LLDebugView(const LLDebugView::Params& p)
: LLView(p),
mFastTimerView(NULL),
- mMemoryView(NULL),
mDebugConsolep(NULL),
mFloaterSnapRegion(NULL)
{}
@@ -66,6 +64,7 @@ LLDebugView::~LLDebugView()
gDebugView = NULL;
gTextureView = NULL;
gSceneView = NULL;
+ gSceneMonitorView = NULL;
}
void LLDebugView::init()
@@ -90,7 +89,7 @@ void LLDebugView::init()
r.setLeftTopAndSize(25, rect.getHeight() - 50, (S32) (gViewerWindow->getWindowRectScaled().getWidth() * 0.75f),
(S32) (gViewerWindow->getWindowRectScaled().getHeight() * 0.75f));
- mFastTimerView = dynamic_cast<LLFastTimerView*>(LLFloaterReg::getInstance("fast_timers"));
+ mFastTimerView = dynamic_cast<LLFastTimerView*>(LLFloaterReg::getInstance("block_timers"));
gSceneView = new LLSceneView(r);
gSceneView->setFollowsTop();
@@ -99,6 +98,13 @@ void LLDebugView::init()
addChild(gSceneView);
gSceneView->setRect(rect);
+ gSceneMonitorView = new LLSceneMonitorView(r);
+ gSceneMonitorView->setFollowsTop();
+ gSceneMonitorView->setFollowsLeft();
+ gSceneMonitorView->setVisible(FALSE);
+ addChild(gSceneMonitorView);
+ gSceneMonitorView->setRect(rect);
+
r.setLeftTopAndSize(25, rect.getHeight() - 50, (S32) (gViewerWindow->getWindowRectScaled().getWidth() * 0.75f),
(S32) (gViewerWindow->getWindowRectScaled().getHeight() * 0.75f));
diff --git a/indra/newview/lldebugview.h b/indra/newview/lldebugview.h
index 5aec77ad62..a6490c876c 100755
--- a/indra/newview/lldebugview.h
+++ b/indra/newview/lldebugview.h
@@ -36,7 +36,6 @@
class LLButton;
class LLStatusPanel;
class LLFastTimerView;
-class LLMemoryView;
class LLConsole;
class LLTextureView;
class LLFloaterStats;
@@ -61,7 +60,6 @@ public:
void setStatsVisible(BOOL visible);
LLFastTimerView* mFastTimerView;
- LLMemoryView* mMemoryView;
LLConsole* mDebugConsolep;
LLView* mFloaterSnapRegion;
};
diff --git a/indra/newview/lldirpicker.cpp b/indra/newview/lldirpicker.cpp
index 4c4424edc4..5c4f0f4d5d 100755
--- a/indra/newview/lldirpicker.cpp
+++ b/indra/newview/lldirpicker.cpp
@@ -27,7 +27,6 @@
#include "llviewerprecompiledheaders.h"
#include "lldirpicker.h"
-//#include "llviewermessage.h"
#include "llworld.h"
#include "llviewerwindow.h"
#include "llkeyboard.h"
@@ -36,6 +35,7 @@
#include "lltrans.h"
#include "llwindow.h" // beforeDialog()
#include "llviewercontrol.h"
+#include "llwin32headerslean.h"
#if LL_LINUX || LL_SOLARIS || LL_DARWIN
# include "llfilepicker.h"
diff --git a/indra/newview/lldirpicker.h b/indra/newview/lldirpicker.h
index 9cc62431ef..8656b23afd 100755
--- a/indra/newview/lldirpicker.h
+++ b/indra/newview/lldirpicker.h
@@ -45,11 +45,6 @@
#endif
-// Need commdlg.h for OPENDIRNAMEA
-#ifdef LL_WINDOWS
-#include <commdlg.h>
-#endif
-
class LLFilePicker;
class LLDirPicker
diff --git a/indra/newview/lldonotdisturbnotificationstorage.cpp b/indra/newview/lldonotdisturbnotificationstorage.cpp
index 495cd01349..7836e2cb94 100755
--- a/indra/newview/lldonotdisturbnotificationstorage.cpp
+++ b/indra/newview/lldonotdisturbnotificationstorage.cpp
@@ -97,11 +97,11 @@ void LLDoNotDisturbNotificationStorage::resetDirty()
mDirty = false;
}
-static LLFastTimer::DeclareTimer FTM_SAVE_DND_NOTIFICATIONS("Save DND Notifications");
+static LLTrace::BlockTimerStatHandle FTM_SAVE_DND_NOTIFICATIONS("Save DND Notifications");
void LLDoNotDisturbNotificationStorage::saveNotifications()
{
- LLFastTimer _(FTM_SAVE_DND_NOTIFICATIONS);
+ LL_RECORD_BLOCK_TIME(FTM_SAVE_DND_NOTIFICATIONS);
LLNotificationChannelPtr channelPtr = getCommunicationChannel();
const LLCommunicationChannel *commChannel = dynamic_cast<LLCommunicationChannel*>(channelPtr.get());
@@ -128,11 +128,11 @@ void LLDoNotDisturbNotificationStorage::saveNotifications()
resetDirty();
}
-static LLFastTimer::DeclareTimer FTM_LOAD_DND_NOTIFICATIONS("Load DND Notifications");
+static LLTrace::BlockTimerStatHandle FTM_LOAD_DND_NOTIFICATIONS("Load DND Notifications");
void LLDoNotDisturbNotificationStorage::loadNotifications()
{
- LLFastTimer _(FTM_LOAD_DND_NOTIFICATIONS);
+ LL_RECORD_BLOCK_TIME(FTM_LOAD_DND_NOTIFICATIONS);
LL_INFOS("LLDoNotDisturbNotificationStorage") << "start loading notifications" << LL_ENDL;
diff --git a/indra/newview/lldrawable.cpp b/indra/newview/lldrawable.cpp
index 9682f38227..c56006d9a3 100755
--- a/indra/newview/lldrawable.cpp
+++ b/indra/newview/lldrawable.cpp
@@ -49,13 +49,14 @@
#include "llspatialpartition.h"
#include "llviewerobjectlist.h"
#include "llviewerwindow.h"
+#include "llvocache.h"
const F32 MIN_INTERPOLATE_DISTANCE_SQUARED = 0.001f * 0.001f;
const F32 MAX_INTERPOLATE_DISTANCE_SQUARED = 10.f * 10.f;
const F32 OBJECT_DAMPING_TIME_CONSTANT = 0.06f;
const F32 MIN_SHADOW_CASTER_RADIUS = 2.0f;
-static LLFastTimer::DeclareTimer FTM_CULL_REBOUND("Cull Rebound");
+static LLTrace::BlockTimerStatHandle FTM_CULL_REBOUND("Cull Rebound");
extern bool gShiftFrame;
@@ -75,43 +76,72 @@ extern bool gShiftFrame;
//
// static
-U32 LLDrawable::sCurVisible = 0;
U32 LLDrawable::sNumZombieDrawables = 0;
F32 LLDrawable::sCurPixelAngle = 0;
-LLDynamicArrayPtr<LLPointer<LLDrawable> > LLDrawable::sDeadList;
+std::vector<LLPointer<LLDrawable> > LLDrawable::sDeadList;
#define FORCE_INVISIBLE_AREA 16.f
// static
void LLDrawable::incrementVisible()
{
- sCurVisible++;
+ LLViewerOctreeEntryData::incrementVisible();
sCurPixelAngle = (F32) gViewerWindow->getWindowHeightRaw()/LLViewerCamera::getInstance()->getView();
}
-void LLDrawable::init()
+LLDrawable::LLDrawable(LLViewerObject *vobj, bool new_entry)
+: LLViewerOctreeEntryData(LLViewerOctreeEntry::LLDRAWABLE),
+ LLTrace::MemTrackable<LLDrawable, 16>("LLDrawable"),
+ mVObjp(vobj)
+{
+ init(new_entry);
+}
+
+void LLDrawable::init(bool new_entry)
{
// mXform
mParent = NULL;
mRenderType = 0;
mCurrentScale = LLVector3(1,1,1);
mDistanceWRTCamera = 0.0f;
- mPositionGroup.clear();
- mExtents[0].clear();
- mExtents[1].clear();
-
mState = 0;
- mVObjp = NULL;
+
// mFaces
- mSpatialGroupp = NULL;
- mVisible = sCurVisible - 2;//invisible for the current frame and the last frame.
mRadius = 0.f;
+ mGeneration = -1;
+ mSpatialBridge = NULL;
+
+ LLViewerOctreeEntry* entry = NULL;
+ LLVOCacheEntry* vo_entry = NULL;
+ if(!new_entry && mVObjp && getRegion() != NULL)
+ {
+ vo_entry = getRegion()->getCacheEntryForOctree(mVObjp->getLocalID());
+ if(vo_entry)
+ {
+ entry = vo_entry->getEntry();
+ }
+ }
+ setOctreeEntry(entry);
+ if(vo_entry)
+ {
+ if(!entry)
+ {
+ vo_entry->setOctreeEntry(mEntry);
+ }
+
+ getRegion()->addActiveCacheEntry(vo_entry);
+
+ if(vo_entry->getNumOfChildren() > 0)
+ {
+ getRegion()->addVisibleChildCacheEntry(vo_entry, NULL); //to load all children.
+ }
+
+ llassert(!vo_entry->getGroup()); //not in the object cache octree.
+ }
- mGeneration = -1;
- mBinRadius = 1.f;
- mBinIndex = -1;
+ llassert(!vo_entry || vo_entry->getEntry() == mEntry);
- mSpatialBridge = NULL;
+ initVisible(sCurVisible - 2);//invisible for the current frame and the last frame.
}
// static
@@ -140,7 +170,7 @@ void LLDrawable::destroy()
/* cannot be guaranteed and causes crashes on false alarms
if (LLSpatialGroup::sNoDelete)
{
- llerrs << "Illegal deletion of LLDrawable!" << llendl;
+ LL_ERRS() << "Illegal deletion of LLDrawable!" << LL_ENDL;
}*/
std::for_each(mFaces.begin(), mFaces.end(), DeletePointer());
@@ -149,7 +179,7 @@ void LLDrawable::destroy()
/*if (!(sNumZombieDrawables % 10))
{
- llinfos << "- Zombie drawables: " << sNumZombieDrawables << llendl;
+ LL_INFOS() << "- Zombie drawables: " << sNumZombieDrawables << LL_ENDL;
}*/
}
@@ -158,9 +188,10 @@ void LLDrawable::markDead()
{
if (isDead())
{
- llwarns << "Warning! Marking dead multiple times!" << llendl;
+ LL_WARNS() << "Warning! Marking dead multiple times!" << LL_ENDL;
return;
}
+ setState(DEAD);
if (mSpatialBridge)
{
@@ -171,9 +202,8 @@ void LLDrawable::markDead()
sNumZombieDrawables++;
// We're dead. Free up all of our references to other objects
- setState(DEAD);
cleanupReferences();
-// sDeadList.put(this);
+// sDeadList.push_back(this);
}
LLVOVolume* LLDrawable::getVOVolume() const
@@ -207,16 +237,16 @@ BOOL LLDrawable::isLight() const
}
}
-static LLFastTimer::DeclareTimer FTM_CLEANUP_DRAWABLE("Cleanup Drawable");
-static LLFastTimer::DeclareTimer FTM_DEREF_DRAWABLE("Deref");
-static LLFastTimer::DeclareTimer FTM_DELETE_FACES("Faces");
+static LLTrace::BlockTimerStatHandle FTM_CLEANUP_DRAWABLE("Cleanup Drawable");
+static LLTrace::BlockTimerStatHandle FTM_DEREF_DRAWABLE("Deref");
+static LLTrace::BlockTimerStatHandle FTM_DELETE_FACES("Faces");
void LLDrawable::cleanupReferences()
{
- LLFastTimer t(FTM_CLEANUP_DRAWABLE);
+ LL_RECORD_BLOCK_TIME(FTM_CLEANUP_DRAWABLE);
{
- LLFastTimer t(FTM_DELETE_FACES);
+ LL_RECORD_BLOCK_TIME(FTM_DELETE_FACES);
std::for_each(mFaces.begin(), mFaces.end(), DeletePointer());
mFaces.clear();
}
@@ -225,28 +255,45 @@ void LLDrawable::cleanupReferences()
gPipeline.unlinkDrawable(this);
+ removeFromOctree();
+
{
- LLFastTimer t(FTM_DEREF_DRAWABLE);
+ LL_RECORD_BLOCK_TIME(FTM_DEREF_DRAWABLE);
// Cleanup references to other objects
mVObjp = NULL;
mParent = NULL;
}
}
+void LLDrawable::removeFromOctree()
+{
+ if(!mEntry)
+ {
+ return;
+ }
+
+ mEntry->removeData(this);
+ if(mEntry->hasVOCacheEntry())
+ {
+ getRegion()->removeActiveCacheEntry((LLVOCacheEntry*)mEntry->getVOCacheEntry(), this);
+ }
+ mEntry = NULL;
+}
+
void LLDrawable::cleanupDeadDrawables()
{
/*
S32 i;
- for (i = 0; i < sDeadList.count(); i++)
+ for (i = 0; i < sDeadList.size(); i++)
{
if (sDeadList[i]->getNumRefs() > 1)
{
- llwarns << "Dead drawable has " << sDeadList[i]->getNumRefs() << " remaining refs" << llendl;
+ LL_WARNS() << "Dead drawable has " << sDeadList[i]->getNumRefs() << " remaining refs" << LL_ENDL;
gPipeline.findReferences(sDeadList[i]);
}
}
*/
- sDeadList.reset();
+ sDeadList.clear();
}
S32 LLDrawable::findReferences(LLDrawable *drawablep)
@@ -254,24 +301,24 @@ S32 LLDrawable::findReferences(LLDrawable *drawablep)
S32 count = 0;
if (mParent == drawablep)
{
- llinfos << this << ": parent reference" << llendl;
+ LL_INFOS() << this << ": parent reference" << LL_ENDL;
count++;
}
return count;
}
-static LLFastTimer::DeclareTimer FTM_ALLOCATE_FACE("Allocate Face", true);
+static LLTrace::BlockTimerStatHandle FTM_ALLOCATE_FACE("Allocate Face");
LLFace* LLDrawable::addFace(LLFacePool *poolp, LLViewerTexture *texturep)
{
LLFace *face;
{
- LLFastTimer t(FTM_ALLOCATE_FACE);
+ LL_RECORD_BLOCK_TIME(FTM_ALLOCATE_FACE);
face = new LLFace(this, mVObjp);
}
- if (!face) llerrs << "Allocating new Face: " << mFaces.size() << llendl;
+ if (!face) LL_ERRS() << "Allocating new Face: " << mFaces.size() << LL_ENDL;
if (face)
{
@@ -295,7 +342,7 @@ LLFace* LLDrawable::addFace(const LLTextureEntry *te, LLViewerTexture *texturep)
LLFace *face;
{
- LLFastTimer t(FTM_ALLOCATE_FACE);
+ LL_RECORD_BLOCK_TIME(FTM_ALLOCATE_FACE);
face = new LLFace(this, mVObjp);
}
@@ -428,7 +475,7 @@ void LLDrawable::deleteFaces(S32 offset, S32 count)
void LLDrawable::update()
{
- llerrs << "Shouldn't be called!" << llendl;
+ LL_ERRS() << "Shouldn't be called!" << LL_ENDL;
}
@@ -450,7 +497,7 @@ void LLDrawable::makeActive()
pcode == LLViewerObject::LL_VO_GROUND ||
pcode == LLViewerObject::LL_VO_SKY)
{
- llerrs << "Static viewer object has active drawable!" << llendl;
+ LL_ERRS() << "Static viewer object has active drawable!" << LL_ENDL;
}
}
#endif
@@ -488,6 +535,12 @@ void LLDrawable::makeActive()
}
updatePartition();
}
+ else if (!isRoot() && !mParent->isActive()) //this should not happen, but occasionally it does...
+ {
+ mParent->makeActive();
+ //NOTE: linked set will now NEVER become static
+ mParent->setState(LLDrawable::ACTIVE_CHILD);
+ }
llassert(isAvatar() || isRoot() || mParent->isActive());
}
@@ -515,7 +568,7 @@ void LLDrawable::makeStatic(BOOL warning_enabled)
{
if (child_drawable->getParent() != this)
{
- llwarns << "Child drawable has unknown parent." << llendl;
+ LL_WARNS() << "Child drawable has unknown parent." << LL_ENDL;
}
child_drawable->makeStatic(warning_enabled);
}
@@ -569,7 +622,7 @@ F32 LLDrawable::updateXform(BOOL undamped)
if (damped && isVisible())
{
- F32 lerp_amt = llclamp(LLCriticalDamp::getInterpolant(OBJECT_DAMPING_TIME_CONSTANT), 0.f, 1.f);
+ F32 lerp_amt = llclamp(LLSmoothInterpolation::getInterpolant(OBJECT_DAMPING_TIME_CONSTANT), 0.f, 1.f);
LLVector3 new_pos = lerp(old_pos, target_pos, lerp_amt);
dist_squared = dist_vec_squared(new_pos, target_pos);
@@ -690,7 +743,7 @@ BOOL LLDrawable::updateMove()
{
if (isDead())
{
- llwarns << "Update move on dead drawable!" << llendl;
+ LL_WARNS() << "Update move on dead drawable!" << LL_ENDL;
return TRUE;
}
@@ -765,7 +818,7 @@ void LLDrawable::updateDistance(LLCamera& camera, bool force_update)
{
if (LLViewerCamera::sCurCameraID != LLViewerCamera::CAMERA_WORLD)
{
- llwarns << "Attempted to update distance for non-world camera." << llendl;
+ LL_WARNS() << "Attempted to update distance for non-world camera." << LL_ENDL;
return;
}
@@ -784,7 +837,7 @@ void LLDrawable::updateDistance(LLCamera& camera, bool force_update)
LLVOVolume* volume = getVOVolume();
if (volume)
{
- if (getSpatialGroup())
+ if (getGroup())
{
pos.set(getPositionGroup().getF32ptr());
}
@@ -830,7 +883,7 @@ void LLDrawable::updateTexture()
{
if (isDead())
{
- llwarns << "Dead drawable updating texture!" << llendl;
+ LL_WARNS() << "Dead drawable updating texture!" << LL_ENDL;
return;
}
@@ -856,7 +909,7 @@ void LLDrawable::shiftPos(const LLVector4a &shift_vector)
{
if (isDead())
{
- llwarns << "Shifting dead drawable" << llendl;
+ LL_WARNS() << "Shifting dead drawable" << LL_ENDL;
return;
}
@@ -902,9 +955,7 @@ void LLDrawable::shiftPos(const LLVector4a &shift_vector)
}
}
- mExtents[0].add(shift_vector);
- mExtents[1].add(shift_vector);
- mPositionGroup.add(shift_vector);
+ shift(shift_vector);
}
else if (mSpatialBridge)
{
@@ -912,9 +963,7 @@ void LLDrawable::shiftPos(const LLVector4a &shift_vector)
}
else if (isAvatar())
{
- mExtents[0].add(shift_vector);
- mExtents[1].add(shift_vector);
- mPositionGroup.add(shift_vector);
+ shift(shift_vector);
}
mVObjp->onShift(shift_vector);
@@ -926,40 +975,24 @@ const LLVector3& LLDrawable::getBounds(LLVector3& min, LLVector3& max) const
return mXform.getPositionW();
}
-const LLVector4a* LLDrawable::getSpatialExtents() const
-{
- return mExtents;
-}
-
-void LLDrawable::setSpatialExtents(const LLVector3& min, const LLVector3& max)
-{
- mExtents[0].load3(min.mV);
- mExtents[1].load3(max.mV);
-}
-
-void LLDrawable::setSpatialExtents(const LLVector4a& min, const LLVector4a& max)
-{
- mExtents[0] = min;
- mExtents[1] = max;
-}
-
-void LLDrawable::setPositionGroup(const LLVector4a& pos)
-{
- mPositionGroup = pos;
-}
-
void LLDrawable::updateSpatialExtents()
{
if (mVObjp)
{
- mVObjp->updateSpatialExtents(mExtents[0], mExtents[1]);
+ const LLVector4a* exts = getSpatialExtents();
+ LLVector4a extents[2];
+ extents[0] = exts[0];
+ extents[1] = exts[1];
+
+ mVObjp->updateSpatialExtents(extents[0], extents[1]);
+ setSpatialExtents(extents[0], extents[1]);
}
updateBinRadius();
if (mSpatialBridge.notNull())
{
- mPositionGroup.splat(0.f);
+ getGroupPosition().splat(0.f);
}
}
@@ -968,11 +1001,11 @@ void LLDrawable::updateBinRadius()
{
if (mVObjp.notNull())
{
- mBinRadius = llmin(mVObjp->getBinRadius(), 256.f);
+ setBinRadius(llmin(mVObjp->getBinRadius(), 256.f));
}
else
{
- mBinRadius = llmin(getRadius()*4.f, 256.f);
+ setBinRadius(llmin(getRadius()*4.f, 256.f));
}
}
@@ -996,7 +1029,7 @@ F32 LLDrawable::getVisibilityRadius() const
{
return llmax(getRadius(), vov->getLightRadius());
} else {
- // llwarns ?
+ // LL_WARNS() ?
}
}
return getRadius();
@@ -1006,26 +1039,52 @@ void LLDrawable::updateUVMinMax()
{
}
-LLSpatialGroup* LLDrawable::getSpatialGroup() const
+//virtual
+bool LLDrawable::isVisible() const
+{
+ if (LLViewerOctreeEntryData::isVisible())
{
- llassert((mSpatialGroupp == NULL) ? getBinIndex() == -1 : getBinIndex() != -1);
- return mSpatialGroupp;
+ return true;
+}
+
+{
+ LLViewerOctreeGroup* group = mEntry->getGroup();
+ if (group && group->isVisible())
+ {
+ LLViewerOctreeEntryData::setVisible();
+ return true;
+ }
+ }
+
+ return false;
}
-void LLDrawable::setSpatialGroup(LLSpatialGroup *groupp)
+//virtual
+bool LLDrawable::isRecentlyVisible() const
{
- //precondition: mSpatialGroupp MUST be null or DEAD or mSpatialGroupp MUST NOT contain this
- llassert(!mSpatialGroupp || mSpatialGroupp->isDead() || !mSpatialGroupp->hasElement(this));
+ //currently visible or visible in the previous frame.
+ bool vis = LLViewerOctreeEntryData::isRecentlyVisible();
- //precondition: groupp MUST be null or groupp MUST contain this
- llassert(!groupp || groupp->hasElement(this));
+ if(!vis)
+ {
+ const U32 MIN_VIS_FRAME_RANGE = 2 ; //two frames:the current one and the last one.
+ vis = (sCurVisible - getVisible() < MIN_VIS_FRAME_RANGE);
+ }
+
+ return vis ;
+}
-/*if (mSpatialGroupp && (groupp != mSpatialGroupp))
+void LLDrawable::setGroup(LLViewerOctreeGroup *groupp)
{
- mSpatialGroupp->setState(LLSpatialGroup::GEOM_DIRTY);
- }*/
+ LLSpatialGroup* cur_groupp = (LLSpatialGroup*)getGroup();
+
+ //precondition: mGroupp MUST be null or DEAD or mGroupp MUST NOT contain this
+ //llassert(!cur_groupp || cur_groupp->isDead() || !cur_groupp->hasElement(this));
- if (mSpatialGroupp != groupp && getVOVolume())
+ //precondition: groupp MUST be null or groupp MUST contain this
+ llassert(!groupp || (LLSpatialGroup*)groupp->hasElement(this));
+
+ if (cur_groupp != groupp && getVOVolume())
{ //NULL out vertex buffer references for volumes on spatial group change to maintain
//requirement that every face vertex buffer is either NULL or points to a vertex buffer
//contained by its drawable's spatial group
@@ -1041,10 +1100,10 @@ void LLDrawable::setSpatialGroup(LLSpatialGroup *groupp)
//postcondition: if next group is NULL, previous group must be dead OR NULL OR binIndex must be -1
//postcondition: if next group is NOT NULL, binIndex must not be -1
- llassert(groupp == NULL ? (mSpatialGroupp == NULL || mSpatialGroupp->isDead()) || getBinIndex() == -1 :
- getBinIndex() != -1);
+ //llassert(groupp == NULL ? (cur_groupp == NULL || cur_groupp->isDead()) || (!getEntry() || getEntry()->getBinIndex() == -1) :
+ // (getEntry() && getEntry()->getBinIndex() != -1));
- mSpatialGroupp = groupp;
+ LLViewerOctreeEntryData::setGroup(groupp);
}
LLSpatialPartition* LLDrawable::getSpatialPartition()
@@ -1063,11 +1122,11 @@ LLSpatialPartition* LLDrawable::getSpatialPartition()
{
if (mVObjp->isHUDAttachment())
{
- setSpatialBridge(new LLHUDBridge(this));
+ setSpatialBridge(new LLHUDBridge(this, getRegion()));
}
else
{
- setSpatialBridge(new LLVolumeBridge(this));
+ setSpatialBridge(new LLVolumeBridge(this, getRegion()));
}
}
return mSpatialBridge->asPartition();
@@ -1086,89 +1145,18 @@ LLSpatialPartition* LLDrawable::getSpatialPartition()
return retval;
}
-const S32 MIN_VIS_FRAME_RANGE = 2 ; //two frames:the current one and the last one.
-//static
-S32 LLDrawable::getMinVisFrameRange()
-{
- return MIN_VIS_FRAME_RANGE ;
-}
-
-BOOL LLDrawable::isRecentlyVisible() const
-{
- //currently visible or visible in the previous frame.
- BOOL vis = isVisible() || (sCurVisible - mVisible < MIN_VIS_FRAME_RANGE) ;
-
- if(!vis)
- {
- LLSpatialGroup* group = getSpatialGroup();
- if (group && group->isRecentlyVisible())
- {
- mVisible = sCurVisible;
- vis = TRUE ;
- }
- }
-
- return vis ;
-}
-
-BOOL LLDrawable::isVisible() const
-{
- if (mVisible == sCurVisible)
- {
- return TRUE;
- }
-
-#if 0
- //disabling this code fixes DEV-20105. Leaving in place in case some other bug pops up as a a result.
- //should be safe to just always ask the spatial group for visibility.
- if (isActive())
- {
- if (isRoot())
- {
- LLSpatialGroup* group = mSpatialBridge.notNull() ? mSpatialBridge->getSpatialGroup() :
- getSpatialGroup();
- if (group && group->isVisible())
- {
- mVisible = sCurVisible;
- return TRUE;
- }
- }
- else
- {
- if (getParent()->isVisible())
- {
- mVisible = sCurVisible;
- return TRUE;
- }
- }
- }
- else
-#endif
- {
- LLSpatialGroup* group = getSpatialGroup();
- if (group && group->isVisible())
- {
- mVisible = sCurVisible;
- return TRUE;
- }
- }
-
- return FALSE;
-}
-
//=======================================
// Spatial Partition Bridging Drawable
//=======================================
-LLSpatialBridge::LLSpatialBridge(LLDrawable* root, BOOL render_by_group, U32 data_mask)
-: LLSpatialPartition(data_mask, render_by_group, GL_STREAM_DRAW_ARB)
+LLSpatialBridge::LLSpatialBridge(LLDrawable* root, BOOL render_by_group, U32 data_mask, LLViewerRegion* regionp) :
+ LLDrawable(root->getVObj(), true),
+ LLSpatialPartition(data_mask, render_by_group, GL_STREAM_DRAW_ARB, regionp)
{
mBridge = this;
mDrawable = root;
root->setSpatialBridge(this);
- mBinIndex = -1;
-
mRenderType = mDrawable->mRenderType;
mDrawableType = mDrawable->mRenderType;
@@ -1189,10 +1177,13 @@ LLSpatialBridge::LLSpatialBridge(LLDrawable* root, BOOL render_by_group, U32 dat
LLSpatialBridge::~LLSpatialBridge()
{
+ if(mEntry)
+ {
LLSpatialGroup* group = getSpatialGroup();
if (group)
{
- group->mSpatialPartition->remove(this, group);
+ group->getSpatialPartition()->remove(this, group);
+ }
}
//delete octree here so listeners will still be able to access bridge specific state
@@ -1210,12 +1201,13 @@ void LLSpatialBridge::updateSpatialExtents()
LLSpatialGroup* root = (LLSpatialGroup*) mOctree->getListener(0);
{
- LLFastTimer ftm(FTM_CULL_REBOUND);
+ LL_RECORD_BLOCK_TIME(FTM_CULL_REBOUND);
root->rebound();
}
+ const LLVector4a* root_bounds = root->getBounds();
LLVector4a offset;
- LLVector4a size = root->mBounds[1];
+ LLVector4a size = root_bounds[1];
//VECTORIZE THIS
LLMatrix4a mat;
@@ -1227,7 +1219,7 @@ void LLSpatialBridge::updateSpatialExtents()
LLVector4a center;
mat.affineTransform(t, center);
- mat.rotate(root->mBounds[0], offset);
+ mat.rotate(root_bounds[0], offset);
center.add(offset);
LLVector4a v[4];
@@ -1249,12 +1241,9 @@ void LLSpatialBridge::updateSpatialExtents()
scale.mul(size);
mat.rotate(scale, v[3]);
-
- LLVector4a& newMin = mExtents[0];
- LLVector4a& newMax = mExtents[1];
-
+ LLVector4a newMin;
+ LLVector4a newMax;
newMin = newMax = center;
-
for (U32 i = 0; i < 4; i++)
{
LLVector4a delta;
@@ -1267,19 +1256,21 @@ void LLSpatialBridge::updateSpatialExtents()
newMin.setMin(newMin, min);
newMax.setMax(newMax, max);
}
+ setSpatialExtents(newMin, newMax);
LLVector4a diagonal;
diagonal.setSub(newMax, newMin);
mRadius = diagonal.getLength3().getF32() * 0.5f;
- mPositionGroup.setAdd(newMin,newMax);
- mPositionGroup.mul(0.5f);
+ LLVector4a& pos = getGroupPosition();
+ pos.setAdd(newMin,newMax);
+ pos.mul(0.5f);
updateBinRadius();
}
void LLSpatialBridge::updateBinRadius()
{
- mBinRadius = llmin( mOctree->getSize()[0]*0.5f, 256.f);
+ setBinRadius(llmin( mOctree->getSize()[0]*0.5f, 256.f));
}
LLCamera LLSpatialBridge::transformCamera(LLCamera& camera)
@@ -1313,7 +1304,7 @@ LLCamera LLSpatialBridge::transformCamera(LLCamera& camera)
void LLDrawable::setVisible(LLCamera& camera, std::vector<LLDrawable*>* results, BOOL for_select)
{
- mVisible = sCurVisible;
+ LLViewerOctreeEntryData::setVisible();
#if 0 && !LL_RELEASE_FOR_DOWNLOAD
//crazy paranoid rules checking
@@ -1323,46 +1314,46 @@ void LLDrawable::setVisible(LLCamera& camera, std::vector<LLDrawable*>* results,
{
if (isActive() && !mParent->isActive())
{
- llerrs << "Active drawable has static parent!" << llendl;
+ LL_ERRS() << "Active drawable has static parent!" << LL_ENDL;
}
if (isStatic() && !mParent->isStatic())
{
- llerrs << "Static drawable has active parent!" << llendl;
+ LL_ERRS() << "Static drawable has active parent!" << LL_ENDL;
}
if (mSpatialBridge)
{
- llerrs << "Child drawable has spatial bridge!" << llendl;
+ LL_ERRS() << "Child drawable has spatial bridge!" << LL_ENDL;
}
}
else if (isActive() && !mSpatialBridge)
{
- llerrs << "Active root drawable has no spatial bridge!" << llendl;
+ LL_ERRS() << "Active root drawable has no spatial bridge!" << LL_ENDL;
}
else if (isStatic() && mSpatialBridge.notNull())
{
- llerrs << "Static drawable has spatial bridge!" << llendl;
+ LL_ERRS() << "Static drawable has spatial bridge!" << LL_ENDL;
}
}
#endif
}
-class LLOctreeMarkNotCulled: public LLOctreeTraveler<LLDrawable>
+class LLOctreeMarkNotCulled: public OctreeTraveler
{
public:
LLCamera* mCamera;
LLOctreeMarkNotCulled(LLCamera* camera_in) : mCamera(camera_in) { }
- virtual void traverse(const LLOctreeNode<LLDrawable>* node)
+ virtual void traverse(const OctreeNode* node)
{
LLSpatialGroup* group = (LLSpatialGroup*) node->getListener(0);
group->setVisible();
- LLOctreeTraveler<LLDrawable>::traverse(node);
+ OctreeTraveler::traverse(node);
}
- void visit(const LLOctreeNode<LLDrawable>* branch)
+ void visit(const OctreeNode* branch)
{
gPipeline.markNotCulled((LLSpatialGroup*) branch->getListener(0), *mCamera);
}
@@ -1406,7 +1397,7 @@ void LLSpatialBridge::setVisible(LLCamera& camera_in, std::vector<LLDrawable*>*
}
if (!group ||
- LLDrawable::getCurrentFrame() - av->mVisible > 1 ||
+ LLDrawable::getCurrentFrame() - av->getVisible() > 1 ||
impostor ||
!loaded)
{
@@ -1420,16 +1411,17 @@ void LLSpatialBridge::setVisible(LLCamera& camera_in, std::vector<LLDrawable*>*
group->rebound();
LLVector4a center;
- center.setAdd(mExtents[0], mExtents[1]);
+ const LLVector4a* exts = getSpatialExtents();
+ center.setAdd(exts[0], exts[1]);
center.mul(0.5f);
LLVector4a size;
- size.setSub(mExtents[1], mExtents[0]);
+ size.setSub(exts[1], exts[0]);
size.mul(0.5f);
if ((LLPipeline::sShadowRender && camera_in.AABBInFrustum(center, size)) ||
LLPipeline::sImpostorRender ||
(camera_in.AABBInFrustumNoFarClip(center, size) &&
- AABBSphereIntersect(mExtents[0], mExtents[1], camera_in.getOrigin(), camera_in.mFrustumCornerDist)))
+ AABBSphereIntersect(exts[0], exts[1], camera_in.getOrigin(), camera_in.mFrustumCornerDist)))
{
if (!LLPipeline::sImpostorRender &&
!LLPipeline::sShadowRender &&
@@ -1517,7 +1509,7 @@ void LLSpatialBridge::updateDistance(LLCamera& camera_in, bool force_update)
void LLSpatialBridge::makeActive()
{ //it is an error to make a spatial bridge active (it's already active)
- llerrs << "makeActive called on spatial bridge" << llendl;
+ LL_ERRS() << "makeActive called on spatial bridge" << LL_ENDL;
}
void LLSpatialBridge::move(LLDrawable *drawablep, LLSpatialGroup *curp, BOOL immediate)
@@ -1544,9 +1536,7 @@ BOOL LLSpatialBridge::updateMove()
void LLSpatialBridge::shiftPos(const LLVector4a& vec)
{
- mExtents[0].add(vec);
- mExtents[1].add(vec);
- mPositionGroup.add(vec);
+ LLDrawable::shift(vec);
}
void LLSpatialBridge::cleanupReferences()
@@ -1554,11 +1544,8 @@ void LLSpatialBridge::cleanupReferences()
LLDrawable::cleanupReferences();
if (mDrawable)
{
- /*
-
- DON'T DO THIS -- this should happen through octree destruction
+ mDrawable->setGroup(NULL);
- mDrawable->setSpatialGroup(NULL);
if (mDrawable->getVObj())
{
LLViewerObject::const_child_list_t& child_list = mDrawable->getVObj()->getChildren();
@@ -1569,10 +1556,10 @@ void LLSpatialBridge::cleanupReferences()
LLDrawable* drawable = child->mDrawable;
if (drawable)
{
- drawable->setSpatialGroup(NULL);
+ drawable->setGroup(NULL);
+ }
}
}
- }*/
LLDrawable* drawablep = mDrawable;
mDrawable = NULL;
@@ -1641,8 +1628,8 @@ void LLDrawable::updateFaceSize(S32 idx)
}
}
-LLBridgePartition::LLBridgePartition()
-: LLSpatialPartition(0, FALSE, 0)
+LLBridgePartition::LLBridgePartition(LLViewerRegion* regionp)
+: LLSpatialPartition(0, FALSE, 0, regionp)
{
mDrawableType = LLPipeline::RENDER_TYPE_AVATAR;
mPartitionType = LLViewerRegion::PARTITION_BRIDGE;
@@ -1650,8 +1637,8 @@ LLBridgePartition::LLBridgePartition()
mSlopRatio = 0.25f;
}
-LLHUDBridge::LLHUDBridge(LLDrawable* drawablep)
-: LLVolumeBridge(drawablep)
+LLHUDBridge::LLHUDBridge(LLDrawable* drawablep, LLViewerRegion* regionp)
+: LLVolumeBridge(drawablep, regionp)
{
mDrawableType = LLPipeline::RENDER_TYPE_HUD;
mPartitionType = LLViewerRegion::PARTITION_HUD;
diff --git a/indra/newview/lldrawable.h b/indra/newview/lldrawable.h
index c3f6d77edc..a3461d4c01 100755
--- a/indra/newview/lldrawable.h
+++ b/indra/newview/lldrawable.h
@@ -38,10 +38,10 @@
#include "llvector4a.h"
#include "llquaternion.h"
#include "xform.h"
-#include "lldarray.h"
#include "llviewerobject.h"
#include "llrect.h"
#include "llappviewer.h" // for gFrameTimeSeconds
+#include "llvieweroctree.h"
class LLCamera;
class LLDrawPool;
@@ -59,33 +59,27 @@ const U32 SILHOUETTE_HIGHLIGHT = 0;
// All data for new renderer goes into this class.
LL_ALIGN_PREFIX(16)
-class LLDrawable : public LLRefCount
+class LLDrawable
+: public LLViewerOctreeEntryData,
+ public LLTrace::MemTrackable<LLDrawable, 16>
{
public:
- LLDrawable(const LLDrawable& rhs)
+ LLDrawable(const LLDrawable& rhs)
+ : LLTrace::MemTrackable<LLDrawable, 16>("LLDrawable"),
+ LLViewerOctreeEntryData(rhs)
{
*this = rhs;
}
const LLDrawable& operator=(const LLDrawable& rhs)
{
- llerrs << "Illegal operation!" << llendl;
+ LL_ERRS() << "Illegal operation!" << LL_ENDL;
return *this;
}
static void initClass();
- void* operator new(size_t size)
- {
- return ll_aligned_malloc_16(size);
- }
-
- void operator delete(void* ptr)
- {
- ll_aligned_free_16(ptr);
- }
-
- LLDrawable() { init(); }
+ LLDrawable(LLViewerObject *vobj, bool new_entry = false);
void markDead(); // Mark this drawable as dead
BOOL isDead() const { return isState(DEAD); }
@@ -93,11 +87,9 @@ public:
BOOL isLight() const;
- BOOL isVisible() const;
- BOOL isRecentlyVisible() const;
virtual void setVisible(LLCamera& camera_in, std::vector<LLDrawable*>* results = NULL, BOOL for_select = FALSE);
-
+ LLSpatialGroup* getSpatialGroup()const {return (LLSpatialGroup*)getGroup();}
LLViewerRegion* getRegion() const { return mVObjp->getRegion(); }
const LLTextureEntry* getTextureEntry(U8 which) const { return mVObjp->getTE(which); }
LLPointer<LLViewerObject>& getVObj() { return mVObjp; }
@@ -110,16 +102,12 @@ public:
const LLVector3& getPosition() const { return mXform.getPosition(); }
const LLVector3& getWorldPosition() const { return mXform.getPositionW(); }
const LLVector3 getPositionAgent() const;
- const LLVector4a& getPositionGroup() const { return mPositionGroup; }
const LLVector3& getScale() const { return mCurrentScale; }
void setScale(const LLVector3& scale) { mCurrentScale = scale; }
const LLQuaternion& getWorldRotation() const { return mXform.getWorldRotation(); }
const LLQuaternion& getRotation() const { return mXform.getRotation(); }
F32 getIntensity() const { return llmin(mXform.getScale().mV[0], 4.f); }
S32 getLOD() const { return mVObjp ? mVObjp->getLOD() : 1; }
- F32 getBinRadius() const { return mBinRadius; }
- S32 getBinIndex() const { return mBinIndex; }
- void setBinIndex(S32 index) const { mBinIndex = index; }
void getMinMax(LLVector3& min,LLVector3& max) const { mXform.getMinMax(min,max); }
LLXformMatrix* getXform() { return &mXform; }
@@ -152,7 +140,7 @@ public:
void setNumFacesFast(const S32 numFaces, LLFacePool *poolp, LLViewerTexture *texturep);
void mergeFaces(LLDrawable* src);
- void init();
+ void init(bool new_entry);
void destroy();
void update();
@@ -183,8 +171,12 @@ public:
BOOL getLit() const { return isState(UNLIT) ? FALSE : TRUE; }
void setLit(BOOL lit) { lit ? clearState(UNLIT) : setState(UNLIT); }
+ bool isVisible() const;
+ bool isRecentlyVisible() const;
+
virtual void cleanupReferences();
+ void setGroup(LLViewerOctreeGroup* group);
void setRadius(const F32 radius);
F32 getRadius() const { return mRadius; }
F32 getVisibilityRadius() const;
@@ -194,11 +186,6 @@ public:
const LLVector3& getBounds(LLVector3& min, LLVector3& max) const;
virtual void updateSpatialExtents();
virtual void updateBinRadius();
- const LLVector4a* getSpatialExtents() const;
- void setSpatialExtents(const LLVector3& min, const LLVector3& max);
- void setSpatialExtents(const LLVector4a& min, const LLVector4a& max);
-
- void setPositionGroup(const LLVector4a& pos);
void setRenderType(S32 type) { mRenderType = type; }
BOOL isRenderType(S32 type) { return mRenderType == type; }
@@ -207,10 +194,13 @@ public:
// Debugging methods
S32 findReferences(LLDrawable *drawablep); // Not const because of @#$! iterators...
- void setSpatialGroup(LLSpatialGroup *groupp);
- LLSpatialGroup *getSpatialGroup() const;
LLSpatialPartition* getSpatialPartition();
+ void removeFromOctree();
+
+ void setSpatialBridge(LLSpatialBridge* bridge) { mSpatialBridge = (LLDrawable*) bridge; }
+ LLSpatialBridge* getSpatialBridge() { return (LLSpatialBridge*) (LLDrawable*) mSpatialBridge; }
+
// Statics
static void incrementVisible();
static void cleanupDeadDrawables();
@@ -294,10 +284,6 @@ public:
ACTIVE_CHILD = 0x40000000,
} EDrawableFlags;
-private: //aligned members
- LL_ALIGN_16(LLVector4a mExtents[2]);
- LL_ALIGN_16(LLVector4a mPositionGroup);
-
public:
LLXformMatrix mXform;
@@ -306,12 +292,6 @@ public:
F32 mDistanceWRTCamera;
- static S32 getCurrentFrame() { return sCurVisible; }
- static S32 getMinVisFrameRange();
-
- void setSpatialBridge(LLSpatialBridge* bridge) { mSpatialBridge = (LLDrawable*) bridge; }
- LLSpatialBridge* getSpatialBridge() { return (LLSpatialBridge*) (LLDrawable*) mSpatialBridge; }
-
static F32 sCurPixelAngle; //current pixels per radian
private:
@@ -321,39 +301,33 @@ private:
S32 mRenderType;
LLPointer<LLViewerObject> mVObjp;
face_list_t mFaces;
- LLSpatialGroup* mSpatialGroupp;
LLPointer<LLDrawable> mSpatialBridge;
- mutable U32 mVisible;
F32 mRadius;
- F32 mBinRadius;
- mutable S32 mBinIndex;
S32 mGeneration;
LLVector3 mCurrentScale;
- static U32 sCurVisible; // Counter for what value of mVisible means currently visible
-
static U32 sNumZombieDrawables;
- static LLDynamicArrayPtr<LLPointer<LLDrawable> > sDeadList;
+ static std::vector<LLPointer<LLDrawable> > sDeadList;
} LL_ALIGN_POSTFIX(16);
inline LLFace* LLDrawable::getFace(const S32 i) const
{
- //switch these asserts to llerrs -- davep
+ //switch these asserts to LL_ERRS() -- davep
//llassert((U32)i < mFaces.size());
//llassert(mFaces[i]);
if ((U32) i >= mFaces.size())
{
- llwarns << "Invalid face index." << llendl;
+ LL_WARNS() << "Invalid face index." << LL_ENDL;
return NULL;
}
if (!mFaces[i])
{
- llwarns << "Null face found." << llendl;
+ LL_WARNS() << "Null face found." << LL_ENDL;
return NULL;
}
diff --git a/indra/newview/lldrawpool.cpp b/indra/newview/lldrawpool.cpp
index 714f9a1718..5b151bdcda 100755
--- a/indra/newview/lldrawpool.cpp
+++ b/indra/newview/lldrawpool.cpp
@@ -113,7 +113,7 @@ LLDrawPool *LLDrawPool::createPool(const U32 type, LLViewerTexture *tex0)
poolp = new LLDrawPoolWLSky();
break;
default:
- llerrs << "Unknown draw pool type!" << llendl;
+ LL_ERRS() << "Unknown draw pool type!" << LL_ENDL;
return NULL;
}
@@ -257,7 +257,7 @@ void LLFacePool::destroy()
{
if (!mReferences.empty())
{
- llinfos << mReferences.size() << " references left on deletion of draw pool!" << llendl;
+ LL_INFOS() << mReferences.size() << " references left on deletion of draw pool!" << LL_ENDL;
}
}
@@ -332,7 +332,7 @@ BOOL LLFacePool::verify() const
const LLFace* facep = *iter;
if (facep->getPool() != this)
{
- llinfos << "Face in wrong pool!" << llendl;
+ LL_INFOS() << "Face in wrong pool!" << LL_ENDL;
facep->printDebugInfo();
ok = FALSE;
}
@@ -347,7 +347,7 @@ BOOL LLFacePool::verify() const
void LLFacePool::printDebugInfo() const
{
- llinfos << "Pool " << this << " Type: " << getType() << llendl;
+ LL_INFOS() << "Pool " << this << " Type: " << getType() << LL_ENDL;
}
BOOL LLFacePool::LLOverrideFaceColor::sOverrideFaceColor = FALSE;
@@ -385,9 +385,9 @@ LLRenderPass::~LLRenderPass()
LLDrawPool* LLRenderPass::instancePool()
{
#if LL_RELEASE_FOR_DOWNLOAD
- llwarns << "Attempting to instance a render pass. Invalid operation." << llendl;
+ LL_WARNS() << "Attempting to instance a render pass. Invalid operation." << LL_ENDL;
#else
- llerrs << "Attempting to instance a render pass. Invalid operation." << llendl;
+ LL_ERRS() << "Attempting to instance a render pass. Invalid operation." << LL_ENDL;
#endif
return NULL;
}
diff --git a/indra/newview/lldrawpoolalpha.cpp b/indra/newview/lldrawpoolalpha.cpp
index e27dc279f4..84ead0bdde 100755
--- a/indra/newview/lldrawpoolalpha.cpp
+++ b/indra/newview/lldrawpoolalpha.cpp
@@ -89,7 +89,7 @@ S32 LLDrawPoolAlpha::getNumPostDeferredPasses()
void LLDrawPoolAlpha::beginPostDeferredPass(S32 pass)
{
- LLFastTimer t(FTM_RENDER_ALPHA);
+ LL_RECORD_BLOCK_TIME(FTM_RENDER_ALPHA);
if (pass == 0)
{
@@ -179,7 +179,7 @@ void LLDrawPoolAlpha::renderPostDeferred(S32 pass)
void LLDrawPoolAlpha::beginRenderPass(S32 pass)
{
- LLFastTimer t(FTM_RENDER_ALPHA);
+ LL_RECORD_BLOCK_TIME(FTM_RENDER_ALPHA);
if (LLPipeline::sImpostorRender)
{
@@ -211,7 +211,7 @@ void LLDrawPoolAlpha::beginRenderPass(S32 pass)
void LLDrawPoolAlpha::endRenderPass( S32 pass )
{
- LLFastTimer t(FTM_RENDER_ALPHA);
+ LL_RECORD_BLOCK_TIME(FTM_RENDER_ALPHA);
LLRenderPass::endRenderPass(pass);
if(gPipeline.canUseWindLightShaders())
@@ -222,7 +222,7 @@ void LLDrawPoolAlpha::endRenderPass( S32 pass )
void LLDrawPoolAlpha::render(S32 pass)
{
- LLFastTimer t(FTM_RENDER_ALPHA);
+ LL_RECORD_BLOCK_TIME(FTM_RENDER_ALPHA);
LLGLSPipelineAlpha gls_pipeline_alpha;
@@ -336,7 +336,7 @@ void LLDrawPoolAlpha::renderAlphaHighlight(U32 mask)
for (LLCullResult::sg_iterator i = gPipeline.beginAlphaGroups(); i != gPipeline.endAlphaGroups(); ++i)
{
LLSpatialGroup* group = *i;
- if (group->mSpatialPartition->mRenderByGroup &&
+ if (group->getSpatialPartition()->mRenderByGroup &&
!group->isDead())
{
LLSpatialGroup::drawmap_elem_t& draw_info = group->mDrawMap[LLRenderPass::PASS_ALPHA];
@@ -363,6 +363,9 @@ void LLDrawPoolAlpha::renderAlphaHighlight(U32 mask)
}
}
+static LLTrace::BlockTimerStatHandle FTM_RENDER_ALPHA_GROUP_LOOP("Alpha Group");
+static LLTrace::BlockTimerStatHandle FTM_RENDER_ALPHA_PUSH("Alpha Push Verts");
+
void LLDrawPoolAlpha::renderAlpha(U32 mask, S32 pass)
{
BOOL initialized_lighting = FALSE;
@@ -374,18 +377,18 @@ void LLDrawPoolAlpha::renderAlpha(U32 mask, S32 pass)
{
LLSpatialGroup* group = *i;
llassert(group);
- llassert(group->mSpatialPartition);
+ llassert(group->getSpatialPartition());
- if (group->mSpatialPartition->mRenderByGroup &&
+ if (group->getSpatialPartition()->mRenderByGroup &&
!group->isDead())
{
- bool is_particle_or_hud_particle = group->mSpatialPartition->mPartitionType == LLViewerRegion::PARTITION_PARTICLE
- || group->mSpatialPartition->mPartitionType == LLViewerRegion::PARTITION_HUD_PARTICLE;
+ bool is_particle_or_hud_particle = group->getSpatialPartition()->mPartitionType == LLViewerRegion::PARTITION_PARTICLE
+ || group->getSpatialPartition()->mPartitionType == LLViewerRegion::PARTITION_HUD_PARTICLE;
bool draw_glow_for_this_partition = mVertexShaderLevel > 0; // no shaders = no glow.
- static LLFastTimer::DeclareTimer FTM_RENDER_ALPHA_GROUP_LOOP("Alpha Group");
- LLFastTimer t(FTM_RENDER_ALPHA_GROUP_LOOP);
+
+ LL_RECORD_BLOCK_TIME(FTM_RENDER_ALPHA_GROUP_LOOP);
bool disable_cull = is_particle_or_hud_particle;
LLGLDisable cull(disable_cull ? GL_CULL_FACE : 0);
@@ -398,7 +401,7 @@ void LLDrawPoolAlpha::renderAlpha(U32 mask, S32 pass)
if ((params.mVertexBuffer->getTypeMask() & mask) != mask)
{ //FIXME!
- llwarns << "Missing required components, skipping render batch." << llendl;
+ LL_WARNS() << "Missing required components, skipping render batch." << LL_ENDL;
continue;
}
@@ -420,14 +423,14 @@ void LLDrawPoolAlpha::renderAlpha(U32 mask, S32 pass)
}
LLRenderPass::applyModelMatrix(params);
-
+
LLMaterial* mat = NULL;
if (deferred_render)
{
mat = params.mMaterial;
}
-
+
if (params.mFullbright)
{
// Turn off lighting if it hasn't already been so.
@@ -497,7 +500,7 @@ void LLDrawPoolAlpha::renderAlpha(U32 mask, S32 pass)
LLGLSLShader::bindNoShader();
current_shader = NULL;
}
-
+
if (use_shaders && mat)
{
// We have a material. Supply the appropriate data here.
@@ -547,7 +550,7 @@ void LLDrawPoolAlpha::renderAlpha(U32 mask, S32 pass)
}
}
}
- else
+ else
{ //not batching textures or batch has only 1 texture -- might need a texture matrix
if (params.mTexture.notNull())
{
@@ -558,7 +561,7 @@ void LLDrawPoolAlpha::renderAlpha(U32 mask, S32 pass)
}
else
{
- gGL.getTexUnit(0)->bind(params.mTexture, TRUE);
+ gGL.getTexUnit(0)->bind(params.mTexture, TRUE) ;
}
if (params.mTextureMatrix)
@@ -576,9 +579,8 @@ void LLDrawPoolAlpha::renderAlpha(U32 mask, S32 pass)
}
}
- static LLFastTimer::DeclareTimer FTM_RENDER_ALPHA_PUSH("Alpha Push Verts");
{
- LLFastTimer t(FTM_RENDER_ALPHA_PUSH);
+ LL_RECORD_BLOCK_TIME(FTM_RENDER_ALPHA_PUSH);
gGL.blendFunc((LLRender::eBlendFactor) params.mBlendFuncSrc, (LLRender::eBlendFactor) params.mBlendFuncDst, mAlphaSFactor, mAlphaDFactor);
params.mVertexBuffer->setBuffer(mask & ~(params.mFullbright ? (LLVertexBuffer::MAP_TANGENT | LLVertexBuffer::MAP_TEXCOORD1 | LLVertexBuffer::MAP_TEXCOORD2) : 0));
diff --git a/indra/newview/lldrawpoolavatar.cpp b/indra/newview/lldrawpoolavatar.cpp
index 24f467f954..0ecdabbbe9 100755
--- a/indra/newview/lldrawpoolavatar.cpp
+++ b/indra/newview/lldrawpoolavatar.cpp
@@ -103,7 +103,7 @@ S32 normal_channel = -1;
S32 specular_channel = -1;
S32 cube_channel = -1;
-static LLFastTimer::DeclareTimer FTM_SHADOW_AVATAR("Avatar Shadow");
+static LLTrace::BlockTimerStatHandle FTM_SHADOW_AVATAR("Avatar Shadow");
LLDrawPoolAvatar::LLDrawPoolAvatar() :
LLFacePool(POOL_AVATAR)
@@ -170,7 +170,7 @@ LLMatrix4& LLDrawPoolAvatar::getModelView()
void LLDrawPoolAvatar::beginDeferredPass(S32 pass)
{
- LLFastTimer t(FTM_RENDER_CHARACTERS);
+ LL_RECORD_BLOCK_TIME(FTM_RENDER_CHARACTERS);
sSkipTransparent = TRUE;
is_deferred_render = true;
@@ -205,7 +205,7 @@ void LLDrawPoolAvatar::beginDeferredPass(S32 pass)
void LLDrawPoolAvatar::endDeferredPass(S32 pass)
{
- LLFastTimer t(FTM_RENDER_CHARACTERS);
+ LL_RECORD_BLOCK_TIME(FTM_RENDER_CHARACTERS);
sSkipTransparent = FALSE;
is_deferred_render = false;
@@ -409,7 +409,7 @@ S32 LLDrawPoolAvatar::getNumShadowPasses()
void LLDrawPoolAvatar::beginShadowPass(S32 pass)
{
- LLFastTimer t(FTM_SHADOW_AVATAR);
+ LL_RECORD_BLOCK_TIME(FTM_SHADOW_AVATAR);
if (pass == 0)
{
@@ -435,7 +435,7 @@ void LLDrawPoolAvatar::beginShadowPass(S32 pass)
void LLDrawPoolAvatar::endShadowPass(S32 pass)
{
- LLFastTimer t(FTM_SHADOW_AVATAR);
+ LL_RECORD_BLOCK_TIME(FTM_SHADOW_AVATAR);
if (pass == 0)
{
if (sShaderLevel > 0)
@@ -454,7 +454,7 @@ void LLDrawPoolAvatar::endShadowPass(S32 pass)
void LLDrawPoolAvatar::renderShadow(S32 pass)
{
- LLFastTimer t(FTM_SHADOW_AVATAR);
+ LL_RECORD_BLOCK_TIME(FTM_SHADOW_AVATAR);
if (mDrawFace.empty())
{
@@ -481,7 +481,7 @@ void LLDrawPoolAvatar::renderShadow(S32 pass)
if (pass == 0)
{
- avatarp->renderSkinned(AVATAR_RENDER_PASS_SINGLE);
+ avatarp->renderSkinned();
}
else
{
@@ -520,7 +520,7 @@ S32 LLDrawPoolAvatar::getNumDeferredPasses()
void LLDrawPoolAvatar::render(S32 pass)
{
- LLFastTimer t(FTM_RENDER_CHARACTERS);
+ LL_RECORD_BLOCK_TIME(FTM_RENDER_CHARACTERS);
if (LLPipeline::sImpostorRender)
{
renderAvatars(NULL, pass+2);
@@ -532,7 +532,7 @@ void LLDrawPoolAvatar::render(S32 pass)
void LLDrawPoolAvatar::beginRenderPass(S32 pass)
{
- LLFastTimer t(FTM_RENDER_CHARACTERS);
+ LL_RECORD_BLOCK_TIME(FTM_RENDER_CHARACTERS);
//reset vertex buffer mappings
LLVertexBuffer::unbind();
@@ -583,7 +583,7 @@ void LLDrawPoolAvatar::beginRenderPass(S32 pass)
void LLDrawPoolAvatar::endRenderPass(S32 pass)
{
- LLFastTimer t(FTM_RENDER_CHARACTERS);
+ LL_RECORD_BLOCK_TIME(FTM_RENDER_CHARACTERS);
if (LLPipeline::sImpostorRender)
{
@@ -1175,12 +1175,12 @@ void LLDrawPoolAvatar::endDeferredSkinned()
gGL.getTexUnit(0)->activate();
}
-static LLFastTimer::DeclareTimer FTM_RENDER_AVATARS("renderAvatars");
+static LLTrace::BlockTimerStatHandle FTM_RENDER_AVATARS("renderAvatars");
void LLDrawPoolAvatar::renderAvatars(LLVOAvatar* single_avatar, S32 pass)
{
- LLFastTimer t(FTM_RENDER_AVATARS);
+ LL_RECORD_BLOCK_TIME(FTM_RENDER_AVATARS);
if (pass == -1)
{
@@ -1460,7 +1460,7 @@ void LLDrawPoolAvatar::renderAvatars(LLVOAvatar* single_avatar, S32 pass)
if( !single_avatar || (avatarp == single_avatar) )
{
- avatarp->renderSkinned(AVATAR_RENDER_PASS_SINGLE);
+ avatarp->renderSkinned();
}
}
@@ -1517,7 +1517,7 @@ void LLDrawPoolAvatar::getRiggedGeometry(LLFace* face, LLPointer<LLVertexBuffer>
face->setPoolType(LLDrawPool::POOL_AVATAR);
}
- //llinfos << "Rebuilt face " << face->getTEOffset() << " of " << face->getDrawable() << " at " << gFrameTimeSeconds << llendl;
+ //LL_INFOS() << "Rebuilt face " << face->getTEOffset() << " of " << face->getDrawable() << " at " << gFrameTimeSeconds << LL_ENDL;
face->getGeometryVolume(*volume, face->getTEOffset(), mat_vert, mat_normal, offset, true);
buffer->flush();
@@ -1871,11 +1871,11 @@ void LLDrawPoolAvatar::renderDeferredRiggedMaterial(LLVOAvatar* avatar, S32 pass
renderRigged(avatar, pass);
}
-static LLFastTimer::DeclareTimer FTM_RIGGED_VBO("Rigged VBO");
+static LLTrace::BlockTimerStatHandle FTM_RIGGED_VBO("Rigged VBO");
void LLDrawPoolAvatar::updateRiggedVertexBuffers(LLVOAvatar* avatar)
{
- LLFastTimer t(FTM_RIGGED_VBO);
+ LL_RECORD_BLOCK_TIME(FTM_RIGGED_VBO);
//update rigged vertex buffers
for (U32 type = 0; type < NUM_RIGGED_PASSES; ++type)
@@ -2033,12 +2033,12 @@ void LLDrawPoolAvatar::addRiggedFace(LLFace* facep, U32 type)
{
if (type >= NUM_RIGGED_PASSES)
{
- llerrs << "Invalid rigged face type." << llendl;
+ LL_ERRS() << "Invalid rigged face type." << LL_ENDL;
}
if (facep->getRiggedIndex(type) != -1)
{
- llerrs << "Tried to add a rigged face that's referenced elsewhere." << llendl;
+ LL_ERRS() << "Tried to add a rigged face that's referenced elsewhere." << LL_ENDL;
}
facep->setRiggedIndex(type, mRiggedFace[type].size());
@@ -2067,7 +2067,7 @@ void LLDrawPoolAvatar::removeRiggedFace(LLFace* facep)
}
else
{
- llerrs << "Face reference data corrupt for rigged type " << i << llendl;
+ LL_ERRS() << "Face reference data corrupt for rigged type " << i << LL_ENDL;
}
}
}
diff --git a/indra/newview/lldrawpoolbump.cpp b/indra/newview/lldrawpoolbump.cpp
index 6b4c5cfca1..211a96b32d 100755
--- a/indra/newview/lldrawpoolbump.cpp
+++ b/indra/newview/lldrawpoolbump.cpp
@@ -104,7 +104,7 @@ void LLStandardBumpmap::addstandard()
// can't assert; we destroyGL and restoreGL a lot during *first* startup, which populates this list already, THEN we explicitly init the list as part of *normal* startup. Sigh. So clear the list every time before we (re-)add the standard bumpmaps.
//llassert( LLStandardBumpmap::sStandardBumpmapCount == 0 );
clear();
- llinfos << "Adding standard bumpmaps." << llendl;
+ LL_INFOS() << "Adding standard bumpmaps." << LL_ENDL;
gStandardBumpmapList[LLStandardBumpmap::sStandardBumpmapCount++] = LLStandardBumpmap("None"); // BE_NO_BUMP
gStandardBumpmapList[LLStandardBumpmap::sStandardBumpmapCount++] = LLStandardBumpmap("Brightness"); // BE_BRIGHTNESS
gStandardBumpmapList[LLStandardBumpmap::sStandardBumpmapCount++] = LLStandardBumpmap("Darkness"); // BE_DARKNESS
@@ -113,7 +113,7 @@ void LLStandardBumpmap::addstandard()
LLFILE* file = LLFile::fopen( file_name, "rt" ); /*Flawfinder: ignore*/
if( !file )
{
- llwarns << "Could not open std_bump <" << file_name << ">" << llendl;
+ LL_WARNS() << "Could not open std_bump <" << file_name << ">" << LL_ENDL;
return;
}
@@ -122,13 +122,13 @@ void LLStandardBumpmap::addstandard()
S32 fields_read = fscanf( file, "LLStandardBumpmap version %d", &file_version );
if( fields_read != 1 )
{
- llwarns << "Bad LLStandardBumpmap header" << llendl;
+ LL_WARNS() << "Bad LLStandardBumpmap header" << LL_ENDL;
return;
}
if( file_version > STD_BUMP_LATEST_FILE_VERSION )
{
- llwarns << "LLStandardBumpmap has newer version (" << file_version << ") than viewer (" << STD_BUMP_LATEST_FILE_VERSION << ")" << llendl;
+ LL_WARNS() << "LLStandardBumpmap has newer version (" << file_version << ") than viewer (" << STD_BUMP_LATEST_FILE_VERSION << ")" << LL_ENDL;
return;
}
@@ -145,11 +145,11 @@ void LLStandardBumpmap::addstandard()
}
if( fields_read != 2 )
{
- llwarns << "Bad LLStandardBumpmap entry" << llendl;
+ LL_WARNS() << "Bad LLStandardBumpmap entry" << LL_ENDL;
return;
}
-// llinfos << "Loading bumpmap: " << bump_image_id << " from viewerart" << llendl;
+// LL_INFOS() << "Loading bumpmap: " << bump_image_id << " from viewerart" << LL_ENDL;
gStandardBumpmapList[LLStandardBumpmap::sStandardBumpmapCount].mLabel = label;
gStandardBumpmapList[LLStandardBumpmap::sStandardBumpmapCount].mImage =
LLViewerTextureManager::getFetchedTexture(LLUUID(bump_image_id));
@@ -165,7 +165,7 @@ void LLStandardBumpmap::addstandard()
// static
void LLStandardBumpmap::clear()
{
- llinfos << "Clearing standard bumpmaps." << llendl;
+ LL_INFOS() << "Clearing standard bumpmaps." << LL_ENDL;
for( U32 i = 0; i < LLStandardBumpmap::sStandardBumpmapCount; i++ )
{
gStandardBumpmapList[i].mLabel.assign("");
@@ -234,7 +234,7 @@ S32 LLDrawPoolBump::getNumPasses()
void LLDrawPoolBump::beginRenderPass(S32 pass)
{
- LLFastTimer t(FTM_RENDER_BUMP);
+ LL_RECORD_BLOCK_TIME(FTM_RENDER_BUMP);
switch( pass )
{
case 0:
@@ -261,7 +261,7 @@ void LLDrawPoolBump::beginRenderPass(S32 pass)
void LLDrawPoolBump::render(S32 pass)
{
- LLFastTimer t(FTM_RENDER_BUMP);
+ LL_RECORD_BLOCK_TIME(FTM_RENDER_BUMP);
if (!gPipeline.hasRenderType(LLDrawPool::POOL_SIMPLE))
{
@@ -294,7 +294,7 @@ void LLDrawPoolBump::render(S32 pass)
void LLDrawPoolBump::endRenderPass(S32 pass)
{
- LLFastTimer t(FTM_RENDER_BUMP);
+ LL_RECORD_BLOCK_TIME(FTM_RENDER_BUMP);
switch( pass )
{
case 0:
@@ -325,7 +325,7 @@ void LLDrawPoolBump::endRenderPass(S32 pass)
//static
void LLDrawPoolBump::beginShiny(bool invisible)
{
- LLFastTimer t(FTM_RENDER_SHINY);
+ LL_RECORD_BLOCK_TIME(FTM_RENDER_SHINY);
if ((!invisible && !gPipeline.hasRenderBatches(LLRenderPass::PASS_SHINY))||
(invisible && !gPipeline.hasRenderBatches(LLRenderPass::PASS_INVISI_SHINY)))
{
@@ -418,7 +418,7 @@ void LLDrawPoolBump::bindCubeMap(LLGLSLShader* shader, S32 shader_level, S32& di
void LLDrawPoolBump::renderShiny(bool invisible)
{
- LLFastTimer t(FTM_RENDER_SHINY);
+ LL_RECORD_BLOCK_TIME(FTM_RENDER_SHINY);
if ((!invisible && !gPipeline.hasRenderBatches(LLRenderPass::PASS_SHINY))||
(invisible && !gPipeline.hasRenderBatches(LLRenderPass::PASS_INVISI_SHINY)))
{
@@ -479,7 +479,7 @@ void LLDrawPoolBump::unbindCubeMap(LLGLSLShader* shader, S32 shader_level, S32&
void LLDrawPoolBump::endShiny(bool invisible)
{
- LLFastTimer t(FTM_RENDER_SHINY);
+ LL_RECORD_BLOCK_TIME(FTM_RENDER_SHINY);
if ((!invisible && !gPipeline.hasRenderBatches(LLRenderPass::PASS_SHINY))||
(invisible && !gPipeline.hasRenderBatches(LLRenderPass::PASS_INVISI_SHINY)))
{
@@ -499,7 +499,7 @@ void LLDrawPoolBump::endShiny(bool invisible)
void LLDrawPoolBump::beginFullbrightShiny()
{
- LLFastTimer t(FTM_RENDER_SHINY);
+ LL_RECORD_BLOCK_TIME(FTM_RENDER_SHINY);
if (!gPipeline.hasRenderBatches(LLRenderPass::PASS_FULLBRIGHT_SHINY))
{
return;
@@ -561,7 +561,7 @@ void LLDrawPoolBump::beginFullbrightShiny()
void LLDrawPoolBump::renderFullbrightShiny()
{
- LLFastTimer t(FTM_RENDER_SHINY);
+ LL_RECORD_BLOCK_TIME(FTM_RENDER_SHINY);
if (!gPipeline.hasRenderBatches(LLRenderPass::PASS_FULLBRIGHT_SHINY))
{
return;
@@ -584,7 +584,7 @@ void LLDrawPoolBump::renderFullbrightShiny()
void LLDrawPoolBump::endFullbrightShiny()
{
- LLFastTimer t(FTM_RENDER_SHINY);
+ LL_RECORD_BLOCK_TIME(FTM_RENDER_SHINY);
if (!gPipeline.hasRenderBatches(LLRenderPass::PASS_FULLBRIGHT_SHINY))
{
return;
@@ -715,7 +715,7 @@ void LLDrawPoolBump::beginBump(U32 pass)
}
sVertexMask = VERTEX_MASK_BUMP;
- LLFastTimer t(FTM_RENDER_BUMP);
+ LL_RECORD_BLOCK_TIME(FTM_RENDER_BUMP);
// Optional second pass: emboss bump map
stop_glerror();
@@ -767,7 +767,7 @@ void LLDrawPoolBump::renderBump(U32 pass)
return;
}
- LLFastTimer ftm(FTM_RENDER_BUMP);
+ LL_RECORD_BLOCK_TIME(FTM_RENDER_BUMP);
LLGLDisable fog(GL_FOG);
LLGLDepthTest gls_depth(GL_TRUE, GL_FALSE, GL_LEQUAL);
LLGLEnable blend(GL_BLEND);
@@ -823,7 +823,7 @@ void LLDrawPoolBump::beginDeferredPass(S32 pass)
{
return;
}
- LLFastTimer ftm(FTM_RENDER_BUMP);
+ LL_RECORD_BLOCK_TIME(FTM_RENDER_BUMP);
mShiny = TRUE;
gDeferredBumpProgram.bind();
diffuse_channel = gDeferredBumpProgram.enableTexture(LLViewerShaderMgr::DIFFUSE_MAP);
@@ -838,7 +838,7 @@ void LLDrawPoolBump::endDeferredPass(S32 pass)
{
return;
}
- LLFastTimer ftm(FTM_RENDER_BUMP);
+ LL_RECORD_BLOCK_TIME(FTM_RENDER_BUMP);
mShiny = FALSE;
gDeferredBumpProgram.disableTexture(LLViewerShaderMgr::DIFFUSE_MAP);
gDeferredBumpProgram.disableTexture(LLViewerShaderMgr::BUMP_MAP);
@@ -852,7 +852,7 @@ void LLDrawPoolBump::renderDeferred(S32 pass)
{
return;
}
- LLFastTimer ftm(FTM_RENDER_BUMP);
+ LL_RECORD_BLOCK_TIME(FTM_RENDER_BUMP);
U32 type = LLRenderPass::PASS_BUMP;
LLCullResult::drawinfo_iterator begin = gPipeline.beginRenderMap(type);
@@ -929,7 +929,7 @@ void LLBumpImageList::init()
void LLBumpImageList::clear()
{
- llinfos << "Clearing dynamic bumpmaps." << llendl;
+ LL_INFOS() << "Clearing dynamic bumpmaps." << LL_ENDL;
// these will be re-populated on-demand
mBrightnessEntries.clear();
mDarknessEntries.clear();
@@ -1005,7 +1005,7 @@ void LLBumpImageList::updateImages()
if( destroy )
{
- //llinfos << "*** Destroying bright " << (void*)image << llendl;
+ //LL_INFOS() << "*** Destroying bright " << (void*)image << LL_ENDL;
mBrightnessEntries.erase(curiter); // deletes the image thanks to reference counting
}
}
@@ -1032,7 +1032,7 @@ void LLBumpImageList::updateImages()
if( destroy )
{
- //llinfos << "*** Destroying dark " << (void*)image << llendl;;
+ //LL_INFOS() << "*** Destroying dark " << (void*)image << LL_ENDL;;
mDarknessEntries.erase(curiter); // deletes the image thanks to reference counting
}
}
@@ -1095,7 +1095,7 @@ LLViewerTexture* LLBumpImageList::getBrightnessDarknessImage(LLViewerFetchedText
}
-static LLFastTimer::DeclareTimer FTM_BUMP_SOURCE_STANDARD_LOADED("Bump Standard Callback");
+static LLTrace::BlockTimerStatHandle FTM_BUMP_SOURCE_STANDARD_LOADED("Bump Standard Callback");
// static
void LLBumpImageList::onSourceBrightnessLoaded( BOOL success, LLViewerFetchedTexture *src_vi, LLImageRaw* src, LLImageRaw* aux_src, S32 discard_level, BOOL final, void* userdata )
@@ -1119,22 +1119,22 @@ void LLBumpImageList::onSourceDarknessLoaded( BOOL success, LLViewerFetchedTextu
}
}
-static LLFastTimer::DeclareTimer FTM_BUMP_GEN_NORMAL("Generate Normal Map");
-static LLFastTimer::DeclareTimer FTM_BUMP_CREATE_TEXTURE("Create GL Normal Map");
+static LLTrace::BlockTimerStatHandle FTM_BUMP_GEN_NORMAL("Generate Normal Map");
+static LLTrace::BlockTimerStatHandle FTM_BUMP_CREATE_TEXTURE("Create GL Normal Map");
void LLBumpImageList::onSourceStandardLoaded( BOOL success, LLViewerFetchedTexture* src_vi, LLImageRaw* src, LLImageRaw* aux_src, S32 discard_level, BOOL final, void* userdata)
{
if (success && LLPipeline::sRenderDeferred)
{
- LLFastTimer t(FTM_BUMP_SOURCE_STANDARD_LOADED);
+ LL_RECORD_BLOCK_TIME(FTM_BUMP_SOURCE_STANDARD_LOADED);
LLPointer<LLImageRaw> nrm_image = new LLImageRaw(src->getWidth(), src->getHeight(), 4);
{
- LLFastTimer t(FTM_BUMP_GEN_NORMAL);
+ LL_RECORD_BLOCK_TIME(FTM_BUMP_GEN_NORMAL);
generateNormalMapFromAlpha(src, nrm_image);
}
src_vi->setExplicitFormat(GL_RGBA, GL_RGBA);
{
- LLFastTimer t(FTM_BUMP_CREATE_TEXTURE);
+ LL_RECORD_BLOCK_TIME(FTM_BUMP_CREATE_TEXTURE);
src_vi->createGLTexture(src_vi->getDiscardLevel(), nrm_image);
}
}
@@ -1196,27 +1196,27 @@ void LLBumpImageList::generateNormalMapFromAlpha(LLImageRaw* src, LLImageRaw* nr
}
-static LLFastTimer::DeclareTimer FTM_BUMP_SOURCE_LOADED("Bump Source Loaded");
-static LLFastTimer::DeclareTimer FTM_BUMP_SOURCE_ENTRIES_UPDATE("Entries Update");
-static LLFastTimer::DeclareTimer FTM_BUMP_SOURCE_MIN_MAX("Min/Max");
-static LLFastTimer::DeclareTimer FTM_BUMP_SOURCE_RGB2LUM("RGB to Luminance");
-static LLFastTimer::DeclareTimer FTM_BUMP_SOURCE_RESCALE("Rescale");
-static LLFastTimer::DeclareTimer FTM_BUMP_SOURCE_GEN_NORMAL("Generate Normal");
-static LLFastTimer::DeclareTimer FTM_BUMP_SOURCE_CREATE("Bump Source Create");
+static LLTrace::BlockTimerStatHandle FTM_BUMP_SOURCE_LOADED("Bump Source Loaded");
+static LLTrace::BlockTimerStatHandle FTM_BUMP_SOURCE_ENTRIES_UPDATE("Entries Update");
+static LLTrace::BlockTimerStatHandle FTM_BUMP_SOURCE_MIN_MAX("Min/Max");
+static LLTrace::BlockTimerStatHandle FTM_BUMP_SOURCE_RGB2LUM("RGB to Luminance");
+static LLTrace::BlockTimerStatHandle FTM_BUMP_SOURCE_RESCALE("Rescale");
+static LLTrace::BlockTimerStatHandle FTM_BUMP_SOURCE_GEN_NORMAL("Generate Normal");
+static LLTrace::BlockTimerStatHandle FTM_BUMP_SOURCE_CREATE("Bump Source Create");
// static
void LLBumpImageList::onSourceLoaded( BOOL success, LLViewerTexture *src_vi, LLImageRaw* src, LLUUID& source_asset_id, EBumpEffect bump_code )
{
if( success )
{
- LLFastTimer t(FTM_BUMP_SOURCE_LOADED);
+ LL_RECORD_BLOCK_TIME(FTM_BUMP_SOURCE_LOADED);
bump_image_map_t& entries_list(bump_code == BE_BRIGHTNESS ? gBumpImageList.mBrightnessEntries : gBumpImageList.mDarknessEntries );
bump_image_map_t::iterator iter = entries_list.find(source_asset_id);
{
- LLFastTimer t(FTM_BUMP_SOURCE_ENTRIES_UPDATE);
+ LL_RECORD_BLOCK_TIME(FTM_BUMP_SOURCE_ENTRIES_UPDATE);
if (iter == entries_list.end() ||
iter->second.isNull() ||
iter->second->getWidth() != src->getWidth() ||
@@ -1259,7 +1259,7 @@ void LLBumpImageList::onSourceLoaded( BOOL success, LLViewerTexture *src_vi, LLI
case 1:
case 2:
{
- LLFastTimer t(FTM_BUMP_SOURCE_MIN_MAX);
+ LL_RECORD_BLOCK_TIME(FTM_BUMP_SOURCE_MIN_MAX);
if( src_data_size == dst_data_size * src_components )
{
for( S32 i = 0, j=0; i < dst_data_size; i++, j+= src_components )
@@ -1285,7 +1285,7 @@ void LLBumpImageList::onSourceLoaded( BOOL success, LLViewerTexture *src_vi, LLI
case 3:
case 4:
{
- LLFastTimer t(FTM_BUMP_SOURCE_RGB2LUM);
+ LL_RECORD_BLOCK_TIME(FTM_BUMP_SOURCE_RGB2LUM);
if( src_data_size == dst_data_size * src_components )
{
for( S32 i = 0, j=0; i < dst_data_size; i++, j+= src_components )
@@ -1318,7 +1318,7 @@ void LLBumpImageList::onSourceLoaded( BOOL success, LLViewerTexture *src_vi, LLI
if( maximum > minimum )
{
- LLFastTimer t(FTM_BUMP_SOURCE_RESCALE);
+ LL_RECORD_BLOCK_TIME(FTM_BUMP_SOURCE_RESCALE);
U8 bias_and_scale_lut[256];
F32 twice_one_over_range = 2.f / (maximum - minimum);
S32 i;
@@ -1354,7 +1354,7 @@ void LLBumpImageList::onSourceLoaded( BOOL success, LLViewerTexture *src_vi, LLI
if (!LLPipeline::sRenderDeferred)
{
- LLFastTimer t(FTM_BUMP_SOURCE_CREATE);
+ LL_RECORD_BLOCK_TIME(FTM_BUMP_SOURCE_CREATE);
bump->setExplicitFormat(GL_ALPHA8, GL_ALPHA);
bump->createGLTexture(0, dst_image);
}
@@ -1365,13 +1365,13 @@ void LLBumpImageList::onSourceLoaded( BOOL success, LLViewerTexture *src_vi, LLI
bump->getGLTexture()->setAllowCompression(false);
{
- LLFastTimer t(FTM_BUMP_SOURCE_CREATE);
+ LL_RECORD_BLOCK_TIME(FTM_BUMP_SOURCE_CREATE);
bump->setExplicitFormat(GL_RGBA8, GL_ALPHA);
bump->createGLTexture(0, dst_image);
}
{
- LLFastTimer t(FTM_BUMP_SOURCE_GEN_NORMAL);
+ LL_RECORD_BLOCK_TIME(FTM_BUMP_SOURCE_GEN_NORMAL);
gPipeline.mScreen.bindTarget();
LLGLDepthTest depth(GL_FALSE);
@@ -1568,7 +1568,7 @@ void LLDrawPoolBump::pushBatch(LLDrawInfo& params, U32 mask, BOOL texture, BOOL
void LLDrawPoolInvisible::render(S32 pass)
{ //render invisiprims
- LLFastTimer t(FTM_RENDER_INVISIBLE);
+ LL_RECORD_BLOCK_TIME(FTM_RENDER_INVISIBLE);
if (gPipeline.canUseVertexShaders())
{
@@ -1608,7 +1608,7 @@ void LLDrawPoolInvisible::endDeferredPass( S32 pass )
void LLDrawPoolInvisible::renderDeferred( S32 pass )
{ //render invisiprims; this doesn't work becaue it also blocks all the post-deferred stuff
#if 0
- LLFastTimer t(FTM_RENDER_INVISIBLE);
+ LL_RECORD_BLOCK_TIME(FTM_RENDER_INVISIBLE);
U32 invisi_mask = LLVertexBuffer::MAP_VERTEX;
glStencilMask(0);
diff --git a/indra/newview/lldrawpoolmaterials.cpp b/indra/newview/lldrawpoolmaterials.cpp
index d1b5080650..514411aef5 100644
--- a/indra/newview/lldrawpoolmaterials.cpp
+++ b/indra/newview/lldrawpoolmaterials.cpp
@@ -82,12 +82,12 @@ void LLDrawPoolMaterials::beginDeferredPass(S32 pass)
diffuse_channel = mShader->enableTexture(LLShaderMgr::DIFFUSE_MAP);
- LLFastTimer t(FTM_RENDER_MATERIALS);
+ LL_RECORD_BLOCK_TIME(FTM_RENDER_MATERIALS);
}
void LLDrawPoolMaterials::endDeferredPass(S32 pass)
{
- LLFastTimer t(FTM_RENDER_MATERIALS);
+ LL_RECORD_BLOCK_TIME(FTM_RENDER_MATERIALS);
mShader->unbind();
diff --git a/indra/newview/lldrawpoolsimple.cpp b/indra/newview/lldrawpoolsimple.cpp
index 0bc7ae766c..bd180de6c6 100755
--- a/indra/newview/lldrawpoolsimple.cpp
+++ b/indra/newview/lldrawpoolsimple.cpp
@@ -40,8 +40,8 @@
static LLGLSLShader* simple_shader = NULL;
static LLGLSLShader* fullbright_shader = NULL;
-static LLFastTimer::DeclareTimer FTM_RENDER_SIMPLE_DEFERRED("Deferred Simple");
-static LLFastTimer::DeclareTimer FTM_RENDER_GRASS_DEFERRED("Deferred Grass");
+static LLTrace::BlockTimerStatHandle FTM_RENDER_SIMPLE_DEFERRED("Deferred Simple");
+static LLTrace::BlockTimerStatHandle FTM_RENDER_GRASS_DEFERRED("Deferred Grass");
void LLDrawPoolGlow::beginPostDeferredPass(S32 pass)
{
@@ -49,11 +49,11 @@ void LLDrawPoolGlow::beginPostDeferredPass(S32 pass)
gDeferredEmissiveProgram.uniform1f(LLShaderMgr::TEXTURE_GAMMA, 2.2f);
}
-static LLFastTimer::DeclareTimer FTM_RENDER_GLOW_PUSH("Glow Push");
+static LLTrace::BlockTimerStatHandle FTM_RENDER_GLOW_PUSH("Glow Push");
void LLDrawPoolGlow::renderPostDeferred(S32 pass)
{
- LLFastTimer t(FTM_RENDER_GLOW);
+ LL_RECORD_BLOCK_TIME(FTM_RENDER_GLOW);
LLGLEnable blend(GL_BLEND);
LLGLDisable test(GL_ALPHA_TEST);
gGL.flush();
@@ -66,7 +66,7 @@ void LLDrawPoolGlow::renderPostDeferred(S32 pass)
gGL.setColorMask(false, true);
{
- LLFastTimer t(FTM_RENDER_GLOW_PUSH);
+ LL_RECORD_BLOCK_TIME(FTM_RENDER_GLOW_PUSH);
pushBatches(LLRenderPass::PASS_GLOW, getVertexDataMask() | LLVertexBuffer::MAP_TEXTURE_INDEX, TRUE, TRUE);
}
@@ -94,7 +94,7 @@ S32 LLDrawPoolGlow::getNumPasses()
void LLDrawPoolGlow::render(S32 pass)
{
- LLFastTimer t(FTM_RENDER_GLOW);
+ LL_RECORD_BLOCK_TIME(FTM_RENDER_GLOW);
LLGLEnable blend(GL_BLEND);
LLGLDisable test(GL_ALPHA_TEST);
gGL.flush();
@@ -152,7 +152,7 @@ void LLDrawPoolSimple::prerender()
void LLDrawPoolSimple::beginRenderPass(S32 pass)
{
- LLFastTimer t(FTM_RENDER_SIMPLE);
+ LL_RECORD_BLOCK_TIME(FTM_RENDER_SIMPLE);
if (LLPipeline::sImpostorRender)
{
@@ -183,7 +183,7 @@ void LLDrawPoolSimple::beginRenderPass(S32 pass)
void LLDrawPoolSimple::endRenderPass(S32 pass)
{
- LLFastTimer t(FTM_RENDER_SIMPLE);
+ LL_RECORD_BLOCK_TIME(FTM_RENDER_SIMPLE);
stop_glerror();
LLRenderPass::endRenderPass(pass);
stop_glerror();
@@ -198,7 +198,7 @@ void LLDrawPoolSimple::render(S32 pass)
LLGLDisable blend(GL_BLEND);
{ //render simple
- LLFastTimer t(FTM_RENDER_SIMPLE);
+ LL_RECORD_BLOCK_TIME(FTM_RENDER_SIMPLE);
gPipeline.enableLightsDynamic();
if (mVertexShaderLevel > 0)
@@ -235,7 +235,7 @@ void LLDrawPoolSimple::render(S32 pass)
-static LLFastTimer::DeclareTimer FTM_RENDER_ALPHA_MASK("Alpha Mask");
+static LLTrace::BlockTimerStatHandle FTM_RENDER_ALPHA_MASK("Alpha Mask");
LLDrawPoolAlphaMask::LLDrawPoolAlphaMask() :
LLRenderPass(POOL_ALPHA_MASK)
@@ -249,7 +249,7 @@ void LLDrawPoolAlphaMask::prerender()
void LLDrawPoolAlphaMask::beginRenderPass(S32 pass)
{
- LLFastTimer t(FTM_RENDER_ALPHA_MASK);
+ LL_RECORD_BLOCK_TIME(FTM_RENDER_ALPHA_MASK);
if (LLPipeline::sUnderWaterRender)
{
@@ -276,7 +276,7 @@ void LLDrawPoolAlphaMask::beginRenderPass(S32 pass)
void LLDrawPoolAlphaMask::endRenderPass(S32 pass)
{
- LLFastTimer t(FTM_RENDER_ALPHA_MASK);
+ LL_RECORD_BLOCK_TIME(FTM_RENDER_ALPHA_MASK);
stop_glerror();
LLRenderPass::endRenderPass(pass);
stop_glerror();
@@ -289,7 +289,7 @@ void LLDrawPoolAlphaMask::endRenderPass(S32 pass)
void LLDrawPoolAlphaMask::render(S32 pass)
{
LLGLDisable blend(GL_BLEND);
- LLFastTimer t(FTM_RENDER_ALPHA_MASK);
+ LL_RECORD_BLOCK_TIME(FTM_RENDER_ALPHA_MASK);
if (mVertexShaderLevel > 0)
{
@@ -322,7 +322,7 @@ void LLDrawPoolFullbrightAlphaMask::prerender()
void LLDrawPoolFullbrightAlphaMask::beginRenderPass(S32 pass)
{
- LLFastTimer t(FTM_RENDER_ALPHA_MASK);
+ LL_RECORD_BLOCK_TIME(FTM_RENDER_ALPHA_MASK);
if (LLPipeline::sUnderWaterRender)
{
@@ -349,7 +349,7 @@ void LLDrawPoolFullbrightAlphaMask::beginRenderPass(S32 pass)
void LLDrawPoolFullbrightAlphaMask::endRenderPass(S32 pass)
{
- LLFastTimer t(FTM_RENDER_ALPHA_MASK);
+ LL_RECORD_BLOCK_TIME(FTM_RENDER_ALPHA_MASK);
stop_glerror();
LLRenderPass::endRenderPass(pass);
stop_glerror();
@@ -361,7 +361,7 @@ void LLDrawPoolFullbrightAlphaMask::endRenderPass(S32 pass)
void LLDrawPoolFullbrightAlphaMask::render(S32 pass)
{
- LLFastTimer t(FTM_RENDER_ALPHA_MASK);
+ LL_RECORD_BLOCK_TIME(FTM_RENDER_ALPHA_MASK);
if (mVertexShaderLevel > 0)
{
@@ -395,13 +395,13 @@ void LLDrawPoolFullbrightAlphaMask::render(S32 pass)
void LLDrawPoolSimple::beginDeferredPass(S32 pass)
{
- LLFastTimer t(FTM_RENDER_SIMPLE_DEFERRED);
+ LL_RECORD_BLOCK_TIME(FTM_RENDER_SIMPLE_DEFERRED);
gDeferredDiffuseProgram.bind();
}
void LLDrawPoolSimple::endDeferredPass(S32 pass)
{
- LLFastTimer t(FTM_RENDER_SIMPLE_DEFERRED);
+ LL_RECORD_BLOCK_TIME(FTM_RENDER_SIMPLE_DEFERRED);
LLRenderPass::endRenderPass(pass);
gDeferredDiffuseProgram.unbind();
@@ -413,12 +413,12 @@ void LLDrawPoolSimple::renderDeferred(S32 pass)
LLGLDisable alpha_test(GL_ALPHA_TEST);
{ //render simple
- LLFastTimer t(FTM_RENDER_SIMPLE_DEFERRED);
+ LL_RECORD_BLOCK_TIME(FTM_RENDER_SIMPLE_DEFERRED);
pushBatches(LLRenderPass::PASS_SIMPLE, getVertexDataMask() | LLVertexBuffer::MAP_TEXTURE_INDEX, TRUE, TRUE);
}
}
-static LLFastTimer::DeclareTimer FTM_RENDER_ALPHA_MASK_DEFERRED("Deferred Alpha Mask");
+static LLTrace::BlockTimerStatHandle FTM_RENDER_ALPHA_MASK_DEFERRED("Deferred Alpha Mask");
void LLDrawPoolAlphaMask::beginDeferredPass(S32 pass)
{
@@ -432,7 +432,7 @@ void LLDrawPoolAlphaMask::endDeferredPass(S32 pass)
void LLDrawPoolAlphaMask::renderDeferred(S32 pass)
{
- LLFastTimer t(FTM_RENDER_ALPHA_MASK_DEFERRED);
+ LL_RECORD_BLOCK_TIME(FTM_RENDER_ALPHA_MASK_DEFERRED);
gDeferredDiffuseAlphaMaskProgram.bind();
gDeferredDiffuseAlphaMaskProgram.setMinimumAlpha(0.33f);
pushMaskBatches(LLRenderPass::PASS_ALPHA_MASK, getVertexDataMask() | LLVertexBuffer::MAP_TEXTURE_INDEX, TRUE, TRUE);
@@ -455,7 +455,7 @@ void LLDrawPoolGrass::prerender()
void LLDrawPoolGrass::beginRenderPass(S32 pass)
{
- LLFastTimer t(FTM_RENDER_GRASS);
+ LL_RECORD_BLOCK_TIME(FTM_RENDER_GRASS);
stop_glerror();
if (LLPipeline::sUnderWaterRender)
@@ -485,7 +485,7 @@ void LLDrawPoolGrass::beginRenderPass(S32 pass)
void LLDrawPoolGrass::endRenderPass(S32 pass)
{
- LLFastTimer t(FTM_RENDER_GRASS);
+ LL_RECORD_BLOCK_TIME(FTM_RENDER_GRASS);
LLRenderPass::endRenderPass(pass);
if (mVertexShaderLevel > 0)
@@ -503,7 +503,7 @@ void LLDrawPoolGrass::render(S32 pass)
LLGLDisable blend(GL_BLEND);
{
- LLFastTimer t(FTM_RENDER_GRASS);
+ LL_RECORD_BLOCK_TIME(FTM_RENDER_GRASS);
LLGLEnable test(GL_ALPHA_TEST);
gGL.setSceneBlendType(LLRender::BT_ALPHA);
//render grass
@@ -524,7 +524,7 @@ void LLDrawPoolGrass::endDeferredPass(S32 pass)
void LLDrawPoolGrass::renderDeferred(S32 pass)
{
{
- LLFastTimer t(FTM_RENDER_GRASS_DEFERRED);
+ LL_RECORD_BLOCK_TIME(FTM_RENDER_GRASS_DEFERRED);
gDeferredNonIndexedDiffuseAlphaMaskProgram.bind();
gDeferredNonIndexedDiffuseAlphaMaskProgram.setMinimumAlpha(0.5f);
//render grass
@@ -559,7 +559,7 @@ void LLDrawPoolFullbright::beginPostDeferredPass(S32 pass)
void LLDrawPoolFullbright::renderPostDeferred(S32 pass)
{
- LLFastTimer t(FTM_RENDER_FULLBRIGHT);
+ LL_RECORD_BLOCK_TIME(FTM_RENDER_FULLBRIGHT);
gGL.setSceneBlendType(LLRender::BT_ALPHA);
U32 fullbright_mask = LLVertexBuffer::MAP_VERTEX | LLVertexBuffer::MAP_TEXCOORD0 | LLVertexBuffer::MAP_COLOR | LLVertexBuffer::MAP_TEXTURE_INDEX;
@@ -581,7 +581,7 @@ void LLDrawPoolFullbright::endPostDeferredPass(S32 pass)
void LLDrawPoolFullbright::beginRenderPass(S32 pass)
{
- LLFastTimer t(FTM_RENDER_FULLBRIGHT);
+ LL_RECORD_BLOCK_TIME(FTM_RENDER_FULLBRIGHT);
if (LLPipeline::sUnderWaterRender)
{
@@ -595,7 +595,7 @@ void LLDrawPoolFullbright::beginRenderPass(S32 pass)
void LLDrawPoolFullbright::endRenderPass(S32 pass)
{
- LLFastTimer t(FTM_RENDER_FULLBRIGHT);
+ LL_RECORD_BLOCK_TIME(FTM_RENDER_FULLBRIGHT);
LLRenderPass::endRenderPass(pass);
stop_glerror();
@@ -610,7 +610,7 @@ void LLDrawPoolFullbright::endRenderPass(S32 pass)
void LLDrawPoolFullbright::render(S32 pass)
{ //render fullbright
- LLFastTimer t(FTM_RENDER_FULLBRIGHT);
+ LL_RECORD_BLOCK_TIME(FTM_RENDER_FULLBRIGHT);
gGL.setSceneBlendType(LLRender::BT_ALPHA);
stop_glerror();
@@ -673,7 +673,7 @@ void LLDrawPoolFullbrightAlphaMask::beginPostDeferredPass(S32 pass)
void LLDrawPoolFullbrightAlphaMask::renderPostDeferred(S32 pass)
{
- LLFastTimer t(FTM_RENDER_FULLBRIGHT);
+ LL_RECORD_BLOCK_TIME(FTM_RENDER_FULLBRIGHT);
LLGLDisable blend(GL_BLEND);
U32 fullbright_mask = LLVertexBuffer::MAP_VERTEX | LLVertexBuffer::MAP_TEXCOORD0 | LLVertexBuffer::MAP_COLOR | LLVertexBuffer::MAP_TEXTURE_INDEX;
pushMaskBatches(LLRenderPass::PASS_FULLBRIGHT_ALPHA_MASK, fullbright_mask, TRUE, TRUE);
diff --git a/indra/newview/lldrawpoolsky.cpp b/indra/newview/lldrawpoolsky.cpp
index ef8bdc3304..bdb16abc78 100755
--- a/indra/newview/lldrawpoolsky.cpp
+++ b/indra/newview/lldrawpoolsky.cpp
@@ -28,8 +28,6 @@
#include "lldrawpoolsky.h"
-#include "imageids.h"
-
#include "llagent.h"
#include "lldrawable.h"
#include "llface.h"
diff --git a/indra/newview/lldrawpoolterrain.cpp b/indra/newview/lldrawpoolterrain.cpp
index c3ec234223..33ce3d0111 100755
--- a/indra/newview/lldrawpoolterrain.cpp
+++ b/indra/newview/lldrawpoolterrain.cpp
@@ -55,7 +55,7 @@ int DebugDetailMap = 0;
S32 LLDrawPoolTerrain::sDetailMode = 1;
F32 LLDrawPoolTerrain::sDetailScale = DETAIL_SCALE;
static LLGLSLShader* sShader = NULL;
-static LLFastTimer::DeclareTimer FTM_SHADOW_TERRAIN("Terrain Shadow");
+static LLTrace::BlockTimerStatHandle FTM_SHADOW_TERRAIN("Terrain Shadow");
LLDrawPoolTerrain::LLDrawPoolTerrain(LLViewerTexture *texturep) :
@@ -129,7 +129,7 @@ void LLDrawPoolTerrain::prerender()
void LLDrawPoolTerrain::beginRenderPass( S32 pass )
{
- LLFastTimer t(FTM_RENDER_TERRAIN);
+ LL_RECORD_BLOCK_TIME(FTM_RENDER_TERRAIN);
LLFacePool::beginRenderPass(pass);
sShader = LLPipeline::sUnderWaterRender ?
@@ -144,7 +144,7 @@ void LLDrawPoolTerrain::beginRenderPass( S32 pass )
void LLDrawPoolTerrain::endRenderPass( S32 pass )
{
- LLFastTimer t(FTM_RENDER_TERRAIN);
+ LL_RECORD_BLOCK_TIME(FTM_RENDER_TERRAIN);
//LLFacePool::endRenderPass(pass);
if (mVertexShaderLevel > 1 && sShader->mShaderLevel > 0) {
@@ -160,7 +160,7 @@ S32 LLDrawPoolTerrain::getDetailMode()
void LLDrawPoolTerrain::render(S32 pass)
{
- LLFastTimer t(FTM_RENDER_TERRAIN);
+ LL_RECORD_BLOCK_TIME(FTM_RENDER_TERRAIN);
if (mDrawFace.empty())
{
@@ -243,7 +243,7 @@ void LLDrawPoolTerrain::render(S32 pass)
void LLDrawPoolTerrain::beginDeferredPass(S32 pass)
{
- LLFastTimer t(FTM_RENDER_TERRAIN);
+ LL_RECORD_BLOCK_TIME(FTM_RENDER_TERRAIN);
LLFacePool::beginRenderPass(pass);
sShader = &gDeferredTerrainProgram;
@@ -253,14 +253,14 @@ void LLDrawPoolTerrain::beginDeferredPass(S32 pass)
void LLDrawPoolTerrain::endDeferredPass(S32 pass)
{
- LLFastTimer t(FTM_RENDER_TERRAIN);
+ LL_RECORD_BLOCK_TIME(FTM_RENDER_TERRAIN);
LLFacePool::endRenderPass(pass);
sShader->unbind();
}
void LLDrawPoolTerrain::renderDeferred(S32 pass)
{
- LLFastTimer t(FTM_RENDER_TERRAIN);
+ LL_RECORD_BLOCK_TIME(FTM_RENDER_TERRAIN);
if (mDrawFace.empty())
{
return;
@@ -270,7 +270,7 @@ void LLDrawPoolTerrain::renderDeferred(S32 pass)
void LLDrawPoolTerrain::beginShadowPass(S32 pass)
{
- LLFastTimer t(FTM_SHADOW_TERRAIN);
+ LL_RECORD_BLOCK_TIME(FTM_SHADOW_TERRAIN);
LLFacePool::beginRenderPass(pass);
gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE);
gDeferredShadowProgram.bind();
@@ -278,14 +278,14 @@ void LLDrawPoolTerrain::beginShadowPass(S32 pass)
void LLDrawPoolTerrain::endShadowPass(S32 pass)
{
- LLFastTimer t(FTM_SHADOW_TERRAIN);
+ LL_RECORD_BLOCK_TIME(FTM_SHADOW_TERRAIN);
LLFacePool::endRenderPass(pass);
gDeferredShadowProgram.unbind();
}
void LLDrawPoolTerrain::renderShadow(S32 pass)
{
- LLFastTimer t(FTM_SHADOW_TERRAIN);
+ LL_RECORD_BLOCK_TIME(FTM_SHADOW_TERRAIN);
if (mDrawFace.empty())
{
return;
diff --git a/indra/newview/lldrawpooltree.cpp b/indra/newview/lldrawpooltree.cpp
index fedbd782dc..b1f40781f7 100755
--- a/indra/newview/lldrawpooltree.cpp
+++ b/indra/newview/lldrawpooltree.cpp
@@ -41,7 +41,7 @@
S32 LLDrawPoolTree::sDiffTex = 0;
static LLGLSLShader* shader = NULL;
-static LLFastTimer::DeclareTimer FTM_SHADOW_TREE("Tree Shadow");
+static LLTrace::BlockTimerStatHandle FTM_SHADOW_TREE("Tree Shadow");
LLDrawPoolTree::LLDrawPoolTree(LLViewerTexture *texturep) :
LLFacePool(POOL_TREE),
@@ -62,7 +62,7 @@ void LLDrawPoolTree::prerender()
void LLDrawPoolTree::beginRenderPass(S32 pass)
{
- LLFastTimer t(FTM_RENDER_TREES);
+ LL_RECORD_BLOCK_TIME(FTM_RENDER_TREES);
if (LLPipeline::sUnderWaterRender)
{
@@ -88,7 +88,7 @@ void LLDrawPoolTree::beginRenderPass(S32 pass)
void LLDrawPoolTree::render(S32 pass)
{
- LLFastTimer t(LLPipeline::sShadowRender ? FTM_SHADOW_TREE : FTM_RENDER_TREES);
+ LL_RECORD_BLOCK_TIME(LLPipeline::sShadowRender ? FTM_SHADOW_TREE : FTM_RENDER_TREES);
if (mDrawFace.empty())
{
@@ -131,7 +131,7 @@ void LLDrawPoolTree::render(S32 pass)
void LLDrawPoolTree::endRenderPass(S32 pass)
{
- LLFastTimer t(FTM_RENDER_TREES);
+ LL_RECORD_BLOCK_TIME(FTM_RENDER_TREES);
if (gPipeline.canUseWindLightShadersOnObjects())
{
@@ -149,7 +149,7 @@ void LLDrawPoolTree::endRenderPass(S32 pass)
//============================================
void LLDrawPoolTree::beginDeferredPass(S32 pass)
{
- LLFastTimer t(FTM_RENDER_TREES);
+ LL_RECORD_BLOCK_TIME(FTM_RENDER_TREES);
shader = &gDeferredTreeProgram;
shader->bind();
@@ -163,7 +163,7 @@ void LLDrawPoolTree::renderDeferred(S32 pass)
void LLDrawPoolTree::endDeferredPass(S32 pass)
{
- LLFastTimer t(FTM_RENDER_TREES);
+ LL_RECORD_BLOCK_TIME(FTM_RENDER_TREES);
shader->unbind();
}
@@ -173,7 +173,7 @@ void LLDrawPoolTree::endDeferredPass(S32 pass)
//============================================
void LLDrawPoolTree::beginShadowPass(S32 pass)
{
- LLFastTimer t(FTM_SHADOW_TREE);
+ LL_RECORD_BLOCK_TIME(FTM_SHADOW_TREE);
glPolygonOffset(gSavedSettings.getF32("RenderDeferredTreeShadowOffset"),
gSavedSettings.getF32("RenderDeferredTreeShadowBias"));
@@ -189,7 +189,7 @@ void LLDrawPoolTree::renderShadow(S32 pass)
void LLDrawPoolTree::endShadowPass(S32 pass)
{
- LLFastTimer t(FTM_SHADOW_TREE);
+ LL_RECORD_BLOCK_TIME(FTM_SHADOW_TREE);
glPolygonOffset(gSavedSettings.getF32("RenderDeferredSpotShadowOffset"),
gSavedSettings.getF32("RenderDeferredSpotShadowBias"));
diff --git a/indra/newview/lldrawpoolwater.cpp b/indra/newview/lldrawpoolwater.cpp
index 76e89b26e4..df06ad31e6 100755
--- a/indra/newview/lldrawpoolwater.cpp
+++ b/indra/newview/lldrawpoolwater.cpp
@@ -98,7 +98,7 @@ void LLDrawPoolWater::restoreGL()
LLDrawPool *LLDrawPoolWater::instancePool()
{
- llerrs << "Should never be calling instancePool on a water pool!" << llendl;
+ LL_ERRS() << "Should never be calling instancePool on a water pool!" << LL_ENDL;
return NULL;
}
@@ -142,7 +142,7 @@ void LLDrawPoolWater::endPostDeferredPass(S32 pass)
//===============================
void LLDrawPoolWater::renderDeferred(S32 pass)
{
- LLFastTimer t(FTM_RENDER_WATER);
+ LL_RECORD_BLOCK_TIME(FTM_RENDER_WATER);
deferred_render = TRUE;
shade();
deferred_render = FALSE;
@@ -152,7 +152,7 @@ void LLDrawPoolWater::renderDeferred(S32 pass)
void LLDrawPoolWater::render(S32 pass)
{
- LLFastTimer ftm(FTM_RENDER_WATER);
+ LL_RECORD_BLOCK_TIME(FTM_RENDER_WATER);
if (mDrawFace.empty() || LLDrawable::getCurrentFrame() <= 1)
{
return;
@@ -463,7 +463,7 @@ void LLDrawPoolWater::renderReflection(LLFace* face)
gGL.getTexUnit(0)->bind(mHBTex[dr]);
- LLOverrideFaceColor override(this, face->getFaceColor().mV);
+ LLOverrideFaceColor override(this, LLColor4(face->getFaceColor().mV));
face->renderIndexed();
}
diff --git a/indra/newview/lldrawpoolwlsky.cpp b/indra/newview/lldrawpoolwlsky.cpp
index a98d3e6b05..309f535c39 100755
--- a/indra/newview/lldrawpoolwlsky.cpp
+++ b/indra/newview/lldrawpoolwlsky.cpp
@@ -54,12 +54,12 @@ LLDrawPoolWLSky::LLDrawPoolWLSky(void) :
LLDrawPool(POOL_WL_SKY)
{
const std::string cloudNoiseFilename(gDirUtilp->getExpandedFilename(LL_PATH_APP_SETTINGS, "windlight", "clouds2.tga"));
- llinfos << "loading WindLight cloud noise from " << cloudNoiseFilename << llendl;
+ LL_INFOS() << "loading WindLight cloud noise from " << cloudNoiseFilename << LL_ENDL;
LLPointer<LLImageFormatted> cloudNoiseFile(LLImageFormatted::createFromExtension(cloudNoiseFilename));
if(cloudNoiseFile.isNull()) {
- llerrs << "Error: Failed to load cloud noise image " << cloudNoiseFilename << llendl;
+ LL_ERRS() << "Error: Failed to load cloud noise image " << cloudNoiseFilename << LL_ENDL;
}
if(cloudNoiseFile->load(cloudNoiseFilename))
@@ -69,8 +69,8 @@ LLDrawPoolWLSky::LLDrawPoolWLSky(void) :
if(cloudNoiseFile->decode(sCloudNoiseRawImage, 0.0f))
{
//debug use
- lldebugs << "cloud noise raw image width: " << sCloudNoiseRawImage->getWidth() << " : height: " << sCloudNoiseRawImage->getHeight() << " : components: " <<
- (S32)sCloudNoiseRawImage->getComponents() << " : data size: " << sCloudNoiseRawImage->getDataSize() << llendl ;
+ LL_DEBUGS() << "cloud noise raw image width: " << sCloudNoiseRawImage->getWidth() << " : height: " << sCloudNoiseRawImage->getHeight() << " : components: " <<
+ (S32)sCloudNoiseRawImage->getComponents() << " : data size: " << sCloudNoiseRawImage->getDataSize() << LL_ENDL ;
llassert_always(sCloudNoiseRawImage->getData()) ;
sCloudNoiseTexture = LLViewerTextureManager::getLocalTexture(sCloudNoiseRawImage.get(), TRUE);
@@ -86,7 +86,7 @@ LLDrawPoolWLSky::LLDrawPoolWLSky(void) :
LLDrawPoolWLSky::~LLDrawPoolWLSky()
{
- //llinfos << "destructing wlsky draw pool." << llendl;
+ //LL_INFOS() << "destructing wlsky draw pool." << LL_ENDL;
sCloudNoiseTexture = NULL;
sCloudNoiseRawImage = NULL;
}
@@ -197,7 +197,7 @@ void LLDrawPoolWLSky::renderStars(void) const
// If start_brightness is not set, exit
if( error )
{
- llwarns << "star_brightness missing in mCurParams" << llendl;
+ LL_WARNS() << "star_brightness missing in mCurParams" << LL_ENDL;
return;
}
@@ -308,7 +308,7 @@ void LLDrawPoolWLSky::renderDeferred(S32 pass)
{
return;
}
- LLFastTimer ftm(FTM_RENDER_WL_SKY);
+ LL_RECORD_BLOCK_TIME(FTM_RENDER_WL_SKY);
const F32 camHeightLocal = LLWLParamManager::getInstance()->getDomeOffset() * LLWLParamManager::getInstance()->getDomeRadius();
@@ -355,7 +355,7 @@ void LLDrawPoolWLSky::render(S32 pass)
{
return;
}
- LLFastTimer ftm(FTM_RENDER_WL_SKY);
+ LL_RECORD_BLOCK_TIME(FTM_RENDER_WL_SKY);
const F32 camHeightLocal = LLWLParamManager::getInstance()->getDomeOffset() * LLWLParamManager::getInstance()->getDomeRadius();
@@ -391,7 +391,7 @@ void LLDrawPoolWLSky::render(S32 pass)
void LLDrawPoolWLSky::prerender()
{
- //llinfos << "wlsky prerendering pass." << llendl;
+ //LL_INFOS() << "wlsky prerendering pass." << LL_ENDL;
}
LLDrawPoolWLSky *LLDrawPoolWLSky::instancePool()
diff --git a/indra/newview/lldynamictexture.cpp b/indra/newview/lldynamictexture.cpp
index 29ad4f34d2..fa9a0712fa 100755
--- a/indra/newview/lldynamictexture.cpp
+++ b/indra/newview/lldynamictexture.cpp
@@ -99,7 +99,7 @@ void LLViewerDynamicTexture::generateGLTexture(LLGLint internal_format, LLGLenum
{
if (mComponents < 1 || mComponents > 4)
{
- llerrs << "Bad number of components in dynamic texture: " << mComponents << llendl;
+ LL_ERRS() << "Bad number of components in dynamic texture: " << mComponents << LL_ENDL;
}
LLPointer<LLImageRaw> raw_image = new LLImageRaw(mFullWidth, mFullHeight, mComponents);
diff --git a/indra/newview/lldynamictexture.h b/indra/newview/lldynamictexture.h
index d287ae6eeb..f3f57c9a6b 100755
--- a/indra/newview/lldynamictexture.h
+++ b/indra/newview/lldynamictexture.h
@@ -38,12 +38,12 @@ class LLViewerDynamicTexture : public LLViewerTexture
public:
void* operator new(size_t size)
{
- return ll_aligned_malloc_16(size);
+ return LLTrace::MemTrackable<LLTexture>::aligned_new<16>(size);
}
- void operator delete(void* ptr)
+ void operator delete(void* ptr, size_t size)
{
- ll_aligned_free_16(ptr);
+ LLTrace::MemTrackable<LLTexture>::aligned_delete<16>(ptr, size);
}
enum
diff --git a/indra/newview/llenvmanager.cpp b/indra/newview/llenvmanager.cpp
index 589cf28615..41d378fea1 100755
--- a/indra/newview/llenvmanager.cpp
+++ b/indra/newview/llenvmanager.cpp
@@ -40,7 +40,7 @@ std::string LLEnvPrefs::getWaterPresetName() const
{
if (mWaterPresetName.empty())
{
- llwarns << "Water preset name is empty" << llendl;
+ LL_WARNS() << "Water preset name is empty" << LL_ENDL;
}
return mWaterPresetName;
@@ -50,7 +50,7 @@ std::string LLEnvPrefs::getSkyPresetName() const
{
if (mSkyPresetName.empty())
{
- llwarns << "Sky preset name is empty" << llendl;
+ LL_WARNS() << "Sky preset name is empty" << LL_ENDL;
}
return mSkyPresetName;
@@ -60,7 +60,7 @@ std::string LLEnvPrefs::getDayCycleName() const
{
if (mDayCycleName.empty())
{
- llwarns << "Day cycle name is empty" << llendl;
+ LL_WARNS() << "Day cycle name is empty" << LL_ENDL;
}
return mDayCycleName;
@@ -201,7 +201,7 @@ bool LLEnvManagerNew::useSkyPreset(const std::string& name)
if (!sky_mgr.getParamSet(LLWLParamKey(name, LLEnvKey::SCOPE_LOCAL), param_set))
{
- llwarns << "No sky preset named " << name << llendl;
+ LL_WARNS() << "No sky preset named " << name << LL_ENDL;
return false;
}
@@ -232,7 +232,7 @@ bool LLEnvManagerNew::useDayCycle(const std::string& name, LLEnvKey::EScope scop
if (!LLDayCycleManager::instance().getPreset(name, params))
{
- llwarns << "No day cycle named " << name << llendl;
+ LL_WARNS() << "No day cycle named " << name << LL_ENDL;
return false;
}
}
@@ -260,7 +260,7 @@ void LLEnvManagerNew::setUseWaterPreset(const std::string& name)
// *TODO: make sure the preset exists.
if (name.empty())
{
- llwarns << "Empty water preset name passed" << llendl;
+ LL_WARNS() << "Empty water preset name passed" << LL_ENDL;
return;
}
@@ -274,7 +274,7 @@ void LLEnvManagerNew::setUseSkyPreset(const std::string& name)
// *TODO: make sure the preset exists.
if (name.empty())
{
- llwarns << "Empty sky preset name passed" << llendl;
+ LL_WARNS() << "Empty sky preset name passed" << LL_ENDL;
return;
}
@@ -287,7 +287,7 @@ void LLEnvManagerNew::setUseDayCycle(const std::string& name)
{
if (!LLDayCycleManager::instance().presetExists(name))
{
- llwarns << "Invalid day cycle name passed" << llendl;
+ LL_WARNS() << "Invalid day cycle name passed" << LL_ENDL;
return;
}
@@ -574,7 +574,7 @@ void LLEnvManagerNew::updateWaterFromPrefs(bool interpolate)
LLWaterParamSet params;
if (!water_mgr.getParamSet(water, params))
{
- llwarns << "No water preset named " << water << ", falling back to defaults" << llendl;
+ LL_WARNS() << "No water preset named " << water << ", falling back to defaults" << LL_ENDL;
water_mgr.getParamSet("Default", params);
// *TODO: Fix user preferences accordingly.
@@ -654,19 +654,19 @@ void LLEnvManagerNew::onRegionChange()
LLUUID region_uuid = regionp ? regionp->getRegionID() : LLUUID::null;
if (region_uuid != mCurRegionUUID)
{
- // Clear locally modified region settings.
- mNewRegionPrefs.clear();
+ // Clear locally modified region settings.
+ mNewRegionPrefs.clear();
- // *TODO: clear environment settings of the previous region?
+ // *TODO: clear environment settings of the previous region?
- // Request environment settings of the new region.
- mCurRegionUUID = region_uuid;
+ // Request environment settings of the new region.
+ mCurRegionUUID = region_uuid;
// for region crossings, interpolate the change; for teleports, don't
mInterpNextChangeMessage = (gAgent.getTeleportState() == LLAgent::TELEPORT_NONE);
LL_DEBUGS("Windlight") << (mInterpNextChangeMessage ? "Crossed" : "Teleported")
<< " to new region: " << region_uuid
<< LL_ENDL;
- requestRegionSettings();
+ requestRegionSettings();
}
else
{
diff --git a/indra/newview/llestateinfomodel.cpp b/indra/newview/llestateinfomodel.cpp
index 2669b0340f..761adc5942 100755
--- a/indra/newview/llestateinfomodel.cpp
+++ b/indra/newview/llestateinfomodel.cpp
@@ -93,7 +93,7 @@ void LLEstateInfoModel::update(const strings_t& strings)
LL_DEBUGS("Windlight Sync") << "Received estate info: "
<< "is_sun_fixed = " << getUseFixedSun()
<< ", sun_hour = " << getSunHour() << LL_ENDL;
- lldebugs << getInfoDump() << llendl;
+ LL_DEBUGS() << getInfoDump() << LL_ENDL;
// Update region owner.
LLViewerRegion* regionp = gAgent.getRegion();
@@ -117,14 +117,14 @@ public:
// if we get a normal response, handle it here
virtual void result(const LLSD& content)
{
- llinfos << "Committed estate info" << llendl;
+ LL_INFOS() << "Committed estate info" << LL_ENDL;
LLEstateInfoModel::instance().notifyCommit();
}
// if we get an error response
virtual void errorWithContent(U32 status, const std::string& reason, const LLSD& content)
{
- llwarns << "Failed to commit estate info [status:" << status << "]: " << content << llendl;
+ LL_WARNS() << "Failed to commit estate info [status:" << status << "]: " << content << LL_ENDL;
}
};
@@ -155,7 +155,7 @@ bool LLEstateInfoModel::commitEstateInfoCaps()
LL_DEBUGS("Windlight Sync") << "Sending estate caps: "
<< "is_sun_fixed = " << getUseFixedSun()
<< ", sun_hour = " << getSunHour() << LL_ENDL;
- lldebugs << body << LL_ENDL;
+ LL_DEBUGS() << body << LL_ENDL;
// we use a responder so that we can re-get the data after committing to the database
LLHTTPClient::post(url, body, new LLEstateChangeInfoResponder);
@@ -174,7 +174,7 @@ void LLEstateInfoModel::commitEstateInfoDataserver()
LL_DEBUGS("Windlight Sync") << "Sending estate info: "
<< "is_sun_fixed = " << getUseFixedSun()
<< ", sun_hour = " << getSunHour() << LL_ENDL;
- lldebugs << getInfoDump() << LL_ENDL;
+ LL_DEBUGS() << getInfoDump() << LL_ENDL;
LLMessageSystem* msg = gMessageSystem;
msg->newMessage("EstateOwnerMessage");
diff --git a/indra/newview/lleventnotifier.cpp b/indra/newview/lleventnotifier.cpp
index bedab75f98..e3c17f9877 100755
--- a/indra/newview/lleventnotifier.cpp
+++ b/indra/newview/lleventnotifier.cpp
@@ -167,7 +167,7 @@ bool LLEventNotifier::add(U32 eventId, F64 eventEpoch, const std::string& eventD
{
LLEventNotification *new_enp = new LLEventNotification(eventId, eventEpoch, eventDateStr, eventName);
- llinfos << "Add event " << eventName << " id " << eventId << " date " << eventDateStr << llendl;
+ LL_INFOS() << "Add event " << eventName << " id " << eventId << " date " << eventDateStr << LL_ENDL;
if(!new_enp->isValid())
{
delete new_enp;
diff --git a/indra/newview/lleventpoll.cpp b/indra/newview/lleventpoll.cpp
index c1630318e8..fbd9466afe 100755
--- a/indra/newview/lleventpoll.cpp
+++ b/indra/newview/lleventpoll.cpp
@@ -109,15 +109,15 @@ namespace
const std::string& pollURL, const LLHost& sender)
{
LLHTTPClient::ResponderPtr result = new LLEventPollResponder(pollURL, sender);
- llinfos << "LLEventPollResponder::start <" << sCount << "> "
- << pollURL << llendl;
+ LL_INFOS() << "LLEventPollResponder::start <" << sCount << "> "
+ << pollURL << LL_ENDL;
return result;
}
void LLEventPollResponder::stop()
{
- llinfos << "LLEventPollResponder::stop <" << mCount << "> "
- << mPollURL << llendl;
+ LL_INFOS() << "LLEventPollResponder::stop <" << mCount << "> "
+ << mPollURL << LL_ENDL;
// there should be a way to stop a LLHTTPClient request in progress
mDone = true;
}
@@ -134,18 +134,18 @@ namespace
LLViewerRegion *regionp = gAgent.getRegion();
if (!regionp)
{
- llerrs << "LLEventPoll initialized before region is added." << llendl;
+ LL_ERRS() << "LLEventPoll initialized before region is added." << LL_ENDL;
}
mSender = sender.getIPandPort();
- llinfos << "LLEventPoll initialized with sender " << mSender << llendl;
+ LL_INFOS() << "LLEventPoll initialized with sender " << mSender << LL_ENDL;
makeRequest();
}
LLEventPollResponder::~LLEventPollResponder()
{
stop();
- lldebugs << "LLEventPollResponder::~Impl <" << mCount << "> "
- << mPollURL << llendl;
+ LL_DEBUGS() << "LLEventPollResponder::~Impl <" << mCount << "> "
+ << mPollURL << LL_ENDL;
}
// virtual
@@ -172,8 +172,8 @@ namespace
request["ack"] = mAcknowledge;
request["done"] = mDone;
- lldebugs << "LLEventPollResponder::makeRequest <" << mCount << "> ack = "
- << LLSDXMLStreamer(mAcknowledge) << llendl;
+ LL_DEBUGS() << "LLEventPollResponder::makeRequest <" << mCount << "> ack = "
+ << LLSDXMLStreamer(mAcknowledge) << LL_ENDL;
LLHTTPClient::post(mPollURL, request, this);
}
@@ -207,13 +207,13 @@ namespace
+ mErrorCount * EVENT_POLL_ERROR_RETRY_SECONDS_INC
, this);
- llwarns << "LLEventPollResponder error [status:" << status << "]: " << content << llendl;
+ LL_WARNS() << "LLEventPollResponder error [status:" << status << "]: " << content << LL_ENDL;
}
else
{
- llwarns << "LLEventPollResponder error <" << mCount
+ LL_WARNS() << "LLEventPollResponder error <" << mCount
<< "> [status:" << status << "]: " << content
- << (mDone ? " -- done" : "") << llendl;
+ << (mDone ? " -- done" : "") << LL_ENDL;
stop();
// At this point we have given up and the viewer will not receive HTTP messages from the simulator.
@@ -227,7 +227,7 @@ namespace
// continue running.
if(gAgent.getRegion() && gAgent.getRegion()->getHost().getIPandPort() == mSender)
{
- llwarns << "Forcing disconnect due to stalled main region event poll." << llendl;
+ LL_WARNS() << "Forcing disconnect due to stalled main region event poll." << LL_ENDL;
LLAppViewer::instance()->forceDisconnect(LLTrans::getString("AgentLostConnection"));
}
}
@@ -236,8 +236,8 @@ namespace
//virtual
void LLEventPollResponder::result(const LLSD& content)
{
- lldebugs << "LLEventPollResponder::result <" << mCount << ">"
- << (mDone ? " -- done" : "") << llendl;
+ LL_DEBUGS() << "LLEventPollResponder::result <" << mCount << ">"
+ << (mDone ? " -- done" : "") << LL_ENDL;
if (mDone) return;
@@ -246,7 +246,7 @@ namespace
if (!content.get("events") ||
!content.get("id"))
{
- llwarns << "received event poll with no events or id key" << llendl;
+ LL_WARNS() << "received event poll with no events or id key" << LL_ENDL;
makeRequest();
return;
}
@@ -256,12 +256,12 @@ namespace
if(mAcknowledge.isUndefined())
{
- llwarns << "LLEventPollResponder: id undefined" << llendl;
+ LL_WARNS() << "LLEventPollResponder: id undefined" << LL_ENDL;
}
- // was llinfos but now that CoarseRegionUpdate is TCP @ 1/second, it'd be too verbose for viewer logs. -MG
- lldebugs << "LLEventPollResponder::completed <" << mCount << "> " << events.size() << "events (id "
- << LLSDXMLStreamer(mAcknowledge) << ")" << llendl;
+ // was LL_INFOS() but now that CoarseRegionUpdate is TCP @ 1/second, it'd be too verbose for viewer logs. -MG
+ LL_DEBUGS() << "LLEventPollResponder::completed <" << mCount << "> " << events.size() << "events (id "
+ << LLSDXMLStreamer(mAcknowledge) << ")" << LL_ENDL;
LLSD::array_const_iterator i = events.beginArray();
LLSD::array_const_iterator end = events.endArray();
diff --git a/indra/newview/llexternaleditor.cpp b/indra/newview/llexternaleditor.cpp
index 9480e54809..df9c848cb8 100755
--- a/indra/newview/llexternaleditor.cpp
+++ b/indra/newview/llexternaleditor.cpp
@@ -44,7 +44,7 @@ LLExternalEditor::EErrorCode LLExternalEditor::setCommand(const std::string& env
std::string cmd = findCommand(env_var, override);
if (cmd.empty())
{
- llwarns << "Editor command is empty or not set" << llendl;
+ LL_WARNS() << "Editor command is empty or not set" << LL_ENDL;
return EC_NOT_SPECIFIED;
}
@@ -55,7 +55,7 @@ LLExternalEditor::EErrorCode LLExternalEditor::setCommand(const std::string& env
std::string bin_path = tokens[0];
if (!LLFile::isfile(bin_path))
{
- llwarns << "Editor binary [" << bin_path << "] not found" << llendl;
+ LL_WARNS() << "Editor binary [" << bin_path << "] not found" << LL_ENDL;
return EC_BINARY_NOT_FOUND;
}
@@ -71,10 +71,10 @@ LLExternalEditor::EErrorCode LLExternalEditor::setCommand(const std::string& env
if (cmd.find(sFilenameMarker) == std::string::npos)
{
mProcessParams.args.add(sFilenameMarker);
- llinfos << "Adding the filename marker (" << sFilenameMarker << ")" << llendl;
+ LL_INFOS() << "Adding the filename marker (" << sFilenameMarker << ")" << LL_ENDL;
}
- llinfos << "Setting command [" << mProcessParams << "]" << llendl;
+ LL_INFOS() << "Setting command [" << mProcessParams << "]" << LL_ENDL;
return EC_SUCCESS;
}
@@ -83,7 +83,7 @@ LLExternalEditor::EErrorCode LLExternalEditor::run(const std::string& file_path)
{
if (std::string(mProcessParams.executable).empty() || mProcessParams.args.empty())
{
- llwarns << "Editor command not set" << llendl;
+ LL_WARNS() << "Editor command not set" << LL_ENDL;
return EC_NOT_SPECIFIED;
}
@@ -181,12 +181,12 @@ std::string LLExternalEditor::findCommand(
if (!override.empty()) // try the supplied override first
{
cmd = override;
- llinfos << "Using override" << llendl;
+ LL_INFOS() << "Using override" << LL_ENDL;
}
else if (!LLUI::sSettingGroups["config"]->getString(sSetting).empty())
{
cmd = LLUI::sSettingGroups["config"]->getString(sSetting);
- llinfos << "Using setting" << llendl;
+ LL_INFOS() << "Using setting" << LL_ENDL;
}
else // otherwise use the path specified by the environment variable
{
@@ -194,10 +194,10 @@ std::string LLExternalEditor::findCommand(
if (env_var_val)
{
cmd = env_var_val;
- llinfos << "Using env var " << env_var << llendl;
+ LL_INFOS() << "Using env var " << env_var << LL_ENDL;
}
}
- llinfos << "Found command [" << cmd << "]" << llendl;
+ LL_INFOS() << "Found command [" << cmd << "]" << LL_ENDL;
return cmd;
}
diff --git a/indra/newview/llface.cpp b/indra/newview/llface.cpp
index ae62be0ad0..0b080cbdd7 100755
--- a/indra/newview/llface.cpp
+++ b/indra/newview/llface.cpp
@@ -220,7 +220,7 @@ void LLFace::destroy()
}
setDrawInfo(NULL);
-
+
mDrawablep = NULL;
mVObjp = NULL;
}
@@ -233,7 +233,7 @@ void LLFace::initClass()
void LLFace::setWorldMatrix(const LLMatrix4 &mat)
{
- llerrs << "Faces on this drawable are not independently modifiable\n" << llendl;
+ LL_ERRS() << "Faces on this drawable are not independently modifiable\n" << LL_ENDL;
}
void LLFace::setPool(LLFacePool* pool)
@@ -245,7 +245,7 @@ void LLFace::setPool(LLFacePool* new_pool, LLViewerTexture *texturep)
{
if (!new_pool)
{
- llerrs << "Setting pool to null!" << llendl;
+ LL_ERRS() << "Setting pool to null!" << LL_ENDL;
}
if (new_pool != mDrawPoolp)
@@ -355,7 +355,7 @@ void LLFace::switchTexture(U32 ch, LLViewerTexture* new_texture)
if(!new_texture)
{
- llerrs << "Can not switch to a null texture." << llendl;
+ LL_ERRS() << "Can not switch to a null texture." << LL_ENDL;
return;
}
@@ -365,7 +365,7 @@ void LLFace::switchTexture(U32 ch, LLViewerTexture* new_texture)
if (ch == LLRender::DIFFUSE_MAP)
{
- getViewerObject()->changeTEImage(mTEOffset, new_texture) ;
+ getViewerObject()->changeTEImage(mTEOffset, new_texture) ;
}
setTexture(ch, new_texture) ;
@@ -437,7 +437,7 @@ void LLFace::setTextureIndex(U8 index)
{
if (mDrawInfo && !mDrawInfo->mTextureList.empty())
{
- llerrs << "Face with no texture index references indexed texture draw info." << llendl;
+ LL_ERRS() << "Face with no texture index references indexed texture draw info." << LL_ENDL;
}
}
}
@@ -629,29 +629,29 @@ void LLFace::setDrawInfo(LLDrawInfo* draw_info)
void LLFace::printDebugInfo() const
{
LLFacePool *poolp = getPool();
- llinfos << "Object: " << getViewerObject()->mID << llendl;
+ LL_INFOS() << "Object: " << getViewerObject()->mID << LL_ENDL;
if (getDrawable())
{
- llinfos << "Type: " << LLPrimitive::pCodeToString(getDrawable()->getVObj()->getPCode()) << llendl;
+ LL_INFOS() << "Type: " << LLPrimitive::pCodeToString(getDrawable()->getVObj()->getPCode()) << LL_ENDL;
}
if (getTexture())
{
- llinfos << "Texture: " << getTexture() << " Comps: " << (U32)getTexture()->getComponents() << llendl;
+ LL_INFOS() << "Texture: " << getTexture() << " Comps: " << (U32)getTexture()->getComponents() << LL_ENDL;
}
else
{
- llinfos << "No texture: " << llendl;
+ LL_INFOS() << "No texture: " << LL_ENDL;
}
- llinfos << "Face: " << this << llendl;
- llinfos << "State: " << getState() << llendl;
- llinfos << "Geom Index Data:" << llendl;
- llinfos << "--------------------" << llendl;
- llinfos << "GI: " << mGeomIndex << " Count:" << mGeomCount << llendl;
- llinfos << "Face Index Data:" << llendl;
- llinfos << "--------------------" << llendl;
- llinfos << "II: " << mIndicesIndex << " Count:" << mIndicesCount << llendl;
- llinfos << llendl;
+ LL_INFOS() << "Face: " << this << LL_ENDL;
+ LL_INFOS() << "State: " << getState() << LL_ENDL;
+ LL_INFOS() << "Geom Index Data:" << LL_ENDL;
+ LL_INFOS() << "--------------------" << LL_ENDL;
+ LL_INFOS() << "GI: " << mGeomIndex << " Count:" << mGeomCount << LL_ENDL;
+ LL_INFOS() << "Face Index Data:" << LL_ENDL;
+ LL_INFOS() << "--------------------" << LL_ENDL;
+ LL_INFOS() << "II: " << mIndicesIndex << " Count:" << mIndicesCount << LL_ENDL;
+ LL_INFOS() << LL_ENDL;
if (poolp)
{
@@ -664,20 +664,20 @@ void LLFace::printDebugInfo() const
LLFace *facep = *iter;
if (facep == this)
{
- llinfos << "Pool reference: " << pool_references << llendl;
+ LL_INFOS() << "Pool reference: " << pool_references << LL_ENDL;
pool_references++;
}
}
if (pool_references != 1)
{
- llinfos << "Incorrect number of pool references!" << llendl;
+ LL_INFOS() << "Incorrect number of pool references!" << LL_ENDL;
}
}
#if 0
- llinfos << "Indices:" << llendl;
- llinfos << "--------------------" << llendl;
+ LL_INFOS() << "Indices:" << LL_ENDL;
+ LL_INFOS() << "--------------------" << LL_ENDL;
const U32 *indicesp = getRawIndices();
S32 indices_count = getIndicesCount();
@@ -685,17 +685,17 @@ void LLFace::printDebugInfo() const
for (S32 i = 0; i < indices_count; i++)
{
- llinfos << i << ":" << indicesp[i] << ":" << (S32)(indicesp[i] - geom_start) << llendl;
+ LL_INFOS() << i << ":" << indicesp[i] << ":" << (S32)(indicesp[i] - geom_start) << LL_ENDL;
}
- llinfos << llendl;
+ LL_INFOS() << LL_ENDL;
- llinfos << "Vertices:" << llendl;
- llinfos << "--------------------" << llendl;
+ LL_INFOS() << "Vertices:" << LL_ENDL;
+ LL_INFOS() << "--------------------" << LL_ENDL;
for (S32 i = 0; i < mGeomCount; i++)
{
- llinfos << mGeomIndex + i << ":" << poolp->getVertex(mGeomIndex + i) << llendl;
+ LL_INFOS() << mGeomIndex + i << ":" << poolp->getVertex(mGeomIndex + i) << LL_ENDL;
}
- llinfos << llendl;
+ LL_INFOS() << LL_ENDL;
#endif
}
@@ -798,7 +798,7 @@ BOOL LLFace::genVolumeBBoxes(const LLVolume &volume, S32 f,
if (f >= volume.getNumVolumeFaces())
{
- llwarns << "Generating bounding box for invalid face index!" << llendl;
+ LL_WARNS() << "Generating bounding box for invalid face index!" << LL_ENDL;
f = 0;
}
@@ -828,7 +828,7 @@ BOOL LLFace::genVolumeBBoxes(const LLVolume &volume, S32 f,
mask[4].setElement<2>();
mask[5].setElement<0>(); //110
mask[5].setElement<1>();
-
+
LLVector4a v[8];
v[6] = min;
@@ -928,7 +928,7 @@ LLVector2 LLFace::surfaceToTexture(LLVector2 surface_coord, const LLVector4a& po
if (texgen == LLTextureEntry::TEX_GEN_PLANAR)
{
planarProjection(tc, volume_normal, center, volume_position);
- }
+ }
}
if (mTextureMatrix) // if we have a texture matrix, use it
@@ -1081,12 +1081,12 @@ bool LLFace::canRenderAsMask()
}
-static LLFastTimer::DeclareTimer FTM_FACE_GEOM_VOLUME("Volume VB Cache");
+static LLTrace::BlockTimerStatHandle FTM_FACE_GEOM_VOLUME("Volume VB Cache");
//static
void LLFace::cacheFaceInVRAM(const LLVolumeFace& vf)
{
- LLFastTimer t(FTM_FACE_GEOM_VOLUME);
+ LL_RECORD_BLOCK_TIME(FTM_FACE_GEOM_VOLUME);
U32 mask = LLVertexBuffer::MAP_VERTEX | LLVertexBuffer::MAP_TEXCOORD0 |
LLVertexBuffer::MAP_TANGENT | LLVertexBuffer::MAP_NORMAL;
@@ -1148,33 +1148,33 @@ void push_for_transform(LLVertexBuffer* buff, U32 source_count, U32 dest_count)
}
}
-static LLFastTimer::DeclareTimer FTM_FACE_GET_GEOM("Face Geom");
-static LLFastTimer::DeclareTimer FTM_FACE_GEOM_POSITION("Position");
-static LLFastTimer::DeclareTimer FTM_FACE_GEOM_NORMAL("Normal");
-static LLFastTimer::DeclareTimer FTM_FACE_GEOM_TEXTURE("Texture");
-static LLFastTimer::DeclareTimer FTM_FACE_GEOM_COLOR("Color");
-static LLFastTimer::DeclareTimer FTM_FACE_GEOM_EMISSIVE("Emissive");
-static LLFastTimer::DeclareTimer FTM_FACE_GEOM_WEIGHTS("Weights");
-static LLFastTimer::DeclareTimer FTM_FACE_GEOM_TANGENT("Binormal");
-
-static LLFastTimer::DeclareTimer FTM_FACE_GEOM_FEEDBACK("Face Feedback");
-static LLFastTimer::DeclareTimer FTM_FACE_GEOM_FEEDBACK_POSITION("Feedback Position");
-static LLFastTimer::DeclareTimer FTM_FACE_GEOM_FEEDBACK_NORMAL("Feedback Normal");
-static LLFastTimer::DeclareTimer FTM_FACE_GEOM_FEEDBACK_TEXTURE("Feedback Texture");
-static LLFastTimer::DeclareTimer FTM_FACE_GEOM_FEEDBACK_COLOR("Feedback Color");
-static LLFastTimer::DeclareTimer FTM_FACE_GEOM_FEEDBACK_EMISSIVE("Feedback Emissive");
-static LLFastTimer::DeclareTimer FTM_FACE_GEOM_FEEDBACK_BINORMAL("Feedback Binormal");
-
-static LLFastTimer::DeclareTimer FTM_FACE_GEOM_INDEX("Index");
-static LLFastTimer::DeclareTimer FTM_FACE_GEOM_INDEX_TAIL("Tail");
-static LLFastTimer::DeclareTimer FTM_FACE_POSITION_STORE("Pos");
-static LLFastTimer::DeclareTimer FTM_FACE_TEXTURE_INDEX_STORE("TexIdx");
-static LLFastTimer::DeclareTimer FTM_FACE_POSITION_PAD("Pad");
-static LLFastTimer::DeclareTimer FTM_FACE_TEX_DEFAULT("Default");
-static LLFastTimer::DeclareTimer FTM_FACE_TEX_QUICK("Quick");
-static LLFastTimer::DeclareTimer FTM_FACE_TEX_QUICK_NO_XFORM("No Xform");
-static LLFastTimer::DeclareTimer FTM_FACE_TEX_QUICK_XFORM("Xform");
-static LLFastTimer::DeclareTimer FTM_FACE_TEX_QUICK_PLANAR("Quick Planar");
+static LLTrace::BlockTimerStatHandle FTM_FACE_GET_GEOM("Face Geom");
+static LLTrace::BlockTimerStatHandle FTM_FACE_GEOM_POSITION("Position");
+static LLTrace::BlockTimerStatHandle FTM_FACE_GEOM_NORMAL("Normal");
+static LLTrace::BlockTimerStatHandle FTM_FACE_GEOM_TEXTURE("Texture");
+static LLTrace::BlockTimerStatHandle FTM_FACE_GEOM_COLOR("Color");
+static LLTrace::BlockTimerStatHandle FTM_FACE_GEOM_EMISSIVE("Emissive");
+static LLTrace::BlockTimerStatHandle FTM_FACE_GEOM_WEIGHTS("Weights");
+static LLTrace::BlockTimerStatHandle FTM_FACE_GEOM_TANGENT("Binormal");
+
+static LLTrace::BlockTimerStatHandle FTM_FACE_GEOM_FEEDBACK("Face Feedback");
+static LLTrace::BlockTimerStatHandle FTM_FACE_GEOM_FEEDBACK_POSITION("Feedback Position");
+static LLTrace::BlockTimerStatHandle FTM_FACE_GEOM_FEEDBACK_NORMAL("Feedback Normal");
+static LLTrace::BlockTimerStatHandle FTM_FACE_GEOM_FEEDBACK_TEXTURE("Feedback Texture");
+static LLTrace::BlockTimerStatHandle FTM_FACE_GEOM_FEEDBACK_COLOR("Feedback Color");
+static LLTrace::BlockTimerStatHandle FTM_FACE_GEOM_FEEDBACK_EMISSIVE("Feedback Emissive");
+static LLTrace::BlockTimerStatHandle FTM_FACE_GEOM_FEEDBACK_BINORMAL("Feedback Binormal");
+
+static LLTrace::BlockTimerStatHandle FTM_FACE_GEOM_INDEX("Index");
+static LLTrace::BlockTimerStatHandle FTM_FACE_GEOM_INDEX_TAIL("Tail");
+static LLTrace::BlockTimerStatHandle FTM_FACE_POSITION_STORE("Pos");
+static LLTrace::BlockTimerStatHandle FTM_FACE_TEXTURE_INDEX_STORE("TexIdx");
+static LLTrace::BlockTimerStatHandle FTM_FACE_POSITION_PAD("Pad");
+static LLTrace::BlockTimerStatHandle FTM_FACE_TEX_DEFAULT("Default");
+static LLTrace::BlockTimerStatHandle FTM_FACE_TEX_QUICK("Quick");
+static LLTrace::BlockTimerStatHandle FTM_FACE_TEX_QUICK_NO_XFORM("No Xform");
+static LLTrace::BlockTimerStatHandle FTM_FACE_TEX_QUICK_XFORM("Xform");
+static LLTrace::BlockTimerStatHandle FTM_FACE_TEX_QUICK_PLANAR("Quick Planar");
BOOL LLFace::getGeometryVolume(const LLVolume& volume,
const S32 &f,
@@ -1182,7 +1182,7 @@ BOOL LLFace::getGeometryVolume(const LLVolume& volume,
const U16 &index_offset,
bool force_rebuild)
{
- LLFastTimer t(FTM_FACE_GET_GEOM);
+ LL_RECORD_BLOCK_TIME(FTM_FACE_GET_GEOM);
llassert(verify());
const LLVolumeFace &vf = volume.getVolumeFace(f);
S32 num_vertices = (S32)vf.mNumVertices;
@@ -1203,13 +1203,13 @@ BOOL LLFace::getGeometryVolume(const LLVolume& volume,
{
if (gDebugGL)
{
- llwarns << "Index buffer overflow!" << llendl;
- llwarns << "Indices Count: " << mIndicesCount
+ LL_WARNS() << "Index buffer overflow!" << LL_ENDL;
+ LL_WARNS() << "Indices Count: " << mIndicesCount
<< " VF Num Indices: " << num_indices
<< " Indices Index: " << mIndicesIndex
- << " VB Num Indices: " << mVertexBuffer->getNumIndices() << llendl;
- llwarns << " Face Index: " << f
- << " Pool Type: " << mPoolType << llendl;
+ << " VB Num Indices: " << mVertexBuffer->getNumIndices() << LL_ENDL;
+ LL_WARNS() << " Face Index: " << f
+ << " Pool Type: " << mPoolType << LL_ENDL;
}
return FALSE;
}
@@ -1218,7 +1218,7 @@ BOOL LLFace::getGeometryVolume(const LLVolume& volume,
{
if (gDebugGL)
{
- llwarns << "Vertex buffer overflow!" << llendl;
+ LL_WARNS() << "Vertex buffer overflow!" << LL_ENDL;
}
return FALSE;
}
@@ -1278,7 +1278,7 @@ BOOL LLFace::getGeometryVolume(const LLVolume& volume,
{ //decide if shiny goes in alpha channel of color
if (tep &&
getPoolType() != LLDrawPool::POOL_ALPHA) // <--- alpha channel MUST contain transparency, not shiny
- {
+ {
LLMaterial* mat = tep->getMaterialParams().get();
bool shiny_in_alpha = false;
@@ -1299,15 +1299,15 @@ BOOL LLFace::getGeometryVolume(const LLVolume& volume,
}
if (shiny_in_alpha)
- {
+ {
- GLfloat alpha[4] =
- {
- 0.00f,
- 0.25f,
- 0.5f,
- 0.75f
- };
+ GLfloat alpha[4] =
+ {
+ 0.00f,
+ 0.25f,
+ 0.5f,
+ 0.75f
+ };
llassert(tep->getShiny() <= 3);
color.mV[3] = U8 (alpha[tep->getShiny()] * 255);
@@ -1318,7 +1318,7 @@ BOOL LLFace::getGeometryVolume(const LLVolume& volume,
// INDICES
if (full_rebuild)
{
- LLFastTimer t(FTM_FACE_GEOM_INDEX);
+ LL_RECORD_BLOCK_TIME(FTM_FACE_GEOM_INDEX);
mVertexBuffer->getIndexStrider(indicesp, mIndicesIndex, mIndicesCount, map_range);
volatile __m128i* dst = (__m128i*) indicesp.get();
@@ -1334,7 +1334,7 @@ BOOL LLFace::getGeometryVolume(const LLVolume& volume,
}
{
- LLFastTimer t(FTM_FACE_GEOM_INDEX_TAIL);
+ LL_RECORD_BLOCK_TIME(FTM_FACE_GEOM_INDEX_TAIL);
U16* idx = (U16*) dst;
for (S32 i = end*8; i < num_indices; ++i)
@@ -1397,7 +1397,7 @@ BOOL LLFace::getGeometryVolume(const LLVolume& volume,
!volume.isUnique()) //source volume is NOT flexi
{ //use transform feedback to pack vertex buffer
//gGLDebugLoggingEnabled = TRUE;
- LLFastTimer t(FTM_FACE_GEOM_FEEDBACK);
+ LL_RECORD_BLOCK_TIME(FTM_FACE_GEOM_FEEDBACK);
LLGLEnable discard(GL_RASTERIZER_DISCARD);
LLVertexBuffer* buff = (LLVertexBuffer*) vf.mVertexBuffer.get();
@@ -1415,7 +1415,7 @@ BOOL LLFace::getGeometryVolume(const LLVolume& volume,
if (rebuild_pos)
{
- LLFastTimer t(FTM_FACE_GEOM_FEEDBACK_POSITION);
+ LL_RECORD_BLOCK_TIME(FTM_FACE_GEOM_FEEDBACK_POSITION);
gTransformPositionProgram.bind();
mVertexBuffer->bindForFeedback(0, LLVertexBuffer::TYPE_VERTEX, mGeomIndex, mGeomCount);
@@ -1440,7 +1440,7 @@ BOOL LLFace::getGeometryVolume(const LLVolume& volume,
if (rebuild_color)
{
- LLFastTimer t(FTM_FACE_GEOM_FEEDBACK_COLOR);
+ LL_RECORD_BLOCK_TIME(FTM_FACE_GEOM_FEEDBACK_COLOR);
gTransformColorProgram.bind();
mVertexBuffer->bindForFeedback(0, LLVertexBuffer::TYPE_COLOR, mGeomIndex, mGeomCount);
@@ -1456,7 +1456,7 @@ BOOL LLFace::getGeometryVolume(const LLVolume& volume,
if (rebuild_emissive)
{
- LLFastTimer t(FTM_FACE_GEOM_FEEDBACK_EMISSIVE);
+ LL_RECORD_BLOCK_TIME(FTM_FACE_GEOM_FEEDBACK_EMISSIVE);
gTransformColorProgram.bind();
mVertexBuffer->bindForFeedback(0, LLVertexBuffer::TYPE_EMISSIVE, mGeomIndex, mGeomCount);
@@ -1477,7 +1477,7 @@ BOOL LLFace::getGeometryVolume(const LLVolume& volume,
if (rebuild_normal)
{
- LLFastTimer t(FTM_FACE_GEOM_FEEDBACK_NORMAL);
+ LL_RECORD_BLOCK_TIME(FTM_FACE_GEOM_FEEDBACK_NORMAL);
gTransformNormalProgram.bind();
mVertexBuffer->bindForFeedback(0, LLVertexBuffer::TYPE_NORMAL, mGeomIndex, mGeomCount);
@@ -1490,7 +1490,7 @@ BOOL LLFace::getGeometryVolume(const LLVolume& volume,
if (rebuild_tangent)
{
- LLFastTimer t(FTM_FACE_GEOM_TANGENT);
+ LL_RECORD_BLOCK_TIME(FTM_FACE_GEOM_TANGENT);
gTransformTangentProgram.bind();
mVertexBuffer->bindForFeedback(0, LLVertexBuffer::TYPE_TANGENT, mGeomIndex, mGeomCount);
@@ -1503,7 +1503,7 @@ BOOL LLFace::getGeometryVolume(const LLVolume& volume,
if (rebuild_tcoord)
{
- LLFastTimer t(FTM_FACE_GEOM_FEEDBACK_TEXTURE);
+ LL_RECORD_BLOCK_TIME(FTM_FACE_GEOM_FEEDBACK_TEXTURE);
gTransformTexCoordProgram.bind();
mVertexBuffer->bindForFeedback(0, LLVertexBuffer::TYPE_TEXCOORD0, mGeomIndex, mGeomCount);
@@ -1542,7 +1542,7 @@ BOOL LLFace::getGeometryVolume(const LLVolume& volume,
if (rebuild_tcoord)
{
- LLFastTimer t(FTM_FACE_GEOM_TEXTURE);
+ LL_RECORD_BLOCK_TIME(FTM_FACE_GEOM_TEXTURE);
//bump setup
LLVector4a binormal_dir( -sin_ang, cos_ang, 0.f );
@@ -1613,8 +1613,8 @@ BOOL LLFace::getGeometryVolume(const LLVolume& volume,
bool tex_anim = false;
- LLVOVolume* vobj = (LLVOVolume*) (LLViewerObject*) mVObjp;
- tex_mode = vobj->mTexAnimMode;
+ LLVOVolume* vobj = (LLVOVolume*) (LLViewerObject*) mVObjp;
+ tex_mode = vobj->mTexAnimMode;
if (vobj->mTextureAnimp)
{ //texture animation is in play, override specular and normal map tex coords with diffuse texcoords
@@ -1637,7 +1637,7 @@ BOOL LLFace::getGeometryVolume(const LLVolume& volume,
do_xform = false;
}
-
+
if (getVirtualSize() >= MIN_TEX_ANIM_SIZE)
{ //don't override texture transform during tc bake
tex_mode = 0;
@@ -1658,25 +1658,25 @@ BOOL LLFace::getGeometryVolume(const LLVolume& volume,
}
bool do_tex_mat = tex_mode && mTextureMatrix;
-
+
if (!do_bump)
{ //not bump mapped, might be able to do a cheap update
mVertexBuffer->getTexCoord0Strider(tex_coords0, mGeomIndex, mGeomCount);
if (texgen != LLTextureEntry::TEX_GEN_PLANAR)
{
- LLFastTimer t(FTM_FACE_TEX_QUICK);
+ LL_RECORD_BLOCK_TIME(FTM_FACE_TEX_QUICK);
if (!do_tex_mat)
{
if (!do_xform)
{
- LLFastTimer t(FTM_FACE_TEX_QUICK_NO_XFORM);
+ LL_RECORD_BLOCK_TIME(FTM_FACE_TEX_QUICK_NO_XFORM);
S32 tc_size = (num_vertices*2*sizeof(F32)+0xF) & ~0xF;
LLVector4a::memcpyNonAliased16((F32*) tex_coords0.get(), (F32*) vf.mTexCoords, tc_size);
}
else
{
- LLFastTimer t(FTM_FACE_TEX_QUICK_XFORM);
+ LL_RECORD_BLOCK_TIME(FTM_FACE_TEX_QUICK_XFORM);
F32* dst = (F32*) tex_coords0.get();
LLVector4a* src = (LLVector4a*) vf.mTexCoords;
@@ -1729,7 +1729,7 @@ BOOL LLFace::getGeometryVolume(const LLVolume& volume,
}
else
{ //no bump, tex gen planar
- LLFastTimer t(FTM_FACE_TEX_QUICK_PLANAR);
+ LL_RECORD_BLOCK_TIME(FTM_FACE_TEX_QUICK_PLANAR);
if (do_tex_mat)
{
for (S32 i = 0; i < num_vertices; i++)
@@ -1774,10 +1774,10 @@ BOOL LLFace::getGeometryVolume(const LLVolume& volume,
}
else
{ //bump mapped or has material, just do the whole expensive loop
- LLFastTimer t(FTM_FACE_TEX_DEFAULT);
-
- std::vector<LLVector2> bump_tc;
+ LL_RECORD_BLOCK_TIME(FTM_FACE_TEX_DEFAULT);
+ std::vector<LLVector2> bump_tc;
+
if (mat && !mat->getNormalID().isNull())
{ //writing out normal and specular texture coordinates, not bump offsets
do_bump = false;
@@ -1834,45 +1834,45 @@ BOOL LLFace::getGeometryVolume(const LLVolume& volume,
}
- for (S32 i = 0; i < num_vertices; i++)
- {
- LLVector2 tc(vf.mTexCoords[i]);
+ for (S32 i = 0; i < num_vertices; i++)
+ {
+ LLVector2 tc(vf.mTexCoords[i]);
- LLVector4a& norm = vf.mNormals[i];
+ LLVector4a& norm = vf.mNormals[i];
- LLVector4a& center = *(vf.mCenter);
+ LLVector4a& center = *(vf.mCenter);
- if (texgen != LLTextureEntry::TEX_GEN_DEFAULT)
- {
- LLVector4a vec = vf.mPositions[i];
+ if (texgen != LLTextureEntry::TEX_GEN_DEFAULT)
+ {
+ LLVector4a vec = vf.mPositions[i];
- vec.mul(scalea);
+ vec.mul(scalea);
if (texgen == LLTextureEntry::TEX_GEN_PLANAR)
- {
+ {
planarProjection(tc, norm, center, vec);
- }
- }
+ }
+ }
- if (tex_mode && mTextureMatrix)
- {
- LLVector3 tmp(tc.mV[0], tc.mV[1], 0.f);
- tmp = tmp * *mTextureMatrix;
- tc.mV[0] = tmp.mV[0];
- tc.mV[1] = tmp.mV[1];
- }
- else
- {
- xform(tc, cos_ang, sin_ang, os, ot, ms, mt);
- }
+ if (tex_mode && mTextureMatrix)
+ {
+ LLVector3 tmp(tc.mV[0], tc.mV[1], 0.f);
+ tmp = tmp * *mTextureMatrix;
+ tc.mV[0] = tmp.mV[0];
+ tc.mV[1] = tmp.mV[1];
+ }
+ else
+ {
+ xform(tc, cos_ang, sin_ang, os, ot, ms, mt);
+ }
*dst++ = tc;
- if (do_bump)
- {
- bump_tc.push_back(tc);
- }
+ if (do_bump)
+ {
+ bump_tc.push_back(tc);
}
}
+ }
if (map_range)
{
@@ -1890,7 +1890,7 @@ BOOL LLFace::getGeometryVolume(const LLVolume& volume,
LLVector4a binorm;
binorm.setCross3(vf.mNormals[i], tangent);
binorm.mul(tangent.getF32ptr()[3]);
-
+
LLMatrix4a tangent_to_object;
tangent_to_object.setRows(tangent, binorm, vf.mNormals[i]);
LLVector4a t;
@@ -1932,7 +1932,7 @@ BOOL LLFace::getGeometryVolume(const LLVolume& volume,
LLVector4a* end = src+num_vertices;
//LLVector4a* end_64 = end-4;
- //LLFastTimer t(FTM_FACE_GEOM_POSITION);
+ //LL_RECORD_TIME_BLOCK(FTM_FACE_GEOM_POSITION);
llassert(num_vertices > 0);
mVertexBuffer->getVertexStrider(vert, mGeomIndex, mGeomCount, map_range);
@@ -1970,7 +1970,7 @@ BOOL LLFace::getGeometryVolume(const LLVolume& volume,
LLVector4a tmp;
{
- //LLFastTimer t2(FTM_FACE_POSITION_STORE);
+ //LL_RECORD_TIME_BLOCK(FTM_FACE_POSITION_STORE);
/*if (num_vertices > 4)
{ //more than 64 bytes
@@ -2010,7 +2010,7 @@ BOOL LLFace::getGeometryVolume(const LLVolume& volume,
}
{
- //LLFastTimer t(FTM_FACE_POSITION_PAD);
+ //LL_RECORD_TIME_BLOCK(FTM_FACE_POSITION_PAD);
while (dst < end_f32)
{
res0.store4a((F32*) dst);
@@ -2027,7 +2027,7 @@ BOOL LLFace::getGeometryVolume(const LLVolume& volume,
if (rebuild_normal)
{
- //LLFastTimer t(FTM_FACE_GEOM_NORMAL);
+ //LL_RECORD_TIME_BLOCK(FTM_FACE_GEOM_NORMAL);
mVertexBuffer->getNormalStrider(norm, mGeomIndex, mGeomCount, map_range);
F32* normals = (F32*) norm.get();
LLVector4a* src = vf.mNormals;
@@ -2049,7 +2049,7 @@ BOOL LLFace::getGeometryVolume(const LLVolume& volume,
if (rebuild_tangent)
{
- LLFastTimer t(FTM_FACE_GEOM_TANGENT);
+ LL_RECORD_BLOCK_TIME(FTM_FACE_GEOM_TANGENT);
mVertexBuffer->getTangentStrider(tangent, mGeomIndex, mGeomCount, map_range);
F32* tangents = (F32*) tangent.get();
@@ -2082,7 +2082,7 @@ BOOL LLFace::getGeometryVolume(const LLVolume& volume,
if (rebuild_weights && vf.mWeights)
{
- LLFastTimer t(FTM_FACE_GEOM_WEIGHTS);
+ LL_RECORD_BLOCK_TIME(FTM_FACE_GEOM_WEIGHTS);
mVertexBuffer->getWeight4Strider(wght, mGeomIndex, mGeomCount, map_range);
F32* weights = (F32*) wght.get();
LLVector4a::memcpyNonAliased16(weights, (F32*) vf.mWeights, num_vertices*4*sizeof(F32));
@@ -2094,7 +2094,7 @@ BOOL LLFace::getGeometryVolume(const LLVolume& volume,
if (rebuild_color && mVertexBuffer->hasDataType(LLVertexBuffer::TYPE_COLOR) )
{
- LLFastTimer t(FTM_FACE_GEOM_COLOR);
+ LL_RECORD_BLOCK_TIME(FTM_FACE_GEOM_COLOR);
mVertexBuffer->getColorStrider(colors, mGeomIndex, mGeomCount, map_range);
LLVector4a src;
@@ -2125,7 +2125,7 @@ BOOL LLFace::getGeometryVolume(const LLVolume& volume,
if (rebuild_emissive)
{
- LLFastTimer t(FTM_FACE_GEOM_EMISSIVE);
+ LL_RECORD_BLOCK_TIME(FTM_FACE_GEOM_EMISSIVE);
LLStrider<LLColor4U> emissive;
mVertexBuffer->getEmissiveStrider(emissive, mGeomIndex, mGeomCount, map_range);
@@ -2137,7 +2137,7 @@ BOOL LLFace::getGeometryVolume(const LLVolume& volume,
LLColor4U glow4u = LLColor4U(0,0,0,glow);
U32 glow32 = glow4u.mAll;
-
+
U32 vec[4];
vec[0] = vec[1] = vec[2] = vec[3] = glow32;
@@ -2282,7 +2282,7 @@ BOOL LLFace::calcPixelArea(F32& cos_angle_to_view_dir, F32& radius)
dist *= 16.f;
}
- lookAt.normalize3fast();
+ lookAt.normalize3fast() ;
//get area of circle around node
F32 app_angle = atanf((F32) sqrt(size_squared) / dist);
@@ -2382,8 +2382,6 @@ F32 LLFace::calcImportanceToCamera(F32 cos_angle_to_view_dir, F32 dist)
return 0.f ;
}
- //F32 camera_relative_speed = camera_moving_speed * (lookAt * LLViewerCamera::getInstance()->getVelocityDir()) ;
-
S32 i = 0 ;
for(i = 0; i < FACE_IMPORTANCE_LEVEL && dist > FACE_IMPORTANCE_TO_CAMERA_OVER_DISTANCE[i][0]; ++i);
i = llmin(i, FACE_IMPORTANCE_LEVEL - 1) ;
@@ -2432,7 +2430,7 @@ BOOL LLFace::verify(const U32* indices_array) const
if ((mGeomIndex + mGeomCount) > mVertexBuffer->getNumVerts())
{
ok = FALSE;
- llinfos << "Face references invalid vertices!" << llendl;
+ LL_INFOS() << "Face references invalid vertices!" << LL_ENDL;
}
S32 indices_count = (S32)getIndicesCount();
@@ -2445,13 +2443,13 @@ BOOL LLFace::verify(const U32* indices_array) const
if (indices_count > LL_MAX_INDICES_COUNT)
{
ok = FALSE;
- llinfos << "Face has bogus indices count" << llendl;
+ LL_INFOS() << "Face has bogus indices count" << LL_ENDL;
}
if (mIndicesIndex + mIndicesCount > mVertexBuffer->getNumIndices())
{
ok = FALSE;
- llinfos << "Face references invalid indices!" << llendl;
+ LL_INFOS() << "Face references invalid indices!" << LL_ENDL;
}
#if 0
@@ -2465,14 +2463,14 @@ BOOL LLFace::verify(const U32* indices_array) const
S32 delta = indicesp[i] - geom_start;
if (0 > delta)
{
- llwarns << "Face index too low!" << llendl;
- llinfos << "i:" << i << " Index:" << indicesp[i] << " GStart: " << geom_start << llendl;
+ LL_WARNS() << "Face index too low!" << LL_ENDL;
+ LL_INFOS() << "i:" << i << " Index:" << indicesp[i] << " GStart: " << geom_start << LL_ENDL;
ok = FALSE;
}
else if (delta >= geom_count)
{
- llwarns << "Face index too high!" << llendl;
- llinfos << "i:" << i << " Index:" << indicesp[i] << " GEnd: " << geom_start + geom_count << llendl;
+ LL_WARNS() << "Face index too high!" << LL_ENDL;
+ LL_INFOS() << "i:" << i << " Index:" << indicesp[i] << " GEnd: " << geom_start + geom_count << LL_ENDL;
ok = FALSE;
}
}
diff --git a/indra/newview/llface.h b/indra/newview/llface.h
index c9037ce1eb..d3a561facc 100755
--- 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"
@@ -49,33 +47,24 @@ 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;
-class LLFace
+class LLFace : public LLTrace::MemTrackableNonVirtual<LLFace, 16>
{
public:
-
- void* operator new(size_t size)
- {
- return ll_aligned_malloc_16(size);
- }
-
- void operator delete(void* ptr)
- {
- ll_aligned_free_16(ptr);
- }
-
-
LLFace(const LLFace& rhs)
+ : LLTrace::MemTrackableNonVirtual<LLFace, 16>("LLFace")
{
*this = rhs;
}
const LLFace& operator=(const LLFace& rhs)
{
- llerrs << "Illegal operation!" << llendl;
+ LL_ERRS() << "Illegal operation!" << LL_ENDL;
return *this;
}
@@ -96,7 +85,11 @@ public:
static void cacheFaceInVRAM(const LLVolumeFace& vf);
public:
- LLFace(LLDrawable* drawablep, LLViewerObject* objp) { init(drawablep, objp); }
+ LLFace(LLDrawable* drawablep, LLViewerObject* objp)
+ : LLTrace::MemTrackableNonVirtual<LLFace, 16>("LLFace")
+ {
+ init(drawablep, objp);
+ }
~LLFace() { destroy(); }
const LLMatrix4& getWorldMatrix() const { return mVObjp->getWorldMatrix(mXform); }
diff --git a/indra/newview/llface.inl b/indra/newview/llface.inl
index 85c35a88f3..c37b77d2cd 100755
--- a/indra/newview/llface.inl
+++ b/indra/newview/llface.inl
@@ -77,7 +77,7 @@ inline S32 LLFace::getColors (LLStrider<LLColor4U> &colors)
if (!mBackupMem)
{
printDebugInfo();
- llerrs << "No backup memory for face" << llendl;
+ LL_ERRS() << "No backup memory for face" << LL_ENDL;
}
colorp = (LLColor4U*)(mBackupMem + (4 * mIndicesCount) + (mGeomCount * mDrawPoolp->getStride()));
colors = colorp;
@@ -89,7 +89,7 @@ inline S32 LLFace::getColors (LLStrider<LLColor4U> &colors)
if (!mDrawPoolp->getColorStrider(colors, mGeomIndex))
{
printDebugInfo();
- llerrs << "No color pointer for a color strider!" << llendl;
+ LL_ERRS() << "No color pointer for a color strider!" << LL_ENDL;
}
mDrawPoolp->setDirtyColors();
return mGeomIndex;
@@ -107,7 +107,7 @@ inline S32 LLFace::getTexCoords (LLStrider<LLVector2> &texCoords, S32 pass )
if (!mBackupMem)
{
printDebugInfo();
- llerrs << "No backup memory for face" << llendl;
+ LL_ERRS() << "No backup memory for face" << LL_ENDL;
}
texCoords = (LLVector2*)(mBackupMem + (4 * mIndicesCount) + mDrawPoolp->mDataOffsets[LLDrawPool::DATA_TEX_COORDS0 + pass]);
texCoords.setStride( mDrawPoolp->getStride());
diff --git a/indra/newview/llfacebookconnect.cpp b/indra/newview/llfacebookconnect.cpp
index 9a20ce8f1b..514aac46fc 100644
--- a/indra/newview/llfacebookconnect.cpp
+++ b/indra/newview/llfacebookconnect.cpp
@@ -275,7 +275,7 @@ public:
{
if (isGoodStatus(status))
{
- llinfos << "Facebook: Info received" << llendl;
+ LL_INFOS() << "Facebook: Info received" << LL_ENDL;
LL_DEBUGS("FacebookConnect") << "Getting Facebook info successful. info: " << info << LL_ENDL;
LLFacebookConnect::instance().storeInfo(info);
}
@@ -458,7 +458,7 @@ void LLFacebookConnect::sharePhoto(LLPointer<LLImageFormatted> image, const std:
}
else
{
- llwarns << "Image to upload is not a PNG or JPEG" << llendl;
+ LL_WARNS() << "Image to upload is not a PNG or JPEG" << LL_ENDL;
return;
}
diff --git a/indra/newview/llfasttimerview.cpp b/indra/newview/llfasttimerview.cpp
index 06119620de..76c37439ab 100755
--- a/indra/newview/llfasttimerview.cpp
+++ b/indra/newview/llfasttimerview.cpp
@@ -30,12 +30,14 @@
#include "llviewerwindow.h"
#include "llrect.h"
+#include "llcombobox.h"
#include "llerror.h"
#include "llgl.h"
#include "llimagepng.h"
#include "llrender.h"
#include "llrendertarget.h"
#include "lllocalcliprect.h"
+#include "lllayoutstack.h"
#include "llmath.h"
#include "llfontgl.h"
#include "llsdserialize.h"
@@ -46,7 +48,6 @@
#include "llviewertexturelist.h"
#include "llui.h"
#include "llviewercontrol.h"
-#include "llstat.h"
#include "llfasttimer.h"
#include "lltreeiterators.h"
@@ -55,62 +56,73 @@
//////////////////////////////////////////////////////////////////////////////
-static const S32 MAX_VISIBLE_HISTORY = 10;
-static const S32 LINE_GRAPH_HEIGHT = 240;
-
-//static const int FTV_DISPLAY_NUM = (sizeof(ft_display_table)/sizeof(ft_display_table[0]));
-static S32 FTV_NUM_TIMERS;
-const S32 FTV_MAX_DEPTH = 8;
+using namespace LLTrace;
-std::vector<LLFastTimer::NamedTimer*> ft_display_idx; // line of table entry for display purposes (for collapse)
+static const S32 MAX_VISIBLE_HISTORY = 12;
+static const S32 LINE_GRAPH_HEIGHT = 240;
+static const S32 MIN_BAR_HEIGHT = 3;
+static const S32 RUNNING_AVERAGE_WIDTH = 100;
+static const S32 NUM_FRAMES_HISTORY = 200;
-typedef LLTreeDFSIter<LLFastTimer::NamedTimer, LLFastTimer::NamedTimer::child_const_iter> timer_tree_iterator_t;
+std::vector<BlockTimerStatHandle*> ft_display_idx; // line of table entry for display purposes (for collapse)
BOOL LLFastTimerView::sAnalyzePerformance = FALSE;
-static timer_tree_iterator_t begin_timer_tree(LLFastTimer::NamedTimer& id)
-{
- return timer_tree_iterator_t(&id,
- boost::bind(boost::mem_fn(&LLFastTimer::NamedTimer::beginChildren), _1),
- boost::bind(boost::mem_fn(&LLFastTimer::NamedTimer::endChildren), _1));
-}
-
-static timer_tree_iterator_t end_timer_tree()
-{
- return timer_tree_iterator_t();
+S32 get_depth(const BlockTimerStatHandle* blockp)
+{
+ S32 depth = 0;
+ BlockTimerStatHandle* timerp = blockp->getParent();
+ while(timerp)
+ {
+ depth++;
+ if (timerp->getParent() == timerp) break;
+ timerp = timerp->getParent();
+ }
+ return depth;
}
LLFastTimerView::LLFastTimerView(const LLSD& key)
: LLFloater(key),
- mHoverTimer(NULL)
+ mHoverTimer(NULL),
+ mDisplayMode(0),
+ mDisplayType(DISPLAY_TIME),
+ mScrollIndex(0),
+ mHoverID(NULL),
+ mHoverBarIndex(-1),
+ mStatsIndex(-1),
+ mPauseHistory(false),
+ mRecording(NUM_FRAMES_HISTORY)
+{
+ mTimerBarRows.resize(NUM_FRAMES_HISTORY);
+}
+
+LLFastTimerView::~LLFastTimerView()
{
- mDisplayMode = 0;
- mAvgCountTotal = 0;
- mMaxCountTotal = 0;
- mDisplayCenter = ALIGN_CENTER;
- mDisplayCalls = 0;
- mDisplayHz = 0;
- mScrollIndex = 0;
- mHoverID = NULL;
- mHoverBarIndex = -1;
- FTV_NUM_TIMERS = LLFastTimer::NamedTimer::instanceCount();
- mPrintStats = -1;
}
void LLFastTimerView::onPause()
{
- LLFastTimer::sPauseHistory = !LLFastTimer::sPauseHistory;
+ setPauseState(!mPauseHistory);
+}
+
+void LLFastTimerView::setPauseState(bool pause_state)
+{
+ if (pause_state == mPauseHistory) return;
+
// reset scroll to bottom when unpausing
- if (!LLFastTimer::sPauseHistory)
+ if (!pause_state)
{
- mScrollIndex = 0;
- LLFastTimer::sResetHistory = true;
+
getChild<LLButton>("pause_btn")->setLabel(getString("pause"));
}
else
{
+ mScrollIndex = 0;
+
getChild<LLButton>("pause_btn")->setLabel(getString("run"));
}
+
+ mPauseHistory = pause_state;
}
BOOL LLFastTimerView::postBuild()
@@ -126,13 +138,13 @@ BOOL LLFastTimerView::handleRightMouseDown(S32 x, S32 y, MASK mask)
if (mHoverTimer )
{
// right click collapses timers
- if (!mHoverTimer->getCollapsed())
+ if (!mHoverTimer->getTreeNode().mCollapsed)
{
- mHoverTimer->setCollapsed(true);
+ mHoverTimer->getTreeNode().mCollapsed = true;
}
else if (mHoverTimer->getParent())
{
- mHoverTimer->getParent()->setCollapsed(true);
+ mHoverTimer->getParent()->getTreeNode().mCollapsed = true;
}
return TRUE;
}
@@ -140,15 +152,15 @@ BOOL LLFastTimerView::handleRightMouseDown(S32 x, S32 y, MASK mask)
{
S32 bar_idx = MAX_VISIBLE_HISTORY - ((y - mBarRect.mBottom) * (MAX_VISIBLE_HISTORY + 2) / mBarRect.getHeight());
bar_idx = llclamp(bar_idx, 0, MAX_VISIBLE_HISTORY);
- mPrintStats = LLFastTimer::NamedTimer::HISTORY_NUM - mScrollIndex - bar_idx;
+ mStatsIndex = mScrollIndex + bar_idx;
return TRUE;
}
return LLFloater::handleRightMouseDown(x, y, mask);
}
-LLFastTimer::NamedTimer* LLFastTimerView::getLegendID(S32 y)
+BlockTimerStatHandle* LLFastTimerView::getLegendID(S32 y)
{
- S32 idx = (getRect().getHeight() - y) / (LLFontGL::getFontMonospace()->getLineHeight()+2) - 5;
+ S32 idx = (mLegendRect.mTop - y) / (LLFontGL::getFontMonospace()->getLineHeight() + 2);
if (idx >= 0 && idx < (S32)ft_display_idx.size())
{
@@ -160,11 +172,11 @@ LLFastTimer::NamedTimer* LLFastTimerView::getLegendID(S32 y)
BOOL LLFastTimerView::handleDoubleClick(S32 x, S32 y, MASK mask)
{
- for(timer_tree_iterator_t it = begin_timer_tree(getFrameTimer());
- it != end_timer_tree();
+ for(LLTrace::block_timer_tree_df_iterator_t it = LLTrace::begin_block_timer_tree_df(FTM_FRAME);
+ it != LLTrace::end_block_timer_tree_df();
++it)
{
- (*it)->setCollapsed(false);
+ (*it)->getTreeNode().mCollapsed = false;
}
return TRUE;
}
@@ -173,52 +185,23 @@ BOOL LLFastTimerView::handleMouseDown(S32 x, S32 y, MASK mask)
{
if (x < mBarRect.mLeft)
{
- LLFastTimer::NamedTimer* idp = getLegendID(y);
+ BlockTimerStatHandle* idp = getLegendID(y);
if (idp)
{
- idp->setCollapsed(!idp->getCollapsed());
+ idp->getTreeNode().mCollapsed = !idp->getTreeNode().mCollapsed;
}
}
else if (mHoverTimer)
{
//left click drills down by expanding timers
- mHoverTimer->setCollapsed(false);
- }
- else if (mask & MASK_ALT)
- {
- if (mask & MASK_CONTROL)
- {
- mDisplayHz = !mDisplayHz;
- }
- else
- {
- mDisplayCalls = !mDisplayCalls;
- }
- }
- else if (mask & MASK_SHIFT)
- {
- if (++mDisplayMode > 3)
- mDisplayMode = 0;
- }
- else if (mask & MASK_CONTROL)
- {
- mDisplayCenter = (ChildAlignment)((mDisplayCenter + 1) % ALIGN_COUNT);
+ mHoverTimer->getTreeNode().mCollapsed = false;
}
else if (mGraphRect.pointInRect(x, y))
{
gFocusMgr.setMouseCapture(this);
return TRUE;
}
- //else
- //{
- // // pause/unpause
- // LLFastTimer::sPauseHistory = !LLFastTimer::sPauseHistory;
- // // reset scroll to bottom when unpausing
- // if (!LLFastTimer::sPauseHistory)
- // {
- // mScrollIndex = 0;
- // }
- //}
+
return LLFloater::handleMouseDown(x, y, mask);
}
@@ -236,17 +219,21 @@ BOOL LLFastTimerView::handleHover(S32 x, S32 y, MASK mask)
if (hasMouseCapture())
{
F32 lerp = llclamp(1.f - (F32) (x - mGraphRect.mLeft) / (F32) mGraphRect.getWidth(), 0.f, 1.f);
- mScrollIndex = llround( lerp * (F32)(LLFastTimer::NamedTimer::HISTORY_NUM - MAX_VISIBLE_HISTORY));
- mScrollIndex = llclamp( mScrollIndex, 0, LLFastTimer::getLastFrameIndex());
+ mScrollIndex = llround( lerp * (F32)(mRecording.getNumRecordedPeriods() - MAX_VISIBLE_HISTORY));
+ mScrollIndex = llclamp( mScrollIndex, 0, (S32)mRecording.getNumRecordedPeriods());
return TRUE;
}
mHoverTimer = NULL;
mHoverID = NULL;
- if(LLFastTimer::sPauseHistory && mBarRect.pointInRect(x, y))
+ if(mPauseHistory && mBarRect.pointInRect(x, y))
{
- mHoverBarIndex = llmin(LLFastTimer::getCurFrameIndex() - 1,
- MAX_VISIBLE_HISTORY - ((y - mBarRect.mBottom) * (MAX_VISIBLE_HISTORY + 2) / mBarRect.getHeight()));
+ //const S32 bars_top = mBarRect.mTop;
+ const S32 bars_top = mBarRect.mTop - ((S32)LLFontGL::getFontMonospace()->getLineHeight() + 4);
+
+ mHoverBarIndex = llmin((bars_top - y) / (mBarRect.getHeight() / (MAX_VISIBLE_HISTORY + 2)) - 1,
+ (S32)mRecording.getNumRecordedPeriods() - 1,
+ MAX_VISIBLE_HISTORY);
if (mHoverBarIndex == 0)
{
return TRUE;
@@ -256,40 +243,50 @@ BOOL LLFastTimerView::handleHover(S32 x, S32 y, MASK mask)
mHoverBarIndex = 0;
}
- S32 i = 0;
- for(timer_tree_iterator_t it = begin_timer_tree(getFrameTimer());
- it != end_timer_tree();
- ++it, ++i)
+ TimerBarRow& row = mHoverBarIndex == 0 ? mAverageTimerRow : mTimerBarRows[mScrollIndex + mHoverBarIndex - 1];
+
+ TimerBar* hover_bar = NULL;
+ F32Seconds mouse_time_offset = ((F32)(x - mBarRect.mLeft) / (F32)mBarRect.getWidth()) * mTotalTimeDisplay;
+ for (int bar_index = 0, end_index = LLTrace::BlockTimerStatHandle::instance_tracker_t::instanceCount();
+ bar_index < end_index;
+ ++bar_index)
{
- // is mouse over bar for this timer?
- if (x > mBarStart[mHoverBarIndex][i] &&
- x < mBarEnd[mHoverBarIndex][i])
+ TimerBar& bar = row.mBars[bar_index];
+ if (bar.mSelfStart > mouse_time_offset)
{
- mHoverID = (*it);
- if (mHoverTimer != *it)
- {
- // could be that existing tooltip is for a parent and is thus
- // covering region for this new timer, go ahead and unblock
- // so we can create a new tooltip
- LLToolTipMgr::instance().unblockToolTips();
- mHoverTimer = (*it);
+ break;
+ }
+ if (bar.mSelfEnd > mouse_time_offset)
+ {
+ hover_bar = &bar;
+ if (bar.mTimeBlock->getTreeNode().mCollapsed)
+ {
+ // stop on first collapsed BlockTimerStatHandle, since we can't select any children
+ break;
}
-
- mToolTipRect.set(mBarStart[mHoverBarIndex][i],
- mBarRect.mBottom + llround(((F32)(MAX_VISIBLE_HISTORY - mHoverBarIndex + 1)) * ((F32)mBarRect.getHeight() / ((F32)MAX_VISIBLE_HISTORY + 2.f))),
- mBarEnd[mHoverBarIndex][i],
- mBarRect.mBottom + llround((F32)(MAX_VISIBLE_HISTORY - mHoverBarIndex) * ((F32)mBarRect.getHeight() / ((F32)MAX_VISIBLE_HISTORY + 2.f))));
}
+ }
- if ((*it)->getCollapsed())
+ if (hover_bar)
+ {
+ mHoverID = hover_bar->mTimeBlock;
+ if (mHoverTimer != mHoverID)
{
- it.skipDescendants();
+ // could be that existing tooltip is for a parent and is thus
+ // covering region for this new timer, go ahead and unblock
+ // so we can create a new tooltip
+ LLToolTipMgr::instance().unblockToolTips();
+ mHoverTimer = mHoverID;
+ mToolTipRect.set(mBarRect.mLeft + (hover_bar->mSelfStart / mTotalTimeDisplay) * mBarRect.getWidth(),
+ row.mTop,
+ mBarRect.mLeft + (hover_bar->mSelfEnd / mTotalTimeDisplay) * mBarRect.getWidth(),
+ row.mBottom);
}
}
}
else if (x < mBarRect.mLeft)
{
- LLFastTimer::NamedTimer* timer_id = getLegendID(y);
+ BlockTimerStatHandle* timer_id = getLegendID(y);
if (timer_id)
{
mHoverID = timer_id;
@@ -300,9 +297,24 @@ BOOL LLFastTimerView::handleHover(S32 x, S32 y, MASK mask)
}
+static std::string get_tooltip(BlockTimerStatHandle& timer, S32 history_index, PeriodicRecording& frame_recording)
+{
+ std::string tooltip;
+ if (history_index == 0)
+ {
+ // by default, show average number of call
+ tooltip = llformat("%s (%d ms, %d calls)", timer.getName().c_str(), (S32)F64Milliseconds(frame_recording.getPeriodMean (timer, RUNNING_AVERAGE_WIDTH)).value(), (S32)frame_recording.getPeriodMean(timer.callCount(), RUNNING_AVERAGE_WIDTH));
+ }
+ else
+ {
+ tooltip = llformat("%s (%d ms, %d calls)", timer.getName().c_str(), (S32)F64Milliseconds(frame_recording.getPrevRecording(history_index).getSum(timer)).value(), (S32)frame_recording.getPrevRecording(history_index).getSum(timer.callCount()));
+ }
+ return tooltip;
+}
+
BOOL LLFastTimerView::handleToolTip(S32 x, S32 y, MASK mask)
{
- if(LLFastTimer::sPauseHistory && mBarRect.pointInRect(x, y))
+ if(mPauseHistory && mBarRect.pointInRect(x, y))
{
// tooltips for timer bars
if (mHoverTimer)
@@ -310,8 +322,10 @@ BOOL LLFastTimerView::handleToolTip(S32 x, S32 y, MASK mask)
LLRect screen_rect;
localRectToScreen(mToolTipRect, &screen_rect);
+ std::string tooltip = get_tooltip(*mHoverTimer, mHoverBarIndex > 0 ? mScrollIndex + mHoverBarIndex : 0, mRecording);
+
LLToolTipMgr::instance().show(LLToolTip::Params()
- .message(mHoverTimer->getToolTip(LLFastTimer::NamedTimer::HISTORY_NUM - mScrollIndex - mHoverBarIndex))
+ .message(tooltip)
.sticky_rect(screen_rect)
.delay_time(0.f));
@@ -323,10 +337,10 @@ BOOL LLFastTimerView::handleToolTip(S32 x, S32 y, MASK mask)
// tooltips for timer legend
if (x < mBarRect.mLeft)
{
- LLFastTimer::NamedTimer* idp = getLegendID(y);
+ BlockTimerStatHandle* idp = getLegendID(y);
if (idp)
{
- LLToolTipMgr::instance().show(idp->getToolTip());
+ LLToolTipMgr::instance().show(get_tooltip(*idp, 0, mRecording));
return TRUE;
}
@@ -338,705 +352,86 @@ BOOL LLFastTimerView::handleToolTip(S32 x, S32 y, MASK mask)
BOOL LLFastTimerView::handleScrollWheel(S32 x, S32 y, S32 clicks)
{
- LLFastTimer::sPauseHistory = TRUE;
+ setPauseState(true);
mScrollIndex = llclamp( mScrollIndex + clicks,
0,
- llmin(LLFastTimer::getLastFrameIndex(), (S32)LLFastTimer::NamedTimer::HISTORY_NUM - MAX_VISIBLE_HISTORY));
+ llmin((S32)mRecording.getNumRecordedPeriods(), (S32)mRecording.getNumRecordedPeriods() - MAX_VISIBLE_HISTORY));
return TRUE;
}
-static LLFastTimer::DeclareTimer FTM_RENDER_TIMER("Timers");
+static BlockTimerStatHandle FTM_RENDER_TIMER("Timers");
+static const S32 MARGIN = 10;
+static const S32 LEGEND_WIDTH = 220;
-static std::map<LLFastTimer::NamedTimer*, LLColor4> sTimerColors;
+static std::vector<LLColor4> sTimerColors;
void LLFastTimerView::draw()
{
- LLFastTimer t(FTM_RENDER_TIMER);
-
- std::string tdesc;
-
- F64 clock_freq = (F64)LLFastTimer::countsPerSecond();
- F64 iclock_freq = 1000.0 / clock_freq;
-
- S32 margin = 10;
- S32 height = getRect().getHeight();
- S32 width = getRect().getWidth();
+ LL_RECORD_BLOCK_TIME(FTM_RENDER_TIMER);
- LLRect new_rect;
- new_rect.setLeftTopAndSize(getRect().mLeft, getRect().mTop, width, height);
- setRect(new_rect);
-
- S32 left, top, right, bottom;
- S32 x, y, barw, barh, dx, dy;
- S32 texth;
- LLPointer<LLUIImage> box_imagep = LLUI::getUIImage("Rounded_Square");
-
- // Draw the window background
- gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE);
- gl_rect_2d(0, getRect().getHeight(), getRect().getWidth(), 0, LLColor4(0.f, 0.f, 0.f, 0.25f));
-
- S32 xleft = margin;
- S32 ytop = margin;
-
- // Draw some help
+ if (!mPauseHistory)
{
-
- x = xleft;
- y = height - ytop;
- texth = (S32)LLFontGL::getFontMonospace()->getLineHeight();
-
- char modedesc[][32] = {
- "2 x Average ",
- "Max ",
- "Recent Max ",
- "100 ms "
- };
- char centerdesc[][32] = {
- "Left ",
- "Centered ",
- "Ordered "
- };
-
- tdesc = llformat("Full bar = %s [Click to pause/reset] [SHIFT-Click to toggle]",modedesc[mDisplayMode]);
- LLFontGL::getFontMonospace()->renderUTF8(tdesc, 0, x, y, LLColor4::white, LLFontGL::LEFT, LLFontGL::TOP);
-
- x = xleft, y -= (texth + 2);
- tdesc = llformat("Justification = %s [CTRL-Click to toggle]",centerdesc[mDisplayCenter]);
- LLFontGL::getFontMonospace()->renderUTF8(tdesc, 0, x, y, LLColor4::white, LLFontGL::LEFT, LLFontGL::TOP);
- y -= (texth + 2);
-
- LLFontGL::getFontMonospace()->renderUTF8(std::string("[Right-Click log selected] [ALT-Click toggle counts] [ALT-SHIFT-Click sub hidden]"),
- 0, x, y, LLColor4::white, LLFontGL::LEFT, LLFontGL::TOP);
- y -= (texth + 2);
+ mRecording.appendRecording(LLTrace::get_frame_recording().getLastRecording());
+ mTimerBarRows.pop_back();
+ mTimerBarRows.push_front(TimerBarRow());
}
- S32 histmax = llmin(LLFastTimer::getLastFrameIndex()+1, MAX_VISIBLE_HISTORY);
+ mDisplayMode = llclamp(getChild<LLComboBox>("time_scale_combo")->getCurrentIndex(), 0, 3);
+ mDisplayType = (EDisplayType)llclamp(getChild<LLComboBox>("metric_combo")->getCurrentIndex(), 0, 2);
- // Draw the legend
- xleft = margin;
- ytop = y;
-
- y -= (texth + 2);
-
- sTimerColors[&getFrameTimer()] = LLColor4::grey;
-
- F32 hue = 0.f;
+ generateUniqueColors();
- for (timer_tree_iterator_t it = begin_timer_tree(getFrameTimer());
- it != timer_tree_iterator_t();
- ++it)
- {
- LLFastTimer::NamedTimer* idp = (*it);
+ LLView::drawChildren();
+ //getChild<LLLayoutStack>("timer_bars_stack")->updateLayout();
+ //getChild<LLLayoutStack>("legend_stack")->updateLayout();
+ LLView* bars_panel = getChildView("bars_panel");
+ bars_panel->localRectToOtherView(bars_panel->getLocalRect(), &mBarRect, this);
- const F32 HUE_INCREMENT = 0.23f;
- hue = fmodf(hue + HUE_INCREMENT, 1.f);
- // saturation increases with depth
- F32 saturation = clamp_rescale((F32)idp->getDepth(), 0.f, 3.f, 0.f, 1.f);
- // lightness alternates with depth
- F32 lightness = idp->getDepth() % 2 ? 0.5f : 0.6f;
+ LLView* lines_panel = getChildView("lines_panel");
+ lines_panel->localRectToOtherView(lines_panel->getLocalRect(), &mGraphRect, this);
- LLColor4 child_color;
- child_color.setHSL(hue, saturation, lightness);
-
- sTimerColors[idp] = child_color;
- }
-
- const S32 LEGEND_WIDTH = 220;
- {
- LLLocalClipRect clip(LLRect(margin, y, LEGEND_WIDTH, margin));
- S32 cur_line = 0;
- ft_display_idx.clear();
- std::map<LLFastTimer::NamedTimer*, S32> display_line;
- for (timer_tree_iterator_t it = begin_timer_tree(getFrameTimer());
- it != timer_tree_iterator_t();
- ++it)
- {
- LLFastTimer::NamedTimer* idp = (*it);
- display_line[idp] = cur_line;
- ft_display_idx.push_back(idp);
- cur_line++;
-
- x = xleft;
-
- left = x; right = x + texth;
- top = y; bottom = y - texth;
- S32 scale_offset = 0;
- if (idp == mHoverID)
- {
- scale_offset = llfloor(sinf(mHighlightTimer.getElapsedTimeF32() * 6.f) * 2.f);
- }
- gl_rect_2d(left - scale_offset, top + scale_offset, right + scale_offset, bottom - scale_offset, sTimerColors[idp]);
-
- F32 ms = 0;
- S32 calls = 0;
- if (mHoverBarIndex > 0 && mHoverID)
- {
- S32 hidx = LLFastTimer::NamedTimer::HISTORY_NUM - mScrollIndex - mHoverBarIndex;
- U64 ticks = idp->getHistoricalCount(hidx);
- ms = (F32)((F64)ticks * iclock_freq);
- calls = (S32)idp->getHistoricalCalls(hidx);
- }
- else
- {
- U64 ticks = idp->getCountAverage();
- ms = (F32)((F64)ticks * iclock_freq);
- calls = (S32)idp->getCallAverage();
- }
-
- if (mDisplayCalls)
- {
- tdesc = llformat("%s (%d)",idp->getName().c_str(),calls);
- }
- else
- {
- tdesc = llformat("%s [%.1f]",idp->getName().c_str(),ms);
- }
- dx = (texth+4) + idp->getDepth()*8;
-
- LLColor4 color = LLColor4::white;
- if (idp->getDepth() > 0)
- {
- S32 line_start_y = (top + bottom) / 2;
- S32 line_end_y = line_start_y + ((texth + 2) * (cur_line - display_line[idp->getParent()])) - texth;
- gl_line_2d(x + dx - 8, line_start_y, x + dx, line_start_y, color);
- S32 line_x = x + (texth + 4) + ((idp->getDepth() - 1) * 8);
- gl_line_2d(line_x, line_start_y, line_x, line_end_y, color);
- if (idp->getCollapsed() && !idp->getChildren().empty())
- {
- gl_line_2d(line_x+4, line_start_y-3, line_x+4, line_start_y+4, color);
- }
- }
-
- x += dx;
- BOOL is_child_of_hover_item = (idp == mHoverID);
- LLFastTimer::NamedTimer* next_parent = idp->getParent();
- while(!is_child_of_hover_item && next_parent)
- {
- is_child_of_hover_item = (mHoverID == next_parent);
- if (next_parent->getParent() == next_parent) break;
- next_parent = next_parent->getParent();
- }
-
- LLFontGL::getFontMonospace()->renderUTF8(tdesc, 0,
- x, y,
- color,
- LLFontGL::LEFT, LLFontGL::TOP,
- is_child_of_hover_item ? LLFontGL::BOLD : LLFontGL::NORMAL);
-
- y -= (texth + 2);
-
- if (idp->getCollapsed())
- {
- it.skipDescendants();
- }
- }
- }
-
- xleft += LEGEND_WIDTH + 8;
- // ytop = ytop;
-
- // update rectangle that includes timer bars
- mBarRect.mLeft = xleft;
- mBarRect.mRight = getRect().getWidth();
- mBarRect.mTop = ytop - (LLFontGL::getFontMonospace()->getLineHeight() + 4);
- mBarRect.mBottom = margin + LINE_GRAPH_HEIGHT;
-
- y = ytop;
- barh = (ytop - margin - LINE_GRAPH_HEIGHT) / (MAX_VISIBLE_HISTORY + 2);
- dy = barh>>2; // spacing between bars
- if (dy < 1) dy = 1;
- barh -= dy;
- barw = width - xleft - margin;
-
- // Draw the history bars
- if (LLFastTimer::getLastFrameIndex() >= 0)
- {
- LLLocalClipRect clip(LLRect(xleft, ytop, getRect().getWidth() - margin, margin));
-
- U64 totalticks;
- if (!LLFastTimer::sPauseHistory)
- {
- U64 ticks = getFrameTimer().getHistoricalCount(mScrollIndex);
-
- if (LLFastTimer::getCurFrameIndex() >= 10)
- {
- U64 framec = LLFastTimer::getCurFrameIndex();
- U64 avg = (U64)mAvgCountTotal;
- mAvgCountTotal = (avg*framec + ticks) / (framec + 1);
- if (ticks > mMaxCountTotal)
- {
- mMaxCountTotal = ticks;
- }
- }
-
- if (ticks < mAvgCountTotal/100 || ticks > mAvgCountTotal*100)
- {
- LLFastTimer::sResetHistory = true;
- }
-
- if (LLFastTimer::getCurFrameIndex() < 10 || LLFastTimer::sResetHistory)
- {
- mAvgCountTotal = ticks;
- mMaxCountTotal = ticks;
- LLFastTimer::sResetHistory = false;
- }
- }
+ LLView* legend_panel = getChildView("legend");
+ legend_panel->localRectToOtherView(legend_panel->getLocalRect(), &mLegendRect, this);
- if (mDisplayMode == 0)
- {
- totalticks = mAvgCountTotal*2;
- }
- else if (mDisplayMode == 1)
- {
- totalticks = mMaxCountTotal;
- }
- else if (mDisplayMode == 2)
- {
- // Calculate the max total ticks for the current history
- totalticks = 0;
- for (S32 j=0; j<histmax; j++)
- {
- U64 ticks = getFrameTimer().getHistoricalCount(j);
-
- if (ticks > totalticks)
- totalticks = ticks;
- }
- }
- else
- {
- totalticks = (U64)(clock_freq * .1); // 100 ms
- }
-
- // Draw MS ticks
- {
- U32 ms = (U32)((F64)totalticks * iclock_freq) ;
-
- tdesc = llformat("%.1f ms |", (F32)ms*.25f);
- x = xleft + barw/4 - LLFontGL::getFontMonospace()->getWidth(tdesc);
- LLFontGL::getFontMonospace()->renderUTF8(tdesc, 0, x, y, LLColor4::white,
- LLFontGL::LEFT, LLFontGL::TOP);
-
- tdesc = llformat("%.1f ms |", (F32)ms*.50f);
- x = xleft + barw/2 - LLFontGL::getFontMonospace()->getWidth(tdesc);
- LLFontGL::getFontMonospace()->renderUTF8(tdesc, 0, x, y, LLColor4::white,
- LLFontGL::LEFT, LLFontGL::TOP);
-
- tdesc = llformat("%.1f ms |", (F32)ms*.75f);
- x = xleft + (barw*3)/4 - LLFontGL::getFontMonospace()->getWidth(tdesc);
- LLFontGL::getFontMonospace()->renderUTF8(tdesc, 0, x, y, LLColor4::white,
- LLFontGL::LEFT, LLFontGL::TOP);
-
- tdesc = llformat( "%d ms |", ms);
- x = xleft + barw - LLFontGL::getFontMonospace()->getWidth(tdesc);
- LLFontGL::getFontMonospace()->renderUTF8(tdesc, 0, x, y, LLColor4::white,
- LLFontGL::LEFT, LLFontGL::TOP);
- }
-
- // Draw borders
- {
- gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE);
- gGL.color4f(0.5f,0.5f,0.5f,0.5f);
-
- S32 by = y + 2;
-
- y -= ((S32)LLFontGL::getFontMonospace()->getLineHeight() + 4);
-
- //heading
- gl_rect_2d(xleft-5, by, getRect().getWidth()-5, y+5, FALSE);
-
- //tree view
- gl_rect_2d(5, by, xleft-10, 5, FALSE);
-
- by = y + 5;
- //average bar
- gl_rect_2d(xleft-5, by, getRect().getWidth()-5, by-barh-dy-5, FALSE);
-
- by -= barh*2+dy;
-
- //current frame bar
- gl_rect_2d(xleft-5, by, getRect().getWidth()-5, by-barh-dy-2, FALSE);
-
- by -= barh+dy+1;
-
- //history bars
- gl_rect_2d(xleft-5, by, getRect().getWidth()-5, LINE_GRAPH_HEIGHT-barh-dy-2, FALSE);
-
- by = LINE_GRAPH_HEIGHT-barh-dy-7;
-
- //line graph
- mGraphRect = LLRect(xleft-5, by, getRect().getWidth()-5, 5);
-
- gl_rect_2d(mGraphRect, FALSE);
- }
-
- mBarStart.clear();
- mBarEnd.clear();
-
- // Draw bars for each history entry
- // Special: -1 = show running average
- gGL.getTexUnit(0)->bind(box_imagep->getImage());
- for (S32 j=-1; j<histmax && y > LINE_GRAPH_HEIGHT; j++)
- {
- mBarStart.push_back(std::vector<S32>());
- mBarEnd.push_back(std::vector<S32>());
- int sublevel_dx[FTV_MAX_DEPTH];
- int sublevel_left[FTV_MAX_DEPTH];
- int sublevel_right[FTV_MAX_DEPTH];
- S32 tidx;
- if (j >= 0)
- {
- tidx = LLFastTimer::NamedTimer::HISTORY_NUM - j - 1 - mScrollIndex;
- }
- else
- {
- tidx = -1;
- }
-
- x = xleft;
-
- // draw the bars for each stat
- std::vector<S32> xpos;
- std::vector<S32> deltax;
- xpos.push_back(xleft);
-
- LLFastTimer::NamedTimer* prev_id = NULL;
-
- S32 i = 0;
- for(timer_tree_iterator_t it = begin_timer_tree(getFrameTimer());
- it != end_timer_tree();
- ++it, ++i)
- {
- LLFastTimer::NamedTimer* idp = (*it);
- F32 frac = tidx == -1
- ? (F32)idp->getCountAverage() / (F32)totalticks
- : (F32)idp->getHistoricalCount(tidx) / (F32)totalticks;
-
- dx = llround(frac * (F32)barw);
- S32 prev_delta_x = deltax.empty() ? 0 : deltax.back();
- deltax.push_back(dx);
-
- int level = idp->getDepth() - 1;
-
- while ((S32)xpos.size() > level + 1)
- {
- xpos.pop_back();
- }
- left = xpos.back();
-
- if (level == 0)
- {
- sublevel_left[level] = xleft;
- sublevel_dx[level] = dx;
- sublevel_right[level] = sublevel_left[level] + sublevel_dx[level];
- }
- else if (prev_id && prev_id->getDepth() < idp->getDepth())
- {
- U64 sublevelticks = 0;
-
- for (LLFastTimer::NamedTimer::child_const_iter it = prev_id->beginChildren();
- it != prev_id->endChildren();
- ++it)
- {
- sublevelticks += (tidx == -1)
- ? (*it)->getCountAverage()
- : (*it)->getHistoricalCount(tidx);
- }
-
- F32 subfrac = (F32)sublevelticks / (F32)totalticks;
- sublevel_dx[level] = (int)(subfrac * (F32)barw + .5f);
-
- if (mDisplayCenter == ALIGN_CENTER)
- {
- left += (prev_delta_x - sublevel_dx[level])/2;
- }
- else if (mDisplayCenter == ALIGN_RIGHT)
- {
- left += (prev_delta_x - sublevel_dx[level]);
- }
-
- sublevel_left[level] = left;
- sublevel_right[level] = sublevel_left[level] + sublevel_dx[level];
- }
-
- right = left + dx;
- xpos.back() = right;
- xpos.push_back(left);
-
- mBarStart.back().push_back(left);
- mBarEnd.back().push_back(right);
-
- top = y;
- bottom = y - barh;
-
- if (right > left)
- {
- //U32 rounded_edges = 0;
- LLColor4 color = sTimerColors[idp];//*ft_display_table[i].color;
- S32 scale_offset = 0;
-
- BOOL is_child_of_hover_item = (idp == mHoverID);
- LLFastTimer::NamedTimer* next_parent = idp->getParent();
- while(!is_child_of_hover_item && next_parent)
- {
- is_child_of_hover_item = (mHoverID == next_parent);
- if (next_parent->getParent() == next_parent) break;
- next_parent = next_parent->getParent();
- }
-
- if (idp == mHoverID)
- {
- scale_offset = llfloor(sinf(mHighlightTimer.getElapsedTimeF32() * 6.f) * 3.f);
- //color = lerp(color, LLColor4::black, -0.4f);
- }
- else if (mHoverID != NULL && !is_child_of_hover_item)
- {
- color = lerp(color, LLColor4::grey, 0.8f);
- }
-
- gGL.color4fv(color.mV);
- F32 start_fragment = llclamp((F32)(left - sublevel_left[level]) / (F32)sublevel_dx[level], 0.f, 1.f);
- F32 end_fragment = llclamp((F32)(right - sublevel_left[level]) / (F32)sublevel_dx[level], 0.f, 1.f);
- gl_segmented_rect_2d_fragment_tex(sublevel_left[level], top - level + scale_offset, sublevel_right[level], bottom + level - scale_offset, box_imagep->getTextureWidth(), box_imagep->getTextureHeight(), 16, start_fragment, end_fragment);
-
- }
-
- if ((*it)->getCollapsed())
- {
- it.skipDescendants();
- }
-
- prev_id = idp;
- }
- y -= (barh + dy);
- if (j < 0)
- y -= barh;
- }
-
- //draw line graph history
- {
+ // Draw the window background
gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE);
- LLLocalClipRect clip(mGraphRect);
-
- //normalize based on last frame's maximum
- static U64 last_max = 0;
- static F32 alpha_interp = 0.f;
- U64 max_ticks = llmax(last_max, (U64) 1);
- F32 ms = (F32)((F64)max_ticks * iclock_freq);
-
- //display y-axis range
- std::string tdesc;
- if (mDisplayCalls)
- tdesc = llformat("%d calls", (int)max_ticks);
- else if (mDisplayHz)
- tdesc = llformat("%d Hz", (int)max_ticks);
- else
- tdesc = llformat("%4.2f ms", ms);
-
- x = mGraphRect.mRight - LLFontGL::getFontMonospace()->getWidth(tdesc)-5;
- y = mGraphRect.mTop - LLFontGL::getFontMonospace()->getLineHeight();
-
- LLFontGL::getFontMonospace()->renderUTF8(tdesc, 0, x, y, LLColor4::white,
- LLFontGL::LEFT, LLFontGL::TOP);
-
- //highlight visible range
- {
- S32 first_frame = LLFastTimer::NamedTimer::HISTORY_NUM - mScrollIndex;
- S32 last_frame = first_frame - MAX_VISIBLE_HISTORY;
-
- F32 frame_delta = ((F32) (mGraphRect.getWidth()))/(LLFastTimer::NamedTimer::HISTORY_NUM-1);
-
- F32 right = (F32) mGraphRect.mLeft + frame_delta*first_frame;
- F32 left = (F32) mGraphRect.mLeft + frame_delta*last_frame;
-
- gGL.color4f(0.5f,0.5f,0.5f,0.3f);
- gl_rect_2d((S32) left, mGraphRect.mTop, (S32) right, mGraphRect.mBottom);
-
- if (mHoverBarIndex >= 0)
- {
- S32 bar_frame = first_frame - mHoverBarIndex;
- F32 bar = (F32) mGraphRect.mLeft + frame_delta*bar_frame;
+ gl_rect_2d(getLocalRect(), LLColor4(0.f, 0.f, 0.f, 0.25f));
- gGL.color4f(0.5f,0.5f,0.5f,1);
-
- gGL.begin(LLRender::LINES);
- gGL.vertex2i((S32)bar, mGraphRect.mBottom);
- gGL.vertex2i((S32)bar, mGraphRect.mTop);
- gGL.end();
- }
- }
+ drawHelp(getRect().getHeight() - MARGIN);
+ drawLegend();
- U64 cur_max = 0;
- for(timer_tree_iterator_t it = begin_timer_tree(getFrameTimer());
- it != end_timer_tree();
- ++it)
- {
- LLFastTimer::NamedTimer* idp = (*it);
-
- //fatten highlighted timer
- if (mHoverID == idp)
- {
- gGL.flush();
- glLineWidth(3);
- }
-
- const F32 * col = sTimerColors[idp].mV;// ft_display_table[idx].color->mV;
-
- F32 alpha = 1.f;
-
- if (mHoverID != NULL &&
- idp != mHoverID)
- { //fade out non-highlighted timers
- if (idp->getParent() != mHoverID)
- {
- alpha = alpha_interp;
- }
- }
-
- gGL.color4f(col[0], col[1], col[2], alpha);
- gGL.begin(LLRender::TRIANGLE_STRIP);
- for (U32 j = llmax(0, LLFastTimer::NamedTimer::HISTORY_NUM - LLFastTimer::getLastFrameIndex());
- j < LLFastTimer::NamedTimer::HISTORY_NUM;
- j++)
- {
- U64 ticks = idp->getHistoricalCount(j);
-
- if (mDisplayHz)
- {
- F64 tc = (F64) (ticks+1) * iclock_freq;
- tc = 1000.f/tc;
- ticks = llmin((U64) tc, (U64) 1024);
- }
- else if (mDisplayCalls)
- {
- ticks = (S32)idp->getHistoricalCalls(j);
- }
-
- if (alpha == 1.f)
- {
- //normalize to highlighted timer
- cur_max = llmax(cur_max, ticks);
- }
- F32 x = mGraphRect.mLeft + ((F32) (mGraphRect.getWidth()))/(LLFastTimer::NamedTimer::HISTORY_NUM-1)*j;
- F32 y = mGraphRect.mBottom + (F32) mGraphRect.getHeight()/max_ticks*ticks;
- gGL.vertex2f(x,y);
- gGL.vertex2f(x,mGraphRect.mBottom);
- }
- gGL.end();
-
- if (mHoverID == idp)
- {
- gGL.flush();
- glLineWidth(1);
- }
-
- if (idp->getCollapsed())
- {
- //skip hidden timers
- it.skipDescendants();
- }
- }
-
- //interpolate towards new maximum
- last_max = (U64) lerp((F32)last_max, (F32) cur_max, LLCriticalDamp::getInterpolant(0.1f));
- if (last_max - cur_max <= 1 || cur_max - last_max <= 1)
- {
- last_max = cur_max;
- }
- F32 alpha_target = last_max > cur_max ?
- llmin((F32) last_max/ (F32) cur_max - 1.f,1.f) :
- llmin((F32) cur_max/ (F32) last_max - 1.f,1.f);
- alpha_interp = lerp(alpha_interp, alpha_target, LLCriticalDamp::getInterpolant(0.1f));
-
- if (mHoverID != NULL)
- {
- x = (mGraphRect.mRight + mGraphRect.mLeft)/2;
- y = mGraphRect.mBottom + 8;
-
- LLFontGL::getFontMonospace()->renderUTF8(
- mHoverID->getName(),
- 0,
- x, y,
- LLColor4::white,
- LLFontGL::LEFT, LLFontGL::BOTTOM);
- }
- }
- }
-
- // Output stats for clicked bar to log
- if (mPrintStats >= 0)
- {
- std::string legend_stat;
- bool first = true;
- for(timer_tree_iterator_t it = begin_timer_tree(getFrameTimer());
- it != end_timer_tree();
- ++it)
- {
- LLFastTimer::NamedTimer* idp = (*it);
-
- if (!first)
- {
- legend_stat += ", ";
- }
- first = false;
- legend_stat += idp->getName();
-
- if (idp->getCollapsed())
- {
- it.skipDescendants();
- }
- }
- llinfos << legend_stat << llendl;
-
- std::string timer_stat;
- first = true;
- for(timer_tree_iterator_t it = begin_timer_tree(getFrameTimer());
- it != end_timer_tree();
- ++it)
- {
- LLFastTimer::NamedTimer* idp = (*it);
-
- if (!first)
- {
- timer_stat += ", ";
- }
- first = false;
-
- U64 ticks;
- if (mPrintStats > 0)
- {
- ticks = idp->getHistoricalCount(mPrintStats);
- }
- else
- {
- ticks = idp->getCountAverage();
- }
- F32 ms = (F32)((F64)ticks * iclock_freq);
-
- timer_stat += llformat("%.1f",ms);
+ //mBarRect.mLeft = MARGIN + LEGEND_WIDTH + 8;
+ //mBarRect.mTop = y;
+ //mBarRect.mRight = getRect().getWidth() - MARGIN;
+ //mBarRect.mBottom = MARGIN + LINE_GRAPH_HEIGHT;
+
+ drawBars();
+ drawLineGraph();
+ printLineStats();
+ LLView::draw();
- if (idp->getCollapsed())
- {
- it.skipDescendants();
- }
- }
- llinfos << timer_stat << llendl;
- mPrintStats = -1;
- }
-
+ mAllTimeMax = llmax(mAllTimeMax, mRecording.getLastRecording().getSum(FTM_FRAME));
mHoverID = NULL;
mHoverBarIndex = -1;
-
- LLView::draw();
}
-F64 LLFastTimerView::getTime(const std::string& name)
+void LLFastTimerView::onOpen(const LLSD& key)
{
- const LLFastTimer::NamedTimer* timerp = LLFastTimer::getTimerByName(name);
- if (timerp)
+ setPauseState(false);
+ mRecording.reset();
+ mRecording.appendPeriodicRecording(LLTrace::get_frame_recording());
+ for(std::deque<TimerBarRow>::iterator it = mTimerBarRows.begin(), end_it = mTimerBarRows.end();
+ it != end_it;
+ ++it)
{
- return (F64)timerp->getCountAverage() / (F64)LLFastTimer::countsPerSecond();
+ delete []it->mBars;
+ it->mBars = NULL;
}
- return 0.0;
+}
+
+void LLFastTimerView::onClose(bool app_quitting)
+{
+ setVisible(FALSE);
}
void saveChart(const std::string& label, const char* suffix, LLImageRaw* scratch)
@@ -1431,7 +826,7 @@ void LLFastTimerView::doAnalysisDefault(std::string baseline, std::string target
std::ifstream target_is(target.c_str());
if (!base_is.is_open() || !target_is.is_open())
{
- llwarns << "'-analyzeperformance' error : baseline or current target file inexistent" << llendl;
+ LL_WARNS() << "'-analyzeperformance' error : baseline or current target file inexistent" << LL_ENDL;
base_is.close();
target_is.close();
return;
@@ -1445,7 +840,7 @@ void LLFastTimerView::doAnalysisDefault(std::string baseline, std::string target
LLSD current = analyzePerformanceLogDefault(target_is);
target_is.close();
- //output comparision
+ //output comparison
std::ofstream os(output.c_str());
LLSD::Real session_time = current["SessionTime"].asReal();
@@ -1533,26 +928,724 @@ void LLFastTimerView::outputAllMetrics()
//static
void LLFastTimerView::doAnalysis(std::string baseline, std::string target, std::string output)
{
- if(LLFastTimer::sLog)
+ if(BlockTimer::sLog)
{
doAnalysisDefault(baseline, target, output) ;
return ;
}
- if(LLFastTimer::sMetricLog)
+ if(BlockTimer::sMetricLog)
{
LLMetricPerformanceTesterBasic::doAnalysisMetrics(baseline, target, output) ;
return ;
}
}
-void LLFastTimerView::onClickCloseBtn(bool)
+
+
+void LLFastTimerView::printLineStats()
+{
+ // Output stats for clicked bar to log
+ if (mStatsIndex >= 0)
+ {
+ std::string legend_stat;
+ bool first = true;
+ for(block_timer_tree_df_iterator_t it = LLTrace::begin_block_timer_tree_df(FTM_FRAME);
+ it != LLTrace::end_block_timer_tree_df();
+ ++it)
+ {
+ BlockTimerStatHandle* idp = (*it);
+
+ if (!first)
+ {
+ legend_stat += ", ";
+ }
+ first = false;
+ legend_stat += idp->getName();
+
+ //if (idp->getTreeNode().mCollapsed)
+ //{
+ // it.skipDescendants();
+ //}
+ }
+ LL_INFOS() << legend_stat << LL_ENDL;
+
+ std::string timer_stat;
+ first = true;
+ for(block_timer_tree_df_iterator_t it = LLTrace::begin_block_timer_tree_df(FTM_FRAME);
+ it != LLTrace::end_block_timer_tree_df();
+ ++it)
+ {
+ BlockTimerStatHandle* idp = (*it);
+
+ if (!first)
+ {
+ timer_stat += ", ";
+ }
+ first = false;
+
+ F32Seconds ticks;
+ if (mStatsIndex == 0)
+ {
+ ticks = mRecording.getPeriodMean(*idp, RUNNING_AVERAGE_WIDTH);
+ }
+ else
+ {
+ ticks = mRecording.getPrevRecording(mStatsIndex).getSum(*idp);
+ }
+ F32Milliseconds ms = ticks;
+
+ timer_stat += llformat("%.1f",ms.value());
+
+ //if (idp->getTreeNode().mCollapsed)
+ //{
+ // it.skipDescendants();
+ //}
+ }
+ LL_INFOS() << timer_stat << LL_ENDL;
+ mStatsIndex = -1;
+ }
+}
+
+static LLTrace::BlockTimerStatHandle FTM_DRAW_LINE_GRAPH("Draw line graph");
+
+void LLFastTimerView::drawLineGraph()
+{
+ LL_RECORD_BLOCK_TIME(FTM_DRAW_LINE_GRAPH);
+ //draw line graph history
+ gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE);
+ LLLocalClipRect clip(mGraphRect);
+
+ //normalize based on last frame's maximum
+ static F32Seconds max_time(0.000001);
+ static U32 max_calls = 0;
+ static F32 alpha_interp = 0.f;
+
+ //highlight visible range
+ {
+ S32 first_frame = mRecording.getNumRecordedPeriods() - mScrollIndex;
+ S32 last_frame = first_frame - MAX_VISIBLE_HISTORY;
+
+ F32 frame_delta = ((F32) (mGraphRect.getWidth()))/(mRecording.getNumRecordedPeriods()-1);
+
+ F32 right = (F32) mGraphRect.mLeft + frame_delta*first_frame;
+ F32 left = (F32) mGraphRect.mLeft + frame_delta*last_frame;
+
+ gGL.color4f(0.5f,0.5f,0.5f,0.3f);
+ gl_rect_2d((S32) left, mGraphRect.mTop, (S32) right, mGraphRect.mBottom);
+
+ if (mHoverBarIndex > 0)
+ {
+ S32 bar_frame = first_frame - (mScrollIndex + mHoverBarIndex) - 1;
+ F32 bar = (F32) mGraphRect.mLeft + frame_delta*bar_frame;
+
+ gGL.color4f(0.5f,0.5f,0.5f,1);
+
+ gGL.begin(LLRender::LINES);
+ gGL.vertex2i((S32)bar, mGraphRect.mBottom);
+ gGL.vertex2i((S32)bar, mGraphRect.mTop);
+ gGL.end();
+ }
+ }
+
+ F32Seconds cur_max(0);
+ U32 cur_max_calls = 0;
+ for(block_timer_tree_df_iterator_t it = LLTrace::begin_block_timer_tree_df(FTM_FRAME);
+ it != LLTrace::end_block_timer_tree_df();
+ ++it)
+ {
+ BlockTimerStatHandle* idp = (*it);
+
+ //fatten highlighted timer
+ if (mHoverID == idp)
+ {
+ gGL.flush();
+ glLineWidth(3);
+ }
+
+ llassert(idp->getIndex() < sTimerColors.size());
+ const F32 * col = sTimerColors[idp->getIndex()].mV;// ft_display_table[idx].color->mV;
+
+ F32 alpha = 1.f;
+ bool is_hover_timer = true;
+
+ if (mHoverID != NULL &&
+ mHoverID != idp)
+ { //fade out non-highlighted timers
+ if (idp->getParent() != mHoverID)
+ {
+ alpha = alpha_interp;
+ is_hover_timer = false;
+ }
+ }
+
+ gGL.color4f(col[0], col[1], col[2], alpha);
+ gGL.begin(LLRender::TRIANGLE_STRIP);
+ F32 call_scale_factor = (F32)mGraphRect.getHeight() / (F32)max_calls;
+ F32 time_scale_factor = (F32)mGraphRect.getHeight() / max_time.value();
+ F32 hz_scale_factor = (F32) mGraphRect.getHeight() / (1.f / max_time.value());
+ for (U32 j = mRecording.getNumRecordedPeriods();
+ j > 0;
+ j--)
+ {
+ LLTrace::Recording& recording = mRecording.getPrevRecording(j);
+ F32Seconds time = llmax(recording.getSum(*idp), F64Seconds(0.000001));
+ U32 calls = recording.getSum(idp->callCount());
+
+ if (is_hover_timer)
+ {
+ //normalize to highlighted timer
+ cur_max = llmax(cur_max, time);
+ cur_max_calls = llmax(cur_max_calls, calls);
+ }
+ F32 x = mGraphRect.mRight - j * (F32)(mGraphRect.getWidth())/(mRecording.getNumRecordedPeriods()-1);
+ F32 y;
+ switch(mDisplayType)
+{
+ case DISPLAY_TIME:
+ y = mGraphRect.mBottom + time.value() * time_scale_factor;
+ break;
+ case DISPLAY_CALLS:
+ y = mGraphRect.mBottom + (F32)calls * call_scale_factor;
+ break;
+ case DISPLAY_HZ:
+ y = mGraphRect.mBottom + (1.f / time.value()) * hz_scale_factor;
+ break;
+ }
+ gGL.vertex2f(x,y);
+ gGL.vertex2f(x,mGraphRect.mBottom);
+ }
+ gGL.end();
+
+ if (mHoverID == idp)
+ {
+ gGL.flush();
+ glLineWidth(1);
+ }
+
+ if (idp->getTreeNode().mCollapsed)
+ {
+ //skip hidden timers
+ it.skipDescendants();
+ }
+ }
+
+ //interpolate towards new maximum
+ max_time = (F32Seconds)lerp(max_time.value(), cur_max.value(), LLSmoothInterpolation::getInterpolant(0.1f));
+ if (llabs((max_time - cur_max).value()) <= 1)
+ {
+ max_time = llmax(F32Microseconds(1.f), F32Microseconds(cur_max));
+ }
+
+ max_calls = llround(lerp((F32)max_calls, (F32) cur_max_calls, LLSmoothInterpolation::getInterpolant(0.1f)));
+ if (llabs((S32)(max_calls - cur_max_calls)) <= 1)
+ {
+ max_calls = cur_max_calls;
+ }
+
+ // TODO: make sure alpha is correct in DisplayHz mode
+ F32 alpha_target = (max_time > cur_max)
+ ? llmin(max_time / cur_max - 1.f,1.f)
+ : llmin(cur_max/ max_time - 1.f,1.f);
+ alpha_interp = lerp(alpha_interp, alpha_target, LLSmoothInterpolation::getInterpolant(0.1f));
+
+ if (mHoverID != NULL)
+ {
+ S32 x = (mGraphRect.mRight + mGraphRect.mLeft)/2;
+ S32 y = mGraphRect.mBottom + 8;
+
+ LLFontGL::getFontMonospace()->renderUTF8(
+ mHoverID->getName(),
+ 0,
+ x, y,
+ LLColor4::white,
+ LLFontGL::LEFT, LLFontGL::BOTTOM);
+ }
+
+ //display y-axis range
+ std::string axis_label;
+ switch(mDisplayType)
+ {
+ case DISPLAY_TIME:
+ axis_label = llformat("%4.2f ms", F32Milliseconds(max_time).value());
+ break;
+ case DISPLAY_CALLS:
+ axis_label = llformat("%d calls", (int)max_calls);
+ break;
+ case DISPLAY_HZ:
+ axis_label = llformat("%4.2f Hz", max_time.value() ? 1.f / max_time.value() : 0.f);
+ break;
+ }
+
+ LLFontGL* font = LLFontGL::getFontMonospace();
+ S32 x = mGraphRect.mRight - font->getWidth(axis_label)-5;
+ S32 y = mGraphRect.mTop - font->getLineHeight();;
+
+ font->renderUTF8(axis_label, 0, x, y, LLColor4::white, LLFontGL::LEFT, LLFontGL::TOP);
+}
+
+void LLFastTimerView::drawLegend()
+{
+ // draw legend
+ S32 dx;
+ S32 x = mLegendRect.mLeft;
+ S32 y = mLegendRect.mTop;
+ const S32 TEXT_HEIGHT = (S32)LLFontGL::getFontMonospace()->getLineHeight();
+
+ {
+ LLLocalClipRect clip(mLegendRect);
+ S32 cur_line = 0;
+ ft_display_idx.clear();
+ std::map<BlockTimerStatHandle*, S32> display_line;
+ for (block_timer_tree_df_iterator_t it = LLTrace::begin_block_timer_tree_df(FTM_FRAME);
+ it != block_timer_tree_df_iterator_t();
+ ++it)
+ {
+ BlockTimerStatHandle* idp = (*it);
+ display_line[idp] = cur_line;
+ ft_display_idx.push_back(idp);
+ cur_line++;
+
+ x = MARGIN;
+
+ LLRect bar_rect(x, y, x + TEXT_HEIGHT, y - TEXT_HEIGHT);
+ S32 scale_offset = 0;
+ if (idp == mHoverID)
+ {
+ scale_offset = llfloor(sinf(mHighlightTimer.getElapsedTimeF32() * 6.f) * 2.f);
+ }
+ bar_rect.stretch(scale_offset);
+ llassert(idp->getIndex() < sTimerColors.size());
+ gl_rect_2d(bar_rect, sTimerColors[idp->getIndex()]);
+
+ F32Milliseconds ms(0);
+ S32 calls = 0;
+ if (mHoverBarIndex > 0 && mHoverID)
+ {
+ S32 hidx = mScrollIndex + mHoverBarIndex;
+ ms = mRecording.getPrevRecording(hidx).getSum(*idp);
+ calls = mRecording.getPrevRecording(hidx).getSum(idp->callCount());
+ }
+ else
+ {
+ ms = F64Seconds(mRecording.getPeriodMean(*idp, RUNNING_AVERAGE_WIDTH));
+ calls = (S32)mRecording.getPeriodMean(idp->callCount(), RUNNING_AVERAGE_WIDTH);
+ }
+
+ std::string timer_label;
+ switch(mDisplayType)
+ {
+ case DISPLAY_TIME:
+ timer_label = llformat("%s [%.1f]",idp->getName().c_str(),ms.value());
+ break;
+ case DISPLAY_CALLS:
+ timer_label = llformat("%s (%d)",idp->getName().c_str(),calls);
+ break;
+ case DISPLAY_HZ:
+ timer_label = llformat("%.1f", ms.value() ? (1.f / ms.value()) : 0.f);
+ break;
+ }
+ dx = (TEXT_HEIGHT+4) + get_depth(idp)*8;
+
+ LLColor4 color = LLColor4::white;
+ if (get_depth(idp) > 0)
+ {
+ S32 line_start_y = bar_rect.getCenterY();
+ S32 line_end_y = line_start_y + ((TEXT_HEIGHT + 2) * (cur_line - display_line[idp->getParent()])) - TEXT_HEIGHT;
+ gl_line_2d(x + dx - 8, line_start_y, x + dx, line_start_y, color);
+ S32 line_x = x + (TEXT_HEIGHT + 4) + ((get_depth(idp) - 1) * 8);
+ gl_line_2d(line_x, line_start_y, line_x, line_end_y, color);
+ if (idp->getTreeNode().mCollapsed && !idp->getChildren().empty())
+ {
+ gl_line_2d(line_x+4, line_start_y-3, line_x+4, line_start_y+4, color);
+ }
+ }
+
+ x += dx;
+ BOOL is_child_of_hover_item = (idp == mHoverID);
+ BlockTimerStatHandle* next_parent = idp->getParent();
+ while(!is_child_of_hover_item && next_parent)
+ {
+ is_child_of_hover_item = (mHoverID == next_parent);
+ if (next_parent->getParent() == next_parent) break;
+ next_parent = next_parent->getParent();
+ }
+
+ LLFontGL::getFontMonospace()->renderUTF8(timer_label, 0,
+ x, y,
+ color,
+ LLFontGL::LEFT, LLFontGL::TOP,
+ is_child_of_hover_item ? LLFontGL::BOLD : LLFontGL::NORMAL);
+
+ y -= (TEXT_HEIGHT + 2);
+
+ if (idp->getTreeNode().mCollapsed)
+ {
+ it.skipDescendants();
+ }
+ }
+ }
+}
+
+void LLFastTimerView::generateUniqueColors()
+{
+ // generate unique colors
+ {
+ sTimerColors.resize(LLTrace::BlockTimerStatHandle::getNumIndices());
+ sTimerColors[FTM_FRAME.getIndex()] = LLColor4::grey;
+
+ F32 hue = 0.f;
+
+ for (block_timer_tree_df_iterator_t it = LLTrace::begin_block_timer_tree_df(FTM_FRAME);
+ it != block_timer_tree_df_iterator_t();
+ ++it)
+ {
+ BlockTimerStatHandle* idp = (*it);
+
+ const F32 HUE_INCREMENT = 0.23f;
+ hue = fmodf(hue + HUE_INCREMENT, 1.f);
+ // saturation increases with depth
+ F32 saturation = clamp_rescale((F32)get_depth(idp), 0.f, 3.f, 0.f, 1.f);
+ // lightness alternates with depth
+ F32 lightness = get_depth(idp) % 2 ? 0.5f : 0.6f;
+
+ LLColor4 child_color;
+ child_color.setHSL(hue, saturation, lightness);
+
+ llassert(idp->getIndex() < sTimerColors.size());
+ sTimerColors[idp->getIndex()] = child_color;
+ }
+ }
+}
+
+void LLFastTimerView::drawHelp( S32 y )
+{
+ // Draw some help
+ const S32 texth = (S32)LLFontGL::getFontMonospace()->getLineHeight();
+
+ y -= (texth + 2);
+ y -= (texth + 2);
+
+ LLFontGL::getFontMonospace()->renderUTF8(std::string("[Right-Click log selected]"),
+ 0, MARGIN, y, LLColor4::white, LLFontGL::LEFT, LLFontGL::TOP);
+}
+
+void LLFastTimerView::drawTicks()
+{
+ // Draw MS ticks
+ {
+ U32Milliseconds ms = mTotalTimeDisplay;
+ std::string tick_label;
+ S32 x;
+ S32 barw = mBarRect.getWidth();
+
+ tick_label = llformat("%.1f ms |", (F32)ms.value()*.25f);
+ x = mBarRect.mLeft + barw/4 - LLFontGL::getFontMonospace()->getWidth(tick_label);
+ LLFontGL::getFontMonospace()->renderUTF8(tick_label, 0, x, mBarRect.mTop, LLColor4::white,
+ LLFontGL::LEFT, LLFontGL::TOP);
+
+ tick_label = llformat("%.1f ms |", (F32)ms.value()*.50f);
+ x = mBarRect.mLeft + barw/2 - LLFontGL::getFontMonospace()->getWidth(tick_label);
+ LLFontGL::getFontMonospace()->renderUTF8(tick_label, 0, x, mBarRect.mTop, LLColor4::white,
+ LLFontGL::LEFT, LLFontGL::TOP);
+
+ tick_label = llformat("%.1f ms |", (F32)ms.value()*.75f);
+ x = mBarRect.mLeft + (barw*3)/4 - LLFontGL::getFontMonospace()->getWidth(tick_label);
+ LLFontGL::getFontMonospace()->renderUTF8(tick_label, 0, x, mBarRect.mTop, LLColor4::white,
+ LLFontGL::LEFT, LLFontGL::TOP);
+
+ tick_label = llformat( "%d ms |", (U32)ms.value());
+ x = mBarRect.mLeft + barw - LLFontGL::getFontMonospace()->getWidth(tick_label);
+ LLFontGL::getFontMonospace()->renderUTF8(tick_label, 0, x, mBarRect.mTop, LLColor4::white,
+ LLFontGL::LEFT, LLFontGL::TOP);
+ }
+}
+
+void LLFastTimerView::drawBorders( S32 y, const S32 x_start, S32 bar_height, S32 dy )
+{
+ // Draw borders
+ {
+ S32 by = y + 6 + (S32)LLFontGL::getFontMonospace()->getLineHeight();
+
+ //heading
+ gl_rect_2d(x_start-5, by, getRect().getWidth()-5, y+5, LLColor4::grey, FALSE);
+
+ //tree view
+ gl_rect_2d(5, by, x_start-10, 5, LLColor4::grey, FALSE);
+
+ by = y + 5;
+ //average bar
+ gl_rect_2d(x_start-5, by, getRect().getWidth()-5, by-bar_height-dy-5, LLColor4::grey, FALSE);
+
+ by -= bar_height*2+dy;
+
+ //current frame bar
+ gl_rect_2d(x_start-5, by, getRect().getWidth()-5, by-bar_height-dy-2, LLColor4::grey, FALSE);
+
+ by -= bar_height+dy+1;
+
+ //history bars
+ gl_rect_2d(x_start-5, by, getRect().getWidth()-5, LINE_GRAPH_HEIGHT-bar_height-dy-2, LLColor4::grey, FALSE);
+
+ by = LINE_GRAPH_HEIGHT-dy;
+
+ //line graph
+ //mGraphRect = LLRect(x_start-5, by, getRect().getWidth()-5, 5);
+
+ gl_rect_2d(mGraphRect, FALSE);
+ }
+}
+
+void LLFastTimerView::updateTotalTime()
+{
+ switch(mDisplayMode)
+ {
+ case 0:
+ mTotalTimeDisplay = mRecording.getPeriodMean(FTM_FRAME, RUNNING_AVERAGE_WIDTH)*2;
+ break;
+ case 1:
+ mTotalTimeDisplay = mRecording.getPeriodMax(FTM_FRAME);
+ break;
+ case 2:
+ // Calculate the max total ticks for the current history
+ mTotalTimeDisplay = mRecording.getPeriodMax(FTM_FRAME, 20);
+ break;
+ default:
+ mTotalTimeDisplay = F64Milliseconds(100);
+ break;
+ }
+
+ mTotalTimeDisplay = LLUnits::Milliseconds::fromValue(llceil(mTotalTimeDisplay.valueInUnits<LLUnits::Milliseconds>() / 20.f) * 20.f);
+}
+
+void LLFastTimerView::drawBars()
+{
+ LLLocalClipRect clip(mBarRect);
+
+ S32 bar_height = mBarRect.getHeight() / (MAX_VISIBLE_HISTORY + 2);
+ const S32 vpad = llmax(1, bar_height / 4); // spacing between bars
+ bar_height -= vpad;
+
+ updateTotalTime();
+ if (mTotalTimeDisplay <= (F32Seconds)0.0) return;
+
+ drawTicks();
+ const S32 bars_top = mBarRect.mTop - ((S32)LLFontGL::getFontMonospace()->getLineHeight() + 4);
+ drawBorders(bars_top, mBarRect.mLeft, bar_height, vpad);
+
+ // Draw bars for each history entry
+ // Special: 0 = show running average
+ LLPointer<LLUIImage> bar_image = LLUI::getUIImage("Rounded_Square");
+
+ const S32 image_width = bar_image->getTextureWidth();
+ const S32 image_height = bar_image->getTextureHeight();
+
+ gGL.getTexUnit(0)->bind(bar_image->getImage());
+ {
+ const S32 histmax = (S32)mRecording.getNumRecordedPeriods();
+
+ // update widths
+ if (!mPauseHistory)
+ {
+ U32 bar_index = 0;
+ if (!mAverageTimerRow.mBars)
+ {
+ mAverageTimerRow.mBars = new TimerBar[LLTrace::BlockTimerStatHandle::instance_tracker_t::instanceCount()];
+ }
+ updateTimerBarWidths(&FTM_FRAME, mAverageTimerRow, -1, bar_index);
+ updateTimerBarOffsets(&FTM_FRAME, mAverageTimerRow);
+
+ for (S32 history_index = 1; history_index <= histmax; history_index++)
+ {
+ llassert(history_index <= mTimerBarRows.size());
+ TimerBarRow& row = mTimerBarRows[history_index - 1];
+ bar_index = 0;
+ if (!row.mBars)
+ {
+ row.mBars = new TimerBar[LLTrace::BlockTimerStatHandle::instance_tracker_t::instanceCount()];
+ updateTimerBarWidths(&FTM_FRAME, row, history_index, bar_index);
+ updateTimerBarOffsets(&FTM_FRAME, row);
+ }
+ }
+ }
+
+ // draw bars
+ LLRect frame_bar_rect;
+ frame_bar_rect.setLeftTopAndSize(mBarRect.mLeft,
+ bars_top,
+ llround((mAverageTimerRow.mBars[0].mTotalTime / mTotalTimeDisplay) * mBarRect.getWidth()),
+ bar_height);
+ mAverageTimerRow.mTop = frame_bar_rect.mTop;
+ mAverageTimerRow.mBottom = frame_bar_rect.mBottom;
+ drawBar(frame_bar_rect, mAverageTimerRow, image_width, image_height);
+ frame_bar_rect.translate(0, -(bar_height + vpad + bar_height));
+
+ for(S32 bar_index = mScrollIndex; bar_index < llmin(histmax, mScrollIndex + MAX_VISIBLE_HISTORY); ++bar_index)
+ {
+ llassert(bar_index < mTimerBarRows.size());
+ TimerBarRow& row = mTimerBarRows[bar_index];
+ row.mTop = frame_bar_rect.mTop;
+ row.mBottom = frame_bar_rect.mBottom;
+ frame_bar_rect.mRight = frame_bar_rect.mLeft
+ + llround((row.mBars[0].mTotalTime / mTotalTimeDisplay) * mBarRect.getWidth());
+ drawBar(frame_bar_rect, row, image_width, image_height);
+
+ frame_bar_rect.translate(0, -(bar_height + vpad));
+ }
+
+ }
+ gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE);
+}
+
+static LLTrace::BlockTimerStatHandle FTM_UPDATE_TIMER_BAR_WIDTHS("Update timer bar widths");
+
+F32Seconds LLFastTimerView::updateTimerBarWidths(LLTrace::BlockTimerStatHandle* time_block, TimerBarRow& row, S32 history_index, U32& bar_index)
{
- setVisible(false);
+ LL_RECORD_BLOCK_TIME(FTM_UPDATE_TIMER_BAR_WIDTHS);
+ const F32Seconds self_time = history_index == -1
+ ? mRecording.getPeriodMean(time_block->selfTime(), RUNNING_AVERAGE_WIDTH)
+ : mRecording.getPrevRecording(history_index).getSum(time_block->selfTime());
+
+ F32Seconds full_time = self_time;
+
+ // reserve a spot for this bar to be rendered before its children
+ // even though we don't know its size yet
+ TimerBar& timer_bar = row.mBars[bar_index];
+ bar_index++;
+
+ for (BlockTimerStatHandle::child_iter it = time_block->beginChildren(), end_it = time_block->endChildren(); it != end_it; ++it)
+ {
+ full_time += updateTimerBarWidths(*it, row, history_index, bar_index);
+ }
+
+ timer_bar.mTotalTime = full_time;
+ timer_bar.mSelfTime = self_time;
+ timer_bar.mTimeBlock = time_block;
+
+ return full_time;
}
-LLFastTimer::NamedTimer& LLFastTimerView::getFrameTimer()
+static LLTrace::BlockTimerStatHandle FTM_UPDATE_TIMER_BAR_FRACTIONS("Update timer bar fractions");
+
+S32 LLFastTimerView::updateTimerBarOffsets(LLTrace::BlockTimerStatHandle* time_block, TimerBarRow& row, S32 timer_bar_index)
{
- return FTM_FRAME.getNamedTimer();
+ LL_RECORD_BLOCK_TIME(FTM_UPDATE_TIMER_BAR_FRACTIONS);
+
+ TimerBar& timer_bar = row.mBars[timer_bar_index];
+ const F32Seconds bar_time = timer_bar.mTotalTime - timer_bar.mSelfTime;
+ timer_bar.mChildrenStart = timer_bar.mSelfStart + timer_bar.mSelfTime / 2;
+ timer_bar.mChildrenEnd = timer_bar.mChildrenStart + timer_bar.mTotalTime - timer_bar.mSelfTime;
+
+ if (timer_bar_index == 0)
+ {
+ timer_bar.mSelfStart = F32Seconds(0.f);
+ timer_bar.mSelfEnd = bar_time;
+ }
+
+ //now loop through children and figure out portion of bar image covered by each bar, now that we know the
+ //sum of all children
+ F32 bar_fraction_start = 0.f;
+ TimerBar* last_child_timer_bar = NULL;
+
+ bool first_child = true;
+ for (BlockTimerStatHandle::child_iter it = time_block->beginChildren(), end_it = time_block->endChildren();
+ it != end_it;
+ ++it)
+ {
+ timer_bar_index++;
+
+ TimerBar& child_timer_bar = row.mBars[timer_bar_index];
+ BlockTimerStatHandle* child_time_block = *it;
+
+ if (last_child_timer_bar)
+ {
+ last_child_timer_bar->mLastChild = false;
+ }
+ child_timer_bar.mLastChild = true;
+ last_child_timer_bar = &child_timer_bar;
+
+ child_timer_bar.mFirstChild = first_child;
+ if (first_child)
+ {
+ first_child = false;
+ }
+
+ child_timer_bar.mStartFraction = bar_fraction_start;
+ child_timer_bar.mEndFraction = bar_time > (S32Seconds)0
+ ? bar_fraction_start + child_timer_bar.mTotalTime / bar_time
+ : 1.f;
+ child_timer_bar.mSelfStart = timer_bar.mChildrenStart
+ + child_timer_bar.mStartFraction
+ * (timer_bar.mChildrenEnd - timer_bar.mChildrenStart);
+ child_timer_bar.mSelfEnd = timer_bar.mChildrenStart
+ + child_timer_bar.mEndFraction
+ * (timer_bar.mChildrenEnd - timer_bar.mChildrenStart);
+
+ timer_bar_index = updateTimerBarOffsets(child_time_block, row, timer_bar_index);
+
+ bar_fraction_start = child_timer_bar.mEndFraction;
+ }
+ return timer_bar_index;
}
+S32 LLFastTimerView::drawBar(LLRect bar_rect, TimerBarRow& row, S32 image_width, S32 image_height, bool hovered, bool visible, S32 bar_index)
+{
+ TimerBar& timer_bar = row.mBars[bar_index];
+ LLTrace::BlockTimerStatHandle* time_block = timer_bar.mTimeBlock;
+
+ hovered |= mHoverID == time_block;
+
+ // animate scale of bar when hovering over that particular timer
+ if (visible && (F32)bar_rect.getWidth() * (timer_bar.mEndFraction - timer_bar.mStartFraction) > 2.f)
+ {
+ LLRect render_rect(bar_rect);
+ S32 scale_offset = 0;
+ if (mHoverID == time_block)
+ {
+ scale_offset = llfloor(sinf(mHighlightTimer.getElapsedTimeF32() * 6.f) * 3.f);
+ render_rect.mTop += scale_offset;
+ render_rect.mBottom -= scale_offset;
+ }
+
+ llassert(time_block->getIndex() < sTimerColors.size());
+ LLColor4 color = sTimerColors[time_block->getIndex()];
+ if (!hovered) color = lerp(color, LLColor4::grey, 0.2f);
+ gGL.color4fv(color.mV);
+ gl_segmented_rect_2d_fragment_tex(render_rect,
+ image_width, image_height,
+ 16,
+ timer_bar.mStartFraction, timer_bar.mEndFraction);
+ }
+
+ LLRect children_rect;
+ children_rect.mLeft = llround(timer_bar.mChildrenStart / mTotalTimeDisplay * (F32)mBarRect.getWidth()) + mBarRect.mLeft;
+ children_rect.mRight = llround(timer_bar.mChildrenEnd / mTotalTimeDisplay * (F32)mBarRect.getWidth()) + mBarRect.mLeft;
+
+ if (bar_rect.getHeight() > MIN_BAR_HEIGHT)
+ {
+ // shrink as we go down a level
+ children_rect.mTop = bar_rect.mTop - 1;
+ children_rect.mBottom = bar_rect.mBottom + 1;
+ }
+ else
+ {
+ children_rect.mTop = bar_rect.mTop;
+ children_rect.mBottom = bar_rect.mBottom;
+ }
+
+ bool children_visible = visible && !time_block->getTreeNode().mCollapsed;
+ bar_index++;
+ const U32 num_bars = LLTrace::BlockTimerStatHandle::instance_tracker_t::instanceCount();
+ if (bar_index < num_bars && row.mBars[bar_index].mFirstChild)
+ {
+ bool is_last = false;
+ do
+ {
+ is_last = row.mBars[bar_index].mLastChild;
+ bar_index = drawBar(children_rect, row, image_width, image_height, hovered, children_visible, bar_index);
+ }
+ while(!is_last && bar_index < num_bars);
+ }
+
+ return bar_index;
+}
diff --git a/indra/newview/llfasttimerview.h b/indra/newview/llfasttimerview.h
index 1349b1e99c..3e30bd86ba 100755
--- a/indra/newview/llfasttimerview.h
+++ b/indra/newview/llfasttimerview.h
@@ -29,11 +29,15 @@
#include "llfloater.h"
#include "llfasttimer.h"
+#include "llunits.h"
+#include "lltracerecording.h"
+#include <deque>
class LLFastTimerView : public LLFloater
{
public:
LLFastTimerView(const LLSD&);
+ ~LLFastTimerView();
BOOL postBuild();
static BOOL sAnalyzePerformance;
@@ -46,7 +50,6 @@ private:
static LLSD analyzePerformanceLogDefault(std::istream& is) ;
static void exportCharts(const std::string& base, const std::string& target);
void onPause();
- LLFastTimer::NamedTimer& getFrameTimer();
public:
@@ -58,40 +61,87 @@ public:
virtual BOOL handleToolTip(S32 x, S32 y, MASK mask);
virtual BOOL handleScrollWheel(S32 x, S32 y, S32 clicks);
virtual void draw();
+ virtual void onOpen(const LLSD& key);
+ virtual void onClose(bool app_quitting);
+ LLTrace::BlockTimerStatHandle* getLegendID(S32 y);
- LLFastTimer::NamedTimer* getLegendID(S32 y);
- F64 getTime(const std::string& name);
-
-protected:
- virtual void onClickCloseBtn(bool app_quitting = false);
private:
- typedef std::vector<std::vector<S32> > bar_positions_t;
- bar_positions_t mBarStart;
- bar_positions_t mBarEnd;
- S32 mDisplayMode;
+ void drawTicks();
+ void drawLineGraph();
+ void drawLegend();
+ void drawHelp(S32 y);
+ void drawBorders( S32 y, const S32 x_start, S32 barh, S32 dy);
+ void drawBars();
+
+ void printLineStats();
+ void generateUniqueColors();
+ void updateTotalTime();
+
+ struct TimerBar
+ {
+ TimerBar()
+ : mTotalTime(0),
+ mSelfTime(0),
+ mStartFraction(0.f),
+ mEndFraction(1.f),
+ mFirstChild(false),
+ mLastChild(false)
+ {}
+ F32Seconds mTotalTime,
+ mSelfTime,
+ mChildrenStart,
+ mChildrenEnd,
+ mSelfStart,
+ mSelfEnd;
+ LLTrace::BlockTimerStatHandle* mTimeBlock;
+ bool mVisible,
+ mFirstChild,
+ mLastChild;
+ F32 mStartFraction,
+ mEndFraction;
+ };
+
+ struct TimerBarRow
+ {
+ TimerBarRow()
+ : mBottom(0),
+ mTop(0),
+ mBars(NULL)
+ {}
+ S32 mBottom,
+ mTop;
+ TimerBar* mBars;
+ };
+
+ F32Seconds updateTimerBarWidths(LLTrace::BlockTimerStatHandle* time_block, TimerBarRow& row, S32 history_index, U32& bar_index);
+ S32 updateTimerBarOffsets(LLTrace::BlockTimerStatHandle* time_block, TimerBarRow& row, S32 timer_bar_index = 0);
+ S32 drawBar(LLRect bar_rect, TimerBarRow& row, S32 image_width, S32 image_height, bool hovered = false, bool visible = true, S32 bar_index = 0);
+ void setPauseState(bool pause_state);
+
+ std::deque<TimerBarRow> mTimerBarRows;
+ TimerBarRow mAverageTimerRow;
- typedef enum child_alignment
+ enum EDisplayType
{
- ALIGN_LEFT,
- ALIGN_CENTER,
- ALIGN_RIGHT,
- ALIGN_COUNT
- } ChildAlignment;
-
- ChildAlignment mDisplayCenter;
- S32 mDisplayCalls;
- S32 mDisplayHz;
- U64 mAvgCountTotal;
- U64 mMaxCountTotal;
- LLRect mBarRect;
- S32 mScrollIndex;
- LLFastTimer::NamedTimer* mHoverID;
- LLFastTimer::NamedTimer* mHoverTimer;
- LLRect mToolTipRect;
- S32 mHoverBarIndex;
- LLFrameTimer mHighlightTimer;
- S32 mPrintStats;
- LLRect mGraphRect;
+ DISPLAY_TIME,
+ DISPLAY_CALLS,
+ DISPLAY_HZ
+ } mDisplayType;
+ bool mPauseHistory;
+ F64Seconds mAllTimeMax,
+ mTotalTimeDisplay;
+ S32 mScrollIndex,
+ mHoverBarIndex,
+ mStatsIndex;
+ S32 mDisplayMode;
+ LLTrace::BlockTimerStatHandle* mHoverID;
+ LLTrace::BlockTimerStatHandle* mHoverTimer;
+ LLRect mToolTipRect,
+ mGraphRect,
+ mBarRect,
+ mLegendRect;
+ LLFrameTimer mHighlightTimer;
+ LLTrace::PeriodicRecording mRecording;
};
#endif
diff --git a/indra/newview/llfavoritesbar.cpp b/indra/newview/llfavoritesbar.cpp
index a2d0759587..1b3cfb5ebd 100755
--- a/indra/newview/llfavoritesbar.cpp
+++ b/indra/newview/llfavoritesbar.cpp
@@ -480,7 +480,7 @@ BOOL LLFavoritesBarCtrl::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop,
const LLUUID favorites_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_FAVORITE);
if (item->getParentUUID() == favorites_id)
{
- llwarns << "Attemt to copy a favorite item into the same folder." << llendl;
+ LL_WARNS() << "Attemt to copy a favorite item into the same folder." << LL_ENDL;
break;
}
@@ -632,7 +632,7 @@ void LLFavoritesBarCtrl::handleNewFavoriteDragAndDrop(LLInventoryItem *item, con
// landmarks to an empty favorites bar.
updateButtons();
- llinfos << "Copied inventory item #" << item->getUUID() << " to favorites." << llendl;
+ LL_INFOS() << "Copied inventory item #" << item->getUUID() << " to favorites." << LL_ENDL;
}
//virtual
@@ -738,7 +738,7 @@ void LLFavoritesBarCtrl::updateButtons()
int first_changed_item_index = 0;
int rightest_point = getRect().mRight - mMoreTextBox->getRect().getWidth();
//lets find first changed button
- while (child_it != childs->end() && first_changed_item_index < mItems.count())
+ while (child_it != childs->end() && first_changed_item_index < mItems.size())
{
LLFavoriteLandmarkButton* button = dynamic_cast<LLFavoriteLandmarkButton*> (*child_it);
if (button)
@@ -760,7 +760,7 @@ void LLFavoritesBarCtrl::updateButtons()
}
// now first_changed_item_index should contains a number of button that need to change
- if (first_changed_item_index <= mItems.count())
+ if (first_changed_item_index <= mItems.size())
{
// Rebuild the buttons only
// child_list_t is a linked list, so safe to erase from the middle if we pre-increment the iterator
@@ -798,7 +798,7 @@ void LLFavoritesBarCtrl::updateButtons()
//last_right_edge is saving coordinates
LLButton* last_new_button = NULL;
int j = first_changed_item_index;
- for (; j < mItems.count(); j++)
+ for (; j < mItems.size(); j++)
{
last_new_button = createButton(mItems[j], button_params, last_right_edge);
if (!last_new_button)
@@ -812,7 +812,7 @@ void LLFavoritesBarCtrl::updateButtons()
}
mFirstDropDownItem = j;
// Chevron button
- if (mFirstDropDownItem < mItems.count())
+ if (mFirstDropDownItem < mItems.size())
{
// if updateButton had been called it means:
//or there are some new favorites, or width had been changed
@@ -871,7 +871,7 @@ LLButton* LLFavoritesBarCtrl::createButton(const LLPointer<LLViewerInventoryItem
fav_btn = LLUICtrlFactory::create<LLFavoriteLandmarkButton>(fav_btn_params);
if (NULL == fav_btn)
{
- llwarns << "Unable to create LLFavoriteLandmarkButton widget: " << item->getName() << llendl;
+ LL_WARNS() << "Unable to create LLFavoriteLandmarkButton widget: " << item->getName() << LL_ENDL;
return NULL;
}
@@ -977,9 +977,9 @@ void LLFavoritesBarCtrl::updateMenuItems(LLToggleableMenu* menu)
U32 widest_item = 0;
- for (S32 i = mFirstDropDownItem; i < mItems.count(); i++)
+ for (S32 i = mFirstDropDownItem; i < mItems.size(); i++)
{
- LLViewerInventoryItem* item = mItems.get(i);
+ LLViewerInventoryItem* item = mItems.at(i);
const std::string& item_name = item->getName();
LLFavoriteLandmarkMenuItem::Params item_params;
@@ -1160,7 +1160,7 @@ bool LLFavoritesBarCtrl::enableSelected(const LLSD& userdata)
void LLFavoritesBarCtrl::doToSelected(const LLSD& userdata)
{
std::string action = userdata.asString();
- llinfos << "Action = " << action << " Item = " << mSelectedItemID.asString() << llendl;
+ LL_INFOS() << "Action = " << action << " Item = " << mSelectedItemID.asString() << LL_ENDL;
LLViewerInventoryItem* item = gInventory.getItem(mSelectedItemID);
if (!item)
@@ -1235,12 +1235,12 @@ BOOL LLFavoritesBarCtrl::isClipboardPasteable() const
return FALSE;
}
- LLDynamicArray<LLUUID> objects;
+ std::vector<LLUUID> objects;
LLClipboard::instance().pasteFromClipboard(objects);
- S32 count = objects.count();
+ S32 count = objects.size();
for(S32 i = 0; i < count; i++)
{
- const LLUUID &item_id = objects.get(i);
+ const LLUUID &item_id = objects.at(i);
// Can't paste folders
const LLInventoryCategory *cat = gInventory.getCategory(item_id);
@@ -1264,13 +1264,13 @@ void LLFavoritesBarCtrl::pasteFromClipboard() const
if(model && isClipboardPasteable())
{
LLInventoryItem* item = NULL;
- LLDynamicArray<LLUUID> objects;
+ std::vector<LLUUID> objects;
LLClipboard::instance().pasteFromClipboard(objects);
- S32 count = objects.count();
+ S32 count = objects.size();
LLUUID parent_id(mFavoriteFolderId);
for(S32 i = 0; i < count; i++)
{
- item = model->getItem(objects.get(i));
+ item = model->getItem(objects.at(i));
if (item)
{
copy_inventory_item(
@@ -1487,14 +1487,14 @@ void LLFavoritesOrderStorage::saveFavoritesSLURLs()
// Do not change the file if we are not logged in yet.
if (!LLLoginInstance::getInstance()->authSuccess())
{
- llwarns << "Cannot save favorites: not logged in" << llendl;
+ LL_WARNS() << "Cannot save favorites: not logged in" << LL_ENDL;
return;
}
std::string user_dir = gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS, "");
if (user_dir.empty())
{
- llwarns << "Cannot save favorites: empty user dir name" << llendl;
+ LL_WARNS() << "Cannot save favorites: empty user dir name" << LL_ENDL;
return;
}
@@ -1522,13 +1522,13 @@ void LLFavoritesOrderStorage::saveFavoritesSLURLs()
slurls_map_t::iterator slurl_iter = mSLURLs.find(value["asset_id"]);
if (slurl_iter != mSLURLs.end())
{
- lldebugs << "Saving favorite: idx=" << LLFavoritesOrderStorage::instance().getSortIndex((*it)->getUUID()) << ", SLURL=" << slurl_iter->second << ", value=" << value << llendl;
+ LL_DEBUGS() << "Saving favorite: idx=" << LLFavoritesOrderStorage::instance().getSortIndex((*it)->getUUID()) << ", SLURL=" << slurl_iter->second << ", value=" << value << LL_ENDL;
value["slurl"] = slurl_iter->second;
user_llsd[LLFavoritesOrderStorage::instance().getSortIndex((*it)->getUUID())] = value;
}
else
{
- llwarns << "Not saving favorite " << value["name"] << ": no matching SLURL" << llendl;
+ LL_WARNS() << "Not saving favorite " << value["name"] << ": no matching SLURL" << LL_ENDL;
}
}
@@ -1536,7 +1536,7 @@ void LLFavoritesOrderStorage::saveFavoritesSLURLs()
LLAvatarNameCache::get( gAgentID, &av_name );
// Note : use the "John Doe" and not the "john.doe" version of the name
// as we'll compare it with the stored credentials in the login panel.
- lldebugs << "Saved favorites for " << av_name.getUserName() << llendl;
+ LL_DEBUGS() << "Saved favorites for " << av_name.getUserName() << LL_ENDL;
fav_llsd[av_name.getUserName()] = user_llsd;
llofstream file;
@@ -1557,7 +1557,7 @@ void LLFavoritesOrderStorage::removeFavoritesRecordOfUser()
LLAvatarNameCache::get( gAgentID, &av_name );
// Note : use the "John Doe" and not the "john.doe" version of the name.
// See saveFavoritesSLURLs() here above for the reason why.
- lldebugs << "Removed favorites for " << av_name.getUserName() << llendl;
+ LL_DEBUGS() << "Removed favorites for " << av_name.getUserName() << LL_ENDL;
if (fav_llsd.has(av_name.getUserName()))
{
fav_llsd.erase(av_name.getUserName());
@@ -1590,7 +1590,7 @@ void LLFavoritesOrderStorage::onLandmarkLoaded(const LLUUID& asset_id, LLLandmar
void LLFavoritesOrderStorage::storeFavoriteSLURL(const LLUUID& asset_id, std::string& slurl)
{
- lldebugs << "Saving landmark SLURL: " << slurl << llendl;
+ LL_DEBUGS() << "Saving landmark SLURL: " << slurl << LL_ENDL;
mSLURLs[asset_id] = slurl;
}
diff --git a/indra/newview/llfeaturemanager.cpp b/indra/newview/llfeaturemanager.cpp
index ba6f26d3ef..8c3a4bb5c0 100755
--- a/indra/newview/llfeaturemanager.cpp
+++ b/indra/newview/llfeaturemanager.cpp
@@ -37,7 +37,6 @@
#include "llsys.h"
#include "llgl.h"
-#include "llsecondlifeurls.h"
#include "llappviewer.h"
#include "llhttpclient.h"
@@ -131,7 +130,7 @@ F32 LLFeatureList::getRecommendedValue(const std::string& name)
BOOL LLFeatureList::maskList(LLFeatureList &mask)
{
- //llinfos << "Masking with " << mask.mName << llendl;
+ //LL_INFOS() << "Masking with " << mask.mName << LL_ENDL;
//
// Lookup the specified feature mask, and overlay it on top of the
// current feature mask.
@@ -626,7 +625,7 @@ public:
{
// write to file
- llinfos << "writing feature table to " << mFilename << llendl;
+ LL_INFOS() << "writing feature table to " << mFilename << LL_ENDL;
S32 file_size = buffer->countAfter(channels.in(), NULL);
if (file_size > 0)
@@ -671,7 +670,7 @@ void fetch_feature_table(std::string table)
const std::string path = gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS, filename);
- llinfos << "LLFeatureManager fetching " << url << " into " << path << llendl;
+ LL_INFOS() << "LLFeatureManager fetching " << url << " into " << path << LL_ENDL;
LLHTTPClient::get(url, new LLHTTPFeatureTableResponder(path));
}
@@ -686,7 +685,7 @@ void fetch_gpu_table(std::string table)
const std::string path = gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS, filename);
- llinfos << "LLFeatureManager fetching " << url << " into " << path << llendl;
+ LL_INFOS() << "LLFeatureManager fetching " << url << " into " << path << LL_ENDL;
LLHTTPClient::get(url, new LLHTTPFeatureTableResponder(path));
}
@@ -723,7 +722,7 @@ void LLFeatureManager::applyRecommendedSettings()
// cap the level at 2 (high)
U32 level = llmax(GPU_CLASS_0, llmin(mGPUClass, GPU_CLASS_5));
- llinfos << "Applying Recommended Features" << llendl;
+ LL_INFOS() << "Applying Recommended Features" << LL_ENDL;
setGraphicsLevel(level, false);
gSavedSettings.setU32("RenderQualityPerformance", level);
@@ -769,7 +768,7 @@ void LLFeatureManager::applyFeatures(bool skipFeatures)
LLControlVariable* ctrl = gSavedSettings.getControl(mIt->first);
if(ctrl == NULL)
{
- llwarns << "AHHH! Control setting " << mIt->first << " does not exist!" << llendl;
+ LL_WARNS() << "AHHH! Control setting " << mIt->first << " does not exist!" << LL_ENDL;
continue;
}
@@ -792,7 +791,7 @@ void LLFeatureManager::applyFeatures(bool skipFeatures)
}
else
{
- llwarns << "AHHH! Control variable is not a numeric type!" << llendl;
+ LL_WARNS() << "AHHH! Control variable is not a numeric type!" << LL_ENDL;
}
}
}
@@ -944,11 +943,11 @@ void LLFeatureManager::applyBaseMasks()
}
}
- //llinfos << "Masking features from gpu table match: " << gpustr << llendl;
+ //LL_INFOS() << "Masking features from gpu table match: " << gpustr << LL_ENDL;
maskFeatures(gpustr);
// now mask cpu type ones
- if (gSysMemory.getPhysicalMemoryClamped() <= 256*1024*1024)
+ if (gSysMemory.getPhysicalMemoryClamped() <= U32Megabytes(256))
{
maskFeatures("RAM256MB");
}
diff --git a/indra/newview/llfilepicker.cpp b/indra/newview/llfilepicker.cpp
index 16eacc9392..4698f2da1a 100755
--- a/indra/newview/llfilepicker.cpp
+++ b/indra/newview/llfilepicker.cpp
@@ -607,7 +607,7 @@ std::vector<std::string>* LLFilePicker::navOpenFilterProc(ELoadFilter filter) //
case FFLOAD_DIRECTORY:
break;
default:
- llwarns << "Unsupported format." << llendl;
+ LL_WARNS() << "Unsupported format." << LL_ENDL;
}
return allowedv;
@@ -909,13 +909,13 @@ void LLFilePicker::add_to_selectedfiles(gpointer data, gpointer user_data)
{
display_name += (char)((*str >= 0x20 && *str <= 0x7E) ? *str : '?');
}
- llwarns << "g_filename_to_utf8 failed on \"" << display_name << "\": " << error->message << llendl;
+ LL_WARNS() << "g_filename_to_utf8 failed on \"" << display_name << "\": " << error->message << LL_ENDL;
}
if (filename_utf8)
{
picker->mFiles.push_back(std::string(filename_utf8));
- lldebugs << "ADDED FILE " << filename_utf8 << llendl;
+ LL_DEBUGS() << "ADDED FILE " << filename_utf8 << LL_ENDL;
g_free(filename_utf8);
}
@@ -927,7 +927,7 @@ void LLFilePicker::chooser_responder(GtkWidget *widget, gint response, gpointer
{
LLFilePicker* picker = (LLFilePicker*)user_data;
- lldebugs << "GTK DIALOG RESPONSE " << response << llendl;
+ LL_DEBUGS() << "GTK DIALOG RESPONSE " << response << LL_ENDL;
if (response == GTK_RESPONSE_ACCEPT)
{
@@ -1018,7 +1018,7 @@ GtkWindow* LLFilePicker::buildFilePicker(bool is_save, bool is_folder, std::stri
}
else
{
- llwarns << "Hmm, couldn't get xwid to use for transient." << llendl;
+ LL_WARNS() << "Hmm, couldn't get xwid to use for transient." << LL_ENDL;
}
# endif //LL_X11
@@ -1366,8 +1366,8 @@ BOOL LLFilePicker::getSaveFile( ESaveFilter filter, const std::string& filename
reset();
- llinfos << "getSaveFile suggested filename is [" << filename
- << "]" << llendl;
+ LL_INFOS() << "getSaveFile suggested filename is [" << filename
+ << "]" << LL_ENDL;
if (!filename.empty())
{
mFiles.push_back(gDirUtilp->getLindenUserDir() + gDirUtilp->getDirDelimiter() + filename);
@@ -1397,7 +1397,7 @@ BOOL LLFilePicker::getOpenFile( ELoadFilter filter, bool blocking )
default: break;
}
mFiles.push_back(filename);
- llinfos << "getOpenFile: Will try to open file: " << filename << llendl;
+ LL_INFOS() << "getOpenFile: Will try to open file: " << filename << LL_ENDL;
return TRUE;
}
diff --git a/indra/newview/llfilepicker.h b/indra/newview/llfilepicker.h
index f0f82c51db..f6a700d1c6 100755
--- a/indra/newview/llfilepicker.h
+++ b/indra/newview/llfilepicker.h
@@ -50,6 +50,7 @@
// Need commdlg.h for OPENFILENAMEA
#ifdef LL_WINDOWS
+#include "llwin32headers.h"
#include <commdlg.h>
#endif
diff --git a/indra/newview/llfirstuse.cpp b/indra/newview/llfirstuse.cpp
index e2850f5181..2e1afc68b4 100755
--- a/indra/newview/llfirstuse.cpp
+++ b/indra/newview/llfirstuse.cpp
@@ -96,6 +96,11 @@ void LLFirstUse::newInventory(bool enable)
// firstUseNotification("FirstInventoryOffer", enable, "HintInventory", LLSD(), LLSD().with("target", "inventory_btn").with("direction", "left"));
}
+// first clean starts at 3 AM
+const S32 SANDBOX_FIRST_CLEAN_HOUR = 3;
+// clean every <n> hours
+const S32 SANDBOX_CLEAN_FREQ = 12;
+
// static
void LLFirstUse::useSandbox()
{
diff --git a/indra/newview/llflexibleobject.cpp b/indra/newview/llflexibleobject.cpp
index 98c0c0bf51..b64034b945 100755
--- a/indra/newview/llflexibleobject.cpp
+++ b/indra/newview/llflexibleobject.cpp
@@ -47,8 +47,8 @@
std::vector<LLVolumeImplFlexible*> LLVolumeImplFlexible::sInstanceList;
std::vector<S32> LLVolumeImplFlexible::sUpdateDelay;
-static LLFastTimer::DeclareTimer FTM_FLEXIBLE_REBUILD("Rebuild");
-static LLFastTimer::DeclareTimer FTM_DO_FLEXIBLE_UPDATE("Flexible Update");
+static LLTrace::BlockTimerStatHandle FTM_FLEXIBLE_REBUILD("Rebuild");
+static LLTrace::BlockTimerStatHandle FTM_DO_FLEXIBLE_UPDATE("Flexible Update");
// LLFlexibleObjectData::pack/unpack now in llprimitive.cpp
@@ -334,14 +334,14 @@ void LLVolumeImplFlexible::updateRenderRes()
// updated every time step. In the future, perhaps there could be an
// optimization similar to what Havok does for objects that are stationary.
//---------------------------------------------------------------------------------
-static LLFastTimer::DeclareTimer FTM_FLEXIBLE_UPDATE("Update Flexies");
+static LLTrace::BlockTimerStatHandle FTM_FLEXIBLE_UPDATE("Update Flexies");
void LLVolumeImplFlexible::doIdleUpdate()
{
LLDrawable* drawablep = mVO->mDrawable;
if (drawablep)
{
- //LLFastTimer ftm(FTM_FLEXIBLE_UPDATE);
+ //LL_RECORD_BLOCK_TIME(FTM_FLEXIBLE_UPDATE);
//ensure drawable is active
drawablep->makeActive();
@@ -424,7 +424,7 @@ inline S32 log2(S32 x)
void LLVolumeImplFlexible::doFlexibleUpdate()
{
- LLFastTimer ftm(FTM_DO_FLEXIBLE_UPDATE);
+ LL_RECORD_BLOCK_TIME(FTM_DO_FLEXIBLE_UPDATE);
LLVolume* volume = mVO->getVolume();
LLPath *path = &volume->getPath();
if ((mSimulateRes == 0 || !mInitialized) && mVO->mDrawable->isVisible())
@@ -660,7 +660,7 @@ void LLVolumeImplFlexible::doFlexibleUpdate()
mSection[i].mdPosition = (mSection[i].mPosition - mSection[i-1].mPosition) * inv_section_length;
// Create points
- llassert(mRenderRes > -1)
+ llassert(mRenderRes > -1);
S32 num_render_sections = 1<<mRenderRes;
if (path->getPathLength() != num_render_sections+1)
{
@@ -715,20 +715,24 @@ void LLVolumeImplFlexible::doFlexibleUpdate()
mLastSegmentRotation = parentSegmentRotation;
}
-static LLFastTimer::DeclareTimer FTM_FLEXI_PREBUILD("Flexi Prebuild");
+static LLTrace::BlockTimerStatHandle FTM_FLEXI_PREBUILD("Flexi Prebuild");
void LLVolumeImplFlexible::preRebuild()
{
if (!mUpdated)
{
- LLFastTimer t(FTM_FLEXI_PREBUILD);
- doFlexibleRebuild();
+ LL_RECORD_BLOCK_TIME(FTM_FLEXI_PREBUILD);
+ doFlexibleRebuild(false);
}
}
-void LLVolumeImplFlexible::doFlexibleRebuild()
+void LLVolumeImplFlexible::doFlexibleRebuild(bool rebuild_volume)
{
LLVolume* volume = mVO->getVolume();
+ if(rebuild_volume)
+ {
+ volume->setDirty();
+ }
volume->regen();
mUpdated = TRUE;
@@ -780,7 +784,7 @@ BOOL LLVolumeImplFlexible::doUpdateGeometry(LLDrawable *drawable)
if (mRenderRes > -1)
{
- LLFastTimer t(FTM_DO_FLEXIBLE_UPDATE);
+ LL_RECORD_BLOCK_TIME(FTM_DO_FLEXIBLE_UPDATE);
doFlexibleUpdate();
}
@@ -800,8 +804,8 @@ BOOL LLVolumeImplFlexible::doUpdateGeometry(LLDrawable *drawable)
volume->mDrawable->setState(LLDrawable::REBUILD_VOLUME);
volume->dirtySpatialGroup();
{
- LLFastTimer t(FTM_FLEXIBLE_REBUILD);
- doFlexibleRebuild();
+ LL_RECORD_BLOCK_TIME(FTM_FLEXIBLE_REBUILD);
+ doFlexibleRebuild(volume->mVolumeChanged);
}
volume->genBBoxes(isVolumeGlobal());
}
diff --git a/indra/newview/llflexibleobject.h b/indra/newview/llflexibleobject.h
index beb281a906..a00551df8e 100755
--- a/indra/newview/llflexibleobject.h
+++ b/indra/newview/llflexibleobject.h
@@ -100,7 +100,7 @@ private:
const LLMatrix4& getWorldMatrix(LLXformMatrix* xform) const;
void updateRelativeXform(bool force_identity);
void doFlexibleUpdate(); // Called to update the simulation
- void doFlexibleRebuild(); // Called to rebuild the geometry
+ void doFlexibleRebuild(bool rebuild_volume); // Called to rebuild the geometry
void preRebuild();
//void setAttributes( LLFlexibleObjectData );
diff --git a/indra/newview/llfloaterabout.cpp b/indra/newview/llfloaterabout.cpp
index 4331a63346..efaba1d7a4 100755
--- a/indra/newview/llfloaterabout.cpp
+++ b/indra/newview/llfloaterabout.cpp
@@ -35,7 +35,6 @@
#include "llagent.h"
#include "llagentui.h"
#include "llappviewer.h"
-#include "llsecondlifeurls.h"
#include "llslurl.h"
#include "llvoiceclient.h"
#include "lluictrlfactory.h"
@@ -306,9 +305,9 @@ void LLServerReleaseNotesURLFetcher::startFetch()
// virtual
void LLServerReleaseNotesURLFetcher::completedHeader(U32 status, const std::string& reason, const LLSD& content)
{
- lldebugs << "Status: " << status << llendl;
- lldebugs << "Reason: " << reason << llendl;
- lldebugs << "Headers: " << content << llendl;
+ LL_DEBUGS() << "Status: " << status << LL_ENDL;
+ LL_DEBUGS() << "Reason: " << reason << LL_ENDL;
+ LL_DEBUGS() << "Headers: " << content << LL_ENDL;
LLFloaterAbout* floater_about = LLFloaterReg::getTypedInstance<LLFloaterAbout>("sl_about");
if (floater_about)
diff --git a/indra/newview/llfloaterauction.cpp b/indra/newview/llfloaterauction.cpp
index 3c40e2d4bc..51b59a7a74 100755
--- a/indra/newview/llfloaterauction.cpp
+++ b/indra/newview/llfloaterauction.cpp
@@ -194,7 +194,7 @@ void LLFloaterAuction::onClickSnapshot(void* data)
{
gViewerWindow->playSnapshotAnimAndSound();
}
- llinfos << "Writing TGA..." << llendl;
+ LL_INFOS() << "Writing TGA..." << LL_ENDL;
LLPointer<LLImageTGA> tga = new LLImageTGA;
tga->encode(raw);
@@ -202,7 +202,7 @@ void LLFloaterAuction::onClickSnapshot(void* data)
raw->biasedScaleToPowerOfTwo(LLViewerTexture::MAX_IMAGE_SIZE_DEFAULT);
- llinfos << "Writing J2C..." << llendl;
+ LL_INFOS() << "Writing J2C..." << LL_ENDL;
LLPointer<LLImageJ2C> j2c = new LLImageJ2C;
j2c->encode(raw, 0.0f);
@@ -214,7 +214,7 @@ void LLFloaterAuction::onClickSnapshot(void* data)
}
else
{
- llwarns << "Unable to take snapshot" << llendl;
+ LL_WARNS() << "Unable to take snapshot" << LL_ENDL;
}
}
@@ -359,8 +359,8 @@ void LLFloaterAuction::doResetParcel()
body["user_look_at"] = ll_sd_from_vector3( LLVector3::zero );
body["landing_type"] = (U8) LLParcel::L_DIRECT;
- llinfos << "Sending parcel update to reset for auction via capability to: "
- << mParcelUpdateCapUrl << llendl;
+ LL_INFOS() << "Sending parcel update to reset for auction via capability to: "
+ << mParcelUpdateCapUrl << LL_ENDL;
LLHTTPClient::post(mParcelUpdateCapUrl, body, new LLHTTPClient::Responder());
// Send a message to clear the object return time
@@ -509,8 +509,8 @@ void LLFloaterAuction::doSellToAnyone()
body["sale_price"] = parcelp->getArea(); // Sell for L$1 per square meter
body["auth_buyer_id"] = LLUUID::null; // To anyone
- llinfos << "Sending parcel update to sell to anyone for L$1 via capability to: "
- << mParcelUpdateCapUrl << llendl;
+ LL_INFOS() << "Sending parcel update to sell to anyone for L$1 via capability to: "
+ << mParcelUpdateCapUrl << LL_ENDL;
LLHTTPClient::post(mParcelUpdateCapUrl, body, new LLHTTPClient::Responder());
// clean up floater, and get out
@@ -526,8 +526,8 @@ void LLFloaterAuction::doSellToAnyone()
void auction_tga_upload_done(const LLUUID& asset_id, void* user_data, S32 status, LLExtStat ext_status) // StoreAssetData callback (fixed)
{
std::string* name = (std::string*)(user_data);
- llinfos << "Upload of asset '" << *name << "' " << asset_id
- << " returned " << status << llendl;
+ LL_INFOS() << "Upload of asset '" << *name << "' " << asset_id
+ << " returned " << status << LL_ENDL;
delete name;
gViewerWindow->getWindow()->decBusyCount();
@@ -547,8 +547,8 @@ void auction_tga_upload_done(const LLUUID& asset_id, void* user_data, S32 status
void auction_j2c_upload_done(const LLUUID& asset_id, void* user_data, S32 status, LLExtStat ext_status) // StoreAssetData callback (fixed)
{
std::string* name = (std::string*)(user_data);
- llinfos << "Upload of asset '" << *name << "' " << asset_id
- << " returned " << status << llendl;
+ LL_INFOS() << "Upload of asset '" << *name << "' " << asset_id
+ << " returned " << status << LL_ENDL;
delete name;
gViewerWindow->getWindow()->decBusyCount();
diff --git a/indra/newview/llfloateravatarpicker.cpp b/indra/newview/llfloateravatarpicker.cpp
index c0afb72cff..c1e6673406 100755
--- a/indra/newview/llfloateravatarpicker.cpp
+++ b/indra/newview/llfloateravatarpicker.cpp
@@ -70,7 +70,7 @@ LLFloaterAvatarPicker* LLFloaterAvatarPicker::show(select_callback_t callback,
LLFloaterReg::showTypedInstance<LLFloaterAvatarPicker>("avatar_picker", LLSD(name));
if (!floater)
{
- llwarns << "Cannot instantiate avatar picker" << llendl;
+ LL_WARNS() << "Cannot instantiate avatar picker" << LL_ENDL;
return NULL;
}
@@ -405,11 +405,11 @@ void LLFloaterAvatarPicker::drawFrustum()
if (gFocusMgr.childHasMouseCapture(getDragHandle()))
{
- mContextConeOpacity = lerp(mContextConeOpacity, gSavedSettings.getF32("PickerContextOpacity"), LLCriticalDamp::getInterpolant(mContextConeFadeTime));
+ mContextConeOpacity = lerp(mContextConeOpacity, gSavedSettings.getF32("PickerContextOpacity"), LLSmoothInterpolation::getInterpolant(mContextConeFadeTime));
}
else
{
- mContextConeOpacity = lerp(mContextConeOpacity, 0.f, LLCriticalDamp::getInterpolant(mContextConeFadeTime));
+ mContextConeOpacity = lerp(mContextConeOpacity, 0.f, LLSmoothInterpolation::getInterpolant(mContextConeFadeTime));
}
}
}
@@ -468,7 +468,7 @@ public:
{
//std::ostringstream ss;
//LLSDSerialize::toPrettyXML(content, ss);
- //llinfos << ss.str() << llendl;
+ //LL_INFOS() << ss.str() << LL_ENDL;
// in case of invalid characters, the avatar picker returns a 400
// just set it to process so it displays 'not found'
@@ -483,7 +483,7 @@ public:
}
else
{
- llwarns << "avatar picker failed [status:" << status << "]: " << content << llendl;
+ LL_WARNS() << "avatar picker failed [status:" << status << "]: " << content << LL_ENDL;
}
}
@@ -515,7 +515,7 @@ void LLFloaterAvatarPicker::find()
url += "?page_size=100&names=";
std::replace(text.begin(), text.end(), '.', ' ');
url += LLURI::escape(text);
- llinfos << "avatar picker " << url << llendl;
+ LL_INFOS() << "avatar picker " << url << LL_ENDL;
LLHTTPClient::get(url, new LLAvatarPickerResponder(mQueryID, getKey().asString()));
}
else
@@ -736,7 +736,7 @@ void LLFloaterAvatarPicker::processResponse(const LLUUID& query_id, const LLSD&
if (search_results->isEmpty())
{
LLStringUtil::format_map_t map;
- map["[TEXT]"] = childGetText("Edit");
+ map["[TEXT]"] = getChild<LLUICtrl>("Edit")->getValue().asString();
LLSD item;
item["id"] = LLUUID::null;
item["columns"][0]["column"] = "name";
diff --git a/indra/newview/llfloateravatartextures.cpp b/indra/newview/llfloateravatartextures.cpp
index 048837acfe..78807a8e99 100755
--- a/indra/newview/llfloateravatartextures.cpp
+++ b/indra/newview/llfloateravatartextures.cpp
@@ -37,6 +37,7 @@
#include "lluictrlfactory.h"
#include "llviewerobjectlist.h"
#include "llvoavatarself.h"
+#include "lllocaltextureobject.h"
using namespace LLAvatarAppearanceDefines;
@@ -186,16 +187,16 @@ void LLFloaterAvatarTextures::onClickDump(void* data)
}
if (id != IMG_DEFAULT_AVATAR)
{
- llinfos << "TE " << i << " name:" << tex_entry->mName << " id:" << id << llendl;
+ LL_INFOS() << "TE " << i << " name:" << tex_entry->mName << " id:" << id << LL_ENDL;
}
else
{
- llinfos << "TE " << i << " name:" << tex_entry->mName << " id:" << "<DEFAULT>" << llendl;
+ LL_INFOS() << "TE " << i << " name:" << tex_entry->mName << " id:" << "<DEFAULT>" << LL_ENDL;
}
}
else
{
- llinfos << "TE " << i << " name:" << tex_entry->mName << " id:" << te->getID() << llendl;
+ LL_INFOS() << "TE " << i << " name:" << tex_entry->mName << " id:" << te->getID() << LL_ENDL;
}
}
}
diff --git a/indra/newview/llfloaterbulkpermission.cpp b/indra/newview/llfloaterbulkpermission.cpp
index 07bd262c00..f2040bc760 100755
--- a/indra/newview/llfloaterbulkpermission.cpp
+++ b/indra/newview/llfloaterbulkpermission.cpp
@@ -36,7 +36,6 @@
#include "llviewerobject.h"
#include "llviewerobjectlist.h"
#include "llviewerregion.h"
-#include "lscript_rt_interface.h"
#include "llviewercontrol.h"
#include "llviewerinventory.h"
#include "llviewerobject.h"
@@ -96,17 +95,17 @@ void LLFloaterBulkPermission::doApply()
class ModifiableGatherer : public LLSelectedNodeFunctor
{
public:
- ModifiableGatherer(LLDynamicArray<LLUUID>& q) : mQueue(q) {}
+ ModifiableGatherer(std::vector<LLUUID>& q) : mQueue(q) { mQueue.reserve(32); }
virtual bool apply(LLSelectNode* node)
{
if( node->allowOperationOnNode(PERM_MODIFY, GP_OBJECT_MANIPULATE) )
{
- mQueue.put(node->getObject()->getID());
+ mQueue.push_back(node->getObject()->getID());
}
return true;
}
private:
- LLDynamicArray<LLUUID>& mQueue;
+ std::vector<LLUUID>& mQueue;
};
LLScrollListCtrl* list = getChild<LLScrollListCtrl>("queue output");
list->deleteAllItems();
@@ -121,7 +120,7 @@ void LLFloaterBulkPermission::doApply()
mDone = FALSE;
if (!start())
{
- llwarns << "Unexpected bulk permission change failure." << llendl;
+ LL_WARNS() << "Unexpected bulk permission change failure." << LL_ENDL;
}
}
}
@@ -135,7 +134,7 @@ void LLFloaterBulkPermission::inventoryChanged(LLViewerObject* viewer_object,
S32,
void* q_id)
{
- //llinfos << "changed object: " << viewer_object->getID() << llendl;
+ //LL_INFOS() << "changed object: " << viewer_object->getID() << LL_ENDL;
//Remove this listener from the object since its
//listener callback is now being executed.
@@ -160,7 +159,7 @@ void LLFloaterBulkPermission::inventoryChanged(LLViewerObject* viewer_object,
// something went wrong...
// note that we're not working on this one, and move onto the
// next object in the list.
- llwarns << "No inventory for " << mCurrentObjectID << llendl;
+ LL_WARNS() << "No inventory for " << mCurrentObjectID << LL_ENDL;
nextObject();
}
}
@@ -210,7 +209,7 @@ void LLFloaterBulkPermission::onCommitCopy()
BOOL LLFloaterBulkPermission::start()
{
- // note: number of top-level objects to modify is mObjectIDs.count().
+ // note: number of top-level objects to modify is mObjectIDs.size().
getChild<LLScrollListCtrl>("queue output")->setCommentText(getString("start_text"));
return nextObject();
}
@@ -222,15 +221,15 @@ BOOL LLFloaterBulkPermission::nextObject()
BOOL successful_start = FALSE;
do
{
- count = mObjectIDs.count();
- //llinfos << "Objects left to process = " << count << llendl;
+ count = mObjectIDs.size();
+ //LL_INFOS() << "Objects left to process = " << count << LL_ENDL;
mCurrentObjectID.setNull();
if(count > 0)
{
successful_start = popNext();
- //llinfos << (successful_start ? "successful" : "unsuccessful") << llendl;
+ //LL_INFOS() << (successful_start ? "successful" : "unsuccessful") << LL_ENDL;
}
- } while((mObjectIDs.count() > 0) && !successful_start);
+ } while((mObjectIDs.size() > 0) && !successful_start);
if(isDone() && !mDone)
{
@@ -246,16 +245,16 @@ BOOL LLFloaterBulkPermission::popNext()
{
// get the head element from the container, and attempt to get its inventory.
BOOL rv = FALSE;
- S32 count = mObjectIDs.count();
+ S32 count = mObjectIDs.size();
if(mCurrentObjectID.isNull() && (count > 0))
{
- mCurrentObjectID = mObjectIDs.get(0);
- //llinfos << "mCurrentID: " << mCurrentObjectID << llendl;
- mObjectIDs.remove(0);
+ mCurrentObjectID = mObjectIDs.at(0);
+ //LL_INFOS() << "mCurrentID: " << mCurrentObjectID << LL_ENDL;
+ mObjectIDs.erase(mObjectIDs.begin());
LLViewerObject* obj = gObjectList.findObject(mCurrentObjectID);
if(obj)
{
- //llinfos << "requesting inv for " << mCurrentObjectID << llendl;
+ //LL_INFOS() << "requesting inv for " << mCurrentObjectID << LL_ENDL;
LLUUID* id = new LLUUID(mID);
registerVOInventoryListener(obj,id);
requestVOInventory();
@@ -263,7 +262,7 @@ BOOL LLFloaterBulkPermission::popNext()
}
else
{
- llinfos<<"NULL LLViewerObject" <<llendl;
+ LL_INFOS()<<"NULL LLViewerObject" <<LL_ENDL;
}
}
diff --git a/indra/newview/llfloaterbulkpermission.h b/indra/newview/llfloaterbulkpermission.h
index 25e76eca65..0c042c3ee3 100755
--- a/indra/newview/llfloaterbulkpermission.h
+++ b/indra/newview/llfloaterbulkpermission.h
@@ -28,11 +28,9 @@
#ifndef LL_LLBULKPERMISSION_H
#define LL_LLBULKPERMISSION_H
-#include "lldarray.h"
#include "llinventory.h"
#include "llviewerobject.h"
#include "llvoinventorylistener.h"
-#include "llmap.h"
#include "lluuid.h"
#include "llfloater.h"
@@ -79,7 +77,7 @@ private:
void onUncheckAll() { doCheckUncheckAll(FALSE); }
// returns true if this is done
- BOOL isDone() const { return (mCurrentObjectID.isNull() || (mObjectIDs.count() == 0)); }
+ BOOL isDone() const { return (mCurrentObjectID.isNull() || (mObjectIDs.size() == 0)); }
//Read the settings and Apply the permissions
void doApply();
@@ -91,7 +89,7 @@ private:
LLButton* mCloseBtn;
// Object Queue
- LLDynamicArray<LLUUID> mObjectIDs;
+ std::vector<LLUUID> mObjectIDs;
LLUUID mCurrentObjectID;
BOOL mDone;
diff --git a/indra/newview/llfloaterbump.cpp b/indra/newview/llfloaterbump.cpp
index eeb81085bb..ad44c509d9 100755
--- a/indra/newview/llfloaterbump.cpp
+++ b/indra/newview/llfloaterbump.cpp
@@ -110,8 +110,8 @@ void LLFloaterBump::add(LLScrollListCtrl* list, LLMeanCollisionData* mcd)
action = "physical_object_collide";
break;
default:
- llinfos << "LLFloaterBump::add unknown mean collision type "
- << mcd->mType << llendl;
+ LL_INFOS() << "LLFloaterBump::add unknown mean collision type "
+ << mcd->mType << LL_ENDL;
return;
}
diff --git a/indra/newview/llfloaterbuy.cpp b/indra/newview/llfloaterbuy.cpp
index 087b0007e1..5a9cdbba44 100755
--- a/indra/newview/llfloaterbuy.cpp
+++ b/indra/newview/llfloaterbuy.cpp
@@ -194,14 +194,14 @@ void LLFloaterBuy::inventoryChanged(LLViewerObject* obj,
{
if (!obj)
{
- llwarns << "No object in LLFloaterBuy::inventoryChanged" << llendl;
+ LL_WARNS() << "No object in LLFloaterBuy::inventoryChanged" << LL_ENDL;
return;
}
if (!inv)
{
- llwarns << "No inventory in LLFloaterBuy::inventoryChanged"
- << llendl;
+ LL_WARNS() << "No inventory in LLFloaterBuy::inventoryChanged"
+ << LL_ENDL;
removeVOInventoryListener();
return;
}
diff --git a/indra/newview/llfloaterbuycontents.cpp b/indra/newview/llfloaterbuycontents.cpp
index aa6ace2a61..b32ac860aa 100755
--- a/indra/newview/llfloaterbuycontents.cpp
+++ b/indra/newview/llfloaterbuycontents.cpp
@@ -145,7 +145,7 @@ void LLFloaterBuyContents::inventoryChanged(LLViewerObject* obj,
{
if (!obj)
{
- llwarns << "No object in LLFloaterBuyContents::inventoryChanged" << llendl;
+ LL_WARNS() << "No object in LLFloaterBuyContents::inventoryChanged" << LL_ENDL;
return;
}
@@ -160,8 +160,8 @@ void LLFloaterBuyContents::inventoryChanged(LLViewerObject* obj,
if (!inv)
{
- llwarns << "No inventory in LLFloaterBuyContents::inventoryChanged"
- << llendl;
+ LL_WARNS() << "No inventory in LLFloaterBuyContents::inventoryChanged"
+ << LL_ENDL;
return;
}
diff --git a/indra/newview/llfloaterbuycurrencyhtml.cpp b/indra/newview/llfloaterbuycurrencyhtml.cpp
index 013cf74c7b..0c408f556d 100755
--- a/indra/newview/llfloaterbuycurrencyhtml.cpp
+++ b/indra/newview/llfloaterbuycurrencyhtml.cpp
@@ -82,7 +82,7 @@ void LLFloaterBuyCurrencyHTML::navigateToFinalURL()
LLStringUtil::format( buy_currency_url, replace );
// write final URL to debug console
- llinfos << "Buy currency HTML parsed URL is " << buy_currency_url << llendl;
+ LL_INFOS() << "Buy currency HTML parsed URL is " << buy_currency_url << LL_ENDL;
// kick off the navigation
mBrowser->navigateTo( buy_currency_url, "text/html" );
diff --git a/indra/newview/llfloaterbuyland.cpp b/indra/newview/llfloaterbuyland.cpp
index 42857b2aa2..060c091737 100755
--- a/indra/newview/llfloaterbuyland.cpp
+++ b/indra/newview/llfloaterbuyland.cpp
@@ -202,7 +202,7 @@ public:
virtual void draw();
virtual BOOL canClose();
- void onVisibilityChange ( const LLSD& new_visibility );
+ void onVisibilityChanged ( const LLSD& new_visibility );
};
@@ -877,7 +877,7 @@ void LLFloaterBuyLandUI::startTransaction(TransactionType type, const LLXMLRPCVa
method = "buyLandPrep";
break;
default:
- llwarns << "LLFloaterBuyLandUI: Unknown transaction type!" << llendl;
+ LL_WARNS() << "LLFloaterBuyLandUI: Unknown transaction type!" << LL_ENDL;
return;
}
@@ -934,7 +934,7 @@ void LLFloaterBuyLandUI::tellUserError(
// virtual
BOOL LLFloaterBuyLandUI::postBuild()
{
- setVisibleCallback(boost::bind(&LLFloaterBuyLandUI::onVisibilityChange, this, _2));
+ setVisibleCallback(boost::bind(&LLFloaterBuyLandUI::onVisibilityChanged, this, _2));
mCurrency.prepare();
@@ -1008,7 +1008,7 @@ BOOL LLFloaterBuyLandUI::canClose()
return can_close;
}
-void LLFloaterBuyLandUI::onVisibilityChange ( const LLSD& new_visibility )
+void LLFloaterBuyLandUI::onVisibilityChanged ( const LLSD& new_visibility )
{
if (new_visibility.asBoolean())
{
diff --git a/indra/newview/llfloaterbvhpreview.cpp b/indra/newview/llfloaterbvhpreview.cpp
index f2deb6a805..a22f5770bf 100755
--- a/indra/newview/llfloaterbvhpreview.cpp
+++ b/indra/newview/llfloaterbvhpreview.cpp
@@ -228,7 +228,7 @@ BOOL LLFloaterBvhPreview::postBuild()
if (!infile.getFileHandle())
{
- llwarns << "Can't open BVH file:" << mFilename << llendl;
+ LL_WARNS() << "Can't open BVH file:" << mFilename << LL_ENDL;
}
else
{
@@ -239,7 +239,7 @@ BOOL LLFloaterBvhPreview::postBuild()
if (file_size == infile.read(file_buffer, file_size))
{
file_buffer[file_size] = '\0';
- llinfos << "Loading BVH file " << mFilename << llendl;
+ LL_INFOS() << "Loading BVH file " << mFilename << LL_ENDL;
ELoadStatus load_status = E_ST_OK;
S32 line_number = 0;
loaderp = new LLBVHLoader(file_buffer, load_status, line_number);
@@ -247,11 +247,11 @@ BOOL LLFloaterBvhPreview::postBuild()
if(load_status == E_ST_NO_XLT_FILE)
{
- llwarns << "NOTE: No translation table found." << llendl;
+ LL_WARNS() << "NOTE: No translation table found." << LL_ENDL;
}
else
{
- llwarns << "ERROR: [line: " << line_number << "] " << status << llendl;
+ LL_WARNS() << "ERROR: [line: " << line_number << "] " << status << LL_ENDL;
}
}
@@ -1009,7 +1009,7 @@ void LLFloaterBvhPreview::onBtnOK(void* userdata)
}
else
{
- llwarns << "Failure writing animation data." << llendl;
+ LL_WARNS() << "Failure writing animation data." << LL_ENDL;
LLNotificationsUtil::add("WriteAnimationFail");
}
}
diff --git a/indra/newview/llfloatercolorpicker.cpp b/indra/newview/llfloatercolorpicker.cpp
index a03425649f..9425f5645e 100755
--- a/indra/newview/llfloatercolorpicker.cpp
+++ b/indra/newview/llfloatercolorpicker.cpp
@@ -162,12 +162,7 @@ void LLFloaterColorPicker::createUI ()
// create palette
for ( S32 each = 0; each < numPaletteColumns * numPaletteRows; ++each )
{
- std::ostringstream codec;
- codec << "ColorPaletteEntry" << std::setfill ( '0' ) << std::setw ( 2 ) << each + 1;
-
- // argh!
- const std::string s ( codec.str () );
- mPalette.push_back ( new LLColor4 ( LLUIColorTable::instance().getColor ( s ) ) );
+ mPalette.push_back(new LLColor4(LLUIColorTable::instance().getColor(llformat("ColorPaletteEntry%02d", each + 1))));
}
}
@@ -529,11 +524,11 @@ void LLFloaterColorPicker::draw()
if (gFocusMgr.childHasMouseCapture(getDragHandle()))
{
mContextConeOpacity = lerp(mContextConeOpacity, gSavedSettings.getF32("PickerContextOpacity"),
- LLCriticalDamp::getInterpolant(mContextConeFadeTime));
+ LLSmoothInterpolation::getInterpolant(mContextConeFadeTime));
}
else
{
- mContextConeOpacity = lerp(mContextConeOpacity, 0.f, LLCriticalDamp::getInterpolant(mContextConeFadeTime));
+ mContextConeOpacity = lerp(mContextConeOpacity, 0.f, LLSmoothInterpolation::getInterpolant(mContextConeFadeTime));
}
mPipetteBtn->setToggleState(LLToolMgr::getInstance()->getCurrentTool() == LLToolPipette::getInstance());
diff --git a/indra/newview/llfloatercolorpicker.h b/indra/newview/llfloatercolorpicker.h
index bab0617712..d4d22b643a 100755
--- a/indra/newview/llfloatercolorpicker.h
+++ b/indra/newview/llfloatercolorpicker.h
@@ -33,7 +33,6 @@
#include "llpointer.h"
#include "llcolorswatch.h"
#include "llspinctrl.h"
-#include "lltextureentry.h"
class LLButton;
class LLLineEditor;
@@ -121,7 +120,7 @@ class LLFloaterColorPicker
void onClickPipette ( );
static void onTextCommit ( LLUICtrl* ctrl, void* data );
static void onImmediateCheck ( LLUICtrl* ctrl, void* data );
- void onColorSelect( const LLTextureEntry& te );
+ void onColorSelect( const class LLTextureEntry& te );
private:
// draws color selection palette
void drawPalette ();
@@ -171,7 +170,7 @@ class LLFloaterColorPicker
const S32 mPaletteRegionHeight;
// image used to compose color grid
- LLPointer<LLViewerTexture> mRGBImage;
+ LLPointer<class LLViewerTexture> mRGBImage;
// current swatch in use
LLColorSwatchCtrl* mSwatch;
diff --git a/indra/newview/llfloaterdeleteenvpreset.cpp b/indra/newview/llfloaterdeleteenvpreset.cpp
index d08aa81cfe..bb11c813b4 100755
--- a/indra/newview/llfloaterdeleteenvpreset.cpp
+++ b/indra/newview/llfloaterdeleteenvpreset.cpp
@@ -144,7 +144,7 @@ void LLFloaterDeleteEnvPreset::onBtnDelete()
}
else
{
- llwarns << "Unrecognized key" << llendl;
+ LL_WARNS() << "Unrecognized key" << LL_ENDL;
}
LLSD args;
@@ -176,7 +176,7 @@ void LLFloaterDeleteEnvPreset::populatePresetsList()
}
else
{
- llwarns << "Unrecognized key" << llendl;
+ LL_WARNS() << "Unrecognized key" << LL_ENDL;
}
}
diff --git a/indra/newview/llfloaterdisplayname.cpp b/indra/newview/llfloaterdisplayname.cpp
index e2cef5630b..596e8c0dbe 100755
--- a/indra/newview/llfloaterdisplayname.cpp
+++ b/indra/newview/llfloaterdisplayname.cpp
@@ -127,7 +127,7 @@ void LLFloaterDisplayName::onCacheSetName(bool success,
// Request failed, notify the user
std::string error_tag = content["error_tag"].asString();
- llinfos << "set name failure error_tag " << error_tag << llendl;
+ LL_INFOS() << "set name failure error_tag " << error_tag << LL_ENDL;
// We might have a localized string for this message
// error_args will usually be empty from the server.
diff --git a/indra/newview/llfloatereditdaycycle.cpp b/indra/newview/llfloatereditdaycycle.cpp
index 78e20e3bf0..5c0991b0b3 100755
--- a/indra/newview/llfloatereditdaycycle.cpp
+++ b/indra/newview/llfloatereditdaycycle.cpp
@@ -172,7 +172,7 @@ void LLFloaterEditDayCycle::loadTrack()
// add sliders
- lldebugs << "Adding " << LLWLParamManager::getInstance()->mDay.mTimeMap.size() << " keys to slider" << llendl;
+ LL_DEBUGS() << "Adding " << LLWLParamManager::getInstance()->mDay.mTimeMap.size() << " keys to slider" << LL_ENDL;
LLWLDayCycle& cur_dayp = LLWLParamManager::instance().mDay;
for (std::map<F32, LLWLParamKey>::iterator it = cur_dayp.mTimeMap.begin(); it != cur_dayp.mTimeMap.end(); ++it)
@@ -192,12 +192,12 @@ void LLFloaterEditDayCycle::loadTrack()
void LLFloaterEditDayCycle::applyTrack()
{
- lldebugs << "Applying track (" << mSliderToKey.size() << ")" << llendl;
+ LL_DEBUGS() << "Applying track (" << mSliderToKey.size() << ")" << LL_ENDL;
// if no keys, do nothing
if (mSliderToKey.size() == 0)
{
- lldebugs << "No keys, not syncing" << llendl;
+ LL_DEBUGS() << "No keys, not syncing" << LL_ENDL;
return;
}
@@ -342,7 +342,7 @@ void LLFloaterEditDayCycle::onKeyTimeMoved()
// check to see if a key exists
LLWLParamKey key = mSliderToKey[cur_sldr].keyframe;
- lldebugs << "Setting key time: " << time24 << LL_ENDL;
+ LL_DEBUGS() << "Setting key time: " << time24 << LL_ENDL;
mSliderToKey[cur_sldr].time = time24;
// if it exists, turn on check box
@@ -368,7 +368,7 @@ void LLFloaterEditDayCycle::onKeyTimeChanged()
F32 time = mKeysSlider->getCurSliderValue() / sHoursPerDay;
// now set the key's time in the sliderToKey map
- lldebugs << "Setting key time: " << time << LL_ENDL;
+ LL_DEBUGS() << "Setting key time: " << time << LL_ENDL;
mSliderToKey[cur_sldr].time = time;
applyTrack();
@@ -564,7 +564,7 @@ void LLFloaterEditDayCycle::saveRegionDayCycle()
#else // Temporary disabled ability to upload new region settings from the Day Cycle Editor.
if (!LLEnvManagerNew::instance().sendRegionSettings(new_region_settings))
{
- llwarns << "Error applying region environment settings" << llendl;
+ LL_WARNS() << "Error applying region environment settings" << LL_ENDL;
return;
}
@@ -637,7 +637,7 @@ void LLFloaterEditDayCycle::onRegionSettingsChange()
// Change preference if requested.
if (mMakeDefaultCheckBox->getValue())
{
- LL_DEBUGS("Windlight") << "Changed environment preference to region settings" << llendl;
+ LL_DEBUGS("Windlight") << "Changed environment preference to region settings" << LL_ENDL;
LLEnvManagerNew::instance().setUseRegionSettings(true);
}
@@ -699,7 +699,7 @@ void LLFloaterEditDayCycle::onDayCycleSelected()
{
if (!LLDayCycleManager::instance().getPreset(dc_key.name, day_data))
{
- llwarns << "No day cycle named " << dc_key.name << llendl;
+ LL_WARNS() << "No day cycle named " << dc_key.name << LL_ENDL;
return;
}
}
@@ -708,7 +708,7 @@ void LLFloaterEditDayCycle::onDayCycleSelected()
day_data = LLEnvManagerNew::instance().getRegionSettings().getWLDayCycle();
if (day_data.size() == 0)
{
- llwarns << "Empty region day cycle" << llendl;
+ LL_WARNS() << "Empty region day cycle" << LL_ENDL;
llassert(day_data.size() > 0);
return;
}
@@ -742,7 +742,7 @@ void LLFloaterEditDayCycle::onBtnSave()
if (name.empty())
{
// *TODO: show an alert
- llwarns << "Empty day cycle name" << llendl;
+ LL_WARNS() << "Empty day cycle name" << LL_ENDL;
return;
}
@@ -795,7 +795,7 @@ void LLFloaterEditDayCycle::onSaveConfirmed()
// Change preference if requested.
if (mMakeDefaultCheckBox->getValue())
{
- LL_DEBUGS("Windlight") << name << " is now the new preferred day cycle" << llendl;
+ LL_DEBUGS("Windlight") << name << " is now the new preferred day cycle" << LL_ENDL;
LLEnvManagerNew::instance().setUseDayCycle(name);
}
diff --git a/indra/newview/llfloatereditsky.cpp b/indra/newview/llfloatereditsky.cpp
index 352361ce9e..d809211ea7 100755
--- a/indra/newview/llfloatereditsky.cpp
+++ b/indra/newview/llfloatereditsky.cpp
@@ -721,7 +721,7 @@ void LLFloaterEditSky::saveRegionSky()
LLWLParamKey key(getSelectedSkyPreset());
llassert(key.scope == LLEnvKey::SCOPE_REGION);
- LL_DEBUGS("Windlight") << "Saving region sky preset: " << key.name << llendl;
+ LL_DEBUGS("Windlight") << "Saving region sky preset: " << key.name << LL_ENDL;
LLWLParamManager& wl_mgr = LLWLParamManager::instance();
wl_mgr.mCurParams.mName = key.name;
wl_mgr.setParamSet(key, wl_mgr.mCurParams);
@@ -819,7 +819,7 @@ void LLFloaterEditSky::onSaveConfirmed()
// Change preference if requested.
if (mMakeDefaultCheckBox->getValue())
{
- LL_DEBUGS("Windlight") << key.name << " is now the new preferred sky preset" << llendl;
+ LL_DEBUGS("Windlight") << key.name << " is now the new preferred sky preset" << LL_ENDL;
LLEnvManagerNew::instance().setUseSkyPreset(key.name);
}
@@ -842,7 +842,7 @@ void LLFloaterEditSky::onBtnSave()
if (name.empty())
{
// *TODO: show an alert
- llwarns << "Empty sky preset name" << llendl;
+ LL_WARNS() << "Empty sky preset name" << LL_ENDL;
return;
}
diff --git a/indra/newview/llfloatereditwater.cpp b/indra/newview/llfloatereditwater.cpp
index 64cfc4054f..43b44eae37 100755
--- a/indra/newview/llfloatereditwater.cpp
+++ b/indra/newview/llfloatereditwater.cpp
@@ -546,7 +546,7 @@ void LLFloaterEditWater::saveRegionWater()
{
llassert(getCurrentScope() == LLEnvKey::SCOPE_REGION); // make sure we're editing region water
- LL_DEBUGS("Windlight") << "Saving region water preset" << llendl;
+ LL_DEBUGS("Windlight") << "Saving region water preset" << LL_ENDL;
//LLWaterParamSet region_water = water_mgr.mCurParams;
@@ -665,7 +665,7 @@ void LLFloaterEditWater::onSaveConfirmed()
// Change preference if requested.
if (mMakeDefaultCheckBox->getEnabled() && mMakeDefaultCheckBox->getValue())
{
- LL_DEBUGS("Windlight") << name << " is now the new preferred water preset" << llendl;
+ LL_DEBUGS("Windlight") << name << " is now the new preferred water preset" << LL_ENDL;
LLEnvManagerNew::instance().setUseWaterPreset(name);
}
@@ -688,7 +688,7 @@ void LLFloaterEditWater::onBtnSave()
if (name.empty())
{
// *TODO: show an alert
- llwarns << "Empty water preset name" << llendl;
+ LL_WARNS() << "Empty water preset name" << LL_ENDL;
return;
}
diff --git a/indra/newview/llfloaterevent.cpp b/indra/newview/llfloaterevent.cpp
index a6dafda3e6..3e303e0932 100755
--- a/indra/newview/llfloaterevent.cpp
+++ b/indra/newview/llfloaterevent.cpp
@@ -45,7 +45,6 @@
#include "llmediactrl.h"
#include "llfloaterworldmap.h"
#include "llinventorymodel.h"
-#include "llsecondlifeurls.h"
#include "llslurl.h"
#include "lltextbox.h"
#include "lltexteditor.h"
diff --git a/indra/newview/llfloatergesture.cpp b/indra/newview/llfloatergesture.cpp
index 56051ff684..1452d53265 100755
--- a/indra/newview/llfloatergesture.cpp
+++ b/indra/newview/llfloatergesture.cpp
@@ -400,9 +400,9 @@ bool LLFloaterGesture::isActionEnabled(const LLSD& command)
if(!LLClipboard::instance().hasContents())
return false;
- LLDynamicArray<LLUUID> ids;
+ std::vector<LLUUID> ids;
LLClipboard::instance().pasteFromClipboard(ids);
- for(LLDynamicArray<LLUUID>::iterator it = ids.begin(); it != ids.end(); it++)
+ for(std::vector<LLUUID>::iterator it = ids.begin(); it != ids.end(); it++)
{
LLInventoryItem* item = gInventory.getItem(*it);
@@ -514,7 +514,7 @@ void LLFloaterGesture::onCopyPasteAction(const LLSD& command)
}
else if ("paste" == command_name)
{
- LLDynamicArray<LLUUID> ids;
+ std::vector<LLUUID> ids;
LLClipboard::instance().pasteFromClipboard(ids);
if(ids.empty() || !gInventory.isCategoryComplete(mGestureFolderID))
return;
@@ -522,7 +522,7 @@ void LLFloaterGesture::onCopyPasteAction(const LLSD& command)
llassert(gesture_dir);
LLPointer<GestureCopiedCallback> cb = new GestureCopiedCallback(this);
- for(LLDynamicArray<LLUUID>::iterator it = ids.begin(); it != ids.end(); it++)
+ for(std::vector<LLUUID>::iterator it = ids.begin(); it != ids.end(); it++)
{
LLInventoryItem* item = gInventory.getItem(*it);
if(gesture_dir && item && item->getInventoryType() == LLInventoryType::IT_GESTURE)
diff --git a/indra/newview/llfloatergodtools.cpp b/indra/newview/llfloatergodtools.cpp
index fe6223fbf5..6966ca5639 100755
--- a/indra/newview/llfloatergodtools.cpp
+++ b/indra/newview/llfloatergodtools.cpp
@@ -796,7 +796,7 @@ void LLPanelRegionTools::onSwapTerrain()
void LLPanelRegionTools::onSelectRegion()
{
- llinfos << "LLPanelRegionTools::onSelectRegion" << llendl;
+ LL_INFOS() << "LLPanelRegionTools::onSelectRegion" << LL_ENDL;
LLViewerRegion *regionp = LLWorld::getInstance()->getRegionFromPosGlobal(gAgent.getPositionGlobal());
if (!regionp)
@@ -1262,8 +1262,8 @@ void LLPanelRequestTools::sendRequest(const std::string& request,
const std::string& parameter,
const LLHost& host)
{
- llinfos << "Sending request '" << request << "', '"
- << parameter << "' to " << host << llendl;
+ LL_INFOS() << "Sending request '" << request << "', '"
+ << parameter << "' to " << host << LL_ENDL;
LLMessageSystem* msg = gMessageSystem;
msg->newMessage("GodlikeMessage");
msg->nextBlockFast(_PREHASH_AgentData);
@@ -1316,7 +1316,7 @@ void terrain_download_done(void** data, S32 status, LLExtStat ext_status)
void test_callback(const LLTSCode status)
{
- llinfos << "Test transfer callback returned!" << llendl;
+ LL_INFOS() << "Test transfer callback returned!" << LL_ENDL;
}
diff --git a/indra/newview/llfloatergroupinvite.cpp b/indra/newview/llfloatergroupinvite.cpp
index d0f3289769..7fdba8734a 100755
--- a/indra/newview/llfloatergroupinvite.cpp
+++ b/indra/newview/llfloatergroupinvite.cpp
@@ -117,7 +117,7 @@ void LLFloaterGroupInvite::showForGroup(const LLUUID& group_id, uuid_vec_t *agen
// Make sure group_id isn't null
if (group_id.isNull())
{
- llwarns << "LLFloaterGroupInvite::showForGroup with null group_id!" << llendl;
+ LL_WARNS() << "LLFloaterGroupInvite::showForGroup with null group_id!" << LL_ENDL;
return;
}
diff --git a/indra/newview/llfloatergroups.cpp b/indra/newview/llfloatergroups.cpp
index d84364a68a..dbe7fee108 100755
--- a/indra/newview/llfloatergroups.cpp
+++ b/indra/newview/llfloatergroups.cpp
@@ -171,7 +171,7 @@ void LLPanelGroups::reset()
{
group_list->operateOnAll(LLCtrlListInterface::OP_DELETE);
}
- getChild<LLUICtrl>("groupcount")->setTextArg("[COUNT]", llformat("%d",gAgent.mGroups.count()));
+ getChild<LLUICtrl>("groupcount")->setTextArg("[COUNT]", llformat("%d",gAgent.mGroups.size()));
getChild<LLUICtrl>("groupcount")->setTextArg("[MAX]", llformat("%d",gMaxAgentGroups));
init_group_list(getChild<LLScrollListCtrl>("group list"), gAgent.getGroupID());
@@ -182,7 +182,7 @@ BOOL LLPanelGroups::postBuild()
{
childSetCommitCallback("group list", onGroupList, this);
- getChild<LLUICtrl>("groupcount")->setTextArg("[COUNT]", llformat("%d",gAgent.mGroups.count()));
+ getChild<LLUICtrl>("groupcount")->setTextArg("[COUNT]", llformat("%d",gAgent.mGroups.size()));
getChild<LLUICtrl>("groupcount")->setTextArg("[MAX]", llformat("%d",gMaxAgentGroups));
LLScrollListCtrl *list = getChild<LLScrollListCtrl>("group list");
@@ -341,7 +341,7 @@ void LLPanelGroups::onGroupList(LLUICtrl* ctrl, void* userdata)
void init_group_list(LLScrollListCtrl* group_list, const LLUUID& highlight_id, U64 powers_mask)
{
- S32 count = gAgent.mGroups.count();
+ S32 count = gAgent.mGroups.size();
LLUUID id;
if (!group_list) return;
@@ -349,8 +349,8 @@ void init_group_list(LLScrollListCtrl* group_list, const LLUUID& highlight_id, U
for(S32 i = 0; i < count; ++i)
{
- id = gAgent.mGroups.get(i).mID;
- LLGroupData* group_datap = &gAgent.mGroups.get(i);
+ id = gAgent.mGroups.at(i).mID;
+ LLGroupData* group_datap = &gAgent.mGroups.at(i);
if ((powers_mask == GP_ALL_POWERS) || ((group_datap->mPowers & powers_mask) != 0))
{
std::string style = "NORMAL";
diff --git a/indra/newview/llfloaterhardwaresettings.cpp b/indra/newview/llfloaterhardwaresettings.cpp
index 792a2a5d25..035eb307c2 100755
--- a/indra/newview/llfloaterhardwaresettings.cpp
+++ b/indra/newview/llfloaterhardwaresettings.cpp
@@ -89,12 +89,11 @@ void LLFloaterHardwareSettings::refresh()
void LLFloaterHardwareSettings::refreshEnabledState()
{
- F32 mem_multiplier = gSavedSettings.getF32("RenderTextureMemoryMultiple");
-
- S32 min_tex_mem = LLViewerTextureList::getMinVideoRamSetting();
- S32 max_tex_mem = LLViewerTextureList::getMaxVideoRamSetting(false, mem_multiplier);
- getChild<LLSliderCtrl>("GraphicsCardTextureMemory")->setMinValue(min_tex_mem);
- getChild<LLSliderCtrl>("GraphicsCardTextureMemory")->setMaxValue(max_tex_mem);
+ F32 mem_multiplier = gSavedSettings.getF32("RenderTextureMemoryMultiple");
+ S32Megabytes min_tex_mem = LLViewerTextureList::getMinVideoRamSetting();
+ S32Megabytes max_tex_mem = LLViewerTextureList::getMaxVideoRamSetting(false, mem_multiplier);
+ getChild<LLSliderCtrl>("GraphicsCardTextureMemory")->setMinValue(min_tex_mem.value());
+ getChild<LLSliderCtrl>("GraphicsCardTextureMemory")->setMaxValue(max_tex_mem.value());
if (!LLFeatureManager::getInstance()->isFeatureAvailable("RenderVBOEnable") ||
!gGLManager.mHasVertexBufferObject)
diff --git a/indra/newview/llfloaterimcontainer.cpp b/indra/newview/llfloaterimcontainer.cpp
index 566f9bc9cc..bb39a54f76 100755
--- a/indra/newview/llfloaterimcontainer.cpp
+++ b/indra/newview/llfloaterimcontainer.cpp
@@ -424,7 +424,7 @@ bool LLFloaterIMContainer::onConversationModelEvent(const LLSD& event)
// For debug only
//std::ostringstream llsd_value;
//llsd_value << LLSDOStreamer<LLSDNotationFormatter>(event) << std::endl;
- //llinfos << "LLFloaterIMContainer::onConversationModelEvent, event = " << llsd_value.str() << llendl;
+ //LL_INFOS() << "LLFloaterIMContainer::onConversationModelEvent, event = " << llsd_value.str() << LL_ENDL;
// end debug
// Note: In conversations, the model is not responsible for creating the view, which is a good thing. This means that
@@ -1607,7 +1607,7 @@ LLConversationItem* LLFloaterIMContainer::addConversationListItem(const LLUUID&
}
if (!item)
{
- llwarns << "Couldn't create conversation session item : " << display_name << llendl;
+ LL_WARNS() << "Couldn't create conversation session item : " << display_name << LL_ENDL;
return NULL;
}
item->renameItem(display_name);
@@ -1789,7 +1789,7 @@ bool LLFloaterIMContainer::isGroupModerator()
LLSpeakerMgr * speaker_manager = getSpeakerMgrForSelectedParticipant();
if (NULL == speaker_manager)
{
- llwarns << "Speaker manager is missing" << llendl;
+ LL_WARNS() << "Speaker manager is missing" << LL_ENDL;
return false;
}
@@ -1881,7 +1881,7 @@ LLSpeakerMgr * LLFloaterIMContainer::getSpeakerMgrForSelectedParticipant()
LLFolderViewItem *selectedItem = mConversationsRoot->getCurSelectedItem();
if (NULL == selectedItem)
{
- llwarns << "Current selected item is null" << llendl;
+ LL_WARNS() << "Current selected item is null" << LL_ENDL;
return NULL;
}
@@ -1899,7 +1899,7 @@ LLSpeakerMgr * LLFloaterIMContainer::getSpeakerMgrForSelectedParticipant()
}
if (NULL == conversation_uuidp)
{
- llwarns << "Cannot find conversation item widget" << llendl;
+ LL_WARNS() << "Cannot find conversation item widget" << LL_ENDL;
return NULL;
}
@@ -1911,14 +1911,14 @@ LLSpeaker * LLFloaterIMContainer::getSpeakerOfSelectedParticipant(LLSpeakerMgr *
{
if (NULL == speaker_managerp)
{
- llwarns << "Speaker manager is missing" << llendl;
+ LL_WARNS() << "Speaker manager is missing" << LL_ENDL;
return NULL;
}
const LLConversationItem * participant_itemp = getCurSelectedViewModelItem();
if (NULL == participant_itemp)
{
- llwarns << "Cannot evaluate current selected view model item" << llendl;
+ LL_WARNS() << "Cannot evaluate current selected view model item" << LL_ENDL;
return NULL;
}
@@ -2131,14 +2131,7 @@ BOOL LLFloaterIMContainer::isFrontmost()
// This is intentional so it doesn't confuse the user. onClickCloseBtn() closes the whole floater.
void LLFloaterIMContainer::onClickCloseBtn(bool app_quitting/* = false*/)
{
- // Always unminimize before trying to close.
- // Most of the time the user will never see this state.
- if(isMinimized())
- {
- LLMultiFloater::setMinimized(FALSE);
- }
-
- LLFloater::closeFloater(app_quitting);
+ LLMultiFloater::closeFloater(app_quitting);
}
void LLFloaterIMContainer::closeHostedFloater()
@@ -2148,7 +2141,7 @@ void LLFloaterIMContainer::closeHostedFloater()
void LLFloaterIMContainer::closeAllConversations()
{
- LLDynamicArray<LLUUID> ids;
+ std::vector<LLUUID> ids;
for (conversations_items_map::iterator it_session = mConversationsItems.begin(); it_session != mConversationsItems.end(); it_session++)
{
LLUUID session_id = it_session->first;
@@ -2158,7 +2151,7 @@ void LLFloaterIMContainer::closeAllConversations()
}
}
- for (LLDynamicArray<LLUUID>::const_iterator it = ids.begin(); it != ids.end(); ++it)
+ for (std::vector<LLUUID>::const_iterator it = ids.begin(); it != ids.end(); ++it)
{
LLFloaterIMSession *conversationFloater = LLFloaterIMSession::findInstance(*it);
LLFloater::onClickClose(conversationFloater);
diff --git a/indra/newview/llfloaterimnearbychat.cpp b/indra/newview/llfloaterimnearbychat.cpp
index 323e84751f..7a989806a1 100755
--- a/indra/newview/llfloaterimnearbychat.cpp
+++ b/indra/newview/llfloaterimnearbychat.cpp
@@ -89,7 +89,7 @@ static LLChatTypeTrigger sChatTypeTriggers[] = {
LLFloaterIMNearbyChat::LLFloaterIMNearbyChat(const LLSD& llsd)
-: LLFloaterIMSessionTab(llsd),
+: LLFloaterIMSessionTab(LLSD(LLUUID::null)),
//mOutputMonitor(NULL),
mSpeakerMgr(NULL),
mExpandedHeight(COLLAPSED_HEIGHT + EXPANDED_HEIGHT)
@@ -97,7 +97,6 @@ LLFloaterIMNearbyChat::LLFloaterIMNearbyChat(const LLSD& llsd)
mIsP2PChat = false;
mIsNearbyChat = true;
mSpeakerMgr = LLLocalSpeakerMgr::getInstance();
- mSessionID = LLUUID();
}
//static
@@ -331,7 +330,7 @@ void LLFloaterIMNearbyChat::onChatFontChange(LLFontGL* fontp)
void LLFloaterIMNearbyChat::show()
{
openFloater(getKey());
- }
+}
bool LLFloaterIMNearbyChat::isChatVisible() const
{
@@ -507,10 +506,10 @@ void LLFloaterIMNearbyChat::onChatBoxKeystroke()
mInputEditor->endOfDoc();
}
- //llinfos << "GESTUREDEBUG " << trigger
+ //LL_INFOS() << "GESTUREDEBUG " << trigger
// << " len " << length
// << " outlen " << out_str.getLength()
- // << llendl;
+ // << LL_ENDL;
}
}
@@ -697,22 +696,22 @@ void LLFloaterIMNearbyChat::sendChatFromViewer(const LLWString &wtext, EChatType
{
if (type == CHAT_TYPE_WHISPER)
{
- lldebugs << "You whisper " << utf8_text << llendl;
+ LL_DEBUGS() << "You whisper " << utf8_text << LL_ENDL;
gAgent.sendAnimationRequest(ANIM_AGENT_WHISPER, ANIM_REQUEST_START);
}
else if (type == CHAT_TYPE_NORMAL)
{
- lldebugs << "You say " << utf8_text << llendl;
+ LL_DEBUGS() << "You say " << utf8_text << LL_ENDL;
gAgent.sendAnimationRequest(ANIM_AGENT_TALK, ANIM_REQUEST_START);
}
else if (type == CHAT_TYPE_SHOUT)
{
- lldebugs << "You shout " << utf8_text << llendl;
+ LL_DEBUGS() << "You shout " << utf8_text << LL_ENDL;
gAgent.sendAnimationRequest(ANIM_AGENT_SHOUT, ANIM_REQUEST_START);
}
else
{
- llinfos << "send_chat_from_viewer() - invalid volume" << llendl;
+ LL_INFOS() << "send_chat_from_viewer() - invalid volume" << LL_ENDL;
return;
}
}
@@ -720,7 +719,7 @@ void LLFloaterIMNearbyChat::sendChatFromViewer(const LLWString &wtext, EChatType
{
if (type != CHAT_TYPE_START && type != CHAT_TYPE_STOP)
{
- lldebugs << "Channel chat: " << utf8_text << llendl;
+ LL_DEBUGS() << "Channel chat: " << utf8_text << LL_ENDL;
}
}
@@ -850,7 +849,7 @@ void send_chat_from_viewer(const std::string& utf8_out_text, EChatType type, S32
gAgent.sendReliableMessage();
- LLViewerStats::getInstance()->incStat(LLViewerStats::ST_CHAT_COUNT);
+ add(LLStatViewer::CHAT_COUNT, 1);
}
class LLChatCommandHandler : public LLCommandHandler
diff --git a/indra/newview/llfloaterimnearbychathandler.cpp b/indra/newview/llfloaterimnearbychathandler.cpp
index a8f815c389..1f85c5ac1b 100755
--- a/indra/newview/llfloaterimnearbychathandler.cpp
+++ b/indra/newview/llfloaterimnearbychathandler.cpp
@@ -111,7 +111,7 @@ public:
virtual void deleteAllChildren()
{
- LL_DEBUGS("NearbyChat") << "Clearing toast pool" << llendl;
+ LL_DEBUGS("NearbyChat") << "Clearing toast pool" << LL_ENDL;
m_toast_pool.clear();
m_active_toasts.clear();
LLScreenChannelBase::deleteAllChildren();
@@ -122,7 +122,7 @@ protected:
void addToToastPool(LLToast* toast)
{
if (!toast) return;
- LL_DEBUGS("NearbyChat") << "Pooling toast" << llendl;
+ LL_DEBUGS("NearbyChat") << "Pooling toast" << LL_ENDL;
toast->setVisible(FALSE);
toast->stopTimer();
toast->setIsHidden(true);
@@ -189,7 +189,7 @@ void LLFloaterIMNearbyChatScreenChannel::deactivateToast(LLToast* toast)
if (pos != m_active_toasts.end())
{
- LL_DEBUGS("NearbyChat") << "Deactivating toast" << llendl;
+ LL_DEBUGS("NearbyChat") << "Deactivating toast" << LL_ENDL;
m_active_toasts.erase(pos);
}
}
@@ -201,7 +201,7 @@ void LLFloaterIMNearbyChatScreenChannel::createOverflowToast(S32 bottom, F32 tim
void LLFloaterIMNearbyChatScreenChannel::onToastDestroyed(LLToast* toast, bool app_quitting)
{
- LL_DEBUGS("NearbyChat") << "Toast destroyed (app_quitting=" << app_quitting << ")" << llendl;
+ LL_DEBUGS("NearbyChat") << "Toast destroyed (app_quitting=" << app_quitting << ")" << LL_ENDL;
if (app_quitting)
{
@@ -220,7 +220,7 @@ void LLFloaterIMNearbyChatScreenChannel::onToastDestroyed(LLToast* toast, bool a
void LLFloaterIMNearbyChatScreenChannel::onToastFade(LLToast* toast)
{
- LL_DEBUGS("NearbyChat") << "Toast fading" << llendl;
+ LL_DEBUGS("NearbyChat") << "Toast fading" << LL_ENDL;
//fade mean we put toast to toast pool
if(!toast)
@@ -274,7 +274,7 @@ bool LLFloaterIMNearbyChatScreenChannel::createPoolToast()
// If the toast gets somehow prematurely destroyed, deactivate it to prevent crash (STORM-1352).
toast->setOnToastDestroyedCallback(boost::bind(&LLFloaterIMNearbyChatScreenChannel::onToastDestroyed, this, _1, false));
- LL_DEBUGS("NearbyChat") << "Creating and pooling toast" << llendl;
+ LL_DEBUGS("NearbyChat") << "Creating and pooling toast" << LL_ENDL;
m_toast_pool.push_back(toast->getHandle());
return true;
}
@@ -315,7 +315,7 @@ void LLFloaterIMNearbyChatScreenChannel::addChat(LLSD& chat)
if(m_toast_pool.empty())
{
//"pool" is empty - create one more panel
- LL_DEBUGS("NearbyChat") << "Empty pool" << llendl;
+ LL_DEBUGS("NearbyChat") << "Empty pool" << LL_ENDL;
if(!createPoolToast())//created toast will go to pool. so next call will find it
return;
addChat(chat);
@@ -335,7 +335,7 @@ void LLFloaterIMNearbyChatScreenChannel::addChat(LLSD& chat)
//take 1st element from pool, (re)initialize it, put it in active toasts
- LL_DEBUGS("NearbyChat") << "Getting toast from pool" << llendl;
+ LL_DEBUGS("NearbyChat") << "Getting toast from pool" << LL_ENDL;
LLToast* toast = m_toast_pool.back().get();
m_toast_pool.pop_back();
@@ -403,7 +403,7 @@ void LLFloaterIMNearbyChatScreenChannel::arrangeToasts()
LLToast* toast = it->get();
if (!toast)
{
- llwarns << "NULL found in the active chat toasts list!" << llendl;
+ LL_WARNS() << "NULL found in the active chat toasts list!" << LL_ENDL;
continue;
}
diff --git a/indra/newview/llfloaterimsession.cpp b/indra/newview/llfloaterimsession.cpp
index 84921849d0..ec506d1c7e 100755..100644
--- a/indra/newview/llfloaterimsession.cpp
+++ b/indra/newview/llfloaterimsession.cpp
@@ -41,6 +41,7 @@
#include "llchicletbar.h"
#include "lldonotdisturbnotificationstorage.h"
#include "llfloaterreg.h"
+#include "llhttpclient.h"
#include "llfloateravatarpicker.h"
#include "llfloaterimcontainer.h" // to replace separate IM Floaters with multifloater container
#include "llinventoryfunctions.h"
@@ -52,6 +53,7 @@
#include "lltrans.h"
#include "llchathistory.h"
#include "llnotifications.h"
+#include "llviewerregion.h"
#include "llviewerwindow.h"
#include "lltransientfloatermgr.h"
#include "llinventorymodel.h"
@@ -102,7 +104,7 @@ LLFloaterIMSession::LLFloaterIMSession(const LLUUID& session_id)
void LLFloaterIMSession::refresh()
{
if (mMeTyping)
- {
+{
// Send an additional Start Typing packet every ME_TYPING_TIMEOUT seconds
if (mMeTypingTimer.getElapsedTimeF32() > ME_TYPING_TIMEOUT && false == mShouldSendTypingState)
{
@@ -114,7 +116,7 @@ void LLFloaterIMSession::refresh()
// Time out if user hasn't typed for a while.
if (mTypingTimeoutTimer.getElapsedTimeF32() > LLAgent::TYPING_TIMEOUT_SECS)
{
- setTyping(false);
+ setTyping(false);
LL_DEBUGS("TypingMsgs") << "Send stop typing due to timeout" << LL_ENDL;
}
}
@@ -158,7 +160,7 @@ void LLFloaterIMSession::onClickCloseBtn(bool)
}
else
{
- llwarns << "Empty session with id: " << (mSessionID.asString()) << llendl;
+ LL_WARNS() << "Empty session with id: " << (mSessionID.asString()) << LL_ENDL;
return;
}
@@ -182,7 +184,7 @@ void LLFloaterIMSession::newIMCallback(const LLSD& data)
}
}
-void LLFloaterIMSession::onVisibilityChange(const LLSD& new_visibility)
+void LLFloaterIMSession::onVisibilityChanged(const LLSD& new_visibility)
{
bool visible = new_visibility.asBoolean();
@@ -260,7 +262,7 @@ void LLFloaterIMSession::sendMsgFromInputEditor()
}
else
{
- llinfos << "Cannot send IM to everyone unless you're a god." << llendl;
+ LL_INFOS() << "Cannot send IM to everyone unless you're a god." << LL_ENDL;
}
}
@@ -980,7 +982,7 @@ void LLFloaterIMSession::setTyping(bool typing)
if ( mMeTyping )
{
if ( mTypingTimer.getElapsedTimeF32() > 1.f )
- {
+ {
// Still typing, send 'start typing' notification
LLIMModel::instance().sendTypingState(mSessionID, mOtherParticipantUUID, TRUE);
mShouldSendTypingState = false;
@@ -991,7 +993,7 @@ void LLFloaterIMSession::setTyping(bool typing)
{
// Send 'stop typing' notification immediately
LLIMModel::instance().sendTypingState(mSessionID, mOtherParticipantUUID, FALSE);
- mShouldSendTypingState = false;
+ mShouldSendTypingState = false;
}
}
@@ -1187,8 +1189,8 @@ public:
void errorWithContent(U32 statusNum, const std::string& reason, const LLSD& content)
{
- llwarns << "Error inviting all agents to session [status:"
- << statusNum << "]: " << content << llendl;
+ LL_WARNS() << "Error inviting all agents to session [status:"
+ << statusNum << "]: " << content << LL_ENDL;
//throw something back to the viewer here?
}
@@ -1207,7 +1209,7 @@ BOOL LLFloaterIMSession::inviteToSession(const uuid_vec_t& ids)
if( isInviteAllowed() && (count > 0) )
{
- llinfos << "LLFloaterIMSession::inviteToSession() - inviting participants" << llendl;
+ LL_INFOS() << "LLFloaterIMSession::inviteToSession() - inviting participants" << LL_ENDL;
std::string url = region->getCapability("ChatSessionRequest");
@@ -1223,9 +1225,9 @@ BOOL LLFloaterIMSession::inviteToSession(const uuid_vec_t& ids)
}
else
{
- llinfos << "LLFloaterIMSession::inviteToSession -"
+ LL_INFOS() << "LLFloaterIMSession::inviteToSession -"
<< " no need to invite agents for "
- << mDialog << llendl;
+ << mDialog << LL_ENDL;
// successful add, because everyone that needed to get added
// was added.
}
diff --git a/indra/newview/llfloaterimsession.h b/indra/newview/llfloaterimsession.h
index 2b9d06e744..0f7164a585 100755..100644
--- a/indra/newview/llfloaterimsession.h
+++ b/indra/newview/llfloaterimsession.h
@@ -107,7 +107,7 @@ public:
// called when docked floater's position has been set by chiclet
void setPositioned(bool b) { mPositioned = b; };
- void onVisibilityChange(const LLSD& new_visibility);
+ void onVisibilityChanged(const LLSD& new_visibility);
bool enableGearMenuItem(const LLSD& userdata);
void GearDoToSelected(const LLSD& userdata);
bool checkGearMenuItem(const LLSD& userdata);
diff --git a/indra/newview/llfloaterimsessiontab.cpp b/indra/newview/llfloaterimsessiontab.cpp
index 29511f56ff..fbdaca0e6f 100755
--- a/indra/newview/llfloaterimsessiontab.cpp
+++ b/indra/newview/llfloaterimsessiontab.cpp
@@ -47,24 +47,24 @@
const F32 REFRESH_INTERVAL = 1.0f;
LLFloaterIMSessionTab::LLFloaterIMSessionTab(const LLSD& session_id)
- : LLTransientDockableFloater(NULL, true, session_id)
- , mIsP2PChat(false)
- , mExpandCollapseBtn(NULL)
- , mTearOffBtn(NULL)
- , mCloseBtn(NULL)
- , mSessionID(session_id.asUUID())
- , mConversationsRoot(NULL)
- , mScroller(NULL)
- , mChatHistory(NULL)
- , mInputEditor(NULL)
- , mInputEditorPad(0)
- , mRefreshTimer(new LLTimer())
- , mIsHostAttached(false)
- , mHasVisibleBeenInitialized(false)
- , mIsParticipantListExpanded(true)
- , mChatLayoutPanel(NULL)
- , mInputPanels(NULL)
- , mChatLayoutPanelHeight(0)
+: LLTransientDockableFloater(NULL, true, session_id),
+ mIsP2PChat(false),
+ mExpandCollapseBtn(NULL),
+ mTearOffBtn(NULL),
+ mCloseBtn(NULL),
+ mSessionID(session_id.asUUID()),
+ mConversationsRoot(NULL),
+ mScroller(NULL),
+ mChatHistory(NULL),
+ mInputEditor(NULL),
+ mInputEditorPad(0),
+ mRefreshTimer(new LLTimer()),
+ mIsHostAttached(false),
+ mHasVisibleBeenInitialized(false),
+ mIsParticipantListExpanded(true),
+ mChatLayoutPanel(NULL),
+ mInputPanels(NULL),
+ mChatLayoutPanelHeight(0)
{
setAutoFocus(FALSE);
mSession = LLIMModel::getInstance()->findIMSession(mSessionID);
diff --git a/indra/newview/llfloaterjoystick.cpp b/indra/newview/llfloaterjoystick.cpp
index d0c22d25f2..b7fff6cae3 100755
--- a/indra/newview/llfloaterjoystick.cpp
+++ b/indra/newview/llfloaterjoystick.cpp
@@ -33,7 +33,7 @@
#include "llerror.h"
#include "llrect.h"
#include "llstring.h"
-#include "llstat.h"
+#include "lltrace.h"
// project includes
#include "lluictrlfactory.h"
@@ -42,6 +42,22 @@
#include "llviewerjoystick.h"
#include "llcheckboxctrl.h"
+static LLTrace::SampleStatHandle<> sJoystickAxis0("Joystick axis 0"),
+ sJoystickAxis1("Joystick axis 1"),
+ sJoystickAxis2("Joystick axis 2"),
+ sJoystickAxis3("Joystick axis 3"),
+ sJoystickAxis4("Joystick axis 4"),
+ sJoystickAxis5("Joystick axis 5");
+static LLTrace::SampleStatHandle<>* sJoystickAxes[6] =
+{
+ &sJoystickAxis0,
+ &sJoystickAxis1,
+ &sJoystickAxis2,
+ &sJoystickAxis3,
+ &sJoystickAxis4,
+ &sJoystickAxis5
+};
+
LLFloaterJoystick::LLFloaterJoystick(const LLSD& data)
: LLFloater(data)
{
@@ -61,7 +77,7 @@ void LLFloaterJoystick::draw()
for (U32 i = 0; i < 6; i++)
{
F32 value = joystick->getJoystickAxis(i);
- mAxisStats[i]->addValue(value * gFrameIntervalSeconds);
+ sample(*sJoystickAxes[i], value * gFrameIntervalSeconds.value());
if (mAxisStatsBar[i])
{
F32 minbar, maxbar;
@@ -69,7 +85,7 @@ void LLFloaterJoystick::draw()
if (llabs(value) > maxbar)
{
F32 range = llabs(value);
- mAxisStatsBar[i]->setRange(-range, range, range * 0.25f, range * 0.5f);
+ mAxisStatsBar[i]->setRange(-range, range);
}
}
}
@@ -85,13 +101,12 @@ BOOL LLFloaterJoystick::postBuild()
for (U32 i = 0; i < 6; i++)
{
std::string stat_name(llformat("Joystick axis %d", i));
- mAxisStats[i] = new LLStat(stat_name, 4);
std::string axisname = llformat("axis%d", i);
mAxisStatsBar[i] = getChild<LLStatBar>(axisname);
if (mAxisStatsBar[i])
{
- mAxisStatsBar[i]->setStat(mAxisStats[i]);
- mAxisStatsBar[i]->setRange(-range, range, range * 0.25f, range * 0.5f);
+ mAxisStatsBar[i]->setStat(stat_name);
+ mAxisStatsBar[i]->setRange(-range, range);
}
}
diff --git a/indra/newview/llfloaterjoystick.h b/indra/newview/llfloaterjoystick.h
index dfdb108ff8..9c3752540d 100755
--- a/indra/newview/llfloaterjoystick.h
+++ b/indra/newview/llfloaterjoystick.h
@@ -84,7 +84,6 @@ private:
LLCheckBoxCtrl *mCheckFlycamEnabled;
// stats view
- LLStat* mAxisStats[6];
LLStatBar* mAxisStatsBar[6];
};
diff --git a/indra/newview/llfloaterlagmeter.cpp b/indra/newview/llfloaterlagmeter.cpp
deleted file mode 100755
index 68b1770bb2..0000000000
--- a/indra/newview/llfloaterlagmeter.cpp
+++ /dev/null
@@ -1,375 +0,0 @@
-/**
- * @file llfloaterlagmeter.cpp
- * @brief The "Lag-o-Meter" floater used to tell users what is causing lag.
- *
- * $LicenseInfo:firstyear=2007&license=viewerlgpl$
- * Second Life Viewer Source Code
- * Copyright (C) 2010, Linden Research, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation;
- * version 2.1 of the License only.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- *
- * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
- * $/LicenseInfo$
- */
-
-#include "llviewerprecompiledheaders.h"
-
-#include "llfloaterlagmeter.h"
-
-#include "lluictrlfactory.h"
-#include "llviewerstats.h"
-#include "llviewertexture.h"
-#include "llviewercontrol.h"
-#include "llappviewer.h"
-
-#include "lltexturefetch.h"
-
-#include "llbutton.h"
-#include "llfocusmgr.h"
-#include "lltextbox.h"
-
-const std::string LAG_CRITICAL_IMAGE_NAME = "lag_status_critical.tga";
-const std::string LAG_WARNING_IMAGE_NAME = "lag_status_warning.tga";
-const std::string LAG_GOOD_IMAGE_NAME = "lag_status_good.tga";
-
-LLFloaterLagMeter::LLFloaterLagMeter(const LLSD& key)
- : LLFloater(key)
-{
- mCommitCallbackRegistrar.add("LagMeter.ClickShrink", boost::bind(&LLFloaterLagMeter::onClickShrink, this));
-}
-
-BOOL LLFloaterLagMeter::postBuild()
-{
- // Don't let this window take keyboard focus -- it's confusing to
- // lose arrow-key driving when testing lag.
- setIsChrome(TRUE);
-
- // were we shrunk last time?
- if (isShrunk())
- {
- onClickShrink();
- }
-
- mClientButton = getChild<LLButton>("client_lagmeter");
- mClientText = getChild<LLTextBox>("client_text");
- mClientCause = getChild<LLTextBox>("client_lag_cause");
-
- mNetworkButton = getChild<LLButton>("network_lagmeter");
- mNetworkText = getChild<LLTextBox>("network_text");
- mNetworkCause = getChild<LLTextBox>("network_lag_cause");
-
- mServerButton = getChild<LLButton>("server_lagmeter");
- mServerText = getChild<LLTextBox>("server_text");
- mServerCause = getChild<LLTextBox>("server_lag_cause");
-
- std::string config_string = getString("client_frame_rate_critical_fps", mStringArgs);
- mClientFrameTimeCritical = 1.0f / (float)atof( config_string.c_str() );
- config_string = getString("client_frame_rate_warning_fps", mStringArgs);
- mClientFrameTimeWarning = 1.0f / (float)atof( config_string.c_str() );
-
- config_string = getString("network_packet_loss_critical_pct", mStringArgs);
- mNetworkPacketLossCritical = (float)atof( config_string.c_str() );
- config_string = getString("network_packet_loss_warning_pct", mStringArgs);
- mNetworkPacketLossWarning = (float)atof( config_string.c_str() );
-
- config_string = getString("network_ping_critical_ms", mStringArgs);
- mNetworkPingCritical = (float)atof( config_string.c_str() );
- config_string = getString("network_ping_warning_ms", mStringArgs);
- mNetworkPingWarning = (float)atof( config_string.c_str() );
- config_string = getString("server_frame_rate_critical_fps", mStringArgs);
-
- mServerFrameTimeCritical = 1000.0f / (float)atof( config_string.c_str() );
- config_string = getString("server_frame_rate_warning_fps", mStringArgs);
- mServerFrameTimeWarning = 1000.0f / (float)atof( config_string.c_str() );
- config_string = getString("server_single_process_max_time_ms", mStringArgs);
- mServerSingleProcessMaxTime = (float)atof( config_string.c_str() );
-
-// mShrunk = false;
- config_string = getString("max_width_px", mStringArgs);
- mMaxWidth = atoi( config_string.c_str() );
- config_string = getString("min_width_px", mStringArgs);
- mMinWidth = atoi( config_string.c_str() );
-
- mStringArgs["[CLIENT_FRAME_RATE_CRITICAL]"] = getString("client_frame_rate_critical_fps");
- mStringArgs["[CLIENT_FRAME_RATE_WARNING]"] = getString("client_frame_rate_warning_fps");
-
- mStringArgs["[NETWORK_PACKET_LOSS_CRITICAL]"] = getString("network_packet_loss_critical_pct");
- mStringArgs["[NETWORK_PACKET_LOSS_WARNING]"] = getString("network_packet_loss_warning_pct");
-
- mStringArgs["[NETWORK_PING_CRITICAL]"] = getString("network_ping_critical_ms");
- mStringArgs["[NETWORK_PING_WARNING]"] = getString("network_ping_warning_ms");
-
- mStringArgs["[SERVER_FRAME_RATE_CRITICAL]"] = getString("server_frame_rate_critical_fps");
- mStringArgs["[SERVER_FRAME_RATE_WARNING]"] = getString("server_frame_rate_warning_fps");
-
-// childSetAction("minimize", onClickShrink, this);
- updateControls(isShrunk()); // if expanded append colon to the labels (EXT-4079)
-
- return TRUE;
-}
-LLFloaterLagMeter::~LLFloaterLagMeter()
-{
- // save shrunk status for next time
-// gSavedSettings.setBOOL("LagMeterShrunk", mShrunk);
- // expand so we save the large window rectangle
- if (isShrunk())
- {
- onClickShrink();
- }
-}
-
-void LLFloaterLagMeter::draw()
-{
- determineClient();
- determineNetwork();
- determineServer();
-
- LLFloater::draw();
-}
-
-void LLFloaterLagMeter::determineClient()
-{
- F32 client_frame_time = LLViewerStats::getInstance()->mFPSStat.getMeanDuration();
- bool find_cause = false;
-
- if (!gFocusMgr.getAppHasFocus())
- {
- mClientButton->setImageUnselected(LLUI::getUIImage(LAG_GOOD_IMAGE_NAME));
- mClientText->setText( getString("client_frame_time_window_bg_msg", mStringArgs) );
- mClientCause->setText( LLStringUtil::null );
- }
- else if(client_frame_time >= mClientFrameTimeCritical)
- {
- mClientButton->setImageUnselected(LLUI::getUIImage(LAG_CRITICAL_IMAGE_NAME));
- mClientText->setText( getString("client_frame_time_critical_msg", mStringArgs) );
- find_cause = true;
- }
- else if(client_frame_time >= mClientFrameTimeWarning)
- {
- mClientButton->setImageUnselected(LLUI::getUIImage(LAG_WARNING_IMAGE_NAME));
- mClientText->setText( getString("client_frame_time_warning_msg", mStringArgs) );
- find_cause = true;
- }
- else
- {
- mClientButton->setImageUnselected(LLUI::getUIImage(LAG_GOOD_IMAGE_NAME));
- mClientText->setText( getString("client_frame_time_normal_msg", mStringArgs) );
- mClientCause->setText( LLStringUtil::null );
- }
-
- if(find_cause)
- {
- if(gSavedSettings.getF32("RenderFarClip") > 128)
- {
- mClientCause->setText( getString("client_draw_distance_cause_msg", mStringArgs) );
- }
- else if(LLAppViewer::instance()->getTextureFetch()->getNumRequests() > 2)
- {
- mClientCause->setText( getString("client_texture_loading_cause_msg", mStringArgs) );
- }
- else if((BYTES_TO_MEGA_BYTES(LLViewerTexture::sBoundTextureMemoryInBytes)) > LLViewerTexture::sMaxBoundTextureMemInMegaBytes)
- {
- mClientCause->setText( getString("client_texture_memory_cause_msg", mStringArgs) );
- }
- else
- {
- mClientCause->setText( getString("client_complex_objects_cause_msg", mStringArgs) );
- }
- }
-}
-
-void LLFloaterLagMeter::determineNetwork()
-{
- F32 packet_loss = LLViewerStats::getInstance()->mPacketsLostPercentStat.getMean();
- F32 ping_time = LLViewerStats::getInstance()->mSimPingStat.getMean();
- bool find_cause_loss = false;
- bool find_cause_ping = false;
-
- // *FIXME: We can't blame a large ping time on anything in
- // particular if the frame rate is low, because a low frame
- // rate is a sure recipe for bad ping times right now until
- // the network handlers are de-synched from the rendering.
- F32 client_frame_time_ms = 1000.0f * LLViewerStats::getInstance()->mFPSStat.getMeanDuration();
-
- if(packet_loss >= mNetworkPacketLossCritical)
- {
- mNetworkButton->setImageUnselected(LLUI::getUIImage(LAG_CRITICAL_IMAGE_NAME));
- mNetworkText->setText( getString("network_packet_loss_critical_msg", mStringArgs) );
- find_cause_loss = true;
- }
- else if(ping_time >= mNetworkPingCritical)
- {
- mNetworkButton->setImageUnselected(LLUI::getUIImage(LAG_CRITICAL_IMAGE_NAME));
- if (client_frame_time_ms < mNetworkPingCritical)
- {
- mNetworkText->setText( getString("network_ping_critical_msg", mStringArgs) );
- find_cause_ping = true;
- }
- }
- else if(packet_loss >= mNetworkPacketLossWarning)
- {
- mNetworkButton->setImageUnselected(LLUI::getUIImage(LAG_WARNING_IMAGE_NAME));
- mNetworkText->setText( getString("network_packet_loss_warning_msg", mStringArgs) );
- find_cause_loss = true;
- }
- else if(ping_time >= mNetworkPingWarning)
- {
- mNetworkButton->setImageUnselected(LLUI::getUIImage(LAG_WARNING_IMAGE_NAME));
- if (client_frame_time_ms < mNetworkPingWarning)
- {
- mNetworkText->setText( getString("network_ping_warning_msg", mStringArgs) );
- find_cause_ping = true;
- }
- }
- else
- {
- mNetworkButton->setImageUnselected(LLUI::getUIImage(LAG_GOOD_IMAGE_NAME));
- mNetworkText->setText( getString("network_performance_normal_msg", mStringArgs) );
- }
-
- if(find_cause_loss)
- {
- mNetworkCause->setText( getString("network_packet_loss_cause_msg", mStringArgs) );
- }
- else if(find_cause_ping)
- {
- mNetworkCause->setText( getString("network_ping_cause_msg", mStringArgs) );
- }
- else
- {
- mNetworkCause->setText( LLStringUtil::null );
- }
-}
-
-void LLFloaterLagMeter::determineServer()
-{
- F32 sim_frame_time = LLViewerStats::getInstance()->mSimFrameMsec.getCurrent();
- bool find_cause = false;
-
- if(sim_frame_time >= mServerFrameTimeCritical)
- {
- mServerButton->setImageUnselected(LLUI::getUIImage(LAG_CRITICAL_IMAGE_NAME));
- mServerText->setText( getString("server_frame_time_critical_msg", mStringArgs) );
- find_cause = true;
- }
- else if(sim_frame_time >= mServerFrameTimeWarning)
- {
- mServerButton->setImageUnselected(LLUI::getUIImage(LAG_WARNING_IMAGE_NAME));
- mServerText->setText( getString("server_frame_time_warning_msg", mStringArgs) );
- find_cause = true;
- }
- else
- {
- mServerButton->setImageUnselected(LLUI::getUIImage(LAG_GOOD_IMAGE_NAME));
- mServerText->setText( getString("server_frame_time_normal_msg", mStringArgs) );
- mServerCause->setText( LLStringUtil::null );
- }
-
- if(find_cause)
- {
- if(LLViewerStats::getInstance()->mSimSimPhysicsMsec.getCurrent() > mServerSingleProcessMaxTime)
- {
- mServerCause->setText( getString("server_physics_cause_msg", mStringArgs) );
- }
- else if(LLViewerStats::getInstance()->mSimScriptMsec.getCurrent() > mServerSingleProcessMaxTime)
- {
- mServerCause->setText( getString("server_scripts_cause_msg", mStringArgs) );
- }
- else if(LLViewerStats::getInstance()->mSimNetMsec.getCurrent() > mServerSingleProcessMaxTime)
- {
- mServerCause->setText( getString("server_net_cause_msg", mStringArgs) );
- }
- else if(LLViewerStats::getInstance()->mSimAgentMsec.getCurrent() > mServerSingleProcessMaxTime)
- {
- mServerCause->setText( getString("server_agent_cause_msg", mStringArgs) );
- }
- else if(LLViewerStats::getInstance()->mSimImagesMsec.getCurrent() > mServerSingleProcessMaxTime)
- {
- mServerCause->setText( getString("server_images_cause_msg", mStringArgs) );
- }
- else
- {
- mServerCause->setText( getString("server_generic_cause_msg", mStringArgs) );
- }
- }
-}
-
-void LLFloaterLagMeter::updateControls(bool shrink)
-{
-// LLFloaterLagMeter * self = (LLFloaterLagMeter*)data;
-
- LLButton * button = getChild<LLButton>("minimize");
- S32 delta_width = mMaxWidth -mMinWidth;
- LLRect r = getRect();
-
- if(!shrink)
- {
- setTitle(getString("max_title_msg", mStringArgs) );
- // make left edge appear to expand
- r.translate(-delta_width, 0);
- setRect(r);
- reshape(mMaxWidth, getRect().getHeight());
-
- getChild<LLUICtrl>("client")->setValue(getString("client_text_msg", mStringArgs) + ":");
- getChild<LLUICtrl>("network")->setValue(getString("network_text_msg",mStringArgs) + ":");
- getChild<LLUICtrl>("server")->setValue(getString("server_text_msg", mStringArgs) + ":");
-
- // usually "<<"
- button->setLabel( getString("smaller_label", mStringArgs) );
- }
- else
- {
- setTitle( getString("min_title_msg", mStringArgs) );
- // make left edge appear to collapse
- r.translate(delta_width, 0);
- setRect(r);
- reshape(mMinWidth, getRect().getHeight());
-
- getChild<LLUICtrl>("client")->setValue(getString("client_text_msg", mStringArgs) );
- getChild<LLUICtrl>("network")->setValue(getString("network_text_msg",mStringArgs) );
- getChild<LLUICtrl>("server")->setValue(getString("server_text_msg", mStringArgs) );
-
- // usually ">>"
- button->setLabel( getString("bigger_label", mStringArgs) );
- }
- // Don't put keyboard focus on the button
- button->setFocus(FALSE);
-
-// self->mClientText->setVisible(self->mShrunk);
-// self->mClientCause->setVisible(self->mShrunk);
-// self->getChildView("client_help")->setVisible( self->mShrunk);
-
-// self->mNetworkText->setVisible(self->mShrunk);
-// self->mNetworkCause->setVisible(self->mShrunk);
-// self->getChildView("network_help")->setVisible( self->mShrunk);
-
-// self->mServerText->setVisible(self->mShrunk);
-// self->mServerCause->setVisible(self->mShrunk);
-// self->getChildView("server_help")->setVisible( self->mShrunk);
-
-// self->mShrunk = !self->mShrunk;
-}
-
-BOOL LLFloaterLagMeter::isShrunk()
-{
- return gSavedSettings.getBOOL("LagMeterShrunk");
-}
-
-void LLFloaterLagMeter::onClickShrink() // toggle "LagMeterShrunk"
-{
- bool shrunk = isShrunk();
- updateControls(!shrunk);
- gSavedSettings.setBOOL("LagMeterShrunk", !shrunk);
-}
diff --git a/indra/newview/llfloaterlagmeter.h b/indra/newview/llfloaterlagmeter.h
deleted file mode 100755
index eef6955601..0000000000
--- a/indra/newview/llfloaterlagmeter.h
+++ /dev/null
@@ -1,80 +0,0 @@
-/**
- * @file llfloaterlagmeter.h
- * @brief The "Lag-o-Meter" floater used to tell users what is causing lag.
- *
- * $LicenseInfo:firstyear=2007&license=viewerlgpl$
- * Second Life Viewer Source Code
- * Copyright (C) 2010, Linden Research, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation;
- * version 2.1 of the License only.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- *
- * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
- * $/LicenseInfo$
- */
-
-#ifndef LLFLOATERLAGMETER_H
-#define LLFLOATERLAGMETER_H
-
-#include "llfloater.h"
-
-class LLTextBox;
-
-class LLFloaterLagMeter : public LLFloater
-{
- friend class LLFloaterReg;
-
-public:
- /*virtual*/ void draw();
- /*virtual*/ BOOL postBuild();
-private:
-
- LLFloaterLagMeter(const LLSD& key);
- /*virtual*/ ~LLFloaterLagMeter();
- void determineClient();
- void determineNetwork();
- void determineServer();
- void updateControls(bool shrink);
- BOOL isShrunk();
-
- void onClickShrink();
-
- bool mShrunk;
- S32 mMaxWidth, mMinWidth;
-
- F32 mClientFrameTimeCritical;
- F32 mClientFrameTimeWarning;
- LLButton * mClientButton;
- LLTextBox * mClientText;
- LLTextBox * mClientCause;
-
- F32 mNetworkPacketLossCritical;
- F32 mNetworkPacketLossWarning;
- F32 mNetworkPingCritical;
- F32 mNetworkPingWarning;
- LLButton * mNetworkButton;
- LLTextBox * mNetworkText;
- LLTextBox * mNetworkCause;
-
- F32 mServerFrameTimeCritical;
- F32 mServerFrameTimeWarning;
- F32 mServerSingleProcessMaxTime;
- LLButton * mServerButton;
- LLTextBox * mServerText;
- LLTextBox * mServerCause;
-
- LLStringUtil::format_map_t mStringArgs;
-};
-
-#endif
diff --git a/indra/newview/llfloaterland.cpp b/indra/newview/llfloaterland.cpp
index b16ef6dd79..e30bff1edf 100755
--- a/indra/newview/llfloaterland.cpp
+++ b/indra/newview/llfloaterland.cpp
@@ -225,7 +225,7 @@ void LLFloaterLand::onOpen(const LLSD& key)
refresh();
}
-void LLFloaterLand::onVisibilityChange(const LLSD& visible)
+void LLFloaterLand::onVisibilityChanged(const LLSD& visible)
{
if (!visible.asBoolean())
{
@@ -255,7 +255,7 @@ LLFloaterLand::LLFloaterLand(const LLSD& seed)
BOOL LLFloaterLand::postBuild()
{
- setVisibleCallback(boost::bind(&LLFloaterLand::onVisibilityChange, this, _2));
+ setVisibleCallback(boost::bind(&LLFloaterLand::onVisibilityChanged, this, _2));
LLTabContainer* tab = getChild<LLTabContainer>("landtab");
@@ -936,7 +936,7 @@ void LLPanelLandGeneral::onClickRelease(void*)
// static
void LLPanelLandGeneral::onClickReclaim(void*)
{
- lldebugs << "LLPanelLandGeneral::onClickReclaim()" << llendl;
+ LL_DEBUGS() << "LLPanelLandGeneral::onClickReclaim()" << LL_ENDL;
LLViewerParcelMgr::getInstance()->reclaimParcel();
}
@@ -1541,8 +1541,8 @@ void LLPanelLandObjects::processParcelObjectOwnersReply(LLMessageSystem *msg, vo
if (!self)
{
- llwarns << "Received message for nonexistent LLPanelLandObject"
- << llendl;
+ LL_WARNS() << "Received message for nonexistent LLPanelLandObject"
+ << LL_ENDL;
return;
}
@@ -1612,8 +1612,8 @@ void LLPanelLandObjects::processParcelObjectOwnersReply(LLMessageSystem *msg, vo
self->mOwnerList->addNameItemRow(item_params);
- lldebugs << "object owner " << owner_id << " (" << (is_group_owned ? "group" : "agent")
- << ") owns " << object_count << " objects." << llendl;
+ LL_DEBUGS() << "object owner " << owner_id << " (" << (is_group_owned ? "group" : "agent")
+ << ") owns " << object_count << " objects." << LL_ENDL;
}
// check for no results
if (0 == self->mOwnerList->getItemCount())
@@ -1797,11 +1797,11 @@ void LLPanelLandObjects::onCommitClean(LLUICtrl *caller, void* user_data)
{
lop->mOtherTime = return_time;
- parcel->setCleanOtherTime(lop->mOtherTime);
- send_other_clean_time_message(parcel->getLocalID(), lop->mOtherTime);
- }
+ parcel->setCleanOtherTime(lop->mOtherTime);
+ send_other_clean_time_message(parcel->getLocalID(), lop->mOtherTime);
}
}
+}
//---------------------------------------------------------------------------
@@ -1899,7 +1899,7 @@ BOOL LLPanelLandOptions::postBuild()
}
else
{
- llwarns << "LLUICtrlFactory::getTexturePickerByName() returned NULL for 'snapshot_ctrl'" << llendl;
+ LL_WARNS() << "LLUICtrlFactory::getTexturePickerByName() returned NULL for 'snapshot_ctrl'" << LL_ENDL;
}
diff --git a/indra/newview/llfloaterland.h b/indra/newview/llfloaterland.h
index 4f1c10274a..dccdfc9acb 100755
--- a/indra/newview/llfloaterland.h
+++ b/indra/newview/llfloaterland.h
@@ -88,7 +88,7 @@ private:
LLFloaterLand(const LLSD& seed);
virtual ~LLFloaterLand();
- void onVisibilityChange(const LLSD& visible);
+ void onVisibilityChanged(const LLSD& visible);
protected:
diff --git a/indra/newview/llfloaterlandholdings.cpp b/indra/newview/llfloaterlandholdings.cpp
index 98e9b74278..cf03087afb 100755
--- a/indra/newview/llfloaterlandholdings.cpp
+++ b/indra/newview/llfloaterlandholdings.cpp
@@ -72,19 +72,19 @@ BOOL LLFloaterLandHoldings::postBuild()
grant_list->sortByColumnIndex(0, TRUE);
grant_list->setDoubleClickCallback(onGrantList, this);
- S32 count = gAgent.mGroups.count();
+ S32 count = gAgent.mGroups.size();
for(S32 i = 0; i < count; ++i)
{
- LLUUID id(gAgent.mGroups.get(i).mID);
+ LLUUID id(gAgent.mGroups.at(i).mID);
LLSD element;
element["id"] = id;
element["columns"][0]["column"] = "group";
- element["columns"][0]["value"] = gAgent.mGroups.get(i).mName;
+ element["columns"][0]["value"] = gAgent.mGroups.at(i).mName;
element["columns"][0]["font"] = "SANSSERIF";
LLUIString areastr = getString("area_string");
- areastr.setArg("[AREA]", llformat("%d", gAgent.mGroups.get(i).mContribution));
+ areastr.setArg("[AREA]", llformat("%d", gAgent.mGroups.at(i).mContribution));
element["columns"][1]["column"] = "area";
element["columns"][1]["value"] = areastr;
element["columns"][1]["font"] = "SANSSERIF";
@@ -194,7 +194,7 @@ void LLFloaterLandHoldings::processPlacesReply(LLMessageSystem* msg, void**)
if ( msg->getSizeFast(_PREHASH_QueryData, i, _PREHASH_ProductSKU) > 0 )
{
msg->getStringFast( _PREHASH_QueryData, _PREHASH_ProductSKU, land_sku, i);
- llinfos << "Land sku: " << land_sku << llendl;
+ LL_INFOS() << "Land sku: " << land_sku << LL_ENDL;
land_type = LLProductInfoRequestManager::instance().getDescriptionForSku(land_sku);
}
else
diff --git a/indra/newview/llfloatermodelpreview.cpp b/indra/newview/llfloatermodelpreview.cpp
index 855836af7a..12c1a68ccd 100755
--- a/indra/newview/llfloatermodelpreview.cpp
+++ b/indra/newview/llfloatermodelpreview.cpp
@@ -113,8 +113,6 @@
#include "llviewernetwork.h"
#include "llviewershadermgr.h"
#include "glod/glod.h"
-#include <boost/algorithm/string.hpp>
-
const S32 SLM_SUPPORTED_VERSION = 3;
@@ -295,13 +293,13 @@ bool validate_face(const LLVolumeFace& face)
{
if(face.mPositions && !face.mPositions[v].isFinite3())
{
- llwarns << "NaN position data in face found!" << llendl;
+ LL_WARNS() << "NaN position data in face found!" << LL_ENDL;
return false;
}
if(face.mNormals && !face.mNormals[v].isFinite3())
{
- llwarns << "NaN normal data in face found!" << llendl;
+ LL_WARNS() << "NaN normal data in face found!" << LL_ENDL;
return false;
}
}
@@ -310,14 +308,14 @@ bool validate_face(const LLVolumeFace& face)
{
if (face.mIndices[i] >= face.mNumVertices)
{
- llwarns << "Face has invalid index." << llendl;
+ LL_WARNS() << "Face has invalid index." << LL_ENDL;
return false;
}
}
if (face.mNumIndices % 3 != 0 || face.mNumIndices == 0)
{
- llwarns << "Face has invalid number of indices." << llendl;
+ LL_WARNS() << "Face has invalid number of indices." << LL_ENDL;
return false;
}
@@ -337,7 +335,7 @@ bool validate_face(const LLVolumeFace& face)
if (ll_is_degenerate(v1,v2,v3))
{
- llwarns << "Degenerate face found!" << llendl;
+ LL_WARNS() << "Degenerate face found!" << LL_ENDL;
return false;
}
}*/
@@ -348,7 +346,7 @@ bool validate_model(const LLModel* mdl)
{
if (mdl->getNumVolumeFaces() == 0)
{
- llwarns << "Model has no faces!" << llendl;
+ LL_WARNS() << "Model has no faces!" << LL_ENDL;
return false;
}
@@ -356,13 +354,13 @@ bool validate_model(const LLModel* mdl)
{
if (mdl->getVolumeFace(i).mNumVertices == 0)
{
- llwarns << "Face has no vertices." << llendl;
+ LL_WARNS() << "Face has no vertices." << LL_ENDL;
return false;
}
if (mdl->getVolumeFace(i).mNumIndices == 0)
{
- llwarns << "Face has no indices." << llendl;
+ LL_WARNS() << "Face has no indices." << LL_ENDL;
return false;
}
@@ -381,7 +379,7 @@ BOOL stop_gloderror()
if (error != GLOD_NO_ERROR)
{
- llwarns << "GLOD error detected, cannot generate LOD: " << std::hex << error << llendl;
+ LL_WARNS() << "GLOD error detected, cannot generate LOD: " << std::hex << error << LL_ENDL;
return TRUE;
}
@@ -537,9 +535,9 @@ BOOL LLFloaterModelPreview::postBuild()
if (LLConvexDecomposition::getInstance() != NULL)
{
- mCalculateBtn->setClickedCallback(boost::bind(&LLFloaterModelPreview::onClickCalculateBtn, this));
+ mCalculateBtn->setClickedCallback(boost::bind(&LLFloaterModelPreview::onClickCalculateBtn, this));
- toggleCalculateButton(true);
+ toggleCalculateButton(true);
}
else
{
@@ -600,7 +598,7 @@ bool LLFloaterModelPreview::isViewOptionChecked(const LLSD& userdata)
bool LLFloaterModelPreview::isViewOptionEnabled(const LLSD& userdata)
{
- return childIsEnabled(userdata.asString());
+ return getChildView(userdata.asString())->getEnabled();
}
void LLFloaterModelPreview::setViewOptionEnabled(const std::string& option, bool enabled)
@@ -956,7 +954,7 @@ void LLFloaterModelPreview::onPhysicsParamCommit(LLUICtrl* ctrl, void* data)
{
if (LLConvexDecomposition::getInstance() == NULL)
{
- llinfos << "convex decomposition tool is a stub on this platform. cannot get decomp." << llendl;
+ LL_INFOS() << "convex decomposition tool is a stub on this platform. cannot get decomp." << LL_ENDL;
return;
}
@@ -1004,7 +1002,7 @@ void LLFloaterModelPreview::onPhysicsStageExecute(LLUICtrl* ctrl, void* data)
{
if (!sInstance->mCurRequest.empty())
{
- llinfos << "Decomposition request still pending." << llendl;
+ LL_INFOS() << "Decomposition request still pending." << LL_ENDL;
return;
}
@@ -1055,13 +1053,13 @@ void LLFloaterModelPreview::onPhysicsUseLOD(LLUICtrl* ctrl, void* userdata)
}
else
{
- llwarns << "no iface" << llendl;
+ LL_WARNS() << "no iface" << LL_ENDL;
return;
}
if (which_mode <= 0)
{
- llwarns << "which_mode out of range, " << which_mode << llendl;
+ LL_WARNS() << "which_mode out of range, " << which_mode << LL_ENDL;
}
S32 file_mode = iface->getItemCount() - 1;
@@ -1146,8 +1144,8 @@ void LLFloaterModelPreview::initDecompControls()
// protected against stub by stage_count being 0 for stub above
LLConvexDecomposition::getInstance()->registerCallback(j, LLPhysicsDecomp::llcdCallback);
- //llinfos << "Physics decomp stage " << stage[j].mName << " (" << j << ") parameters:" << llendl;
- //llinfos << "------------------------------------" << llendl;
+ //LL_INFOS() << "Physics decomp stage " << stage[j].mName << " (" << j << ") parameters:" << LL_ENDL;
+ //LL_INFOS() << "------------------------------------" << LL_ENDL;
for (S32 i = 0; i < param_count; ++i)
{
@@ -1161,12 +1159,12 @@ void LLFloaterModelPreview::initDecompControls()
std::string type = "unknown";
- llinfos << name << " - " << description << llendl;
+ LL_INFOS() << name << " - " << description << LL_ENDL;
if (param[i].mType == LLCDParam::LLCD_FLOAT)
{
mDecompParams[param[i].mName] = LLSD(param[i].mDefault.mFloat);
- //llinfos << "Type: float, Default: " << param[i].mDefault.mFloat << llendl;
+ //LL_INFOS() << "Type: float, Default: " << param[i].mDefault.mFloat << LL_ENDL;
LLUICtrl* ctrl = getChild<LLUICtrl>(name);
@@ -1216,7 +1214,7 @@ void LLFloaterModelPreview::initDecompControls()
else if (param[i].mType == LLCDParam::LLCD_INTEGER)
{
mDecompParams[param[i].mName] = LLSD(param[i].mDefault.mIntOrEnumValue);
- //llinfos << "Type: integer, Default: " << param[i].mDefault.mIntOrEnumValue << llendl;
+ //LL_INFOS() << "Type: integer, Default: " << param[i].mDefault.mIntOrEnumValue << LL_ENDL;
LLUICtrl* ctrl = getChild<LLUICtrl>(name);
@@ -1242,7 +1240,7 @@ void LLFloaterModelPreview::initDecompControls()
else if (param[i].mType == LLCDParam::LLCD_BOOLEAN)
{
mDecompParams[param[i].mName] = LLSD(param[i].mDefault.mBool);
- //llinfos << "Type: boolean, Default: " << (param[i].mDefault.mBool ? "True" : "False") << llendl;
+ //LL_INFOS() << "Type: boolean, Default: " << (param[i].mDefault.mBool ? "True" : "False") << LL_ENDL;
LLCheckBoxCtrl* check_box = getChild<LLCheckBoxCtrl>(name);
if (check_box)
@@ -1254,16 +1252,16 @@ void LLFloaterModelPreview::initDecompControls()
else if (param[i].mType == LLCDParam::LLCD_ENUM)
{
mDecompParams[param[i].mName] = LLSD(param[i].mDefault.mIntOrEnumValue);
- //llinfos << "Type: enum, Default: " << param[i].mDefault.mIntOrEnumValue << llendl;
+ //LL_INFOS() << "Type: enum, Default: " << param[i].mDefault.mIntOrEnumValue << LL_ENDL;
{ //plug into combo box
- //llinfos << "Accepted values: " << llendl;
+ //LL_INFOS() << "Accepted values: " << LL_ENDL;
LLComboBox* combo_box = getChild<LLComboBox>(name);
for (S32 k = 0; k < param[i].mDetails.mEnumValues.mNumEnums; ++k)
{
- //llinfos << param[i].mDetails.mEnumValues.mEnumsArray[k].mValue
- // << " - " << param[i].mDetails.mEnumValues.mEnumsArray[k].mName << llendl;
+ //LL_INFOS() << param[i].mDetails.mEnumValues.mEnumsArray[k].mValue
+ // << " - " << param[i].mDetails.mEnumValues.mEnumsArray[k].mName << LL_ENDL;
std::string name(param[i].mDetails.mEnumValues.mEnumsArray[k].mName);
std::string localized_name;
@@ -1276,9 +1274,9 @@ void LLFloaterModelPreview::initDecompControls()
combo_box->setCommitCallback(onPhysicsParamCommit, (void*) &param[i]);
}
- //llinfos << "----" << llendl;
+ //LL_INFOS() << "----" << LL_ENDL;
}
- //llinfos << "-----------------------------" << llendl;
+ //LL_INFOS() << "-----------------------------" << LL_ENDL;
}
}
@@ -1525,14 +1523,14 @@ bool LLModelLoader::doLoadModel()
if (!dom)
{
- llinfos<<" Error with dae - traditionally indicates a corrupt file."<<llendl;
+ LL_INFOS()<<" Error with dae - traditionally indicates a corrupt file."<<LL_ENDL;
setLoadState( ERROR_PARSING );
return false;
}
//Dom version
daeString domVersion = dae.getDomVersion();
std::string sldom(domVersion);
- llinfos<<"Collada Importer Version: "<<sldom<<llendl;
+ LL_INFOS()<<"Collada Importer Version: "<<sldom<<LL_ENDL;
//Dae version
domVersionType docVersion = dom->getVersion();
//0=1.4
@@ -1542,7 +1540,7 @@ bool LLModelLoader::doLoadModel()
{
docVersion = VERSIONTYPE_COUNT;
}
- llinfos<<"Dae version "<<colladaVersion[docVersion]<<llendl;
+ LL_INFOS()<<"Dae version "<<colladaVersion[docVersion]<<LL_ENDL;
daeDatabase* db = dae.getDatabase();
@@ -1552,14 +1550,14 @@ bool LLModelLoader::doLoadModel()
daeDocument* doc = dae.getDoc(mFilename);
if (!doc)
{
- llwarns << "can't find internal doc" << llendl;
+ LL_WARNS() << "can't find internal doc" << LL_ENDL;
return false;
}
daeElement* root = doc->getDomRoot();
if (!root)
{
- llwarns << "document has no root" << llendl;
+ LL_WARNS() << "document has no root" << LL_ENDL;
return false;
}
@@ -1724,7 +1722,7 @@ bool LLModelLoader::doLoadModel()
daeElement* pScene = root->getDescendant("visual_scene");
if ( !pScene )
{
- llwarns<<"No visual scene - unable to parse bone offsets "<<llendl;
+ LL_WARNS()<<"No visual scene - unable to parse bone offsets "<<LL_ENDL;
missingSkeletonOrScene = true;
}
else
@@ -1762,7 +1760,7 @@ bool LLModelLoader::doLoadModel()
//Build a joint for the resolver to work with
char str[64]={0};
sprintf(str,"./%s",(*jointIt).first.c_str() );
- //llwarns<<"Joint "<< str <<llendl;
+ //LL_WARNS()<<"Joint "<< str <<LL_ENDL;
//Setup the resolver
daeSIDResolver resolver( pSkeletonRootNode, str );
@@ -1795,7 +1793,7 @@ bool LLModelLoader::doLoadModel()
daeElement* pTranslateElement = getChildFromElement( pJoint, "translate" );
if ( pTranslateElement && pTranslateElement->typeID() != domTranslate::ID() )
{
- llwarns<< "The found element is not a translate node" <<llendl;
+ LL_WARNS()<< "The found element is not a translate node" <<LL_ENDL;
missingSkeletonOrScene = true;
}
else
@@ -1819,7 +1817,7 @@ bool LLModelLoader::doLoadModel()
//mention it
if ( missingSkeletonOrScene )
{
- llwarns<< "Partial jointmap found in asset - did you mean to just have a partial map?" << llendl;
+ LL_WARNS()<< "Partial jointmap found in asset - did you mean to just have a partial map?" << LL_ENDL;
}
}//got skeleton?
}
@@ -1932,7 +1930,7 @@ bool LLModelLoader::doLoadModel()
if ( mJointList.find( lookingForJoint ) != mJointList.end() )
{
- //llinfos<<"joint "<<lookingForJoint.c_str()<<llendl;
+ //LL_INFOS()<<"joint "<<lookingForJoint.c_str()<<LL_ENDL;
LLMatrix4 jointTransform = mJointList[lookingForJoint];
LLJoint* pJoint = mPreview->getPreviewAvatar()->getJoint( lookingForJoint );
if ( pJoint )
@@ -1942,7 +1940,7 @@ bool LLModelLoader::doLoadModel()
else
{
//Most likely an error in the asset.
- llwarns<<"Tried to apply joint position from .dae, but it did not exist in the avatar rig." << llendl;
+ LL_WARNS()<<"Tried to apply joint position from .dae, but it did not exist in the avatar rig." << LL_ENDL;
}
}
}
@@ -1970,7 +1968,7 @@ bool LLModelLoader::doLoadModel()
}
else
{
- llwarns<<"Possibly misnamed/missing joint [" <<lookingForJoint.c_str()<<" ] "<<llendl;
+ LL_WARNS()<<"Possibly misnamed/missing joint [" <<lookingForJoint.c_str()<<" ] "<<LL_ENDL;
}
}
@@ -1996,7 +1994,7 @@ bool LLModelLoader::doLoadModel()
{
if (pos.getCount() <= j+2)
{
- llerrs << "Invalid position array size." << llendl;
+ LL_ERRS() << "Invalid position array size." << LL_ENDL;
}
LLVector3 v(pos[j], pos[j+1], pos[j+2]);
@@ -2122,7 +2120,7 @@ bool LLModelLoader::doLoadModel()
if (!scene)
{
- llwarns << "document has no visual_scene" << llendl;
+ LL_WARNS() << "document has no visual_scene" << LL_ENDL;
setLoadState( ERROR_PARSING );
return true;
}
@@ -2337,7 +2335,7 @@ void LLModelLoader::processJointToNodeMapping( domNode* pNode )
}
else
{
- llinfos<<"Node is NULL"<<llendl;
+ LL_INFOS()<<"Node is NULL"<<LL_ENDL;
}
}
@@ -2408,7 +2406,7 @@ void LLModelPreview::critiqueJointToNodeMappingFromScene( void )
}
else
{
- llinfos<<"critiqueJointToNodeMappingFromScene is missing a: "<<name<<llendl;
+ LL_INFOS()<<"critiqueJointToNodeMappingFromScene is missing a: "<<name<<LL_ENDL;
result = false;
}
}
@@ -2460,7 +2458,7 @@ bool LLModelPreview::isRigLegacy( const std::vector<std::string> &jointListFromA
}
if ( !result )
{
- llinfos<<" Asset did not contain the joint (if you're u/l a fully rigged asset w/joint positions - it is required)." << *masterJointIt<< llendl;
+ LL_INFOS()<<" Asset did not contain the joint (if you're u/l a fully rigged asset w/joint positions - it is required)." << *masterJointIt<< LL_ENDL;
break;
}
}
@@ -2494,7 +2492,7 @@ bool LLModelPreview::isRigSuitableForJointPositionUpload( const std::vector<std:
}
if ( !result )
{
- llinfos<<" Asset did not contain the joint (if you're u/l a fully rigged asset w/joint positions - it is required)." << *masterJointIt<< llendl;
+ LL_INFOS()<<" Asset did not contain the joint (if you're u/l a fully rigged asset w/joint positions - it is required)." << *masterJointIt<< LL_ENDL;
break;
}
}
@@ -2542,17 +2540,17 @@ bool LLModelLoader::isNodeAJoint( domNode* pNode )
{
if ( !pNode )
{
- llinfos<<"Created node is NULL"<<llendl;
+ LL_INFOS()<<"Created node is NULL"<<LL_ENDL;
return false;
}
if ( pNode->getName() == NULL )
{
- llinfos<<"Parsed node has no name "<<llendl;
+ LL_INFOS()<<"Parsed node has no name "<<LL_ENDL;
//Attempt to write the node id, if possible (aids in debugging the visual scene)
if ( pNode->getId() )
{
- llinfos<<"Parsed node ID: "<<pNode->getId()<<llendl;
+ LL_INFOS()<<"Parsed node ID: "<<pNode->getId()<<LL_ENDL;
}
return false;
}
@@ -2571,7 +2569,7 @@ bool LLModelPreview::verifyCount( int expected, int result )
{
if ( expected != result )
{
- llinfos<< "Error: (expected/got)"<<expected<<"/"<<result<<"verts"<<llendl;
+ LL_INFOS()<< "Error: (expected/got)"<<expected<<"/"<<result<<"verts"<<LL_ENDL;
return false;
}
return true;
@@ -2593,7 +2591,7 @@ bool LLModelPreview::verifyController( domController* pController )
if ( !pElement )
{
- llinfos<<"Can't resolve skin source"<<llendl;
+ LL_INFOS()<<"Can't resolve skin source"<<LL_ENDL;
return false;
}
@@ -2612,7 +2610,7 @@ bool LLModelPreview::verifyController( domController* pController )
domVertices* pVertices = pMesh->getVertices();
if ( !pVertices )
{
- llinfos<<"No vertices!"<<llendl;
+ LL_INFOS()<<"No vertices!"<<LL_ENDL;
return false;
}
@@ -2698,7 +2696,7 @@ void LLModelLoader::extractTranslationViaSID( daeElement* pElement, LLMatrix4& t
}
else
{
- llwarns<<"Element is nonexistent - empty/unsupported node."<<llendl;
+ LL_WARNS()<<"Element is nonexistent - empty/unsupported node."<<LL_ENDL;
}
}
//-----------------------------------------------------------------------------
@@ -2708,11 +2706,11 @@ void LLModelLoader::processJointNode( domNode* pNode, JointTransformMap& jointTr
{
if (pNode->getName() == NULL)
{
- llwarns << "nameless node, can't process" << llendl;
+ LL_WARNS() << "nameless node, can't process" << LL_ENDL;
return;
}
- //llwarns<<"ProcessJointNode# Node:" <<pNode->getName()<<llendl;
+ //LL_WARNS()<<"ProcessJointNode# Node:" <<pNode->getName()<<LL_ENDL;
//1. handle the incoming node - extract out translation via SID or element
@@ -2740,12 +2738,12 @@ void LLModelLoader::processJointNode( domNode* pNode, JointTransformMap& jointTr
daeElement* pTranslateElement = getChildFromElement( pNode, "translate" );
if ( !pTranslateElement || pTranslateElement->typeID() != domTranslate::ID() )
{
- //llwarns<< "The found element is not a translate node" <<llendl;
+ //LL_WARNS()<< "The found element is not a translate node" <<LL_ENDL;
daeSIDResolver jointResolver( pNode, "./matrix" );
domMatrix* pMatrix = daeSafeCast<domMatrix>( jointResolver.getElement() );
if ( pMatrix )
{
- //llinfos<<"A matrix SID was however found!"<<llendl;
+ //LL_INFOS()<<"A matrix SID was however found!"<<LL_ENDL;
domFloat4x4 domArray = pMatrix->getValue();
for ( int i = 0; i < 4; i++ )
{
@@ -2757,7 +2755,7 @@ void LLModelLoader::processJointNode( domNode* pNode, JointTransformMap& jointTr
}
else
{
- llwarns<< "The found element is not translate or matrix node - most likely a corrupt export!" <<llendl;
+ LL_WARNS()<< "The found element is not translate or matrix node - most likely a corrupt export!" <<LL_ENDL;
}
}
else
@@ -2794,7 +2792,7 @@ daeElement* LLModelLoader::getChildFromElement( daeElement* pElement, std::strin
{
return pChildOfElement;
}
- llwarns<< "Could not find a child [" << name << "] for the element: \"" << pElement->getAttribute("id") << "\"" << llendl;
+ LL_WARNS()<< "Could not find a child [" << name << "] for the element: \"" << pElement->getAttribute("id") << "\"" << LL_ENDL;
return NULL;
}
@@ -2876,7 +2874,7 @@ void LLModelLoader::processElement( daeElement* element, bool& badElement )
if (mTransform.determinant() < 0)
{ //negative scales are not supported
- llinfos << "Negative scale detected, unsupported transform. domInstance_geometry: " << LLModel::getElementLabel(instance_geo) << llendl;
+ LL_INFOS() << "Negative scale detected, unsupported transform. domInstance_geometry: " << LLModel::getElementLabel(instance_geo) << LL_ENDL;
badElement = true;
}
@@ -2906,7 +2904,7 @@ void LLModelLoader::processElement( daeElement* element, bool& badElement )
}
else
{
- llinfos<<"Unable to resolve geometry URL."<<llendl;
+ LL_INFOS()<<"Unable to resolve geometry URL."<<LL_ENDL;
badElement = true;
}
@@ -3541,7 +3539,7 @@ void LLModelPreview::loadModel(std::string filename, S32 lod, bool force_disable
if (lod < LLModel::LOD_IMPOSTOR || lod > LLModel::NUM_LODS - 1)
{
- llwarns << "Invalid level of detail: " << lod << llendl;
+ LL_WARNS() << "Invalid level of detail: " << lod << LL_ENDL;
assert(lod >= LLModel::LOD_IMPOSTOR && lod < LLModel::NUM_LODS);
return;
}
@@ -3564,7 +3562,7 @@ void LLModelPreview::loadModel(std::string filename, S32 lod, bool force_disable
if (mModelLoader)
{
- llwarns << "Incompleted model load operation pending." << llendl;
+ LL_WARNS() << "Incompleted model load operation pending." << LL_ENDL;
return;
}
@@ -3596,11 +3594,11 @@ void LLModelPreview::loadModel(std::string filename, S32 lod, bool force_disable
if (lod == mPreviewLOD)
{
- mFMP->childSetText("lod_file_" + lod_name[lod], mLODFile[lod]);
+ mFMP->childSetValue("lod_file_" + lod_name[lod], mLODFile[lod]);
}
else if (lod == LLModel::LOD_PHYSICS)
{
- mFMP->childSetText("physics_file", mLODFile[lod]);
+ mFMP->childSetValue("physics_file", mLODFile[lod]);
}
mFMP->openFloater();
@@ -3615,7 +3613,7 @@ void LLModelPreview::setPhysicsFromLOD(S32 lod)
mModel[LLModel::LOD_PHYSICS] = mModel[lod];
mScene[LLModel::LOD_PHYSICS] = mScene[lod];
mLODFile[LLModel::LOD_PHYSICS].clear();
- mFMP->childSetText("physics_file", mLODFile[LLModel::LOD_PHYSICS]);
+ mFMP->childSetValue("physics_file", mLODFile[LLModel::LOD_PHYSICS]);
mVertexBuffer[LLModel::LOD_PHYSICS].clear();
rebuildUploadData();
refresh();
@@ -3874,7 +3872,7 @@ void LLModelPreview::genLODs(S32 which_lod, U32 decimation, bool enforce_tri_lim
// Allow LoD from -1 to LLModel::LOD_PHYSICS
if (which_lod < -1 || which_lod > LLModel::NUM_LODS - 1)
{
- llwarns << "Invalid level of detail: " << which_lod << llendl;
+ LL_WARNS() << "Invalid level of detail: " << which_lod << LL_ENDL;
assert(which_lod >= -1 && which_lod < LLModel::NUM_LODS);
return;
}
@@ -4162,7 +4160,7 @@ void LLModelPreview::genLODs(S32 which_lod, U32 decimation, bool enforce_tri_lim
if (!validate_face(target_model->getVolumeFace(names[i])))
{
- llerrs << "Invalid face generated during LOD generation." << llendl;
+ LL_ERRS() << "Invalid face generated during LOD generation." << LL_ENDL;
}
}
@@ -4177,7 +4175,7 @@ void LLModelPreview::genLODs(S32 which_lod, U32 decimation, bool enforce_tri_lim
if (!validate_model(target_model))
{
- llerrs << "Invalid model generated when creating LODs" << llendl;
+ LL_ERRS() << "Invalid model generated when creating LODs" << LL_ENDL;
}
delete [] sizes;
@@ -4331,8 +4329,8 @@ void LLModelPreview::updateStatusMessages()
if (total_tris[lod] > 0)
{
- mFMP->childSetText(lod_triangles_name[lod], llformat("%d", total_tris[lod]));
- mFMP->childSetText(lod_vertices_name[lod], llformat("%d", total_verts[lod]));
+ mFMP->childSetValue(lod_triangles_name[lod], llformat("%d", total_tris[lod]));
+ mFMP->childSetValue(lod_vertices_name[lod], llformat("%d", total_verts[lod]));
}
else
{
@@ -4353,8 +4351,8 @@ void LLModelPreview::updateStatusMessages()
}
}
- mFMP->childSetText(lod_triangles_name[lod], mesh_status_na);
- mFMP->childSetText(lod_vertices_name[lod], mesh_status_na);
+ mFMP->childSetValue(lod_triangles_name[lod], mesh_status_na);
+ mFMP->childSetValue(lod_vertices_name[lod], mesh_status_na);
}
const U32 lod_high = LLModel::LOD_HIGH;
@@ -4403,7 +4401,7 @@ void LLModelPreview::updateStatusMessages()
if (lod == mPreviewLOD)
{
- mFMP->childSetText("lod_status_message_text", mFMP->getString(message));
+ mFMP->childSetValue("lod_status_message_text", mFMP->getString(message));
icon = mFMP->getChild<LLIconCtrl>("lod_status_message_icon");
icon->setImage(img);
}
@@ -4622,7 +4620,7 @@ void LLModelPreview::updateLodControls(S32 lod)
{
if (lod < LLModel::LOD_IMPOSTOR || lod > LLModel::LOD_HIGH)
{
- llwarns << "Invalid level of detail: " << lod << llendl;
+ LL_WARNS() << "Invalid level of detail: " << lod << LL_ENDL;
assert(lod >= LLModel::LOD_IMPOSTOR && lod <= LLModel::LOD_HIGH);
return;
}
@@ -4654,12 +4652,12 @@ void LLModelPreview::updateLodControls(S32 lod)
fmp->mLODMode[lod] = 0;
for (U32 i = 0; i < num_file_controls; ++i)
{
- mFMP->childShow(file_controls[i] + lod_name[lod]);
+ mFMP->childSetVisible(file_controls[i] + lod_name[lod], true);
}
for (U32 i = 0; i < num_lod_controls; ++i)
{
- mFMP->childHide(lod_controls[i] + lod_name[lod]);
+ mFMP->childSetVisible(lod_controls[i] + lod_name[lod], false);
}
}
else if (lod_mode == USE_LOD_ABOVE) // use LoD above
@@ -4667,12 +4665,12 @@ void LLModelPreview::updateLodControls(S32 lod)
fmp->mLODMode[lod] = 2;
for (U32 i = 0; i < num_file_controls; ++i)
{
- mFMP->childHide(file_controls[i] + lod_name[lod]);
+ mFMP->childSetVisible(file_controls[i] + lod_name[lod], false);
}
for (U32 i = 0; i < num_lod_controls; ++i)
{
- mFMP->childHide(lod_controls[i] + lod_name[lod]);
+ mFMP->childSetVisible(lod_controls[i] + lod_name[lod], false);
}
if (lod < LLModel::LOD_HIGH)
@@ -4697,12 +4695,12 @@ void LLModelPreview::updateLodControls(S32 lod)
for (U32 i = 0; i < num_file_controls; ++i)
{
- mFMP->childHide(file_controls[i] + lod_name[lod]);
+ mFMP->getChildView(file_controls[i] + lod_name[lod])->setVisible(false);
}
for (U32 i = 0; i < num_lod_controls; ++i)
{
- mFMP->childShow(lod_controls[i] + lod_name[lod]);
+ mFMP->getChildView(lod_controls[i] + lod_name[lod])->setVisible(true);
}
@@ -4935,7 +4933,7 @@ void LLModelPreview::createPreviewAvatar( void )
}
else
{
- llinfos<<"Failed to create preview avatar for upload model window"<<llendl;
+ LL_INFOS()<<"Failed to create preview avatar for upload model window"<<LL_ENDL;
}
}
@@ -5653,7 +5651,7 @@ void LLModelPreview::setPreviewLOD(S32 lod)
LLComboBox* combo_box = mFMP->getChild<LLComboBox>("preview_lod_combo");
combo_box->setCurrentByIndex((NUM_LOD-1)-mPreviewLOD); // combo box list of lods is in reverse order
- mFMP->childSetText("lod_file_" + lod_name[mPreviewLOD], mLODFile[mPreviewLOD]);
+ mFMP->childSetValue("lod_file_" + lod_name[mPreviewLOD], mLODFile[mPreviewLOD]);
LLComboBox* combo_box2 = mFMP->getChild<LLComboBox>("preview_lod_combo2");
combo_box2->setCurrentByIndex((NUM_LOD-1)-mPreviewLOD); // combo box list of lods is in reverse order
@@ -5865,7 +5863,7 @@ void LLFloaterModelPreview::handleModelPhysicsFeeReceived()
void LLFloaterModelPreview::setModelPhysicsFeeErrorStatus(U32 status, const std::string& reason)
{
- llwarns << "LLFloaterModelPreview::setModelPhysicsFeeErrorStatus(" << status << " : " << reason << ")" << llendl;
+ LL_WARNS() << "LLFloaterModelPreview::setModelPhysicsFeeErrorStatus(" << status << " : " << reason << ")" << LL_ENDL;
doOnIdleOneTime(boost::bind(&LLFloaterModelPreview::toggleCalculateButton, this, true));
}
@@ -5941,7 +5939,7 @@ void LLFloaterModelPreview::onPermissionsReceived(const LLSD& result)
void LLFloaterModelPreview::setPermissonsErrorStatus(U32 status, const std::string& reason)
{
- llwarns << "LLFloaterModelPreview::setPermissonsErrorStatus(" << status << " : " << reason << ")" << llendl;
+ LL_WARNS() << "LLFloaterModelPreview::setPermissonsErrorStatus(" << status << " : " << reason << ")" << LL_ENDL;
LLNotificationsUtil::add("MeshUploadPermError");
}
diff --git a/indra/newview/llfloatermodeluploadbase.cpp b/indra/newview/llfloatermodeluploadbase.cpp
index 6d3800bfa4..2ad2d32652 100755
--- a/indra/newview/llfloatermodeluploadbase.cpp
+++ b/indra/newview/llfloatermodeluploadbase.cpp
@@ -44,7 +44,7 @@ void LLFloaterModelUploadBase::requestAgentUploadPermissions()
if (!url.empty())
{
- llinfos<< typeid(*this).name() <<"::requestAgentUploadPermissions() requesting for upload model permissions from: "<< url <<llendl;
+ LL_INFOS()<< typeid(*this).name() <<"::requestAgentUploadPermissions() requesting for upload model permissions from: "<< url <<LL_ENDL;
LLHTTPClient::get(url, new LLUploadModelPremissionsResponder(getPermObserverHandle()));
}
else
diff --git a/indra/newview/llfloaternotificationsconsole.cpp b/indra/newview/llfloaternotificationsconsole.cpp
index 4f35c325a8..c21e4ff7e8 100755
--- a/indra/newview/llfloaternotificationsconsole.cpp
+++ b/indra/newview/llfloaternotificationsconsole.cpp
@@ -257,7 +257,7 @@ void LLFloaterNotification::respond()
LLComboBox* responses_combo = getChild<LLComboBox>("response");
LLCtrlListInterface* response_list = responses_combo->getListInterface();
const std::string& trigger = response_list->getSelectedValue().asString();
- //llinfos << trigger << llendl;
+ //LL_INFOS() << trigger << LL_ENDL;
LLSD response = mNote->getResponseTemplate();
response[trigger] = true;
diff --git a/indra/newview/llfloaterobjectweights.cpp b/indra/newview/llfloaterobjectweights.cpp
index 0862cd2897..94bf8974bb 100755
--- a/indra/newview/llfloaterobjectweights.cpp
+++ b/indra/newview/llfloaterobjectweights.cpp
@@ -207,7 +207,7 @@ void LLFloaterObjectWeights::refresh()
}
else
{
- llwarns << "Failed to get region capabilities" << llendl;
+ LL_WARNS() << "Failed to get region capabilities" << LL_ENDL;
}
}
}
diff --git a/indra/newview/llfloateroutbox.cpp b/indra/newview/llfloateroutbox.cpp
index 29a3e6ac3a..1e9cf62067 100755
--- a/indra/newview/llfloateroutbox.cpp
+++ b/indra/newview/llfloateroutbox.cpp
@@ -281,7 +281,7 @@ void LLFloaterOutbox::setStatusString(const std::string& statusString)
void LLFloaterOutbox::updateFolderCount()
{
- S32 item_count = 0;
+ U32 item_count = 0;
if (mOutboxId.notNull())
{
@@ -289,7 +289,7 @@ void LLFloaterOutbox::updateFolderCount()
LLInventoryModel::item_array_t * items;
gInventory.getDirectDescendentsOf(mOutboxId, cats, items);
- item_count = cats->count() + items->count();
+ item_count = cats->size() + items->size();
}
mOutboxItemCount = item_count;
diff --git a/indra/newview/llfloaterpathfindingconsole.cpp b/indra/newview/llfloaterpathfindingconsole.cpp
index 161259d049..ccf3e723fd 100755
--- a/indra/newview/llfloaterpathfindingconsole.cpp
+++ b/indra/newview/llfloaterpathfindingconsole.cpp
@@ -207,7 +207,7 @@ void LLFloaterPathfindingConsole::onOpen(const LLSD& pKey)
if ( LLPathingLib::getInstance() == NULL )
{
setConsoleState(kConsoleStateLibraryNotImplemented);
- llwarns <<"Errror: cannot find pathing library implementation."<<llendl;
+ LL_WARNS() <<"Errror: cannot find pathing library implementation."<<LL_ENDL;
}
else
{
diff --git a/indra/newview/llfloaterpreference.cpp b/indra/newview/llfloaterpreference.cpp
index b50a2e6f85..c6b92d20bb 100755
--- a/indra/newview/llfloaterpreference.cpp
+++ b/indra/newview/llfloaterpreference.cpp
@@ -37,7 +37,6 @@
#include "message.h"
#include "llfloaterautoreplacesettings.h"
#include "llagent.h"
-#include "llavatarconstants.h"
#include "llcheckboxctrl.h"
#include "llcolorswatch.h"
#include "llcombobox.h"
@@ -113,6 +112,10 @@
const F32 MAX_USER_FAR_CLIP = 512.f;
const F32 MIN_USER_FAR_CLIP = 64.f;
const F32 BANDWIDTH_UPDATER_TIMEOUT = 0.5f;
+char const* const VISIBILITY_DEFAULT = "default";
+char const* const VISIBILITY_HIDDEN = "hidden";
+char const* const VISIBILITY_VISIBLE = "visible";
+char const* const VISIBILITY_INVISIBLE = "invisible";
//control value for middle mouse as talk2push button
const static std::string MIDDLE_MOUSE_CV = "MiddleMouse";
@@ -832,7 +835,7 @@ void LLFloaterPreference::onBtnOK()
else
{
// Show beep, pop up dialog, etc.
- llinfos << "Can't close preferences!" << llendl;
+ LL_INFOS() << "Can't close preferences!" << LL_ENDL;
}
LLPanelLogin::updateLocationSelectorsVisibility();
diff --git a/indra/newview/llfloaterproperties.cpp b/indra/newview/llfloaterproperties.cpp
index 3f00ba39c7..a3bf99f054 100755
--- a/indra/newview/llfloaterproperties.cpp
+++ b/indra/newview/llfloaterproperties.cpp
@@ -561,7 +561,7 @@ void LLFloaterProperties::onClickOwner()
// static
void LLFloaterProperties::onCommitName()
{
- //llinfos << "LLFloaterProperties::onCommitName()" << llendl;
+ //LL_INFOS() << "LLFloaterProperties::onCommitName()" << LL_ENDL;
LLViewerInventoryItem* item = (LLViewerInventoryItem*)findItem();
if(!item)
{
@@ -597,7 +597,7 @@ void LLFloaterProperties::onCommitName()
void LLFloaterProperties::onCommitDescription()
{
- //llinfos << "LLFloaterProperties::onCommitDescription()" << llendl;
+ //LL_INFOS() << "LLFloaterProperties::onCommitDescription()" << LL_ENDL;
LLViewerInventoryItem* item = (LLViewerInventoryItem*)findItem();
if(!item) return;
@@ -635,7 +635,7 @@ void LLFloaterProperties::onCommitDescription()
// static
void LLFloaterProperties::onCommitPermissions()
{
- //llinfos << "LLFloaterProperties::onCommitPermissions()" << llendl;
+ //LL_INFOS() << "LLFloaterProperties::onCommitPermissions()" << LL_ENDL;
LLViewerInventoryItem* item = (LLViewerInventoryItem*)findItem();
if(!item) return;
LLPermissions perm(item->getPermissions());
@@ -732,14 +732,14 @@ void LLFloaterProperties::onCommitPermissions()
// static
void LLFloaterProperties::onCommitSaleInfo()
{
- //llinfos << "LLFloaterProperties::onCommitSaleInfo()" << llendl;
+ //LL_INFOS() << "LLFloaterProperties::onCommitSaleInfo()" << LL_ENDL;
updateSaleInfo();
}
// static
void LLFloaterProperties::onCommitSaleType()
{
- //llinfos << "LLFloaterProperties::onCommitSaleType()" << llendl;
+ //LL_INFOS() << "LLFloaterProperties::onCommitSaleType()" << LL_ENDL;
updateSaleInfo();
}
diff --git a/indra/newview/llfloaterregiondebugconsole.cpp b/indra/newview/llfloaterregiondebugconsole.cpp
index 3a7ca17b73..bed34abee8 100755
--- a/indra/newview/llfloaterregiondebugconsole.cpp
+++ b/indra/newview/llfloaterregiondebugconsole.cpp
@@ -123,8 +123,8 @@ namespace
const LLSD& context,
const LLSD& input) const
{
- llinfos << "Received response from the debug console: "
- << input << llendl;
+ LL_INFOS() << "Received response from the debug console: "
+ << input << LL_ENDL;
sConsoleReplySignal(input["body"].asString());
}
};
diff --git a/indra/newview/llfloaterregioninfo.cpp b/indra/newview/llfloaterregioninfo.cpp
index 73c0963a1d..8d1114e056 100755
--- a/indra/newview/llfloaterregioninfo.cpp
+++ b/indra/newview/llfloaterregioninfo.cpp
@@ -281,7 +281,7 @@ void LLFloaterRegionInfo::processEstateOwnerRequest(LLMessageSystem* msg,void**)
LLDispatcher::unpackMessage(msg, request, invoice, strings);
if(invoice != getLastInvoice())
{
- llwarns << "Mismatched Estate message: " << request << llendl;
+ LL_WARNS() << "Mismatched Estate message: " << request << LL_ENDL;
return;
}
@@ -559,7 +559,7 @@ void LLPanelRegionInfo::sendEstateOwnerMessage(
const LLUUID& invoice,
const strings_t& strings)
{
- llinfos << "Sending estate request '" << request << "'" << llendl;
+ LL_INFOS() << "Sending estate request '" << request << "'" << LL_ENDL;
msg->newMessage("EstateOwnerMessage");
msg->nextBlockFast(_PREHASH_AgentData);
msg->addUUIDFast(_PREHASH_AgentID, gAgent.getID());
@@ -654,7 +654,7 @@ BOOL LLPanelRegionGeneralInfo::postBuild()
void LLPanelRegionGeneralInfo::onClickKick()
{
- llinfos << "LLPanelRegionGeneralInfo::onClickKick" << llendl;
+ LL_INFOS() << "LLPanelRegionGeneralInfo::onClickKick" << LL_ENDL;
// this depends on the grandparent view being a floater
// in order to set up floater dependency
@@ -691,7 +691,7 @@ void LLPanelRegionGeneralInfo::onKickCommit(const uuid_vec_t& ids)
// static
void LLPanelRegionGeneralInfo::onClickKickAll(void* userdata)
{
- llinfos << "LLPanelRegionGeneralInfo::onClickKickAll" << llendl;
+ LL_INFOS() << "LLPanelRegionGeneralInfo::onClickKickAll" << LL_ENDL;
LLNotificationsUtil::add("KickUsersFromRegion",
LLSD(),
LLSD(),
@@ -719,7 +719,7 @@ bool LLPanelRegionGeneralInfo::onKickAllCommit(const LLSD& notification, const L
// static
void LLPanelRegionGeneralInfo::onClickMessage(void* userdata)
{
- llinfos << "LLPanelRegionGeneralInfo::onClickMessage" << llendl;
+ LL_INFOS() << "LLPanelRegionGeneralInfo::onClickMessage" << LL_ENDL;
LLNotificationsUtil::add("MessageRegion",
LLSD(),
LLSD(),
@@ -734,7 +734,7 @@ bool LLPanelRegionGeneralInfo::onMessageCommit(const LLSD& notification, const L
std::string text = response["message"].asString();
if (text.empty()) return false;
- llinfos << "Message to everyone: " << text << llendl;
+ LL_INFOS() << "Message to everyone: " << text << LL_ENDL;
strings_t strings;
// [0] grid_x, unused here
// [1] grid_y, unused here
@@ -761,8 +761,8 @@ public:
/*virtual*/
void errorWithContent(U32 status, const std::string& reason, const LLSD& content)
{
- llwarns << "ConsoleRequestResponder error requesting mesh_rez_enabled [status:"
- << status << "]: " << content << llendl;
+ LL_WARNS() << "ConsoleRequestResponder error requesting mesh_rez_enabled [status:"
+ << status << "]: " << content << LL_ENDL;
}
};
@@ -774,8 +774,8 @@ public:
/* virtual */
void errorWithContent(U32 status, const std::string& reason, const LLSD& content)
{
- llwarns << "ConsoleRequestResponder error updating mesh enabled region setting [status:"
- << status << "]: " << content << llendl;
+ LL_WARNS() << "ConsoleRequestResponder error updating mesh enabled region setting [status:"
+ << status << "]: " << content << LL_ENDL;
}
};
@@ -807,7 +807,7 @@ void LLFloaterRegionInfo::requestMeshRezInfo()
// strings[9] = 'Y' - block parcel search, 'N' - allow
BOOL LLPanelRegionGeneralInfo::sendUpdate()
{
- llinfos << "LLPanelRegionGeneralInfo::sendUpdate()" << llendl;
+ LL_INFOS() << "LLPanelRegionGeneralInfo::sendUpdate()" << LL_ENDL;
// First try using a Cap. If that fails use the old method.
LLSD body;
@@ -919,7 +919,7 @@ bool LLPanelRegionDebugInfo::refreshFromRegion(LLViewerRegion* region)
// virtual
BOOL LLPanelRegionDebugInfo::sendUpdate()
{
- llinfos << "LLPanelRegionDebugInfo::sendUpdate" << llendl;
+ LL_INFOS() << "LLPanelRegionDebugInfo::sendUpdate" << LL_ENDL;
strings_t strings;
std::string buffer;
@@ -1091,7 +1091,7 @@ BOOL LLPanelRegionTerrainInfo::validateTextureSizes()
S32 width = img->getFullWidth();
S32 height = img->getFullHeight();
- //llinfos << "texture detail " << i << " is " << width << "x" << height << "x" << components << llendl;
+ //LL_INFOS() << "texture detail " << i << " is " << width << "x" << height << "x" << components << LL_ENDL;
if (components != 3)
{
@@ -1177,8 +1177,8 @@ bool LLPanelRegionTerrainInfo::refreshFromRegion(LLViewerRegion* region)
texture_ctrl = getChild<LLTextureCtrl>(buffer);
if(texture_ctrl)
{
- lldebugs << "Detail Texture " << i << ": "
- << compp->getDetailTextureID(i) << llendl;
+ LL_DEBUGS() << "Detail Texture " << i << ": "
+ << compp->getDetailTextureID(i) << LL_ENDL;
LLUUID tmp_id(compp->getDetailTextureID(i));
texture_ctrl->setImageAssetID(tmp_id);
}
@@ -1194,7 +1194,7 @@ bool LLPanelRegionTerrainInfo::refreshFromRegion(LLViewerRegion* region)
}
else
{
- lldebugs << "no region set" << llendl;
+ LL_DEBUGS() << "no region set" << LL_ENDL;
getChild<LLUICtrl>("region_text")->setValue(LLSD(""));
}
@@ -1209,7 +1209,7 @@ bool LLPanelRegionTerrainInfo::refreshFromRegion(LLViewerRegion* region)
// virtual
BOOL LLPanelRegionTerrainInfo::sendUpdate()
{
- llinfos << "LLPanelRegionTerrainInfo::sendUpdate" << llendl;
+ LL_INFOS() << "LLPanelRegionTerrainInfo::sendUpdate" << LL_ENDL;
std::string buffer;
strings_t strings;
LLUUID invoice(LLFloaterRegionInfo::getLastInvoice());
@@ -1278,7 +1278,7 @@ void LLPanelRegionTerrainInfo::onClickDownloadRaw(void* data)
LLFilePicker& picker = LLFilePicker::instance();
if (!picker.getSaveFile(LLFilePicker::FFSAVE_RAW, "terrain.raw"))
{
- llwarns << "No file" << llendl;
+ LL_WARNS() << "No file" << LL_ENDL;
return;
}
std::string filepath = picker.getFirstFile();
@@ -1298,7 +1298,7 @@ void LLPanelRegionTerrainInfo::onClickUploadRaw(void* data)
LLFilePicker& picker = LLFilePicker::instance();
if (!picker.getOpenFile(LLFilePicker::FFLOAD_RAW))
{
- llwarns << "No file" << llendl;
+ LL_WARNS() << "No file" << LL_ENDL;
return;
}
std::string filepath = picker.getFirstFile();
@@ -2048,7 +2048,7 @@ void LLPanelEstateInfo::updateChild(LLUICtrl* child_ctrl)
bool LLPanelEstateInfo::estateUpdate(LLMessageSystem* msg)
{
- llinfos << "LLPanelEstateInfo::estateUpdate()" << llendl;
+ LL_INFOS() << "LLPanelEstateInfo::estateUpdate()" << LL_ENDL;
return false;
}
@@ -2148,7 +2148,7 @@ void LLPanelEstateInfo::refreshFromEstate()
BOOL LLPanelEstateInfo::sendUpdate()
{
- llinfos << "LLPanelEsateInfo::sendUpdate()" << llendl;
+ LL_INFOS() << "LLPanelEsateInfo::sendUpdate()" << LL_ENDL;
LLNotification::Params params("ChangeLindenEstate");
params.functor.function(boost::bind(&LLPanelEstateInfo::callbackChangeLindenEstate, this, _1, _2));
@@ -2243,7 +2243,7 @@ public:
// if we get a normal response, handle it here
virtual void result(const LLSD& content)
{
- LL_INFOS("Windlight") << "Successfully committed estate info" << llendl;
+ LL_INFOS("Windlight") << "Successfully committed estate info" << LL_ENDL;
// refresh the panel from the database
LLPanelEstateInfo* panel = dynamic_cast<LLPanelEstateInfo*>(mpPanel.get());
@@ -2254,8 +2254,8 @@ public:
// if we get an error response
virtual void errorWithContent(U32 status, const std::string& reason, const LLSD& content)
{
- llinfos << "LLEstateChangeInfoResponder::error [status:"
- << status << "]: " << content << llendl;
+ LL_INFOS() << "LLEstateChangeInfoResponder::error [status:"
+ << status << "]: " << content << LL_ENDL;
}
private:
LLHandle<LLPanel> mpPanel;
@@ -2290,7 +2290,7 @@ void LLPanelEstateInfo::clearAccessLists()
// static
void LLPanelEstateInfo::onClickMessageEstate(void* userdata)
{
- llinfos << "LLPanelEstateInfo::onClickMessageEstate" << llendl;
+ LL_INFOS() << "LLPanelEstateInfo::onClickMessageEstate" << LL_ENDL;
LLNotificationsUtil::add("MessageEstate", LLSD(), LLSD(), boost::bind(&LLPanelEstateInfo::onMessageCommit, (LLPanelEstateInfo*)userdata, _1, _2));
}
@@ -2300,7 +2300,7 @@ bool LLPanelEstateInfo::onMessageCommit(const LLSD& notification, const LLSD& re
std::string text = response["message"].asString();
if(option != 0) return false;
if(text.empty()) return false;
- llinfos << "Message to everyone: " << text << llendl;
+ LL_INFOS() << "Message to everyone: " << text << LL_ENDL;
strings_t strings;
//integers_t integers;
std::string name;
@@ -2377,7 +2377,7 @@ bool LLPanelEstateCovenant::refreshFromRegion(LLViewerRegion* region)
// virtual
bool LLPanelEstateCovenant::estateUpdate(LLMessageSystem* msg)
{
- llinfos << "LLPanelEstateCovenant::estateUpdate()" << llendl;
+ LL_INFOS() << "LLPanelEstateCovenant::estateUpdate()" << LL_ENDL;
return true;
}
@@ -2511,7 +2511,7 @@ void LLPanelEstateCovenant::onLoadComplete(LLVFS *vfs,
LLAssetType::EType type,
void* user_data, S32 status, LLExtStat ext_status)
{
- llinfos << "LLPanelEstateCovenant::onLoadComplete()" << llendl;
+ LL_INFOS() << "LLPanelEstateCovenant::onLoadComplete()" << LL_ENDL;
LLPanelEstateCovenant* panelp = (LLPanelEstateCovenant*)user_data;
if( panelp )
{
@@ -2530,7 +2530,7 @@ void LLPanelEstateCovenant::onLoadComplete(LLVFS *vfs,
{
if( !panelp->mEditor->importBuffer( &buffer[0], file_length+1 ) )
{
- llwarns << "Problem importing estate covenant." << llendl;
+ LL_WARNS() << "Problem importing estate covenant." << LL_ENDL;
LLNotificationsUtil::add("ProblemImportingEstateCovenant");
}
else
@@ -2546,8 +2546,6 @@ void LLPanelEstateCovenant::onLoadComplete(LLVFS *vfs,
}
else
{
- LLViewerStats::getInstance()->incStat( LLViewerStats::ST_DOWNLOAD_FAILED );
-
if( LL_ERR_ASSET_REQUEST_NOT_IN_DATABASE == status ||
LL_ERR_FILE_EMPTY == status)
{
@@ -2562,7 +2560,7 @@ void LLPanelEstateCovenant::onLoadComplete(LLVFS *vfs,
LLNotificationsUtil::add("UnableToLoadNotecardAsset");
}
- llwarns << "Problem loading notecard: " << status << llendl;
+ LL_WARNS() << "Problem loading notecard: " << status << LL_ENDL;
}
panelp->mAssetStatus = ASSET_LOADED;
panelp->setCovenantID(asset_uuid);
@@ -2684,7 +2682,7 @@ bool LLDispatchEstateUpdateInfo::operator()(
const LLUUID& invoice,
const sparam_t& strings)
{
- lldebugs << "Received estate update" << llendl;
+ LL_DEBUGS() << "Received estate update" << LL_ENDL;
// Update estate info model.
// This will call LLPanelEstateInfo::refreshFromEstate().
@@ -2726,22 +2724,22 @@ bool LLDispatchSetEstateAccess::operator()(
if (num_allowed_agents > 0
&& !(access_flags & ESTATE_ACCESS_ALLOWED_AGENTS))
{
- llwarns << "non-zero count for allowed agents, but no corresponding flag" << llendl;
+ LL_WARNS() << "non-zero count for allowed agents, but no corresponding flag" << LL_ENDL;
}
if (num_allowed_groups > 0
&& !(access_flags & ESTATE_ACCESS_ALLOWED_GROUPS))
{
- llwarns << "non-zero count for allowed groups, but no corresponding flag" << llendl;
+ LL_WARNS() << "non-zero count for allowed groups, but no corresponding flag" << LL_ENDL;
}
if (num_banned_agents > 0
&& !(access_flags & ESTATE_ACCESS_BANNED_AGENTS))
{
- llwarns << "non-zero count for banned agents, but no corresponding flag" << llendl;
+ LL_WARNS() << "non-zero count for banned agents, but no corresponding flag" << LL_ENDL;
}
if (num_estate_managers > 0
&& !(access_flags & ESTATE_ACCESS_MANAGERS))
{
- llwarns << "non-zero count for managers, but no corresponding flag" << llendl;
+ LL_WARNS() << "non-zero count for managers, but no corresponding flag" << LL_ENDL;
}
// grab the UUID's out of the string fields
@@ -2924,7 +2922,7 @@ void LLPanelEnvironmentInfo::onOpen(const LLSD& key)
}
// virtual
-void LLPanelEnvironmentInfo::handleVisibilityChange(BOOL new_visibility)
+void LLPanelEnvironmentInfo::onVisibilityChange(BOOL new_visibility)
{
// If hiding (user switched to another tab or closed the floater),
// display user's preferred environment.
@@ -3049,7 +3047,7 @@ void LLPanelEnvironmentInfo::fixEstateSun()
LLEstateInfoModel& estate_info = LLEstateInfoModel::instance();
if (estate_info.getUseFixedSun())
{
- llinfos << "Switching estate to global sun" << llendl;
+ LL_INFOS() << "Switching estate to global sun" << LL_ENDL;
estate_info.setUseFixedSun(false);
estate_info.sendEstateInfo();
}
@@ -3190,7 +3188,7 @@ bool LLPanelEnvironmentInfo::getSelectedWaterParams(LLSD& water_params)
LLWaterParamSet param_set;
if (!LLWaterParamManager::instance().getParamSet(water_key.name, param_set))
{
- llwarns << "Error getting water preset: " << water_key.name << llendl;
+ LL_WARNS() << "Error getting water preset: " << water_key.name << LL_ENDL;
return false;
}
@@ -3209,7 +3207,7 @@ bool LLPanelEnvironmentInfo::getSelectedSkyParams(LLSD& sky_params, std::string&
LLWLParamSet param_set;
if (!LLWLParamManager::instance().getParamSet(preset, param_set))
{
- llwarns << "Error getting sky params: " << preset.toLLSD() << llendl;
+ LL_WARNS() << "Error getting sky params: " << preset.toLLSD() << LL_ENDL;
return false;
}
@@ -3234,7 +3232,7 @@ bool LLPanelEnvironmentInfo::getSelectedDayCycleParams(LLSD& day_cycle, LLSD& sk
{
if (!LLDayCycleManager::instance().getPreset(dc.name, day_cycle))
{
- llwarns << "Error getting day cycle " << dc.name << llendl;
+ LL_WARNS() << "Error getting day cycle " << dc.name << LL_ENDL;
return false;
}
@@ -3401,7 +3399,7 @@ void LLPanelEnvironmentInfo::onBtnApply()
new_region_settings.saveParams(day_cycle, sky_map, water_params, 0.0f);
if (!LLEnvManagerNew::instance().sendRegionSettings(new_region_settings))
{
- llwarns << "Error applying region environment settings" << llendl;
+ LL_WARNS() << "Error applying region environment settings" << LL_ENDL;
return;
}
diff --git a/indra/newview/llfloaterregioninfo.h b/indra/newview/llfloaterregioninfo.h
index f0499f1903..dd961e21b2 100755
--- a/indra/newview/llfloaterregioninfo.h
+++ b/indra/newview/llfloaterregioninfo.h
@@ -402,7 +402,7 @@ public:
/*virtual*/ void onOpen(const LLSD& key);
// LLView
- /*virtual*/ void handleVisibilityChange(BOOL new_visibility);
+ /*virtual*/ void onVisibilityChange(BOOL new_visibility);
// LLPanelRegionInfo
/*virtual*/ bool refreshFromRegion(LLViewerRegion* region);
diff --git a/indra/newview/llfloaterreporter.cpp b/indra/newview/llfloaterreporter.cpp
index 35b63c5480..825159703c 100755
--- a/indra/newview/llfloaterreporter.cpp
+++ b/indra/newview/llfloaterreporter.cpp
@@ -460,7 +460,7 @@ void LLFloaterReporter::showFromMenu(EReportType report_type)
{
if (COMPLAINT_REPORT != report_type)
{
- llwarns << "Unknown LLViewerReporter type : " << report_type << llendl;
+ LL_WARNS() << "Unknown LLViewerReporter type : " << report_type << LL_ENDL;
return;
}
@@ -746,7 +746,7 @@ void LLFloaterReporter::takeScreenshot()
LLPointer<LLImageRaw> raw = new LLImageRaw;
if( !gViewerWindow->rawSnapshot(raw, IMAGE_WIDTH, IMAGE_HEIGHT, TRUE, FALSE, TRUE, FALSE))
{
- llwarns << "Unable to take screenshot" << llendl;
+ LL_WARNS() << "Unable to take screenshot" << LL_ENDL;
return;
}
LLPointer<LLImageJ2C> upload_data = LLViewerTextureList::convertToUploadFile(raw);
@@ -765,7 +765,7 @@ void LLFloaterReporter::takeScreenshot()
}
else
{
- llwarns << "Unknown LLFloaterReporter type" << llendl;
+ LL_WARNS() << "Unknown LLFloaterReporter type" << LL_ENDL;
}
mResourceDatap->mAssetInfo.mCreatorID = gAgentID;
mResourceDatap->mAssetInfo.setName("screenshot_name");
@@ -784,7 +784,7 @@ void LLFloaterReporter::takeScreenshot()
image_in_list->createGLTexture(0, raw, 0, TRUE, LLGLTexture::OTHER);
// the texture picker then uses that texture
- LLTexturePicker* texture = getChild<LLTextureCtrl>("screenshot");
+ LLTextureCtrl* texture = getChild<LLTextureCtrl>("screenshot");
if (texture)
{
texture->setImageAssetID(mResourceDatap->mAssetInfo.mUuid);
@@ -796,11 +796,11 @@ void LLFloaterReporter::takeScreenshot()
void LLFloaterReporter::uploadImage()
{
- llinfos << "*** Uploading: " << llendl;
- llinfos << "Type: " << LLAssetType::lookup(mResourceDatap->mAssetInfo.mType) << llendl;
- llinfos << "UUID: " << mResourceDatap->mAssetInfo.mUuid << llendl;
- llinfos << "Name: " << mResourceDatap->mAssetInfo.getName() << llendl;
- llinfos << "Desc: " << mResourceDatap->mAssetInfo.getDescription() << llendl;
+ LL_INFOS() << "*** Uploading: " << LL_ENDL;
+ LL_INFOS() << "Type: " << LLAssetType::lookup(mResourceDatap->mAssetInfo.mType) << LL_ENDL;
+ LL_INFOS() << "UUID: " << mResourceDatap->mAssetInfo.mUuid << LL_ENDL;
+ LL_INFOS() << "Name: " << mResourceDatap->mAssetInfo.getName() << LL_ENDL;
+ LL_INFOS() << "Desc: " << mResourceDatap->mAssetInfo.getDescription() << LL_ENDL;
gAssetStorage->storeAssetData(mResourceDatap->mAssetInfo.mTransactionID,
mResourceDatap->mAssetInfo.mType,
@@ -824,20 +824,20 @@ void LLFloaterReporter::uploadDoneCallback(const LLUUID &uuid, void *user_data,
std::string err_msg("There was a problem uploading a report screenshot");
err_msg += " due to the following reason: " + args["REASON"].asString();
- llwarns << err_msg << llendl;
+ LL_WARNS() << err_msg << LL_ENDL;
return;
}
if (data->mPreferredLocation != LLResourceData::INVALID_LOCATION)
{
- llwarns << "Unknown report type : " << data->mPreferredLocation << llendl;
+ LL_WARNS() << "Unknown report type : " << data->mPreferredLocation << LL_ENDL;
}
LLFloaterReporter *self = LLFloaterReg::findTypedInstance<LLFloaterReporter>("reporter");
if (self)
{
self->mScreenID = uuid;
- llinfos << "Got screen shot " << uuid << llendl;
+ LL_INFOS() << "Got screen shot " << uuid << LL_ENDL;
self->sendReportViaLegacy(self->gatherReport());
self->closeFloater();
}
diff --git a/indra/newview/llfloatersceneloadstats.cpp b/indra/newview/llfloatersceneloadstats.cpp
new file mode 100644
index 0000000000..8aa93eae96
--- /dev/null
+++ b/indra/newview/llfloatersceneloadstats.cpp
@@ -0,0 +1,40 @@
+/**
+ * @file llfloatersceneloadstats.cpp
+ * @author Richard Nelson
+ * @brief debug floater for measuring various scene load statistics
+ *
+ * $LicenseInfo:firstyear=2001&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2013, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
+ * $/LicenseInfo$
+ */
+
+#include "llviewerprecompiledheaders.h"
+
+#include "llfloatersceneloadstats.h"
+
+
+LLFloaterSceneLoadStats::LLFloaterSceneLoadStats( const LLSD& key )
+: LLFloater(key)
+{}
+
+BOOL LLFloaterSceneLoadStats::postBuild()
+{
+ return TRUE;
+}
diff --git a/indra/newview/llfloatersceneloadstats.h b/indra/newview/llfloatersceneloadstats.h
new file mode 100644
index 0000000000..aa414bf544
--- /dev/null
+++ b/indra/newview/llfloatersceneloadstats.h
@@ -0,0 +1,43 @@
+/**
+ * @file llfloatersceneloadstats.h
+ * @brief debug floater for measuring various scene load statistics
+ *
+ * $LicenseInfo:firstyear=2001&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2013, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
+ * $/LicenseInfo$
+ */
+
+#ifndef LL_FLOATERSCENELOADSTATS_H
+#define LL_FLOATERSCENELOADSTATS_H
+
+#include "llfloater.h"
+
+class LLFloaterSceneLoadStats : public LLFloater
+{
+ friend class LLFloaterReg;
+private:
+ LLFloaterSceneLoadStats(const LLSD& key);
+
+public:
+ BOOL postBuild();
+
+};
+
+#endif // LL_FLOATERSCENELOADSTATS_H
diff --git a/indra/newview/llfloaterscriptlimits.cpp b/indra/newview/llfloaterscriptlimits.cpp
index 13cb3c2eb0..2ed7bb842d 100755
--- a/indra/newview/llfloaterscriptlimits.cpp
+++ b/indra/newview/llfloaterscriptlimits.cpp
@@ -58,7 +58,7 @@
// debug switches, won't work in release
#ifndef LL_RELEASE_FOR_DOWNLOAD
-// dump responder replies to llinfos for debugging
+// dump responder replies to LL_INFOS() for debugging
//#define DUMP_REPLIES_TO_LLINFOS
#ifdef DUMP_REPLIES_TO_LLINFOS
@@ -106,7 +106,7 @@ BOOL LLFloaterScriptLimits::postBuild()
if(!mTab)
{
- llwarns << "Error! couldn't get scriptlimits_panels, aborting Script Information setup" << llendl;
+ LL_WARNS() << "Error! couldn't get scriptlimits_panels, aborting Script Information setup" << LL_ENDL;
return FALSE;
}
@@ -195,7 +195,7 @@ void fetchScriptLimitsRegionInfoResponder::result(const LLSD& content)
OSMessageBox(nice_llsd.str(), "main cap response:", 0);
- llinfos << "main cap response:" << content << llendl;
+ LL_INFOS() << "main cap response:" << content << LL_ENDL;
#endif
@@ -210,7 +210,7 @@ void fetchScriptLimitsRegionInfoResponder::result(const LLSD& content)
LLFloaterScriptLimits* instance = LLFloaterReg::getTypedInstance<LLFloaterScriptLimits>("script_limits");
if(!instance)
{
- llwarns << "Failed to get llfloaterscriptlimits instance" << llendl;
+ LL_WARNS() << "Failed to get llfloaterscriptlimits instance" << LL_ENDL;
}
}
@@ -223,7 +223,7 @@ void fetchScriptLimitsRegionInfoResponder::result(const LLSD& content)
void fetchScriptLimitsRegionInfoResponder::errorWithContent(U32 status, const std::string& reason, const LLSD& content)
{
- llwarns << "fetchScriptLimitsRegionInfoResponder error [status:" << status << "]: " << content << llendl;
+ LL_WARNS() << "fetchScriptLimitsRegionInfoResponder error [status:" << status << "]: " << content << LL_ENDL;
}
void fetchScriptLimitsRegionSummaryResponder::result(const LLSD& content_ref)
@@ -277,14 +277,14 @@ void fetchScriptLimitsRegionSummaryResponder::result(const LLSD& content_ref)
OSMessageBox(nice_llsd.str(), "summary response:", 0);
- llwarns << "summary response:" << *content << llendl;
+ LL_WARNS() << "summary response:" << *content << LL_ENDL;
#endif
LLFloaterScriptLimits* instance = LLFloaterReg::getTypedInstance<LLFloaterScriptLimits>("script_limits");
if(!instance)
{
- llwarns << "Failed to get llfloaterscriptlimits instance" << llendl;
+ LL_WARNS() << "Failed to get llfloaterscriptlimits instance" << LL_ENDL;
}
else
{
@@ -310,7 +310,7 @@ void fetchScriptLimitsRegionSummaryResponder::result(const LLSD& content_ref)
void fetchScriptLimitsRegionSummaryResponder::errorWithContent(U32 status, const std::string& reason, const LLSD& content)
{
- llwarns << "fetchScriptLimitsRegionSummaryResponder error [status:" << status << "]: " << content << llendl;
+ LL_WARNS() << "fetchScriptLimitsRegionSummaryResponder error [status:" << status << "]: " << content << LL_ENDL;
}
void fetchScriptLimitsRegionDetailsResponder::result(const LLSD& content_ref)
@@ -385,7 +385,7 @@ result (map)
OSMessageBox(nice_llsd.str(), "details response:", 0);
- llinfos << "details response:" << content << llendl;
+ LL_INFOS() << "details response:" << content << LL_ENDL;
#endif
@@ -393,7 +393,7 @@ result (map)
if(!instance)
{
- llwarns << "Failed to get llfloaterscriptlimits instance" << llendl;
+ LL_WARNS() << "Failed to get llfloaterscriptlimits instance" << LL_ENDL;
}
else
{
@@ -407,19 +407,19 @@ result (map)
}
else
{
- llwarns << "Failed to get scriptlimits memory panel" << llendl;
+ LL_WARNS() << "Failed to get scriptlimits memory panel" << LL_ENDL;
}
}
else
{
- llwarns << "Failed to get scriptlimits_panels" << llendl;
+ LL_WARNS() << "Failed to get scriptlimits_panels" << LL_ENDL;
}
}
}
void fetchScriptLimitsRegionDetailsResponder::errorWithContent(U32 status, const std::string& reason, const LLSD& content)
{
- llwarns << "fetchScriptLimitsRegionDetailsResponder error [status:" << status << "]: " << content << llendl;
+ LL_WARNS() << "fetchScriptLimitsRegionDetailsResponder error [status:" << status << "]: " << content << LL_ENDL;
}
void fetchScriptLimitsAttachmentInfoResponder::result(const LLSD& content_ref)
@@ -473,7 +473,7 @@ void fetchScriptLimitsAttachmentInfoResponder::result(const LLSD& content_ref)
OSMessageBox(nice_llsd.str(), "attachment response:", 0);
- llinfos << "attachment response:" << content << llendl;
+ LL_INFOS() << "attachment response:" << content << LL_ENDL;
#endif
@@ -481,7 +481,7 @@ void fetchScriptLimitsAttachmentInfoResponder::result(const LLSD& content_ref)
if(!instance)
{
- llwarns << "Failed to get llfloaterscriptlimits instance" << llendl;
+ LL_WARNS() << "Failed to get llfloaterscriptlimits instance" << LL_ENDL;
}
else
{
@@ -503,19 +503,19 @@ void fetchScriptLimitsAttachmentInfoResponder::result(const LLSD& content_ref)
}
else
{
- llwarns << "Failed to get script_limits_my_avatar_panel" << llendl;
+ LL_WARNS() << "Failed to get script_limits_my_avatar_panel" << LL_ENDL;
}
}
else
{
- llwarns << "Failed to get scriptlimits_panels" << llendl;
+ LL_WARNS() << "Failed to get scriptlimits_panels" << LL_ENDL;
}
}
}
void fetchScriptLimitsAttachmentInfoResponder::errorWithContent(U32 status, const std::string& reason, const LLSD& content)
{
- llwarns << "fetchScriptLimitsAttachmentInfoResponder error [status:" << status << "]: " << content << llendl;
+ LL_WARNS() << "fetchScriptLimitsAttachmentInfoResponder error [status:" << status << "]: " << content << LL_ENDL;
}
///----------------------------------------------------------------------------
@@ -588,7 +588,7 @@ void LLPanelScriptLimitsRegionMemory::setParcelID(const LLUUID& parcel_id)
// virtual
void LLPanelScriptLimitsRegionMemory::setErrorStatus(U32 status, const std::string& reason)
{
- llwarns << "Can't handle remote parcel request."<< " Http Status: "<< status << ". Reason : "<< reason<<llendl;
+ LL_WARNS() << "Can't handle remote parcel request."<< " Http Status: "<< status << ". Reason : "<< reason<<LL_ENDL;
}
// callback from the name cache with an owner name to add to the list
@@ -627,7 +627,7 @@ void LLPanelScriptLimitsRegionMemory::setRegionDetails(LLSD content)
if(!list)
{
- llwarns << "Error getting the scripts_list control" << llendl;
+ LL_WARNS() << "Error getting the scripts_list control" << LL_ENDL;
return;
}
@@ -800,7 +800,7 @@ void LLPanelScriptLimitsRegionMemory::setRegionSummary(LLSD content)
}
else
{
- llwarns << "summary doesn't contain memory info" << llendl;
+ LL_WARNS() << "summary doesn't contain memory info" << LL_ENDL;
return;
}
@@ -818,7 +818,7 @@ void LLPanelScriptLimitsRegionMemory::setRegionSummary(LLSD content)
}
else
{
- llwarns << "summary doesn't contain urls info" << llendl;
+ LL_WARNS() << "summary doesn't contain urls info" << LL_ENDL;
return;
}
@@ -922,9 +922,9 @@ BOOL LLPanelScriptLimitsRegionMemory::StartRequestChain()
}
else
{
- llwarns << "Can't get parcel info for script information request" << region_id
+ LL_WARNS() << "Can't get parcel info for script information request" << region_id
<< ". Region: " << region->getName()
- << " does not support RemoteParcelRequest" << llendl;
+ << " does not support RemoteParcelRequest" << LL_ENDL;
std::string msg_waiting = LLTrans::getString("ScriptLimitsRequestError");
getChild<LLUICtrl>("loading_text")->setValue(LLSD(msg_waiting));
@@ -990,7 +990,7 @@ void LLPanelScriptLimitsRegionMemory::onClickRefresh(void* userdata)
}
else
{
- llwarns << "could not find LLPanelScriptLimitsRegionMemory instance after refresh button clicked" << llendl;
+ LL_WARNS() << "could not find LLPanelScriptLimitsRegionMemory instance after refresh button clicked" << LL_ENDL;
return;
}
}
@@ -1036,7 +1036,7 @@ void LLPanelScriptLimitsRegionMemory::onClickHighlight(void* userdata)
}
else
{
- llwarns << "could not find LLPanelScriptLimitsRegionMemory instance after highlight button clicked" << llendl;
+ LL_WARNS() << "could not find LLPanelScriptLimitsRegionMemory instance after highlight button clicked" << LL_ENDL;
return;
}
}
@@ -1141,7 +1141,7 @@ void LLPanelScriptLimitsRegionMemory::onClickReturn(void* userdata)
}
else
{
- llwarns << "could not find LLPanelScriptLimitsRegionMemory instance after highlight button clicked" << llendl;
+ LL_WARNS() << "could not find LLPanelScriptLimitsRegionMemory instance after highlight button clicked" << LL_ENDL;
return;
}
}
@@ -1273,7 +1273,7 @@ void LLPanelScriptLimitsAttachment::setAttachmentSummary(LLSD content)
}
else
{
- llwarns << "attachment details don't contain memory summary info" << llendl;
+ LL_WARNS() << "attachment details don't contain memory summary info" << LL_ENDL;
return;
}
@@ -1291,7 +1291,7 @@ void LLPanelScriptLimitsAttachment::setAttachmentSummary(LLSD content)
}
else
{
- llwarns << "attachment details don't contain urls summary info" << llendl;
+ LL_WARNS() << "attachment details don't contain urls summary info" << LL_ENDL;
return;
}
@@ -1343,7 +1343,7 @@ void LLPanelScriptLimitsAttachment::onClickRefresh(void* userdata)
}
else
{
- llwarns << "could not find LLPanelScriptLimitsRegionMemory instance after refresh button clicked" << llendl;
+ LL_WARNS() << "could not find LLPanelScriptLimitsRegionMemory instance after refresh button clicked" << LL_ENDL;
return;
}
}
diff --git a/indra/newview/llfloatersettingsdebug.cpp b/indra/newview/llfloatersettingsdebug.cpp
index 07f5220ab7..fb202b4c40 100755
--- a/indra/newview/llfloatersettingsdebug.cpp
+++ b/indra/newview/llfloatersettingsdebug.cpp
@@ -194,8 +194,8 @@ void LLFloaterSettingsDebug::updateControl(LLControlVariable* controlp)
if (!spinner1 || !spinner2 || !spinner3 || !spinner4 || !color_swatch)
{
- llwarns << "Could not find all desired controls by name"
- << llendl;
+ LL_WARNS() << "Could not find all desired controls by name"
+ << LL_ENDL;
return;
}
diff --git a/indra/newview/llfloatersidepanelcontainer.h b/indra/newview/llfloatersidepanelcontainer.h
index 65ec8f604e..13b17e8867 100755
--- a/indra/newview/llfloatersidepanelcontainer.h
+++ b/indra/newview/llfloatersidepanelcontainer.h
@@ -74,7 +74,7 @@ public:
T* panel = dynamic_cast<T*>(getPanel(floater_name, panel_name));
if (!panel)
{
- llwarns << "Child named \"" << panel_name << "\" of type " << typeid(T*).name() << " not found" << llendl;
+ LL_WARNS() << "Child named \"" << panel_name << "\" of type " << typeid(T*).name() << " not found" << LL_ENDL;
}
return panel;
}
diff --git a/indra/newview/llfloatersnapshot.cpp b/indra/newview/llfloatersnapshot.cpp
index ea385d7baf..8e92821aac 100755
--- a/indra/newview/llfloatersnapshot.cpp
+++ b/indra/newview/llfloatersnapshot.cpp
@@ -379,13 +379,13 @@ void LLFloaterSnapshot::Impl::updateControls(LLFloaterSnapshot* floater)
if (width_ctrl->getValue().asInteger() == 0)
{
S32 w = gViewerWindow->getWindowWidthRaw();
- lldebugs << "Initializing width spinner (" << width_ctrl->getName() << "): " << w << llendl;
+ LL_DEBUGS() << "Initializing width spinner (" << width_ctrl->getName() << "): " << w << LL_ENDL;
width_ctrl->setValue(w);
}
if (height_ctrl->getValue().asInteger() == 0)
{
S32 h = gViewerWindow->getWindowHeightRaw();
- lldebugs << "Initializing height spinner (" << height_ctrl->getName() << "): " << h << llendl;
+ LL_DEBUGS() << "Initializing height spinner (" << height_ctrl->getName() << "): " << h << LL_ENDL;
height_ctrl->setValue(h);
}
@@ -420,7 +420,7 @@ void LLFloaterSnapshot::Impl::updateControls(LLFloaterSnapshot* floater)
BOOL got_snap = previewp && previewp->getSnapshotUpToDate();
// *TODO: Separate maximum size for Web images from postcards
- lldebugs << "Is snapshot up-to-date? " << got_snap << llendl;
+ LL_DEBUGS() << "Is snapshot up-to-date? " << got_snap << LL_ENDL;
LLLocale locale(LLLocale::USER_LOCALE);
std::string bytes_string;
@@ -484,7 +484,7 @@ void LLFloaterSnapshot::Impl::updateControls(LLFloaterSnapshot* floater)
info["have-snapshot"] = got_snap;
current_panel->updateControls(info);
}
- lldebugs << "finished updating controls" << llendl;
+ LL_DEBUGS() << "finished updating controls" << LL_ENDL;
}
// static
@@ -531,7 +531,7 @@ void LLFloaterSnapshot::Impl::checkAutoSnapshot(LLSnapshotLivePreview* previewp,
if (previewp)
{
BOOL autosnap = gSavedSettings.getBOOL("AutoSnapshot");
- lldebugs << "updating " << (autosnap ? "snapshot" : "thumbnail") << llendl;
+ LL_DEBUGS() << "updating " << (autosnap ? "snapshot" : "thumbnail") << LL_ENDL;
previewp->updateSnapshot(autosnap, update_thumbnail, autosnap ? AUTO_SNAPSHOT_TIME_DELAY : 0.f);
}
}
@@ -544,7 +544,7 @@ void LLFloaterSnapshot::Impl::onClickNewSnapshot(void* data)
if (previewp && view)
{
view->impl.setStatus(Impl::STATUS_READY);
- lldebugs << "updating snapshot" << llendl;
+ LL_DEBUGS() << "updating snapshot" << LL_ENDL;
previewp->updateSnapshot(TRUE);
}
}
@@ -621,7 +621,7 @@ void LLFloaterSnapshot::Impl::applyKeepAspectCheck(LLFloaterSnapshot* view, BOOL
previewp->getSize(w, h) ;
updateSpinners(view, previewp, w, h, TRUE); // may change w and h
- lldebugs << "updating thumbnail" << llendl;
+ LL_DEBUGS() << "updating thumbnail" << LL_ENDL;
previewp->setSize(w, h) ;
previewp->updateSnapshot(FALSE, TRUE);
checkAutoSnapshot(previewp, TRUE);
@@ -757,7 +757,7 @@ void LLFloaterSnapshot::Impl::updateResolution(LLUICtrl* ctrl, void* data, BOOL
if (width == 0 || height == 0)
{
// take resolution from current window size
- lldebugs << "Setting preview res from window: " << gViewerWindow->getWindowWidthRaw() << "x" << gViewerWindow->getWindowHeightRaw() << llendl;
+ LL_DEBUGS() << "Setting preview res from window: " << gViewerWindow->getWindowWidthRaw() << "x" << gViewerWindow->getWindowHeightRaw() << LL_ENDL;
previewp->setSize(gViewerWindow->getWindowWidthRaw(), gViewerWindow->getWindowHeightRaw());
}
else if (width == -1 || height == -1)
@@ -767,7 +767,7 @@ void LLFloaterSnapshot::Impl::updateResolution(LLUICtrl* ctrl, void* data, BOOL
LLPanelSnapshot* spanel = getActivePanel(view);
if (spanel)
{
- lldebugs << "Loading typed res from panel " << spanel->getName() << llendl;
+ LL_DEBUGS() << "Loading typed res from panel " << spanel->getName() << LL_ENDL;
new_width = spanel->getTypedPreviewWidth();
new_height = spanel->getTypedPreviewHeight();
@@ -780,8 +780,8 @@ void LLFloaterSnapshot::Impl::updateResolution(LLUICtrl* ctrl, void* data, BOOL
}
else
{
- lldebugs << "No custom res chosen, setting preview res from window: "
- << gViewerWindow->getWindowWidthRaw() << "x" << gViewerWindow->getWindowHeightRaw() << llendl;
+ LL_DEBUGS() << "No custom res chosen, setting preview res from window: "
+ << gViewerWindow->getWindowWidthRaw() << "x" << gViewerWindow->getWindowHeightRaw() << LL_ENDL;
new_width = gViewerWindow->getWindowWidthRaw();
new_height = gViewerWindow->getWindowHeightRaw();
}
@@ -792,7 +792,7 @@ void LLFloaterSnapshot::Impl::updateResolution(LLUICtrl* ctrl, void* data, BOOL
else
{
// use the resolution from the selected pre-canned drop-down choice
- lldebugs << "Setting preview res selected from combo: " << width << "x" << height << llendl;
+ LL_DEBUGS() << "Setting preview res selected from combo: " << width << "x" << height << LL_ENDL;
previewp->setSize(width, height);
}
@@ -820,11 +820,11 @@ void LLFloaterSnapshot::Impl::updateResolution(LLUICtrl* ctrl, void* data, BOOL
// hide old preview as the aspect ratio could be wrong
checkAutoSnapshot(previewp, FALSE);
- lldebugs << "updating thumbnail" << llendl;
+ LL_DEBUGS() << "updating thumbnail" << LL_ENDL;
getPreviewView(view)->updateSnapshot(FALSE, TRUE);
if(do_update)
{
- lldebugs << "Will update controls" << llendl;
+ LL_DEBUGS() << "Will update controls" << LL_ENDL;
updateControls(view);
setNeedRefresh(view, true);
}
@@ -867,7 +867,7 @@ void LLFloaterSnapshot::Impl::onImageFormatChange(LLFloaterSnapshot* view)
if (view)
{
gSavedSettings.setS32("SnapshotFormat", getImageFormat(view));
- lldebugs << "image format changed, updating snapshot" << llendl;
+ LL_DEBUGS() << "image format changed, updating snapshot" << LL_ENDL;
getPreviewView(view)->updateSnapshot(TRUE);
updateControls(view);
setNeedRefresh(view, false); // we're refreshing
@@ -950,7 +950,7 @@ void LLFloaterSnapshot::Impl::applyCustomResolution(LLFloaterSnapshot* view, S32
{
bool need_refresh = false;
- lldebugs << "applyCustomResolution(" << w << ", " << h << ")" << llendl;
+ LL_DEBUGS() << "applyCustomResolution(" << w << ", " << h << ")" << LL_ENDL;
if (!view) return;
LLSnapshotLivePreview* previewp = getPreviewView(view);
@@ -968,7 +968,7 @@ void LLFloaterSnapshot::Impl::applyCustomResolution(LLFloaterSnapshot* view, S32
previewp->setSize(w,h);
checkAutoSnapshot(previewp, FALSE);
- lldebugs << "applied custom resolution, updating thumbnail" << llendl;
+ LL_DEBUGS() << "applied custom resolution, updating thumbnail" << LL_ENDL;
previewp->updateSnapshot(FALSE, TRUE);
comboSetCustom(view, "profile_size_combo");
comboSetCustom(view, "postcard_size_combo");
@@ -1186,7 +1186,7 @@ void LLFloaterSnapshot::onOpen(const LLSD& key)
LLSnapshotLivePreview* preview = LLFloaterSnapshot::Impl::getPreviewView(this);
if(preview)
{
- lldebugs << "opened, updating snapshot" << llendl;
+ LL_DEBUGS() << "opened, updating snapshot" << LL_ENDL;
preview->updateSnapshot(TRUE);
}
focusFirstItem(FALSE);
@@ -1270,7 +1270,7 @@ void LLFloaterSnapshot::update()
return;
BOOL changed = FALSE;
- lldebugs << "npreviews: " << LLSnapshotLivePreview::sList.size() << llendl;
+ LL_DEBUGS() << "npreviews: " << LLSnapshotLivePreview::sList.size() << LL_ENDL;
for (std::set<LLSnapshotLivePreview*>::iterator iter = LLSnapshotLivePreview::sList.begin();
iter != LLSnapshotLivePreview::sList.end(); ++iter)
{
@@ -1279,7 +1279,7 @@ void LLFloaterSnapshot::update()
if (inst && changed)
{
- lldebugs << "changed" << llendl;
+ LL_DEBUGS() << "changed" << LL_ENDL;
inst->impl.updateControls(inst);
}
}
@@ -1293,7 +1293,7 @@ LLFloaterSnapshot* LLFloaterSnapshot::getInstance()
// static
void LLFloaterSnapshot::saveTexture()
{
- lldebugs << "saveTexture" << llendl;
+ LL_DEBUGS() << "saveTexture" << LL_ENDL;
// FIXME: duplicated code
LLFloaterSnapshot* instance = LLFloaterReg::findTypedInstance<LLFloaterSnapshot>("snapshot");
@@ -1315,7 +1315,7 @@ void LLFloaterSnapshot::saveTexture()
// static
BOOL LLFloaterSnapshot::saveLocal()
{
- lldebugs << "saveLocal" << llendl;
+ LL_DEBUGS() << "saveLocal" << LL_ENDL;
// FIXME: duplicated code
LLFloaterSnapshot* instance = LLFloaterReg::findTypedInstance<LLFloaterSnapshot>("snapshot");
if (!instance)
@@ -1416,7 +1416,7 @@ LLPointer<LLImageFormatted> LLFloaterSnapshot::getImageData()
LLPointer<LLImageFormatted> img = previewp->getFormattedImage();
if (!img.get())
{
- llwarns << "Empty snapshot image data" << llendl;
+ LL_WARNS() << "Empty snapshot image data" << LL_ENDL;
llassert(img.get() != NULL);
}
diff --git a/indra/newview/llfloatersocial.cpp b/indra/newview/llfloatersocial.cpp
index 9490769d8c..7238c6fff5 100644
--- a/indra/newview/llfloatersocial.cpp
+++ b/indra/newview/llfloatersocial.cpp
@@ -187,7 +187,7 @@ LLSocialPhotoPanel::~LLSocialPhotoPanel()
BOOL LLSocialPhotoPanel::postBuild()
{
- setVisibleCallback(boost::bind(&LLSocialPhotoPanel::onVisibilityChange, this, _2));
+ setVisibleCallback(boost::bind(&LLSocialPhotoPanel::onVisibilityChanged, this, _2));
mSnapshotPanel = getChild<LLUICtrl>("snapshot_panel");
mResolutionComboBox = getChild<LLUICtrl>("resolution_combobox");
@@ -262,7 +262,7 @@ LLSnapshotLivePreview* LLSocialPhotoPanel::getPreviewView()
return previewp;
}
-void LLSocialPhotoPanel::onVisibilityChange(const LLSD& new_visibility)
+void LLSocialPhotoPanel::onVisibilityChanged(const LLSD& new_visibility)
{
bool visible = new_visibility.asBoolean();
if (visible)
@@ -272,7 +272,7 @@ void LLSocialPhotoPanel::onVisibilityChange(const LLSD& new_visibility)
LLSnapshotLivePreview* preview = getPreviewView();
if(preview)
{
- lldebugs << "opened, updating snapshot" << llendl;
+ LL_DEBUGS() << "opened, updating snapshot" << LL_ENDL;
preview->updateSnapshot(TRUE);
}
}
@@ -300,7 +300,7 @@ void LLSocialPhotoPanel::onClickNewSnapshot()
if (previewp)
{
//setStatus(Impl::STATUS_READY);
- lldebugs << "updating snapshot" << llendl;
+ LL_DEBUGS() << "updating snapshot" << LL_ENDL;
previewp->updateSnapshot(TRUE);
}
}
@@ -390,7 +390,7 @@ void LLSocialPhotoPanel::updateControls()
LLSnapshotLivePreview::ESnapshotType shot_type = (previewp ? previewp->getSnapshotType() : LLSnapshotLivePreview::SNAPSHOT_POSTCARD);
// *TODO: Separate maximum size for Web images from postcards
- lldebugs << "Is snapshot up-to-date? " << got_snap << llendl;
+ LL_DEBUGS() << "Is snapshot up-to-date? " << got_snap << LL_ENDL;
LLLocale locale(LLLocale::USER_LOCALE);
std::string bytes_string;
@@ -430,13 +430,13 @@ void LLSocialPhotoPanel::updateResolution(BOOL do_update)
if (width == 0 || height == 0)
{
// take resolution from current window size
- lldebugs << "Setting preview res from window: " << gViewerWindow->getWindowWidthRaw() << "x" << gViewerWindow->getWindowHeightRaw() << llendl;
+ LL_DEBUGS() << "Setting preview res from window: " << gViewerWindow->getWindowWidthRaw() << "x" << gViewerWindow->getWindowHeightRaw() << LL_ENDL;
previewp->setSize(gViewerWindow->getWindowWidthRaw(), gViewerWindow->getWindowHeightRaw());
}
else
{
// use the resolution from the selected pre-canned drop-down choice
- lldebugs << "Setting preview res selected from combo: " << width << "x" << height << llendl;
+ LL_DEBUGS() << "Setting preview res selected from combo: " << width << "x" << height << LL_ENDL;
previewp->setSize(width, height);
}
@@ -449,12 +449,12 @@ void LLSocialPhotoPanel::updateResolution(BOOL do_update)
previewp->setSize(width, height);
// hide old preview as the aspect ratio could be wrong
- lldebugs << "updating thumbnail" << llendl;
+ LL_DEBUGS() << "updating thumbnail" << LL_ENDL;
previewp->updateSnapshot(FALSE, TRUE);
if(do_update)
{
- lldebugs << "Will update controls" << llendl;
+ LL_DEBUGS() << "Will update controls" << LL_ENDL;
updateControls();
LLSocialPhotoPanel::onClickNewSnapshot();
}
@@ -648,7 +648,7 @@ mDisconnectButton(NULL)
mCommitCallbackRegistrar.add("SocialSharing.Connect", boost::bind(&LLSocialAccountPanel::onConnect, this));
mCommitCallbackRegistrar.add("SocialSharing.Disconnect", boost::bind(&LLSocialAccountPanel::onDisconnect, this));
- setVisibleCallback(boost::bind(&LLSocialAccountPanel::onVisibilityChange, this, _2));
+ setVisibleCallback(boost::bind(&LLSocialAccountPanel::onVisibilityChanged, this, _2));
}
BOOL LLSocialAccountPanel::postBuild()
@@ -677,7 +677,7 @@ void LLSocialAccountPanel::draw()
LLPanel::draw();
}
-void LLSocialAccountPanel::onVisibilityChange(const LLSD& new_visibility)
+void LLSocialAccountPanel::onVisibilityChanged(const LLSD& new_visibility)
{
bool visible = new_visibility.asBoolean();
diff --git a/indra/newview/llfloatersocial.h b/indra/newview/llfloatersocial.h
index bbe07c9704..a021267bb4 100644
--- a/indra/newview/llfloatersocial.h
+++ b/indra/newview/llfloatersocial.h
@@ -63,7 +63,7 @@ public:
void draw();
LLSnapshotLivePreview* getPreviewView();
- void onVisibilityChange(const LLSD& new_visibility);
+ void onVisibilityChanged(const LLSD& new_visibility);
void onClickNewSnapshot();
void onSend();
bool onFacebookConnectStateChange(const LLSD& data);
@@ -123,7 +123,7 @@ public:
void draw();
private:
- void onVisibilityChange(const LLSD& new_visibility);
+ void onVisibilityChanged(const LLSD& new_visibility);
bool onFacebookConnectStateChange(const LLSD& data);
bool onFacebookConnectInfoChange();
void onConnect();
diff --git a/indra/newview/llfloatertools.cpp b/indra/newview/llfloatertools.cpp
index 7b25291da7..afbd7ba5e2 100755
--- a/indra/newview/llfloatertools.cpp
+++ b/indra/newview/llfloatertools.cpp
@@ -266,7 +266,7 @@ BOOL LLFloaterTools::postBuild()
found->setClickedCallback(boost::bind(&LLFloaterTools::setObjectType, toolData[t]));
mButtons.push_back( found );
}else{
- llwarns << "Tool button not found! DOA Pending." << llendl;
+ LL_WARNS() << "Tool button not found! DOA Pending." << LL_ENDL;
}
}
mCheckCopySelection = getChild<LLCheckBoxCtrl>("checkbox copy selection");
@@ -500,7 +500,7 @@ void LLFloaterTools::refresh()
}
else
{
- llwarns << "Failed to get selected object" << llendl;
+ LL_WARNS() << "Failed to get selected object" << LL_ENDL;
}
}
@@ -1095,7 +1095,7 @@ void LLFloaterTools::setTool(const LLSD& user_data)
else if (control_name == "Land" )
LLToolMgr::getInstance()->getCurrentToolset()->selectTool( (LLTool *) LLToolSelectLand::getInstance());
else
- llwarns<<" no parameter name "<<control_name<<" found!! No Tool selected!!"<< llendl;
+ LL_WARNS()<<" no parameter name "<<control_name<<" found!! No Tool selected!!"<< LL_ENDL;
}
void LLFloaterTools::onFocusReceived()
diff --git a/indra/newview/llfloatertopobjects.h b/indra/newview/llfloatertopobjects.h
index 6edc46cf79..28d2aa58e2 100755
--- a/indra/newview/llfloatertopobjects.h
+++ b/indra/newview/llfloatertopobjects.h
@@ -31,6 +31,22 @@
class LLUICtrl;
+// Bits for simulator performance query flags
+enum LAND_STAT_FLAGS
+{
+ STAT_FILTER_BY_PARCEL = 0x00000001,
+ STAT_FILTER_BY_OWNER = 0x00000002,
+ STAT_FILTER_BY_OBJECT = 0x00000004,
+ STAT_FILTER_BY_PARCEL_NAME = 0x00000008,
+ STAT_REQUEST_LAST_ENTRY = 0x80000000,
+};
+
+enum LAND_STAT_REPORT_TYPE
+{
+ STAT_REPORT_TOP_SCRIPTS = 0,
+ STAT_REPORT_TOP_COLLIDERS
+};
+
class LLFloaterTopObjects : public LLFloater
{
friend class LLFloaterReg;
diff --git a/indra/newview/llfloatertranslationsettings.cpp b/indra/newview/llfloatertranslationsettings.cpp
index 33f2c35239..965d29b09c 100755
--- a/indra/newview/llfloatertranslationsettings.cpp
+++ b/indra/newview/llfloatertranslationsettings.cpp
@@ -59,7 +59,7 @@ private:
if (!floater)
{
- llwarns << "Cannot find translation settings floater" << llendl;
+ LL_WARNS() << "Cannot find translation settings floater" << LL_ENDL;
return;
}
diff --git a/indra/newview/llfloateruipreview.cpp b/indra/newview/llfloateruipreview.cpp
index 0106a1615d..96a70d9345 100755
--- a/indra/newview/llfloateruipreview.cpp
+++ b/indra/newview/llfloateruipreview.cpp
@@ -607,7 +607,7 @@ void LLFloaterUIPreview::onClose(bool app_quitting)
// *TODO: this is currently unlocalized. Add to alerts/notifications.xml, someday, maybe.
void LLFloaterUIPreview::popupAndPrintWarning(const std::string& warning)
{
- llwarns << warning << llendl;
+ LL_WARNS() << warning << LL_ENDL;
LLSD args;
args["MESSAGE"] = warning;
LLNotificationsUtil::add("GenericAlert", args);
@@ -960,7 +960,7 @@ void LLFloaterUIPreview::onClickEditFloater()
std::string file_name = mFileList->getSelectedItemLabel(1); // get the file name of the currently-selected floater
if (file_name.empty()) // if no item is selected
{
- llwarns << "No file selected" << llendl;
+ LL_WARNS() << "No file selected" << LL_ENDL;
return; // ignore click
}
file_path = getLocalizedDirectory() + file_name;
@@ -1268,8 +1268,8 @@ void LLFloaterUIPreview::highlightChangedElements()
// if we still didn't find it...
if(NULL == element)
{
- llinfos << "Unable to find element in XuiDelta file named \"" << *iter << "\" in file \"" << mLiveFile->mFileName <<
- "\". The element may no longer exist, the path may be incorrect, or it may not be a non-displayable element (not an LLView) such as a \"string\" type." << llendl;
+ LL_INFOS() << "Unable to find element in XuiDelta file named \"" << *iter << "\" in file \"" << mLiveFile->mFileName <<
+ "\". The element may no longer exist, the path may be incorrect, or it may not be a non-displayable element (not an LLView) such as a \"string\" type." << LL_ENDL;
failed = TRUE;
break;
}
diff --git a/indra/newview/llfloaterwebcontent.cpp b/indra/newview/llfloaterwebcontent.cpp
index 68dbb5ae33..a3a78b5d8b 100755
--- a/indra/newview/llfloaterwebcontent.cpp
+++ b/indra/newview/llfloaterwebcontent.cpp
@@ -56,7 +56,7 @@ LLFloaterWebContent::_Params::_Params()
LLFloaterWebContent::LLFloaterWebContent( const Params& params )
: LLFloater( params ),
- LLInstanceTracker<LLFloaterWebContent, std::string>(params.id()),
+ LLInstanceTracker<LLFloaterWebContent, std::string, LLInstanceTrackerReplaceOnCollision>(params.id()),
mWebBrowser(NULL),
mAddressCombo(NULL),
mSecureLockIcon(NULL),
@@ -192,7 +192,7 @@ void LLFloaterWebContent::geometryChanged(S32 x, S32 y, S32 width, S32 height)
width + getRect().getWidth() - browser_rect.getWidth(),
height + getRect().getHeight() - browser_rect.getHeight());
- lldebugs << "geometry change: " << geom << llendl;
+ LL_DEBUGS() << "geometry change: " << geom << LL_ENDL;
LLRect new_rect;
getParent()->screenRectToLocal(geom, &new_rect);
@@ -202,7 +202,7 @@ void LLFloaterWebContent::geometryChanged(S32 x, S32 y, S32 width, S32 height)
// static
void LLFloaterWebContent::preCreate(LLFloaterWebContent::Params& p)
{
- lldebugs << "url = " << p.url() << ", target = " << p.target() << ", uuid = " << p.id() << llendl;
+ LL_DEBUGS() << "url = " << p.url() << ", target = " << p.target() << ", uuid = " << p.id() << LL_ENDL;
if (!p.id.isProvided())
{
@@ -221,11 +221,11 @@ void LLFloaterWebContent::preCreate(LLFloaterWebContent::Params& p)
// and close the least recently opened one if this will put us over the limit.
LLFloaterReg::const_instance_list_t &instances = LLFloaterReg::getFloaterList(p.window_class);
- lldebugs << "total instance count is " << instances.size() << llendl;
+ LL_DEBUGS() << "total instance count is " << instances.size() << LL_ENDL;
for(LLFloaterReg::const_instance_list_t::const_iterator iter = instances.begin(); iter != instances.end(); iter++)
{
- lldebugs << " " << (*iter)->getKey()["target"] << llendl;
+ LL_DEBUGS() << " " << (*iter)->getKey()["target"] << LL_ENDL;
}
if(instances.size() >= (size_t)browser_window_limit)
@@ -374,8 +374,8 @@ void LLFloaterWebContent::handleMediaEvent(LLPluginClassMedia* self, EMediaEvent
{
if (mCurrentURL.find("facebook.com/dialog/oauth") == std::string::npos) // HACK to fix ACME-1317 - Cho
{
- geometryChanged(self->getGeometryX(), self->getGeometryY(), self->getGeometryWidth(), self->getGeometryHeight());
- }
+ geometryChanged(self->getGeometryX(), self->getGeometryY(), self->getGeometryWidth(), self->getGeometryHeight());
+ }
}
else if(event == MEDIA_EVENT_STATUS_TEXT_CHANGED )
{
diff --git a/indra/newview/llfloaterwebcontent.h b/indra/newview/llfloaterwebcontent.h
index f22940cd07..ad56eec859 100755
--- a/indra/newview/llfloaterwebcontent.h
+++ b/indra/newview/llfloaterwebcontent.h
@@ -40,11 +40,11 @@ class LLIconCtrl;
class LLFloaterWebContent :
public LLFloater,
public LLViewerMediaObserver,
- public LLInstanceTracker<LLFloaterWebContent, std::string>
+ public LLInstanceTracker<LLFloaterWebContent, std::string, LLInstanceTrackerReplaceOnCollision>
{
public:
- typedef LLInstanceTracker<LLFloaterWebContent, std::string> instance_tracker_t;
+ typedef LLInstanceTracker<LLFloaterWebContent, std::string, LLInstanceTrackerReplaceOnCollision> instance_tracker_t;
LOG_CLASS(LLFloaterWebContent);
struct _Params : public LLInitParam::Block<_Params>
diff --git a/indra/newview/llfloaterwebprofile.cpp b/indra/newview/llfloaterwebprofile.cpp
index c41f6f148f..a46f1d8af2 100755
--- a/indra/newview/llfloaterwebprofile.cpp
+++ b/indra/newview/llfloaterwebprofile.cpp
@@ -47,11 +47,11 @@ void LLFloaterWebProfile::onOpen(const LLSD& key)
// virtual
void LLFloaterWebProfile::handleReshape(const LLRect& new_rect, bool by_user)
{
- lldebugs << "handleReshape: " << new_rect << llendl;
+ LL_DEBUGS() << "handleReshape: " << new_rect << LL_ENDL;
if (by_user && !isMinimized())
{
- lldebugs << "Storing new rect" << llendl;
+ LL_DEBUGS() << "Storing new rect" << LL_ENDL;
gSavedSettings.setRect("WebProfileFloaterRect", new_rect);
}
@@ -68,7 +68,7 @@ LLFloater* LLFloaterWebProfile::create(const LLSD& key)
void LLFloaterWebProfile::applyPreferredRect()
{
const LLRect preferred_rect = gSavedSettings.getRect("WebProfileFloaterRect");
- lldebugs << "Applying preferred rect: " << preferred_rect << llendl;
+ LL_DEBUGS() << "Applying preferred rect: " << preferred_rect << LL_ENDL;
// Don't override position that may have been set by floater stacking code.
LLRect new_rect = getRect();
diff --git a/indra/newview/llfloaterworldmap.cpp b/indra/newview/llfloaterworldmap.cpp
index cb637c7162..ff66bdedb0 100755
--- a/indra/newview/llfloaterworldmap.cpp
+++ b/indra/newview/llfloaterworldmap.cpp
@@ -570,9 +570,9 @@ void LLFloaterWorldMap::trackLandmark( const LLUUID& landmark_item_id )
buildLandmarkIDLists();
BOOL found = FALSE;
S32 idx;
- for (idx = 0; idx < mLandmarkItemIDList.count(); idx++)
+ for (idx = 0; idx < mLandmarkItemIDList.size(); idx++)
{
- if ( mLandmarkItemIDList.get(idx) == landmark_item_id)
+ if ( mLandmarkItemIDList.at(idx) == landmark_item_id)
{
found = TRUE;
break;
@@ -581,13 +581,13 @@ void LLFloaterWorldMap::trackLandmark( const LLUUID& landmark_item_id )
if (found && iface->setCurrentByID( landmark_item_id ) )
{
- LLUUID asset_id = mLandmarkAssetIDList.get( idx );
+ LLUUID asset_id = mLandmarkAssetIDList.at( idx );
std::string name;
LLComboBox* combo = getChild<LLComboBox>( "landmark combo");
if (combo) name = combo->getSimple();
mTrackedStatus = LLTracker::TRACKING_LANDMARK;
- LLTracker::trackLandmark(mLandmarkAssetIDList.get( idx ), // assetID
- mLandmarkItemIDList.get( idx ), // itemID
+ LLTracker::trackLandmark(mLandmarkAssetIDList.at( idx ), // assetID
+ mLandmarkItemIDList.at( idx ), // itemID
name); // name
if( asset_id != sHomeID )
@@ -911,15 +911,15 @@ void LLFloaterWorldMap::buildLandmarkIDLists()
list->operateOnSelection(LLCtrlListInterface::OP_DELETE);
}
- mLandmarkItemIDList.reset();
- mLandmarkAssetIDList.reset();
+ mLandmarkItemIDList.clear();
+ mLandmarkAssetIDList.clear();
// Get all of the current landmarks
- mLandmarkAssetIDList.put( LLUUID::null );
- mLandmarkItemIDList.put( LLUUID::null );
+ mLandmarkAssetIDList.push_back( LLUUID::null );
+ mLandmarkItemIDList.push_back( LLUUID::null );
- mLandmarkAssetIDList.put( sHomeID );
- mLandmarkItemIDList.put( sHomeID );
+ mLandmarkAssetIDList.push_back( sHomeID );
+ mLandmarkItemIDList.push_back( sHomeID );
LLInventoryModel::cat_array_t cats;
LLInventoryModel::item_array_t items;
@@ -932,15 +932,18 @@ void LLFloaterWorldMap::buildLandmarkIDLists()
std::sort(items.begin(), items.end(), LLViewerInventoryItem::comparePointers());
- S32 count = items.count();
+ mLandmarkAssetIDList.reserve(mLandmarkAssetIDList.size() + items.size());
+ mLandmarkItemIDList.reserve(mLandmarkItemIDList.size() + items.size());
+
+ S32 count = items.size();
for(S32 i = 0; i < count; ++i)
{
- LLInventoryItem* item = items.get(i);
+ LLInventoryItem* item = items.at(i);
list->addSimpleElement(item->getName(), ADD_BOTTOM, item->getUUID());
- mLandmarkAssetIDList.put( item->getAssetUUID() );
- mLandmarkItemIDList.put( item->getUUID() );
+ mLandmarkAssetIDList.push_back( item->getAssetUUID() );
+ mLandmarkItemIDList.push_back( item->getUUID() );
}
list->selectFirstItem();
diff --git a/indra/newview/llfloaterworldmap.h b/indra/newview/llfloaterworldmap.h
index e3b83b2579..84ca5a7a71 100755
--- a/indra/newview/llfloaterworldmap.h
+++ b/indra/newview/llfloaterworldmap.h
@@ -32,7 +32,6 @@
#ifndef LL_LLFLOATERWORLDMAP_H
#define LL_LLFLOATERWORLDMAP_H
-#include "lldarray.h"
#include "llfloater.h"
#include "llhudtext.h"
#include "llmapimagetype.h"
@@ -166,8 +165,8 @@ private:
// enable/disable teleport destination coordinates
void enableTeleportCoordsDisplay( bool enabled );
- LLDynamicArray<LLUUID> mLandmarkAssetIDList;
- LLDynamicArray<LLUUID> mLandmarkItemIDList;
+ std::vector<LLUUID> mLandmarkAssetIDList;
+ std::vector<LLUUID> mLandmarkItemIDList;
static const LLUUID sHomeID;
diff --git a/indra/newview/llfolderviewmodelinventory.cpp b/indra/newview/llfolderviewmodelinventory.cpp
index c28657dbcd..f128910ca7 100755
--- a/indra/newview/llfolderviewmodelinventory.cpp
+++ b/indra/newview/llfolderviewmodelinventory.cpp
@@ -34,7 +34,7 @@
//
// class LLFolderViewModelInventory
//
-static LLFastTimer::DeclareTimer FTM_INVENTORY_SORT("Sort");
+static LLTrace::BlockTimerStatHandle FTM_INVENTORY_SORT("Inventory Sort");
bool LLFolderViewModelInventory::startDrag(std::vector<LLFolderViewModelItem*>& items)
{
@@ -63,7 +63,7 @@ bool LLFolderViewModelInventory::startDrag(std::vector<LLFolderViewModelItem*>&
void LLFolderViewModelInventory::sort( LLFolderViewFolder* folder )
{
- LLFastTimer _(FTM_INVENTORY_SORT);
+ LL_RECORD_BLOCK_TIME(FTM_INVENTORY_SORT);
if (!needsSort(folder->getViewModelItem())) return;
diff --git a/indra/newview/llfollowcam.cpp b/indra/newview/llfollowcam.cpp
index 47612fe25c..612afc0d18 100755
--- a/indra/newview/llfollowcam.cpp
+++ b/indra/newview/llfollowcam.cpp
@@ -327,11 +327,11 @@ void LLFollowCam::update()
F32 force = focusOffsetDistance - focusThresholdNormalizedByDistance;
*/
- F32 focusLagLerp = LLCriticalDamp::getInterpolant( mFocusLag );
+ F32 focusLagLerp = LLSmoothInterpolation::getInterpolant( mFocusLag );
focus_pt_agent = lerp( focus_pt_agent, whereFocusWantsToBe, focusLagLerp );
mSimulatedFocusGlobal = gAgent.getPosGlobalFromAgent(focus_pt_agent);
}
- mRelativeFocus = lerp(mRelativeFocus, (focus_pt_agent - mSubjectPosition) * ~mSubjectRotation, LLCriticalDamp::getInterpolant(0.05f));
+ mRelativeFocus = lerp(mRelativeFocus, (focus_pt_agent - mSubjectPosition) * ~mSubjectRotation, LLSmoothInterpolation::getInterpolant(0.05f));
}// if focus is not locked ---------------------------------------------
@@ -414,7 +414,7 @@ void LLFollowCam::update()
//-------------------------------------------------------------------------------------------------
if ( distanceFromPositionToIdealPosition > mPositionThreshold )
{
- F32 positionPullLerp = LLCriticalDamp::getInterpolant( mPositionLag );
+ F32 positionPullLerp = LLSmoothInterpolation::getInterpolant( mPositionLag );
simulated_pos_agent = lerp( simulated_pos_agent, whereCameraPositionWantsToBe, positionPullLerp );
}
@@ -434,7 +434,7 @@ void LLFollowCam::update()
updateBehindnessConstraint(gAgent.getPosAgentFromGlobal(mSimulatedFocusGlobal), simulated_pos_agent);
mSimulatedPositionGlobal = gAgent.getPosGlobalFromAgent(simulated_pos_agent);
- mRelativePos = lerp(mRelativePos, (simulated_pos_agent - mSubjectPosition) * ~mSubjectRotation, LLCriticalDamp::getInterpolant(0.05f));
+ mRelativePos = lerp(mRelativePos, (simulated_pos_agent - mSubjectPosition) * ~mSubjectRotation, LLSmoothInterpolation::getInterpolant(0.05f));
} // if position is not locked -----------------------------------------------------------
@@ -489,7 +489,7 @@ BOOL LLFollowCam::updateBehindnessConstraint(LLVector3 focus, LLVector3& cam_pos
if ( cameraOffsetAngle > mBehindnessMaxAngle )
{
- F32 fraction = ((cameraOffsetAngle - mBehindnessMaxAngle) / cameraOffsetAngle) * LLCriticalDamp::getInterpolant(mBehindnessLag);
+ F32 fraction = ((cameraOffsetAngle - mBehindnessMaxAngle) / cameraOffsetAngle) * LLSmoothInterpolation::getInterpolant(mBehindnessLag);
cam_position = focus + horizontalSubjectBack * (slerp(fraction, camera_offset_rotation, LLQuaternion::DEFAULT));
cam_position.mV[VZ] = cameraZ; // clamp z value back to what it was before we started messing with it
constraint_active = TRUE;
@@ -876,12 +876,12 @@ bool LLFollowCamMgr::isScriptedCameraSource(const LLUUID& source)
void LLFollowCamMgr::dump()
{
S32 param_count = 0;
- llinfos << "Scripted camera active stack" << llendl;
+ LL_INFOS() << "Scripted camera active stack" << LL_ENDL;
for (param_stack_t::iterator param_it = sParamStack.begin();
param_it != sParamStack.end();
++param_it)
{
- llinfos << param_count++ <<
+ LL_INFOS() << param_count++ <<
" rot_limit: " << (*param_it)->getBehindnessAngle() <<
" rot_lag: " << (*param_it)->getBehindnessLag() <<
" distance: " << (*param_it)->getDistance() <<
@@ -894,7 +894,7 @@ void LLFollowCamMgr::dump()
" pos: " << (*param_it)->getPosition() <<
" pos_lag: " << (*param_it)->getPositionLag() <<
" pos_lock: " << ((*param_it)->getPositionLocked() ? "Y" : "N") <<
- " pos_thresh: " << (*param_it)->getPositionThreshold() << llendl;
+ " pos_thresh: " << (*param_it)->getPositionThreshold() << LL_ENDL;
}
}
diff --git a/indra/newview/llfriendcard.cpp b/indra/newview/llfriendcard.cpp
index 16ed3f990c..6566ef5dca 100755
--- a/indra/newview/llfriendcard.cpp
+++ b/indra/newview/llfriendcard.cpp
@@ -67,10 +67,10 @@ inline const std::string get_friend_all_subfolder_name()
void move_from_to_arrays(LLInventoryModel::cat_array_t& from, LLInventoryModel::cat_array_t& to)
{
- while (from.count() > 0)
+ while (from.size() > 0)
{
- to.put(from.get(0));
- from.remove(0);
+ to.push_back(from.at(0));
+ from.erase(from.begin());
}
}
@@ -82,7 +82,7 @@ const LLUUID& get_folder_uuid(const LLUUID& parentFolderUUID, LLInventoryCollect
gInventory.collectDescendentsIf(parentFolderUUID, cats, items,
LLInventoryModel::EXCLUDE_TRASH, matchFunctor);
- S32 cats_count = cats.count();
+ S32 cats_count = cats.size();
if (cats_count > 1)
{
@@ -92,7 +92,7 @@ const LLUUID& get_folder_uuid(const LLUUID& parentFolderUUID, LLInventoryCollect
<< LL_ENDL;
}
- return (cats_count >= 1) ? cats.get(0)->getUUID() : LLUUID::null;
+ return (cats_count >= 1) ? cats.at(0)->getUUID() : LLUUID::null;
}
/**
@@ -172,14 +172,14 @@ LLFriendCardsManager::~LLFriendCardsManager()
void LLFriendCardsManager::putAvatarData(const LLUUID& avatarID)
{
- llinfos << "Store avatar data, avatarID: " << avatarID << llendl;
+ LL_INFOS() << "Store avatar data, avatarID: " << avatarID << LL_ENDL;
std::pair< avatar_uuid_set_t::iterator, bool > pr;
pr = mBuddyIDSet.insert(avatarID);
if (pr.second == false)
{
- llwarns << "Trying to add avatar UUID for the stored avatar: "
+ LL_WARNS() << "Trying to add avatar UUID for the stored avatar: "
<< avatarID
- << llendl;
+ << LL_ENDL;
}
}
@@ -189,7 +189,7 @@ const LLUUID LLFriendCardsManager::extractAvatarID(const LLUUID& avatarID)
avatar_uuid_set_t::iterator it = mBuddyIDSet.find(avatarID);
if (mBuddyIDSet.end() == it)
{
- llwarns << "Call method for non-existent avatar name in the map: " << avatarID << llendl;
+ LL_WARNS() << "Call method for non-existent avatar name in the map: " << avatarID << LL_ENDL;
}
else
{
@@ -207,7 +207,7 @@ bool LLFriendCardsManager::isItemInAnyFriendsList(const LLViewerInventoryItem* i
LLInventoryModel::item_array_t items;
findMatchedFriendCards(item->getCreatorUUID(), items);
- return items.count() > 0;
+ return items.size() > 0;
}
@@ -242,9 +242,9 @@ bool LLFriendCardsManager::isObjDirectDescendentOfCategory(const LLInventoryObje
{
LLUUID creator_id = item->getCreatorUUID();
LLViewerInventoryItem* cur_item = NULL;
- for ( S32 i = items->count() - 1; i >= 0; --i )
+ for ( S32 i = items->size() - 1; i >= 0; --i )
{
- cur_item = items->get(i);
+ cur_item = items->at(i);
if ( creator_id == cur_item->getCreatorUUID() )
{
result = true;
@@ -259,9 +259,9 @@ bool LLFriendCardsManager::isObjDirectDescendentOfCategory(const LLInventoryObje
// Note: UUID's of compared items also may be not equal.
std::string obj_name = obj->getName();
LLViewerInventoryItem* cur_item = NULL;
- for ( S32 i = items->count() - 1; i >= 0; --i )
+ for ( S32 i = items->size() - 1; i >= 0; --i )
{
- cur_item = items->get(i);
+ cur_item = items->at(i);
if ( obj->getType() != cur_item->getType() )
continue;
if ( obj_name == cur_item->getName() )
@@ -279,9 +279,9 @@ bool LLFriendCardsManager::isObjDirectDescendentOfCategory(const LLInventoryObje
// then return true. Note: UUID's of compared items also may be not equal.
std::string obj_name = obj->getName();
LLViewerInventoryCategory* cur_cat = NULL;
- for ( S32 i = cats->count() - 1; i >= 0; --i )
+ for ( S32 i = cats->size() - 1; i >= 0; --i )
{
- cur_cat = cats->get(i);
+ cur_cat = cats->at(i);
if ( obj->getType() != cur_cat->getType() )
continue;
if ( obj_name == cur_cat->getName() )
@@ -381,10 +381,10 @@ void LLFriendCardsManager::findMatchedFriendCards(const LLUUID& avatarID, LLInve
LLInventoryModel::cat_array_t subFolders;
subFolders.push_back(friendFolder);
- while (subFolders.count() > 0)
+ while (subFolders.size() > 0)
{
- LLViewerInventoryCategory* cat = subFolders.get(0);
- subFolders.remove(0);
+ LLViewerInventoryCategory* cat = subFolders.at(0);
+ subFolders.erase(subFolders.begin());
gInventory.collectDescendentsIf(cat->getUUID(), cats, items,
LLInventoryModel::EXCLUDE_TRASH, matchFunctor);
@@ -431,7 +431,7 @@ void LLFriendCardsManager::ensureFriendsFolderExists()
{
LLViewerInventoryCategory* cat = gInventory.getCategory(calling_cards_folder_ID);
std::string cat_name = cat ? cat->getName() : "unknown";
- llwarns << "Failed to find \"" << cat_name << "\" category descendents in Category Tree." << llendl;
+ LL_WARNS() << "Failed to find \"" << cat_name << "\" category descendents in Category Tree." << LL_ENDL;
}
friends_folder_ID = gInventory.createNewCategory(calling_cards_folder_ID,
@@ -462,7 +462,7 @@ void LLFriendCardsManager::ensureFriendsAllFolderExists()
{
LLViewerInventoryCategory* cat = gInventory.getCategory(friends_folder_ID);
std::string cat_name = cat ? cat->getName() : "unknown";
- llwarns << "Failed to find \"" << cat_name << "\" category descendents in Category Tree." << llendl;
+ LL_WARNS() << "Failed to find \"" << cat_name << "\" category descendents in Category Tree." << LL_ENDL;
}
friends_all_folder_ID = gInventory.createNewCategory(friends_folder_ID,
@@ -507,7 +507,7 @@ void LLFriendCardsManager::syncFriendsFolder()
// 2. Add missing Friend Cards for friends
LLAvatarTracker::buddy_map_t::const_iterator buddy_it = all_buddies.begin();
- llinfos << "try to build friends, count: " << all_buddies.size() << llendl;
+ LL_INFOS() << "try to build friends, count: " << all_buddies.size() << LL_ENDL;
for(; buddy_it != all_buddies.end(); ++buddy_it)
{
const LLUUID& buddy_id = (*buddy_it).first;
@@ -535,26 +535,26 @@ void LLFriendCardsManager::addFriendCardToInventory(const LLUUID& avatarID)
LLAvatarNameCache::get(avatarID, &av_name);
const std::string& name = av_name.getAccountName();
- lldebugs << "Processing buddy name: " << name
+ LL_DEBUGS() << "Processing buddy name: " << name
<< ", id: " << avatarID
- << llendl;
+ << LL_ENDL;
if (shouldBeAdded && findFriendCardInventoryUUIDImpl(avatarID).notNull())
{
shouldBeAdded = false;
- lldebugs << "is found in Inventory: " << name << llendl;
+ LL_DEBUGS() << "is found in Inventory: " << name << LL_ENDL;
}
if (shouldBeAdded && isAvatarDataStored(avatarID))
{
shouldBeAdded = false;
- lldebugs << "is found in sentRequests: " << name << llendl;
+ LL_DEBUGS() << "is found in sentRequests: " << name << LL_ENDL;
}
if (shouldBeAdded)
{
putAvatarData(avatarID);
- lldebugs << "Sent create_inventory_item for " << avatarID << ", " << name << llendl;
+ LL_DEBUGS() << "Sent create_inventory_item for " << avatarID << ", " << name << LL_ENDL;
// TODO: mantipov: Is CreateFriendCardCallback really needed? Probably not
LLPointer<LLInventoryCallback> cb = new CreateFriendCardCallback;
diff --git a/indra/newview/llgesturelistener.cpp b/indra/newview/llgesturelistener.cpp
index 2fff506681..6fd749d83e 100755
--- a/indra/newview/llgesturelistener.cpp
+++ b/indra/newview/llgesturelistener.cpp
@@ -101,12 +101,12 @@ void LLGestureListener::isGesturePlaying(const LLSD& event_data) const
}
else
{
- llwarns << "isGesturePlaying did not find a gesture object for " << gesture_id << llendl;
+ LL_WARNS() << "isGesturePlaying did not find a gesture object for " << gesture_id << LL_ENDL;
}
}
else
{
- llwarns << "isGesturePlaying didn't have 'id' value passed in" << llendl;
+ LL_WARNS() << "isGesturePlaying didn't have 'id' value passed in" << LL_ENDL;
}
LLSD reply = LLSD::emptyMap();
@@ -148,12 +148,12 @@ void LLGestureListener::startOrStopGesture(LLSD const & event_data, bool start)
}
else
{
- llwarns << "startOrStopGesture did not find a gesture object for " << gesture_id << llendl;
+ LL_WARNS() << "startOrStopGesture did not find a gesture object for " << gesture_id << LL_ENDL;
}
}
else
{
- llwarns << "startOrStopGesture didn't have 'id' value passed in" << llendl;
+ LL_WARNS() << "startOrStopGesture didn't have 'id' value passed in" << LL_ENDL;
}
}
diff --git a/indra/newview/llgesturemgr.cpp b/indra/newview/llgesturemgr.cpp
index b56c34573d..9fa40bc6b9 100755
--- a/indra/newview/llgesturemgr.cpp
+++ b/indra/newview/llgesturemgr.cpp
@@ -257,19 +257,19 @@ void LLGestureMgr::activateGestureWithAsset(const LLUUID& item_id,
if( !gAssetStorage )
{
- llwarns << "LLGestureMgr::activateGestureWithAsset without valid gAssetStorage" << llendl;
+ LL_WARNS() << "LLGestureMgr::activateGestureWithAsset without valid gAssetStorage" << LL_ENDL;
return;
}
// If gesture is already active, nothing to do.
if (isGestureActive(item_id))
{
- llwarns << "Tried to loadGesture twice " << item_id << llendl;
+ LL_WARNS() << "Tried to loadGesture twice " << item_id << LL_ENDL;
return;
}
// if (asset_id.isNull())
// {
-// llwarns << "loadGesture() - gesture has no asset" << llendl;
+// LL_WARNS() << "loadGesture() - gesture has no asset" << LL_ENDL;
// return;
// }
@@ -305,7 +305,7 @@ void LLGestureMgr::deactivateGesture(const LLUUID& item_id)
item_map_t::iterator it = mActive.find(base_item_id);
if (it == mActive.end())
{
- llwarns << "deactivateGesture for inactive gesture " << item_id << llendl;
+ LL_WARNS() << "deactivateGesture for inactive gesture " << item_id << LL_ENDL;
return;
}
@@ -469,7 +469,7 @@ void LLGestureMgr::replaceGesture(const LLUUID& item_id, LLMultiGesture* new_ges
item_map_t::iterator it = mActive.find(base_item_id);
if (it == mActive.end())
{
- llwarns << "replaceGesture for inactive gesture " << base_item_id << llendl;
+ LL_WARNS() << "replaceGesture for inactive gesture " << base_item_id << LL_ENDL;
return;
}
@@ -511,7 +511,7 @@ void LLGestureMgr::replaceGesture(const LLUUID& item_id, const LLUUID& new_asset
item_map_t::iterator it = LLGestureMgr::instance().mActive.find(base_item_id);
if (it == mActive.end())
{
- llwarns << "replaceGesture for inactive gesture " << base_item_id << llendl;
+ LL_WARNS() << "replaceGesture for inactive gesture " << base_item_id << LL_ENDL;
return;
}
@@ -586,7 +586,7 @@ void LLGestureMgr::playGesture(LLMultiGesture* gesture)
}
default:
{
- llwarns << "Unknown gesture step type: " << step->getType() << llendl;
+ LL_WARNS() << "Unknown gesture step type: " << step->getType() << LL_ENDL;
}
}
}
@@ -907,8 +907,8 @@ void LLGestureMgr::stepGesture(LLMultiGesture* gesture)
else if (gesture->mWaitTimer.getElapsedTimeF32() > MAX_WAIT_ANIM_SECS)
{
// we've waited too long for an animation
- llinfos << "Waited too long for animations to stop, continuing gesture."
- << llendl;
+ LL_INFOS() << "Waited too long for animations to stop, continuing gesture."
+ << LL_ENDL;
gesture->mWaitingAnimations = FALSE;
gesture->mCurrentStep++;
}
@@ -1129,7 +1129,7 @@ void LLGestureMgr::onLoadComplete(LLVFS *vfs,
}
else
{
- llwarns << "Unable to load gesture" << llendl;
+ LL_WARNS() << "Unable to load gesture" << LL_ENDL;
self.mActive.erase(item_id);
@@ -1139,8 +1139,6 @@ void LLGestureMgr::onLoadComplete(LLVFS *vfs,
}
else
{
- LLViewerStats::getInstance()->incStat( LLViewerStats::ST_DOWNLOAD_FAILED );
-
if( LL_ERR_ASSET_REQUEST_NOT_IN_DATABASE == status ||
LL_ERR_FILE_EMPTY == status)
{
@@ -1151,7 +1149,7 @@ void LLGestureMgr::onLoadComplete(LLVFS *vfs,
LLDelayedGestureError::gestureFailedToLoad( item_id );
}
- llwarns << "Problem loading gesture: " << status << llendl;
+ LL_WARNS() << "Problem loading gesture: " << status << LL_ENDL;
LLGestureMgr::instance().mActive.erase(item_id);
}
@@ -1187,7 +1185,7 @@ void LLGestureMgr::onAssetLoadComplete(LLVFS *vfs,
}
default:
{
- llwarns << "Unexpected asset type: " << type << llendl;
+ LL_WARNS() << "Unexpected asset type: " << type << LL_ENDL;
// We don't want to return from this callback without
// an animation or sound callback being fired
@@ -1242,7 +1240,7 @@ bool LLGestureMgr::hasLoadingAssets(LLMultiGesture* gesture)
}
default:
{
- llwarns << "Unknown gesture step type: " << step->getType() << llendl;
+ LL_WARNS() << "Unknown gesture step type: " << step->getType() << LL_ENDL;
}
}
}
@@ -1324,7 +1322,7 @@ void LLGestureMgr::removeObserver(LLGestureManagerObserver* observer)
// from the list.
void LLGestureMgr::notifyObservers()
{
- lldebugs << "LLGestureMgr::notifyObservers" << llendl;
+ LL_DEBUGS() << "LLGestureMgr::notifyObservers" << LL_ENDL;
for(std::vector<LLGestureManagerObserver*>::iterator iter = mObservers.begin();
iter != mObservers.end();
diff --git a/indra/newview/llgiveinventory.cpp b/indra/newview/llgiveinventory.cpp
index 72bea8db10..493dea62ff 100755
--- a/indra/newview/llgiveinventory.cpp
+++ b/indra/newview/llgiveinventory.cpp
@@ -192,7 +192,7 @@ bool LLGiveInventory::doGiveInventoryItem(const LLUUID& to_agent,
{
bool res = true;
- llinfos << "LLGiveInventory::giveInventory()" << llendl;
+ LL_INFOS() << "LLGiveInventory::giveInventory()" << LL_ENDL;
if (!isInventoryGiveAcceptable(item))
{
return false;
@@ -230,8 +230,8 @@ bool LLGiveInventory::doGiveInventoryCategory(const LLUUID& to_agent,
{
return false;
}
- llinfos << "LLGiveInventory::giveInventoryCategory() - "
- << cat->getUUID() << llendl;
+ LL_INFOS() << "LLGiveInventory::giveInventoryCategory() - "
+ << cat->getUUID() << LL_ENDL;
if (!isAgentAvatarValid())
{
@@ -248,11 +248,11 @@ bool LLGiveInventory::doGiveInventoryCategory(const LLUUID& to_agent,
items,
LLInventoryModel::EXCLUDE_TRASH,
giveable);
- S32 count = cats.count();
+ S32 count = cats.size();
bool complete = true;
for(S32 i = 0; i < count; ++i)
{
- if (!gInventory.isCategoryComplete(cats.get(i)->getUUID()))
+ if (!gInventory.isCategoryComplete(cats.at(i)->getUUID()))
{
complete = false;
break;
@@ -263,7 +263,7 @@ bool LLGiveInventory::doGiveInventoryCategory(const LLUUID& to_agent,
LLNotificationsUtil::add("IncompleteInventory");
give_successful = false;
}
- count = items.count() + cats.count();
+ count = items.size() + cats.size();
if (count > MAX_ITEMS)
{
LLNotificationsUtil::add("TooManyItems");
@@ -447,10 +447,10 @@ bool LLGiveInventory::handleCopyProtectedCategory(const LLSD& notification, cons
items,
LLInventoryModel::EXCLUDE_TRASH,
remove);
- S32 count = items.count();
+ S32 count = items.size();
for(S32 i = 0; i < count; ++i)
{
- gInventory.deleteObject(items.get(i)->getUUID());
+ gInventory.deleteObject(items.at(i)->getUUID());
}
gInventory.notifyObservers();
@@ -484,8 +484,8 @@ bool LLGiveInventory::commitGiveInventoryCategory(const LLUUID& to_agent,
{
return false;
}
- llinfos << "LLGiveInventory::commitGiveInventoryCategory() - "
- << cat->getUUID() << llendl;
+ LL_INFOS() << "LLGiveInventory::commitGiveInventoryCategory() - "
+ << cat->getUUID() << LL_ENDL;
// add buddy to recent people list
LLRecentPeople::instance().add(to_agent);
@@ -504,7 +504,7 @@ bool LLGiveInventory::commitGiveInventoryCategory(const LLUUID& to_agent,
// MAX ITEMS is based on (sizeof(uuid)+2) * count must be <
// MTUBYTES or 18 * count < 1200 => count < 1200/18 =>
// 66. I've cut it down a bit from there to give some pad.
- S32 count = items.count() + cats.count();
+ S32 count = items.size() + cats.size();
if (count > MAX_ITEMS)
{
LLNotificationsUtil::add("TooManyItems");
@@ -530,21 +530,21 @@ bool LLGiveInventory::commitGiveInventoryCategory(const LLUUID& to_agent,
memcpy(pos, &(cat->getUUID()), UUID_BYTES); /* Flawfinder: ignore */
pos += UUID_BYTES;
S32 i;
- count = cats.count();
+ count = cats.size();
for(i = 0; i < count; ++i)
{
memcpy(pos, &type, sizeof(U8)); /* Flawfinder: ignore */
pos += sizeof(U8);
- memcpy(pos, &(cats.get(i)->getUUID()), UUID_BYTES); /* Flawfinder: ignore */
+ memcpy(pos, &(cats.at(i)->getUUID()), UUID_BYTES); /* Flawfinder: ignore */
pos += UUID_BYTES;
}
- count = items.count();
+ count = items.size();
for(i = 0; i < count; ++i)
{
- type = (U8)items.get(i)->getType();
+ type = (U8)items.at(i)->getType();
memcpy(pos, &type, sizeof(U8)); /* Flawfinder: ignore */
pos += sizeof(U8);
- memcpy(pos, &(items.get(i)->getUUID()), UUID_BYTES); /* Flawfinder: ignore */
+ memcpy(pos, &(items.at(i)->getUUID()), UUID_BYTES); /* Flawfinder: ignore */
pos += UUID_BYTES;
}
pack_instant_message(
diff --git a/indra/newview/llglsandbox.cpp b/indra/newview/llglsandbox.cpp
index c4c1827266..bede9b1e6c 100755
--- a/indra/newview/llglsandbox.cpp
+++ b/indra/newview/llglsandbox.cpp
@@ -990,7 +990,7 @@ void gpu_benchmark()
F32 gbps = results[results.size()/2];
- llinfos << "Memory bandwidth is " << llformat("%.3f", gbps) << "GB/sec according to CPU timers" << llendl;
+ LL_INFOS() << "Memory bandwidth is " << llformat("%.3f", gbps) << "GB/sec according to CPU timers" << LL_ENDL;
F32 ms = gBenchmarkProgram.mTimeElapsed/1000000.f;
F32 seconds = ms/1000.f;
@@ -1001,11 +1001,11 @@ void gpu_benchmark()
if (gGLManager.mHasTimerQuery)
{
- llinfos << "Memory bandwidth is " << llformat("%.3f", gbps) << "GB/sec according to ARB_timer_query" << llendl;
+ LL_INFOS() << "Memory bandwidth is " << llformat("%.3f", gbps) << "GB/sec according to ARB_timer_query" << LL_ENDL;
}
else
{
- llinfos << "ARB_timer_query unavailable." << llendl;
+ LL_INFOS() << "ARB_timer_query unavailable." << LL_ENDL;
}
}
diff --git a/indra/newview/llgroupactions.cpp b/indra/newview/llgroupactions.cpp
index 302d21c2e4..f514729aa1 100755
--- a/indra/newview/llgroupactions.cpp
+++ b/indra/newview/llgroupactions.cpp
@@ -126,7 +126,7 @@ public:
mRequestProcessed(false),
LLGroupMgrObserver(group_id)
{
- llinfos << "Sending new group member request for group_id: "<< group_id << llendl;
+ LL_INFOS() << "Sending new group member request for group_id: "<< group_id << LL_ENDL;
LLGroupMgr* mgr = LLGroupMgr::getInstance();
// register ourselves as an observer
mgr->addObserver(this);
@@ -140,8 +140,8 @@ public:
if (!mRequestProcessed)
{
// Request is pending
- llwarns << "Destroying pending group member request for group_id: "
- << mGroupId << llendl;
+ LL_WARNS() << "Destroying pending group member request for group_id: "
+ << mGroupId << LL_ENDL;
}
// Remove ourselves as an observer
LLGroupMgr::getInstance()->removeObserver(this);
@@ -154,11 +154,11 @@ public:
LLGroupMgrGroupData* gdatap = LLGroupMgr::getInstance()->getGroupData(mGroupId);
if (!gdatap)
{
- llwarns << "LLGroupMgr::getInstance()->getGroupData() was NULL" << llendl;
+ LL_WARNS() << "LLGroupMgr::getInstance()->getGroupData() was NULL" << LL_ENDL;
}
else if (!gdatap->isMemberDataComplete())
{
- llwarns << "LLGroupMgr::getInstance()->getGroupData()->isMemberDataComplete() was FALSE" << llendl;
+ LL_WARNS() << "LLGroupMgr::getInstance()->getGroupData()->isMemberDataComplete() was FALSE" << LL_ENDL;
}
else
{
@@ -204,14 +204,14 @@ void LLGroupActions::startCall(const LLUUID& group_id)
if (!gAgent.getGroupData(group_id, gdata))
{
- llwarns << "Error getting group data" << llendl;
+ LL_WARNS() << "Error getting group data" << LL_ENDL;
return;
}
LLUUID session_id = gIMMgr->addSession(gdata.mName, IM_SESSION_GROUP_START, group_id, true);
if (session_id == LLUUID::null)
{
- llwarns << "Error adding session" << llendl;
+ LL_WARNS() << "Error adding session" << LL_ENDL;
return;
}
@@ -257,8 +257,8 @@ void LLGroupActions::join(const LLUUID& group_id)
}
else
{
- llwarns << "LLGroupMgr::getInstance()->getGroupData(" << group_id
- << ") was NULL" << llendl;
+ LL_WARNS() << "LLGroupMgr::getInstance()->getGroupData(" << group_id
+ << ") was NULL" << LL_ENDL;
}
}
diff --git a/indra/newview/llgroupiconctrl.cpp b/indra/newview/llgroupiconctrl.cpp
index 2d0fc26c2a..6abf9ea637 100755
--- a/indra/newview/llgroupiconctrl.cpp
+++ b/indra/newview/llgroupiconctrl.cpp
@@ -30,33 +30,21 @@
#include "llagent.h"
#include "llviewertexture.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 "llfloaterimsession.h"
-*/
static LLDefaultChildRegistry::Register<LLGroupIconCtrl> g_i("group_icon");
LLGroupIconCtrl::Params::Params()
-: group_id("group_id")
-, draw_tooltip("draw_tooltip", true)
-, default_icon_name("default_icon_name")
-{
-}
+: group_id("group_id"),
+ draw_tooltip("draw_tooltip", true),
+ default_icon_name("default_icon_name")
+{}
LLGroupIconCtrl::LLGroupIconCtrl(const LLGroupIconCtrl::Params& p)
-: LLIconCtrl(p)
-, mGroupId(LLUUID::null)
-, mDrawTooltip(p.draw_tooltip)
-, mDefaultIconName(p.default_icon_name)
+: LLIconCtrl(p),
+ mGroupId(LLUUID::null),
+ mDrawTooltip(p.draw_tooltip),
+ mDefaultIconName(p.default_icon_name)
{
mPriority = LLViewerFetchedTexture::BOOST_ICON;
diff --git a/indra/newview/llgrouplist.cpp b/indra/newview/llgrouplist.cpp
index aba3d74d87..b1b7a87ae8 100755
--- a/indra/newview/llgrouplist.cpp
+++ b/indra/newview/llgrouplist.cpp
@@ -163,7 +163,7 @@ static bool findInsensitive(std::string haystack, const std::string& needle_uppe
void LLGroupList::refresh()
{
const LLUUID& highlight_id = gAgent.getGroupID();
- S32 count = gAgent.mGroups.count();
+ S32 count = gAgent.mGroups.size();
LLUUID id;
bool have_filter = !mNameFilter.empty();
@@ -171,8 +171,8 @@ void LLGroupList::refresh()
for(S32 i = 0; i < count; ++i)
{
- id = gAgent.mGroups.get(i).mID;
- const LLGroupData& group_data = gAgent.mGroups.get(i);
+ id = gAgent.mGroups.at(i).mID;
+ const LLGroupData& group_data = gAgent.mGroups.at(i);
if (have_filter && !findInsensitive(group_data.mName, mNameFilter))
continue;
addNewItem(id, group_data.mName, group_data.mInsigniaID, ADD_BOTTOM);
diff --git a/indra/newview/llgroupmgr.cpp b/indra/newview/llgroupmgr.cpp
index 7ea08539f9..18cdc6ec6d 100755
--- 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
@@ -328,7 +330,7 @@ void LLGroupMgrGroupData::setRoleData(const LLUUID& role_id, LLRoleData role_dat
}
else
{
- llwarns << "Change being made to non-existant role " << role_id << llendl;
+ LL_WARNS() << "Change being made to non-existant role " << role_id << LL_ENDL;
}
}
@@ -342,7 +344,7 @@ void LLGroupMgrGroupData::createRole(const LLUUID& role_id, LLRoleData role_data
{
if (mRoleChanges.find(role_id) != mRoleChanges.end())
{
- llwarns << "create role for existing role! " << role_id << llendl;
+ LL_WARNS() << "create role for existing role! " << role_id << LL_ENDL;
}
else
{
@@ -379,7 +381,7 @@ void LLGroupMgrGroupData::addRolePower(const LLUUID &role_id, U64 power)
}
else
{
- llwarns << "addRolePower: no role data found for " << role_id << llendl;
+ LL_WARNS() << "addRolePower: no role data found for " << role_id << LL_ENDL;
}
}
@@ -393,7 +395,7 @@ void LLGroupMgrGroupData::removeRolePower(const LLUUID &role_id, U64 power)
}
else
{
- llwarns << "removeRolePower: no role data found for " << role_id << llendl;
+ LL_WARNS() << "removeRolePower: no role data found for " << role_id << LL_ENDL;
}
}
@@ -406,7 +408,7 @@ U64 LLGroupMgrGroupData::getRolePowers(const LLUUID& role_id)
}
else
{
- llwarns << "getRolePowers: no role data found for " << role_id << llendl;
+ LL_WARNS() << "getRolePowers: no role data found for " << role_id << LL_ENDL;
return GP_NO_POWERS;
}
}
@@ -490,8 +492,8 @@ bool LLGroupMgrGroupData::changeRoleMember(const LLUUID& role_id,
if (ri == mRoles.end()
|| mi == mMembers.end() )
{
- if (ri == mRoles.end()) llwarns << "LLGroupMgrGroupData::changeRoleMember couldn't find role " << role_id << llendl;
- if (mi == mMembers.end()) llwarns << "LLGroupMgrGroupData::changeRoleMember couldn't find member " << member_id << llendl;
+ if (ri == mRoles.end()) LL_WARNS() << "LLGroupMgrGroupData::changeRoleMember couldn't find role " << role_id << LL_ENDL;
+ if (mi == mMembers.end()) LL_WARNS() << "LLGroupMgrGroupData::changeRoleMember couldn't find member " << member_id << LL_ENDL;
return false;
}
@@ -500,13 +502,13 @@ bool LLGroupMgrGroupData::changeRoleMember(const LLUUID& role_id,
if (!grd || !gmd)
{
- llwarns << "LLGroupMgrGroupData::changeRoleMember couldn't get member or role data." << llendl;
+ LL_WARNS() << "LLGroupMgrGroupData::changeRoleMember couldn't get member or role data." << LL_ENDL;
return false;
}
if (RMC_ADD == rmc)
{
- llinfos << " adding member to role." << llendl;
+ LL_INFOS() << " adding member to role." << LL_ENDL;
grd->addMember(member_id);
gmd->addRole(role_id,grd);
@@ -516,7 +518,7 @@ bool LLGroupMgrGroupData::changeRoleMember(const LLUUID& role_id,
}
else if (RMC_REMOVE == rmc)
{
- llinfos << " removing member from role." << llendl;
+ LL_INFOS() << " removing member from role." << LL_ENDL;
grd->removeMember(member_id);
gmd->removeRole(role_id);
@@ -535,9 +537,9 @@ bool LLGroupMgrGroupData::changeRoleMember(const LLUUID& role_id,
if (it->second.mChange == rmc)
{
// Already recorded this change? Weird.
- llinfos << "Received duplicate change for "
+ LL_INFOS() << "Received duplicate change for "
<< " role: " << role_id << " member " << member_id
- << " change " << (rmc == RMC_ADD ? "ADD" : "REMOVE") << llendl;
+ << " change " << (rmc == RMC_ADD ? "ADD" : "REMOVE") << LL_ENDL;
}
else
{
@@ -545,7 +547,7 @@ bool LLGroupMgrGroupData::changeRoleMember(const LLUUID& role_id,
// If that changes this will need more logic
if (rmc == RMC_NONE)
{
- llwarns << "changeRoleMember: existing entry with 'RMC_NONE' change! This shouldn't happen." << llendl;
+ LL_WARNS() << "changeRoleMember: existing entry with 'RMC_NONE' change! This shouldn't happen." << LL_ENDL;
LLRoleMemberChange rc(role_id,member_id,rmc);
mRoleMemberChanges[role_member] = rc;
}
@@ -863,12 +865,12 @@ static void formatDateString(std::string &date_string)
// static
void LLGroupMgr::processGroupMembersReply(LLMessageSystem* msg, void** data)
{
- lldebugs << "LLGroupMgr::processGroupMembersReply" << llendl;
+ LL_DEBUGS() << "LLGroupMgr::processGroupMembersReply" << LL_ENDL;
LLUUID agent_id;
msg->getUUIDFast(_PREHASH_AgentData, _PREHASH_AgentID, agent_id );
if (gAgent.getID() != agent_id)
{
- llwarns << "Got group members reply for another agent!" << llendl;
+ LL_WARNS() << "Got group members reply for another agent!" << LL_ENDL;
return;
}
@@ -881,7 +883,7 @@ void LLGroupMgr::processGroupMembersReply(LLMessageSystem* msg, void** data)
LLGroupMgrGroupData* group_datap = LLGroupMgr::getInstance()->getGroupData(group_id);
if (!group_datap || (group_datap->mMemberRequestID != request_id))
{
- llwarns << "processGroupMembersReply: Received incorrect (stale?) group or request id" << llendl;
+ LL_WARNS() << "processGroupMembersReply: Received incorrect (stale?) group or request id" << LL_ENDL;
return;
}
@@ -919,7 +921,7 @@ void LLGroupMgr::processGroupMembersReply(LLMessageSystem* msg, void** data)
formatDateString(online_status); // reformat for sorting, e.g. 12/25/2008 -> 2008/12/25
}
- //llinfos << "Member " << member_id << " has powers " << std::hex << agent_powers << std::dec << llendl;
+ //LL_INFOS() << "Member " << member_id << " has powers " << std::hex << agent_powers << std::dec << LL_ENDL;
LLGroupMemberData* newdata = new LLGroupMemberData(member_id,
contribution,
agent_powers,
@@ -930,14 +932,14 @@ void LLGroupMgr::processGroupMembersReply(LLMessageSystem* msg, void** data)
LLGroupMgrGroupData::member_list_t::iterator mit = group_datap->mMembers.find(member_id);
if (mit != group_datap->mMembers.end())
{
- llinfos << " *** Received duplicate member data for agent " << member_id << llendl;
+ LL_INFOS() << " *** Received duplicate member data for agent " << member_id << LL_ENDL;
}
#endif
group_datap->mMembers[member_id] = newdata;
}
else
{
- llinfos << "Received null group member data." << llendl;
+ LL_INFOS() << "Received null group member data." << LL_ENDL;
}
}
@@ -969,12 +971,12 @@ void LLGroupMgr::processGroupMembersReply(LLMessageSystem* msg, void** data)
//static
void LLGroupMgr::processGroupPropertiesReply(LLMessageSystem* msg, void** data)
{
- lldebugs << "LLGroupMgr::processGroupPropertiesReply" << llendl;
+ LL_DEBUGS() << "LLGroupMgr::processGroupPropertiesReply" << LL_ENDL;
LLUUID agent_id;
msg->getUUIDFast(_PREHASH_AgentData, _PREHASH_AgentID, agent_id );
if (gAgent.getID() != agent_id)
{
- llwarns << "Got group properties reply for another agent!" << llendl;
+ LL_WARNS() << "Got group properties reply for another agent!" << LL_ENDL;
return;
}
@@ -1036,12 +1038,12 @@ void LLGroupMgr::processGroupPropertiesReply(LLMessageSystem* msg, void** data)
// static
void LLGroupMgr::processGroupRoleDataReply(LLMessageSystem* msg, void** data)
{
- lldebugs << "LLGroupMgr::processGroupRoleDataReply" << llendl;
+ LL_DEBUGS() << "LLGroupMgr::processGroupRoleDataReply" << LL_ENDL;
LLUUID agent_id;
msg->getUUIDFast(_PREHASH_AgentData, _PREHASH_AgentID, agent_id );
if (gAgent.getID() != agent_id)
{
- llwarns << "Got group role data reply for another agent!" << llendl;
+ LL_WARNS() << "Got group role data reply for another agent!" << LL_ENDL;
return;
}
@@ -1054,7 +1056,7 @@ void LLGroupMgr::processGroupRoleDataReply(LLMessageSystem* msg, void** data)
LLGroupMgrGroupData* group_datap = LLGroupMgr::getInstance()->getGroupData(group_id);
if (!group_datap || (group_datap->mRoleDataRequestID != request_id))
{
- llwarns << "processGroupPropertiesReply: Received incorrect (stale?) group or request id" << llendl;
+ LL_WARNS() << "processGroupPropertiesReply: Received incorrect (stale?) group or request id" << LL_ENDL;
return;
}
@@ -1097,7 +1099,7 @@ void LLGroupMgr::processGroupRoleDataReply(LLMessageSystem* msg, void** data)
- lldebugs << "Adding role data: " << name << " {" << role_id << "}" << llendl;
+ LL_DEBUGS() << "Adding role data: " << name << " {" << role_id << "}" << LL_ENDL;
LLGroupRoleData* rd = new LLGroupRoleData(role_id,name,title,desc,powers,member_count);
group_datap->mRoles[role_id] = rd;
}
@@ -1121,12 +1123,12 @@ void LLGroupMgr::processGroupRoleDataReply(LLMessageSystem* msg, void** data)
// static
void LLGroupMgr::processGroupRoleMembersReply(LLMessageSystem* msg, void** data)
{
- lldebugs << "LLGroupMgr::processGroupRoleMembersReply" << llendl;
+ LL_DEBUGS() << "LLGroupMgr::processGroupRoleMembersReply" << LL_ENDL;
LLUUID agent_id;
msg->getUUIDFast(_PREHASH_AgentData, _PREHASH_AgentID, agent_id );
if (gAgent.getID() != agent_id)
{
- llwarns << "Got group role members reply for another agent!" << llendl;
+ LL_WARNS() << "Got group role members reply for another agent!" << LL_ENDL;
return;
}
@@ -1142,7 +1144,7 @@ void LLGroupMgr::processGroupRoleMembersReply(LLMessageSystem* msg, void** data)
LLGroupMgrGroupData* group_datap = LLGroupMgr::getInstance()->getGroupData(group_id);
if (!group_datap || (group_datap->mRoleMembersRequestID != request_id))
{
- llwarns << "processGroupRoleMembersReply: Received incorrect (stale?) group or request id" << llendl;
+ LL_WARNS() << "processGroupRoleMembersReply: Received incorrect (stale?) group or request id" << LL_ENDL;
return;
}
@@ -1182,14 +1184,14 @@ void LLGroupMgr::processGroupRoleMembersReply(LLMessageSystem* msg, void** data)
if (rd && md)
{
- lldebugs << "Adding role-member pair: " << role_id << ", " << member_id << llendl;
+ LL_DEBUGS() << "Adding role-member pair: " << role_id << ", " << member_id << LL_ENDL;
rd->addMember(member_id);
md->addRole(role_id,rd);
}
else
{
- if (!rd) llwarns << "Received role data for unknown role " << role_id << " in group " << group_id << llendl;
- if (!md) llwarns << "Received role data for unknown member " << member_id << " in group " << group_id << llendl;
+ if (!rd) LL_WARNS() << "Received role data for unknown role " << role_id << " in group " << group_id << LL_ENDL;
+ if (!md) LL_WARNS() << "Received role data for unknown member " << member_id << " in group " << group_id << LL_ENDL;
}
}
}
@@ -1203,7 +1205,7 @@ void LLGroupMgr::processGroupRoleMembersReply(LLMessageSystem* msg, void** data)
LLGroupRoleData* everyone = group_datap->mRoles[LLUUID::null];
if (!everyone)
{
- llwarns << "Everyone role not found!" << llendl;
+ LL_WARNS() << "Everyone role not found!" << LL_ENDL;
}
else
{
@@ -1229,12 +1231,12 @@ void LLGroupMgr::processGroupRoleMembersReply(LLMessageSystem* msg, void** data)
// static
void LLGroupMgr::processGroupTitlesReply(LLMessageSystem* msg, void** data)
{
- lldebugs << "LLGroupMgr::processGroupTitlesReply" << llendl;
+ LL_DEBUGS() << "LLGroupMgr::processGroupTitlesReply" << LL_ENDL;
LLUUID agent_id;
msg->getUUIDFast(_PREHASH_AgentData, _PREHASH_AgentID, agent_id );
if (gAgent.getID() != agent_id)
{
- llwarns << "Got group properties reply for another agent!" << llendl;
+ LL_WARNS() << "Got group properties reply for another agent!" << LL_ENDL;
return;
}
@@ -1246,7 +1248,7 @@ void LLGroupMgr::processGroupTitlesReply(LLMessageSystem* msg, void** data)
LLGroupMgrGroupData* group_datap = LLGroupMgr::getInstance()->getGroupData(group_id);
if (!group_datap || (group_datap->mTitlesRequestID != request_id))
{
- llwarns << "processGroupTitlesReply: Received incorrect (stale?) group" << llendl;
+ LL_WARNS() << "processGroupTitlesReply: Received incorrect (stale?) group" << LL_ENDL;
return;
}
@@ -1262,7 +1264,7 @@ void LLGroupMgr::processGroupTitlesReply(LLMessageSystem* msg, void** data)
if (!title.mTitle.empty())
{
- lldebugs << "LLGroupMgr adding title: " << title.mTitle << ", " << title.mRoleID << ", " << (title.mSelected ? 'Y' : 'N') << llendl;
+ LL_DEBUGS() << "LLGroupMgr adding title: " << title.mTitle << ", " << title.mRoleID << ", " << (title.mSelected ? 'Y' : 'N') << LL_ENDL;
group_datap->mTitles.push_back(title);
}
}
@@ -1274,7 +1276,7 @@ void LLGroupMgr::processGroupTitlesReply(LLMessageSystem* msg, void** data)
// static
void LLGroupMgr::processEjectGroupMemberReply(LLMessageSystem* msg, void ** data)
{
- lldebugs << "processEjectGroupMemberReply" << llendl;
+ LL_DEBUGS() << "processEjectGroupMemberReply" << LL_ENDL;
LLUUID group_id;
msg->getUUIDFast(_PREHASH_GroupData, _PREHASH_GroupID, group_id);
BOOL success;
@@ -1290,7 +1292,7 @@ void LLGroupMgr::processEjectGroupMemberReply(LLMessageSystem* msg, void ** data
// static
void LLGroupMgr::processJoinGroupReply(LLMessageSystem* msg, void ** data)
{
- lldebugs << "processJoinGroupReply" << llendl;
+ LL_DEBUGS() << "processJoinGroupReply" << LL_ENDL;
LLUUID group_id;
BOOL success;
msg->getUUIDFast(_PREHASH_GroupData, _PREHASH_GroupID, group_id);
@@ -1310,7 +1312,7 @@ void LLGroupMgr::processJoinGroupReply(LLMessageSystem* msg, void ** data)
// static
void LLGroupMgr::processLeaveGroupReply(LLMessageSystem* msg, void ** data)
{
- lldebugs << "processLeaveGroupReply" << llendl;
+ LL_DEBUGS() << "processLeaveGroupReply" << LL_ENDL;
LLUUID group_id;
BOOL success;
msg->getUUIDFast(_PREHASH_GroupData, _PREHASH_GroupID, group_id);
@@ -1472,7 +1474,7 @@ void LLGroupMgr::addGroup(LLGroupMgrGroupData* group_datap)
void LLGroupMgr::sendGroupPropertiesRequest(const LLUUID& group_id)
{
- lldebugs << "LLGroupMgr::sendGroupPropertiesRequest" << llendl;
+ LL_DEBUGS() << "LLGroupMgr::sendGroupPropertiesRequest" << LL_ENDL;
// This will happen when we get the reply
//LLGroupMgrGroupData* group_datap = createGroupData(group_id);
@@ -1488,7 +1490,7 @@ void LLGroupMgr::sendGroupPropertiesRequest(const LLUUID& group_id)
void LLGroupMgr::sendGroupMembersRequest(const LLUUID& group_id)
{
- lldebugs << "LLGroupMgr::sendGroupMembersRequest" << llendl;
+ LL_DEBUGS() << "LLGroupMgr::sendGroupMembersRequest" << LL_ENDL;
LLGroupMgrGroupData* group_datap = createGroupData(group_id);
if (group_datap->mMemberRequestID.isNull())
{
@@ -1510,7 +1512,7 @@ void LLGroupMgr::sendGroupMembersRequest(const LLUUID& group_id)
void LLGroupMgr::sendGroupRoleDataRequest(const LLUUID& group_id)
{
- lldebugs << "LLGroupMgr::sendGroupRoleDataRequest" << llendl;
+ LL_DEBUGS() << "LLGroupMgr::sendGroupRoleDataRequest" << LL_ENDL;
LLGroupMgrGroupData* group_datap = createGroupData(group_id);
if (group_datap->mRoleDataRequestID.isNull())
{
@@ -1531,7 +1533,7 @@ void LLGroupMgr::sendGroupRoleDataRequest(const LLUUID& group_id)
void LLGroupMgr::sendGroupRoleMembersRequest(const LLUUID& group_id)
{
- lldebugs << "LLGroupMgr::sendGroupRoleMembersRequest" << llendl;
+ LL_DEBUGS() << "LLGroupMgr::sendGroupRoleMembersRequest" << LL_ENDL;
LLGroupMgrGroupData* group_datap = createGroupData(group_id);
if (group_datap->mRoleMembersRequestID.isNull())
@@ -1541,9 +1543,9 @@ void LLGroupMgr::sendGroupRoleMembersRequest(const LLUUID& group_id)
|| !group_datap->isRoleDataComplete())
{
// *TODO: KLW FIXME: Should we start a member or role data request?
- llinfos << " Pending: " << (group_datap->mPendingRoleMemberRequest ? "Y" : "N")
+ LL_INFOS() << " Pending: " << (group_datap->mPendingRoleMemberRequest ? "Y" : "N")
<< " MemberDataComplete: " << (group_datap->mMemberDataComplete ? "Y" : "N")
- << " RoleDataComplete: " << (group_datap->mRoleDataComplete ? "Y" : "N") << llendl;
+ << " RoleDataComplete: " << (group_datap->mRoleDataComplete ? "Y" : "N") << LL_ENDL;
group_datap->mPendingRoleMemberRequest = TRUE;
return;
}
@@ -1565,7 +1567,7 @@ void LLGroupMgr::sendGroupRoleMembersRequest(const LLUUID& group_id)
void LLGroupMgr::sendGroupTitlesRequest(const LLUUID& group_id)
{
- lldebugs << "LLGroupMgr::sendGroupTitlesRequest" << llendl;
+ LL_DEBUGS() << "LLGroupMgr::sendGroupTitlesRequest" << LL_ENDL;
LLGroupMgrGroupData* group_datap = createGroupData(group_id);
group_datap->mTitles.clear();
@@ -1584,7 +1586,7 @@ void LLGroupMgr::sendGroupTitlesRequest(const LLUUID& group_id)
void LLGroupMgr::sendGroupTitleUpdate(const LLUUID& group_id, const LLUUID& title_role_id)
{
- lldebugs << "LLGroupMgr::sendGroupTitleUpdate" << llendl;
+ LL_DEBUGS() << "LLGroupMgr::sendGroupTitleUpdate" << LL_ENDL;
LLMessageSystem* msg = gMessageSystem;
msg->newMessage("GroupTitleUpdate");
@@ -1643,7 +1645,7 @@ void LLGroupMgr::sendCreateGroupRequest(const std::string& name,
void LLGroupMgr::sendUpdateGroupInfo(const LLUUID& group_id)
{
- lldebugs << "LLGroupMgr::sendUpdateGroupInfo" << llendl;
+ LL_DEBUGS() << "LLGroupMgr::sendUpdateGroupInfo" << LL_ENDL;
LLGroupMgrGroupData* group_datap = createGroupData(group_id);
LLMessageSystem* msg = gMessageSystem;
@@ -1672,7 +1674,7 @@ void LLGroupMgr::sendUpdateGroupInfo(const LLUUID& group_id)
void LLGroupMgr::sendGroupRoleMemberChanges(const LLUUID& group_id)
{
- lldebugs << "LLGroupMgr::sendGroupRoleMemberChanges" << llendl;
+ LL_DEBUGS() << "LLGroupMgr::sendGroupRoleMemberChanges" << LL_ENDL;
LLGroupMgrGroupData* group_datap = createGroupData(group_id);
if (group_datap->mRoleMemberChanges.empty()) return;
@@ -2026,7 +2028,7 @@ void LLGroupMgr::processCapGroupMembersRequest(const LLSD& content)
void LLGroupMgr::sendGroupRoleChanges(const LLUUID& group_id)
{
- lldebugs << "LLGroupMgr::sendGroupRoleChanges" << llendl;
+ LL_DEBUGS() << "LLGroupMgr::sendGroupRoleChanges" << LL_ENDL;
LLGroupMgrGroupData* group_datap = getGroupData(group_id);
if (group_datap && group_datap->pendingRoleChanges())
@@ -2041,7 +2043,7 @@ void LLGroupMgr::sendGroupRoleChanges(const LLUUID& group_id)
void LLGroupMgr::cancelGroupRoleChanges(const LLUUID& group_id)
{
- lldebugs << "LLGroupMgr::cancelGroupRoleChanges" << llendl;
+ LL_DEBUGS() << "LLGroupMgr::cancelGroupRoleChanges" << LL_ENDL;
LLGroupMgrGroupData* group_datap = getGroupData(group_id);
if (group_datap) group_datap->cancelRoleChanges();
@@ -2056,7 +2058,7 @@ bool LLGroupMgr::parseRoleActions(const std::string& xml_filename)
if (!success || !root || !root->hasName( "role_actions" ))
{
- llerrs << "Problem reading UI role_actions file: " << xml_filename << llendl;
+ LL_ERRS() << "Problem reading UI role_actions file: " << xml_filename << LL_ENDL;
return false;
}
@@ -2075,12 +2077,12 @@ bool LLGroupMgr::parseRoleActions(const std::string& xml_filename)
std::string action_set_name;
if (action_set->getAttributeString("name", action_set_name))
{
- lldebugs << "Loading action set " << action_set_name << llendl;
+ LL_DEBUGS() << "Loading action set " << action_set_name << LL_ENDL;
role_action_data->mName = action_set_name;
}
else
{
- llwarns << "Unable to parse action set with no name" << llendl;
+ LL_WARNS() << "Unable to parse action set with no name" << LL_ENDL;
delete role_action_set;
delete role_action_data;
continue;
@@ -2116,12 +2118,12 @@ bool LLGroupMgr::parseRoleActions(const std::string& xml_filename)
std::string action_name;
if (action->getAttributeString("name", action_name))
{
- lldebugs << "Loading action " << action_name << llendl;
+ LL_DEBUGS() << "Loading action " << action_name << LL_ENDL;
role_action->mName = action_name;
}
else
{
- llwarns << "Unable to parse action with no name" << llendl;
+ LL_WARNS() << "Unable to parse action with no name" << LL_ENDL;
delete role_action;
continue;
}
diff --git a/indra/newview/llgroupmgr.h b/indra/newview/llgroupmgr.h
index d8c1ab7ef5..d107fceb49 100755
--- a/indra/newview/llgroupmgr.h
+++ b/indra/newview/llgroupmgr.h
@@ -35,6 +35,17 @@
class LLMessageSystem;
+
+enum LLGroupChange
+{
+ GC_PROPERTIES,
+ GC_MEMBER_DATA,
+ GC_ROLE_DATA,
+ GC_ROLE_MEMBER_DATA,
+ GC_TITLES,
+ GC_ALL
+};
+
class LLGroupMgrObserver
{
public:
diff --git a/indra/newview/llhomelocationresponder.cpp b/indra/newview/llhomelocationresponder.cpp
index 37428c4a44..eefa8bd42a 100755
--- a/indra/newview/llhomelocationresponder.cpp
+++ b/indra/newview/llhomelocationresponder.cpp
@@ -90,7 +90,7 @@ void LLHomeLocationResponder::result( const LLSD& content )
if( ! error )
{
- llinfos << "setting home position" << llendl;
+ LL_INFOS() << "setting home position" << LL_ENDL;
LLViewerRegion *viewer_region = gAgent.getRegion();
gAgent.setHomePosRegion( viewer_region->getHandle(), agent_pos );
@@ -99,5 +99,5 @@ void LLHomeLocationResponder::result( const LLSD& content )
void LLHomeLocationResponder::errorWithContent( U32 status, const std::string& reason, const LLSD& content )
{
- llwarns << "LLHomeLocationResponder error [status:" << status << "]: " << content << llendl;
+ LL_WARNS() << "LLHomeLocationResponder error [status:" << status << "]: " << content << LL_ENDL;
}
diff --git a/indra/newview/llhudeffect.cpp b/indra/newview/llhudeffect.cpp
index 159ec6c803..eff5587610 100755
--- a/indra/newview/llhudeffect.cpp
+++ b/indra/newview/llhudeffect.cpp
@@ -71,7 +71,7 @@ void LLHUDEffect::unpackData(LLMessageSystem *mesgsys, S32 blocknum)
void LLHUDEffect::render()
{
- llerrs << "Never call this!" << llendl;
+ LL_ERRS() << "Never call this!" << LL_ENDL;
}
void LLHUDEffect::setID(const LLUUID &id)
diff --git a/indra/newview/llhudeffectbeam.cpp b/indra/newview/llhudeffectbeam.cpp
index 8abad3d292..54e683e048 100755
--- a/indra/newview/llhudeffectbeam.cpp
+++ b/indra/newview/llhudeffectbeam.cpp
@@ -78,7 +78,7 @@ void LLHUDEffectBeam::packData(LLMessageSystem *mesgsys)
{
if (!mSourceObject)
{
- llwarns << "Missing source object!" << llendl;
+ LL_WARNS() << "Missing source object!" << LL_ENDL;
}
// Pack the default data
@@ -115,7 +115,7 @@ void LLHUDEffectBeam::packData(LLMessageSystem *mesgsys)
void LLHUDEffectBeam::unpackData(LLMessageSystem *mesgsys, S32 blocknum)
{
- llerrs << "Got beam!" << llendl;
+ LL_ERRS() << "Got beam!" << LL_ENDL;
BOOL use_target_object;
LLVector3d new_target;
U8 packed_data[41];
@@ -126,7 +126,7 @@ void LLHUDEffectBeam::unpackData(LLMessageSystem *mesgsys, S32 blocknum)
S32 size = mesgsys->getSizeFast(_PREHASH_Effect, blocknum, _PREHASH_TypeData);
if (size != 41)
{
- llwarns << "Beam effect with bad size " << size << llendl;
+ LL_WARNS() << "Beam effect with bad size " << size << LL_ENDL;
return;
}
mesgsys->getBinaryDataFast(_PREHASH_Effect, _PREHASH_TypeData, packed_data, 41, blocknum);
@@ -172,7 +172,7 @@ void LLHUDEffectBeam::setSourceObject(LLViewerObject *objp)
{
if (objp->isDead())
{
- llwarns << "HUDEffectBeam: Source object is dead!" << llendl;
+ LL_WARNS() << "HUDEffectBeam: Source object is dead!" << LL_ENDL;
mSourceObject = NULL;
return;
}
@@ -210,7 +210,7 @@ void LLHUDEffectBeam::setTargetObject(LLViewerObject *objp)
{
if (mTargetObject->isDead())
{
- llwarns << "HUDEffectBeam: Target object is dead!" << llendl;
+ LL_WARNS() << "HUDEffectBeam: Target object is dead!" << LL_ENDL;
}
mTargetObject = objp;
diff --git a/indra/newview/llhudeffectlookat.cpp b/indra/newview/llhudeffectlookat.cpp
index 9dde65ceb6..f3a48625a4 100755
--- a/indra/newview/llhudeffectlookat.cpp
+++ b/indra/newview/llhudeffectlookat.cpp
@@ -204,7 +204,7 @@ static BOOL loadAttentions()
//-------------------------------------------------------------------------
if( !root->hasName( "linden_attentions" ) )
{
- llwarns << "Invalid linden_attentions file header: " << filename << llendl;
+ LL_WARNS() << "Invalid linden_attentions file header: " << filename << LL_ENDL;
return FALSE;
}
@@ -212,7 +212,7 @@ static BOOL loadAttentions()
static LLStdStringHandle version_string = LLXmlTree::addAttributeString("version");
if( !root->getFastAttributeString( version_string, version ) || (version != "1.0") )
{
- llwarns << "Invalid linden_attentions file version: " << version << llendl;
+ LL_WARNS() << "Invalid linden_attentions file version: " << version << LL_ENDL;
return FALSE;
}
@@ -322,7 +322,7 @@ void LLHUDEffectLookAt::unpackData(LLMessageSystem *mesgsys, S32 blocknum)
S32 size = mesgsys->getSizeFast(_PREHASH_Effect, blocknum, _PREHASH_TypeData);
if (size != PKT_SIZE)
{
- llwarns << "LookAt effect with bad size " << size << llendl;
+ LL_WARNS() << "LookAt effect with bad size " << size << LL_ENDL;
return;
}
mesgsys->getBinaryDataFast(_PREHASH_Effect, _PREHASH_TypeData, packed_data, PKT_SIZE, blocknum);
@@ -336,7 +336,7 @@ void LLHUDEffectLookAt::unpackData(LLMessageSystem *mesgsys, S32 blocknum)
}
else
{
- //llwarns << "Could not find source avatar for lookat effect" << llendl;
+ //LL_WARNS() << "Could not find source avatar for lookat effect" << LL_ENDL;
return;
}
@@ -356,7 +356,7 @@ void LLHUDEffectLookAt::unpackData(LLMessageSystem *mesgsys, S32 blocknum)
}
else
{
- //llwarns << "Could not find target object for lookat effect" << llendl;
+ //LL_WARNS() << "Could not find target object for lookat effect" << LL_ENDL;
}
U8 lookAtTypeUnpacked = 0;
@@ -400,7 +400,7 @@ BOOL LLHUDEffectLookAt::setLookAt(ELookAtType target_type, LLViewerObject *objec
if (target_type >= LOOKAT_NUM_TARGETS)
{
- llwarns << "Bad target_type " << (int)target_type << " - ignoring." << llendl;
+ LL_WARNS() << "Bad target_type " << (int)target_type << " - ignoring." << LL_ENDL;
return FALSE;
}
diff --git a/indra/newview/llhudeffectpointat.cpp b/indra/newview/llhudeffectpointat.cpp
index 114a633821..44c8db19c0 100755
--- a/indra/newview/llhudeffectpointat.cpp
+++ b/indra/newview/llhudeffectpointat.cpp
@@ -159,7 +159,7 @@ void LLHUDEffectPointAt::unpackData(LLMessageSystem *mesgsys, S32 blocknum)
S32 size = mesgsys->getSizeFast(_PREHASH_Effect, blocknum, _PREHASH_TypeData);
if (size != PKT_SIZE)
{
- llwarns << "PointAt effect with bad size " << size << llendl;
+ LL_WARNS() << "PointAt effect with bad size " << size << LL_ENDL;
return;
}
mesgsys->getBinaryDataFast(_PREHASH_Effect, _PREHASH_TypeData, packed_data, PKT_SIZE, blocknum);
@@ -176,7 +176,7 @@ void LLHUDEffectPointAt::unpackData(LLMessageSystem *mesgsys, S32 blocknum)
}
else
{
- //llwarns << "Could not find source avatar for pointat effect" << llendl;
+ //LL_WARNS() << "Could not find source avatar for pointat effect" << LL_ENDL;
return;
}
@@ -228,7 +228,7 @@ BOOL LLHUDEffectPointAt::setPointAt(EPointAtType target_type, LLViewerObject *ob
if (target_type >= POINTAT_NUM_TARGETS)
{
- llwarns << "Bad target_type " << (int)target_type << " - ignoring." << llendl;
+ LL_WARNS() << "Bad target_type " << (int)target_type << " - ignoring." << LL_ENDL;
return FALSE;
}
@@ -252,7 +252,7 @@ BOOL LLHUDEffectPointAt::setPointAt(EPointAtType target_type, LLViewerObject *ob
mLastSentOffsetGlobal = position;
setDuration(POINTAT_TIMEOUTS[target_type]);
setNeedsSendToSim(TRUE);
-// llinfos << "Sending pointat data" << llendl;
+// LL_INFOS() << "Sending pointat data" << LL_ENDL;
}
if (target_type == POINTAT_TARGET_CLEAR)
diff --git a/indra/newview/llhudeffecttrail.cpp b/indra/newview/llhudeffecttrail.cpp
index 39b526c1b5..8771219034 100755
--- a/indra/newview/llhudeffecttrail.cpp
+++ b/indra/newview/llhudeffecttrail.cpp
@@ -85,7 +85,7 @@ void LLHUDEffectSpiral::packData(LLMessageSystem *mesgsys)
{
if (!mSourceObject)
{
- //llwarns << "Missing object in trail pack!" << llendl;
+ //LL_WARNS() << "Missing object in trail pack!" << LL_ENDL;
}
LLHUDEffect::packData(mesgsys);
@@ -117,7 +117,7 @@ void LLHUDEffectSpiral::unpackData(LLMessageSystem *mesgsys, S32 blocknum)
size_t size = mesgsys->getSizeFast(_PREHASH_Effect, blocknum, _PREHASH_TypeData);
if (size != EFFECT_SIZE)
{
- llwarns << "Spiral effect with bad size " << size << llendl;
+ LL_WARNS() << "Spiral effect with bad size " << size << LL_ENDL;
return;
}
mesgsys->getBinaryDataFast(_PREHASH_Effect, _PREHASH_TypeData,
diff --git a/indra/newview/llhudicon.h b/indra/newview/llhudicon.h
index 557252ab0b..e00a985ddc 100755
--- 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"
@@ -39,11 +38,8 @@
#include "llfontgl.h"
#include <set>
#include <vector>
-#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.cpp b/indra/newview/llhudmanager.cpp
index 8f14b53db0..1f9b0f47b1 100755
--- a/indra/newview/llhudmanager.cpp
+++ b/indra/newview/llhudmanager.cpp
@@ -54,13 +54,13 @@ LLHUDManager::~LLHUDManager()
{
}
-static LLFastTimer::DeclareTimer FTM_HUD_EFFECTS("Hud Effects");
+static LLTrace::BlockTimerStatHandle FTM_UPDATE_HUD_EFFECTS("Update Hud Effects");
void LLHUDManager::updateEffects()
{
- LLFastTimer ftm(FTM_HUD_EFFECTS);
+ LL_RECORD_BLOCK_TIME(FTM_UPDATE_HUD_EFFECTS);
S32 i;
- for (i = 0; i < mHUDEffects.count(); i++)
+ for (i = 0; i < mHUDEffects.size(); i++)
{
LLHUDEffect *hep = mHUDEffects[i];
if (hep->isDead())
@@ -74,17 +74,17 @@ void LLHUDManager::updateEffects()
void LLHUDManager::sendEffects()
{
S32 i;
- for (i = 0; i < mHUDEffects.count(); i++)
+ for (i = 0; i < mHUDEffects.size(); i++)
{
LLHUDEffect *hep = mHUDEffects[i];
if (hep->isDead())
{
- llwarns << "Trying to send dead effect!" << llendl;
+ LL_WARNS() << "Trying to send dead effect!" << LL_ENDL;
continue;
}
if (hep->mType < LLHUDObject::LL_HUD_EFFECT_BEAM)
{
- llwarns << "Trying to send effect of type " << hep->mType << " which isn't really an effect and shouldn't be in this list!" << llendl;
+ LL_WARNS() << "Trying to send effect of type " << hep->mType << " which isn't really an effect and shouldn't be in this list!" << LL_ENDL;
continue;
}
if (hep->getNeedsSendToSim() && hep->getOriginatedHere())
@@ -105,18 +105,18 @@ void LLHUDManager::sendEffects()
//static
void LLHUDManager::shutdownClass()
{
- getInstance()->mHUDEffects.reset();
+ getInstance()->mHUDEffects.clear();
}
void LLHUDManager::cleanupEffects()
{
S32 i = 0;
- while (i < mHUDEffects.count())
+ while (i < mHUDEffects.size())
{
if (mHUDEffects[i]->isDead())
{
- mHUDEffects.remove(i);
+ mHUDEffects.erase(mHUDEffects.begin() + i);
}
else
{
@@ -140,7 +140,7 @@ LLHUDEffect *LLHUDManager::createViewerEffect(const U8 type, BOOL send_to_sim, B
hep->setNeedsSendToSim(send_to_sim);
hep->setOriginatedHere(originated_here);
- mHUDEffects.put(hep);
+ mHUDEffects.push_back(hep);
return hep;
}
@@ -159,20 +159,20 @@ void LLHUDManager::processViewerEffect(LLMessageSystem *mesgsys, void **user_dat
effectp = NULL;
LLHUDEffect::getIDType(mesgsys, k, effect_id, effect_type);
S32 i;
- for (i = 0; i < LLHUDManager::getInstance()->mHUDEffects.count(); i++)
+ for (i = 0; i < LLHUDManager::getInstance()->mHUDEffects.size(); i++)
{
LLHUDEffect *cur_effectp = LLHUDManager::getInstance()->mHUDEffects[i];
if (!cur_effectp)
{
- llwarns << "Null effect in effect manager, skipping" << llendl;
- LLHUDManager::getInstance()->mHUDEffects.remove(i);
+ LL_WARNS() << "Null effect in effect manager, skipping" << LL_ENDL;
+ LLHUDManager::getInstance()->mHUDEffects.erase(LLHUDManager::getInstance()->mHUDEffects.begin() + i);
i--;
continue;
}
if (cur_effectp->isDead())
{
- // llwarns << "Dead effect in effect manager, removing" << llendl;
- LLHUDManager::getInstance()->mHUDEffects.remove(i);
+ // LL_WARNS() << "Dead effect in effect manager, removing" << LL_ENDL;
+ LLHUDManager::getInstance()->mHUDEffects.erase(LLHUDManager::getInstance()->mHUDEffects.begin() + i);
i--;
continue;
}
@@ -180,7 +180,7 @@ void LLHUDManager::processViewerEffect(LLMessageSystem *mesgsys, void **user_dat
{
if (cur_effectp->getType() != effect_type)
{
- llwarns << "Viewer effect update doesn't match old type!" << llendl;
+ LL_WARNS() << "Viewer effect update doesn't match old type!" << LL_ENDL;
}
effectp = cur_effectp;
break;
@@ -201,10 +201,10 @@ void LLHUDManager::processViewerEffect(LLMessageSystem *mesgsys, void **user_dat
}
else
{
- llwarns << "Received viewer effect of type " << effect_type << " which isn't really an effect!" << llendl;
+ LL_WARNS() << "Received viewer effect of type " << effect_type << " which isn't really an effect!" << LL_ENDL;
}
}
- //llinfos << "Got viewer effect: " << effect_id << llendl;
+ //LL_INFOS() << "Got viewer effect: " << effect_id << LL_ENDL;
}
diff --git a/indra/newview/llhudmanager.h b/indra/newview/llhudmanager.h
index 09e79acbfc..9c5d49decd 100755
--- a/indra/newview/llhudmanager.h
+++ b/indra/newview/llhudmanager.h
@@ -30,13 +30,8 @@
// Responsible for managing all HUD elements.
#include "llhudobject.h"
-#include "lldarrayptr.h"
-class LLViewerObject;
class LLHUDEffect;
-//Ventrella 9/16/05
-class LLHUDAnimalControls;
-// End Ventrella
class LLMessageSystem;
class LLHUDManager : public LLSingleton<LLHUDManager>
@@ -59,7 +54,7 @@ public:
static LLColor4 sChildColor;
protected:
- LLDynamicArrayPtr<LLPointer<LLHUDEffect> > mHUDEffects;
+ std::vector<LLPointer<LLHUDEffect> > mHUDEffects;
};
#endif // LL_LLHUDMANAGER_H
diff --git a/indra/newview/llhudnametag.cpp b/indra/newview/llhudnametag.cpp
index c3b49f739a..31d832e524 100755
--- a/indra/newview/llhudnametag.cpp
+++ b/indra/newview/llhudnametag.cpp
@@ -30,6 +30,7 @@
#include "llhudnametag.h"
#include "llrender.h"
+#include "lltracerecording.h"
#include "llagent.h"
#include "llviewercontrol.h"
@@ -537,7 +538,7 @@ void LLHUDNameTag::updateVisibility()
if (!mSourceObject)
{
- //llwarns << "LLHUDNameTag::updateScreenPos -- mSourceObject is NULL!" << llendl;
+ //LL_WARNS() << "LLHUDNameTag::updateScreenPos -- mSourceObject is NULL!" << LL_ENDL;
mVisible = TRUE;
sVisibleTextObjects.push_back(LLPointer<LLHUDNameTag> (this));
return;
@@ -745,8 +746,8 @@ void LLHUDNameTag::updateAll()
current_screen_area += (F32)(textp->mSoftScreenRect.getWidth() * textp->mSoftScreenRect.getHeight());
}
- LLStat* camera_vel_stat = LLViewerCamera::getInstance()->getVelocityStat();
- F32 camera_vel = camera_vel_stat->getCurrent();
+ LLTrace::CountStatHandle<>* camera_vel_stat = LLViewerCamera::getVelocityStat();
+ F32 camera_vel = LLTrace::get_frame_recording().getLastRecording().getPerSec(*camera_vel_stat);
if (camera_vel > MAX_STABLE_CAMERA_VELOCITY)
{
return;
@@ -814,7 +815,7 @@ void LLHUDNameTag::updateAll()
VisibleTextObjectIterator this_object_it;
for (this_object_it = sVisibleTextObjects.begin(); this_object_it != sVisibleTextObjects.end(); ++this_object_it)
{
- (*this_object_it)->mPositionOffset = lerp((*this_object_it)->mPositionOffset, (*this_object_it)->mTargetPositionOffset, LLCriticalDamp::getInterpolant(POSITION_DAMPING_TC));
+ (*this_object_it)->mPositionOffset = lerp((*this_object_it)->mPositionOffset, (*this_object_it)->mTargetPositionOffset, LLSmoothInterpolation::getInterpolant(POSITION_DAMPING_TC));
}
}
diff --git a/indra/newview/llhudobject.cpp b/indra/newview/llhudobject.cpp
index 95d57d08d8..45fa09e1a1 100755
--- a/indra/newview/llhudobject.cpp
+++ b/indra/newview/llhudobject.cpp
@@ -123,7 +123,7 @@ void LLHUDObject::cleanupHUDObjects()
(*object_it)->markDead();
if ((*object_it)->getNumRefs() > 1)
{
- llinfos << "LLHUDObject " << (LLHUDObject *)(*object_it) << " type " << (S32)(*object_it)->getType() << " has " << (*object_it)->getNumRefs() << " refs!" << llendl;
+ LL_INFOS() << "LLHUDObject " << (LLHUDObject *)(*object_it) << " type " << (S32)(*object_it)->getType() << " has " << (*object_it)->getNumRefs() << " refs!" << LL_ENDL;
}
}
sHUDObjects.clear();
@@ -146,7 +146,7 @@ LLHUDObject *LLHUDObject::addHUDObject(const U8 type)
hud_objectp = new LLHUDNameTag(type);
break;
default:
- llwarns << "Unknown type of hud object:" << (U32) type << llendl;
+ LL_WARNS() << "Unknown type of hud object:" << (U32) type << LL_ENDL;
}
if (hud_objectp)
{
@@ -242,7 +242,7 @@ LLHUDEffect *LLHUDObject::addHUDEffect(const U8 type)
hud_objectp = new LLHUDEffectBlob(type);
break;
default:
- llwarns << "Unknown type of hud effect:" << (U32) type << llendl;
+ LL_WARNS() << "Unknown type of hud effect:" << (U32) type << LL_ENDL;
}
if (hud_objectp)
@@ -252,12 +252,12 @@ LLHUDEffect *LLHUDObject::addHUDEffect(const U8 type)
return hud_objectp;
}
-static LLFastTimer::DeclareTimer FTM_HUD_UPDATE("Update Hud");
+static LLTrace::BlockTimerStatHandle FTM_HUD_UPDATE("Update Hud");
// static
void LLHUDObject::updateAll()
{
- LLFastTimer ftm(FTM_HUD_UPDATE);
+ LL_RECORD_BLOCK_TIME(FTM_HUD_UPDATE);
LLHUDText::updateAll();
LLHUDIcon::updateAll();
LLHUDNameTag::updateAll();
diff --git a/indra/newview/llhudtext.cpp b/indra/newview/llhudtext.cpp
index 3c6bcd9829..f648d7baae 100755
--- a/indra/newview/llhudtext.cpp
+++ b/indra/newview/llhudtext.cpp
@@ -346,7 +346,7 @@ void LLHUDText::updateVisibility()
if (!mSourceObject)
{
- //llwarns << "LLHUDText::updateScreenPos -- mSourceObject is NULL!" << llendl;
+ //LL_WARNS() << "LLHUDText::updateScreenPos -- mSourceObject is NULL!" << LL_ENDL;
mVisible = TRUE;
if (mOnHUDAttachment)
{
diff --git a/indra/newview/llimpanel.cpp b/indra/newview/llimpanel.cpp
index 59272d721f..34ccab0302 100755
--- a/indra/newview/llimpanel.cpp
+++ b/indra/newview/llimpanel.cpp
@@ -159,7 +159,7 @@ LLFloaterIMPanel::LLFloaterIMPanel(const std::string& session_label,
mCallBackEnabled = LLVoiceClient::getInstance()->isSessionCallBackPossible(mSessionUUID);
break;
default:
- llwarns << "Unknown session type" << llendl;
+ LL_WARNS() << "Unknown session type" << LL_ENDL;
xml_filename = "floater_instant_message.xml";
break;
}
@@ -396,8 +396,8 @@ public:
void errorWithContent(U32 statusNum, const std::string& reason, const LLSD& content)
{
- llwarns << "Error inviting all agents to session [status:"
- << statusNum << "]: " << content << llendl;
+ LL_WARNS() << "Error inviting all agents to session [status:"
+ << statusNum << "]: " << content << LL_ENDL;
//throw something back to the viewer here?
}
@@ -417,7 +417,7 @@ BOOL LLFloaterIMPanel::inviteToSession(const std::vector<LLUUID>& ids)
if( isInviteAllowed() && (count > 0) )
{
- llinfos << "LLFloaterIMPanel::inviteToSession() - inviting participants" << llendl;
+ LL_INFOS() << "LLFloaterIMPanel::inviteToSession() - inviting participants" << LL_ENDL;
std::string url = region->getCapability("ChatSessionRequest");
@@ -439,9 +439,9 @@ BOOL LLFloaterIMPanel::inviteToSession(const std::vector<LLUUID>& ids)
}
else
{
- llinfos << "LLFloaterIMPanel::inviteToSession -"
+ LL_INFOS() << "LLFloaterIMPanel::inviteToSession -"
<< " no need to invite agents for "
- << mDialog << llendl;
+ << mDialog << LL_ENDL;
// successful add, because everyone that needed to get added
// was added.
}
@@ -778,7 +778,7 @@ void LLFloaterIMPanel::sendMsg()
&& (mDialog == IM_NOTHING_SPECIAL)
&& mOtherParticipantUUID.isNull())
{
- llinfos << "Cannot send IM to everyone unless you're a god." << llendl;
+ LL_INFOS() << "Cannot send IM to everyone unless you're a god." << LL_ENDL;
return;
}
diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp
index 70ffdc14ff..af93778c10 100755
--- a/indra/newview/llimview.cpp
+++ b/indra/newview/llimview.cpp
@@ -68,6 +68,7 @@
#include "llviewerparcelmgr.h"
#include "llconversationlog.h"
#include "message.h"
+#include "llviewerregion.h"
const static std::string ADHOC_NAME_SUFFIX(" Conference");
@@ -254,7 +255,7 @@ void notify_of_message(const LLSD& msg, bool is_dnd_msg)
// 0. nothing - exit
if (("noaction" == user_preferences ||
ON_TOP_AND_ITEM_IS_SELECTED == conversations_floater_status)
- && session_floater->isMessagePaneExpanded())
+ && session_floater->isMessagePaneExpanded())
{
return;
}
@@ -784,7 +785,7 @@ bool LLIMModel::LLIMSession::isOtherParticipantAvaline()
return !mOtherParticipantIsAvatar;
}
-LLUUID LLIMModel::LLIMSession::generateOutgouigAdHocHash() const
+LLUUID LLIMModel::LLIMSession::generateOutgoingAdHocHash() const
{
LLUUID hash = LLUUID::null;
@@ -919,13 +920,13 @@ bool LLIMModel::newSession(const LLUUID& session_id, const std::string& name, co
{
if (name.empty())
{
- llwarns << "Attempt to create a new session with empty name; id = " << session_id << llendl;
+ LL_WARNS() << "Attempt to create a new session with empty name; id = " << session_id << LL_ENDL;
return false;
}
if (findIMSession(session_id))
{
- llwarns << "IM Session " << session_id << " already exists" << llendl;
+ LL_WARNS() << "IM Session " << session_id << " already exists" << LL_ENDL;
return false;
}
@@ -971,7 +972,7 @@ void LLIMModel::getMessagesSilently(const LLUUID& session_id, std::list<LLSD>& m
LLIMSession* session = findIMSession(session_id);
if (!session)
{
- llwarns << "session " << session_id << "does not exist " << llendl;
+ LL_WARNS() << "session " << session_id << "does not exist " << LL_ENDL;
return;
}
@@ -993,7 +994,7 @@ void LLIMModel::sendNoUnreadMessages(const LLUUID& session_id)
LLIMSession* session = findIMSession(session_id);
if (!session)
{
- llwarns << "session " << session_id << "does not exist " << llendl;
+ LL_WARNS() << "session " << session_id << "does not exist " << LL_ENDL;
return;
}
@@ -1013,7 +1014,7 @@ bool LLIMModel::addToHistory(const LLUUID& session_id, const std::string& from,
if (!session)
{
- llwarns << "session " << session_id << "does not exist " << llendl;
+ LL_WARNS() << "session " << session_id << "does not exist " << LL_ENDL;
return false;
}
@@ -1088,7 +1089,7 @@ LLIMModel::LLIMSession* LLIMModel::addMessageSilently(const LLUUID& session_id,
if (!session)
{
- llwarns << "session " << session_id << "does not exist " << llendl;
+ LL_WARNS() << "session " << session_id << "does not exist " << LL_ENDL;
return NULL;
}
@@ -1125,7 +1126,7 @@ const std::string LLIMModel::getName(const LLUUID& session_id) const
if (!session)
{
- llwarns << "session " << session_id << "does not exist " << llendl;
+ LL_WARNS() << "session " << session_id << "does not exist " << LL_ENDL;
return LLTrans::getString("no_session_message");
}
@@ -1137,7 +1138,7 @@ const S32 LLIMModel::getNumUnread(const LLUUID& session_id) const
LLIMSession* session = findIMSession(session_id);
if (!session)
{
- llwarns << "session " << session_id << "does not exist " << llendl;
+ LL_WARNS() << "session " << session_id << "does not exist " << LL_ENDL;
return -1;
}
@@ -1149,7 +1150,7 @@ const LLUUID& LLIMModel::getOtherParticipantID(const LLUUID& session_id) const
LLIMSession* session = findIMSession(session_id);
if (!session)
{
- llwarns << "session " << session_id << " does not exist " << llendl;
+ LL_WARNS() << "session " << session_id << " does not exist " << LL_ENDL;
return LLUUID::null;
}
@@ -1161,7 +1162,7 @@ EInstantMessage LLIMModel::getType(const LLUUID& session_id) const
LLIMSession* session = findIMSession(session_id);
if (!session)
{
- llwarns << "session " << session_id << "does not exist " << llendl;
+ LL_WARNS() << "session " << session_id << "does not exist " << LL_ENDL;
return IM_COUNT;
}
@@ -1173,7 +1174,7 @@ LLVoiceChannel* LLIMModel::getVoiceChannel( const LLUUID& session_id ) const
LLIMSession* session = findIMSession(session_id);
if (!session)
{
- llwarns << "session " << session_id << "does not exist " << llendl;
+ LL_WARNS() << "session " << session_id << "does not exist " << LL_ENDL;
return NULL;
}
@@ -1185,7 +1186,7 @@ LLIMSpeakerMgr* LLIMModel::getSpeakerManager( const LLUUID& session_id ) const
LLIMSession* session = findIMSession(session_id);
if (!session)
{
- llwarns << "session " << session_id << " does not exist " << llendl;
+ LL_WARNS() << "session " << session_id << " does not exist " << LL_ENDL;
return NULL;
}
@@ -1197,7 +1198,7 @@ const std::string& LLIMModel::getHistoryFileName(const LLUUID& session_id) const
LLIMSession* session = findIMSession(session_id);
if (!session)
{
- llwarns << "session " << session_id << " does not exist " << llendl;
+ LL_WARNS() << "session " << session_id << " does not exist " << LL_ENDL;
return LLStringUtil::null;
}
@@ -1484,8 +1485,8 @@ public:
mAgents);
}
- llwarns << "LLStartConferenceChatResponder error [status:"
- << statusNum << "]: " << content << llendl;
+ LL_WARNS() << "LLStartConferenceChatResponder error [status:"
+ << statusNum << "]: " << content << LL_ENDL;
//else throw an error back to the client?
//in theory we should have just have these error strings
@@ -1633,9 +1634,9 @@ public:
}
void errorWithContent(U32 statusNum, const std::string& reason, const LLSD& content)
- {
- llwarns << "LLViewerChatterBoxInvitationAcceptResponder error [status:"
- << statusNum << "]: " << content << llendl;
+ {
+ LL_WARNS() << "LLViewerChatterBoxInvitationAcceptResponder error [status:"
+ << statusNum << "]: " << content << LL_ENDL;
//throw something back to the viewer here?
if ( gIMMgr )
{
@@ -1697,7 +1698,7 @@ LLUUID LLIMMgr::computeSessionID(
if (gAgent.isInGroup(session_id) && (session_id != other_participant_id))
{
- llwarns << "Group session id different from group id: IM type = " << dialog << ", session id = " << session_id << ", group id = " << other_participant_id << llendl;
+ LL_WARNS() << "Group session id different from group id: IM type = " << dialog << ", session id = " << session_id << ", group id = " << other_participant_id << LL_ENDL;
}
return session_id;
}
@@ -2443,7 +2444,7 @@ void LLIncomingCallDialog::processCallResponse(S32 response, const LLSD &payload
std::string correct_session_name = session_name;
if (session_name.empty())
{
- llwarns << "Received an empty session name from a server" << llendl;
+ LL_WARNS() << "Received an empty session name from a server" << LL_ENDL;
switch(type){
case IM_SESSION_CONFERENCE_START:
@@ -2465,10 +2466,10 @@ void LLIncomingCallDialog::processCallResponse(S32 response, const LLSD &payload
correct_session_name.append(ADHOC_NAME_SUFFIX);
}
}
- llinfos << "Corrected session name is " << correct_session_name << llendl;
+ LL_INFOS() << "Corrected session name is " << correct_session_name << LL_ENDL;
break;
default:
- llwarning("Received an empty session name from a server and failed to generate a new proper session name", 0);
+ LL_WARNS() << "Received an empty session name from a server and failed to generate a new proper session name" << LL_ENDL;
break;
}
}
@@ -2719,10 +2720,10 @@ void LLIMMgr::addMessage(
// code, but the session has to be established inside the server before it can be left.
if (LLMuteList::getInstance()->isMuted(other_participant_id) && !from_linden)
{
- llwarns << "Leaving IM session from initiating muted resident " << from << llendl;
+ LL_WARNS() << "Leaving IM session from initiating muted resident " << from << LL_ENDL;
if(!gIMMgr->leaveSession(new_session_id))
{
- llinfos << "Session " << new_session_id << " does not exist." << llendl;
+ LL_INFOS() << "Session " << new_session_id << " does not exist." << LL_ENDL;
}
return;
}
@@ -2857,8 +2858,8 @@ LLUUID LLIMMgr::addSession(
EInstantMessage dialog,
const LLUUID& other_participant_id, bool voice)
{
- LLDynamicArray<LLUUID> ids;
- ids.put(other_participant_id);
+ std::vector<LLUUID> ids;
+ ids.push_back(other_participant_id);
LLUUID session_id = addSession(name, dialog, other_participant_id, ids, voice);
return session_id;
}
@@ -2869,17 +2870,17 @@ LLUUID LLIMMgr::addSession(
const std::string& name,
EInstantMessage dialog,
const LLUUID& other_participant_id,
- const LLDynamicArray<LLUUID>& ids, bool voice,
+ const std::vector<LLUUID>& ids, bool voice,
const LLUUID& floater_id)
{
- if (0 == ids.getLength())
+ if (ids.empty())
{
return LLUUID::null;
}
if (name.empty())
{
- llwarning("Session name cannot be null!", 0);
+ LL_WARNS() << "Session name cannot be null!" << LL_ENDL;
return LLUUID::null;
}
@@ -2927,7 +2928,7 @@ LLUUID LLIMMgr::addSession(
//we don't need to show notes about online/offline, mute/unmute users' statuses for existing sessions
if (!new_session) return session_id;
- llinfos << "LLIMMgr::addSession, new session added, name = " << name << ", session id = " << session_id << llendl;
+ LL_INFOS() << "LLIMMgr::addSession, new session added, name = " << name << ", session id = " << session_id << LL_ENDL;
//Per Plan's suggestion commented "explicit offline status warning" out to make Dessie happier (see EXT-3609)
//*TODO After February 2010 remove this commented out line if no one will be missing that warning
@@ -2964,7 +2965,7 @@ void LLIMMgr::removeSession(const LLUUID& session_id)
LLIMModel::getInstance()->clearSession(session_id);
- llinfos << "LLIMMgr::removeSession, session removed, session id = " << session_id << llendl;
+ LL_INFOS() << "LLIMMgr::removeSession, session removed, session id = " << session_id << LL_ENDL;
notifyObserverSessionRemoved(session_id);
}
@@ -3029,7 +3030,7 @@ void LLIMMgr::inviteToSession(
{
if (voice_invite && "VoiceInviteQuestionDefault" == question_type)
{
- llinfos << "Rejecting voice call from initiating muted resident " << caller_name << llendl;
+ LL_INFOS() << "Rejecting voice call from initiating muted resident " << caller_name << LL_ENDL;
LLIncomingCallDialog::processCallResponse(1, payload);
}
return;
@@ -3319,9 +3320,9 @@ bool LLIMMgr::isNonFriendSessionNotified(const LLUUID& session_id)
void LLIMMgr::noteOfflineUsers(
const LLUUID& session_id,
- const LLDynamicArray<LLUUID>& ids)
+ const std::vector<LLUUID>& ids)
{
- S32 count = ids.count();
+ S32 count = ids.size();
if(count == 0)
{
const std::string& only_user = LLTrans::getString("only_user_message");
@@ -3334,11 +3335,11 @@ void LLIMMgr::noteOfflineUsers(
LLIMModel& im_model = LLIMModel::instance();
for(S32 i = 0; i < count; ++i)
{
- info = at.getBuddyInfo(ids.get(i));
+ info = at.getBuddyInfo(ids.at(i));
LLAvatarName av_name;
if (info
&& !info->isOnline()
- && LLAvatarNameCache::get(ids.get(i), &av_name))
+ && LLAvatarNameCache::get(ids.at(i), &av_name))
{
LLUIString offline = LLTrans::getString("offline_message");
// Use display name only because this user is your friend
@@ -3350,7 +3351,7 @@ void LLIMMgr::noteOfflineUsers(
}
void LLIMMgr::noteMutedUsers(const LLUUID& session_id,
- const LLDynamicArray<LLUUID>& ids)
+ const std::vector<LLUUID>& ids)
{
// Don't do this if we don't have a mute list.
LLMuteList *ml = LLMuteList::getInstance();
@@ -3359,14 +3360,14 @@ void LLIMMgr::noteMutedUsers(const LLUUID& session_id,
return;
}
- S32 count = ids.count();
+ S32 count = ids.size();
if(count > 0)
{
LLIMModel* im_model = LLIMModel::getInstance();
for(S32 i = 0; i < count; ++i)
{
- if( ml->isMuted(ids.get(i)) )
+ if( ml->isMuted(ids.at(i)) )
{
LLUIString muted = LLTrans::getString("muted_message");
diff --git a/indra/newview/llimview.h b/indra/newview/llimview.h
index da6039a3ae..1426bada95 100755
--- a/indra/newview/llimview.h
+++ b/indra/newview/llimview.h
@@ -34,12 +34,10 @@
#include "lllogchat.h"
#include "llvoicechannel.h"
-
class LLAvatarName;
class LLFriendObserver;
class LLCallDialogManager;
class LLIMSpeakerMgr;
-
/**
* Timeout Timer for outgoing Ad-Hoc/Group IM sessions which being initialized by the server
*/
@@ -95,7 +93,7 @@ public:
bool isGroupSessionType() const { return mSessionType == GROUP_SESSION;}
bool isAvalineSessionType() const { return mSessionType == AVALINE_SESSION;}
- LLUUID generateOutgouigAdHocHash() const;
+ LLUUID generateOutgoingAdHocHash() const;
//*TODO make private
/** ad-hoc sessions involve sophisticated chat history file naming schemes */
@@ -355,7 +353,7 @@ public:
LLUUID addSession(const std::string& name,
EInstantMessage dialog,
const LLUUID& other_participant_id,
- const LLDynamicArray<LLUUID>& ids, bool voice = false,
+ const std::vector<LLUUID>& ids, bool voice = false,
const LLUUID& floater_id = LLUUID::null);
/**
@@ -458,8 +456,8 @@ private:
// prints a simple message if they are not online. Used to help
// reduce 'hello' messages to the linden employees unlucky enough
// to have their calling card in the default inventory.
- void noteOfflineUsers(const LLUUID& session_id, const LLDynamicArray<LLUUID>& ids);
- void noteMutedUsers(const LLUUID& session_id, const LLDynamicArray<LLUUID>& ids);
+ void noteOfflineUsers(const LLUUID& session_id, const std::vector<LLUUID>& ids);
+ void noteMutedUsers(const LLUUID& session_id, const std::vector<LLUUID>& ids);
void processIMTypingCore(const LLIMInfo* im_info, BOOL typing);
@@ -557,7 +555,7 @@ public:
mAvatarNameCacheConnection.disconnect();
}
}
-
+
/*virtual*/ BOOL postBuild();
/*virtual*/ void onOpen(const LLSD& key);
diff --git a/indra/newview/llinspect.cpp b/indra/newview/llinspect.cpp
index 14382e82d7..e6cb068613 100755
--- a/indra/newview/llinspect.cpp
+++ b/indra/newview/llinspect.cpp
@@ -59,7 +59,7 @@ void LLInspect::draw()
}
else if (mCloseTimer.getStarted())
{
- F32 alpha = clamp_rescale(mCloseTimer.getElapsedTimeF32(), 0.f, FADE_TIME, 1.f, 0.f);
+ F32 alpha = clamp_rescale(mCloseTimer.getElapsedTimeF32(), 0.f, FADE_TIME(), 1.f, 0.f);
LLViewDrawContext context(alpha);
LLFloater::draw();
if (mCloseTimer.getElapsedTimeF32() > FADE_TIME)
diff --git a/indra/newview/llinspectavatar.cpp b/indra/newview/llinspectavatar.cpp
index 9c6db3676f..b75140238e 100755
--- a/indra/newview/llinspectavatar.cpp
+++ b/indra/newview/llinspectavatar.cpp
@@ -295,7 +295,7 @@ void LLInspectAvatar::processAvatarData(LLAvatarData* data)
/*
prep#
virtual void errorWithContent(U32 status, const std::string& reason, const LLSD& content)
- llwarns << "MuteVoiceResponder error [status:" << status << "]: " << content << llendl;
+ LL_WARNS() << "MuteVoiceResponder error [status:" << status << "]: " << content << LL_ENDL;
*/
void LLInspectAvatar::updateVolumeSlider()
diff --git a/indra/newview/llinspecttoast.cpp b/indra/newview/llinspecttoast.cpp
index f4fe5dec01..0bc7bd188d 100755
--- a/indra/newview/llinspecttoast.cpp
+++ b/indra/newview/llinspecttoast.cpp
@@ -63,7 +63,7 @@ LLInspectToast::LLInspectToast(const LLSD& notification_id) :
mScreenChannel = dynamic_cast<LLScreenChannel*>(channel);
if(NULL == mScreenChannel)
{
- llwarns << "Could not get requested screen channel." << llendl;
+ LL_WARNS() << "Could not get requested screen channel." << LL_ENDL;
return;
}
@@ -83,7 +83,7 @@ void LLInspectToast::onOpen(const LLSD& notification_id)
LLToast* toast = mScreenChannel->getToastByNotificationID(notification_id);
if (toast == NULL)
{
- llwarns << "Could not get requested toast from screen channel." << llendl;
+ LL_WARNS() << "Could not get requested toast from screen channel." << LL_ENDL;
return;
}
mConnection = toast->setOnToastDestroyedCallback(boost::bind(&LLInspectToast::onToastDestroy, this, _1));
diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp
index 44943d8722..c538fb6c68 100755
--- a/indra/newview/llinventorybridge.cpp
+++ b/indra/newview/llinventorybridge.cpp
@@ -70,6 +70,7 @@
#include "llviewermenu.h"
#include "llviewermessage.h"
#include "llviewerobjectlist.h"
+#include "llviewerregion.h"
#include "llviewerwindow.h"
#include "llvoavatarself.h"
#include "llwearablelist.h"
@@ -328,7 +329,7 @@ void LLInvFVBridge::removeBatch(std::vector<LLFolderViewModelItem*>& batch)
if (cat)
{
gInventory.collectDescendents( cat->getUUID(), descendent_categories, descendent_items, FALSE );
- for (j=0; j<descendent_items.count(); j++)
+ for (j=0; j<descendent_items.size(); j++)
{
if(LLAssetType::AT_GESTURE == descendent_items[j]->getType())
{
@@ -490,12 +491,12 @@ BOOL LLInvFVBridge::isClipboardPasteable() const
}
// In normal mode, we need to check each element of the clipboard to know if we can paste or not
- LLDynamicArray<LLUUID> objects;
+ std::vector<LLUUID> objects;
LLClipboard::instance().pasteFromClipboard(objects);
- S32 count = objects.count();
+ S32 count = objects.size();
for(S32 i = 0; i < count; i++)
{
- const LLUUID &item_id = objects.get(i);
+ const LLUUID &item_id = objects.at(i);
// Folders are pastable if all items in there are copyable
const LLInventoryCategory *cat = model->getCategory(item_id);
@@ -530,12 +531,12 @@ BOOL LLInvFVBridge::isClipboardPasteableAsLink() const
return FALSE;
}
- LLDynamicArray<LLUUID> objects;
+ std::vector<LLUUID> objects;
LLClipboard::instance().pasteFromClipboard(objects);
- S32 count = objects.count();
+ S32 count = objects.size();
for(S32 i = 0; i < count; i++)
{
- const LLInventoryItem *item = model->getItem(objects.get(i));
+ const LLInventoryItem *item = model->getItem(objects.at(i));
if (item)
{
if (!LLAssetType::lookupCanLink(item->getActualType()))
@@ -543,7 +544,7 @@ BOOL LLInvFVBridge::isClipboardPasteableAsLink() const
return FALSE;
}
}
- const LLViewerInventoryCategory *cat = model->getCategory(objects.get(i));
+ const LLViewerInventoryCategory *cat = model->getCategory(objects.at(i));
if (cat && LLFolderType::lookupIsProtectedType(cat->getPreferredType()))
{
return FALSE;
@@ -733,7 +734,7 @@ void LLInvFVBridge::getClipboardEntries(bool show_asset_id,
void LLInvFVBridge::buildContextMenu(LLMenuGL& menu, U32 flags)
{
- lldebugs << "LLInvFVBridge::buildContextMenu()" << llendl;
+ LL_DEBUGS() << "LLInvFVBridge::buildContextMenu()" << LL_ENDL;
menuentry_vec_t items;
menuentry_vec_t disabled_items;
if(isItemInTrash())
@@ -861,7 +862,7 @@ BOOL LLInvFVBridge::startDrag(EDragAndDropType* type, LLUUID* id) const
}
*id = obj->getUUID();
- //object_ids.put(obj->getUUID());
+ //object_ids.push_back(obj->getUUID());
if (*type == DAD_CATEGORY)
{
@@ -1032,7 +1033,7 @@ LLInvFVBridge* LLInvFVBridge::createBridge(LLAssetType::EType asset_type,
case LLAssetType::AT_TEXTURE:
if(!(inv_type == LLInventoryType::IT_TEXTURE || inv_type == LLInventoryType::IT_SNAPSHOT))
{
- llwarns << LLAssetType::lookup(asset_type) << " asset has inventory type " << LLInventoryType::lookupHumanReadable(inv_type) << " on uuid " << uuid << llendl;
+ LL_WARNS() << LLAssetType::lookup(asset_type) << " asset has inventory type " << LLInventoryType::lookupHumanReadable(inv_type) << " on uuid " << uuid << LL_ENDL;
}
new_listener = new LLTextureBridge(inventory, root, uuid, inv_type);
break;
@@ -1040,7 +1041,7 @@ LLInvFVBridge* LLInvFVBridge::createBridge(LLAssetType::EType asset_type,
case LLAssetType::AT_SOUND:
if(!(inv_type == LLInventoryType::IT_SOUND))
{
- llwarns << LLAssetType::lookup(asset_type) << " asset has inventory type " << LLInventoryType::lookupHumanReadable(inv_type) << " on uuid " << uuid << llendl;
+ LL_WARNS() << LLAssetType::lookup(asset_type) << " asset has inventory type " << LLInventoryType::lookupHumanReadable(inv_type) << " on uuid " << uuid << LL_ENDL;
}
new_listener = new LLSoundBridge(inventory, root, uuid);
break;
@@ -1048,7 +1049,7 @@ LLInvFVBridge* LLInvFVBridge::createBridge(LLAssetType::EType asset_type,
case LLAssetType::AT_LANDMARK:
if(!(inv_type == LLInventoryType::IT_LANDMARK))
{
- llwarns << LLAssetType::lookup(asset_type) << " asset has inventory type " << LLInventoryType::lookupHumanReadable(inv_type) << " on uuid " << uuid << llendl;
+ LL_WARNS() << LLAssetType::lookup(asset_type) << " asset has inventory type " << LLInventoryType::lookupHumanReadable(inv_type) << " on uuid " << uuid << LL_ENDL;
}
new_listener = new LLLandmarkBridge(inventory, root, uuid, flags);
break;
@@ -1056,7 +1057,7 @@ LLInvFVBridge* LLInvFVBridge::createBridge(LLAssetType::EType asset_type,
case LLAssetType::AT_CALLINGCARD:
if(!(inv_type == LLInventoryType::IT_CALLINGCARD))
{
- llwarns << LLAssetType::lookup(asset_type) << " asset has inventory type " << LLInventoryType::lookupHumanReadable(inv_type) << " on uuid " << uuid << llendl;
+ LL_WARNS() << LLAssetType::lookup(asset_type) << " asset has inventory type " << LLInventoryType::lookupHumanReadable(inv_type) << " on uuid " << uuid << LL_ENDL;
}
new_listener = new LLCallingCardBridge(inventory, root, uuid);
break;
@@ -1064,7 +1065,7 @@ LLInvFVBridge* LLInvFVBridge::createBridge(LLAssetType::EType asset_type,
case LLAssetType::AT_SCRIPT:
if(!(inv_type == LLInventoryType::IT_LSL))
{
- llwarns << LLAssetType::lookup(asset_type) << " asset has inventory type " << LLInventoryType::lookupHumanReadable(inv_type) << " on uuid " << uuid << llendl;
+ LL_WARNS() << LLAssetType::lookup(asset_type) << " asset has inventory type " << LLInventoryType::lookupHumanReadable(inv_type) << " on uuid " << uuid << LL_ENDL;
}
new_listener = new LLItemBridge(inventory, root, uuid);
break;
@@ -1072,7 +1073,7 @@ LLInvFVBridge* LLInvFVBridge::createBridge(LLAssetType::EType asset_type,
case LLAssetType::AT_OBJECT:
if(!(inv_type == LLInventoryType::IT_OBJECT || inv_type == LLInventoryType::IT_ATTACHMENT))
{
- llwarns << LLAssetType::lookup(asset_type) << " asset has inventory type " << LLInventoryType::lookupHumanReadable(inv_type) << " on uuid " << uuid << llendl;
+ LL_WARNS() << LLAssetType::lookup(asset_type) << " asset has inventory type " << LLInventoryType::lookupHumanReadable(inv_type) << " on uuid " << uuid << LL_ENDL;
}
new_listener = new LLObjectBridge(inventory, root, uuid, inv_type, flags);
break;
@@ -1080,7 +1081,7 @@ LLInvFVBridge* LLInvFVBridge::createBridge(LLAssetType::EType asset_type,
case LLAssetType::AT_NOTECARD:
if(!(inv_type == LLInventoryType::IT_NOTECARD))
{
- llwarns << LLAssetType::lookup(asset_type) << " asset has inventory type " << LLInventoryType::lookupHumanReadable(inv_type) << " on uuid " << uuid << llendl;
+ LL_WARNS() << LLAssetType::lookup(asset_type) << " asset has inventory type " << LLInventoryType::lookupHumanReadable(inv_type) << " on uuid " << uuid << LL_ENDL;
}
new_listener = new LLNotecardBridge(inventory, root, uuid);
break;
@@ -1088,7 +1089,7 @@ LLInvFVBridge* LLInvFVBridge::createBridge(LLAssetType::EType asset_type,
case LLAssetType::AT_ANIMATION:
if(!(inv_type == LLInventoryType::IT_ANIMATION))
{
- llwarns << LLAssetType::lookup(asset_type) << " asset has inventory type " << LLInventoryType::lookupHumanReadable(inv_type) << " on uuid " << uuid << llendl;
+ LL_WARNS() << LLAssetType::lookup(asset_type) << " asset has inventory type " << LLInventoryType::lookupHumanReadable(inv_type) << " on uuid " << uuid << LL_ENDL;
}
new_listener = new LLAnimationBridge(inventory, root, uuid);
break;
@@ -1096,7 +1097,7 @@ LLInvFVBridge* LLInvFVBridge::createBridge(LLAssetType::EType asset_type,
case LLAssetType::AT_GESTURE:
if(!(inv_type == LLInventoryType::IT_GESTURE))
{
- llwarns << LLAssetType::lookup(asset_type) << " asset has inventory type " << LLInventoryType::lookupHumanReadable(inv_type) << " on uuid " << uuid << llendl;
+ LL_WARNS() << LLAssetType::lookup(asset_type) << " asset has inventory type " << LLInventoryType::lookupHumanReadable(inv_type) << " on uuid " << uuid << LL_ENDL;
}
new_listener = new LLGestureBridge(inventory, root, uuid);
break;
@@ -1104,7 +1105,7 @@ LLInvFVBridge* LLInvFVBridge::createBridge(LLAssetType::EType asset_type,
case LLAssetType::AT_LSL_TEXT:
if(!(inv_type == LLInventoryType::IT_LSL))
{
- llwarns << LLAssetType::lookup(asset_type) << " asset has inventory type " << LLInventoryType::lookupHumanReadable(inv_type) << " on uuid " << uuid << llendl;
+ LL_WARNS() << LLAssetType::lookup(asset_type) << " asset has inventory type " << LLInventoryType::lookupHumanReadable(inv_type) << " on uuid " << uuid << LL_ENDL;
}
new_listener = new LLLSLTextBridge(inventory, root, uuid);
break;
@@ -1113,7 +1114,7 @@ LLInvFVBridge* LLInvFVBridge::createBridge(LLAssetType::EType asset_type,
case LLAssetType::AT_BODYPART:
if(!(inv_type == LLInventoryType::IT_WEARABLE))
{
- llwarns << LLAssetType::lookup(asset_type) << " asset has inventory type " << LLInventoryType::lookupHumanReadable(inv_type) << " on uuid " << uuid << llendl;
+ LL_WARNS() << LLAssetType::lookup(asset_type) << " asset has inventory type " << LLInventoryType::lookupHumanReadable(inv_type) << " on uuid " << uuid << LL_ENDL;
}
new_listener = new LLWearableBridge(inventory, root, uuid, asset_type, inv_type, (LLWearableType::EType)flags);
break;
@@ -1134,19 +1135,19 @@ LLInvFVBridge* LLInvFVBridge::createBridge(LLAssetType::EType asset_type,
case LLAssetType::AT_MESH:
if(!(inv_type == LLInventoryType::IT_MESH))
{
- llwarns << LLAssetType::lookup(asset_type) << " asset has inventory type " << LLInventoryType::lookupHumanReadable(inv_type) << " on uuid " << uuid << llendl;
+ LL_WARNS() << LLAssetType::lookup(asset_type) << " asset has inventory type " << LLInventoryType::lookupHumanReadable(inv_type) << " on uuid " << uuid << LL_ENDL;
}
new_listener = new LLMeshBridge(inventory, root, uuid);
break;
case LLAssetType::AT_IMAGE_TGA:
case LLAssetType::AT_IMAGE_JPEG:
- //llwarns << LLAssetType::lookup(asset_type) << " asset type is unhandled for uuid " << uuid << llendl;
+ //LL_WARNS() << LLAssetType::lookup(asset_type) << " asset type is unhandled for uuid " << uuid << LL_ENDL;
break;
default:
- llinfos << "Unhandled asset type (llassetstorage.h): "
- << (S32)asset_type << " (" << LLAssetType::lookup(asset_type) << ")" << llendl;
+ LL_INFOS() << "Unhandled asset type (llassetstorage.h): "
+ << (S32)asset_type << " (" << LLAssetType::lookup(asset_type) << ")" << LL_ENDL;
break;
}
@@ -1427,7 +1428,7 @@ void LLItemBridge::performAction(LLInventoryModel* model, std::string action)
}
else if (isMarketplaceCopyAction(action))
{
- llinfos << "Copy item to marketplace action!" << llendl;
+ LL_INFOS() << "Copy item to marketplace action!" << LL_ENDL;
LLInventoryItem* itemp = model->getItem(mUUID);
if (!itemp) return;
@@ -1626,7 +1627,7 @@ LLFontGL::StyleFlags LLItemBridge::getLabelStyle() const
if (get_is_item_worn(mUUID))
{
- // llinfos << "BOLD" << llendl;
+ // LL_INFOS() << "BOLD" << LL_ENDL;
font |= LLFontGL::BOLD;
}
else if(item && item->getIsLinkType())
@@ -2080,15 +2081,15 @@ BOOL LLFolderBridge::isClipboardPasteable() const
return FALSE;
}
- LLDynamicArray<LLUUID> objects;
+ std::vector<LLUUID> objects;
LLClipboard::instance().pasteFromClipboard(objects);
const LLViewerInventoryCategory *current_cat = getCategory();
// Search for the direct descendent of current Friends subfolder among all pasted items,
// and return false if is found.
- for(S32 i = objects.count() - 1; i >= 0; --i)
+ for(S32 i = objects.size() - 1; i >= 0; --i)
{
- const LLUUID &obj_id = objects.get(i);
+ const LLUUID &obj_id = objects.at(i);
if ( LLFriendCardsManager::instance().isObjDirectDescendentOfCategory(model->getObject(obj_id), current_cat) )
{
return FALSE;
@@ -2118,12 +2119,12 @@ BOOL LLFolderBridge::isClipboardPasteableAsLink() const
{
const BOOL is_in_friend_folder = LLFriendCardsManager::instance().isCategoryInFriendFolder( current_cat );
const LLUUID &current_cat_id = current_cat->getUUID();
- LLDynamicArray<LLUUID> objects;
+ std::vector<LLUUID> objects;
LLClipboard::instance().pasteFromClipboard(objects);
- S32 count = objects.count();
+ S32 count = objects.size();
for(S32 i = 0; i < count; i++)
{
- const LLUUID &obj_id = objects.get(i);
+ const LLUUID &obj_id = objects.at(i);
const LLInventoryCategory *cat = model->getCategory(obj_id);
if (cat)
{
@@ -2197,9 +2198,9 @@ int get_folder_levels(LLInventoryCategory* inv_cat)
int max_child_levels = 0;
- for (S32 i=0; i < cats->count(); ++i)
+ for (S32 i=0; i < cats->size(); ++i)
{
- LLInventoryCategory* category = cats->get(i);
+ LLInventoryCategory* category = cats->at(i);
max_child_levels = llmax(max_child_levels, get_folder_levels(category));
}
@@ -2227,7 +2228,7 @@ int get_folder_path_length(const LLUUID& ancestor_id, const LLUUID& descendant_i
category = gInventory.getCategory(parent_id);
}
- llwarns << "get_folder_path_length() couldn't trace a path from the descendant to the ancestor" << llendl;
+ LL_WARNS() << "get_folder_path_length() couldn't trace a path from the descendant to the ancestor" << LL_ENDL;
return -1;
}
@@ -2309,7 +2310,7 @@ BOOL LLFolderBridge::dragCategoryIntoFolder(LLInventoryCategory* inv_cat,
if (is_movable)
{
model->collectDescendents(cat_id, descendent_categories, descendent_items, FALSE);
- for (S32 i=0; i < descendent_categories.count(); ++i)
+ for (S32 i=0; i < descendent_categories.size(); ++i)
{
LLInventoryCategory* category = descendent_categories[i];
if(LLFolderType::lookupIsProtectedType(category->getPreferredType()))
@@ -2322,7 +2323,7 @@ BOOL LLFolderBridge::dragCategoryIntoFolder(LLInventoryCategory* inv_cat,
}
if (is_movable && move_is_into_trash)
{
- for (S32 i=0; i < descendent_items.count(); ++i)
+ for (S32 i=0; i < descendent_items.size(); ++i)
{
LLInventoryItem* item = descendent_items[i];
if (get_is_item_worn(item->getUUID()))
@@ -2334,7 +2335,7 @@ BOOL LLFolderBridge::dragCategoryIntoFolder(LLInventoryCategory* inv_cat,
}
if (is_movable && move_is_into_landmarks)
{
- for (S32 i=0; i < descendent_items.count(); ++i)
+ for (S32 i=0; i < descendent_items.size(); ++i)
{
LLViewerInventoryItem* item = descendent_items[i];
@@ -2358,7 +2359,7 @@ BOOL LLFolderBridge::dragCategoryIntoFolder(LLInventoryCategory* inv_cat,
}
else
{
- int dragged_folder_count = descendent_categories.count();
+ int dragged_folder_count = descendent_categories.size();
int existing_item_count = 0;
int existing_folder_count = 0;
@@ -2397,8 +2398,8 @@ BOOL LLFolderBridge::dragCategoryIntoFolder(LLInventoryCategory* inv_cat,
model->collectDescendents(master_folder->getUUID(), existing_categories, existing_items, FALSE);
- existing_folder_count += existing_categories.count();
- existing_item_count += existing_items.count();
+ existing_folder_count += existing_categories.size();
+ existing_item_count += existing_items.size();
}
else
{
@@ -2408,7 +2409,7 @@ BOOL LLFolderBridge::dragCategoryIntoFolder(LLInventoryCategory* inv_cat,
}
const int nested_folder_count = existing_folder_count + dragged_folder_count;
- const int nested_item_count = existing_item_count + descendent_items.count();
+ const int nested_item_count = existing_item_count + descendent_items.size();
if (nested_folder_count > gSavedSettings.getU32("InventoryOutboxMaxFolderCount"))
{
@@ -2423,7 +2424,7 @@ BOOL LLFolderBridge::dragCategoryIntoFolder(LLInventoryCategory* inv_cat,
if (is_movable == TRUE)
{
- for (S32 i=0; i < descendent_items.count(); ++i)
+ for (S32 i=0; i < descendent_items.size(); ++i)
{
LLInventoryItem* item = descendent_items[i];
if (!can_move_to_outbox(item, tooltip_msg))
@@ -2479,7 +2480,7 @@ BOOL LLFolderBridge::dragCategoryIntoFolder(LLInventoryCategory* inv_cat,
// Look for any gestures and deactivate them
if (move_is_into_trash)
{
- for (S32 i=0; i < descendent_items.count(); i++)
+ for (S32 i=0; i < descendent_items.size(); i++)
{
LLInventoryItem* item = descendent_items[i];
if (item->getType() == LLAssetType::AT_GESTURE
@@ -2618,7 +2619,7 @@ BOOL move_inv_category_world_to_agent(const LLUUID& object_id,
LLViewerObject* object = gObjectList.findObject(object_id);
if(!object)
{
- llinfos << "Object not found for drop." << llendl;
+ LL_INFOS() << "Object not found for drop." << LL_ENDL;
return FALSE;
}
@@ -2629,7 +2630,7 @@ BOOL move_inv_category_world_to_agent(const LLUUID& object_id,
if (inventory_objects.empty())
{
- llinfos << "Object contents not found for drop." << llendl;
+ LL_INFOS() << "Object contents not found for drop." << LL_ENDL;
return FALSE;
}
@@ -2645,7 +2646,7 @@ BOOL move_inv_category_world_to_agent(const LLUUID& object_id,
LLInventoryItem* item = dynamic_cast<LLInventoryItem*>(it->get());
if (!item)
{
- llwarns << "Invalid inventory item for drop" << llendl;
+ LL_WARNS() << "Invalid inventory item for drop" << LL_ENDL;
continue;
}
@@ -2713,7 +2714,7 @@ void LLRightClickInventoryFetchDescendentsObserver::execute(bool clear_observer)
// Bail out immediately if no descendents
if( mComplete.empty() )
{
- llwarns << "LLRightClickInventoryFetchDescendentsObserver::done with empty mCompleteFolders" << llendl;
+ LL_WARNS() << "LLRightClickInventoryFetchDescendentsObserver::done with empty mCompleteFolders" << LL_ENDL;
if (clear_observer)
{
gInventory.removeObserver(this);
@@ -2743,13 +2744,13 @@ void LLRightClickInventoryFetchDescendentsObserver::execute(bool clear_observer)
S32 item_count(0);
if( item_array )
{
- item_count = item_array->count();
+ item_count = item_array->size();
}
S32 cat_count(0);
if( cat_array )
{
- cat_count = cat_array->count();
+ cat_count = cat_array->size();
}
// Move to next if current folder empty
@@ -2767,7 +2768,7 @@ void LLRightClickInventoryFetchDescendentsObserver::execute(bool clear_observer)
{
for (S32 i = 0; i < item_count; ++i)
{
- ids.push_back(item_array->get(i)->getUUID());
+ ids.push_back(item_array->at(i)->getUUID());
}
outfit = new LLRightClickInventoryFetchObserver(ids);
}
@@ -2776,7 +2777,7 @@ void LLRightClickInventoryFetchDescendentsObserver::execute(bool clear_observer)
{
for (S32 i = 0; i < cat_count; ++i)
{
- ids.push_back(cat_array->get(i)->getUUID());
+ ids.push_back(cat_array->at(i)->getUUID());
}
categories = new LLRightClickInventoryFetchDescendentsObserver(ids);
}
@@ -2871,8 +2872,8 @@ void LLInventoryCopyAndWearObserver::changed(U32 mask)
LLViewerInventoryCategory* category = gInventory.getCategory(mCatID);
if (NULL == category)
{
- llwarns << "gInventory.getCategory(" << mCatID
- << ") was NULL" << llendl;
+ LL_WARNS() << "gInventory.getCategory(" << mCatID
+ << ") was NULL" << LL_ENDL;
}
else
{
@@ -2978,7 +2979,7 @@ void LLFolderBridge::performAction(LLInventoryModel* model, std::string action)
#endif
else if (isMarketplaceCopyAction(action))
{
- llinfos << "Copy folder to marketplace action!" << llendl;
+ LL_INFOS() << "Copy folder to marketplace action!" << LL_ENDL;
LLInventoryCategory * cat = gInventory.getCategory(mUUID);
if (!cat) return;
@@ -2989,7 +2990,7 @@ void LLFolderBridge::performAction(LLInventoryModel* model, std::string action)
#if ENABLE_MERCHANT_SEND_TO_MARKETPLACE_CONTEXT_MENU
else if (isMarketplaceSendAction(action))
{
- llinfos << "Send to marketplace action!" << llendl;
+ LL_INFOS() << "Send to marketplace action!" << LL_ENDL;
LLInventoryCategory * cat = gInventory.getCategory(mUUID);
if (!cat) return;
@@ -3001,7 +3002,7 @@ void LLFolderBridge::performAction(LLInventoryModel* model, std::string action)
void LLFolderBridge::openItem()
{
- lldebugs << "LLFolderBridge::openItem()" << llendl;
+ LL_DEBUGS() << "LLFolderBridge::openItem()" << LL_ENDL;
LLInventoryModel* model = getInventoryModel();
if(!model) return;
if(mUUID.isNull()) return;
@@ -3185,7 +3186,7 @@ void LLFolderBridge::pasteFromClipboard()
const BOOL move_is_into_outfit = (getCategory() && getCategory()->getPreferredType()==LLFolderType::FT_OUTFIT);
const BOOL move_is_into_outbox = model->isObjectDescendentOf(mUUID, outbox_id);
- LLDynamicArray<LLUUID> objects;
+ std::vector<LLUUID> objects;
LLClipboard::instance().pasteFromClipboard(objects);
if (move_is_into_outbox)
@@ -3198,7 +3199,7 @@ void LLFolderBridge::pasteFromClipboard()
BOOL can_list = TRUE;
- for (LLDynamicArray<LLUUID>::const_iterator iter = objects.begin();
+ for (std::vector<LLUUID>::const_iterator iter = objects.begin();
(iter != objects.end()) && (can_list == TRUE);
++iter)
{
@@ -3229,7 +3230,7 @@ void LLFolderBridge::pasteFromClipboard()
const LLUUID parent_id(mUUID);
- for (LLDynamicArray<LLUUID>::const_iterator iter = objects.begin();
+ for (std::vector<LLUUID>::const_iterator iter = objects.begin();
iter != objects.end();
++iter)
{
@@ -3321,9 +3322,9 @@ void LLFolderBridge::pasteLinkFromClipboard()
const LLUUID parent_id(mUUID);
- LLDynamicArray<LLUUID> objects;
+ std::vector<LLUUID> objects;
LLClipboard::instance().pasteFromClipboard(objects);
- for (LLDynamicArray<LLUUID>::const_iterator iter = objects.begin();
+ for (std::vector<LLUUID>::const_iterator iter = objects.begin();
iter != objects.end();
++iter)
{
@@ -3384,7 +3385,7 @@ BOOL LLFolderBridge::checkFolderForContentsOfType(LLInventoryModel* model, LLInv
item_array,
LLInventoryModel::EXCLUDE_TRASH,
is_type);
- return ((item_array.count() > 0) ? TRUE : FALSE );
+ return ((item_array.size() > 0) ? TRUE : FALSE );
}
void LLFolderBridge::buildContextMenuOptions(U32 flags, menuentry_vec_t& items, menuentry_vec_t& disabled_items)
@@ -3636,7 +3637,7 @@ void LLFolderBridge::buildContextMenu(LLMenuGL& menu, U32 flags)
menuentry_vec_t items;
menuentry_vec_t disabled_items;
- lldebugs << "LLFolderBridge::buildContextMenu()" << llendl;
+ LL_DEBUGS() << "LLFolderBridge::buildContextMenu()" << LL_ENDL;
LLInventoryModel* model = getInventoryModel();
if(!model) return;
@@ -3665,7 +3666,7 @@ BOOL LLFolderBridge::dragOrDrop(MASK mask, BOOL drop,
{
LLInventoryItem* inv_item = (LLInventoryItem*)cargo_data;
- //llinfos << "LLFolderBridge::dragOrDrop()" << llendl;
+ //LL_INFOS() << "LLFolderBridge::dragOrDrop()" << LL_ENDL;
BOOL accept = FALSE;
switch(cargo_type)
{
@@ -3714,7 +3715,7 @@ BOOL LLFolderBridge::dragOrDrop(MASK mask, BOOL drop,
case DAD_NONE:
break;
default:
- llwarns << "Unhandled cargo type for drag&drop " << cargo_type << llendl;
+ LL_WARNS() << "Unhandled cargo type for drag&drop " << cargo_type << LL_ENDL;
break;
}
return accept;
@@ -4076,7 +4077,7 @@ BOOL LLFolderBridge::dragItemIntoFolder(LLInventoryItem* inv_item,
gInventory.collectDescendents(master_folder->getUUID(), existing_categories, existing_items, FALSE);
- existing_item_count += existing_items.count();
+ existing_item_count += existing_items.size();
}
if (existing_item_count > gSavedSettings.getU32("InventoryOutboxMaxItemCount"))
@@ -4184,7 +4185,7 @@ BOOL LLFolderBridge::dragItemIntoFolder(LLInventoryItem* inv_item,
object = gObjectList.findObject(inv_item->getParentUUID());
if (!object)
{
- llinfos << "Object not found for drop." << llendl;
+ LL_INFOS() << "Object not found for drop." << LL_ENDL;
return FALSE;
}
@@ -4350,7 +4351,7 @@ BOOL LLFolderBridge::dragItemIntoFolder(LLInventoryItem* inv_item,
}
else
{
- llwarns << "unhandled drag source" << llendl;
+ LL_WARNS() << "unhandled drag source" << LL_ENDL;
}
return accept;
}
@@ -4373,8 +4374,8 @@ bool check_category(LLInventoryModel* model,
LLInventoryModel::item_array_t descendent_items;
model->collectDescendents(cat_id, descendent_categories, descendent_items, TRUE);
- S32 num_descendent_categories = descendent_categories.count();
- S32 num_descendent_items = descendent_items.count();
+ S32 num_descendent_categories = descendent_categories.size();
+ S32 num_descendent_items = descendent_items.size();
if (num_descendent_categories + num_descendent_items == 0)
{
@@ -4455,7 +4456,7 @@ bool LLTextureBridge::canSaveTexture(void)
void LLTextureBridge::buildContextMenu(LLMenuGL& menu, U32 flags)
{
- lldebugs << "LLTextureBridge::buildContextMenu()" << llendl;
+ LL_DEBUGS() << "LLTextureBridge::buildContextMenu()" << LL_ENDL;
menuentry_vec_t items;
menuentry_vec_t disabled_items;
if(isItemInTrash())
@@ -4525,7 +4526,7 @@ void LLSoundBridge::openSoundPreview(void* which)
void LLSoundBridge::buildContextMenu(LLMenuGL& menu, U32 flags)
{
- lldebugs << "LLSoundBridge::buildContextMenu()" << llendl;
+ LL_DEBUGS() << "LLSoundBridge::buildContextMenu()" << LL_ENDL;
menuentry_vec_t items;
menuentry_vec_t disabled_items;
@@ -4586,7 +4587,7 @@ void LLLandmarkBridge::buildContextMenu(LLMenuGL& menu, U32 flags)
menuentry_vec_t items;
menuentry_vec_t disabled_items;
- lldebugs << "LLLandmarkBridge::buildContextMenu()" << llendl;
+ LL_DEBUGS() << "LLLandmarkBridge::buildContextMenu()" << LL_ENDL;
if(isOutboxFolder())
{
addOutboxContextMenuOptions(flags, items, disabled_items);
@@ -4829,7 +4830,7 @@ void LLCallingCardBridge::openItem()
void LLCallingCardBridge::buildContextMenu(LLMenuGL& menu, U32 flags)
{
- lldebugs << "LLCallingCardBridge::buildContextMenu()" << llendl;
+ LL_DEBUGS() << "LLCallingCardBridge::buildContextMenu()" << LL_ENDL;
menuentry_vec_t items;
menuentry_vec_t disabled_items;
@@ -5097,7 +5098,7 @@ BOOL LLGestureBridge::removeItem()
void LLGestureBridge::buildContextMenu(LLMenuGL& menu, U32 flags)
{
- lldebugs << "LLGestureBridge::buildContextMenu()" << llendl;
+ LL_DEBUGS() << "LLGestureBridge::buildContextMenu()" << LL_ENDL;
menuentry_vec_t items;
menuentry_vec_t disabled_items;
if(isItemInTrash())
@@ -5157,7 +5158,7 @@ void LLAnimationBridge::buildContextMenu(LLMenuGL& menu, U32 flags)
menuentry_vec_t items;
menuentry_vec_t disabled_items;
- lldebugs << "LLAnimationBridge::buildContextMenu()" << llendl;
+ LL_DEBUGS() << "LLAnimationBridge::buildContextMenu()" << LL_ENDL;
if(isOutboxFolder())
{
items.push_back(std::string("Delete"));
@@ -5340,7 +5341,7 @@ void rez_attachment(LLViewerInventoryItem* item, LLViewerJointAttachment* attach
(gAgentAvatarp->attachmentWasRequested(item_id) ||
gAgentAvatarp->isWearingAttachment(item_id)))
{
- llwarns << "duplicate attachment request, ignoring" << llendl;
+ LL_WARNS() << "duplicate attachment request, ignoring" << LL_ENDL;
return;
}
gAgentAvatarp->addAttachmentRequest(item_id);
@@ -5652,7 +5653,7 @@ void LLWearableBridge::openItem()
void LLWearableBridge::buildContextMenu(LLMenuGL& menu, U32 flags)
{
- lldebugs << "LLWearableBridge::buildContextMenu()" << llendl;
+ LL_DEBUGS() << "LLWearableBridge::buildContextMenu()" << LL_ENDL;
menuentry_vec_t items;
menuentry_vec_t disabled_items;
if(isItemInTrash())
@@ -5816,7 +5817,7 @@ void LLWearableBridge::onWearOnAvatarArrived( LLViewerWearable* wearable, void*
}
else
{
- llinfos << "By the time wearable asset arrived, its inv item already pointed to a different asset." << llendl;
+ LL_INFOS() << "By the time wearable asset arrived, its inv item already pointed to a different asset." << LL_ENDL;
}
}
}
@@ -5843,7 +5844,7 @@ void LLWearableBridge::onWearAddOnAvatarArrived( LLViewerWearable* wearable, voi
}
else
{
- llinfos << "By the time wearable asset arrived, its inv item already pointed to a different asset." << llendl;
+ LL_INFOS() << "By the time wearable asset arrived, its inv item already pointed to a different asset." << LL_ENDL;
}
}
}
@@ -5887,7 +5888,7 @@ BOOL LLWearableBridge::canRemoveFromAvatar(void* user_data)
void LLWearableBridge::removeFromAvatar()
{
- llwarns << "safe to remove?" << llendl;
+ LL_WARNS() << "safe to remove?" << LL_ENDL;
if (get_is_item_worn(mUUID))
{
LLAppearanceMgr::instance().removeItemFromAvatar(mUUID);
@@ -5905,7 +5906,7 @@ std::string LLLinkItemBridge::sPrefix("Link: ");
void LLLinkItemBridge::buildContextMenu(LLMenuGL& menu, U32 flags)
{
// *TODO: Translate
- lldebugs << "LLLink::buildContextMenu()" << llendl;
+ LL_DEBUGS() << "LLLink::buildContextMenu()" << LL_ENDL;
menuentry_vec_t items;
menuentry_vec_t disabled_items;
@@ -5945,7 +5946,7 @@ void LLMeshBridge::openItem()
void LLMeshBridge::buildContextMenu(LLMenuGL& menu, U32 flags)
{
- lldebugs << "LLMeshBridge::buildContextMenu()" << llendl;
+ LL_DEBUGS() << "LLMeshBridge::buildContextMenu()" << LL_ENDL;
std::vector<std::string> items;
std::vector<std::string> disabled_items;
@@ -6002,7 +6003,7 @@ LLUIImagePtr LLLinkFolderBridge::getIcon() const
void LLLinkFolderBridge::buildContextMenu(LLMenuGL& menu, U32 flags)
{
// *TODO: Translate
- lldebugs << "LLLink::buildContextMenu()" << llendl;
+ LL_DEBUGS() << "LLLink::buildContextMenu()" << LL_ENDL;
menuentry_vec_t items;
menuentry_vec_t disabled_items;
diff --git a/indra/newview/llinventoryfilter.cpp b/indra/newview/llinventoryfilter.cpp
index 15463e0d33..55904eb028 100755
--- a/indra/newview/llinventoryfilter.cpp
+++ b/indra/newview/llinventoryfilter.cpp
@@ -42,7 +42,7 @@
#include "llclipboard.h"
#include "lltrans.h"
-LLFastTimer::DeclareTimer FT_FILTER_CLIPBOARD("Filter Clipboard");
+LLTrace::BlockTimerStatHandle FT_FILTER_CLIPBOARD("Filter Clipboard");
LLInventoryFilter::FilterOps::FilterOps(const Params& p)
: mFilterObjectTypes(p.object_types),
@@ -113,7 +113,7 @@ bool LLInventoryFilter::checkFolder(const LLFolderViewModelItem* item) const
const LLFolderViewModelItemInventory* listener = dynamic_cast<const LLFolderViewModelItemInventory*>(item);
if (!listener)
{
- llerrs << "Folder view event listener not found." << llendl;
+ LL_ERRS() << "Folder view event listener not found." << LL_ENDL;
return false;
}
@@ -310,7 +310,7 @@ bool LLInventoryFilter::checkAgainstClipboard(const LLUUID& object_id) const
{
if (LLClipboard::instance().isCutMode())
{
- LLFastTimer ft(FT_FILTER_CLIPBOARD);
+ LL_RECORD_BLOCK_TIME(FT_FILTER_CLIPBOARD);
LLUUID current_id = object_id;
LLInventoryObject *current_object = gInventory.getObject(object_id);
while (current_id.notNull() && current_object)
@@ -738,7 +738,7 @@ void LLInventoryFilter::setModified(EFilterModified behavior)
mFirstSuccessGeneration = mCurrentGeneration;
break;
default:
- llerrs << "Bad filter behavior specified" << llendl;
+ LL_ERRS() << "Bad filter behavior specified" << LL_ENDL;
}
}
@@ -1080,7 +1080,7 @@ bool LLInventoryFilter::FilterOps::DateRange::validateBlock( bool emit_errors
{
if (emit_errors)
{
- llwarns << "max_date should be greater or equal to min_date" << llendl;
+ LL_WARNS() << "max_date should be greater or equal to min_date" << LL_ENDL;
}
valid = false;
}
diff --git a/indra/newview/llinventoryfunctions.cpp b/indra/newview/llinventoryfunctions.cpp
index f1a4889f5a..f16b9330be 100755
--- a/indra/newview/llinventoryfunctions.cpp
+++ b/indra/newview/llinventoryfunctions.cpp
@@ -436,7 +436,7 @@ void show_item_original(const LLUUID& item_uuid)
LLFloater* floater_inventory = LLFloaterReg::getInstance("inventory");
if (!floater_inventory)
{
- llwarns << "Could not find My Inventory floater" << llendl;
+ LL_WARNS() << "Could not find My Inventory floater" << LL_ENDL;
return;
}
@@ -928,7 +928,7 @@ bool LLFindNonRemovableObjects::operator()(LLInventoryCategory* cat, LLInventory
return !get_is_category_removable(&gInventory, cat->getUUID());
}
- llwarns << "Not a category and not an item?" << llendl;
+ LL_WARNS() << "Not a category and not an item?" << LL_ENDL;
return false;
}
diff --git a/indra/newview/llinventoryicon.cpp b/indra/newview/llinventoryicon.cpp
index 02a2475cfd..b7c4ec6f8b 100755
--- a/indra/newview/llinventoryicon.cpp
+++ b/indra/newview/llinventoryicon.cpp
@@ -32,6 +32,7 @@
#include "lldictionary.h"
#include "llinventorydefines.h"
#include "llui.h"
+#include "lluiimage.h"
#include "llwearabletype.h"
struct IconEntry : public LLDictionaryEntry
@@ -49,6 +50,8 @@ public:
LLIconDictionary();
};
+typedef LLPointer<LLUIImage> LLUIImagePtr;
+
LLIconDictionary::LLIconDictionary()
{
addEntry(LLInventoryType::ICONNAME_TEXTURE, new IconEntry("Inv_Texture"));
diff --git a/indra/newview/llinventoryicon.h b/indra/newview/llinventoryicon.h
index 2197c53bb8..bc09e32087 100755
--- 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
{
@@ -41,11 +40,11 @@ public:
BOOL item_is_multi = FALSE);
static const std::string& getIconName(LLInventoryType::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(LLInventoryType::EIconName idx);
+ static LLPointer<class LLUIImage> getIcon(LLInventoryType::EIconName idx);
protected:
static LLInventoryType::EIconName assignWearableIcon(U32 misc_flag);
diff --git a/indra/newview/llinventoryitemslist.cpp b/indra/newview/llinventoryitemslist.cpp
index 348d7ebcec..36e1cc97d1 100755
--- a/indra/newview/llinventoryitemslist.cpp
+++ b/indra/newview/llinventoryitemslist.cpp
@@ -133,11 +133,11 @@ void LLInventoryItemsList::idle(void* user_data)
}
}
-LLFastTimer::DeclareTimer FTM_INVENTORY_ITEMS_REFRESH("Inventory List Refresh");
+LLTrace::BlockTimerStatHandle FTM_INVENTORY_ITEMS_REFRESH("Inventory List Refresh");
void LLInventoryItemsList::refresh()
{
- LLFastTimer _(FTM_INVENTORY_ITEMS_REFRESH);
+ LL_RECORD_BLOCK_TIME(FTM_INVENTORY_ITEMS_REFRESH);
static const unsigned ADD_LIMIT = 20;
uuid_vec_t added_items;
@@ -208,7 +208,7 @@ void LLInventoryItemsList::addNewItem(LLViewerInventoryItem* item, bool rearrang
{
if (!item)
{
- llwarns << "No inventory item. Couldn't create flat list item." << llendl;
+ LL_WARNS() << "No inventory item. Couldn't create flat list item." << LL_ENDL;
llassert(item != NULL);
}
@@ -219,7 +219,7 @@ void LLInventoryItemsList::addNewItem(LLViewerInventoryItem* item, bool rearrang
bool is_item_added = addItem(list_item, item->getUUID(), ADD_BOTTOM, rearrange);
if (!is_item_added)
{
- llwarns << "Couldn't add flat list item." << llendl;
+ LL_WARNS() << "Couldn't add flat list item." << LL_ENDL;
llassert(is_item_added);
}
}
diff --git a/indra/newview/llinventoryitemslist.h b/indra/newview/llinventoryitemslist.h
index b183a2052d..1aa230df99 100755
--- a/indra/newview/llinventoryitemslist.h
+++ b/indra/newview/llinventoryitemslist.h
@@ -29,8 +29,6 @@
#ifndef LL_LLINVENTORYITEMSLIST_H
#define LL_LLINVENTORYITEMSLIST_H
-#include "lldarray.h"
-
// newview
#include "llflatlistview.h"
@@ -46,7 +44,7 @@ public:
virtual ~LLInventoryItemsList();
- void refreshList(const LLDynamicArray<LLPointer<LLViewerInventoryItem> > item_array);
+ void refreshList(const std::vector<LLPointer<LLViewerInventoryItem> > item_array);
boost::signals2::connection setRefreshCompleteCallback(const commit_signal_t::slot_type& cb);
diff --git a/indra/newview/llinventorymodel.cpp b/indra/newview/llinventorymodel.cpp
index 935fe2b4d0..61accb01f1 100755
--- a/indra/newview/llinventorymodel.cpp
+++ b/indra/newview/llinventorymodel.cpp
@@ -112,7 +112,7 @@ bool LLCanCache::operator()(LLInventoryCategory* cat, LLInventoryItem* item)
S32 descendents_actual = 0;
if(cats && items)
{
- descendents_actual = cats->count() + items->count();
+ descendents_actual = cats->size() + items->size();
}
if(descendents_server == descendents_actual)
{
@@ -389,12 +389,12 @@ const LLUUID LLInventoryModel::findCategoryUUIDForType(LLFolderType::EType prefe
cats = get_ptr_in_map(mParentChildCategoryTree, root_id);
if(cats)
{
- S32 count = cats->count();
+ S32 count = cats->size();
for(S32 i = 0; i < count; ++i)
{
- if(cats->get(i)->getPreferredType() == preferred_type)
+ if(cats->at(i)->getPreferredType() == preferred_type)
{
- rv = cats->get(i)->getUUID();
+ rv = cats->at(i)->getUUID();
break;
}
}
@@ -426,12 +426,12 @@ const LLUUID LLInventoryModel::findLibraryCategoryUUIDForType(LLFolderType::ETyp
cats = get_ptr_in_map(mParentChildCategoryTree, root_id);
if(cats)
{
- S32 count = cats->count();
+ S32 count = cats->size();
for(S32 i = 0; i < count; ++i)
{
- if(cats->get(i)->getPreferredType() == preferred_type)
+ if(cats->at(i)->getPreferredType() == preferred_type)
{
- rv = cats->get(i)->getUUID();
+ rv = cats->at(i)->getUUID();
break;
}
}
@@ -513,13 +513,13 @@ LLUUID LLInventoryModel::createNewCategory(const LLUUID& parent_id,
LLUUID id;
if(!isInventoryUsable())
{
- llwarns << "Inventory is broken." << llendl;
+ LL_WARNS() << "Inventory is broken." << LL_ENDL;
return id;
}
if(LLFolderType::lookup(preferred_type) == LLFolderType::badLookup())
{
- lldebugs << "Attempt to create undefined category." << llendl;
+ LL_DEBUGS() << "Attempt to create undefined category." << LL_ENDL;
return id;
}
@@ -631,13 +631,13 @@ void LLInventoryModel::collectDescendentsIf(const LLUUID& id,
cat_array_t* cat_array = get_ptr_in_map(mParentChildCategoryTree, id);
if(cat_array)
{
- S32 count = cat_array->count();
+ S32 count = cat_array->size();
for(S32 i = 0; i < count; ++i)
{
- LLViewerInventoryCategory* cat = cat_array->get(i);
+ LLViewerInventoryCategory* cat = cat_array->at(i);
if(add(cat,NULL))
{
- cats.put(cat);
+ cats.push_back(cat);
}
collectDescendentsIf(cat->getUUID(), cats, items, include_trash, add);
}
@@ -651,10 +651,10 @@ void LLInventoryModel::collectDescendentsIf(const LLUUID& id,
// Note: if making it fully recursive, need more checking against infinite loops.
if (follow_folder_links && item_array)
{
- S32 count = item_array->count();
+ S32 count = item_array->size();
for(S32 i = 0; i < count; ++i)
{
- item = item_array->get(i);
+ item = item_array->at(i);
if (item && item->getActualType() == LLAssetType::AT_LINK_FOLDER)
{
LLViewerInventoryCategory *linked_cat = item->getLinkedCategory();
@@ -668,7 +668,7 @@ void LLInventoryModel::collectDescendentsIf(const LLUUID& id,
// BAP should this be added here? May not
// matter if it's only being used in current
// outfit traversal.
- cats.put(LLPointer<LLViewerInventoryCategory>(linked_cat));
+ cats.push_back(LLPointer<LLViewerInventoryCategory>(linked_cat));
}
collectDescendentsIf(linked_cat->getUUID(), cats, items, include_trash, add, FALSE);
}
@@ -679,13 +679,13 @@ void LLInventoryModel::collectDescendentsIf(const LLUUID& id,
// Move onto items
if(item_array)
{
- S32 count = item_array->count();
+ S32 count = item_array->size();
for(S32 i = 0; i < count; ++i)
{
- item = item_array->get(i);
+ item = item_array->at(i);
if(add(NULL, item))
{
- items.put(item);
+ items.push_back(item);
}
}
}
@@ -781,7 +781,7 @@ U32 LLInventoryModel::updateItem(const LLViewerInventoryItem* item)
if(!isInventoryUsable())
{
- llwarns << "Inventory is broken." << llendl;
+ LL_WARNS() << "Inventory is broken." << LL_ENDL;
return mask;
}
@@ -793,7 +793,7 @@ U32 LLInventoryModel::updateItem(const LLViewerInventoryItem* item)
}
#endif
- LLViewerInventoryItem* old_item = getItem(item->getUUID());
+ LLPointer<LLViewerInventoryItem> old_item = getItem(item->getUUID());
LLPointer<LLViewerInventoryItem> new_item;
if(old_item)
{
@@ -809,12 +809,12 @@ U32 LLInventoryModel::updateItem(const LLViewerInventoryItem* item)
item_array = get_ptr_in_map(mParentChildItemTree, old_parent_id);
if(item_array)
{
- item_array->removeObj(old_item);
+ vector_replace_with_last(*item_array, old_item);
}
item_array = get_ptr_in_map(mParentChildItemTree, new_parent_id);
if(item_array)
{
- item_array->put(old_item);
+ item_array->push_back(old_item);
}
mask |= LLInventoryObserver::STRUCTURE;
}
@@ -840,11 +840,11 @@ U32 LLInventoryModel::updateItem(const LLViewerInventoryItem* item)
{
// *FIX: bit of a hack to call update server from here...
new_item->updateServer(TRUE);
- item_array->put(new_item);
+ item_array->push_back(new_item);
}
else
{
- llwarns << "Couldn't find parent-child item tree for " << new_item->getName() << llendl;
+ LL_WARNS() << "Couldn't find parent-child item tree for " << new_item->getName() << LL_ENDL;
}
}
else
@@ -868,13 +868,13 @@ U32 LLInventoryModel::updateItem(const LLViewerInventoryItem* item)
item_array_t* item_array = get_ptr_in_map(mParentChildItemTree, parent_id);
if(item_array)
{
- item_array->put(new_item);
+ item_array->push_back(new_item);
}
else
{
// Whoops! No such parent, make one.
- llinfos << "Lost item: " << new_item->getUUID() << " - "
- << new_item->getName() << llendl;
+ LL_INFOS() << "Lost item: " << new_item->getUUID() << " - "
+ << new_item->getName() << LL_ENDL;
parent_id = findCategoryUUIDForType(LLFolderType::FT_LOST_AND_FOUND);
new_item->setParent(parent_id);
item_array = get_ptr_in_map(mParentChildItemTree, parent_id);
@@ -883,11 +883,11 @@ U32 LLInventoryModel::updateItem(const LLViewerInventoryItem* item)
// *FIX: bit of a hack to call update server from
// here...
new_item->updateServer(TRUE);
- item_array->put(new_item);
+ item_array->push_back(new_item);
}
else
{
- llwarns << "Lost and found Not there!!" << llendl;
+ LL_WARNS() << "Lost and found Not there!!" << LL_ENDL;
}
}
}
@@ -961,11 +961,11 @@ void LLInventoryModel::updateCategory(const LLViewerInventoryCategory* cat)
if(!isInventoryUsable())
{
- llwarns << "Inventory is broken." << llendl;
+ LL_WARNS() << "Inventory is broken." << LL_ENDL;
return;
}
- LLViewerInventoryCategory* old_cat = getCategory(cat->getUUID());
+ LLPointer<LLViewerInventoryCategory> old_cat = getCategory(cat->getUUID());
if(old_cat)
{
// We already have an old category, modify it's values
@@ -979,12 +979,12 @@ void LLInventoryModel::updateCategory(const LLViewerInventoryCategory* cat)
cat_array = getUnlockedCatArray(old_parent_id);
if(cat_array)
{
- cat_array->removeObj(old_cat);
+ vector_replace_with_last(*cat_array, old_cat);
}
cat_array = getUnlockedCatArray(new_parent_id);
if(cat_array)
{
- cat_array->put(old_cat);
+ cat_array->push_back(old_cat);
}
mask |= LLInventoryObserver::STRUCTURE;
mask |= LLInventoryObserver::INTERNAL;
@@ -1008,7 +1008,7 @@ void LLInventoryModel::updateCategory(const LLViewerInventoryCategory* cat)
cat_array = getUnlockedCatArray(cat->getParentUUID());
if(cat_array)
{
- cat_array->put(new_cat);
+ cat_array->push_back(new_cat);
}
// make space in the tree for this category's children.
@@ -1024,40 +1024,40 @@ void LLInventoryModel::updateCategory(const LLViewerInventoryCategory* cat)
void LLInventoryModel::moveObject(const LLUUID& object_id, const LLUUID& cat_id)
{
- lldebugs << "LLInventoryModel::moveObject()" << llendl;
+ LL_DEBUGS() << "LLInventoryModel::moveObject()" << LL_ENDL;
if(!isInventoryUsable())
{
- llwarns << "Inventory is broken." << llendl;
+ LL_WARNS() << "Inventory is broken." << LL_ENDL;
return;
}
if((object_id == cat_id) || !is_in_map(mCategoryMap, cat_id))
{
- llwarns << "Could not move inventory object " << object_id << " to "
- << cat_id << llendl;
+ LL_WARNS() << "Could not move inventory object " << object_id << " to "
+ << cat_id << LL_ENDL;
return;
}
- LLViewerInventoryCategory* cat = getCategory(object_id);
+ LLPointer<LLViewerInventoryCategory> cat = getCategory(object_id);
if(cat && (cat->getParentUUID() != cat_id))
{
cat_array_t* cat_array;
cat_array = getUnlockedCatArray(cat->getParentUUID());
- if(cat_array) cat_array->removeObj(cat);
+ if(cat_array) vector_replace_with_last(*cat_array, cat);
cat_array = getUnlockedCatArray(cat_id);
cat->setParent(cat_id);
- if(cat_array) cat_array->put(cat);
+ if(cat_array) cat_array->push_back(cat);
addChangedMask(LLInventoryObserver::STRUCTURE, object_id);
return;
}
- LLViewerInventoryItem* item = getItem(object_id);
+ LLPointer<LLViewerInventoryItem> item = getItem(object_id);
if(item && (item->getParentUUID() != cat_id))
{
item_array_t* item_array;
item_array = getUnlockedItemArray(item->getParentUUID());
- if(item_array) item_array->removeObj(item);
+ if(item_array) vector_replace_with_last(*item_array, item);
item_array = getUnlockedItemArray(cat_id);
item->setParent(cat_id);
- if(item_array) item_array->put(item);
+ if(item_array) item_array->push_back(item);
addChangedMask(LLInventoryObserver::STRUCTURE, object_id);
return;
}
@@ -1126,15 +1126,15 @@ void LLInventoryModel::changeCategoryParent(LLViewerInventoryCategory* cat,
// Delete a particular inventory object by ID.
void LLInventoryModel::deleteObject(const LLUUID& id)
{
- lldebugs << "LLInventoryModel::deleteObject()" << llendl;
+ LL_DEBUGS() << "LLInventoryModel::deleteObject()" << LL_ENDL;
LLPointer<LLInventoryObject> obj = getObject(id);
if (!obj)
{
- llwarns << "Deleting non-existent object [ id: " << id << " ] " << llendl;
+ LL_WARNS() << "Deleting non-existent object [ id: " << id << " ] " << LL_ENDL;
return;
}
- lldebugs << "Deleting inventory object " << id << llendl;
+ LL_DEBUGS() << "Deleting inventory object " << id << LL_ENDL;
mLastItem = NULL;
LLUUID parent_id = obj->getParentUUID();
mCategoryMap.erase(id);
@@ -1143,14 +1143,14 @@ void LLInventoryModel::deleteObject(const LLUUID& id)
item_array_t* item_list = getUnlockedItemArray(parent_id);
if(item_list)
{
- LLViewerInventoryItem* item = (LLViewerInventoryItem*)((LLInventoryObject*)obj);
- item_list->removeObj(item);
+ LLPointer<LLViewerInventoryItem> item = (LLViewerInventoryItem*)((LLInventoryObject*)obj);
+ vector_replace_with_last(*item_list, item);
}
cat_array_t* cat_list = getUnlockedCatArray(parent_id);
if(cat_list)
{
- LLViewerInventoryCategory* cat = (LLViewerInventoryCategory*)((LLInventoryObject*)obj);
- cat_list->removeObj(cat);
+ LLPointer<LLViewerInventoryCategory> cat = (LLViewerInventoryCategory*)((LLInventoryObject*)obj);
+ vector_replace_with_last(*cat_list, cat);
}
item_list = getUnlockedItemArray(id);
if(item_list)
@@ -1173,7 +1173,7 @@ void LLInventoryModel::deleteObject(const LLUUID& id)
// Delete a particular inventory item by ID, and remove it from the server.
void LLInventoryModel::purgeObject(const LLUUID &id)
{
- lldebugs << "LLInventoryModel::purgeObject() [ id: " << id << " ] " << llendl;
+ LL_DEBUGS() << "LLInventoryModel::purgeObject() [ id: " << id << " ] " << LL_ENDL;
LLPointer<LLInventoryObject> obj = getObject(id);
if(obj)
{
@@ -1212,7 +1212,7 @@ void LLInventoryModel::purgeDescendentsOf(const LLUUID& id)
EHasChildren children = categoryHasChildren(id);
if(children == CHILDREN_NO)
{
- llinfos << "Not purging descendents of " << id << llendl;
+ LL_INFOS() << "Not purging descendents of " << id << LL_ENDL;
return;
}
LLPointer<LLViewerInventoryCategory> cat = getCategory(id);
@@ -1221,8 +1221,8 @@ void LLInventoryModel::purgeDescendentsOf(const LLUUID& id)
if (LLClipboard::instance().hasContents() && LLClipboard::instance().isCutMode())
{
// Something on the clipboard is in "cut mode" and needs to be preserved
- llinfos << "LLInventoryModel::purgeDescendentsOf " << cat->getName()
- << " iterate and purge non hidden items" << llendl;
+ LL_INFOS() << "LLInventoryModel::purgeDescendentsOf " << cat->getName()
+ << " iterate and purge non hidden items" << LL_ENDL;
cat_array_t* categories;
item_array_t* items;
// Get the list of direct descendants in tha categoy passed as argument
@@ -1251,8 +1251,8 @@ void LLInventoryModel::purgeDescendentsOf(const LLUUID& id)
{
// Fast purge
// do the cache accounting
- llinfos << "LLInventoryModel::purgeDescendentsOf " << cat->getName()
- << llendl;
+ LL_INFOS() << "LLInventoryModel::purgeDescendentsOf " << cat->getName()
+ << LL_ENDL;
S32 descendents = cat->getDescendentCount();
if(descendents > 0)
{
@@ -1282,7 +1282,7 @@ void LLInventoryModel::purgeDescendentsOf(const LLUUID& id)
categories,
items,
INCLUDE_TRASH);
- S32 count = items.count();
+ S32 count = items.size();
item_map_t::iterator item_map_end = mItemMap.end();
cat_map_t::iterator cat_map_end = mCategoryMap.end();
@@ -1290,7 +1290,7 @@ void LLInventoryModel::purgeDescendentsOf(const LLUUID& id)
for(S32 i = 0; i < count; ++i)
{
- uu_id = items.get(i)->getUUID();
+ uu_id = items.at(i)->getUUID();
// This check prevents the deletion of a previously deleted item.
// This is necessary because deletion is not done in a hierarchical
@@ -1302,10 +1302,10 @@ void LLInventoryModel::purgeDescendentsOf(const LLUUID& id)
}
}
- count = categories.count();
+ count = categories.size();
for(S32 i = 0; i < count; ++i)
{
- uu_id = categories.get(i)->getUUID();
+ uu_id = categories.at(i)->getUUID();
if (mCategoryMap.find(uu_id) != cat_map_end)
{
deleteObject(uu_id);
@@ -1349,7 +1349,7 @@ void LLInventoryModel::notifyObservers()
// Within notifyObservers, something called notifyObservers
// again. This type of recursion is unsafe because it causes items to be
// processed twice, and this can easily lead to infinite loops.
- llwarns << "Call was made to notifyObservers within notifyObservers!" << llendl;
+ LL_WARNS() << "Call was made to notifyObservers within notifyObservers!" << LL_ENDL;
return;
}
@@ -1378,7 +1378,7 @@ void LLInventoryModel::addChangedMask(U32 mask, const LLUUID& referent)
// Something marked an item for change within a call to notifyObservers
// (which is in the process of processing the list of items marked for change).
// This means the change may fail to be processed.
- llwarns << "Adding changed mask within notify observers! Change will likely be lost." << llendl;
+ LL_WARNS() << "Adding changed mask within notify observers! Change will likely be lost." << LL_ENDL;
}
mModifyMask |= mask;
@@ -1404,8 +1404,8 @@ void LLInventoryModel::fetchInventoryResponder::result(const LLSD& content)
agent_id = content["agent_id"].asUUID();
if(agent_id != gAgent.getID())
{
- llwarns << "Got a inventory update for the wrong agent: " << agent_id
- << llendl;
+ LL_WARNS() << "Got a inventory update for the wrong agent: " << agent_id
+ << LL_ENDL;
return;
}*/
item_array_t items;
@@ -1418,8 +1418,8 @@ void LLInventoryModel::fetchInventoryResponder::result(const LLSD& content)
LLPointer<LLViewerInventoryItem> titem = new LLViewerInventoryItem;
titem->unpackMessage(content["items"][i]);
- lldebugs << "LLInventoryModel::messageUpdateCore() item id:"
- << titem->getUUID() << llendl;
+ LL_DEBUGS() << "LLInventoryModel::messageUpdateCore() item id:"
+ << titem->getUUID() << LL_ENDL;
items.push_back(titem);
// examine update for changes.
LLViewerInventoryItem* itemp = gInventory.getItem(titem->getUUID());
@@ -1458,7 +1458,7 @@ void LLInventoryModel::fetchInventoryResponder::result(const LLSD& content)
//If we get back an error (not found, etc...), handle it here
void LLInventoryModel::fetchInventoryResponder::errorWithContent(U32 status, const std::string& reason, const LLSD& content)
{
- llwarns << "fetchInventory error [status:" << status << "]: " << content << llendl;
+ LL_WARNS() << "fetchInventory error [status:" << status << "]: " << content << LL_ENDL;
gInventory.notifyObservers();
}
@@ -1466,14 +1466,14 @@ bool LLInventoryModel::fetchDescendentsOf(const LLUUID& folder_id) const
{
if(folder_id.isNull())
{
- llwarns << "Calling fetch descendents on NULL folder id!" << llendl;
+ LL_WARNS() << "Calling fetch descendents on NULL folder id!" << LL_ENDL;
return false;
}
LLViewerInventoryCategory* cat = getCategory(folder_id);
if(!cat)
{
- llwarns << "Asked to fetch descendents of non-existent folder: "
- << folder_id << llendl;
+ LL_WARNS() << "Asked to fetch descendents of non-existent folder: "
+ << folder_id << LL_ENDL;
return false;
}
//S32 known_descendents = 0;
@@ -1481,11 +1481,11 @@ bool LLInventoryModel::fetchDescendentsOf(const LLUUID& folder_id) const
//item_array_t* items = get_ptr_in_map(mParentChildItemTree, folder_id);
//if(categories)
//{
- // known_descendents += categories->count();
+ // known_descendents += categories->size();
//}
//if(items)
//{
- // known_descendents += items->count();
+ // known_descendents += items->size();
//}
return cat->fetch();
}
@@ -1494,12 +1494,12 @@ void LLInventoryModel::cache(
const LLUUID& parent_folder_id,
const LLUUID& agent_id)
{
- lldebugs << "Caching " << parent_folder_id << " for " << agent_id
- << llendl;
+ LL_DEBUGS() << "Caching " << parent_folder_id << " for " << agent_id
+ << LL_ENDL;
LLViewerInventoryCategory* root_cat = getCategory(parent_folder_id);
if(!root_cat) return;
cat_array_t categories;
- categories.put(root_cat);
+ categories.push_back(root_cat);
item_array_t items;
LLCanCache can_cache(this);
@@ -1520,19 +1520,19 @@ void LLInventoryModel::cache(
gzip_filename.append(".gz");
if(gzip_file(inventory_filename, gzip_filename))
{
- lldebugs << "Successfully compressed " << inventory_filename << llendl;
+ LL_DEBUGS() << "Successfully compressed " << inventory_filename << LL_ENDL;
LLFile::remove(inventory_filename);
}
else
{
- llwarns << "Unable to compress " << inventory_filename << llendl;
+ LL_WARNS() << "Unable to compress " << inventory_filename << LL_ENDL;
}
}
void LLInventoryModel::addCategory(LLViewerInventoryCategory* category)
{
- //llinfos << "LLInventoryModel::addCategory()" << llendl;
+ //LL_INFOS() << "LLInventoryModel::addCategory()" << LL_ENDL;
if(category)
{
// We aren't displaying the Meshes folder
@@ -1561,7 +1561,7 @@ void LLInventoryModel::addItem(LLViewerInventoryItem* item)
if ((item->getType() == LLAssetType::AT_NONE)
|| LLAssetType::lookup(item->getType()) == LLAssetType::badLookup())
{
- llwarns << "Got bad asset type for item [ name: " << item->getName() << " type: " << item->getType() << " inv-type: " << item->getInventoryType() << " ], ignoring." << llendl;
+ LL_WARNS() << "Got bad asset type for item [ name: " << item->getName() << " type: " << item->getType() << " inv-type: " << item->getInventoryType() << " ], ignoring." << LL_ENDL;
return;
}
@@ -1569,7 +1569,7 @@ void LLInventoryModel::addItem(LLViewerInventoryItem* item)
// The item will show up as a broken link.
if (item->getIsBrokenLink())
{
- llinfos << "Adding broken link [ name: " << item->getName() << " itemID: " << item->getUUID() << " assetID: " << item->getAssetUUID() << " ) parent: " << item->getParentUUID() << llendl;
+ LL_INFOS() << "Adding broken link [ name: " << item->getName() << " itemID: " << item->getUUID() << " assetID: " << item->getAssetUUID() << " ) parent: " << item->getParentUUID() << LL_ENDL;
}
mItemMap[item->getUUID()] = item;
@@ -1579,7 +1579,7 @@ void LLInventoryModel::addItem(LLViewerInventoryItem* item)
// Empty the entire contents
void LLInventoryModel::empty()
{
-// llinfos << "LLInventoryModel::empty()" << llendl;
+// LL_INFOS() << "LLInventoryModel::empty()" << LL_ENDL;
std::for_each(
mParentChildCategoryTree.begin(),
mParentChildCategoryTree.end(),
@@ -1612,7 +1612,7 @@ void LLInventoryModel::accountForUpdate(const LLCategoryUpdate& update) const
S32 descendents_actual = 0;
if(cats && items)
{
- descendents_actual = cats->count() + items->count();
+ descendents_actual = cats->size() + items->size();
}
if(descendents_server == descendents_actual)
{
@@ -1620,9 +1620,9 @@ void LLInventoryModel::accountForUpdate(const LLCategoryUpdate& update) const
descendents_actual += update.mDescendentDelta;
cat->setDescendentCount(descendents_actual);
cat->setVersion(++version);
- lldebugs << "accounted: '" << cat->getName() << "' "
+ LL_DEBUGS() << "accounted: '" << cat->getName() << "' "
<< version << " with " << descendents_actual
- << " descendents." << llendl;
+ << " descendents." << LL_ENDL;
}
}
if(!accounted)
@@ -1630,13 +1630,13 @@ void LLInventoryModel::accountForUpdate(const LLCategoryUpdate& update) const
// Error condition, this means that the category did not register that
// it got new descendents (perhaps because it is still being loaded)
// which means its descendent count will be wrong.
- llwarns << "Accounting failed for '" << cat->getName() << "' version:"
- << version << llendl;
+ LL_WARNS() << "Accounting failed for '" << cat->getName() << "' version:"
+ << version << LL_ENDL;
}
}
else
{
- llwarns << "No category found for update " << update.mCategoryID << llendl;
+ LL_WARNS() << "No category found for update " << update.mCategoryID << LL_ENDL;
}
}
@@ -1676,18 +1676,18 @@ void LLInventoryModel::incrementCategoryVersion(const LLUUID& category_id)
if(LLViewerInventoryCategory::VERSION_UNKNOWN != version)
{
cat->setVersion(version + 1);
- llinfos << "IncrementVersion: " << cat->getName() << " "
- << cat->getVersion() << llendl;
+ LL_INFOS() << "IncrementVersion: " << cat->getName() << " "
+ << cat->getVersion() << LL_ENDL;
}
else
{
- llinfos << "Attempt to increment version when unknown: "
- << category_id << llendl;
+ LL_INFOS() << "Attempt to increment version when unknown: "
+ << category_id << LL_ENDL;
}
}
else
{
- llinfos << "Attempt to increment category: " << category_id << llendl;
+ LL_INFOS() << "Attempt to increment category: " << category_id << LL_ENDL;
}
}
void LLInventoryModel::incrementCategorySetVersion(
@@ -1727,12 +1727,12 @@ LLInventoryModel::EHasChildren LLInventoryModel::categoryHasChildren(
// Shouldn't have to run this, but who knows.
parent_cat_map_t::const_iterator cat_it = mParentChildCategoryTree.find(cat->getUUID());
- if (cat_it != mParentChildCategoryTree.end() && cat_it->second->count() > 0)
+ if (cat_it != mParentChildCategoryTree.end() && cat_it->second->size() > 0)
{
return CHILDREN_YES;
}
parent_item_map_t::const_iterator item_it = mParentChildItemTree.find(cat->getUUID());
- if (item_it != mParentChildItemTree.end() && item_it->second->count() > 0)
+ if (item_it != mParentChildItemTree.end() && item_it->second->size() > 0)
{
return CHILDREN_YES;
}
@@ -1752,7 +1752,7 @@ bool LLInventoryModel::isCategoryComplete(const LLUUID& cat_id) const
S32 descendents_actual = 0;
if(cats && items)
{
- descendents_actual = cats->count() + items->count();
+ descendents_actual = cats->size() + items->size();
}
if(descendents_server == descendents_actual)
{
@@ -1766,7 +1766,7 @@ bool LLInventoryModel::loadSkeleton(
const LLSD& options,
const LLUUID& owner_id)
{
- lldebugs << "importing inventory skeleton for " << owner_id << llendl;
+ LL_DEBUGS() << "importing inventory skeleton for " << owner_id << LL_ENDL;
typedef std::set<LLPointer<LLViewerInventoryCategory>, InventoryIDPtrLess> cat_set_t;
cat_set_t temp_cats;
@@ -1803,7 +1803,7 @@ bool LLInventoryModel::loadSkeleton(
}
else
{
- llwarns << "Unable to import near " << name.asString() << llendl;
+ LL_WARNS() << "Unable to import near " << name.asString() << LL_ENDL;
rv = false;
}
}
@@ -1840,7 +1840,7 @@ bool LLInventoryModel::loadSkeleton(
}
else
{
- llinfos << "Unable to gunzip " << gzip_filename << llendl;
+ LL_INFOS() << "Unable to gunzip " << gzip_filename << LL_ENDL;
}
}
bool is_cache_obsolete = false;
@@ -1850,7 +1850,7 @@ bool LLInventoryModel::loadSkeleton(
// found to generate a set of categories we should add. We
// will go through each category loaded and if the version
// does not match, invalidate the version.
- S32 count = categories.count();
+ S32 count = categories.size();
cat_set_t::iterator not_cached = temp_cats.end();
std::set<LLUUID> cached_ids;
for(S32 i = 0; i < count; ++i)
@@ -1921,10 +1921,10 @@ bool LLInventoryModel::loadSkeleton(
if (item->getIsBrokenLink())
{
//bad_link_count++;
- lldebugs << "Attempted to add cached link item without baseobj present ( name: "
+ LL_DEBUGS() << "Attempted to add cached link item without baseobj present ( name: "
<< item->getName() << " itemID: " << item->getUUID()
<< " assetID: " << item->getAssetUUID()
- << " ). Ignoring and invalidating " << cat->getName() << " . " << llendl;
+ << " ). Ignoring and invalidating " << cat->getName() << " . " << LL_ENDL;
possible_broken_links.push_back(item);
continue;
}
@@ -1951,7 +1951,7 @@ bool LLInventoryModel::loadSkeleton(
{
bad_link_count++;
invalid_categories.insert(cit->second);
- //llinfos << "link still broken: " << item->getName() << " in folder " << cat->getName() << llendl;
+ //LL_INFOS() << "link still broken: " << item->getName() << " in folder " << cat->getName() << LL_ENDL;
}
else
{
@@ -1963,11 +1963,11 @@ bool LLInventoryModel::loadSkeleton(
}
}
- llinfos << "Attempted to add " << bad_link_count
+ LL_INFOS() << "Attempted to add " << bad_link_count
<< " cached link items without baseobj present. "
<< good_link_count << " link items were successfully added. "
<< recovered_link_count << " links added in recovery. "
- << "The corresponding categories were invalidated." << llendl;
+ << "The corresponding categories were invalidated." << LL_ENDL;
}
}
@@ -1991,9 +1991,9 @@ bool LLInventoryModel::loadSkeleton(
{
LLViewerInventoryCategory* cat = (*invalid_cat_it).get();
cat->setVersion(NO_VERSION);
- LL_DEBUGS("Inventory") << "Invalidating category name: " << cat->getName() << " UUID: " << cat->getUUID() << " due to invalid descendents cache" << llendl;
+ LL_DEBUGS("Inventory") << "Invalidating category name: " << cat->getName() << " UUID: " << cat->getUUID() << " due to invalid descendents cache" << LL_ENDL;
}
- LL_INFOS("Inventory") << "Invalidated " << invalid_categories.size() << " categories due to invalid descendents cache" << llendl;
+ LL_INFOS("Inventory") << "Invalidated " << invalid_categories.size() << " categories due to invalid descendents cache" << LL_ENDL;
// At this point, we need to set the known descendents for each
// category which successfully cached so that we do not
@@ -2025,15 +2025,15 @@ bool LLInventoryModel::loadSkeleton(
if(is_cache_obsolete)
{
// If out of date, remove the gzipped file too.
- llwarns << "Inv cache out of date, removing" << llendl;
+ LL_WARNS() << "Inv cache out of date, removing" << LL_ENDL;
LLFile::remove(gzip_filename);
}
categories.clear(); // will unref and delete entries
}
- llinfos << "Successfully loaded " << cached_category_count
+ LL_INFOS() << "Successfully loaded " << cached_category_count
<< " categories and " << cached_item_count << " items from cache."
- << llendl;
+ << LL_ENDL;
return rv;
}
@@ -2043,7 +2043,7 @@ bool LLInventoryModel::loadSkeleton(
// should be sufficient for our needs.
void LLInventoryModel::buildParentChildMap()
{
- llinfos << "LLInventoryModel::buildParentChildMap()" << llendl;
+ LL_INFOS() << "LLInventoryModel::buildParentChildMap()" << LL_ENDL;
// *NOTE: I am skipping the logic around folder version
// synchronization here because it seems if a folder is lost, we
@@ -2060,7 +2060,7 @@ void LLInventoryModel::buildParentChildMap()
for(cat_map_t::iterator cit = mCategoryMap.begin(); cit != mCategoryMap.end(); ++cit)
{
LLViewerInventoryCategory* cat = cit->second;
- cats.put(cat);
+ cats.push_back(cat);
if (mParentChildCategoryTree.count(cat->getUUID()) == 0)
{
llassert_always(mCategoryLock[cat->getUUID()] == false);
@@ -2088,16 +2088,16 @@ void LLInventoryModel::buildParentChildMap()
// Now we have a structure with all of the categories that we can
// iterate over and insert into the correct place in the child
// category tree.
- S32 count = cats.count();
+ S32 count = cats.size();
S32 i;
S32 lost = 0;
for(i = 0; i < count; ++i)
{
- LLViewerInventoryCategory* cat = cats.get(i);
+ LLViewerInventoryCategory* cat = cats.at(i);
catsp = getUnlockedCatArray(cat->getParentUUID());
if(catsp)
{
- catsp->put(cat);
+ catsp->push_back(cat);
}
else
{
@@ -2107,8 +2107,8 @@ void LLInventoryModel::buildParentChildMap()
// implement it, we would need a set or map of uuid pairs
// which would be (folder_id, new_parent_id) to be sent up
// to the server.
- llinfos << "Lost categroy: " << cat->getUUID() << " - "
- << cat->getName() << llendl;
+ LL_INFOS() << "Lost categroy: " << cat->getUUID() << " - "
+ << cat->getName() << LL_ENDL;
++lost;
// plop it into the lost & found.
LLFolderType::EType pref = cat->getPreferredType();
@@ -2130,17 +2130,17 @@ void LLInventoryModel::buildParentChildMap()
catsp = getUnlockedCatArray(cat->getParentUUID());
if(catsp)
{
- catsp->put(cat);
+ catsp->push_back(cat);
}
else
{
- llwarns << "Lost and found Not there!!" << llendl;
+ LL_WARNS() << "Lost and found Not there!!" << LL_ENDL;
}
}
}
if(lost)
{
- llwarns << "Found " << lost << " lost categories." << llendl;
+ LL_WARNS() << "Found " << lost << " lost categories." << LL_ENDL;
}
const BOOL COF_exists = (findCategoryUUIDForType(LLFolderType::FT_CURRENT_OUTFIT, FALSE) != LLUUID::null);
@@ -2157,25 +2157,25 @@ void LLInventoryModel::buildParentChildMap()
for(item_map_t::iterator iit = mItemMap.begin(); iit != mItemMap.end(); ++iit)
{
item = (*iit).second;
- items.put(item);
+ items.push_back(item);
}
}
- count = items.count();
+ count = items.size();
lost = 0;
uuid_vec_t lost_item_ids;
for(i = 0; i < count; ++i)
{
LLPointer<LLViewerInventoryItem> item;
- item = items.get(i);
+ item = items.at(i);
itemsp = getUnlockedItemArray(item->getParentUUID());
if(itemsp)
{
- itemsp->put(item);
+ itemsp->push_back(item);
}
else
{
- llinfos << "Lost item: " << item->getUUID() << " - "
- << item->getName() << llendl;
+ LL_INFOS() << "Lost item: " << item->getUUID() << " - "
+ << item->getName() << LL_ENDL;
++lost;
// plop it into the lost & found.
//
@@ -2187,17 +2187,17 @@ void LLInventoryModel::buildParentChildMap()
itemsp = getUnlockedItemArray(item->getParentUUID());
if(itemsp)
{
- itemsp->put(item);
+ itemsp->push_back(item);
}
else
{
- llwarns << "Lost and found Not there!!" << llendl;
+ LL_WARNS() << "Lost and found Not there!!" << LL_ENDL;
}
}
}
if(lost)
{
- llwarns << "Found " << lost << " lost items." << llendl;
+ LL_WARNS() << "Found " << lost << " lost items." << LL_ENDL;
LLMessageSystem* msg = gMessageSystem;
BOOL start_new_message = TRUE;
const LLUUID lnf = findCategoryUUIDForType(LLFolderType::FT_LOST_AND_FOUND);
@@ -2266,7 +2266,7 @@ void LLInventoryModel::buildParentChildMap()
// The inv tree is built.
mIsAgentInvUsable = true;
- llinfos << "Inventory initialized, notifying observers" << llendl;
+ LL_INFOS() << "Inventory initialized, notifying observers" << LL_ENDL;
addChangedMask(LLInventoryObserver::ALL, LLUUID::null);
notifyObservers();
}
@@ -2313,14 +2313,14 @@ bool LLInventoryModel::loadFromFile(const std::string& filename,
{
if(filename.empty())
{
- llerrs << "Filename is Null!" << llendl;
+ LL_ERRS() << "Filename is Null!" << LL_ENDL;
return false;
}
- llinfos << "LLInventoryModel::loadFromFile(" << filename << ")" << llendl;
+ LL_INFOS() << "LLInventoryModel::loadFromFile(" << filename << ")" << LL_ENDL;
LLFILE* file = LLFile::fopen(filename, "rb"); /*Flawfinder: ignore*/
if(!file)
{
- llinfos << "unable to load inventory from: " << filename << llendl;
+ LL_INFOS() << "unable to load inventory from: " << filename << LL_ENDL;
return false;
}
// *NOTE: This buffer size is hard coded into scanf() below.
@@ -2355,11 +2355,11 @@ bool LLInventoryModel::loadFromFile(const std::string& filename,
LLPointer<LLViewerInventoryCategory> inv_cat = new LLViewerInventoryCategory(LLUUID::null);
if(inv_cat->importFileLocal(file))
{
- categories.put(inv_cat);
+ categories.push_back(inv_cat);
}
else
{
- llwarns << "loadInventoryFromFile(). Ignoring invalid inventory category: " << inv_cat->getName() << llendl;
+ LL_WARNS() << "loadInventoryFromFile(). Ignoring invalid inventory category: " << inv_cat->getName() << LL_ENDL;
//delete inv_cat; // automatic when inv_cat is reassigned or destroyed
}
}
@@ -2377,25 +2377,25 @@ bool LLInventoryModel::loadFromFile(const std::string& filename,
if(inv_item->getUUID().isNull())
{
//delete inv_item; // automatic when inv_cat is reassigned or destroyed
- llwarns << "Ignoring inventory with null item id: "
- << inv_item->getName() << llendl;
+ LL_WARNS() << "Ignoring inventory with null item id: "
+ << inv_item->getName() << LL_ENDL;
}
else
{
- items.put(inv_item);
+ items.push_back(inv_item);
}
}
else
{
- llwarns << "loadInventoryFromFile(). Ignoring invalid inventory item: " << inv_item->getName() << llendl;
+ LL_WARNS() << "loadInventoryFromFile(). Ignoring invalid inventory item: " << inv_item->getName() << LL_ENDL;
//delete inv_item; // automatic when inv_cat is reassigned or destroyed
}
}
else
{
- llwarns << "Unknown token in inventory file '" << keyword << "'"
- << llendl;
+ LL_WARNS() << "Unknown token in inventory file '" << keyword << "'"
+ << LL_ENDL;
}
}
fclose(file);
@@ -2411,19 +2411,19 @@ bool LLInventoryModel::saveToFile(const std::string& filename,
{
if(filename.empty())
{
- llerrs << "Filename is Null!" << llendl;
+ LL_ERRS() << "Filename is Null!" << LL_ENDL;
return false;
}
- llinfos << "LLInventoryModel::saveToFile(" << filename << ")" << llendl;
+ LL_INFOS() << "LLInventoryModel::saveToFile(" << filename << ")" << LL_ENDL;
LLFILE* file = LLFile::fopen(filename, "wb"); /*Flawfinder: ignore*/
if(!file)
{
- llwarns << "unable to save inventory to: " << filename << llendl;
+ LL_WARNS() << "unable to save inventory to: " << filename << LL_ENDL;
return false;
}
fprintf(file, "\tinv_cache_version\t%d\n",sCurrentInvCacheVersion);
- S32 count = categories.count();
+ S32 count = categories.size();
S32 i;
for(i = 0; i < count; ++i)
{
@@ -2434,7 +2434,7 @@ bool LLInventoryModel::saveToFile(const std::string& filename,
}
}
- count = items.count();
+ count = items.size();
for(i = 0; i < count; ++i)
{
items[i]->exportFile(file);
@@ -2523,8 +2523,8 @@ bool LLInventoryModel::messageUpdateCore(LLMessageSystem* msg, bool account)
msg->getUUIDFast(_PREHASH_AgentData, _PREHASH_AgentID, agent_id);
if(agent_id != gAgent.getID())
{
- llwarns << "Got a inventory update for the wrong agent: " << agent_id
- << llendl;
+ LL_WARNS() << "Got a inventory update for the wrong agent: " << agent_id
+ << LL_ENDL;
return false;
}
item_array_t items;
@@ -2536,8 +2536,8 @@ bool LLInventoryModel::messageUpdateCore(LLMessageSystem* msg, bool account)
{
LLPointer<LLViewerInventoryItem> titem = new LLViewerInventoryItem;
titem->unpackMessage(msg, _PREHASH_InventoryData, i);
- lldebugs << "LLInventoryModel::messageUpdateCore() item id:"
- << titem->getUUID() << llendl;
+ LL_DEBUGS() << "LLInventoryModel::messageUpdateCore() item id:"
+ << titem->getUUID() << LL_ENDL;
items.push_back(titem);
// examine update for changes.
LLViewerInventoryItem* itemp = gInventory.getItem(titem->getUUID());
@@ -2584,17 +2584,17 @@ void LLInventoryModel::removeInventoryItem(LLUUID agent_id, LLMessageSystem* msg
{
LLUUID item_id;
S32 count = msg->getNumberOfBlocksFast(msg_label);
- lldebugs << "Message has " << count << " item blocks" << llendl;
+ LL_DEBUGS() << "Message has " << count << " item blocks" << LL_ENDL;
uuid_vec_t item_ids;
update_map_t update;
for(S32 i = 0; i < count; ++i)
{
msg->getUUIDFast(msg_label, _PREHASH_ItemID, item_id, i);
- lldebugs << "Checking for item-to-be-removed " << item_id << llendl;
+ LL_DEBUGS() << "Checking for item-to-be-removed " << item_id << LL_ENDL;
LLViewerInventoryItem* itemp = gInventory.getItem(item_id);
if(itemp)
{
- lldebugs << "Item will be removed " << item_id << llendl;
+ LL_DEBUGS() << "Item will be removed " << item_id << LL_ENDL;
// we only bother with the delete and account if we found
// the item - this is usually a back-up for permissions,
// so frequently the item will already be gone.
@@ -2605,7 +2605,7 @@ void LLInventoryModel::removeInventoryItem(LLUUID agent_id, LLMessageSystem* msg
gInventory.accountForUpdate(update);
for(uuid_vec_t::iterator it = item_ids.begin(); it != item_ids.end(); ++it)
{
- lldebugs << "Calling deleteObject " << *it << llendl;
+ LL_DEBUGS() << "Calling deleteObject " << *it << LL_ENDL;
gInventory.deleteObject(*it);
}
}
@@ -2613,13 +2613,13 @@ void LLInventoryModel::removeInventoryItem(LLUUID agent_id, LLMessageSystem* msg
// static
void LLInventoryModel::processRemoveInventoryItem(LLMessageSystem* msg, void**)
{
- lldebugs << "LLInventoryModel::processRemoveInventoryItem()" << llendl;
+ LL_DEBUGS() << "LLInventoryModel::processRemoveInventoryItem()" << LL_ENDL;
LLUUID agent_id, item_id;
msg->getUUIDFast(_PREHASH_AgentData, _PREHASH_AgentID, agent_id);
if(agent_id != gAgent.getID())
{
- llwarns << "Got a RemoveInventoryItem for the wrong agent."
- << llendl;
+ LL_WARNS() << "Got a RemoveInventoryItem for the wrong agent."
+ << LL_ENDL;
return;
}
LLInventoryModel::removeInventoryItem(agent_id, msg, _PREHASH_InventoryData);
@@ -2630,14 +2630,14 @@ void LLInventoryModel::processRemoveInventoryItem(LLMessageSystem* msg, void**)
void LLInventoryModel::processUpdateInventoryFolder(LLMessageSystem* msg,
void**)
{
- lldebugs << "LLInventoryModel::processUpdateInventoryFolder()" << llendl;
+ LL_DEBUGS() << "LLInventoryModel::processUpdateInventoryFolder()" << LL_ENDL;
LLUUID agent_id, folder_id, parent_id;
//char name[DB_INV_ITEM_NAME_BUF_SIZE];
msg->getUUIDFast(_PREHASH_FolderData, _PREHASH_AgentID, agent_id);
if(agent_id != gAgent.getID())
{
- llwarns << "Got an UpdateInventoryFolder for the wrong agent."
- << llendl;
+ LL_WARNS() << "Got an UpdateInventoryFolder for the wrong agent."
+ << LL_ENDL;
return;
}
LLPointer<LLViewerInventoryCategory> lastfolder; // hack
@@ -2715,14 +2715,14 @@ void LLInventoryModel::removeInventoryFolder(LLUUID agent_id,
void LLInventoryModel::processRemoveInventoryFolder(LLMessageSystem* msg,
void**)
{
- lldebugs << "LLInventoryModel::processRemoveInventoryFolder()" << llendl;
+ LL_DEBUGS() << "LLInventoryModel::processRemoveInventoryFolder()" << LL_ENDL;
LLUUID agent_id, session_id;
msg->getUUIDFast(_PREHASH_AgentData, _PREHASH_AgentID, agent_id);
msg->getUUIDFast(_PREHASH_AgentData, _PREHASH_SessionID, session_id);
if(agent_id != gAgent.getID())
{
- llwarns << "Got a RemoveInventoryFolder for the wrong agent."
- << llendl;
+ LL_WARNS() << "Got a RemoveInventoryFolder for the wrong agent."
+ << LL_ENDL;
return;
}
LLInventoryModel::removeInventoryFolder( agent_id, msg );
@@ -2733,14 +2733,14 @@ void LLInventoryModel::processRemoveInventoryFolder(LLMessageSystem* msg,
void LLInventoryModel::processRemoveInventoryObjects(LLMessageSystem* msg,
void**)
{
- lldebugs << "LLInventoryModel::processRemoveInventoryObjects()" << llendl;
+ LL_DEBUGS() << "LLInventoryModel::processRemoveInventoryObjects()" << LL_ENDL;
LLUUID agent_id, session_id;
msg->getUUIDFast(_PREHASH_AgentData, _PREHASH_AgentID, agent_id);
msg->getUUIDFast(_PREHASH_AgentData, _PREHASH_SessionID, session_id);
if(agent_id != gAgent.getID())
{
- llwarns << "Got a RemoveInventoryObjects for the wrong agent."
- << llendl;
+ LL_WARNS() << "Got a RemoveInventoryObjects for the wrong agent."
+ << LL_ENDL;
return;
}
LLInventoryModel::removeInventoryFolder( agent_id, msg );
@@ -2756,8 +2756,8 @@ void LLInventoryModel::processSaveAssetIntoInventory(LLMessageSystem* msg,
msg->getUUIDFast(_PREHASH_AgentData, _PREHASH_AgentID, agent_id);
if(agent_id != gAgent.getID())
{
- llwarns << "Got a SaveAssetIntoInventory message for the wrong agent."
- << llendl;
+ LL_WARNS() << "Got a SaveAssetIntoInventory message for the wrong agent."
+ << LL_ENDL;
return;
}
@@ -2767,8 +2767,8 @@ void LLInventoryModel::processSaveAssetIntoInventory(LLMessageSystem* msg,
// The viewer ignores the asset id because this message is only
// used for attachments/objects, so the asset id is not used in
// the viewer anyway.
- lldebugs << "LLInventoryModel::processSaveAssetIntoInventory itemID="
- << item_id << llendl;
+ LL_DEBUGS() << "LLInventoryModel::processSaveAssetIntoInventory itemID="
+ << item_id << LL_ENDL;
LLViewerInventoryItem* item = gInventory.getItem( item_id );
if( item )
{
@@ -2779,8 +2779,8 @@ void LLInventoryModel::processSaveAssetIntoInventory(LLMessageSystem* msg,
}
else
{
- llinfos << "LLInventoryModel::processSaveAssetIntoInventory item"
- " not found: " << item_id << llendl;
+ LL_INFOS() << "LLInventoryModel::processSaveAssetIntoInventory item"
+ " not found: " << item_id << LL_ENDL;
}
if(gViewerWindow)
{
@@ -2803,13 +2803,13 @@ void LLInventoryModel::processBulkUpdateInventory(LLMessageSystem* msg, void**)
msg->getUUIDFast(_PREHASH_AgentData, _PREHASH_AgentID, agent_id);
if(agent_id != gAgent.getID())
{
- llwarns << "Got a BulkUpdateInventory for the wrong agent." << llendl;
+ LL_WARNS() << "Got a BulkUpdateInventory for the wrong agent." << LL_ENDL;
return;
}
LLUUID tid;
msg->getUUIDFast(_PREHASH_AgentData, _PREHASH_TransactionID, tid);
#ifndef LL_RELEASE_FOR_DOWNLOAD
- llinfos << "Bulk inventory: " << tid << llendl;
+ LL_INFOS() << "Bulk inventory: " << tid << LL_ENDL;
#endif
update_map_t update;
@@ -2821,9 +2821,9 @@ void LLInventoryModel::processBulkUpdateInventory(LLMessageSystem* msg, void**)
{
LLPointer<LLViewerInventoryCategory> tfolder = new LLViewerInventoryCategory(gAgent.getID());
tfolder->unpackMessage(msg, _PREHASH_FolderData, i);
- llinfos << "unpacked folder '" << tfolder->getName() << "' ("
+ LL_INFOS() << "unpacked folder '" << tfolder->getName() << "' ("
<< tfolder->getUUID() << ") in " << tfolder->getParentUUID()
- << llendl;
+ << LL_ENDL;
if(tfolder->getUUID().notNull())
{
folders.push_back(tfolder);
@@ -2863,8 +2863,8 @@ void LLInventoryModel::processBulkUpdateInventory(LLMessageSystem* msg, void**)
{
LLPointer<LLViewerInventoryItem> titem = new LLViewerInventoryItem;
titem->unpackMessage(msg, _PREHASH_ItemData, i);
- llinfos << "unpacked item '" << titem->getName() << "' in "
- << titem->getParentUUID() << llendl;
+ LL_INFOS() << "unpacked item '" << titem->getName() << "' in "
+ << titem->getParentUUID() << LL_ENDL;
U32 callback_id;
msg->getU32Fast(_PREHASH_ItemData, _PREHASH_CallbackID, callback_id);
if(titem->getUUID().notNull() ) // && callback_id.notNull() )
@@ -2970,7 +2970,7 @@ void LLInventoryModel::processInventoryDescendents(LLMessageSystem* msg,void**)
msg->getUUIDFast(_PREHASH_AgentData, _PREHASH_AgentID, agent_id);
if(agent_id != gAgent.getID())
{
- llwarns << "Got a UpdateInventoryItem for the wrong agent." << llendl;
+ LL_WARNS() << "Got a UpdateInventoryItem for the wrong agent." << LL_ENDL;
return;
}
LLUUID parent_id;
@@ -2999,7 +2999,7 @@ void LLInventoryModel::processInventoryDescendents(LLMessageSystem* msg,void**)
// If the item has already been added (e.g. from link prefetch), then it doesn't need to be re-added.
if (gInventory.getItem(titem->getUUID()))
{
- lldebugs << "Skipping prefetched item [ Name: " << titem->getName() << " | Type: " << titem->getActualType() << " | ItemUUID: " << titem->getUUID() << " ] " << llendl;
+ LL_DEBUGS() << "Skipping prefetched item [ Name: " << titem->getName() << " | Type: " << titem->getActualType() << " | ItemUUID: " << titem->getUUID() << " ] " << LL_ENDL;
continue;
}
gInventory.updateItem(titem);
@@ -3021,13 +3021,13 @@ void LLInventoryModel::processInventoryDescendents(LLMessageSystem* msg,void**)
// static
void LLInventoryModel::processMoveInventoryItem(LLMessageSystem* msg, void**)
{
- lldebugs << "LLInventoryModel::processMoveInventoryItem()" << llendl;
+ LL_DEBUGS() << "LLInventoryModel::processMoveInventoryItem()" << LL_ENDL;
LLUUID agent_id;
msg->getUUIDFast(_PREHASH_AgentData, _PREHASH_AgentID, agent_id);
if(agent_id != gAgent.getID())
{
- llwarns << "Got a MoveInventoryItem message for the wrong agent."
- << llendl;
+ LL_WARNS() << "Got a MoveInventoryItem message for the wrong agent."
+ << LL_ENDL;
return;
}
@@ -3046,8 +3046,8 @@ void LLInventoryModel::processMoveInventoryItem(LLMessageSystem* msg, void**)
msg->getUUIDFast(_PREHASH_InventoryData, _PREHASH_FolderID, folder_id, i);
msg->getString("InventoryData", "NewName", new_name, i);
- lldebugs << "moving item " << item_id << " to folder "
- << folder_id << llendl;
+ LL_DEBUGS() << "moving item " << item_id << " to folder "
+ << folder_id << LL_ENDL;
update_list_t update;
LLCategoryUpdate old_folder(item->getParentUUID(), -1);
update.push_back(old_folder);
@@ -3065,7 +3065,7 @@ void LLInventoryModel::processMoveInventoryItem(LLMessageSystem* msg, void**)
}
else
{
- llinfos << "LLInventoryModel::processMoveInventoryItem item not found: " << item_id << llendl;
+ LL_INFOS() << "LLInventoryModel::processMoveInventoryItem item not found: " << item_id << LL_ENDL;
}
}
if(anything_changed)
@@ -3221,7 +3221,7 @@ BOOL LLInventoryModel::getIsFirstTimeInViewer2()
// Do not call this before parentchild map is built.
if (!gInventory.mIsAgentInvUsable)
{
- llwarns << "Parent Child Map not yet built; guessing as first time in viewer2." << llendl;
+ LL_WARNS() << "Parent Child Map not yet built; guessing as first time in viewer2." << LL_ENDL;
return TRUE;
}
@@ -3356,37 +3356,37 @@ void LLInventoryModel::rearrangeFavoriteLandmarks(const LLUUID& source_item_id,
// *NOTE: DEBUG functionality
void LLInventoryModel::dumpInventory() const
{
- llinfos << "\nBegin Inventory Dump\n**********************:" << llendl;
- llinfos << "mCategory[] contains " << mCategoryMap.size() << " items." << llendl;
+ LL_INFOS() << "\nBegin Inventory Dump\n**********************:" << LL_ENDL;
+ LL_INFOS() << "mCategory[] contains " << mCategoryMap.size() << " items." << LL_ENDL;
for(cat_map_t::const_iterator cit = mCategoryMap.begin(); cit != mCategoryMap.end(); ++cit)
{
const LLViewerInventoryCategory* cat = cit->second;
if(cat)
{
- llinfos << " " << cat->getUUID() << " '" << cat->getName() << "' "
+ LL_INFOS() << " " << cat->getUUID() << " '" << cat->getName() << "' "
<< cat->getVersion() << " " << cat->getDescendentCount()
- << llendl;
+ << LL_ENDL;
}
else
{
- llinfos << " NULL!" << llendl;
+ LL_INFOS() << " NULL!" << LL_ENDL;
}
}
- llinfos << "mItemMap[] contains " << mItemMap.size() << " items." << llendl;
+ LL_INFOS() << "mItemMap[] contains " << mItemMap.size() << " items." << LL_ENDL;
for(item_map_t::const_iterator iit = mItemMap.begin(); iit != mItemMap.end(); ++iit)
{
const LLViewerInventoryItem* item = iit->second;
if(item)
{
- llinfos << " " << item->getUUID() << " "
- << item->getName() << llendl;
+ LL_INFOS() << " " << item->getUUID() << " "
+ << item->getName() << LL_ENDL;
}
else
{
- llinfos << " NULL!" << llendl;
+ LL_INFOS() << " NULL!" << LL_ENDL;
}
}
- llinfos << "\n**********************\nEnd Inventory Dump" << llendl;
+ LL_INFOS() << "\n**********************\nEnd Inventory Dump" << LL_ENDL;
}
///----------------------------------------------------------------------------
diff --git a/indra/newview/llinventorymodel.h b/indra/newview/llinventorymodel.h
index 8aac879a93..69dba495d7 100755
--- a/indra/newview/llinventorymodel.h
+++ b/indra/newview/llinventorymodel.h
@@ -29,9 +29,8 @@
#include "llassettype.h"
#include "llfoldertype.h"
-#include "lldarray.h"
#include "llframetimer.h"
-#include "llhttpclient.h"
+#include "llcurl.h"
#include "lluuid.h"
#include "llpermissionsflags.h"
#include "llstring.h"
@@ -75,11 +74,11 @@ public:
CHILDREN_MAYBE
};
- typedef LLDynamicArray<LLPointer<LLViewerInventoryCategory> > cat_array_t;
- typedef LLDynamicArray<LLPointer<LLViewerInventoryItem> > item_array_t;
+ typedef std::vector<LLPointer<LLViewerInventoryCategory> > cat_array_t;
+ typedef std::vector<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/llinventorymodelbackgroundfetch.cpp b/indra/newview/llinventorymodelbackgroundfetch.cpp
index d88e0c3192..a8fda4fcf8 100755
--- a/indra/newview/llinventorymodelbackgroundfetch.cpp
+++ b/indra/newview/llinventorymodelbackgroundfetch.cpp
@@ -200,7 +200,7 @@ void LLInventoryModelBackgroundFetch::backgroundFetch()
// No more categories to fetch, stop fetch process.
if (mFetchQueue.empty())
{
- llinfos << "Inventory fetch completed" << llendl;
+ LL_INFOS() << "Inventory fetch completed" << LL_ENDL;
setAllFoldersFetched();
mBackgroundFetchActive = false;
@@ -216,7 +216,7 @@ void LLInventoryModelBackgroundFetch::backgroundFetch()
// Double timeouts on failure.
mMinTimeBetweenFetches = llmin(mMinTimeBetweenFetches * 2.f, 10.f);
mMaxTimeBetweenFetches = llmin(mMaxTimeBetweenFetches * 2.f, 120.f);
- lldebugs << "Inventory fetch times grown to (" << mMinTimeBetweenFetches << ", " << mMaxTimeBetweenFetches << ")" << llendl;
+ LL_DEBUGS() << "Inventory fetch times grown to (" << mMinTimeBetweenFetches << ", " << mMaxTimeBetweenFetches << ")" << LL_ENDL;
// fetch is no longer considered "timely" although we will wait for full time-out.
mTimelyFetchPending = FALSE;
}
@@ -289,7 +289,7 @@ void LLInventoryModelBackgroundFetch::backgroundFetch()
// Shrink timeouts based on success.
mMinTimeBetweenFetches = llmax(mMinTimeBetweenFetches * 0.8f, 0.3f);
mMaxTimeBetweenFetches = llmax(mMaxTimeBetweenFetches * 0.8f, 10.f);
- lldebugs << "Inventory fetch times shrunk to (" << mMinTimeBetweenFetches << ", " << mMaxTimeBetweenFetches << ")" << llendl;
+ LL_DEBUGS() << "Inventory fetch times shrunk to (" << mMinTimeBetweenFetches << ", " << mMaxTimeBetweenFetches << ")" << LL_ENDL;
}
mTimelyFetchPending = FALSE;
@@ -417,8 +417,8 @@ void LLInventoryModelFetchDescendentsResponder::result(const LLSD& content)
//if(agent_id != gAgent.getID()) //This should never happen.
//{
- // llwarns << "Got a UpdateInventoryItem for the wrong agent."
- // << llendl;
+ // LL_WARNS() << "Got a UpdateInventoryItem for the wrong agent."
+ // << LL_ENDL;
// break;
//}
@@ -512,8 +512,8 @@ void LLInventoryModelFetchDescendentsResponder::result(const LLSD& content)
LLSD folder_sd = *folder_it;
// These folders failed on the dataserver. We probably don't want to retry them.
- llinfos << "Folder " << folder_sd["folder_id"].asString()
- << "Error: " << folder_sd["error"].asString() << llendl;
+ LL_INFOS() << "Folder " << folder_sd["folder_id"].asString()
+ << "Error: " << folder_sd["error"].asString() << LL_ENDL;
}
}
@@ -521,7 +521,7 @@ void LLInventoryModelFetchDescendentsResponder::result(const LLSD& content)
if (fetcher->isBulkFetchProcessingComplete())
{
- llinfos << "Inventory fetch completed" << llendl;
+ LL_INFOS() << "Inventory fetch completed" << LL_ENDL;
fetcher->setAllFoldersFetched();
}
@@ -533,8 +533,8 @@ void LLInventoryModelFetchDescendentsResponder::errorWithContent(U32 status, con
{
LLInventoryModelBackgroundFetch *fetcher = LLInventoryModelBackgroundFetch::getInstance();
- llinfos << "LLInventoryModelFetchDescendentsResponder::error [status:"
- << status << "]: " << content << llendl;
+ LL_INFOS() << "LLInventoryModelFetchDescendentsResponder::error [status:"
+ << status << "]: " << content << LL_ENDL;
fetcher->incrFetchCount(-1);
diff --git a/indra/newview/llinventoryobserver.cpp b/indra/newview/llinventoryobserver.cpp
index 9db175ec2e..8b7b12e844 100755
--- a/indra/newview/llinventoryobserver.cpp
+++ b/indra/newview/llinventoryobserver.cpp
@@ -149,10 +149,10 @@ LLInventoryFetchItemsObserver::LLInventoryFetchItemsObserver(const uuid_vec_t& i
void LLInventoryFetchItemsObserver::changed(U32 mask)
{
- lldebugs << this << " remaining incomplete " << mIncomplete.size()
+ LL_DEBUGS() << this << " remaining incomplete " << mIncomplete.size()
<< " complete " << mComplete.size()
<< " wait period " << mFetchingPeriod.getRemainingTimeF32()
- << llendl;
+ << LL_ENDL;
// scan through the incomplete items and move or erase them as
// appropriate.
@@ -176,7 +176,7 @@ void LLInventoryFetchItemsObserver::changed(U32 mask)
if (timeout_expired)
{
// Just concede that this item hasn't arrived in reasonable time and continue on.
- llwarns << "Fetcher timed out when fetching inventory item UUID: " << item_id << LL_ENDL;
+ LL_WARNS() << "Fetcher timed out when fetching inventory item UUID: " << item_id << LL_ENDL;
it = mIncomplete.erase(it);
}
else
@@ -191,12 +191,12 @@ void LLInventoryFetchItemsObserver::changed(U32 mask)
if (mIncomplete.empty())
{
- lldebugs << this << " done at remaining incomplete "
- << mIncomplete.size() << " complete " << mComplete.size() << llendl;
+ LL_DEBUGS() << this << " done at remaining incomplete "
+ << mIncomplete.size() << " complete " << mComplete.size() << LL_ENDL;
done();
}
- //llinfos << "LLInventoryFetchItemsObserver::changed() mComplete size " << mComplete.size() << llendl;
- //llinfos << "LLInventoryFetchItemsObserver::changed() mIncomplete size " << mIncomplete.size() << llendl;
+ //LL_INFOS() << "LLInventoryFetchItemsObserver::changed() mComplete size " << mComplete.size() << LL_ENDL;
+ //LL_INFOS() << "LLInventoryFetchItemsObserver::changed() mIncomplete size " << mIncomplete.size() << LL_ENDL;
}
void fetch_items_from_llsd(const LLSD& items_llsd)
@@ -224,12 +224,12 @@ void fetch_items_from_llsd(const LLSD& items_llsd)
{
if (!gAgent.getRegion())
{
- llwarns << "Agent's region is null" << llendl;
+ LL_WARNS() << "Agent's region is null" << LL_ENDL;
break;
}
if (0 == body[i]["items"].size()) {
- lldebugs << "Skipping body with no items to fetch" << llendl;
+ LL_DEBUGS() << "Skipping body with no items to fetch" << LL_ENDL;
continue;
}
@@ -391,14 +391,14 @@ BOOL LLInventoryFetchDescendentsObserver::isCategoryComplete(const LLViewerInven
gInventory.getDirectDescendentsOf(cat->getUUID(), cats, items);
if (!cats || !items)
{
- llwarns << "Category '" << cat->getName() << "' descendents corrupted, fetch failed." << llendl;
+ LL_WARNS() << "Category '" << cat->getName() << "' descendents corrupted, fetch failed." << LL_ENDL;
// NULL means the call failed -- cats/items map doesn't exist (note: this does NOT mean
// that the cat just doesn't have any items or subfolders).
// Unrecoverable, so just return done so that this observer can be cleared
// from memory.
return TRUE;
}
- const S32 current_num_known_descendents = cats->count() + items->count();
+ const S32 current_num_known_descendents = cats->size() + items->size();
// Got the number of descendents that we were expecting, so we're done.
if (current_num_known_descendents == expected_num_descendents)
@@ -411,7 +411,7 @@ BOOL LLInventoryFetchDescendentsObserver::isCategoryComplete(const LLViewerInven
// count and thus the category thinks it has fewer descendents than it actually has.
if (current_num_known_descendents >= expected_num_descendents)
{
- llwarns << "Category '" << cat->getName() << "' expected descendentcount:" << expected_num_descendents << " descendents but got descendentcount:" << current_num_known_descendents << llendl;
+ LL_WARNS() << "Category '" << cat->getName() << "' expected descendentcount:" << expected_num_descendents << " descendents but got descendentcount:" << current_num_known_descendents << LL_ENDL;
const_cast<LLViewerInventoryCategory *>(cat)->setDescendentCount(current_num_known_descendents);
return TRUE;
}
@@ -714,7 +714,7 @@ void LLInventoryCategoriesObserver::changed(U32 mask)
gInventory.getDirectDescendentsOf(cat_id, cats, items);
if (!cats || !items)
{
- llwarns << "Category '" << category->getName() << "' descendents corrupted, fetch failed." << llendl;
+ LL_WARNS() << "Category '" << category->getName() << "' descendents corrupted, fetch failed." << LL_ENDL;
// NULL means the call failed -- cats/items map doesn't exist (note: this does NOT mean
// that the cat just doesn't have any items or subfolders).
// Unrecoverable, so just skip this category.
@@ -724,7 +724,7 @@ void LLInventoryCategoriesObserver::changed(U32 mask)
continue;
}
- const S32 current_num_known_descendents = cats->count() + items->count();
+ const S32 current_num_known_descendents = cats->size() + items->size();
LLCategoryData& cat_data = (*iter).second;
@@ -781,7 +781,7 @@ bool LLInventoryCategoriesObserver::addCategory(const LLUUID& cat_id, callback_t
gInventory.getDirectDescendentsOf(cat_id, cats, items);
if (!cats || !items)
{
- llwarns << "Category '" << category->getName() << "' descendents corrupted, fetch failed." << llendl;
+ LL_WARNS() << "Category '" << category->getName() << "' descendents corrupted, fetch failed." << LL_ENDL;
// NULL means the call failed -- cats/items map doesn't exist (note: this does NOT mean
// that the cat just doesn't have any items or subfolders).
// Unrecoverable, so just return "false" meaning that the category can't be observed.
@@ -791,7 +791,7 @@ bool LLInventoryCategoriesObserver::addCategory(const LLUUID& cat_id, callback_t
}
else
{
- current_num_known_descendents = cats->count() + items->count();
+ current_num_known_descendents = cats->size() + items->size();
}
}
diff --git a/indra/newview/llinventorypanel.cpp b/indra/newview/llinventorypanel.cpp
index e5b9e11d48..d10aa6d7b0 100755
--- a/indra/newview/llinventorypanel.cpp
+++ b/indra/newview/llinventorypanel.cpp
@@ -397,10 +397,10 @@ LLInventoryFilter::EFolderShow LLInventoryPanel::getShowFolderState()
}
// Called when something changed in the global model (new item, item coming through the wire, rename, move, etc...) (CHUI-849)
+static LLTrace::BlockTimerStatHandle FTM_REFRESH("Inventory Refresh");
void LLInventoryPanel::modelChanged(U32 mask)
{
- static LLFastTimer::DeclareTimer FTM_REFRESH("Inventory Refresh");
- LLFastTimer t2(FTM_REFRESH);
+ LL_RECORD_BLOCK_TIME(FTM_REFRESH);
if (!mViewsInitialized) return;
@@ -590,7 +590,7 @@ LLUUID LLInventoryPanel::getRootFolderID()
root_id = gInventory.findCategoryUUIDForType(preferred_type, false);
if (root_id.isNull())
{
- llwarns << "Could not find folder of type " << preferred_type << llendl;
+ LL_WARNS() << "Could not find folder of type " << preferred_type << LL_ENDL;
root_id.generateNewID();
}
}
@@ -653,16 +653,16 @@ void LLInventoryPanel::idle(void* user_data)
EAcceptance last_accept = LLToolDragAndDrop::getInstance()->getLastAccept();
if (last_accept == ACCEPT_YES_SINGLE || last_accept == ACCEPT_YES_COPY_SINGLE)
{
- panel->mFolderRoot->setShowSingleSelection(TRUE);
+ panel->mFolderRoot->setShowSingleSelection(true);
}
else
{
- panel->mFolderRoot->setShowSingleSelection(FALSE);
+ panel->mFolderRoot->setShowSingleSelection(false);
}
}
else
{
- panel->mFolderRoot->setShowSingleSelection(FALSE);
+ panel->mFolderRoot->setShowSingleSelection(false);
}
}
@@ -757,9 +757,9 @@ LLFolderViewItem* LLInventoryPanel::buildNewViews(const LLUUID& id)
if (objectp->getType() <= LLAssetType::AT_NONE ||
objectp->getType() >= LLAssetType::AT_COUNT)
{
- llwarns << "LLInventoryPanel::buildNewViews called with invalid objectp->mType : "
+ LL_WARNS() << "LLInventoryPanel::buildNewViews called with invalid objectp->mType : "
<< ((S32) objectp->getType()) << " name " << objectp->getName() << " UUID " << objectp->getUUID()
- << llendl;
+ << LL_ENDL;
return NULL;
}
@@ -1024,7 +1024,7 @@ bool LLInventoryPanel::beginIMSession()
std::string name;
- LLDynamicArray<LLUUID> members;
+ std::vector<LLUUID> members;
EInstantMessage type = IM_SESSION_CONFERENCE_START;
std::set<LLFolderViewItem*>::const_iterator iter;
@@ -1052,7 +1052,7 @@ bool LLInventoryPanel::beginIMSession()
item_array,
LLInventoryModel::EXCLUDE_TRASH,
is_buddy);
- S32 count = item_array.count();
+ S32 count = item_array.size();
if(count > 0)
{
//*TODO by what to replace that?
@@ -1063,10 +1063,10 @@ bool LLInventoryPanel::beginIMSession()
LLUUID id;
for(S32 i = 0; i < count; ++i)
{
- id = item_array.get(i)->getCreatorUUID();
+ id = item_array.at(i)->getCreatorUUID();
if(at.isBuddyOnline(id))
{
- members.put(id);
+ members.push_back(id);
}
}
}
@@ -1086,7 +1086,7 @@ bool LLInventoryPanel::beginIMSession()
if(at.isBuddyOnline(id))
{
- members.put(id);
+ members.push_back(id);
}
}
} //if IT_CALLINGCARD
@@ -1161,7 +1161,7 @@ LLInventoryPanel* LLInventoryPanel::getActiveInventoryPanel(BOOL auto_open)
LLFloater* floater_inventory = LLFloaterReg::getInstance("inventory");
if (!floater_inventory)
{
- llwarns << "Could not find My Inventory floater" << llendl;
+ LL_WARNS() << "Could not find My Inventory floater" << LL_ENDL;
return FALSE;
}
@@ -1295,10 +1295,10 @@ void LLInventoryPanel::removeItemID(const LLUUID& id)
}
}
-LLFastTimer::DeclareTimer FTM_GET_ITEM_BY_ID("Get FolderViewItem by ID");
+LLTrace::BlockTimerStatHandle FTM_GET_ITEM_BY_ID("Get FolderViewItem by ID");
LLFolderViewItem* LLInventoryPanel::getItemByID(const LLUUID& id)
{
- LLFastTimer _(FTM_GET_ITEM_BY_ID);
+ LL_RECORD_BLOCK_TIME(FTM_GET_ITEM_BY_ID);
std::map<LLUUID, LLFolderViewItem*>::iterator map_it;
map_it = mItemMap.find(id);
diff --git a/indra/newview/llinventorypanel.h b/indra/newview/llinventorypanel.h
index 00a90325ad..8b50a43a84 100755
--- a/indra/newview/llinventorypanel.h
+++ b/indra/newview/llinventorypanel.h
@@ -29,7 +29,6 @@
#define LL_LLINVENTORYPANEL_H
#include "llassetstorage.h"
-#include "lldarray.h"
#include "llfolderviewitem.h"
#include "llfolderviewmodelinventory.h"
#include "llfloater.h"
diff --git a/indra/newview/lljoystickbutton.cpp b/indra/newview/lljoystickbutton.cpp
index 3d1f186bba..d38f90015e 100755
--- a/indra/newview/lljoystickbutton.cpp
+++ b/indra/newview/lljoystickbutton.cpp
@@ -121,7 +121,7 @@ void LLJoystick::updateSlop()
break;
default:
- llerrs << "LLJoystick::LLJoystick() - bad switch case" << llendl;
+ LL_ERRS() << "LLJoystick::LLJoystick() - bad switch case" << LL_ENDL;
break;
}
@@ -132,7 +132,7 @@ bool LLJoystick::pointInCircle(S32 x, S32 y) const
{
if(this->getLocalRect().getHeight() != this->getLocalRect().getWidth())
{
- llwarns << "Joystick shape is not square"<<llendl;
+ LL_WARNS() << "Joystick shape is not square"<<LL_ENDL;
return true;
}
//center is x and y coordinates of center of joystick circle, and also its radius
@@ -143,7 +143,7 @@ bool LLJoystick::pointInCircle(S32 x, S32 y) const
BOOL LLJoystick::handleMouseDown(S32 x, S32 y, MASK mask)
{
- //llinfos << "joystick mouse down " << x << ", " << y << llendl;
+ //LL_INFOS() << "joystick mouse down " << x << ", " << y << LL_ENDL;
bool handles = false;
if(pointInCircle(x, y))
@@ -160,7 +160,7 @@ BOOL LLJoystick::handleMouseDown(S32 x, S32 y, MASK mask)
BOOL LLJoystick::handleMouseUp(S32 x, S32 y, MASK mask)
{
- // llinfos << "joystick mouse up " << x << ", " << y << llendl;
+ // LL_INFOS() << "joystick mouse up " << x << ", " << y << LL_ENDL;
if( hasMouseCapture() )
{
@@ -271,7 +271,7 @@ void LLJoystickAgentTurn::onHeldDown()
F32 time = getElapsedHeldDownTime();
updateSlop();
- //llinfos << "move forward/backward (and/or turn)" << llendl;
+ //LL_INFOS() << "move forward/backward (and/or turn)" << LL_ENDL;
S32 dx = mLastMouse.mX - mFirstMouse.mX + mInitialOffset.mX;
S32 dy = mLastMouse.mY - mFirstMouse.mY + mInitialOffset.mY;
@@ -353,7 +353,7 @@ void LLJoystickAgentSlide::onMouseUp()
void LLJoystickAgentSlide::onHeldDown()
{
- //llinfos << "slide left/right (and/or move forward/backward)" << llendl;
+ //LL_INFOS() << "slide left/right (and/or move forward/backward)" << LL_ENDL;
updateSlop();
@@ -504,7 +504,7 @@ F32 LLJoystickCameraRotate::getOrbitRate()
if( time < NUDGE_TIME )
{
F32 rate = ORBIT_NUDGE_RATE + time * (1 - ORBIT_NUDGE_RATE)/ NUDGE_TIME;
- //llinfos << rate << llendl;
+ //LL_INFOS() << rate << LL_ENDL;
return rate;
}
else
diff --git a/indra/newview/lllandmarkactions.cpp b/indra/newview/lllandmarkactions.cpp
index 6625a194fb..f893daaeb2 100755
--- a/indra/newview/lllandmarkactions.cpp
+++ b/indra/newview/lllandmarkactions.cpp
@@ -233,7 +233,7 @@ bool LLLandmarkActions::canCreateLandmarkHere()
LLParcel* agent_parcel = LLViewerParcelMgr::getInstance()->getAgentParcel();
if(!agent_parcel)
{
- llwarns << "No agent region" << llendl;
+ LL_WARNS() << "No agent region" << LL_ENDL;
return false;
}
if (agent_parcel->getAllowLandmark()
@@ -252,13 +252,13 @@ void LLLandmarkActions::createLandmarkHere(
{
if(!gAgent.getRegion())
{
- llwarns << "No agent region" << llendl;
+ LL_WARNS() << "No agent region" << LL_ENDL;
return;
}
LLParcel* agent_parcel = LLViewerParcelMgr::getInstance()->getAgentParcel();
if (!agent_parcel)
{
- llwarns << "No agent parcel" << llendl;
+ LL_WARNS() << "No agent parcel" << LL_ENDL;
return;
}
if (!canCreateLandmarkHere())
diff --git a/indra/newview/lllandmarklist.cpp b/indra/newview/lllandmarklist.cpp
index a92df8250e..c58540914e 100755
--- a/indra/newview/lllandmarklist.cpp
+++ b/indra/newview/lllandmarklist.cpp
@@ -142,8 +142,7 @@ void LLLandmarkList::processGetAssetReply(
}
else
{
- LLViewerStats::getInstance()->incStat( LLViewerStats::ST_DOWNLOAD_FAILED );
- // SJB: No use case for a notification here. Use lldebugs instead
+ // SJB: No use case for a notification here. Use LL_DEBUGS() instead
if( LL_ERR_ASSET_REQUEST_NOT_IN_DATABASE == status )
{
LL_WARNS("Landmarks") << "Missing Landmark" << LL_ENDL;
@@ -176,7 +175,7 @@ void LLLandmarkList::onRegionHandle(const LLUUID& landmark_id)
if (!landmark)
{
- llwarns << "Got region handle but the landmark not found." << llendl;
+ LL_WARNS() << "Got region handle but the landmark not found." << LL_ENDL;
return;
}
@@ -185,7 +184,7 @@ void LLLandmarkList::onRegionHandle(const LLUUID& landmark_id)
LLVector3d pos;
if (!landmark->getGlobalPos(pos))
{
- llwarns << "Got region handle but the landmark global position is still unknown." << llendl;
+ LL_WARNS() << "Got region handle but the landmark global position is still unknown." << LL_ENDL;
return;
}
@@ -198,7 +197,7 @@ void LLLandmarkList::makeCallbacks(const LLUUID& landmark_id)
if (!landmark)
{
- llwarns << "Landmark to make callbacks for not found." << llendl;
+ LL_WARNS() << "Landmark to make callbacks for not found." << LL_ENDL;
}
// make all the callbacks here.
diff --git a/indra/newview/lllistcontextmenu.cpp b/indra/newview/lllistcontextmenu.cpp
index 6421ab42bf..a624c9fb87 100755
--- a/indra/newview/lllistcontextmenu.cpp
+++ b/indra/newview/lllistcontextmenu.cpp
@@ -80,7 +80,7 @@ void LLListContextMenu::show(LLView* spawning_view, const uuid_vec_t& uuids, S32
menup = createMenu();
if (!menup)
{
- llwarns << "Context menu creation failed" << llendl;
+ LL_WARNS() << "Context menu creation failed" << LL_ENDL;
return;
}
diff --git a/indra/newview/lllocalbitmaps.cpp b/indra/newview/lllocalbitmaps.cpp
index 2d9385390b..1948475530 100755
--- 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"
@@ -110,8 +111,8 @@ LLLocalBitmap::LLLocalBitmap(std::string filename)
}
else
{
- llwarns << "File of no valid extension given, local bitmap creation aborted." << "\n"
- << "Filename: " << mFilename << llendl;
+ LL_WARNS() << "File of no valid extension given, local bitmap creation aborted." << "\n"
+ << "Filename: " << mFilename << LL_ENDL;
return; // no valid extension.
}
@@ -230,10 +231,10 @@ bool LLLocalBitmap::updateSelf(EUpdateType optional_firstupdate)
}
else
{
- llwarns << "During the update process the following file was found" << "\n"
+ LL_WARNS() << "During the update process the following file was found" << "\n"
<< "but could not be opened or decoded for " << LL_LOCAL_UPDATE_RETRIES << " attempts." << "\n"
<< "Filename: " << mFilename << "\n"
- << "Disabling further update attempts for this file." << llendl;
+ << "Disabling further update attempts for this file." << LL_ENDL;
LLSD notif_args;
notif_args["FNAME"] = mFilename;
@@ -249,9 +250,9 @@ bool LLLocalBitmap::updateSelf(EUpdateType optional_firstupdate)
else
{
- llwarns << "During the update process, the following file was not found." << "\n"
+ LL_WARNS() << "During the update process, the following file was not found." << "\n"
<< "Filename: " << mFilename << "\n"
- << "Disabling further update attempts for this file." << llendl;
+ << "Disabling further update attempts for this file." << LL_ENDL;
LLSD notif_args;
notif_args["FNAME"] = mFilename;
@@ -317,13 +318,13 @@ bool LLLocalBitmap::decodeBitmap(LLPointer<LLImageRaw> rawimg)
default:
{
- // separating this into -several- llwarns calls because in the extremely unlikely case that this happens
+ // separating this into -several- LL_WARNS() calls because in the extremely unlikely case that this happens
// accessing mFilename and any other object properties might very well crash the viewer.
// getting here should be impossible, or there's been a pretty serious bug.
- llwarns << "During a decode attempt, the following local bitmap had no properly assigned extension." << llendl;
- llwarns << "Filename: " << mFilename << llendl;
- llwarns << "Disabling further update attempts for this file." << llendl;
+ LL_WARNS() << "During a decode attempt, the following local bitmap had no properly assigned extension." << LL_ENDL;
+ LL_WARNS() << "Filename: " << mFilename << LL_ENDL;
+ LL_WARNS() << "Disabling further update attempts for this file." << LL_ENDL;
mLinkStatus = LS_BROKEN;
}
}
@@ -336,8 +337,8 @@ void LLLocalBitmap::replaceIDs(LLUUID old_id, LLUUID new_id)
// checking for misuse.
if (old_id == new_id)
{
- llinfos << "An attempt was made to replace a texture with itself. (matching UUIDs)" << "\n"
- << "Texture UUID: " << old_id.asString() << llendl;
+ LL_INFOS() << "An attempt was made to replace a texture with itself. (matching UUIDs)" << "\n"
+ << "Texture UUID: " << old_id.asString() << LL_ENDL;
return;
}
@@ -378,7 +379,7 @@ std::vector<LLViewerObject*> LLLocalBitmap::prepUpdateObjects(LLUUID old_id, U32
{
std::vector<LLViewerObject*> obj_list;
LLViewerFetchedTexture* old_texture = gTextureList.findImage(old_id);
-
+
for(U32 face_iterator = 0; face_iterator < old_texture->getNumFaces(channel); face_iterator++)
{
// getting an object from a face
@@ -451,7 +452,7 @@ void LLLocalBitmap::updateUserPrims(LLUUID old_id, LLUUID new_id, U32 channel)
switch(channel)
{
case LLRender::DIFFUSE_MAP:
- {
+ {
object->setTETexture(face_iter, new_id);
update_tex = true;
break;
@@ -768,11 +769,11 @@ LLAvatarAppearanceDefines::ETextureIndex LLLocalBitmap::getTexIndex(
default:
{
- llwarns << "Unknown wearable type: " << (int)type << "\n"
+ LL_WARNS() << "Unknown wearable type: " << (int)type << "\n"
<< "Baked Texture Index: " << (int)baked_texind << "\n"
<< "Filename: " << mFilename << "\n"
<< "TrackingID: " << mTrackingID << "\n"
- << "InworldID: " << mWorldID << llendl;
+ << "InworldID: " << mWorldID << LL_ENDL;
}
}
@@ -844,8 +845,8 @@ bool LLLocalBitmapMgr::addUnit()
}
else
{
- llwarns << "Attempted to add invalid or unreadable image file, attempt cancelled.\n"
- << "Filename: " << filename << llendl;
+ LL_WARNS() << "Attempted to add invalid or unreadable image file, attempt cancelled.\n"
+ << "Filename: " << filename << LL_ENDL;
LLSD notif_args;
notif_args["FNAME"] = filename;
diff --git a/indra/newview/lllocalbitmaps.h b/indra/newview/lllocalbitmaps.h
index 2ee84bf46e..47c077dcab 100755
--- a/indra/newview/lllocalbitmaps.h
+++ b/indra/newview/lllocalbitmaps.h
@@ -30,11 +30,11 @@
#include "llavatarappearancedefines.h"
#include "lleventtimer.h"
-#include "llimage.h"
#include "llpointer.h"
#include "llwearabletype.h"
class LLScrollListCtrl;
+class LLImageRaw;
class LLViewerObject;
class LLLocalBitmap
diff --git a/indra/newview/lllocationhistory.cpp b/indra/newview/lllocationhistory.cpp
index 5138c5e620..680b35b550 100755
--- a/indra/newview/lllocationhistory.cpp
+++ b/indra/newview/lllocationhistory.cpp
@@ -107,11 +107,11 @@ bool LLLocationHistory::getMatchingItems(const std::string& substring, location_
void LLLocationHistory::dump() const
{
- llinfos << "Location history dump:" << llendl;
+ LL_INFOS() << "Location history dump:" << LL_ENDL;
int i = 0;
for (location_list_t::const_iterator it = mItems.begin(); it != mItems.end(); ++it, ++i)
{
- llinfos << "#" << std::setw(2) << std::setfill('0') << i << ": " << it->getLocation() << llendl;
+ LL_INFOS() << "#" << std::setw(2) << std::setfill('0') << i << ": " << it->getLocation() << LL_ENDL;
}
}
@@ -122,7 +122,7 @@ void LLLocationHistory::save() const
if (resolved_filename.empty())
{
- llinfos << "can't get path to location history filename - probably not logged in yet." << llendl;
+ LL_INFOS() << "can't get path to location history filename - probably not logged in yet." << LL_ENDL;
return;
}
@@ -130,7 +130,7 @@ void LLLocationHistory::save() const
llofstream file (resolved_filename);
if (!file.is_open())
{
- llwarns << "can't open location history file \"" << mFilename << "\" for writing" << llendl;
+ LL_WARNS() << "can't open location history file \"" << mFilename << "\" for writing" << LL_ENDL;
return;
}
@@ -144,7 +144,7 @@ void LLLocationHistory::save() const
void LLLocationHistory::load()
{
- llinfos << "Loading location history." << llendl;
+ LL_INFOS() << "Loading location history." << LL_ENDL;
// build filename for each user
std::string resolved_filename = gDirUtilp->getExpandedFilename(LL_PATH_PER_SL_ACCOUNT, mFilename);
@@ -152,7 +152,7 @@ void LLLocationHistory::load()
if (!file.is_open())
{
- llwarns << "can't load location history from file \"" << mFilename << "\"" << llendl;
+ LL_WARNS() << "can't load location history from file \"" << mFilename << "\"" << LL_ENDL;
return;
}
@@ -166,7 +166,7 @@ void LLLocationHistory::load()
std::istringstream iss(line);
if (parser->parse(iss, s_item, line.length()) == LLSDParser::PARSE_FAILURE)
{
- llinfos<< "Parsing saved teleport history failed" << llendl;
+ LL_INFOS()<< "Parsing saved teleport history failed" << LL_ENDL;
break;
}
diff --git a/indra/newview/lllocationinputctrl.cpp b/indra/newview/lllocationinputctrl.cpp
index dbdff11f11..af194aaa1d 100755
--- a/indra/newview/lllocationinputctrl.cpp
+++ b/indra/newview/lllocationinputctrl.cpp
@@ -384,7 +384,7 @@ LLLocationInputCtrl::LLLocationInputCtrl(const LLLocationInputCtrl::Params& p)
mLocationContextMenu = LLUICtrlFactory::getInstance()->createFromFile<LLMenuGL>("menu_navbar.xml", gMenuHolder, LLViewerMenuHolderGL::child_registry_t::instance());
if (!mLocationContextMenu)
{
- llwarns << "Error loading navigation bar context menu" << llendl;
+ LL_WARNS() << "Error loading navigation bar context menu" << LL_ENDL;
}
getTextEntry()->setRightMouseUpCallback(boost::bind(&LLLocationInputCtrl::onTextEditorRightClicked,this,_2,_3,_4));
@@ -777,7 +777,7 @@ void LLLocationInputCtrl::refreshLocation()
(mTextEntry && mTextEntry->hasFocus()) ||
(mAddLandmarkBtn->hasFocus()))
{
- llwarns << "Location input should not be refreshed when having focus" << llendl;
+ LL_WARNS() << "Location input should not be refreshed when having focus" << LL_ENDL;
return;
}
diff --git a/indra/newview/lllogchat.cpp b/indra/newview/lllogchat.cpp
index 90b169ecd3..92974b9cef 100755
--- a/indra/newview/lllogchat.cpp
+++ b/indra/newview/lllogchat.cpp
@@ -293,7 +293,7 @@ void LLLogChat::saveHistory(const std::string& filename,
if (tmp_filename.empty())
{
std::string warn = "Chat history filename [" + filename + "] is empty!";
- llwarning(warn, 666);
+ LL_WARNS() << warn << LL_ENDL;
llassert(tmp_filename.size());
return;
}
@@ -301,7 +301,7 @@ void LLLogChat::saveHistory(const std::string& filename,
llofstream file (LLLogChat::makeLogFileName(filename), std::ios_base::app);
if (!file.is_open())
{
- llwarns << "Couldn't open chat history log! - " + filename << llendl;
+ LL_WARNS() << "Couldn't open chat history log! - " + filename << LL_ENDL;
return;
}
@@ -711,7 +711,7 @@ void LLChatLogFormatter::format(const LLSD& im, std::ostream& ostr) const
{
if (!im.isMap())
{
- llwarning("invalid LLSD type of an instant message", 0);
+ LL_WARNS() << "invalid LLSD type of an instant message" << LL_ENDL;
return;
}
@@ -845,115 +845,115 @@ bool LLChatLogParser::parse(std::string& raw, LLSD& im, const LLSD& parse_params
return true; //parsed name and message text, maybe have a timestamp too
}
+LLLoadHistoryThread::LLLoadHistoryThread() : LLThread("load chat history")
+{
+ mNewLoad = false;
+}
-
- LLLoadHistoryThread::LLLoadHistoryThread() : LLThread("load chat history")
- {
- mNewLoad = false;
- }
-
- void LLLoadHistoryThread::run()
- {
- while (!LLApp::isQuitting())
- {
- if(mNewLoad)
- {
- loadHistory(mFileName,mMessages,mLoadParams);
- shutdown();
- }
- }
- }
- void LLLoadHistoryThread::setHistoryParams(const std::string& file_name, const LLSD& load_params)
+void LLLoadHistoryThread::run()
+{
+ while (!LLApp::isQuitting())
{
- mFileName = file_name;
- mLoadParams = load_params;
- mNewLoad = true;
+ if(mNewLoad)
+ {
+ loadHistory(mFileName,mMessages,mLoadParams);
+ break;
+ }
}
- void LLLoadHistoryThread::loadHistory(const std::string& file_name, std::list<LLSD>& messages, const LLSD& load_params)
- {
-
- if (file_name.empty())
- {
- LL_WARNS("LLLogChat::loadHistory") << "Session name is Empty!" << LL_ENDL;
- return ;
- }
-
- bool load_all_history = load_params.has("load_all_history") ? load_params["load_all_history"].asBoolean() : false;
+}
- LLFILE* fptr = LLFile::fopen(LLLogChat::makeLogFileName(file_name), "r");/*Flawfinder: ignore*/
- if (!fptr)
- {
- fptr = LLFile::fopen(LLLogChat::oldLogFileName(file_name), "r");/*Flawfinder: ignore*/
- if (!fptr)
- {
- mNewLoad = false;
- (*mLoadEndSignal)(messages, file_name);
- return; //No previous conversation with this name.
- }
- }
+void LLLoadHistoryThread::setHistoryParams(const std::string& file_name, const LLSD& load_params)
+{
+ mFileName = file_name;
+ mLoadParams = load_params;
+ mNewLoad = true;
+}
- char buffer[LOG_RECALL_SIZE]; /*Flawfinder: ignore*/
- char *bptr;
- S32 len;
- bool firstline = TRUE;
+void LLLoadHistoryThread::loadHistory(const std::string& file_name, std::list<LLSD>& messages, const LLSD& load_params)
+{
+ if (file_name.empty())
+ {
+ LL_WARNS("LLLogChat::loadHistory") << "Session name is Empty!" << LL_ENDL;
+ return ;
+ }
- if (load_all_history || fseek(fptr, (LOG_RECALL_SIZE - 1) * -1 , SEEK_END))
- { //We need to load the whole historyFile or it's smaller than recall size, so get it all.
- firstline = FALSE;
- if (fseek(fptr, 0, SEEK_SET))
- {
- fclose(fptr);
- mNewLoad = false;
- (*mLoadEndSignal)(messages, file_name);
- return;
- }
- }
- while (fgets(buffer, LOG_RECALL_SIZE, fptr) && !feof(fptr))
- {
- len = strlen(buffer) - 1; /*Flawfinder: ignore*/
- for (bptr = (buffer + len); (*bptr == '\n' || *bptr == '\r') && bptr>buffer; bptr--) *bptr='\0';
+ bool load_all_history = load_params.has("load_all_history") ? load_params["load_all_history"].asBoolean() : false;
- if (firstline)
- {
- firstline = FALSE;
- continue;
- }
+ LLFILE* fptr = LLFile::fopen(LLLogChat::makeLogFileName(file_name), "r");/*Flawfinder: ignore*/
+ if (!fptr)
+ {
+ fptr = LLFile::fopen(LLLogChat::oldLogFileName(file_name), "r");/*Flawfinder: ignore*/
+ if (!fptr)
+ {
+ mNewLoad = false;
+ (*mLoadEndSignal)(messages, file_name);
+ return; //No previous conversation with this name.
+ }
+ }
- std::string line(buffer);
+ char buffer[LOG_RECALL_SIZE]; /*Flawfinder: ignore*/
+ char *bptr;
+ S32 len;
+ bool firstline = TRUE;
- //updated 1.23 plaint text log format requires a space added before subsequent lines in a multilined message
- if (' ' == line[0])
- {
- line.erase(0, MULTI_LINE_PREFIX.length());
- append_to_last_message(messages, '\n' + line);
- }
- else if (0 == len && ('\n' == line[0] || '\r' == line[0]))
- {
- //to support old format's multilined messages with new lines used to divide paragraphs
- append_to_last_message(messages, line);
- }
- else
- {
- LLSD item;
- if (!LLChatLogParser::parse(line, item, load_params))
- {
- item[LL_IM_TEXT] = line;
- }
- messages.push_back(item);
- }
- }
+ if (load_all_history || fseek(fptr, (LOG_RECALL_SIZE - 1) * -1 , SEEK_END))
+ { //We need to load the whole historyFile or it's smaller than recall size, so get it all.
+ firstline = FALSE;
+ if (fseek(fptr, 0, SEEK_SET))
+ {
fclose(fptr);
mNewLoad = false;
(*mLoadEndSignal)(messages, file_name);
+ return;
+ }
}
- //static
- boost::signals2::connection LLLoadHistoryThread::setLoadEndSignal(const load_end_signal_t::slot_type& cb)
+ while (fgets(buffer, LOG_RECALL_SIZE, fptr) && !feof(fptr))
{
- if (NULL == mLoadEndSignal)
+ len = strlen(buffer) - 1; /*Flawfinder: ignore*/
+ for (bptr = (buffer + len); (*bptr == '\n' || *bptr == '\r') && bptr>buffer; bptr--) *bptr='\0';
+
+ if (firstline)
{
- mLoadEndSignal = new load_end_signal_t();
+ firstline = FALSE;
+ continue;
}
- return mLoadEndSignal->connect(cb);
+ std::string line(buffer);
+
+ //updated 1.23 plaint text log format requires a space added before subsequent lines in a multilined message
+ if (' ' == line[0])
+ {
+ line.erase(0, MULTI_LINE_PREFIX.length());
+ append_to_last_message(messages, '\n' + line);
+ }
+ else if (0 == len && ('\n' == line[0] || '\r' == line[0]))
+ {
+ //to support old format's multilined messages with new lines used to divide paragraphs
+ append_to_last_message(messages, line);
+ }
+ else
+ {
+ LLSD item;
+ if (!LLChatLogParser::parse(line, item, load_params))
+ {
+ item[LL_IM_TEXT] = line;
+ }
+ messages.push_back(item);
+ }
}
+ fclose(fptr);
+ mNewLoad = false;
+ (*mLoadEndSignal)(messages, file_name);
+}
+
+//static
+boost::signals2::connection LLLoadHistoryThread::setLoadEndSignal(const load_end_signal_t::slot_type& cb)
+{
+ if (NULL == mLoadEndSignal)
+ {
+ mLoadEndSignal = new load_end_signal_t();
+ }
+
+ return mLoadEndSignal->connect(cb);
+}
diff --git a/indra/newview/lllogchat.h b/indra/newview/lllogchat.h
index acee99afa2..86610f99b3 100755
--- a/indra/newview/lllogchat.h
+++ b/indra/newview/lllogchat.h
@@ -26,6 +26,7 @@
#ifndef LL_LLLOGCHAT_H
#define LL_LLLOGCHAT_H
+#include "llthread.h"
class LLChat;
class LLLoadHistoryThread : public LLThread
diff --git a/indra/newview/lllogininstance.cpp b/indra/newview/lllogininstance.cpp
index f681c12747..df59283bc4 100755
--- a/indra/newview/lllogininstance.cpp
+++ b/indra/newview/lllogininstance.cpp
@@ -202,7 +202,7 @@ MandatoryUpdateMachine::MandatoryUpdateMachine(LLLoginInstance & loginInstance,
void MandatoryUpdateMachine::start(void)
{
- llinfos << "starting mandatory update machine" << llendl;
+ LL_INFOS() << "starting mandatory update machine" << LL_ENDL;
if(mUpdaterService.isChecking()) {
switch(mUpdaterService.getState()) {
@@ -268,7 +268,7 @@ MandatoryUpdateMachine::CheckingForUpdate::CheckingForUpdate(MandatoryUpdateMach
void MandatoryUpdateMachine::CheckingForUpdate::enter(void)
{
- llinfos << "entering checking for update" << llendl;
+ LL_INFOS() << "entering checking for update" << LL_ENDL;
mProgressView = gViewerWindow->getProgressView();
mProgressView->setMessage("Looking for update...");
@@ -327,7 +327,7 @@ MandatoryUpdateMachine::Error::Error(MandatoryUpdateMachine & machine):
void MandatoryUpdateMachine::Error::enter(void)
{
- llinfos << "entering error" << llendl;
+ LL_INFOS() << "entering error" << LL_ENDL;
LLNotificationsUtil::add("FailedRequiredUpdateInstall", LLSD(), LLSD(), boost::bind(&MandatoryUpdateMachine::Error::onButtonClicked, this, _1, _2));
}
@@ -358,7 +358,7 @@ MandatoryUpdateMachine::ReadyToInstall::ReadyToInstall(MandatoryUpdateMachine &
void MandatoryUpdateMachine::ReadyToInstall::enter(void)
{
- llinfos << "entering ready to install" << llendl;
+ LL_INFOS() << "entering ready to install" << LL_ENDL;
// Open update ready dialog.
}
@@ -383,7 +383,7 @@ MandatoryUpdateMachine::StartingUpdaterService::StartingUpdaterService(Mandatory
void MandatoryUpdateMachine::StartingUpdaterService::enter(void)
{
- llinfos << "entering start update service" << llendl;
+ LL_INFOS() << "entering start update service" << LL_ENDL;
LLNotificationsUtil::add("UpdaterServiceNotRunning", LLSD(), LLSD(), boost::bind(&MandatoryUpdateMachine::StartingUpdaterService::onButtonClicked, this, _1, _2));
}
@@ -420,7 +420,7 @@ MandatoryUpdateMachine::WaitingForDownload::WaitingForDownload(MandatoryUpdateMa
void MandatoryUpdateMachine::WaitingForDownload::enter(void)
{
- llinfos << "entering waiting for download" << llendl;
+ LL_INFOS() << "entering waiting for download" << LL_ENDL;
mProgressView = gViewerWindow->getProgressView();
mProgressView->setMessage("Downloading update...");
std::ostringstream stream;
@@ -589,7 +589,7 @@ void LLLoginInstance::constructAuthParams(LLPointer<LLCredential> user_credentia
unsigned char hashed_unique_id_string[MD5HEX_STR_SIZE];
if ( ! llHashedUniqueID(hashed_unique_id_string) )
{
- llwarns << "Not providing a unique id in request params" << llendl;
+ LL_WARNS() << "Not providing a unique id in request params" << LL_ENDL;
}
request_params["start"] = construct_start_string();
request_params["skipoptional"] = mSkipOptionalUpdate;
@@ -621,7 +621,7 @@ bool LLLoginInstance::handleLoginEvent(const LLSD& event)
if(!(event.has("state") && event.has("change") && event.has("progress")))
{
- llerrs << "Unknown message from LLLogin: " << event << llendl;
+ LL_ERRS() << "Unknown message from LLLogin: " << event << LL_ENDL;
}
mLoginState = event["state"].asString();
@@ -656,7 +656,7 @@ void LLLoginInstance::handleLoginFailure(const LLSD& event)
// to reconnect or to end the attempt in failure.
if(reason_response == "tos")
{
- llinfos << "LLLoginInstance::handleLoginFailure ToS" << llendl;
+ LL_INFOS() << "LLLoginInstance::handleLoginFailure ToS" << LL_ENDL;
LLSD data(LLSD::emptyMap());
data["message"] = message_response;
@@ -671,7 +671,7 @@ void LLLoginInstance::handleLoginFailure(const LLSD& event)
}
else if(reason_response == "critical")
{
- llinfos << "LLLoginInstance::handleLoginFailure Crit" << llendl;
+ LL_INFOS() << "LLLoginInstance::handleLoginFailure Crit" << LL_ENDL;
LLSD data(LLSD::emptyMap());
data["message"] = message_response;
@@ -696,27 +696,27 @@ void LLLoginInstance::handleLoginFailure(const LLSD& event)
}
else if(reason_response == "update" || gSavedSettings.getBOOL("ForceMandatoryUpdate"))
{
- llinfos << "LLLoginInstance::handleLoginFailure update" << llendl;
+ LL_INFOS() << "LLLoginInstance::handleLoginFailure update" << LL_ENDL;
gSavedSettings.setBOOL("ForceMandatoryUpdate", FALSE);
updateApp(true, message_response);
}
else if(reason_response == "optional")
{
- llinfos << "LLLoginInstance::handleLoginFailure optional" << llendl;
+ LL_INFOS() << "LLLoginInstance::handleLoginFailure optional" << LL_ENDL;
updateApp(false, message_response);
}
else
{
- llinfos << "LLLoginInstance::handleLoginFailure attemptComplete" << llendl;
+ LL_INFOS() << "LLLoginInstance::handleLoginFailure attemptComplete" << LL_ENDL;
attemptComplete();
}
}
void LLLoginInstance::handleLoginSuccess(const LLSD& event)
{
- llinfos << "LLLoginInstance::handleLoginSuccess" << llendl;
+ LL_INFOS() << "LLLoginInstance::handleLoginSuccess" << LL_ENDL;
if(gSavedSettings.getBOOL("ForceMandatoryUpdate"))
{
@@ -740,7 +740,7 @@ void LLLoginInstance::handleDisconnect(const LLSD& event)
{
// placeholder
- llinfos << "LLLoginInstance::handleDisconnect placeholder " << llendl;
+ LL_INFOS() << "LLLoginInstance::handleDisconnect placeholder " << LL_ENDL;
}
void LLLoginInstance::handleIndeterminate(const LLSD& event)
@@ -754,7 +754,7 @@ void LLLoginInstance::handleIndeterminate(const LLSD& event)
LLSD message = event.get("data").get("message");
if(message.isDefined())
{
- llinfos << "LLLoginInstance::handleIndeterminate " << message.asString() << llendl;
+ LL_INFOS() << "LLLoginInstance::handleIndeterminate " << message.asString() << LL_ENDL;
LLSD progress_update;
progress_update["desc"] = message;
@@ -766,7 +766,7 @@ bool LLLoginInstance::handleTOSResponse(bool accepted, const std::string& key)
{
if(accepted)
{
- llinfos << "LLLoginInstance::handleTOSResponse: accepted" << llendl;
+ LL_INFOS() << "LLLoginInstance::handleTOSResponse: accepted" << LL_ENDL;
// Set the request data to true and retry login.
mRequestData["params"][key] = true;
@@ -774,7 +774,7 @@ bool LLLoginInstance::handleTOSResponse(bool accepted, const std::string& key)
}
else
{
- llinfos << "LLLoginInstance::handleTOSResponse: attemptComplete" << llendl;
+ LL_INFOS() << "LLLoginInstance::handleTOSResponse: attemptComplete" << LL_ENDL;
attemptComplete();
}
diff --git a/indra/newview/llmainlooprepeater.cpp b/indra/newview/llmainlooprepeater.cpp
index 5c020e6d98..db8d2e4ede 100755
--- a/indra/newview/llmainlooprepeater.cpp
+++ b/indra/newview/llmainlooprepeater.cpp
@@ -81,7 +81,7 @@ bool LLMainLoopRepeater::onMessage(LLSD const & event)
try {
mQueue->pushFront(event);
} catch(LLThreadSafeQueueError & e) {
- llwarns << "could not repeat message (" << e.what() << ")" <<
+ LL_WARNS() << "could not repeat message (" << e.what() << ")" <<
event.asString() << LL_ENDL;
}
return false;
diff --git a/indra/newview/llmanip.cpp b/indra/newview/llmanip.cpp
index a7d6cb5eac..bbcdcb126d 100755
--- a/indra/newview/llmanip.cpp
+++ b/indra/newview/llmanip.cpp
@@ -226,11 +226,11 @@ BOOL LLManip::handleHover(S32 x, S32 y, MASK mask)
setMouseCapture( FALSE );
}
- lldebugst(LLERR_USER_INPUT) << "hover handled by LLManip (active)" << llendl;
+ LL_DEBUGS("UserInput") << "hover handled by LLManip (active)" << LL_ENDL;
}
else
{
- lldebugst(LLERR_USER_INPUT) << "hover handled by LLManip (inactive)" << llendl;
+ LL_DEBUGS("UserInput") << "hover handled by LLManip (inactive)" << LL_ENDL;
}
gViewerWindow->setCursor(UI_CURSOR_ARROW);
return TRUE;
diff --git a/indra/newview/llmaniprotate.cpp b/indra/newview/llmaniprotate.cpp
index 4cbdfde868..8185cbb1a3 100755
--- a/indra/newview/llmaniprotate.cpp
+++ b/indra/newview/llmaniprotate.cpp
@@ -240,7 +240,7 @@ void LLManipRotate::render()
if (mManipPart == LL_ROT_Z)
{
- mManipulatorScales = lerp(mManipulatorScales, LLVector4(1.f, 1.f, SELECTED_MANIPULATOR_SCALE, 1.f), LLCriticalDamp::getInterpolant(MANIPULATOR_SCALE_HALF_LIFE));
+ mManipulatorScales = lerp(mManipulatorScales, LLVector4(1.f, 1.f, SELECTED_MANIPULATOR_SCALE, 1.f), LLSmoothInterpolation::getInterpolant(MANIPULATOR_SCALE_HALF_LIFE));
gGL.pushMatrix();
{
// selected part
@@ -251,7 +251,7 @@ void LLManipRotate::render()
}
else if (mManipPart == LL_ROT_Y)
{
- mManipulatorScales = lerp(mManipulatorScales, LLVector4(1.f, SELECTED_MANIPULATOR_SCALE, 1.f, 1.f), LLCriticalDamp::getInterpolant(MANIPULATOR_SCALE_HALF_LIFE));
+ mManipulatorScales = lerp(mManipulatorScales, LLVector4(1.f, SELECTED_MANIPULATOR_SCALE, 1.f, 1.f), LLSmoothInterpolation::getInterpolant(MANIPULATOR_SCALE_HALF_LIFE));
gGL.pushMatrix();
{
gGL.rotatef( 90.f, 1.f, 0.f, 0.f );
@@ -262,7 +262,7 @@ void LLManipRotate::render()
}
else if (mManipPart == LL_ROT_X)
{
- mManipulatorScales = lerp(mManipulatorScales, LLVector4(SELECTED_MANIPULATOR_SCALE, 1.f, 1.f, 1.f), LLCriticalDamp::getInterpolant(MANIPULATOR_SCALE_HALF_LIFE));
+ mManipulatorScales = lerp(mManipulatorScales, LLVector4(SELECTED_MANIPULATOR_SCALE, 1.f, 1.f, 1.f), LLSmoothInterpolation::getInterpolant(MANIPULATOR_SCALE_HALF_LIFE));
gGL.pushMatrix();
{
gGL.rotatef( 90.f, 0.f, 1.f, 0.f );
@@ -273,13 +273,13 @@ void LLManipRotate::render()
}
else if (mManipPart == LL_ROT_ROLL)
{
- mManipulatorScales = lerp(mManipulatorScales, LLVector4(1.f, 1.f, 1.f, SELECTED_MANIPULATOR_SCALE), LLCriticalDamp::getInterpolant(MANIPULATOR_SCALE_HALF_LIFE));
+ mManipulatorScales = lerp(mManipulatorScales, LLVector4(1.f, 1.f, 1.f, SELECTED_MANIPULATOR_SCALE), LLSmoothInterpolation::getInterpolant(MANIPULATOR_SCALE_HALF_LIFE));
}
else if (mManipPart == LL_NO_PART)
{
if (mHighlightedPart == LL_NO_PART)
{
- mManipulatorScales = lerp(mManipulatorScales, LLVector4(1.f, 1.f, 1.f, 1.f), LLCriticalDamp::getInterpolant(MANIPULATOR_SCALE_HALF_LIFE));
+ mManipulatorScales = lerp(mManipulatorScales, LLVector4(1.f, 1.f, 1.f, 1.f), LLSmoothInterpolation::getInterpolant(MANIPULATOR_SCALE_HALF_LIFE));
}
LLGLEnable cull_face(GL_CULL_FACE);
@@ -294,7 +294,7 @@ void LLManipRotate::render()
{
if (mHighlightedPart == LL_ROT_Z)
{
- mManipulatorScales = lerp(mManipulatorScales, LLVector4(1.f, 1.f, SELECTED_MANIPULATOR_SCALE, 1.f), LLCriticalDamp::getInterpolant(MANIPULATOR_SCALE_HALF_LIFE));
+ mManipulatorScales = lerp(mManipulatorScales, LLVector4(1.f, 1.f, SELECTED_MANIPULATOR_SCALE, 1.f), LLSmoothInterpolation::getInterpolant(MANIPULATOR_SCALE_HALF_LIFE));
gGL.scalef(mManipulatorScales.mV[VZ], mManipulatorScales.mV[VZ], mManipulatorScales.mV[VZ]);
// hovering over part
gl_ring( mRadiusMeters, width_meters, LLColor4( 0.f, 0.f, 1.f, 1.f ), LLColor4( 0.f, 0.f, 1.f, 0.5f ), CIRCLE_STEPS, i);
@@ -312,7 +312,7 @@ void LLManipRotate::render()
gGL.rotatef( 90.f, 1.f, 0.f, 0.f );
if (mHighlightedPart == LL_ROT_Y)
{
- mManipulatorScales = lerp(mManipulatorScales, LLVector4(1.f, SELECTED_MANIPULATOR_SCALE, 1.f, 1.f), LLCriticalDamp::getInterpolant(MANIPULATOR_SCALE_HALF_LIFE));
+ mManipulatorScales = lerp(mManipulatorScales, LLVector4(1.f, SELECTED_MANIPULATOR_SCALE, 1.f, 1.f), LLSmoothInterpolation::getInterpolant(MANIPULATOR_SCALE_HALF_LIFE));
gGL.scalef(mManipulatorScales.mV[VY], mManipulatorScales.mV[VY], mManipulatorScales.mV[VY]);
// hovering over part
gl_ring( mRadiusMeters, width_meters, LLColor4( 0.f, 1.f, 0.f, 1.f ), LLColor4( 0.f, 1.f, 0.f, 0.5f ), CIRCLE_STEPS, i);
@@ -330,7 +330,7 @@ void LLManipRotate::render()
gGL.rotatef( 90.f, 0.f, 1.f, 0.f );
if (mHighlightedPart == LL_ROT_X)
{
- mManipulatorScales = lerp(mManipulatorScales, LLVector4(SELECTED_MANIPULATOR_SCALE, 1.f, 1.f, 1.f), LLCriticalDamp::getInterpolant(MANIPULATOR_SCALE_HALF_LIFE));
+ mManipulatorScales = lerp(mManipulatorScales, LLVector4(SELECTED_MANIPULATOR_SCALE, 1.f, 1.f, 1.f), LLSmoothInterpolation::getInterpolant(MANIPULATOR_SCALE_HALF_LIFE));
gGL.scalef(mManipulatorScales.mV[VX], mManipulatorScales.mV[VX], mManipulatorScales.mV[VX]);
// hovering over part
@@ -346,7 +346,7 @@ void LLManipRotate::render()
if (mHighlightedPart == LL_ROT_ROLL)
{
- mManipulatorScales = lerp(mManipulatorScales, LLVector4(1.f, 1.f, 1.f, SELECTED_MANIPULATOR_SCALE), LLCriticalDamp::getInterpolant(MANIPULATOR_SCALE_HALF_LIFE));
+ mManipulatorScales = lerp(mManipulatorScales, LLVector4(1.f, 1.f, 1.f, SELECTED_MANIPULATOR_SCALE), LLSmoothInterpolation::getInterpolant(MANIPULATOR_SCALE_HALF_LIFE));
}
}
@@ -519,12 +519,12 @@ BOOL LLManipRotate::handleHover(S32 x, S32 y, MASK mask)
drag(x, y);
}
- lldebugst(LLERR_USER_INPUT) << "hover handled by LLManipRotate (active)" << llendl;
+ LL_DEBUGS("UserInput") << "hover handled by LLManipRotate (active)" << LL_ENDL;
}
else
{
highlightManipulators(x, y);
- lldebugst(LLERR_USER_INPUT) << "hover handled by LLManipRotate (inactive)" << llendl;
+ LL_DEBUGS("UserInput") << "hover handled by LLManipRotate (inactive)" << LL_ENDL;
}
gViewerWindow->setCursor(UI_CURSOR_TOOLROTATE);
@@ -1272,9 +1272,9 @@ LLVector3 LLManipRotate::getConstraintAxis()
else
{
#ifndef LL_RELEASE_FOR_DOWNLOAD
- llerrs << "Got bogus hit part in LLManipRotate::getConstraintAxis():" << mManipPart << llendl;
+ LL_ERRS() << "Got bogus hit part in LLManipRotate::getConstraintAxis():" << mManipPart << LL_ENDL;
#else
- llwarns << "Got bogus hit part in LLManipRotate::getConstraintAxis():" << mManipPart << llendl;
+ LL_WARNS() << "Got bogus hit part in LLManipRotate::getConstraintAxis():" << mManipPart << LL_ENDL;
#endif
axis.mV[0] = 1.f;
}
diff --git a/indra/newview/llmanipscale.cpp b/indra/newview/llmanipscale.cpp
index ae0884ac5d..a63f6f424c 100755
--- a/indra/newview/llmanipscale.cpp
+++ b/indra/newview/llmanipscale.cpp
@@ -413,7 +413,7 @@ BOOL LLManipScale::handleHover(S32 x, S32 y, MASK mask)
{
drag( x, y );
}
- lldebugst(LLERR_USER_INPUT) << "hover handled by LLManipScale (active)" << llendl;
+ LL_DEBUGS("UserInput") << "hover handled by LLManipScale (active)" << LL_ENDL;
}
else
{
@@ -524,7 +524,7 @@ void LLManipScale::highlightManipulators(S32 x, S32 y)
{
mHighlightedPart = manipulator->mManipID;
- //llinfos << "Tried: " << mHighlightedPart << llendl;
+ //LL_INFOS() << "Tried: " << mHighlightedPart << LL_ENDL;
break;
}
}
@@ -535,15 +535,15 @@ void LLManipScale::highlightManipulators(S32 x, S32 y)
{
if (mHighlightedPart == MANIPULATOR_IDS[i])
{
- mManipulatorScales[i] = lerp(mManipulatorScales[i], SELECTED_MANIPULATOR_SCALE, LLCriticalDamp::getInterpolant(MANIPULATOR_SCALE_HALF_LIFE));
+ mManipulatorScales[i] = lerp(mManipulatorScales[i], SELECTED_MANIPULATOR_SCALE, LLSmoothInterpolation::getInterpolant(MANIPULATOR_SCALE_HALF_LIFE));
}
else
{
- mManipulatorScales[i] = lerp(mManipulatorScales[i], 1.f, LLCriticalDamp::getInterpolant(MANIPULATOR_SCALE_HALF_LIFE));
+ mManipulatorScales[i] = lerp(mManipulatorScales[i], 1.f, LLSmoothInterpolation::getInterpolant(MANIPULATOR_SCALE_HALF_LIFE));
}
}
- lldebugst(LLERR_USER_INPUT) << "hover handled by LLManipScale (inactive)" << llendl;
+ LL_DEBUGS("UserInput") << "hover handled by LLManipScale (inactive)" << LL_ENDL;
}
diff --git a/indra/newview/llmaniptranslate.cpp b/indra/newview/llmaniptranslate.cpp
index 06bf294417..da8235ee5f 100755
--- a/indra/newview/llmaniptranslate.cpp
+++ b/indra/newview/llmaniptranslate.cpp
@@ -355,7 +355,7 @@ BOOL LLManipTranslate::handleMouseDownOnPart( S32 x, S32 y, MASK mask )
if (!selectNode)
{
// didn't find the object in our selection...oh well
- llwarns << "Trying to translate an unselected object" << llendl;
+ LL_WARNS() << "Trying to translate an unselected object" << LL_ENDL;
return TRUE;
}
@@ -363,7 +363,7 @@ BOOL LLManipTranslate::handleMouseDownOnPart( S32 x, S32 y, MASK mask )
if (!selected_object)
{
// somehow we lost the object!
- llwarns << "Translate manip lost the object, no selected object" << llendl;
+ LL_WARNS() << "Translate manip lost the object, no selected object" << LL_ENDL;
gViewerWindow->setCursor(UI_CURSOR_TOOLTRANSLATE);
return TRUE;
}
@@ -384,7 +384,7 @@ BOOL LLManipTranslate::handleMouseDownOnPart( S32 x, S32 y, MASK mask )
if (!LLViewerCamera::getInstance()->projectPosAgentToScreen(select_center_agent, mouse_pos))
{
// mouse_pos may be nonsense
- llwarns << "Failed to project object center to screen" << llendl;
+ LL_WARNS() << "Failed to project object center to screen" << LL_ENDL;
}
else if (gSavedSettings.getBOOL("SnapToMouseCursor"))
{
@@ -412,7 +412,7 @@ BOOL LLManipTranslate::handleHover(S32 x, S32 y, MASK mask)
// Bail out if mouse not down.
if( !hasMouseCapture() )
{
- lldebugst(LLERR_USER_INPUT) << "hover handled by LLManipTranslate (inactive)" << llendl;
+ LL_DEBUGS("UserInput") << "hover handled by LLManipTranslate (inactive)" << LL_ENDL;
// Always show cursor
// gViewerWindow->setCursor(UI_CURSOR_ARROW);
gViewerWindow->setCursor(UI_CURSOR_TOOLTRANSLATE);
@@ -448,7 +448,7 @@ BOOL LLManipTranslate::handleHover(S32 x, S32 y, MASK mask)
// rotation above.
if( x == mLastHoverMouseX && y == mLastHoverMouseY && !rotated)
{
- lldebugst(LLERR_USER_INPUT) << "hover handled by LLManipTranslate (mouse unmoved)" << llendl;
+ LL_DEBUGS("UserInput") << "hover handled by LLManipTranslate (mouse unmoved)" << LL_ENDL;
gViewerWindow->setCursor(UI_CURSOR_TOOLTRANSLATE);
return TRUE;
}
@@ -461,7 +461,7 @@ BOOL LLManipTranslate::handleHover(S32 x, S32 y, MASK mask)
{
if (abs(mMouseDownX - x) < MOUSE_DRAG_SLOP && abs(mMouseDownY - y) < MOUSE_DRAG_SLOP )
{
- lldebugst(LLERR_USER_INPUT) << "hover handled by LLManipTranslate (mouse inside slop)" << llendl;
+ LL_DEBUGS("UserInput") << "hover handled by LLManipTranslate (mouse inside slop)" << LL_ENDL;
gViewerWindow->setCursor(UI_CURSOR_TOOLTRANSLATE);
return TRUE;
}
@@ -478,7 +478,7 @@ BOOL LLManipTranslate::handleHover(S32 x, S32 y, MASK mask)
// When we make the copy, we don't want to do any other processing.
// If so, the object will also be moved, and the copy will be offset.
- lldebugst(LLERR_USER_INPUT) << "hover handled by LLManipTranslate (made copy)" << llendl;
+ LL_DEBUGS("UserInput") << "hover handled by LLManipTranslate (made copy)" << LL_ENDL;
gViewerWindow->setCursor(UI_CURSOR_TOOLTRANSLATE);
}
}
@@ -495,7 +495,7 @@ BOOL LLManipTranslate::handleHover(S32 x, S32 y, MASK mask)
if (!selectNode)
{
// somehow we lost the object!
- llwarns << "Translate manip lost the object, no selectNode" << llendl;
+ LL_WARNS() << "Translate manip lost the object, no selectNode" << LL_ENDL;
gViewerWindow->setCursor(UI_CURSOR_TOOLTRANSLATE);
return TRUE;
}
@@ -504,7 +504,7 @@ BOOL LLManipTranslate::handleHover(S32 x, S32 y, MASK mask)
if (!object)
{
// somehow we lost the object!
- llwarns << "Translate manip lost the object, no object in selectNode" << llendl;
+ LL_WARNS() << "Translate manip lost the object, no object in selectNode" << LL_ENDL;
gViewerWindow->setCursor(UI_CURSOR_TOOLTRANSLATE);
return TRUE;
}
@@ -531,7 +531,7 @@ BOOL LLManipTranslate::handleHover(S32 x, S32 y, MASK mask)
if (relative_move.magVecSquared() > max_drag_distance * max_drag_distance)
{
- lldebugst(LLERR_USER_INPUT) << "hover handled by LLManipTranslate (too far)" << llendl;
+ LL_DEBUGS("UserInput") << "hover handled by LLManipTranslate (too far)" << LL_ENDL;
gViewerWindow->setCursor(UI_CURSOR_NOLOCKED);
return TRUE;
}
@@ -776,7 +776,7 @@ BOOL LLManipTranslate::handleHover(S32 x, S32 y, MASK mask)
gAgentCamera.clearFocusObject();
dialog_refresh_all(); // ??? is this necessary?
- lldebugst(LLERR_USER_INPUT) << "hover handled by LLManipTranslate (active)" << llendl;
+ LL_DEBUGS("UserInput") << "hover handled by LLManipTranslate (active)" << LL_ENDL;
gViewerWindow->setCursor(UI_CURSOR_TOOLTRANSLATE);
return TRUE;
}
@@ -1905,18 +1905,18 @@ void LLManipTranslate::renderTranslationHandles()
{
if (index == mManipPart - LL_X_ARROW || index == mHighlightedPart - LL_X_ARROW)
{
- mArrowScales.mV[index] = lerp(mArrowScales.mV[index], SELECTED_ARROW_SCALE, LLCriticalDamp::getInterpolant(MANIPULATOR_SCALE_HALF_LIFE ));
- mPlaneScales.mV[index] = lerp(mPlaneScales.mV[index], 1.f, LLCriticalDamp::getInterpolant(MANIPULATOR_SCALE_HALF_LIFE ));
+ mArrowScales.mV[index] = lerp(mArrowScales.mV[index], SELECTED_ARROW_SCALE, LLSmoothInterpolation::getInterpolant(MANIPULATOR_SCALE_HALF_LIFE ));
+ mPlaneScales.mV[index] = lerp(mPlaneScales.mV[index], 1.f, LLSmoothInterpolation::getInterpolant(MANIPULATOR_SCALE_HALF_LIFE ));
}
else if (index == mManipPart - LL_YZ_PLANE || index == mHighlightedPart - LL_YZ_PLANE)
{
- mArrowScales.mV[index] = lerp(mArrowScales.mV[index], 1.f, LLCriticalDamp::getInterpolant(MANIPULATOR_SCALE_HALF_LIFE ));
- mPlaneScales.mV[index] = lerp(mPlaneScales.mV[index], SELECTED_ARROW_SCALE, LLCriticalDamp::getInterpolant(MANIPULATOR_SCALE_HALF_LIFE ));
+ mArrowScales.mV[index] = lerp(mArrowScales.mV[index], 1.f, LLSmoothInterpolation::getInterpolant(MANIPULATOR_SCALE_HALF_LIFE ));
+ mPlaneScales.mV[index] = lerp(mPlaneScales.mV[index], SELECTED_ARROW_SCALE, LLSmoothInterpolation::getInterpolant(MANIPULATOR_SCALE_HALF_LIFE ));
}
else
{
- mArrowScales.mV[index] = lerp(mArrowScales.mV[index], 1.f, LLCriticalDamp::getInterpolant(MANIPULATOR_SCALE_HALF_LIFE ));
- mPlaneScales.mV[index] = lerp(mPlaneScales.mV[index], 1.f, LLCriticalDamp::getInterpolant(MANIPULATOR_SCALE_HALF_LIFE ));
+ mArrowScales.mV[index] = lerp(mArrowScales.mV[index], 1.f, LLSmoothInterpolation::getInterpolant(MANIPULATOR_SCALE_HALF_LIFE ));
+ mPlaneScales.mV[index] = lerp(mPlaneScales.mV[index], 1.f, LLSmoothInterpolation::getInterpolant(MANIPULATOR_SCALE_HALF_LIFE ));
}
}
@@ -2251,7 +2251,7 @@ void LLManipTranslate::renderArrow(S32 which_arrow, S32 selected_arrow, F32 box_
axis.mV[0] = 1.0f;
break;
default:
- llerrs << "renderArrow called with bad arrow " << which_arrow << llendl;
+ LL_ERRS() << "renderArrow called with bad arrow " << which_arrow << LL_ENDL;
break;
}
diff --git a/indra/newview/llmarketplacefunctions.cpp b/indra/newview/llmarketplacefunctions.cpp
index 0b009b68f7..83946a45cd 100755
--- a/indra/newview/llmarketplacefunctions.cpp
+++ b/indra/newview/llmarketplacefunctions.cpp
@@ -132,11 +132,11 @@ namespace LLMarketplaceImport
if (gSavedSettings.getBOOL("InventoryOutboxLogging"))
{
- llinfos << " SLM POST status: " << status << llendl;
- llinfos << " SLM POST reason: " << reason << llendl;
- llinfos << " SLM POST content: " << content.asString() << llendl;
+ LL_INFOS() << " SLM POST status: " << status << LL_ENDL;
+ LL_INFOS() << " SLM POST reason: " << reason << LL_ENDL;
+ LL_INFOS() << " SLM POST content: " << content.asString() << LL_ENDL;
- llinfos << " SLM POST timer: " << slmPostTimer.getElapsedTimeF32() << llendl;
+ LL_INFOS() << " SLM POST timer: " << slmPostTimer.getElapsedTimeF32() << LL_ENDL;
}
if ((status == MarketplaceErrorCodes::IMPORT_REDIRECT) ||
@@ -145,7 +145,7 @@ namespace LLMarketplaceImport
{
if (gSavedSettings.getBOOL("InventoryOutboxLogging"))
{
- llinfos << " SLM POST clearing marketplace cookie due to authentication failure or timeout" << llendl;
+ LL_INFOS() << " SLM POST clearing marketplace cookie due to authentication failure or timeout" << LL_ENDL;
}
sMarketplaceCookie.clear();
@@ -179,11 +179,11 @@ namespace LLMarketplaceImport
if (gSavedSettings.getBOOL("InventoryOutboxLogging"))
{
- llinfos << " SLM GET status: " << status << llendl;
- llinfos << " SLM GET reason: " << reason << llendl;
- llinfos << " SLM GET content: " << content.asString() << llendl;
+ LL_INFOS() << " SLM GET status: " << status << LL_ENDL;
+ LL_INFOS() << " SLM GET reason: " << reason << LL_ENDL;
+ LL_INFOS() << " SLM GET content: " << content.asString() << LL_ENDL;
- llinfos << " SLM GET timer: " << slmGetTimer.getElapsedTimeF32() << llendl;
+ LL_INFOS() << " SLM GET timer: " << slmGetTimer.getElapsedTimeF32() << LL_ENDL;
}
if ((status == MarketplaceErrorCodes::IMPORT_AUTHENTICATION_ERROR) ||
@@ -191,7 +191,7 @@ namespace LLMarketplaceImport
{
if (gSavedSettings.getBOOL("InventoryOutboxLogging"))
{
- llinfos << " SLM GET clearing marketplace cookie due to authentication failure or timeout" << llendl;
+ LL_INFOS() << " SLM GET clearing marketplace cookie due to authentication failure or timeout" << LL_ENDL;
}
sMarketplaceCookie.clear();
@@ -256,7 +256,7 @@ namespace LLMarketplaceImport
if (gSavedSettings.getBOOL("InventoryOutboxLogging"))
{
- llinfos << " SLM GET: " << url << llendl;
+ LL_INFOS() << " SLM GET: " << url << LL_ENDL;
}
slmGetTimer.start();
@@ -287,7 +287,7 @@ namespace LLMarketplaceImport
if (gSavedSettings.getBOOL("InventoryOutboxLogging"))
{
- llinfos << " SLM GET: " << url << llendl;
+ LL_INFOS() << " SLM GET: " << url << LL_ENDL;
}
slmGetTimer.start();
@@ -321,7 +321,7 @@ namespace LLMarketplaceImport
if (gSavedSettings.getBOOL("InventoryOutboxLogging"))
{
- llinfos << " SLM POST: " << url << llendl;
+ LL_INFOS() << " SLM POST: " << url << LL_ENDL;
}
slmPostTimer.start();
diff --git a/indra/newview/llmaterialmgr.cpp b/indra/newview/llmaterialmgr.cpp
index 14d3d4e7a8..df6a42db4d 100644
--- a/indra/newview/llmaterialmgr.cpp
+++ b/indra/newview/llmaterialmgr.cpp
@@ -527,11 +527,11 @@ void LLMaterialMgr::onPutResponse(bool success, const LLSD& content)
}
}
-static LLFastTimer::DeclareTimer FTM_MATERIALS_IDLE("Materials");
+static LLTrace::BlockTimerStatHandle FTM_MATERIALS_IDLE("Idle Materials");
void LLMaterialMgr::onIdle(void*)
{
- LLFastTimer t(FTM_MATERIALS_IDLE);
+ LL_RECORD_BLOCK_TIME(FTM_MATERIALS_IDLE);
LLMaterialMgr* instancep = LLMaterialMgr::getInstance();
diff --git a/indra/newview/llmediactrl.cpp b/indra/newview/llmediactrl.cpp
index 2075aeed63..323445afa6 100755
--- a/indra/newview/llmediactrl.cpp
+++ b/indra/newview/llmediactrl.cpp
@@ -392,7 +392,7 @@ BOOL LLMediaCtrl::postBuild ()
mContextMenu = LLUICtrlFactory::getInstance()->createFromFile<LLContextMenu>(
"menu_media_ctrl.xml", LLMenuGL::sMenuContainer, LLViewerMenuHolderGL::child_registry_t::instance());
- setVisibleCallback(boost::bind(&LLMediaCtrl::onVisibilityChange, this, _2));
+ setVisibleCallback(boost::bind(&LLMediaCtrl::onVisibilityChanged, this, _2));
return TRUE;
}
@@ -422,9 +422,9 @@ BOOL LLMediaCtrl::handleKeyHere( KEY key, MASK mask )
////////////////////////////////////////////////////////////////////////////////
//
-void LLMediaCtrl::handleVisibilityChange ( BOOL new_visibility )
+void LLMediaCtrl::onVisibilityChange ( BOOL new_visibility )
{
- llinfos << "visibility changed to " << (new_visibility?"true":"false") << llendl;
+ LL_INFOS() << "visibility changed to " << (new_visibility?"true":"false") << LL_ENDL;
if(mMediaSource)
{
mMediaSource->setVisible( new_visibility );
@@ -450,7 +450,7 @@ BOOL LLMediaCtrl::handleUnicodeCharHere(llwchar uni_char)
////////////////////////////////////////////////////////////////////////////////
//
-void LLMediaCtrl::onVisibilityChange ( const LLSD& new_visibility )
+void LLMediaCtrl::onVisibilityChanged ( const LLSD& new_visibility )
{
// set state of frequent updates automatically if visibility changes
if ( new_visibility.asBoolean() )
@@ -548,7 +548,7 @@ void LLMediaCtrl::navigateTo( std::string url_in, std::string mime_type)
(LLStringUtil::compareInsensitive(url_in.substr(0, protocol2.length()), protocol2) == 0))
{
// TODO: Print out/log this attempt?
- // llinfos << "Rejecting attempt to load restricted website :" << urlIn << llendl;
+ // LL_INFOS() << "Rejecting attempt to load restricted website :" << urlIn << LL_ENDL;
return;
}
@@ -569,7 +569,7 @@ void LLMediaCtrl::navigateToLocalPage( const std::string& subdir, const std::str
if (expanded_filename.empty())
{
- llwarns << "File " << filename << "not found" << llendl;
+ LL_WARNS() << "File " << filename << "not found" << LL_ENDL;
return;
}
if (ensureMediaSourceExists())
@@ -677,7 +677,7 @@ bool LLMediaCtrl::ensureMediaSourceExists()
}
else
{
- llwarns << "media source create failed " << llendl;
+ LL_WARNS() << "media source create failed " << LL_ENDL;
// return;
}
}
diff --git a/indra/newview/llmediactrl.h b/indra/newview/llmediactrl.h
index 6c38c1fb56..5978a7a344 100755
--- a/indra/newview/llmediactrl.h
+++ b/indra/newview/llmediactrl.h
@@ -150,7 +150,7 @@ public:
// over-rides
virtual BOOL handleKeyHere( KEY key, MASK mask);
- virtual void handleVisibilityChange ( BOOL new_visibility );
+ virtual void onVisibilityChange ( BOOL new_visibility );
virtual BOOL handleUnicodeCharHere(llwchar uni_char);
virtual void reshape( S32 width, S32 height, BOOL called_from_parent = TRUE);
virtual void draw();
@@ -172,7 +172,7 @@ public:
void convertInputCoords(S32& x, S32& y);
private:
- void onVisibilityChange ( const LLSD& new_visibility );
+ void onVisibilityChanged ( const LLSD& new_visibility );
void onPopup(const LLSD& notification, const LLSD& response);
const S32 mTextureDepthBytes;
diff --git a/indra/newview/llmeshrepository.cpp b/indra/newview/llmeshrepository.cpp
index 5afd2cb329..08d2d03b9b 100755
--- a/indra/newview/llmeshrepository.cpp
+++ b/indra/newview/llmeshrepository.cpp
@@ -27,8 +27,7 @@
#include "llviewerprecompiledheaders.h"
-#include "apr_pools.h"
-#include "apr_dso.h"
+#include "llapr.h"
#include "llhttpstatuscodes.h"
#include "llmeshrepository.h"
@@ -310,18 +309,8 @@
// under the 'Mesh Fetch' timer which will be either top-level
// or under 'Render' time.
-#ifndef LL_MESH_FASTTIMER_ENABLE
-#define LL_MESH_FASTTIMER_ENABLE 1
-#endif
-#if LL_MESH_FASTTIMER_ENABLE
static LLFastTimer::DeclareTimer FTM_MESH_FETCH("Mesh Fetch");
-#define MESH_FASTTIMER_DEFBLOCK LLFastTimer meshtimer(FTM_MESH_FETCH)
-#else
-#define MESH_FASTTIMER_DEFBLOCK
-#endif // LL_MESH_FASTTIMER_ENABLE
-
-
// Random failure testing for development/QA.
//
// Set the MESH_*_FAILED macros to either 'false' or to
@@ -391,10 +380,10 @@ U32 LLMeshRepository::sCacheBytesWritten = 0;
U32 LLMeshRepository::sCacheReads = 0;
U32 LLMeshRepository::sCacheWrites = 0;
U32 LLMeshRepository::sMaxLockHoldoffs = 0;
-
+
LLDeadmanTimer LLMeshRepository::sQuiescentTimer(15.0, false); // true -> gather cpu metrics
-
+
static S32 dump_num = 0;
std::string make_dump_name(std::string prefix, S32 num)
{
@@ -546,8 +535,8 @@ public:
virtual void processFailure(LLCore::HttpStatus status) = 0;
public:
- LLVolumeParams mMeshParams;
- bool mProcessed;
+ LLVolumeParams mMeshParams;
+ bool mProcessed;
LLCore::HttpHandle mHttpHandle;
};
@@ -580,23 +569,23 @@ public:
//
// Thread: repo
class LLMeshLODHandler : public LLMeshHandlerBase
-{
+ {
public:
LLMeshLODHandler(const LLVolumeParams & mesh_params, S32 lod, U32 offset, U32 requested_bytes)
: LLMeshHandlerBase(),
mLOD(lod),
mRequestedBytes(requested_bytes),
mOffset(offset)
- {
+ {
mMeshParams = mesh_params;
LLMeshRepoThread::incActiveLODRequests();
- }
+ }
virtual ~LLMeshLODHandler();
-
+
protected:
LLMeshLODHandler(const LLMeshLODHandler &); // Not defined
void operator=(const LLMeshLODHandler &); // Not defined
-
+
public:
virtual void processData(LLCore::BufferArray * body, U8 * data, S32 data_size);
virtual void processFailure(LLCore::HttpStatus status);
@@ -612,7 +601,7 @@ public:
//
// Thread: repo
class LLMeshSkinInfoHandler : public LLMeshHandlerBase
-{
+ {
public:
LLMeshSkinInfoHandler(const LLUUID& id, U32 offset, U32 size)
: LLMeshHandlerBase(),
@@ -625,7 +614,7 @@ public:
protected:
LLMeshSkinInfoHandler(const LLMeshSkinInfoHandler &); // Not defined
void operator=(const LLMeshSkinInfoHandler &); // Not defined
-
+
public:
virtual void processData(LLCore::BufferArray * body, U8 * data, S32 data_size);
virtual void processFailure(LLCore::HttpStatus status);
@@ -641,7 +630,7 @@ public:
//
// Thread: repo
class LLMeshDecompositionHandler : public LLMeshHandlerBase
-{
+ {
public:
LLMeshDecompositionHandler(const LLUUID& id, U32 offset, U32 size)
: LLMeshHandlerBase(),
@@ -654,7 +643,7 @@ public:
protected:
LLMeshDecompositionHandler(const LLMeshDecompositionHandler &); // Not defined
void operator=(const LLMeshDecompositionHandler &); // Not defined
-
+
public:
virtual void processData(LLCore::BufferArray * body, U8 * data, S32 data_size);
virtual void processFailure(LLCore::HttpStatus status);
@@ -670,7 +659,7 @@ public:
//
// Thread: repo
class LLMeshPhysicsShapeHandler : public LLMeshHandlerBase
-{
+ {
public:
LLMeshPhysicsShapeHandler(const LLUUID& id, U32 offset, U32 size)
: LLMeshHandlerBase(),
@@ -683,15 +672,15 @@ public:
protected:
LLMeshPhysicsShapeHandler(const LLMeshPhysicsShapeHandler &); // Not defined
void operator=(const LLMeshPhysicsShapeHandler &); // Not defined
-
+
public:
virtual void processData(LLCore::BufferArray * body, U8 * data, S32 data_size);
virtual void processFailure(LLCore::HttpStatus status);
public:
- LLUUID mMeshID;
- U32 mRequestedBytes;
- U32 mOffset;
+ LLUUID mMeshID;
+ U32 mRequestedBytes;
+ U32 mOffset;
};
@@ -717,8 +706,8 @@ void log_upload_error(LLCore::HttpStatus status, const LLSD& content,
LL_WARNS(LOG_MESH) << "error: " << err << LL_ENDL;
LL_WARNS(LOG_MESH) << " mesh upload failed, stage '" << stage
<< "', error '" << err["error"].asString()
- << "', message '" << err["message"].asString()
- << "', id '" << err["identifier"].asString()
+ << "', message '" << err["message"].asString()
+ << "', id '" << err["identifier"].asString()
<< "'" << LL_ENDL;
if (err.has("errors"))
{
@@ -759,7 +748,7 @@ LLMeshRepoThread::LLMeshRepoThread()
mHttpLargePolicyClass(LLCore::HttpRequest::DEFAULT_POLICY_ID),
mHttpPriority(0),
mGetMeshVersion(2)
-{
+ {
mMutex = new LLMutex(NULL);
mHeaderMutex = new LLMutex(NULL);
mSignal = new LLCondition(NULL);
@@ -775,11 +764,11 @@ LLMeshRepoThread::LLMeshRepoThread()
mHttpPolicyClass = LLAppViewer::instance()->getAppCoreHttp().getPolicy(LLAppCoreHttp::AP_MESH2);
mHttpLegacyPolicyClass = LLAppViewer::instance()->getAppCoreHttp().getPolicy(LLAppCoreHttp::AP_MESH1);
mHttpLargePolicyClass = LLAppViewer::instance()->getAppCoreHttp().getPolicy(LLAppCoreHttp::AP_LARGE_MESH);
-}
-
+ }
+
LLMeshRepoThread::~LLMeshRepoThread()
-{
+ {
LL_INFOS(LOG_MESH) << "Small GETs issued: " << LLMeshRepository::sHTTPRequestCount
<< ", Large GETs issued: " << LLMeshRepository::sHTTPLargeRequestCount
<< ", Max Lock Holdoffs: " << LLMeshRepository::sMaxLockHoldoffs
@@ -790,23 +779,23 @@ LLMeshRepoThread::~LLMeshRepoThread()
++iter)
{
delete *iter;
- }
+ }
mHttpRequestSet.clear();
if (mHttpHeaders)
- {
+ {
mHttpHeaders->release();
mHttpHeaders = NULL;
- }
+ }
if (mHttpOptions)
- {
+ {
mHttpOptions->release();
mHttpOptions = NULL;
- }
+ }
if (mHttpLargeOptions)
- {
+{
mHttpLargeOptions->release();
mHttpLargeOptions = NULL;
- }
+}
delete mHttpRequest;
mHttpRequest = NULL;
delete mMutex;
@@ -846,53 +835,53 @@ void LLMeshRepoThread::run()
{
break;
}
-
+
if (! mHttpRequestSet.empty())
{
// Dispatch all HttpHandler notifications
mHttpRequest->update(0L);
- }
+ }
sRequestWaterLevel = mHttpRequestSet.size(); // Stats data update
-
- // NOTE: order of queue processing intentionally favors LOD requests over header requests
+ // NOTE: order of queue processing intentionally favors LOD requests over header requests
+
while (!mLODReqQ.empty() && mHttpRequestSet.size() < sRequestHighWater)
- {
- if (! mMutex)
{
+ if (! mMutex)
+ {
break;
}
- mMutex->lock();
- LODRequest req = mLODReqQ.front();
- mLODReqQ.pop();
- LLMeshRepository::sLODProcessing--;
- mMutex->unlock();
+ mMutex->lock();
+ LODRequest req = mLODReqQ.front();
+ mLODReqQ.pop();
+ LLMeshRepository::sLODProcessing--;
+ mMutex->unlock();
if (!fetchMeshLOD(req.mMeshParams, req.mLOD)) // failed, resubmit
- {
- mMutex->lock();
- mLODReqQ.push(req) ;
+ {
+ mMutex->lock();
+ mLODReqQ.push(req);
++LLMeshRepository::sLODProcessing;
- mMutex->unlock();
- }
- }
+ mMutex->unlock();
+ }
+ }
while (!mHeaderReqQ.empty() && mHttpRequestSet.size() < sRequestHighWater)
- {
- if (! mMutex)
{
+ if (! mMutex)
+ {
break;
}
- mMutex->lock();
- HeaderRequest req = mHeaderReqQ.front();
- mHeaderReqQ.pop();
- mMutex->unlock();
+ mMutex->lock();
+ HeaderRequest req = mHeaderReqQ.front();
+ mHeaderReqQ.pop();
+ mMutex->unlock();
if (!fetchMeshHeader(req.mMeshParams))//failed, resubmit
- {
- mMutex->lock();
- mHeaderReqQ.push(req) ;
- mMutex->unlock();
- }
- }
+ {
+ mMutex->lock();
+ mHeaderReqQ.push(req) ;
+ mMutex->unlock();
+ }
+ }
// For the final three request lists, similar goal to above but
// slightly different queue structures. Stay off the mutex when
@@ -918,7 +907,7 @@ void LLMeshRepoThread::run()
mSkinRequests.erase(iter);
mMutex->unlock();
- if (! fetchMeshSkinInfo(mesh_id))
+ if (!fetchMeshSkinInfo(mesh_id))
{
incomplete.insert(mesh_id);
}
@@ -947,7 +936,7 @@ void LLMeshRepoThread::run()
mDecompositionRequests.erase(iter);
mMutex->unlock();
- if (! fetchMeshDecomposition(mesh_id))
+ if (!fetchMeshDecomposition(mesh_id))
{
incomplete.insert(mesh_id);
}
@@ -973,7 +962,7 @@ void LLMeshRepoThread::run()
mPhysicsShapeRequests.erase(iter);
mMutex->unlock();
- if (! fetchMeshPhysicsShape(mesh_id))
+ if (!fetchMeshPhysicsShape(mesh_id))
{
incomplete.insert(mesh_id);
}
@@ -988,7 +977,7 @@ void LLMeshRepoThread::run()
}
}
mMutex->unlock();
- }
+ }
// For dev purposes only. A dynamic change could make this false
// and that shouldn't assert.
@@ -1055,7 +1044,7 @@ void LLMeshRepoThread::loadMeshLOD(const LLVolumeParams& mesh_params, S32 lod)
if (pending != mPendingLOD.end())
{ //append this lod request to existing header request
pending->second.push_back(lod);
- llassert(pending->second.size() <= LLModel::NUM_LODS)
+ llassert(pending->second.size() <= LLModel::NUM_LODS);
}
else
{ //if no header request is pending, fetch header
@@ -1196,7 +1185,7 @@ bool LLMeshRepoThread::fetchMeshSkinInfo(const LLUUID& mesh_id)
}
++LLMeshRepository::sMeshRequestCount;
- bool ret = true;
+ bool ret = true ;
U32 header_size = mMeshHeaderSize[mesh_id];
if (header_size > 0)
@@ -1244,7 +1233,7 @@ bool LLMeshRepoThread::fetchMeshSkinInfo(const LLUUID& mesh_id)
constructUrl(mesh_id, &http_url, &cap_version);
if (!http_url.empty())
- {
+ {
LLMeshSkinInfoHandler * handler = new LLMeshSkinInfoHandler(mesh_id, offset, size);
LLCore::HttpHandle handle = getByteRange(http_url, cap_version, offset, size, handler);
if (LLCORE_HTTP_HANDLE_INVALID == handle)
@@ -1291,7 +1280,7 @@ bool LLMeshRepoThread::fetchMeshDecomposition(const LLUUID& mesh_id)
++LLMeshRepository::sMeshRequestCount;
U32 header_size = mMeshHeaderSize[mesh_id];
- bool ret = true;
+ bool ret = true ;
if (header_size > 0)
{
@@ -1337,9 +1326,9 @@ bool LLMeshRepoThread::fetchMeshDecomposition(const LLUUID& mesh_id)
int cap_version(2);
std::string http_url;
constructUrl(mesh_id, &http_url, &cap_version);
-
+
if (!http_url.empty())
- {
+ {
LLMeshDecompositionHandler * handler = new LLMeshDecompositionHandler(mesh_id, offset, size);
LLCore::HttpHandle handle = getByteRange(http_url, cap_version, offset, size, handler);
if (LLCORE_HTTP_HANDLE_INVALID == handle)
@@ -1385,7 +1374,7 @@ bool LLMeshRepoThread::fetchMeshPhysicsShape(const LLUUID& mesh_id)
++LLMeshRepository::sMeshRequestCount;
U32 header_size = mMeshHeaderSize[mesh_id];
- bool ret = true;
+ bool ret = true ;
if (header_size > 0)
{
@@ -1430,9 +1419,9 @@ bool LLMeshRepoThread::fetchMeshPhysicsShape(const LLUUID& mesh_id)
int cap_version(2);
std::string http_url;
constructUrl(mesh_id, &http_url, &cap_version);
-
+
if (!http_url.empty())
- {
+ {
LLMeshPhysicsShapeHandler * handler = new LLMeshPhysicsShapeHandler(mesh_id, offset, size);
LLCore::HttpHandle handle = getByteRange(http_url, cap_version, offset, size, handler);
if (LLCORE_HTTP_HANDLE_INVALID == handle)
@@ -1521,11 +1510,11 @@ bool LLMeshRepoThread::fetchMeshHeader(const LLVolumeParams& mesh_params)
}
//either cache entry doesn't exist or is corrupt, request header from simulator
- bool retval = true;
+ bool retval = true ;
int cap_version(2);
std::string http_url;
constructUrl(mesh_params.getSculptID(), &http_url, &cap_version);
-
+
if (!http_url.empty())
{
//grab first 4KB if we're going to bother with a fetch. Cache will prevent future fetches if a full mesh fits
@@ -1613,9 +1602,9 @@ bool LLMeshRepoThread::fetchMeshLOD(const LLVolumeParams& mesh_params, S32 lod)
int cap_version(2);
std::string http_url;
constructUrl(mesh_id, &http_url, &cap_version);
-
+
if (!http_url.empty())
- {
+ {
LLMeshLODHandler * handler = new LLMeshLODHandler(mesh_params, lod, offset, size);
LLCore::HttpHandle handle = getByteRange(http_url, cap_version, offset, size, handler);
if (LLCORE_HTTP_HANDLE_INVALID == handle)
@@ -1865,7 +1854,7 @@ LLMeshUploadThread::LLMeshUploadThread(LLMeshUploadThread::instance_list& data,
bool upload_skin, bool upload_joints, const std::string & upload_url, bool do_upload,
LLHandle<LLWholeModelFeeObserver> fee_observer,
LLHandle<LLWholeModelUploadObserver> upload_observer)
- : LLThread("mesh upload"),
+: LLThread("mesh upload"),
LLCore::HttpHandler(),
mDiscarded(false),
mDoUpload(do_upload),
@@ -1887,7 +1876,7 @@ LLMeshUploadThread::LLMeshUploadThread(LLMeshUploadThread::instance_list& data,
mOrigin += gAgent.getAtAxis() * scale.magVec();
- mMeshUploadTimeOut = gSavedSettings.getS32("MeshUploadTimeOut");
+ mMeshUploadTimeOut = gSavedSettings.getS32("MeshUploadTimeOut") ;
mHttpRequest = new LLCore::HttpRequest;
mHttpOptions = new LLCore::HttpOptions;
@@ -1955,14 +1944,14 @@ void LLMeshUploadThread::preStart()
void LLMeshUploadThread::discard()
{
- LLMutexLock lock(mMutex);
+ LLMutexLock lock(mMutex) ;
mDiscarded = true;
}
bool LLMeshUploadThread::isDiscarded() const
{
- LLMutexLock lock(mMutex);
- return mDiscarded;
+ LLMutexLock lock(mMutex) ;
+ return mDiscarded ;
}
void LLMeshUploadThread::run()
@@ -2213,7 +2202,7 @@ void LLMeshUploadThread::generateHulls()
}
}
- if (has_valid_requests)
+ if(has_valid_requests)
{
// *NOTE: Interesting livelock condition on shutdown. If there
// is an upload request in generateHulls() when shutdown starts,
@@ -2245,7 +2234,7 @@ void LLMeshUploadThread::doWholeModelUpload()
mModelData = LLSD::emptyMap();
wholeModelToLLSD(mModelData, true);
LLSD body = mModelData["asset_resources"];
- dump_llsd_to_file(body, make_dump_name("whole_model_body_", dump_num));
+ dump_llsd_to_file(body,make_dump_name("whole_model_body_",dump_num));
LLCore::BufferArray * ba = new LLCore::BufferArray;
LLCore::BufferArrayStream bas(ba);
@@ -2276,7 +2265,7 @@ void LLMeshUploadThread::doWholeModelUpload()
mHttpRequest->update(0);
while (! LLApp::isQuitting() && ! finished() && ! isDiscarded())
- {
+ {
ms_sleep(sleep_time);
sleep_time = llmin(250U, sleep_time + sleep_time);
mHttpRequest->update(0);
@@ -2292,7 +2281,7 @@ void LLMeshUploadThread::doWholeModelUpload()
}
}
}
-}
+ }
void LLMeshUploadThread::requestWholeModelFee()
{
@@ -2323,11 +2312,11 @@ void LLMeshUploadThread::requestWholeModelFee()
LL_WARNS(LOG_MESH) << "Couldn't issue request for model fee. Reason: " << mHttpStatus.toString()
<< " (" << mHttpStatus.toTerseString() << ")"
<< LL_ENDL;
- }
+ }
else
{
U32 sleep_time(10);
-
+
mHttpRequest->update(0);
while (! LLApp::isQuitting() && ! finished() && ! isDiscarded())
{
@@ -2340,7 +2329,7 @@ void LLMeshUploadThread::requestWholeModelFee()
LL_DEBUGS(LOG_MESH) << "Mesh fee query operation discarded." << LL_ENDL;
}
}
-}
+ }
// Does completion duty for both fee queries and actual uploads.
@@ -2393,12 +2382,12 @@ void LLMeshUploadThread::onCompleted(LLCore::HttpHandle handle, LLCore::HttpResp
{
LLCore::BufferArrayStream bas(ba);
LLSDSerialize::fromXML(body, bas);
- }
+}
}
dump_llsd_to_file(body, make_dump_name("whole_model_upload_response_", dump_num));
if (body["state"].asString() == "complete")
- {
+{
// requested "mesh" asset type isn't actually the type
// of the resultant object, fix it up here.
mModelData["asset_type"] = "object";
@@ -2426,7 +2415,7 @@ void LLMeshUploadThread::onCompleted(LLCore::HttpHandle handle, LLCore::HttpResp
// model fee case
LLWholeModelFeeObserver* observer(mFeeObserverHandle.get());
mWholeModelUploadURL.clear();
-
+
if (! status)
{
LL_WARNS(LOG_MESH) << "Fee request failed. Reason: " << reason
@@ -2451,18 +2440,18 @@ void LLMeshUploadThread::onCompleted(LLCore::HttpHandle handle, LLCore::HttpResp
body = llsd_from_file("fake_upload_error.xml");
}
else
- {
+ {
LLCore::BufferArray * ba(response->getBody());
if (ba && ba->size())
- {
+ {
LLCore::BufferArrayStream bas(ba);
LLSDSerialize::fromXML(body, bas);
- }
- }
+ }
+ }
dump_llsd_to_file(body, make_dump_name("whole_model_fee_response_", dump_num));
-
+
if (body["state"].asString() == "upload")
- {
+ {
mWholeModelUploadURL = body["uploader"].asString();
if (observer)
@@ -2531,7 +2520,7 @@ void LLMeshRepoThread::notifyLoadedMeshes()
LODRequest req = mUnavailableQ.front();
mUnavailableQ.pop();
mMutex->unlock();
-
+
update_metrics = true;
gMeshRepo.notifyMeshUnavailable(req.mMeshParams, req.mLOD);
}
@@ -2548,18 +2537,18 @@ void LLMeshRepoThread::notifyLoadedMeshes()
skin_info_q.swap(mSkinInfoQ);
}
if (! mDecompositionQ.empty())
- {
+ {
decomp_q.swap(mDecompositionQ);
- }
+ }
mMutex->unlock();
// Process the elements free of the lock
while (! skin_info_q.empty())
- {
+ {
gMeshRepo.notifySkinInfoReceived(skin_info_q.front());
skin_info_q.pop_front();
- }
+ }
while (! decomp_q.empty())
{
@@ -2656,7 +2645,7 @@ void LLMeshRepository::cacheOutgoingMesh(LLMeshUploadData& data, LLSD& header)
void LLMeshHandlerBase::onCompleted(LLCore::HttpHandle handle, LLCore::HttpResponse * response)
{
mProcessed = true;
-
+
unsigned int retries(0U);
response->getRetries(NULL, &retries);
LLMeshRepository::sHTTPRetryCount += retries;
@@ -2688,18 +2677,18 @@ void LLMeshHandlerBase::onCompleted(LLCore::HttpHandle handle, LLCore::HttpRespo
LL_WARNS_ONCE(LOG_MESH) << "Non-206 successful status received for fetch: "
<< status.toTerseString() << LL_ENDL;
}
-
+
LLCore::BufferArray * body(response->getBody());
S32 data_size(body ? body->size() : 0);
U8 * data(NULL);
- if (data_size > 0)
- {
+ if (data_size > 0)
+ {
// *TODO: Try to get rid of data copying and add interfaces
// that support BufferArray directly. Introduce a two-phase
// handler, optional first that takes a body, fallback second
// that requires a temporary allocation and data copy.
- data = new U8[data_size];
+ data = new U8[data_size];
body->read(0, (char *) data, data_size);
LLMeshRepository::sBytesReceived += data_size;
}
@@ -2744,7 +2733,7 @@ void LLMeshHeaderHandler::processFailure(LLCore::HttpStatus status)
{
gMeshRepo.mThread->mUnavailableQ.push(LLMeshRepoThread::LODRequest(mMeshParams, i));
}
-}
+ }
void LLMeshHeaderHandler::processData(LLCore::BufferArray * body, U8 * data, S32 data_size)
{
@@ -2761,12 +2750,12 @@ void LLMeshHeaderHandler::processData(LLCore::BufferArray * body, U8 * data, S32
// Can't get the header so none of the LODs will be available
LLMutexLock lock(gMeshRepo.mThread->mMutex);
for (int i(0); i < 4; ++i)
- {
+ {
gMeshRepo.mThread->mUnavailableQ.push(LLMeshRepoThread::LODRequest(mMeshParams, i));
- }
}
+ }
else if (data && data_size > 0)
- {
+ {
// header was successfully retrieved from sim, cache in vfs
LLSD header = gMeshRepo.mThread->mMeshHeader[mesh_id];
@@ -2779,12 +2768,12 @@ void LLMeshHeaderHandler::processData(LLCore::BufferArray * body, U8 * data, S32
S32 lod_bytes = 0;
for (U32 i = 0; i < LLModel::LOD_PHYSICS; ++i)
- {
+ {
// figure out how many bytes we'll need to reserve in the file
const std::string & lod_name = header_lod[i];
lod_bytes = llmax(lod_bytes, header[lod_name]["offset"].asInteger()+header[lod_name]["size"].asInteger());
- }
-
+ }
+
// just in case skin info or decomposition is at the end of the file (which it shouldn't be)
lod_bytes = llmax(lod_bytes, header["skin"]["offset"].asInteger() + header["skin"]["size"].asInteger());
lod_bytes = llmax(lod_bytes, header["physics_convex"]["offset"].asInteger() + header["physics_convex"]["size"].asInteger());
@@ -2792,37 +2781,37 @@ void LLMeshHeaderHandler::processData(LLCore::BufferArray * body, U8 * data, S32
S32 header_bytes = (S32) gMeshRepo.mThread->mMeshHeaderSize[mesh_id];
S32 bytes = lod_bytes + header_bytes;
-
+
// It's possible for the remote asset to have more data than is needed for the local cache
// only allocate as much space in the VFS as is needed for the local cache
data_size = llmin(data_size, bytes);
LLVFile file(gVFS, mesh_id, LLAssetType::AT_MESH, LLVFile::WRITE);
if (file.getMaxSize() >= bytes || file.setMaxSize(bytes))
- {
+ {
LLMeshRepository::sCacheBytesWritten += data_size;
++LLMeshRepository::sCacheWrites;
file.write(data, data_size);
-
+
// zero out the rest of the file
U8 block[MESH_HEADER_SIZE];
memset(block, 0, sizeof(block));
-
+
while (bytes-file.tell() > sizeof(block))
- {
+ {
file.write(block, sizeof(block));
- }
+ }
S32 remaining = bytes-file.tell();
if (remaining > 0)
- {
+ {
file.write(block, remaining);
}
}
}
}
-}
+ }
LLMeshLODHandler::~LLMeshLODHandler()
{
@@ -2834,8 +2823,8 @@ LLMeshLODHandler::~LLMeshLODHandler()
gMeshRepo.mThread->lockAndLoadMeshLOD(mMeshParams, mLOD);
}
LLMeshRepoThread::decActiveLODRequests();
+ }
}
-}
void LLMeshLODHandler::processFailure(LLCore::HttpStatus status)
{
@@ -2849,10 +2838,10 @@ void LLMeshLODHandler::processFailure(LLCore::HttpStatus status)
}
void LLMeshLODHandler::processData(LLCore::BufferArray * body, U8 * data, S32 data_size)
-{
+ {
if ((! MESH_LOD_PROCESS_FAILED) && gMeshRepo.mThread->lodReceived(mMeshParams, mLOD, data, data_size))
{
- // good fetch from sim, write to VFS for caching
+ //good fetch from sim, write to VFS for caching
LLVFile file(gVFS, mMeshParams.getSculptID(), LLAssetType::AT_MESH, LLVFile::WRITE);
S32 offset = mOffset;
@@ -2865,7 +2854,7 @@ void LLMeshLODHandler::processData(LLCore::BufferArray * body, U8 * data, S32 da
LLMeshRepository::sCacheBytesWritten += size;
++LLMeshRepository::sCacheWrites;
}
- }
+ }
else
{
LL_WARNS(LOG_MESH) << "Error during mesh LOD processing. ID: " << mMeshParams.getSculptID()
@@ -2877,12 +2866,12 @@ void LLMeshLODHandler::processData(LLCore::BufferArray * body, U8 * data, S32 da
}
LLMeshSkinInfoHandler::~LLMeshSkinInfoHandler()
-{
+ {
llassert(mProcessed);
-}
+ }
void LLMeshSkinInfoHandler::processFailure(LLCore::HttpStatus status)
-{
+ {
LL_WARNS(LOG_MESH) << "Error during mesh skin info handling. ID: " << mMeshID
<< ", Reason: " << status.toString()
<< " (" << status.toTerseString() << "). Not retrying."
@@ -2890,13 +2879,13 @@ void LLMeshSkinInfoHandler::processFailure(LLCore::HttpStatus status)
// *TODO: Mark mesh unavailable on error. For now, simply leave
// request unfulfilled rather than retry forever.
-}
+ }
void LLMeshSkinInfoHandler::processData(LLCore::BufferArray * body, U8 * data, S32 data_size)
-{
+ {
if ((! MESH_SKIN_INFO_PROCESS_FAILED) && gMeshRepo.mThread->skinInfoReceived(mMeshID, data, data_size))
{
- // good fetch from sim, write to VFS for caching
+ //good fetch from sim, write to VFS for caching
LLVFile file(gVFS, mMeshID, LLAssetType::AT_MESH, LLVFile::WRITE);
S32 offset = mOffset;
@@ -2925,14 +2914,14 @@ LLMeshDecompositionHandler::~LLMeshDecompositionHandler()
}
void LLMeshDecompositionHandler::processFailure(LLCore::HttpStatus status)
-{
+ {
LL_WARNS(LOG_MESH) << "Error during mesh decomposition handling. ID: " << mMeshID
<< ", Reason: " << status.toString()
<< " (" << status.toTerseString() << "). Not retrying."
<< LL_ENDL;
// *TODO: Mark mesh unavailable on error. For now, simply leave
// request unfulfilled rather than retry forever.
-}
+ }
void LLMeshDecompositionHandler::processData(LLCore::BufferArray * body, U8 * data, S32 data_size)
{
@@ -2951,34 +2940,34 @@ void LLMeshDecompositionHandler::processData(LLCore::BufferArray * body, U8 * da
file.seek(offset);
file.write(data, size);
}
- }
- else
- {
+ }
+ else
+ {
LL_WARNS(LOG_MESH) << "Error during mesh decomposition processing. ID: " << mMeshID
<< ", Unknown reason. Not retrying."
<< LL_ENDL;
// *TODO: Mark mesh unavailable on error
+ }
}
-}
LLMeshPhysicsShapeHandler::~LLMeshPhysicsShapeHandler()
-{
+ {
llassert(mProcessed);
-}
+ }
void LLMeshPhysicsShapeHandler::processFailure(LLCore::HttpStatus status)
-{
+ {
LL_WARNS(LOG_MESH) << "Error during mesh physics shape handling. ID: " << mMeshID
<< ", Reason: " << status.toString()
<< " (" << status.toTerseString() << "). Not retrying."
<< LL_ENDL;
// *TODO: Mark mesh unavailable on error
-}
+ }
void LLMeshPhysicsShapeHandler::processData(LLCore::BufferArray * body, U8 * data, S32 data_size)
-{
+ {
if ((! MESH_PHYS_SHAPE_PROCESS_FAILED) && gMeshRepo.mThread->physicsShapeReceived(mMeshID, data, data_size))
- {
+ {
// good fetch from sim, write to VFS for caching
LLVFile file(gVFS, mMeshID, LLAssetType::AT_MESH, LLVFile::WRITE);
@@ -2986,13 +2975,13 @@ void LLMeshPhysicsShapeHandler::processData(LLCore::BufferArray * body, U8 * dat
S32 size = mRequestedBytes;
if (file.getSize() >= offset+size)
- {
+ {
LLMeshRepository::sCacheBytesWritten += size;
++LLMeshRepository::sCacheWrites;
file.seek(offset);
file.write(data, size);
+ }
}
- }
else
{
LL_WARNS(LOG_MESH) << "Error during mesh physics shape processing. ID: " << mMeshID
@@ -3104,7 +3093,7 @@ S32 LLMeshRepository::update()
S32 LLMeshRepository::loadMesh(LLVOVolume* vobj, const LLVolumeParams& mesh_params, S32 detail, S32 last_lod)
{
- MESH_FASTTIMER_DEFBLOCK;
+ LL_RECORD_BLOCK_TIME(FTM_MESH_FETCH);
// Manage time-to-load metrics for mesh download operations.
metricsProgress(1);
@@ -3187,12 +3176,12 @@ S32 LLMeshRepository::loadMesh(LLVOVolume* vobj, const LLVolumeParams& mesh_para
void LLMeshRepository::notifyLoadedMeshes()
{ //called from main thread
- MESH_FASTTIMER_DEFBLOCK;
+ LL_RECORD_BLOCK_TIME(FTM_MESH_FETCH);
if (1 == mGetMeshVersion)
{
// Legacy GetMesh operation with high connection concurrency
- LLMeshRepoThread::sMaxConcurrentRequests = gSavedSettings.getU32("MeshMaxConcurrentRequests");
+ LLMeshRepoThread::sMaxConcurrentRequests = gSavedSettings.getU32("MeshMaxConcurrentRequests");
LLMeshRepoThread::sRequestHighWater = llclamp(2 * S32(LLMeshRepoThread::sMaxConcurrentRequests),
REQUEST_HIGH_WATER_MIN,
REQUEST_HIGH_WATER_MAX);
@@ -3212,7 +3201,7 @@ void LLMeshRepository::notifyLoadedMeshes()
REQUEST2_LOW_WATER_MIN,
REQUEST2_LOW_WATER_MAX);
}
-
+
//clean up completed upload threads
for (std::vector<LLMeshUploadThread*>::iterator iter = mUploads.begin(); iter != mUploads.end(); )
{
@@ -3289,7 +3278,7 @@ void LLMeshRepository::notifyLoadedMeshes()
//call completed callbacks on finished decompositions
mDecompThread->notifyCompleted();
-
+
// For major operations, attempt to get the required locks
// without blocking and punt if they're not available. The
// longest run of holdoffs is kept in sMaxLockHoldoffs just
@@ -3305,18 +3294,18 @@ void LLMeshRepository::notifyLoadedMeshes()
// If we can't get the locks, skip and pick this up later.
++hold_offs;
sMaxLockHoldoffs = llmax(sMaxLockHoldoffs, hold_offs);
- return;
- }
+ return;
+ }
hold_offs = 0;
-
+
if (gAgent.getRegion())
{
// Update capability urls
- static std::string region_name("never name a region this");
-
- if (gAgent.getRegion()->getName() != region_name && gAgent.getRegion()->capabilitiesReceived())
- {
- region_name = gAgent.getRegion()->getName();
+ static std::string region_name("never name a region this");
+
+ if (gAgent.getRegion()->getName() != region_name && gAgent.getRegion()->capabilitiesReceived())
+ {
+ region_name = gAgent.getRegion()->getName();
const bool use_v1(gSavedSettings.getBOOL("MeshUseGetMesh1"));
const std::string mesh1(gAgent.getRegion()->getCapability("GetMesh"));
const std::string mesh2(gAgent.getRegion()->getCapability("GetMesh2"));
@@ -3327,9 +3316,9 @@ void LLMeshRepository::notifyLoadedMeshes()
<< ", GetMesh: " << mesh1
<< ", using version: " << mGetMeshVersion
<< LL_ENDL;
- }
}
-
+ }
+
//popup queued error messages from background threads
while (!mUploadErrorQ.empty())
{
@@ -3343,46 +3332,46 @@ void LLMeshRepository::notifyLoadedMeshes()
S32 push_count = LLMeshRepoThread::sRequestHighWater - active_count;
if (mPendingRequests.size() > push_count)
- {
+ {
// More requests than the high-water limit allows so
// sort and forward the most important.
- //calculate "score" for pending requests
+ //calculate "score" for pending requests
- //create score map
- std::map<LLUUID, F32> score_map;
+ //create score map
+ std::map<LLUUID, F32> score_map;
- for (U32 i = 0; i < 4; ++i)
+ for (U32 i = 0; i < 4; ++i)
+ {
+ for (mesh_load_map::iterator iter = mLoadingMeshes[i].begin(); iter != mLoadingMeshes[i].end(); ++iter)
{
- for (mesh_load_map::iterator iter = mLoadingMeshes[i].begin(); iter != mLoadingMeshes[i].end(); ++iter)
+ F32 max_score = 0.f;
+ for (std::set<LLUUID>::iterator obj_iter = iter->second.begin(); obj_iter != iter->second.end(); ++obj_iter)
{
- F32 max_score = 0.f;
- for (std::set<LLUUID>::iterator obj_iter = iter->second.begin(); obj_iter != iter->second.end(); ++obj_iter)
- {
- LLViewerObject* object = gObjectList.findObject(*obj_iter);
+ LLViewerObject* object = gObjectList.findObject(*obj_iter);
- if (object)
+ if (object)
+ {
+ LLDrawable* drawable = object->mDrawable;
+ if (drawable)
{
- LLDrawable* drawable = object->mDrawable;
- if (drawable)
- {
- F32 cur_score = drawable->getRadius()/llmax(drawable->mDistanceWRTCamera, 1.f);
- max_score = llmax(max_score, cur_score);
- }
+ F32 cur_score = drawable->getRadius()/llmax(drawable->mDistanceWRTCamera, 1.f);
+ max_score = llmax(max_score, cur_score);
}
}
-
- score_map[iter->first.getSculptID()] = max_score;
}
+
+ score_map[iter->first.getSculptID()] = max_score;
}
+ }
- //set "score" for pending requests
- for (std::vector<LLMeshRepoThread::LODRequest>::iterator iter = mPendingRequests.begin(); iter != mPendingRequests.end(); ++iter)
- {
- iter->mScore = score_map[iter->mMeshParams.getSculptID()];
- }
+ //set "score" for pending requests
+ for (std::vector<LLMeshRepoThread::LODRequest>::iterator iter = mPendingRequests.begin(); iter != mPendingRequests.end(); ++iter)
+ {
+ iter->mScore = score_map[iter->mMeshParams.getSculptID()];
+ }
- //sort by "score"
+ //sort by "score"
std::partial_sort(mPendingRequests.begin(), mPendingRequests.begin() + push_count,
mPendingRequests.end(), LLMeshRepoThread::CompareScoreGreater());
}
@@ -3540,7 +3529,7 @@ S32 LLMeshRepository::getActualMeshLOD(const LLVolumeParams& mesh_params, S32 lo
const LLMeshSkinInfo* LLMeshRepository::getSkinInfo(const LLUUID& mesh_id, const LLVOVolume* requesting_obj)
{
- MESH_FASTTIMER_DEFBLOCK;
+ LL_RECORD_BLOCK_TIME(FTM_MESH_FETCH);
if (mesh_id.notNull())
{
@@ -3568,7 +3557,7 @@ const LLMeshSkinInfo* LLMeshRepository::getSkinInfo(const LLUUID& mesh_id, const
void LLMeshRepository::fetchPhysicsShape(const LLUUID& mesh_id)
{
- MESH_FASTTIMER_DEFBLOCK;
+ LL_RECORD_BLOCK_TIME(FTM_MESH_FETCH);
if (mesh_id.notNull())
{
@@ -3598,7 +3587,7 @@ void LLMeshRepository::fetchPhysicsShape(const LLUUID& mesh_id)
LLModel::Decomposition* LLMeshRepository::getDecomposition(const LLUUID& mesh_id)
{
- MESH_FASTTIMER_DEFBLOCK;
+ LL_RECORD_BLOCK_TIME(FTM_MESH_FETCH);
LLModel::Decomposition* ret = NULL;
@@ -3662,7 +3651,7 @@ bool LLMeshRepository::hasPhysicsShape(const LLUUID& mesh_id)
LLSD& LLMeshRepository::getMeshHeader(const LLUUID& mesh_id)
{
- MESH_FASTTIMER_DEFBLOCK;
+ LL_RECORD_BLOCK_TIME(FTM_MESH_FETCH);
return mThread->getMeshHeader(mesh_id);
}
@@ -3685,7 +3674,7 @@ LLSD& LLMeshRepoThread::getMeshHeader(const LLUUID& mesh_id)
void LLMeshRepository::uploadModel(std::vector<LLModelInstance>& data, LLVector3& scale, bool upload_textures,
- bool upload_skin, bool upload_joints, std::string upload_url, bool do_upload,
+ bool upload_skin, bool upload_joints, std::string upload_url, bool do_upload,
LLHandle<LLWholeModelFeeObserver> fee_observer, LLHandle<LLWholeModelUploadObserver> upload_observer)
{
LLMeshUploadThread* thread = new LLMeshUploadThread(data, scale, upload_textures, upload_skin, upload_joints, upload_url,
@@ -4184,7 +4173,7 @@ void LLPhysicsDecomp::doDecompositionSingleHull()
setMeshData(mesh, true);
LLCDResult ret = decomp->buildSingleHull() ;
- if (ret)
+ if(ret)
{
LL_WARNS(LOG_MESH) << "Could not execute decomposition stage when attempting to create single hull." << LL_ENDL;
make_box(mCurRequest);
diff --git a/indra/newview/llmimetypes.cpp b/indra/newview/llmimetypes.cpp
index e689e39b26..790a184068 100755
--- a/indra/newview/llmimetypes.cpp
+++ b/indra/newview/llmimetypes.cpp
@@ -55,8 +55,8 @@ bool LLMIMETypes::parseMIMETypes(const std::string& xml_filename)
bool success = LLUICtrlFactory::getLayeredXMLNode(xml_filename, root);
if ( ! success || root.isNull() || ! root->hasName( "mimetypes" ) )
{
- llwarns << "Unable to read MIME type file: "
- << xml_filename << llendl;
+ LL_WARNS() << "Unable to read MIME type file: "
+ << xml_filename << LL_ENDL;
return false;
}
diff --git a/indra/newview/llmoveview.cpp b/indra/newview/llmoveview.cpp
index 8bddf49fb5..fe562baf96 100755
--- a/indra/newview/llmoveview.cpp
+++ b/indra/newview/llmoveview.cpp
@@ -549,7 +549,7 @@ void LLPanelStandStopFlying::clearStandStopFlyingMode(EStandStopFlyingMode mode)
panel->mStopFlyingButton->setVisible(FALSE);
break;
default:
- llerrs << "Unexpected EStandStopFlyingMode is passed: " << mode << llendl;
+ LL_ERRS() << "Unexpected EStandStopFlyingMode is passed: " << mode << LL_ENDL;
}
}
@@ -614,7 +614,7 @@ void LLPanelStandStopFlying::reparent(LLFloaterMove* move_view)
LLPanel* parent = dynamic_cast<LLPanel*>(getParent());
if (!parent)
{
- llwarns << "Stand/stop flying panel parent is unset, already attached?: " << mAttached << ", new parent: " << (move_view == NULL ? "NULL" : "Move Floater") << llendl;
+ LL_WARNS() << "Stand/stop flying panel parent is unset, already attached?: " << mAttached << ", new parent: " << (move_view == NULL ? "NULL" : "Move Floater") << LL_ENDL;
return;
}
@@ -636,7 +636,7 @@ void LLPanelStandStopFlying::reparent(LLFloaterMove* move_view)
{
if (!mOriginalParent.get())
{
- llwarns << "Original parent of the stand / stop flying panel not found" << llendl;
+ LL_WARNS() << "Original parent of the stand / stop flying panel not found" << LL_ENDL;
return;
}
@@ -664,7 +664,7 @@ LLPanelStandStopFlying* LLPanelStandStopFlying::getStandStopFlyingPanel()
panel->setVisible(FALSE);
//LLUI::getRootView()->addChild(panel);
- llinfos << "Build LLPanelStandStopFlying panel" << llendl;
+ LL_INFOS() << "Build LLPanelStandStopFlying panel" << LL_ENDL;
panel->updatePosition();
return panel;
diff --git a/indra/newview/llmutelist.cpp b/indra/newview/llmutelist.cpp
index 0720d443f8..65ac11092c 100755
--- a/indra/newview/llmutelist.cpp
+++ b/indra/newview/llmutelist.cpp
@@ -234,21 +234,21 @@ BOOL LLMuteList::add(const LLMute& mute, U32 flags)
// Can't mute empty string by name
if (mute.mName.empty())
{
- llwarns << "Trying to mute empty string by-name" << llendl;
+ LL_WARNS() << "Trying to mute empty string by-name" << LL_ENDL;
return FALSE;
}
// Null mutes must have uuid null
if (mute.mID.notNull())
{
- llwarns << "Trying to add by-name mute with non-null id" << llendl;
+ LL_WARNS() << "Trying to add by-name mute with non-null id" << LL_ENDL;
return FALSE;
}
std::pair<string_set_t::iterator, bool> result = mLegacyMutes.insert(mute.mName);
if (result.second)
{
- llinfos << "Muting by name " << mute.mName << llendl;
+ LL_INFOS() << "Muting by name " << mute.mName << LL_ENDL;
updateAdd(mute);
notifyObservers();
notifyObserversDetailed(mute);
@@ -297,7 +297,7 @@ BOOL LLMuteList::add(const LLMute& mute, U32 flags)
std::pair<mute_set_t::iterator, bool> result = mMutes.insert(localmute);
if (result.second)
{
- llinfos << "Muting " << localmute.mName << " id " << localmute.mID << " flags " << localmute.mFlags << llendl;
+ LL_INFOS() << "Muting " << localmute.mName << " id " << localmute.mID << " flags " << localmute.mFlags << LL_ENDL;
updateAdd(localmute);
notifyObservers();
notifyObserversDetailed(localmute);
@@ -387,14 +387,14 @@ BOOL LLMuteList::remove(const LLMute& mute, U32 flags)
{
// The entry was actually removed. Notify the server.
updateRemove(localmute);
- llinfos << "Unmuting " << localmute.mName << " id " << localmute.mID << " flags " << localmute.mFlags << llendl;
+ LL_INFOS() << "Unmuting " << localmute.mName << " id " << localmute.mID << " flags " << localmute.mFlags << LL_ENDL;
}
else
{
// Flags were updated, the mute entry needs to be retransmitted to the server and re-added to the list.
mMutes.insert(localmute);
updateAdd(localmute);
- llinfos << "Updating mute entry " << localmute.mName << " id " << localmute.mID << " flags " << localmute.mFlags << llendl;
+ LL_INFOS() << "Updating mute entry " << localmute.mName << " id " << localmute.mID << " flags " << localmute.mFlags << LL_ENDL;
}
// Must be after erase.
@@ -531,14 +531,14 @@ BOOL LLMuteList::loadFromFile(const std::string& filename)
{
if(!filename.size())
{
- llwarns << "Mute List Filename is Empty!" << llendl;
+ LL_WARNS() << "Mute List Filename is Empty!" << LL_ENDL;
return FALSE;
}
LLFILE* fp = LLFile::fopen(filename, "rb"); /*Flawfinder: ignore*/
if (!fp)
{
- llwarns << "Couldn't open mute list " << filename << llendl;
+ LL_WARNS() << "Couldn't open mute list " << filename << LL_ENDL;
return FALSE;
}
@@ -581,14 +581,14 @@ BOOL LLMuteList::saveToFile(const std::string& filename)
{
if(!filename.size())
{
- llwarns << "Mute List Filename is Empty!" << llendl;
+ LL_WARNS() << "Mute List Filename is Empty!" << LL_ENDL;
return FALSE;
}
LLFILE* fp = LLFile::fopen(filename, "wb"); /*Flawfinder: ignore*/
if (!fp)
{
- llwarns << "Couldn't open mute list " << filename << llendl;
+ LL_WARNS() << "Couldn't open mute list " << filename << LL_ENDL;
return FALSE;
}
// legacy mutes have null uuid
@@ -691,12 +691,12 @@ void LLMuteList::cache(const LLUUID& agent_id)
void LLMuteList::processMuteListUpdate(LLMessageSystem* msg, void**)
{
- llinfos << "LLMuteList::processMuteListUpdate()" << llendl;
+ LL_INFOS() << "LLMuteList::processMuteListUpdate()" << LL_ENDL;
LLUUID agent_id;
msg->getUUIDFast(_PREHASH_MuteData, _PREHASH_AgentID, agent_id);
if(agent_id != gAgent.getID())
{
- llwarns << "Got an mute list update for the wrong agent." << llendl;
+ LL_WARNS() << "Got an mute list update for the wrong agent." << LL_ENDL;
return;
}
std::string unclean_filename;
@@ -716,7 +716,7 @@ void LLMuteList::processMuteListUpdate(LLMessageSystem* msg, void**)
void LLMuteList::processUseCachedMuteList(LLMessageSystem* msg, void**)
{
- llinfos << "LLMuteList::processUseCachedMuteList()" << llendl;
+ LL_INFOS() << "LLMuteList::processUseCachedMuteList()" << LL_ENDL;
std::string agent_id_string;
gAgent.getID().toString(agent_id_string);
@@ -727,7 +727,7 @@ void LLMuteList::processUseCachedMuteList(LLMessageSystem* msg, void**)
void LLMuteList::onFileMuteList(void** user_data, S32 error_code, LLExtStat ext_status)
{
- llinfos << "LLMuteList::processMuteListFile()" << llendl;
+ LL_INFOS() << "LLMuteList::processMuteListFile()" << LL_ENDL;
std::string* local_filename_and_path = (std::string*)user_data;
if(local_filename_and_path && !local_filename_and_path->empty() && (error_code == 0))
diff --git a/indra/newview/llnamelistctrl.cpp b/indra/newview/llnamelistctrl.cpp
index 7ddd04fed0..b2a3a9f645 100755
--- a/indra/newview/llnamelistctrl.cpp
+++ b/indra/newview/llnamelistctrl.cpp
@@ -72,7 +72,7 @@ LLNameListCtrl::LLNameListCtrl(const LLNameListCtrl::Params& p)
LLScrollListItem* LLNameListCtrl::addNameItem(const LLUUID& agent_id, EAddPosition pos,
BOOL enabled, const std::string& suffix)
{
- //llinfos << "LLNameListCtrl::addNameItem " << agent_id << llendl;
+ //LL_INFOS() << "LLNameListCtrl::addNameItem " << agent_id << LL_ENDL;
NameItem item;
item.value = agent_id;
@@ -125,7 +125,7 @@ BOOL LLNameListCtrl::handleDragAndDrop(
}
handled = TRUE;
- lldebugst(LLERR_USER_INPUT) << "dragAndDrop handled by LLNameListCtrl " << getName() << llendl;
+ LL_DEBUGS("UserInput") << "dragAndDrop handled by LLNameListCtrl " << getName() << LL_ENDL;
return handled;
}
@@ -178,7 +178,7 @@ void LLNameListCtrl::mouseOverHighlightNthItem( S32 target_index )
}
else
{
- llwarns << "highlighted name list item is NULL" << llendl;
+ LL_WARNS() << "highlighted name list item is NULL" << LL_ENDL;
}
}
if(target_index != -1)
@@ -192,7 +192,7 @@ void LLNameListCtrl::mouseOverHighlightNthItem( S32 target_index )
}
else
{
- llwarns << "target name item is NULL" << llendl;
+ LL_WARNS() << "target name item is NULL" << LL_ENDL;
}
}
}
diff --git a/indra/newview/llnavigationbar.cpp b/indra/newview/llnavigationbar.cpp
index 95caa2731a..8c4849d28d 100755
--- a/indra/newview/llnavigationbar.cpp
+++ b/indra/newview/llnavigationbar.cpp
@@ -600,7 +600,7 @@ void LLNavigationBar::onRegionNameResponse(
LLVector3d region_pos = from_region_handle(region_handle);
LLVector3d global_pos = region_pos + (LLVector3d) local_coords;
- llinfos << "Teleporting to: " << LLSLURL(region_name, global_pos).getSLURLString() << llendl;
+ LL_INFOS() << "Teleporting to: " << LLSLURL(region_name, global_pos).getSLURLString() << LL_ENDL;
gAgent.teleportViaLocation(global_pos);
}
else if (gSavedSettings.getBOOL("SearchFromAddressBar"))
@@ -614,7 +614,7 @@ void LLNavigationBar::showTeleportHistoryMenu(LLUICtrl* btn_ctrl)
// Don't show the popup if teleport history is empty.
if (LLTeleportHistory::getInstance()->isEmpty())
{
- lldebugs << "Teleport history is empty, will not show the menu." << llendl;
+ LL_DEBUGS() << "Teleport history is empty, will not show the menu." << LL_ENDL;
return;
}
diff --git a/indra/newview/llnetmap.cpp b/indra/newview/llnetmap.cpp
index 08b5eaedbb..1685a18e26 100755
--- a/indra/newview/llnetmap.cpp
+++ b/indra/newview/llnetmap.cpp
@@ -162,7 +162,7 @@ void LLNetMap::draw()
static LLUICachedControl<bool> auto_center("MiniMapAutoCenter", true);
if (auto_center)
{
- mCurPan = lerp(mCurPan, mTargetPan, LLCriticalDamp::getInterpolant(0.1f));
+ mCurPan = lerp(mCurPan, mTargetPan, LLSmoothInterpolation::getInterpolant(0.1f));
}
// Prepare a scissor region
diff --git a/indra/newview/llnotificationhandlerutil.cpp b/indra/newview/llnotificationhandlerutil.cpp
index ef4d735616..a078889d46 100755
--- a/indra/newview/llnotificationhandlerutil.cpp
+++ b/indra/newview/llnotificationhandlerutil.cpp
@@ -135,7 +135,7 @@ void LLHandlerUtil::logToIMP2P(const LLNotificationPtr& notification, bool to_fi
if (from_id.isNull())
{
// Normal behavior for system generated messages, don't spam.
- // llwarns << " from_id for notification " << notification->getName() << " is null " << llendl;
+ // LL_WARNS() << " from_id for notification " << notification->getName() << " is null " << LL_ENDL;
return;
}
@@ -158,9 +158,9 @@ void LLHandlerUtil::logGroupNoticeToIMGroup(
LLGroupData groupData;
if (!gAgent.getGroupData(payload["group_id"].asUUID(), groupData))
{
- llwarns
+ LL_WARNS()
<< "Group notice for unknown group: "
- << payload["group_id"].asUUID() << llendl;
+ << payload["group_id"].asUUID() << LL_ENDL;
return;
}
diff --git a/indra/newview/lloutfitslist.cpp b/indra/newview/lloutfitslist.cpp
index ff8bfafb79..883221382c 100755
--- a/indra/newview/lloutfitslist.cpp
+++ b/indra/newview/lloutfitslist.cpp
@@ -90,7 +90,7 @@ const outfit_accordion_tab_params& get_accordion_tab_params()
}
else
{
- llwarns << "Failed to read xml of Outfit's Accordion Tab from outfit_accordion_tab.xml" << llendl;
+ LL_WARNS() << "Failed to read xml of Outfit's Accordion Tab from outfit_accordion_tab.xml" << LL_ENDL;
}
}
@@ -204,7 +204,7 @@ private:
LLWearableType::EType type = LLWearableType::typeNameToType(data.asString());
if (type == LLWearableType::WT_NONE)
{
- llwarns << "Invalid wearable type" << llendl;
+ LL_WARNS() << "Invalid wearable type" << LL_ENDL;
return;
}
diff --git a/indra/newview/llpanelavatar.cpp b/indra/newview/llpanelavatar.cpp
index 679b1bdcda..5d1b582d1f 100755
--- a/indra/newview/llpanelavatar.cpp
+++ b/indra/newview/llpanelavatar.cpp
@@ -29,7 +29,6 @@
#include "llagent.h"
#include "llavataractions.h"
-#include "llavatarconstants.h" // AVATAR_ONLINE
#include "llcallingcard.h"
#include "llcombobox.h"
#include "lldateutil.h" // ageFromDate()
@@ -98,7 +97,7 @@ LLDropTarget::~LLDropTarget()
void LLDropTarget::doDrop(EDragAndDropType cargo_type, void* cargo_data)
{
- llinfos << "LLDropTarget::doDrop()" << llendl;
+ LL_INFOS() << "LLDropTarget::doDrop()" << LL_ENDL;
}
BOOL LLDropTarget::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop,
diff --git a/indra/newview/llpanelblockedlist.cpp b/indra/newview/llpanelblockedlist.cpp
index 9665314e75..81ed2963e6 100755
--- a/indra/newview/llpanelblockedlist.cpp
+++ b/indra/newview/llpanelblockedlist.cpp
@@ -90,7 +90,7 @@ BOOL LLPanelBlockedList::postBuild()
mBlockedList->sortByType();
break;
default:
- llwarns << "Unrecognized sort order for blocked list" << llendl;
+ LL_WARNS() << "Unrecognized sort order for blocked list" << LL_ENDL;
break;
}
diff --git a/indra/newview/llpanelclassified.cpp b/indra/newview/llpanelclassified.cpp
index 862e4be203..62966e3a4e 100755
--- 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"
@@ -102,8 +103,8 @@ public:
const std::string& reason,
const LLSD& content)
{
- llwarns << "Sending click message failed (" << status << "): [" << reason << "]" << llendl;
- llwarns << "Content: [" << content << "]" << llendl;
+ LL_WARNS() << "Sending click message failed (" << status << "): [" << reason << "]" << LL_ENDL;
+ LL_WARNS() << "Content: [" << content << "]" << LL_ENDL;
}
};
@@ -219,7 +220,7 @@ void LLPanelClassifiedInfo::onOpen(const LLSD& key)
setSnapshotId(key["classified_snapshot_id"]);
setFromSearch(key["from_search"]);
- llinfos << "Opening classified [" << getClassifiedName() << "] (" << getClassifiedId() << ")" << llendl;
+ LL_INFOS() << "Opening classified [" << getClassifiedName() << "] (" << getClassifiedId() << ")" << LL_ENDL;
LLAvatarPropertiesProcessor::getInstance()->addObserver(getAvatarId(), this);
LLAvatarPropertiesProcessor::getInstance()->sendClassifiedInfoRequest(getClassifiedId());
@@ -230,7 +231,7 @@ void LLPanelClassifiedInfo::onOpen(const LLSD& key)
std::string url = gAgent.getRegion()->getCapability("SearchStatRequest");
if (!url.empty())
{
- llinfos << "Classified stat request via capability" << llendl;
+ LL_INFOS() << "Classified stat request via capability" << LL_ENDL;
LLSD body;
body["classified_id"] = getClassifiedId();
LLHTTPClient::post(url, body, new LLClassifiedStatsResponder(getClassifiedId()));
@@ -388,9 +389,9 @@ void LLPanelClassifiedInfo::setClickThrough(
S32 profile,
bool from_new_table)
{
- llinfos << "Click-through data for classified " << classified_id << " arrived: ["
+ LL_INFOS() << "Click-through data for classified " << classified_id << " arrived: ["
<< teleport << ", " << map << ", " << profile << "] ("
- << (from_new_table ? "new" : "old") << ")" << llendl;
+ << (from_new_table ? "new" : "old") << ")" << LL_ENDL;
for (panel_list_t::iterator iter = sAllPanels.begin(); iter != sAllPanels.end(); ++iter)
{
@@ -407,7 +408,7 @@ void LLPanelClassifiedInfo::setClickThrough(
continue;
}
- llinfos << "Updating classified info panel" << llendl;
+ LL_INFOS() << "Updating classified info panel" << LL_ENDL;
// We need to check to see if the data came from the new stat_table
// or the old classified table. We also need to cache the data from
@@ -436,10 +437,10 @@ void LLPanelClassifiedInfo::setClickThrough(
// *HACK: remove this when there is enough room for click stats in the info panel
self->getChildView("click_through_text")->setToolTip(ct_str.getString());
- llinfos << "teleport: " << llformat("%d", self->mTeleportClicksNew + self->mTeleportClicksOld)
+ LL_INFOS() << "teleport: " << llformat("%d", self->mTeleportClicksNew + self->mTeleportClicksOld)
<< ", map: " << llformat("%d", self->mMapClicksNew + self->mMapClicksOld)
<< ", profile: " << llformat("%d", self->mProfileClicksNew + self->mProfileClicksOld)
- << llendl;
+ << LL_ENDL;
}
}
@@ -549,8 +550,8 @@ void LLPanelClassifiedInfo::sendClickMessage(
body["region_name"] = sim_name;
std::string url = gAgent.getRegion()->getCapability("SearchStatTracking");
- llinfos << "Sending click msg via capability (url=" << url << ")" << llendl;
- llinfos << "body: [" << body << "]" << llendl;
+ LL_INFOS() << "Sending click msg via capability (url=" << url << ")" << LL_ENDL;
+ LL_INFOS() << "body: [" << body << "]" << LL_ENDL;
LLHTTPClient::post(url, body, new LLClassifiedClickMessageResponder());
}
diff --git a/indra/newview/llpanelcontents.h b/indra/newview/llpanelcontents.h
index 62ccb64a4c..ad62e13bc2 100755
--- a/indra/newview/llpanelcontents.h
+++ b/indra/newview/llpanelcontents.h
@@ -31,7 +31,6 @@
#include "llpanel.h"
#include "llinventory.h"
#include "lluuid.h"
-#include "llmap.h"
#include "llviewerobject.h"
#include "llvoinventorylistener.h"
diff --git a/indra/newview/llpaneleditwearable.cpp b/indra/newview/llpaneleditwearable.cpp
index 0621cc8fad..daa7df682b 100755
--- a/indra/newview/llpaneleditwearable.cpp
+++ b/indra/newview/llpaneleditwearable.cpp
@@ -30,6 +30,7 @@
#include "llpanel.h"
#include "llviewerwearable.h"
#include "lluictrl.h"
+#include "lllocaltextureobject.h"
#include "llscrollingpanellist.h"
#include "llvisualparam.h"
#include "lltoolmorph.h"
@@ -453,7 +454,7 @@ get_pickers_indexes<LLColorSwatchCtrl> (const LLEditWearableDictionary::Wearable
{
if (!wearable_entry)
{
- llwarns << "could not get LLColorSwatchCtrl indexes for null wearable entry." << llendl;
+ LL_WARNS() << "could not get LLColorSwatchCtrl indexes for null wearable entry." << LL_ENDL;
return null_texture_vec;
}
return wearable_entry->mColorSwatchCtrls;
@@ -466,7 +467,7 @@ get_pickers_indexes<LLTextureCtrl> (const LLEditWearableDictionary::WearableEntr
{
if (!wearable_entry)
{
- llwarns << "could not get LLTextureCtrl indexes for null wearable entry." << llendl;
+ LL_WARNS() << "could not get LLTextureCtrl indexes for null wearable entry." << LL_ENDL;
return null_texture_vec;
}
return wearable_entry->mTextureCtrls;
@@ -496,7 +497,7 @@ find_picker_ctrl_entry_if(LLWearableType::EType type, const Predicate pred)
= LLEditWearableDictionary::getInstance()->getWearable(type);
if (!wearable_entry)
{
- llwarns << "could not get wearable dictionary entry for wearable of type: " << type << llendl;
+ LL_WARNS() << "could not get wearable dictionary entry for wearable of type: " << type << LL_ENDL;
return NULL;
}
const texture_vec_t& indexes = get_pickers_indexes<CtrlType>(wearable_entry);
@@ -510,7 +511,7 @@ find_picker_ctrl_entry_if(LLWearableType::EType type, const Predicate pred)
= get_picker_entry<CtrlType>(te);
if (!entry)
{
- llwarns << "could not get picker dictionary entry (" << te << ") for wearable of type: " << type << llendl;
+ LL_WARNS() << "could not get picker dictionary entry (" << te << ") for wearable of type: " << type << LL_ENDL;
continue;
}
if (pred(entry))
@@ -527,14 +528,14 @@ for_each_picker_ctrl_entry(LLPanel* panel, LLWearableType::EType type, function_
{
if (!panel)
{
- llwarns << "the panel wasn't passed for wearable of type: " << type << llendl;
+ LL_WARNS() << "the panel wasn't passed for wearable of type: " << type << LL_ENDL;
return;
}
const LLEditWearableDictionary::WearableEntry *wearable_entry
= LLEditWearableDictionary::getInstance()->getWearable(type);
if (!wearable_entry)
{
- llwarns << "could not get wearable dictionary entry for wearable of type: " << type << llendl;
+ LL_WARNS() << "could not get wearable dictionary entry for wearable of type: " << type << LL_ENDL;
return;
}
const texture_vec_t& indexes = get_pickers_indexes<CtrlType>(wearable_entry);
@@ -548,7 +549,7 @@ for_each_picker_ctrl_entry(LLPanel* panel, LLWearableType::EType type, function_
= get_picker_entry<CtrlType>(te);
if (!entry)
{
- llwarns << "could not get picker dictionary entry (" << te << ") for wearable of type: " << type << llendl;
+ LL_WARNS() << "could not get picker dictionary entry (" << te << ") for wearable of type: " << type << LL_ENDL;
continue;
}
fun (panel, entry);
@@ -700,12 +701,12 @@ void LLPanelEditWearable::setWearablePanelVisibilityChangeCallback(LLPanel* body
}
else
{
- llwarns << "accordion_ctrl is NULL" << llendl;
+ LL_WARNS() << "accordion_ctrl is NULL" << LL_ENDL;
}
}
else
{
- llwarns << "bodypart_panel is NULL" << llendl;
+ LL_WARNS() << "bodypart_panel is NULL" << LL_ENDL;
}
}
@@ -776,7 +777,7 @@ BOOL LLPanelEditWearable::postBuild()
const LLEditWearableDictionary::WearableEntry *wearable_entry = LLEditWearableDictionary::getInstance()->getWearable(type);
if (!wearable_entry)
{
- llwarns << "could not get wearable dictionary entry for wearable of type: " << type << llendl;
+ LL_WARNS() << "could not get wearable dictionary entry for wearable of type: " << type << LL_ENDL;
continue;
}
U8 num_subparts = wearable_entry->mSubparts.size();
@@ -789,7 +790,7 @@ BOOL LLPanelEditWearable::postBuild()
if (!subpart_entry)
{
- llwarns << "could not get wearable subpart dictionary entry for subpart: " << subpart_e << llendl;
+ LL_WARNS() << "could not get wearable subpart dictionary entry for subpart: " << subpart_e << LL_ENDL;
continue;
}
@@ -799,7 +800,7 @@ BOOL LLPanelEditWearable::postBuild()
if (!tab)
{
- llwarns << "could not get llaccordionctrltab from UI with name: " << accordion_tab << llendl;
+ LL_WARNS() << "could not get llaccordionctrltab from UI with name: " << accordion_tab << LL_ENDL;
continue;
}
@@ -959,7 +960,7 @@ void LLPanelEditWearable::onTexturePickerCommit(const LLUICtrl* ctrl)
const LLTextureCtrl* texture_ctrl = dynamic_cast<const LLTextureCtrl*>(ctrl);
if (!texture_ctrl)
{
- llwarns << "got commit signal from not LLTextureCtrl." << llendl;
+ LL_WARNS() << "got commit signal from not LLTextureCtrl." << LL_ENDL;
return;
}
@@ -987,7 +988,7 @@ void LLPanelEditWearable::onTexturePickerCommit(const LLUICtrl* ctrl)
}
else
{
- llwarns << "could not get texture picker dictionary entry for wearable of type: " << type << llendl;
+ LL_WARNS() << "could not get texture picker dictionary entry for wearable of type: " << type << LL_ENDL;
}
}
}
@@ -1013,7 +1014,7 @@ void LLPanelEditWearable::onColorSwatchCommit(const LLUICtrl* ctrl)
}
else
{
- llwarns << "could not get color swatch dictionary entry for wearable of type: " << type << llendl;
+ LL_WARNS() << "could not get color swatch dictionary entry for wearable of type: " << type << LL_ENDL;
}
}
}
@@ -1070,7 +1071,7 @@ void LLPanelEditWearable::saveChanges(bool force_save_as)
LLAppearanceMgr::instance().findCOFItemLinks(mWearablePtr->getItemID());
if (links.size()>0)
{
- link_item = links.get(0).get();
+ link_item = links.at(0).get();
if (link_item && link_item->getIsLinkType())
{
description = link_item->getActualDescription();
@@ -1141,7 +1142,7 @@ void LLPanelEditWearable::showWearable(LLViewerWearable* wearable, BOOL show, BO
const LLEditWearableDictionary::WearableEntry *wearable_entry = LLEditWearableDictionary::getInstance()->getWearable(type);
if (!wearable_entry)
{
- llwarns << "called LLPanelEditWearable::showWearable with an invalid wearable type! (" << type << ")" << llendl;
+ LL_WARNS() << "called LLPanelEditWearable::showWearable with an invalid wearable type! (" << type << ")" << LL_ENDL;
return;
}
@@ -1179,7 +1180,7 @@ void LLPanelEditWearable::showWearable(LLViewerWearable* wearable, BOOL show, BO
if (!subpart_entry)
{
- llwarns << "could not get wearable subpart dictionary entry for subpart: " << subpart_e << llendl;
+ LL_WARNS() << "could not get wearable subpart dictionary entry for subpart: " << subpart_e << LL_ENDL;
continue;
}
@@ -1191,13 +1192,13 @@ void LLPanelEditWearable::showWearable(LLViewerWearable* wearable, BOOL show, BO
if (!panel_list)
{
- llwarns << "could not get scrolling panel list: " << scrolling_panel << llendl;
+ LL_WARNS() << "could not get scrolling panel list: " << scrolling_panel << LL_ENDL;
continue;
}
if (!tab)
{
- llwarns << "could not get llaccordionctrltab from UI with name: " << accordion_tab << llendl;
+ LL_WARNS() << "could not get llaccordionctrltab from UI with name: " << accordion_tab << LL_ENDL;
continue;
}
@@ -1271,13 +1272,13 @@ void LLPanelEditWearable::changeCamera(U8 subpart)
const LLEditWearableDictionary::WearableEntry *wearable_entry = LLEditWearableDictionary::getInstance()->getWearable(mWearablePtr->getType());
if (!wearable_entry)
{
- llinfos << "could not get wearable dictionary entry for wearable type: " << mWearablePtr->getType() << llendl;
+ LL_INFOS() << "could not get wearable dictionary entry for wearable type: " << mWearablePtr->getType() << LL_ENDL;
return;
}
if (subpart >= wearable_entry->mSubparts.size())
{
- llinfos << "accordion tab expanded for invalid subpart. Wearable type: " << mWearablePtr->getType() << " subpart num: " << subpart << llendl;
+ LL_INFOS() << "accordion tab expanded for invalid subpart. Wearable type: " << mWearablePtr->getType() << " subpart num: " << subpart << LL_ENDL;
return;
}
@@ -1286,7 +1287,7 @@ void LLPanelEditWearable::changeCamera(U8 subpart)
if (!subpart_entry)
{
- llwarns << "could not get wearable subpart dictionary entry for subpart: " << subpart_e << llendl;
+ LL_WARNS() << "could not get wearable subpart dictionary entry for subpart: " << subpart_e << LL_ENDL;
return;
}
@@ -1375,7 +1376,7 @@ void LLPanelEditWearable::updateScrollingPanelUI()
if (!panel_list)
{
- llwarns << "could not get scrolling panel list: " << scrolling_panel << llendl;
+ LL_WARNS() << "could not get scrolling panel list: " << scrolling_panel << LL_ENDL;
continue;
}
@@ -1571,7 +1572,7 @@ void LLPanelEditWearable::onInvisibilityCommit(LLCheckBoxCtrl* checkbox_ctrl, LL
if (!checkbox_ctrl) return;
if (!getWearable()) return;
- llinfos << "onInvisibilityCommit, self " << this << " checkbox_ctrl " << checkbox_ctrl << llendl;
+ LL_INFOS() << "onInvisibilityCommit, self " << this << " checkbox_ctrl " << checkbox_ctrl << LL_ENDL;
bool new_invis_state = checkbox_ctrl->get();
if (new_invis_state)
diff --git a/indra/newview/llpanelface.cpp b/indra/newview/llpanelface.cpp
index 3869219da6..e3be1312e4 100755
--- a/indra/newview/llpanelface.cpp
+++ b/indra/newview/llpanelface.cpp
@@ -337,7 +337,7 @@ void LLPanelFace::sendBump(U32 bumpiness)
{
LLTextureCtrl* bumpytexture_ctrl = getChild<LLTextureCtrl>("bumpytexture control");
if (bumpiness < BUMPY_TEXTURE)
- {
+{
LL_DEBUGS("Materials") << "clearing bumptexture control" << LL_ENDL;
bumpytexture_ctrl->clear();
bumpytexture_ctrl->setImageAssetID(LLUUID());
@@ -358,7 +358,7 @@ void LLPanelFace::sendBump(U32 bumpiness)
//
LLSelectedTEMaterial::setNormalID(this, current_normal_map);
- LLSelectMgr::getInstance()->selectionSetBumpmap( bump );
+ LLSelectMgr::getInstance()->selectionSetBumpmap( bump );
}
void LLPanelFace::sendTexGen()
@@ -374,7 +374,7 @@ void LLPanelFace::sendShiny(U32 shininess)
LLTextureCtrl* texture_ctrl = getChild<LLTextureCtrl>("shinytexture control");
if (shininess < SHINY_TEXTURE)
- {
+{
texture_ctrl->clear();
texture_ctrl->setImageAssetID(LLUUID());
}
@@ -661,7 +661,7 @@ void LLPanelFace::updateUI()
// only turn on auto-adjust button if there is a media renderer and the media is loaded
getChildView("button align")->setEnabled(editable);
-
+
LLComboBox* combobox_matmedia = getChild<LLComboBox>("combobox matmedia");
if (combobox_matmedia)
{
@@ -672,7 +672,7 @@ void LLPanelFace::updateUI()
}
else
{
- llwarns << "failed getChild for 'combobox matmedia'" << llendl;
+ LL_WARNS() << "failed getChild for 'combobox matmedia'" << LL_ENDL;
}
getChildView("combobox matmedia")->setEnabled(editable);
@@ -696,15 +696,15 @@ void LLPanelFace::updateUI()
bool identical_diffuse = false;
bool identical_norm = false;
bool identical_spec = false;
-
- LLTextureCtrl* texture_ctrl = getChild<LLTextureCtrl>("texture control");
+
+ LLTextureCtrl* texture_ctrl = getChild<LLTextureCtrl>("texture control");
LLTextureCtrl* shinytexture_ctrl = getChild<LLTextureCtrl>("shinytexture control");
LLTextureCtrl* bumpytexture_ctrl = getChild<LLTextureCtrl>("bumpytexture control");
LLUUID id;
LLUUID normmap_id;
LLUUID specmap_id;
-
+
// Color swatch
{
getChildView("color label")->setEnabled(editable);
@@ -715,7 +715,7 @@ void LLPanelFace::updateUI()
bool identical_color = false;
if(mColorSwatch)
- {
+ {
LLSelectedTE::getColor(color, identical_color);
mColorSwatch->setOriginal(color);
@@ -747,7 +747,7 @@ void LLPanelFace::updateUI()
LLCtrlSelectionInterface* combobox_shininess = childGetSelectionInterface("combobox shininess");
if (combobox_shininess)
- {
+ {
combobox_shininess->selectNthItem((S32)shiny);
}
@@ -760,15 +760,15 @@ void LLPanelFace::updateUI()
getChildView("label environment")->setEnabled(editable);
getChildView("environment")->setEnabled(editable);
getChildView("label shinycolor")->setEnabled(editable);
-
+
getChild<LLUICtrl>("combobox shininess")->setTentative(!identical_spec);
getChild<LLUICtrl>("glossiness")->setTentative(!identical_spec);
getChild<LLUICtrl>("environment")->setTentative(!identical_spec);
getChild<LLUICtrl>("shinycolorswatch")->setTentative(!identical_spec);
-
+
LLColorSwatchCtrl* mShinyColorSwatch = getChild<LLColorSwatchCtrl>("shinycolorswatch");
if(mShinyColorSwatch)
- {
+ {
mShinyColorSwatch->setValid(editable);
mShinyColorSwatch->setEnabled( editable );
mShinyColorSwatch->setCanApplyImmediately( editable );
@@ -776,7 +776,7 @@ void LLPanelFace::updateUI()
U8 bumpy = 0;
// Bumpy
- {
+ {
bool identical_bumpy = false;
LLSelectedTE::getBumpmap(bumpy,identical_bumpy);
@@ -786,18 +786,18 @@ void LLPanelFace::updateUI()
bumpy = norm_map_id.isNull() ? bumpy : BUMPY_TEXTURE;
if (combobox_bumpiness)
- {
+ {
combobox_bumpiness->selectNthItem((S32)bumpy);
- }
+ }
else
- {
- llwarns << "failed childGetSelectionInterface for 'combobox bumpiness'" << llendl;
- }
+ {
+ LL_WARNS() << "failed childGetSelectionInterface for 'combobox bumpiness'" << LL_ENDL;
+ }
getChildView("combobox bumpiness")->setEnabled(editable);
getChild<LLUICtrl>("combobox bumpiness")->setTentative(!identical_bumpy);
getChildView("label bumpiness")->setEnabled(editable);
- }
+ }
// Texture
{
@@ -824,10 +824,10 @@ void LLPanelFace::updateUI()
case GL_RGB: break;
default:
{
- llwarns << "Unexpected tex format in LLPanelFace...resorting to no alpha" << llendl;
- }
+ LL_WARNS() << "Unexpected tex format in LLPanelFace...resorting to no alpha" << LL_ENDL;
+ }
break;
- }
+ }
if(LLViewerMedia::textureHasMedia(id))
{
@@ -860,13 +860,13 @@ void LLPanelFace::updateUI()
}
else
{
- llwarns << "failed childGetSelectionInterface for 'combobox alphamode'" << llendl;
+ LL_WARNS() << "failed childGetSelectionInterface for 'combobox alphamode'" << LL_ENDL;
}
updateAlphaControls();
- if(texture_ctrl)
- {
+ if(texture_ctrl)
+ {
if (identical_diffuse)
{
texture_ctrl->setTentative( FALSE );
@@ -878,22 +878,22 @@ void LLPanelFace::updateUI()
getChildView("label maskcutoff")->setEnabled(editable && mIsAlpha);
}
else if (id.isNull())
- {
- // None selected
- texture_ctrl->setTentative( FALSE );
- texture_ctrl->setEnabled( FALSE );
- texture_ctrl->setImageAssetID( LLUUID::null );
+ {
+ // None selected
+ texture_ctrl->setTentative( FALSE );
+ texture_ctrl->setEnabled( FALSE );
+ texture_ctrl->setImageAssetID( LLUUID::null );
getChildView("combobox alphamode")->setEnabled( FALSE );
getChildView("label alphamode")->setEnabled( FALSE );
getChildView("maskcutoff")->setEnabled( FALSE);
getChildView("label maskcutoff")->setEnabled( FALSE );
- }
- else
- {
- // Tentative: multiple selected with different textures
- texture_ctrl->setTentative( TRUE );
- texture_ctrl->setEnabled( editable );
- texture_ctrl->setImageAssetID( id );
+ }
+ else
+ {
+ // Tentative: multiple selected with different textures
+ texture_ctrl->setTentative( TRUE );
+ texture_ctrl->setEnabled( editable );
+ texture_ctrl->setImageAssetID( id );
getChildView("combobox alphamode")->setEnabled(editable && mIsAlpha && transparency <= 0.f);
getChildView("label alphamode")->setEnabled(editable && mIsAlpha);
getChildView("maskcutoff")->setEnabled(editable && mIsAlpha);
@@ -908,20 +908,20 @@ void LLPanelFace::updateUI()
shinytexture_ctrl->setTentative( FALSE );
shinytexture_ctrl->setEnabled( editable );
shinytexture_ctrl->setImageAssetID( specmap_id );
- }
+ }
else if (specmap_id.isNull())
{
shinytexture_ctrl->setTentative( FALSE );
shinytexture_ctrl->setEnabled( editable );
shinytexture_ctrl->setImageAssetID( LLUUID::null );
- }
+ }
else
{
shinytexture_ctrl->setTentative( TRUE );
shinytexture_ctrl->setEnabled( editable );
shinytexture_ctrl->setImageAssetID( specmap_id );
- }
- }
+ }
+ }
if (bumpytexture_ctrl)
{
@@ -952,7 +952,7 @@ void LLPanelFace::updateUI()
{
LLCheckBoxCtrl* cb_planar_align = getChild<LLCheckBoxCtrl>("checkbox planar align");
align_planar = (cb_planar_align && cb_planar_align->get());
-
+
bool enabled = (editable && isIdenticalPlanarTexgen());
childSetValue("checkbox planar align", align_planar && enabled);
childSetEnabled("checkbox planar align", enabled);
@@ -1145,7 +1145,7 @@ void LLPanelFace::updateUI()
F32 diff_rot_deg = diff_rotation * RAD_TO_DEG;
F32 norm_rot_deg = norm_rotation * RAD_TO_DEG;
F32 spec_rot_deg = spec_rotation * RAD_TO_DEG;
-
+
getChildView("TexRot")->setEnabled(editable);
getChildView("shinyRot")->setEnabled(editable && specmap_id.notNull());
getChildView("bumpyRot")->setEnabled(editable && normmap_id.notNull());
@@ -1166,10 +1166,10 @@ void LLPanelFace::updateUI()
getChild<LLUICtrl>("glow")->setValue(glow);
getChild<LLUICtrl>("glow")->setTentative(!identical_glow);
getChildView("glow")->setEnabled(editable);
- getChildView("glow label")->setEnabled(editable);
+ getChildView("glow label")->setEnabled(editable);
}
- {
+ {
LLCtrlSelectionInterface* combobox_texgen = childGetSelectionInterface("combobox texgen");
if (combobox_texgen)
{
@@ -1177,9 +1177,9 @@ void LLPanelFace::updateUI()
combobox_texgen->selectNthItem(((S32)selected_texgen) >> 1);
}
else
- {
- llwarns << "failed childGetSelectionInterface for 'combobox texgen'" << llendl;
- }
+ {
+ LL_WARNS() << "failed childGetSelectionInterface for 'combobox texgen'" << LL_ENDL;
+ }
getChildView("combobox texgen")->setEnabled(editable);
getChild<LLUICtrl>("combobox texgen")->setTentative(!identical);
@@ -1195,7 +1195,7 @@ void LLPanelFace::updateUI()
{
getChild<LLUICtrl>("rpt")->setValue(getString("string repeats per face"));
}
- }
+ }
{
U8 fullbright_flag = 0;
@@ -1207,8 +1207,7 @@ void LLPanelFace::updateUI()
getChildView("checkbox fullbright")->setEnabled(editable);
getChild<LLUICtrl>("checkbox fullbright")->setTentative(!identical_fullbright);
}
-
-
+
// Repeats per meter
{
F32 repeats_diff = 1.f;
@@ -1225,7 +1224,7 @@ void LLPanelFace::updateUI()
LLComboBox* mComboTexGen = getChild<LLComboBox>("combobox texgen");
if (mComboTexGen)
- {
+ {
S32 index = mComboTexGen ? mComboTexGen->getCurrentIndex() : 0;
BOOL enabled = editable && (index != 1);
BOOL identical_repeats = true;
@@ -1236,26 +1235,26 @@ void LLPanelFace::updateUI()
LLSelectMgr::getInstance()->setTextureChannel(LLRender::eTexIndex(material_type));
switch (material_type)
- {
+ {
default:
case MATTYPE_DIFFUSE:
- {
+ {
enabled = editable && !id.isNull();
identical_repeats = identical_diff_repeats;
repeats = repeats_diff;
- }
+ }
break;
case MATTYPE_SPECULAR:
- {
+ {
enabled = (editable && ((shiny == SHINY_TEXTURE) && !specmap_id.isNull()));
identical_repeats = identical_spec_repeats;
repeats = repeats_spec;
- }
+ }
break;
case MATTYPE_NORMAL:
- {
+ {
enabled = (editable && ((bumpy == BUMPY_TEXTURE) && !normmap_id.isNull()));
identical_repeats = identical_norm_repeats;
repeats = repeats_norm;
@@ -1295,14 +1294,14 @@ void LLPanelFace::updateUI()
if (!mIsAlpha)
{ // ... unless there is no alpha channel in the texture, in which case alpha mode MUST ebe none
alpha_mode = LLMaterial::DIFFUSE_ALPHA_MODE_NONE;
- }
+ }
combobox_alphamode->selectNthItem(alpha_mode);
- }
- else
- {
- llwarns << "failed childGetSelectionInterface for 'combobox alphamode'" << llendl;
- }
+ }
+ else
+ {
+ LL_WARNS() << "failed childGetSelectionInterface for 'combobox alphamode'" << LL_ENDL;
+ }
getChild<LLUICtrl>("maskcutoff")->setValue(material->getAlphaMaskCutoff());
updateAlphaControls();
@@ -1314,15 +1313,15 @@ void LLPanelFace::updateUI()
texture_ctrl->setImageAssetID(material->getSpecularID());
if (!material->getSpecularID().isNull() && (shiny == SHINY_TEXTURE))
- {
+ {
material->getSpecularOffset(offset_x,offset_y);
material->getSpecularRepeat(repeat_x,repeat_y);
if (identical_planar_texgen)
- {
+ {
repeat_x *= 2.0f;
repeat_y *= 2.0f;
- }
+ }
rot = material->getSpecularRotation();
getChild<LLUICtrl>("shinyScaleU")->setValue(repeat_x);
@@ -1334,7 +1333,7 @@ void LLPanelFace::updateUI()
getChild<LLUICtrl>("environment")->setValue(material->getEnvironmentIntensity());
updateShinyControls(!material->getSpecularID().isNull(), true);
- }
+ }
// Assert desired colorswatch color to match material AFTER updateShinyControls
// to avoid getting overwritten with the default on some UI state changes.
@@ -1359,7 +1358,7 @@ void LLPanelFace::updateUI()
repeat_x *= 2.0f;
repeat_y *= 2.0f;
}
-
+
rot = material->getNormalRotation();
getChild<LLUICtrl>("bumpyScaleU")->setValue(repeat_x);
getChild<LLUICtrl>("bumpyScaleV")->setValue(repeat_y);
@@ -1399,7 +1398,7 @@ void LLPanelFace::updateUI()
if(mColorSwatch)
{
mColorSwatch->setEnabled( FALSE );
- mColorSwatch->setFallbackImageName("locked_image.j2c" );
+ mColorSwatch->setFallbackImage(LLUI::getUIImage("locked_image.j2c") );
mColorSwatch->setValid(FALSE);
}
getChildView("color trans")->setEnabled(FALSE);
@@ -1411,7 +1410,7 @@ void LLPanelFace::updateUI()
getChildView("button align")->setEnabled(FALSE);
//getChildView("has media")->setEnabled(FALSE);
//getChildView("media info set")->setEnabled(FALSE);
-
+
updateVisibility();
// Set variable values for numeric expressions
@@ -1769,7 +1768,7 @@ BOOL LLPanelFace::onDragTexture(LLUICtrl*, LLInventoryItem* item)
void LLPanelFace::onCommitTexture( const LLSD& data )
{
- LLViewerStats::getInstance()->incStat(LLViewerStats::ST_EDIT_TEXTURE_COUNT );
+ add(LLStatViewer::EDIT_TEXTURE, 1);
sendTexture();
}
@@ -1805,7 +1804,7 @@ void LLPanelFace::onSelectTexture(const LLSD& data)
case GL_RGB: break;
default:
{
- llwarns << "Unexpected tex format in LLPanelFace...resorting to no alpha" << llendl;
+ LL_WARNS() << "Unexpected tex format in LLPanelFace...resorting to no alpha" << LL_ENDL;
}
break;
}
@@ -2024,8 +2023,8 @@ void LLPanelFace::onCommitRepeatsPerMeter(LLUICtrl* ctrl, void* userdata)
{
case MATTYPE_DIFFUSE:
{
- LLSelectMgr::getInstance()->selectionTexScaleAutofit( repeats_per_meter );
- }
+ LLSelectMgr::getInstance()->selectionTexScaleAutofit( repeats_per_meter );
+}
break;
case MATTYPE_NORMAL:
diff --git a/indra/newview/llpanelface.h b/indra/newview/llpanelface.h
index b684881225..e32f039921 100755
--- a/indra/newview/llpanelface.h
+++ b/indra/newview/llpanelface.h
@@ -485,7 +485,7 @@ private:
{
public:
- static void getFace(LLFace*& face_to_return, bool& identical_face);
+ static void getFace(class LLFace*& face_to_return, bool& identical_face);
static void getImageFormat(LLGLenum& image_format_to_return, bool& identical_face);
static void getTexId(LLUUID& id, bool& identical);
static void getObjectScaleS(F32& scale_s, bool& identical);
diff --git a/indra/newview/llpanelgroup.cpp b/indra/newview/llpanelgroup.cpp
index 180c1d6ab5..bf332d1ca7 100755
--- a/indra/newview/llpanelgroup.cpp
+++ b/indra/newview/llpanelgroup.cpp
@@ -291,7 +291,7 @@ void LLPanelGroup::onBtnGroupChatClicked(void* user_data)
void LLPanelGroup::onBtnJoin()
{
- lldebugs << "joining group: " << mID << llendl;
+ LL_DEBUGS() << "joining group: " << mID << LL_ENDL;
LLGroupActions::join(mID);
}
@@ -329,8 +329,9 @@ void LLPanelGroup::update(LLGroupChange gc)
if(gdatap)
{
std::string group_name = gdatap->mName.empty() ? LLTrans::getString("LoadingData") : gdatap->mName;
- childSetValue("group_name", group_name);
- childSetToolTip("group_name",group_name);
+ LLUICtrl* group_name_ctrl = getChild<LLUICtrl>("group_name");
+ group_name_ctrl->setValue(group_name);
+ group_name_ctrl->setToolTip(group_name);
LLGroupData agent_gdatap;
bool is_member = gAgent.getGroupData(mID,agent_gdatap) || gAgent.isGodlike();
@@ -376,8 +377,9 @@ void LLPanelGroup::setGroupID(const LLUUID& group_id)
if(gdatap)
{
std::string group_name = gdatap->mName.empty() ? LLTrans::getString("LoadingData") : gdatap->mName;
- childSetValue("group_name", group_name);
- childSetToolTip("group_name",group_name);
+ LLUICtrl* group_name_ctrl = getChild<LLUICtrl>("group_name");
+ group_name_ctrl->setValue(group_name);
+ group_name_ctrl->setToolTip(group_name);
}
LLButton* button_apply = findChild<LLButton>("btn_apply");
diff --git a/indra/newview/llpanelgroupgeneral.cpp b/indra/newview/llpanelgroupgeneral.cpp
index eaf33c7108..7ffaa05919 100755
--- a/indra/newview/llpanelgroupgeneral.cpp
+++ b/indra/newview/llpanelgroupgeneral.cpp
@@ -266,7 +266,7 @@ void LLPanelGroupGeneral::onClickInfo(void *userdata)
if ( !self ) return;
- lldebugs << "open group info: " << self->mGroupID << llendl;
+ LL_DEBUGS() << "open group info: " << self->mGroupID << LL_ENDL;
LLGroupActions::show(self->mGroupID);
@@ -318,7 +318,7 @@ bool LLPanelGroupGeneral::apply(std::string& mesg)
if (has_power_in_group || mGroupID.isNull())
{
- llinfos << "LLPanelGroupGeneral::apply" << llendl;
+ LL_INFOS() << "LLPanelGroupGeneral::apply" << LL_ENDL;
// Check to make sure mature has been set
if(mComboMature &&
@@ -624,7 +624,7 @@ void LLPanelGroupGeneral::update(LLGroupChange gc)
{
mEditCharter->setText(gdatap->mCharter);
}
-
+
resetDirty();
}
@@ -703,7 +703,7 @@ void LLPanelGroupGeneral::reset()
mEditCharter->setText(empty_str);
mGroupNameEditor->setText(empty_str);
}
-
+
{
mComboMature->setEnabled(true);
mComboMature->setVisible( !gAgent.isTeen() );
diff --git a/indra/newview/llpanelgroupinvite.cpp b/indra/newview/llpanelgroupinvite.cpp
index a9a3c686a6..dd13e8abf4 100755
--- a/indra/newview/llpanelgroupinvite.cpp
+++ b/indra/newview/llpanelgroupinvite.cpp
@@ -492,7 +492,7 @@ void LLPanelGroupInvite::addUsers(uuid_vec_t& agent_ids)
}
else
{
- llwarns << "llPanelGroupInvite: Selected avatar has no name: " << dest->getID() << llendl;
+ LL_WARNS() << "llPanelGroupInvite: Selected avatar has no name: " << dest->getID() << LL_ENDL;
names.push_back("(Unknown)");
}
}
diff --git a/indra/newview/llpanelgrouplandmoney.cpp b/indra/newview/llpanelgrouplandmoney.cpp
index 17707557bb..106f6c25f1 100755
--- a/indra/newview/llpanelgrouplandmoney.cpp
+++ b/indra/newview/llpanelgrouplandmoney.cpp
@@ -131,7 +131,7 @@ public:
- static LLMap<LLUUID, LLGroupMoneyTabEventHandler*> sInstanceIDs;
+ static std::map<LLUUID, LLGroupMoneyTabEventHandler*> sInstanceIDs;
static std::map<LLPanel*, LLGroupMoneyTabEventHandler*> sTabsToHandlers;
protected:
LLGroupMoneyTabEventHandlerImpl* mImplementationp;
@@ -324,7 +324,7 @@ bool LLPanelGroupLandMoney::impl::applyContribution()
if(!gAgent.setGroupContribution(mPanel.mGroupID, new_contribution))
{
// should never happen...
- llwarns << "Unable to set contribution." << llendl;
+ LL_WARNS() << "Unable to set contribution." << LL_ENDL;
return false;
}
}
@@ -476,7 +476,7 @@ void LLPanelGroupLandMoney::impl::processGroupLand(LLMessageSystem* msg)
if ( msg->getSizeFast(_PREHASH_QueryData, i, _PREHASH_ProductSKU) > 0 )
{
msg->getStringFast( _PREHASH_QueryData, _PREHASH_ProductSKU, land_sku, i);
- llinfos << "Land sku: " << land_sku << llendl;
+ LL_INFOS() << "Land sku: " << land_sku << LL_ENDL;
land_type = LLProductInfoRequestManager::instance().getDescriptionForSku(land_sku);
}
else
@@ -534,7 +534,7 @@ void LLPanelGroupLandMoney::impl::processGroupLand(LLMessageSystem* msg)
//static
-LLMap<LLUUID, LLPanelGroupLandMoney*> LLPanelGroupLandMoney::sGroupIDs;
+std::map<LLUUID, LLPanelGroupLandMoney*> LLPanelGroupLandMoney::sGroupIDs;
LLPanelGroupLandMoney::LLPanelGroupLandMoney() :
LLPanelGroupTab()
@@ -547,13 +547,13 @@ LLPanelGroupLandMoney::LLPanelGroupLandMoney() :
//will then only be working for the last panel for a given group id :(
//FIXME - add to setGroupID()
- //LLPanelGroupLandMoney::sGroupIDs.addData(group_id, this);
+ //LLPanelGroupLandMoney::sGroupIDs.insert(group_id, this);
}
LLPanelGroupLandMoney::~LLPanelGroupLandMoney()
{
delete mImplementationp;
- LLPanelGroupLandMoney::sGroupIDs.removeData(mGroupID);
+ LLPanelGroupLandMoney::sGroupIDs.erase(mGroupID);
}
void LLPanelGroupLandMoney::activate()
@@ -821,15 +821,15 @@ void LLPanelGroupLandMoney::processPlacesReply(LLMessageSystem* msg, void**)
LLUUID group_id;
msg->getUUID("AgentData", "QueryID", group_id);
- LLPanelGroupLandMoney* selfp = sGroupIDs.getIfThere(group_id);
- if(!selfp)
+ group_id_map_t::iterator found_it = sGroupIDs.find(group_id);
+ if(found_it == sGroupIDs.end())
{
- llinfos << "Group Panel Land L$ " << group_id << " no longer in existence."
- << llendl;
+ LL_INFOS() << "Group Panel Land L$ " << group_id << " no longer in existence."
+ << LL_ENDL;
return;
}
- selfp->mImplementationp->processGroupLand(msg);
+ found_it->second->mImplementationp->processGroupLand(msg);
}
@@ -885,7 +885,7 @@ void LLGroupMoneyTabEventHandlerImpl::updateButtons()
//** LLGroupMoneyTabEventHandler Functions **
//*******************************************
-LLMap<LLUUID, LLGroupMoneyTabEventHandler*> LLGroupMoneyTabEventHandler::sInstanceIDs;
+std::map<LLUUID, LLGroupMoneyTabEventHandler*> LLGroupMoneyTabEventHandler::sInstanceIDs;
std::map<LLPanel*, LLGroupMoneyTabEventHandler*> LLGroupMoneyTabEventHandler::sTabsToHandlers;
LLGroupMoneyTabEventHandler::LLGroupMoneyTabEventHandler(LLButton* earlier_buttonp,
@@ -922,13 +922,13 @@ LLGroupMoneyTabEventHandler::LLGroupMoneyTabEventHandler(LLButton* earlier_butto
tab_containerp->setCommitCallback(boost::bind(&LLGroupMoneyTabEventHandler::onClickTab, this));
}
- sInstanceIDs.addData(mImplementationp->mPanelID, this);
+ sInstanceIDs.insert(std::make_pair(mImplementationp->mPanelID, this));
sTabsToHandlers[panelp] = this;
}
LLGroupMoneyTabEventHandler::~LLGroupMoneyTabEventHandler()
{
- sInstanceIDs.removeData(mImplementationp->mPanelID);
+ sInstanceIDs.erase(mImplementationp->mPanelID);
sTabsToHandlers.erase(mImplementationp->mTabPanelp);
delete mImplementationp;
@@ -1045,7 +1045,7 @@ void LLGroupMoneyDetailsTabEventHandler::processReply(LLMessageSystem* msg,
msg->getUUIDFast(_PREHASH_AgentData, _PREHASH_GroupID, group_id );
if (mImplementationp->getGroupID() != group_id)
{
- llwarns << "Group Account details not for this group!" << llendl;
+ LL_WARNS() << "Group Account details not for this group!" << LL_ENDL;
return;
}
@@ -1068,8 +1068,8 @@ void LLGroupMoneyDetailsTabEventHandler::processReply(LLMessageSystem* msg,
if ( interval_days != mImplementationp->mIntervalLength ||
current_interval != mImplementationp->mCurrentInterval )
{
- llinfos << "Out of date details packet " << interval_days << " "
- << current_interval << llendl;
+ LL_INFOS() << "Out of date details packet " << interval_days << " "
+ << current_interval << LL_ENDL;
return;
}
@@ -1116,16 +1116,16 @@ void LLPanelGroupLandMoney::processGroupAccountDetailsReply(LLMessageSystem* msg
msg->getUUIDFast(_PREHASH_AgentData, _PREHASH_AgentID, agent_id );
if (gAgent.getID() != agent_id)
{
- llwarns << "Got group L$ history reply for another agent!" << llendl;
+ LL_WARNS() << "Got group L$ history reply for another agent!" << LL_ENDL;
return;
}
LLUUID request_id;
msg->getUUIDFast(_PREHASH_MoneyData, _PREHASH_RequestID, request_id );
- LLGroupMoneyTabEventHandler* selfp = LLGroupMoneyTabEventHandler::sInstanceIDs.getIfThere(request_id);
+ LLGroupMoneyTabEventHandler* selfp = get_ptr_in_map(LLGroupMoneyTabEventHandler::sInstanceIDs, request_id);
if (!selfp)
{
- llwarns << "GroupAccountDetails recieved for non-existent group panel." << llendl;
+ LL_WARNS() << "GroupAccountDetails received for non-existent group panel." << LL_ENDL;
return;
}
@@ -1186,7 +1186,7 @@ void LLGroupMoneySalesTabEventHandler::processReply(LLMessageSystem* msg,
msg->getUUIDFast(_PREHASH_AgentData, _PREHASH_GroupID, group_id );
if (mImplementationp->getGroupID() != group_id)
{
- llwarns << "Group Account Transactions not for this group!" << llendl;
+ LL_WARNS() << "Group Account Transactions not for this group!" << LL_ENDL;
return;
}
@@ -1203,8 +1203,8 @@ void LLGroupMoneySalesTabEventHandler::processReply(LLMessageSystem* msg,
if (interval_days != mImplementationp->mIntervalLength ||
current_interval != mImplementationp->mCurrentInterval)
{
- llinfos << "Out of date details packet " << interval_days << " "
- << current_interval << llendl;
+ LL_INFOS() << "Out of date details packet " << interval_days << " "
+ << current_interval << LL_ENDL;
return;
}
@@ -1293,7 +1293,7 @@ void LLPanelGroupLandMoney::processGroupAccountTransactionsReply(LLMessageSystem
msg->getUUIDFast(_PREHASH_AgentData, _PREHASH_AgentID, agent_id );
if (gAgent.getID() != agent_id)
{
- llwarns << "Got group L$ history reply for another agent!" << llendl;
+ LL_WARNS() << "Got group L$ history reply for another agent!" << LL_ENDL;
return;
}
@@ -1302,10 +1302,10 @@ void LLPanelGroupLandMoney::processGroupAccountTransactionsReply(LLMessageSystem
LLGroupMoneyTabEventHandler* self;
- self = LLGroupMoneyTabEventHandler::sInstanceIDs.getIfThere(request_id);
+ self = get_ptr_in_map(LLGroupMoneyTabEventHandler::sInstanceIDs, request_id);
if (!self)
{
- llwarns << "GroupAccountTransactions recieved for non-existent group panel." << llendl;
+ LL_WARNS() << "GroupAccountTransactions recieved for non-existent group panel." << LL_ENDL;
return;
}
@@ -1364,7 +1364,7 @@ void LLGroupMoneyPlanningTabEventHandler::processReply(LLMessageSystem* msg,
msg->getUUIDFast(_PREHASH_AgentData, _PREHASH_GroupID, group_id );
if (mImplementationp->getGroupID() != group_id)
{
- llwarns << "Group Account Summary received not for this group!" << llendl;
+ LL_WARNS() << "Group Account Summary received not for this group!" << LL_ENDL;
return;
}
@@ -1415,8 +1415,8 @@ void LLGroupMoneyPlanningTabEventHandler::processReply(LLMessageSystem* msg,
if (interval_days != mImplementationp->mIntervalLength ||
current_interval != mImplementationp->mCurrentInterval)
{
- llinfos << "Out of date summary packet " << interval_days << " "
- << current_interval << llendl;
+ LL_INFOS() << "Out of date summary packet " << interval_days << " "
+ << current_interval << LL_ENDL;
return;
}
@@ -1473,7 +1473,7 @@ void LLPanelGroupLandMoney::processGroupAccountSummaryReply(LLMessageSystem* msg
msg->getUUIDFast(_PREHASH_AgentData, _PREHASH_AgentID, agent_id );
if (gAgent.getID() != agent_id)
{
- llwarns << "Got group L$ history reply for another agent!" << llendl;
+ LL_WARNS() << "Got group L$ history reply for another agent!" << LL_ENDL;
return;
}
@@ -1482,10 +1482,10 @@ void LLPanelGroupLandMoney::processGroupAccountSummaryReply(LLMessageSystem* msg
LLGroupMoneyTabEventHandler* self;
- self = LLGroupMoneyTabEventHandler::sInstanceIDs.getIfThere(request_id);
+ self = get_ptr_in_map(LLGroupMoneyTabEventHandler::sInstanceIDs, request_id);
if (!self)
{
- llwarns << "GroupAccountSummary recieved for non-existent group L$ planning tab." << llendl;
+ LL_WARNS() << "GroupAccountSummary recieved for non-existent group L$ planning tab." << LL_ENDL;
return;
}
@@ -1494,9 +1494,9 @@ void LLPanelGroupLandMoney::processGroupAccountSummaryReply(LLMessageSystem* msg
void LLPanelGroupLandMoney::setGroupID(const LLUUID& id)
{
- LLPanelGroupLandMoney::sGroupIDs.removeData(mGroupID);
+ LLPanelGroupLandMoney::sGroupIDs.erase(mGroupID);
LLPanelGroupTab::setGroupID(id);
- LLPanelGroupLandMoney::sGroupIDs.addData(mGroupID, this);
+ LLPanelGroupLandMoney::sGroupIDs.insert(std::make_pair(mGroupID, this));
bool can_view = gAgent.isInGroup(mGroupID);
diff --git a/indra/newview/llpanelgrouplandmoney.h b/indra/newview/llpanelgrouplandmoney.h
index ac3518ee19..3cec6065e7 100755
--- a/indra/newview/llpanelgrouplandmoney.h
+++ b/indra/newview/llpanelgrouplandmoney.h
@@ -28,7 +28,7 @@
#define LL_PANEL_GROUP_LAND_MONEY_H
#include "llpanelgroup.h"
-#include "llmap.h"
+#include <map>
#include "lluuid.h"
class LLPanelGroupLandMoney : public LLPanelGroupTab
@@ -47,7 +47,8 @@ public:
static void processPlacesReply(LLMessageSystem* msg, void**);
- static LLMap<LLUUID, LLPanelGroupLandMoney*> sGroupIDs;
+ typedef std::map<LLUUID, LLPanelGroupLandMoney*> group_id_map_t;
+ static group_id_map_t sGroupIDs;
static void processGroupAccountDetailsReply(LLMessageSystem* msg, void** data);
static void processGroupAccountTransactionsReply(LLMessageSystem* msg, void** data);
diff --git a/indra/newview/llpanelgroupnotices.cpp b/indra/newview/llpanelgroupnotices.cpp
index 0dfb8fef53..54728885c1 100755
--- a/indra/newview/llpanelgroupnotices.cpp
+++ b/indra/newview/llpanelgroupnotices.cpp
@@ -117,7 +117,7 @@ LLGroupDropTarget::LLGroupDropTarget(const LLGroupDropTarget::Params& p)
void LLGroupDropTarget::doDrop(EDragAndDropType cargo_type, void* cargo_data)
{
- llinfos << "LLGroupDropTarget::doDrop()" << llendl;
+ LL_INFOS() << "LLGroupDropTarget::doDrop()" << LL_ENDL;
}
BOOL LLGroupDropTarget::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop,
@@ -439,7 +439,7 @@ void LLPanelGroupNotices::refreshNotices()
{
onClickRefreshNotices(this);
/*
- lldebugs << "LLPanelGroupNotices::onClickGetPastNotices" << llendl;
+ LL_DEBUGS() << "LLPanelGroupNotices::onClickGetPastNotices" << LL_ENDL;
mNoticesList->deleteAllItems();
@@ -457,7 +457,7 @@ void LLPanelGroupNotices::refreshNotices()
void LLPanelGroupNotices::onClickRefreshNotices(void* data)
{
- lldebugs << "LLPanelGroupNotices::onClickGetPastNotices" << llendl;
+ LL_DEBUGS() << "LLPanelGroupNotices::onClickGetPastNotices" << LL_ENDL;
LLPanelGroupNotices* self = (LLPanelGroupNotices*)data;
self->mNoticesList->deleteAllItems();
@@ -484,16 +484,16 @@ void LLPanelGroupNotices::processGroupNoticesListReply(LLMessageSystem* msg, voi
std::map<LLUUID,LLPanelGroupNotices*>::iterator it = sInstances.find(group_id);
if (it == sInstances.end())
{
- llinfos << "Group Panel Notices " << group_id << " no longer in existence."
- << llendl;
+ LL_INFOS() << "Group Panel Notices " << group_id << " no longer in existence."
+ << LL_ENDL;
return;
}
LLPanelGroupNotices* selfp = it->second;
if(!selfp)
{
- llinfos << "Group Panel Notices " << group_id << " no longer in existence."
- << llendl;
+ LL_INFOS() << "Group Panel Notices " << group_id << " no longer in existence."
+ << LL_ENDL;
return;
}
@@ -595,7 +595,7 @@ void LLPanelGroupNotices::onSelectNotice(LLUICtrl* ctrl, void* data)
msg->addUUID("GroupNoticeID",item->getUUID());
gAgent.sendReliableMessage();
- lldebugs << "Item " << item->getUUID() << " selected." << llendl;
+ LL_DEBUGS() << "Item " << item->getUUID() << " selected." << LL_ENDL;
}
void LLPanelGroupNotices::showNotice(const std::string& subject,
diff --git a/indra/newview/llpanelgrouproles.cpp b/indra/newview/llpanelgrouproles.cpp
index c30c932c41..61fa4ea959 100755
--- a/indra/newview/llpanelgrouproles.cpp
+++ b/indra/newview/llpanelgrouproles.cpp
@@ -72,8 +72,8 @@ bool agentCanAddToRole(const LLUUID& group_id,
LLGroupMgrGroupData* gdatap = LLGroupMgr::getInstance()->getGroupData(group_id);
if (!gdatap)
{
- llwarns << "agentCanAddToRole "
- << "-- No group data!" << llendl;
+ LL_WARNS() << "agentCanAddToRole "
+ << "-- No group data!" << LL_ENDL;
return false;
}
@@ -126,7 +126,7 @@ LLPanelGroupRoles::~LLPanelGroupRoles()
BOOL LLPanelGroupRoles::postBuild()
{
- lldebugs << "LLPanelGroupRoles::postBuild()" << llendl;
+ LL_DEBUGS() << "LLPanelGroupRoles::postBuild()" << LL_ENDL;
mSubTabContainer = getChild<LLTabContainer>("roles_tab_container");
@@ -139,7 +139,7 @@ BOOL LLPanelGroupRoles::postBuild()
LLPanelGroupSubTab* subtabp = dynamic_cast<LLPanelGroupSubTab*>(panel);
if (!subtabp)
{
- llwarns << "Invalid subtab panel: " << panel->getName() << llendl;
+ LL_WARNS() << "Invalid subtab panel: " << panel->getName() << LL_ENDL;
return FALSE;
}
@@ -342,7 +342,7 @@ void LLPanelGroupRoles::update(LLGroupChange gc)
}
else
{
- llwarns << "LLPanelGroupRoles::update() -- No subtab to update!" << llendl;
+ LL_WARNS() << "LLPanelGroupRoles::update() -- No subtab to update!" << LL_ENDL;
}
}
@@ -538,7 +538,7 @@ void LLPanelGroupSubTab::buildActionsList(LLScrollListCtrl* ctrl,
{
if (LLGroupMgr::getInstance()->mRoleActionSets.empty())
{
- llwarns << "Can't build action list - no actions found." << llendl;
+ LL_WARNS() << "Can't build action list - no actions found." << LL_ENDL;
return;
}
@@ -567,7 +567,7 @@ void LLPanelGroupSubTab::buildActionCategory(LLScrollListCtrl* ctrl,
BOOL filter,
BOOL is_owner_role)
{
- lldebugs << "Building role list for: " << action_set->mActionSetData->mName << llendl;
+ LL_DEBUGS() << "Building role list for: " << action_set->mActionSetData->mName << LL_ENDL;
// See if the allow mask matches anything in this category.
if (show_all || (allowed_by_some & action_set->mActionSetData->mPowerBit))
{
@@ -860,7 +860,7 @@ void LLPanelGroupMembersSubTab::onMemberSelect(LLUICtrl* ctrl, void* user_data)
void LLPanelGroupMembersSubTab::handleMemberSelect()
{
- lldebugs << "LLPanelGroupMembersSubTab::handleMemberSelect" << llendl;
+ LL_DEBUGS() << "LLPanelGroupMembersSubTab::handleMemberSelect" << LL_ENDL;
mAssignedRolesList->deleteAllItems();
mAllowedActionsList->deleteAllItems();
@@ -868,8 +868,8 @@ void LLPanelGroupMembersSubTab::handleMemberSelect()
LLGroupMgrGroupData* gdatap = LLGroupMgr::getInstance()->getGroupData(mGroupID);
if (!gdatap)
{
- llwarns << "LLPanelGroupMembersSubTab::handleMemberSelect() "
- << "-- No group data!" << llendl;
+ LL_WARNS() << "LLPanelGroupMembersSubTab::handleMemberSelect() "
+ << "-- No group data!" << LL_ENDL;
return;
}
@@ -1041,7 +1041,7 @@ void LLPanelGroupMembersSubTab::handleMemberSelect()
else
{
// This could happen if changes are not synced right on sub-panel change.
- llwarns << "No group role data for " << iter->second << llendl;
+ LL_WARNS() << "No group role data for " << iter->second << LL_ENDL;
}
}
mAssignedRolesList->setEnabled(TRUE);
@@ -1335,7 +1335,7 @@ bool LLPanelGroupMembersSubTab::apply(std::string& mesg)
LLGroupMgrGroupData* gdatap = LLGroupMgr::getInstance()->getGroupData(mGroupID);
if (!gdatap)
{
- llwarns << "Unable to get group data for group " << mGroupID << llendl;
+ LL_WARNS() << "Unable to get group data for group " << mGroupID << LL_ENDL;
mesg.assign("Unable to save member data. Try again later.");
return false;
@@ -1361,7 +1361,7 @@ bool LLPanelGroupMembersSubTab::apply(std::string& mesg)
}
else
{
- llwarns << "Unable to get role information for the owner role in group " << mGroupID << llendl;
+ LL_WARNS() << "Unable to get role information for the owner role in group " << mGroupID << LL_ENDL;
mesg.assign("Unable to retried specific group information. Try again later");
return false;
@@ -1397,7 +1397,7 @@ void LLPanelGroupMembersSubTab::applyMemberChanges()
LLGroupMgrGroupData* gdatap = LLGroupMgr::getInstance()->getGroupData(mGroupID);
if (!gdatap)
{
- llwarns << "Unable to get group data for group " << mGroupID << llendl;
+ LL_WARNS() << "Unable to get group data for group " << mGroupID << LL_ENDL;
return;
}
@@ -1461,21 +1461,21 @@ U64 LLPanelGroupMembersSubTab::getAgentPowersBasedOnRoleChanges(const LLUUID& ag
LLGroupMgrGroupData* gdatap = LLGroupMgr::getInstance()->getGroupData(mGroupID);
if (!gdatap)
{
- llwarns << "LLPanelGroupMembersSubTab::getAgentPowersBasedOnRoleChanges() -- No group data!" << llendl;
+ LL_WARNS() << "LLPanelGroupMembersSubTab::getAgentPowersBasedOnRoleChanges() -- No group data!" << LL_ENDL;
return GP_NO_POWERS;
}
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;
+ LL_WARNS() << "LLPanelGroupMembersSubTab::getAgentPowersBasedOnRoleChanges() -- No member data for member with UUID " << agent_id << LL_ENDL;
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;
+ LL_WARNS() << "LLPanelGroupMembersSubTab::getAgentPowersBasedOnRoleChanges() -- Null member data for member with UUID " << agent_id << LL_ENDL;
return GP_NO_POWERS;
}
@@ -1581,7 +1581,7 @@ void LLPanelGroupMembersSubTab::update(LLGroupChange gc)
LLGroupMgrGroupData* gdatap = LLGroupMgr::getInstance()->getGroupData(mGroupID);
if (!gdatap)
{
- llwarns << "LLPanelGroupMembersSubTab::update() -- No group data!" << llendl;
+ LL_WARNS() << "LLPanelGroupMembersSubTab::update() -- No group data!" << LL_ENDL;
return;
}
@@ -1677,7 +1677,7 @@ void LLPanelGroupMembersSubTab::updateMembers()
LLGroupMgrGroupData* gdatap = LLGroupMgr::getInstance()->getGroupData(mGroupID);
if (!gdatap)
{
- llwarns << "LLPanelGroupMembersSubTab::updateMembers() -- No group data!" << llendl;
+ LL_WARNS() << "LLPanelGroupMembersSubTab::updateMembers() -- No group data!" << LL_ENDL;
return;
}
@@ -1803,7 +1803,7 @@ BOOL LLPanelGroupRolesSubTab::postBuildSubTab(LLView* root)
if (!mRolesList || !mAssignedMembersList || !mAllowedActionsList
|| !mRoleName || !mRoleTitle || !mRoleDescription || !mMemberVisibleCheck)
{
- llwarns << "ARG! element not found." << llendl;
+ LL_WARNS() << "ARG! element not found." << LL_ENDL;
return FALSE;
}
@@ -1867,14 +1867,14 @@ void LLPanelGroupRolesSubTab::activate()
void LLPanelGroupRolesSubTab::deactivate()
{
- lldebugs << "LLPanelGroupRolesSubTab::deactivate()" << llendl;
+ LL_DEBUGS() << "LLPanelGroupRolesSubTab::deactivate()" << LL_ENDL;
LLPanelGroupSubTab::deactivate();
}
bool LLPanelGroupRolesSubTab::needsApply(std::string& mesg)
{
- lldebugs << "LLPanelGroupRolesSubTab::needsApply()" << llendl;
+ LL_DEBUGS() << "LLPanelGroupRolesSubTab::needsApply()" << LL_ENDL;
LLGroupMgrGroupData* gdatap = LLGroupMgr::getInstance()->getGroupData(mGroupID);
@@ -1884,7 +1884,7 @@ bool LLPanelGroupRolesSubTab::needsApply(std::string& mesg)
bool LLPanelGroupRolesSubTab::apply(std::string& mesg)
{
- lldebugs << "LLPanelGroupRolesSubTab::apply()" << llendl;
+ LL_DEBUGS() << "LLPanelGroupRolesSubTab::apply()" << LL_ENDL;
saveRoleChanges(true);
@@ -1947,7 +1947,7 @@ bool LLPanelGroupRolesSubTab::matchesSearchFilter(std::string rolename, std::str
void LLPanelGroupRolesSubTab::update(LLGroupChange gc)
{
- lldebugs << "LLPanelGroupRolesSubTab::update()" << llendl;
+ LL_DEBUGS() << "LLPanelGroupRolesSubTab::update()" << LL_ENDL;
if (mGroupID.isNull()) return;
@@ -1992,7 +1992,7 @@ void LLPanelGroupRolesSubTab::update(LLGroupChange gc)
}
else
{
- llwarns << "LLPanelGroupRolesSubTab::update() No role data for role " << (*rit).first << llendl;
+ LL_WARNS() << "LLPanelGroupRolesSubTab::update() No role data for role " << (*rit).first << LL_ENDL;
}
}
@@ -2053,7 +2053,7 @@ void LLPanelGroupRolesSubTab::onRoleSelect(LLUICtrl* ctrl, void* user_data)
void LLPanelGroupRolesSubTab::handleRoleSelect()
{
BOOL can_delete = TRUE;
- lldebugs << "LLPanelGroupRolesSubTab::handleRoleSelect()" << llendl;
+ LL_DEBUGS() << "LLPanelGroupRolesSubTab::handleRoleSelect()" << LL_ENDL;
mAssignedMembersList->deleteAllItems();
mAllowedActionsList->deleteAllItems();
@@ -2061,8 +2061,8 @@ void LLPanelGroupRolesSubTab::handleRoleSelect()
LLGroupMgrGroupData* gdatap = LLGroupMgr::getInstance()->getGroupData(mGroupID);
if (!gdatap)
{
- llwarns << "LLPanelGroupRolesSubTab::handleRoleSelect() "
- << "-- No group data!" << llendl;
+ LL_WARNS() << "LLPanelGroupRolesSubTab::handleRoleSelect() "
+ << "-- No group data!" << LL_ENDL;
return;
}
@@ -2150,8 +2150,8 @@ void LLPanelGroupRolesSubTab::buildMembersList()
LLGroupMgrGroupData* gdatap = LLGroupMgr::getInstance()->getGroupData(mGroupID);
if (!gdatap)
{
- llwarns << "LLPanelGroupRolesSubTab::handleRoleSelect() "
- << "-- No group data!" << llendl;
+ LL_WARNS() << "LLPanelGroupRolesSubTab::handleRoleSelect() "
+ << "-- No group data!" << LL_ENDL;
return;
}
@@ -2200,13 +2200,13 @@ void LLPanelGroupRolesSubTab::handleActionCheck(LLUICtrl* ctrl, bool force)
if (!check)
return;
- lldebugs << "LLPanelGroupRolesSubTab::handleActionSelect()" << llendl;
+ LL_DEBUGS() << "LLPanelGroupRolesSubTab::handleActionSelect()" << LL_ENDL;
LLGroupMgrGroupData* gdatap = LLGroupMgr::getInstance()->getGroupData(mGroupID);
if (!gdatap)
{
- llwarns << "LLPanelGroupRolesSubTab::handleRoleSelect() "
- << "-- No group data!" << llendl;
+ LL_WARNS() << "LLPanelGroupRolesSubTab::handleRoleSelect() "
+ << "-- No group data!" << LL_ENDL;
return;
}
@@ -2252,8 +2252,8 @@ void LLPanelGroupRolesSubTab::handleActionCheck(LLUICtrl* ctrl, bool force)
}
else
{
- llwarns << "Unable to look up role information for role id: "
- << role_id << llendl;
+ LL_WARNS() << "Unable to look up role information for role id: "
+ << role_id << LL_ENDL;
}
}
else
@@ -2326,13 +2326,13 @@ void LLPanelGroupRolesSubTab::onMemberVisibilityChange(LLUICtrl* ctrl, void* use
void LLPanelGroupRolesSubTab::handleMemberVisibilityChange(bool value)
{
- lldebugs << "LLPanelGroupRolesSubTab::handleMemberVisibilityChange()" << llendl;
+ LL_DEBUGS() << "LLPanelGroupRolesSubTab::handleMemberVisibilityChange()" << LL_ENDL;
LLGroupMgrGroupData* gdatap = LLGroupMgr::getInstance()->getGroupData(mGroupID);
if (!gdatap)
{
- llwarns << "LLPanelGroupRolesSubTab::handleRoleSelect() "
- << "-- No group data!" << llendl;
+ LL_WARNS() << "LLPanelGroupRolesSubTab::handleRoleSelect() "
+ << "-- No group data!" << LL_ENDL;
return;
}
@@ -2519,27 +2519,27 @@ void LLPanelGroupActionsSubTab::activate()
void LLPanelGroupActionsSubTab::deactivate()
{
- lldebugs << "LLPanelGroupActionsSubTab::deactivate()" << llendl;
+ LL_DEBUGS() << "LLPanelGroupActionsSubTab::deactivate()" << LL_ENDL;
LLPanelGroupSubTab::deactivate();
}
bool LLPanelGroupActionsSubTab::needsApply(std::string& mesg)
{
- lldebugs << "LLPanelGroupActionsSubTab::needsApply()" << llendl;
+ LL_DEBUGS() << "LLPanelGroupActionsSubTab::needsApply()" << LL_ENDL;
return false;
}
bool LLPanelGroupActionsSubTab::apply(std::string& mesg)
{
- lldebugs << "LLPanelGroupActionsSubTab::apply()" << llendl;
+ LL_DEBUGS() << "LLPanelGroupActionsSubTab::apply()" << LL_ENDL;
return true;
}
void LLPanelGroupActionsSubTab::update(LLGroupChange gc)
{
- lldebugs << "LLPanelGroupActionsSubTab::update()" << llendl;
+ LL_DEBUGS() << "LLPanelGroupActionsSubTab::update()" << LL_ENDL;
if (mGroupID.isNull()) return;
diff --git a/indra/newview/llpanelland.cpp b/indra/newview/llpanelland.cpp
index 5321ebc777..9b21fbf6b7 100755
--- a/indra/newview/llpanelland.cpp
+++ b/indra/newview/llpanelland.cpp
@@ -187,7 +187,7 @@ void LLPanelLandInfo::refresh()
}
else
{
- lldebugs << "Invalid selection for joining land" << llendl;
+ LL_DEBUGS() << "Invalid selection for joining land" << LL_ENDL;
getChildView("button join land")->setEnabled(FALSE);
}
diff --git a/indra/newview/llpanellandmarkinfo.cpp b/indra/newview/llpanellandmarkinfo.cpp
index 934f8ed8c7..63ddc05037 100755
--- a/indra/newview/llpanellandmarkinfo.cpp
+++ b/indra/newview/llpanellandmarkinfo.cpp
@@ -435,7 +435,7 @@ void LLPanelLandmarkInfo::populateFoldersList()
const LLViewerInventoryCategory* lmcat = gInventory.getCategory(landmarks_id);
if (!lmcat)
{
- llwarns << "Cannot find the landmarks folder" << llendl;
+ LL_WARNS() << "Cannot find the landmarks folder" << LL_ENDL;
}
else
{
@@ -446,9 +446,9 @@ void LLPanelLandmarkInfo::populateFoldersList()
typedef std::vector<folder_pair_t> folder_vec_t;
folder_vec_t folders;
// Sort the folders by their full name.
- for (S32 i = 0; i < cats.count(); i++)
+ for (S32 i = 0; i < cats.size(); i++)
{
- const LLViewerInventoryCategory* cat = cats.get(i);
+ const LLViewerInventoryCategory* cat = cats.at(i);
std::string cat_full_name = getFullFolderName(cat);
folders.push_back(folder_pair_t(cat->getUUID(), cat_full_name));
}
@@ -483,10 +483,10 @@ static void collectLandmarkFolders(LLInventoryModel::cat_array_t& cats)
LLViewerInventoryCategory* favorites_cat = gInventory.getCategory(favorites_id);
if (!favorites_cat)
{
- llwarns << "Cannot find the favorites folder" << llendl;
+ LL_WARNS() << "Cannot find the favorites folder" << LL_ENDL;
}
else
{
- cats.put(favorites_cat);
+ cats.push_back(favorites_cat);
}
}
diff --git a/indra/newview/llpanellandmarks.cpp b/indra/newview/llpanellandmarks.cpp
index 88400e4ef2..b941ee1f1b 100755
--- a/indra/newview/llpanellandmarks.cpp
+++ b/indra/newview/llpanellandmarks.cpp
@@ -264,7 +264,7 @@ void LLLandmarksPanel::onShowOnMap()
{
if (NULL == mCurrentSelectedList)
{
- llwarns << "There are no selected list. No actions are performed." << llendl;
+ LL_WARNS() << "There are no selected list. No actions are performed." << LL_ENDL;
return;
}
@@ -421,7 +421,7 @@ bool LLLandmarksPanel::isReceivedFolderSelected() const
// *TODO: it should be filled with logic when EXT-976 is done.
- llwarns << "Not implemented yet until EXT-976 is done." << llendl;
+ LL_WARNS() << "Not implemented yet until EXT-976 is done." << LL_ENDL;
return false;
}
@@ -529,7 +529,7 @@ void LLLandmarksPanel::setParcelID(const LLUUID& parcel_id)
// virtual
void LLLandmarksPanel::setErrorStatus(U32 status, const std::string& reason)
{
- llwarns << "Can't handle remote parcel request."<< " Http Status: "<< status << ". Reason : "<< reason<<llendl;
+ LL_WARNS() << "Can't handle remote parcel request."<< " Http Status: "<< status << ". Reason : "<< reason<<LL_ENDL;
}
@@ -1042,7 +1042,7 @@ bool LLLandmarksPanel::isActionEnabled(const LLSD& userdata) const
}
else
{
- llwarns << "Unprocessed command has come: " << command_name << llendl;
+ LL_WARNS() << "Unprocessed command has come: " << command_name << LL_ENDL;
}
return true;
@@ -1201,7 +1201,7 @@ bool LLLandmarksPanel::canItemBeModified(const std::string& command_name, LLFold
}
else
{
- llwarns << "Unprocessed command has come: " << command_name << llendl;
+ LL_WARNS() << "Unprocessed command has come: " << command_name << LL_ENDL;
}
}
@@ -1359,9 +1359,9 @@ void LLLandmarksPanel::doCreatePick(LLLandmark* landmark)
}
else
{
- llwarns << "Can't create pick for landmark for region" << region_id
+ LL_WARNS() << "Can't create pick for landmark for region" << region_id
<< ". Region: " << region->getName()
- << " does not support RemoteParcelRequest" << llendl;
+ << " does not support RemoteParcelRequest" << LL_ENDL;
}
}
diff --git a/indra/newview/llpanellogin.cpp b/indra/newview/llpanellogin.cpp
index 911ecaad9d..e2b4d098e9 100755
--- a/indra/newview/llpanellogin.cpp
+++ b/indra/newview/llpanellogin.cpp
@@ -33,7 +33,6 @@
#include "llfloaterreg.h"
#include "llfontgl.h"
#include "llmd5.h"
-#include "llsecondlifeurls.h"
#include "v4color.h"
#include "llappviewer.h"
@@ -112,16 +111,6 @@ LLPanelLogin::LLPanelLogin(const LLRect &rect,
setBackgroundVisible(FALSE);
setBackgroundOpaque(TRUE);
- // instance management
- if (LLPanelLogin::sInstance)
- {
- LL_WARNS("AppInit") << "Duplicate instance of login view deleted" << LL_ENDL;
- // Don't leave bad pointer in gFocusMgr
- gFocusMgr.setDefaultKeyboardFocus(NULL);
-
- delete LLPanelLogin::sInstance;
- }
-
mPasswordModified = FALSE;
LLPanelLogin::sInstance = this;
@@ -277,12 +266,12 @@ void LLPanelLogin::addFavoritesToStartLocation()
S32 res = LLStringUtil::compareInsensitive(user_defined_name, iter->first);
if (res != 0)
{
- lldebugs << "Skipping favorites for " << iter->first << llendl;
+ LL_DEBUGS() << "Skipping favorites for " << iter->first << LL_ENDL;
continue;
}
combo->addSeparator();
- lldebugs << "Loading favorites for " << iter->first << llendl;
+ LL_DEBUGS() << "Loading favorites for " << iter->first << LL_ENDL;
LLSD user_llsd = iter->second;
for (LLSD::array_const_iterator iter1 = user_llsd.beginArray();
iter1 != user_llsd.endArray(); ++iter1)
@@ -443,6 +432,16 @@ void LLPanelLogin::show(const LLRect &rect,
void (*callback)(S32 option, void* user_data),
void* callback_data)
{
+ // instance management
+ if (LLPanelLogin::sInstance)
+ {
+ LL_WARNS("AppInit") << "Duplicate instance of login view deleted" << LL_ENDL;
+ // Don't leave bad pointer in gFocusMgr
+ gFocusMgr.setDefaultKeyboardFocus(NULL);
+
+ delete LLPanelLogin::sInstance;
+ }
+
new LLPanelLogin(rect, callback, callback_data);
if( !gFocusMgr.getKeyboardFocus() )
@@ -461,7 +460,7 @@ void LLPanelLogin::setFields(LLPointer<LLCredential> credential,
{
if (!sInstance)
{
- llwarns << "Attempted fillFields with no login view shown" << llendl;
+ LL_WARNS() << "Attempted fillFields with no login view shown" << LL_ENDL;
return;
}
LL_INFOS("Credentials") << "Setting login fields to " << *credential << LL_ENDL;
@@ -519,7 +518,7 @@ void LLPanelLogin::getFields(LLPointer<LLCredential>& credential,
{
if (!sInstance)
{
- llwarns << "Attempted getFields with no login view shown" << llendl;
+ LL_WARNS() << "Attempted getFields with no login view shown" << LL_ENDL;
return;
}
@@ -540,13 +539,13 @@ void LLPanelLogin::getFields(LLPointer<LLCredential>& credential,
LLStringUtil::trim(username);
std::string password = sInstance->getChild<LLUICtrl>("password_edit")->getValue().asString();
- LL_INFOS2("Credentials", "Authentication") << "retrieving username:" << username << LL_ENDL;
+ LL_INFOS("Credentials", "Authentication") << "retrieving username:" << username << LL_ENDL;
// determine if the username is a first/last form or not.
size_t separator_index = username.find_first_of(' ');
if (separator_index == username.npos
&& !LLGridManager::getInstance()->isSystemGrid())
{
- LL_INFOS2("Credentials", "Authentication") << "account: " << username << LL_ENDL;
+ LL_INFOS("Credentials", "Authentication") << "account: " << username << LL_ENDL;
// single username, so this is a 'clear' identifier
identifier["type"] = CRED_IDENTIFIER_TYPE_ACCOUNT;
identifier["account_name"] = username;
@@ -581,7 +580,7 @@ void LLPanelLogin::getFields(LLPointer<LLCredential>& credential,
if (last.find_first_of(' ') == last.npos)
{
- LL_INFOS2("Credentials", "Authentication") << "agent: " << username << LL_ENDL;
+ LL_INFOS("Credentials", "Authentication") << "agent: " << username << LL_ENDL;
// traditional firstname / lastname
identifier["type"] = CRED_IDENTIFIER_TYPE_AGENT;
identifier["first_name"] = first;
@@ -609,7 +608,7 @@ BOOL LLPanelLogin::areCredentialFieldsDirty()
{
if (!sInstance)
{
- llwarns << "Attempted getServer with no login view shown" << llendl;
+ LL_WARNS() << "Attempted getServer with no login view shown" << LL_ENDL;
}
else
{
diff --git a/indra/newview/llpanelmaininventory.cpp b/indra/newview/llpanelmaininventory.cpp
index 68c22c12fd..b02298090a 100755
--- a/indra/newview/llpanelmaininventory.cpp
+++ b/indra/newview/llpanelmaininventory.cpp
@@ -158,7 +158,7 @@ BOOL LLPanelMainInventory::postBuild()
// Now load the stored settings from disk, if available.
std::ostringstream filterSaveName;
filterSaveName << gDirUtilp->getExpandedFilename(LL_PATH_PER_SL_ACCOUNT, FILTERS_FILENAME);
- llinfos << "LLPanelMainInventory::init: reading from " << filterSaveName.str() << llendl;
+ LL_INFOS() << "LLPanelMainInventory::init: reading from " << filterSaveName.str() << LL_ENDL;
llifstream file(filterSaveName.str());
LLSD savedFilterState;
if (file.is_open())
@@ -244,7 +244,7 @@ LLPanelMainInventory::~LLPanelMainInventory( void )
llofstream filtersFile(filterSaveName.str());
if(!LLSDSerialize::toPrettyXML(filterRoot, filtersFile))
{
- llwarns << "Could not write to filters save file " << filterSaveName << llendl;
+ LL_WARNS() << "Could not write to filters save file " << filterSaveName << LL_ENDL;
}
else
filtersFile.close();
@@ -609,7 +609,7 @@ void LLPanelMainInventory::onFocusReceived()
LLSidepanelInventory *sidepanel_inventory = LLFloaterSidePanelContainer::getPanel<LLSidepanelInventory>("inventory");
if (!sidepanel_inventory)
{
- llwarns << "Could not find Inventory Panel in My Inventory floater" << llendl;
+ LL_WARNS() << "Could not find Inventory Panel in My Inventory floater" << LL_ENDL;
return;
}
diff --git a/indra/newview/llpanelmarketplaceinboxinventory.cpp b/indra/newview/llpanelmarketplaceinboxinventory.cpp
index adfb2dee86..43321188e7 100755
--- a/indra/newview/llpanelmarketplaceinboxinventory.cpp
+++ b/indra/newview/llpanelmarketplaceinboxinventory.cpp
@@ -164,7 +164,7 @@ void LLInboxFolderViewFolder::computeFreshness()
#if DEBUGGING_FRESHNESS
if (mFresh)
{
- llinfos << "Item is fresh! -- creation " << mCreationDate << ", saved_freshness_date " << last_expansion_utc << llendl;
+ LL_INFOS() << "Item is fresh! -- creation " << mCreationDate << ", saved_freshness_date " << last_expansion_utc << LL_ENDL;
}
#endif
}
@@ -242,7 +242,7 @@ void LLInboxFolderViewItem::computeFreshness()
#if DEBUGGING_FRESHNESS
if (mFresh)
{
- llinfos << "Item is fresh! -- creation " << mCreationDate << ", saved_freshness_date " << last_expansion_utc << llendl;
+ LL_INFOS() << "Item is fresh! -- creation " << mCreationDate << ", saved_freshness_date " << last_expansion_utc << LL_ENDL;
}
#endif
}
diff --git a/indra/newview/llpanelme.cpp b/indra/newview/llpanelme.cpp
index 7a408e736f..cedd3025fc 100755
--- a/indra/newview/llpanelme.cpp
+++ b/indra/newview/llpanelme.cpp
@@ -30,7 +30,6 @@
// Viewer includes
#include "llpanelprofile.h"
-#include "llavatarconstants.h"
#include "llagent.h"
#include "llagentcamera.h"
#include "llagentwearables.h"
diff --git a/indra/newview/llpanelnearbymedia.cpp b/indra/newview/llpanelnearbymedia.cpp
index a50d9074f7..74c810ea79 100755
--- a/indra/newview/llpanelnearbymedia.cpp
+++ b/indra/newview/llpanelnearbymedia.cpp
@@ -202,7 +202,7 @@ void LLPanelNearByMedia::onTopLost()
/*virtual*/
-void LLPanelNearByMedia::handleVisibilityChange ( BOOL new_visibility )
+void LLPanelNearByMedia::onVisibilityChange ( BOOL new_visibility )
{
if (new_visibility)
{
diff --git a/indra/newview/llpanelnearbymedia.h b/indra/newview/llpanelnearbymedia.h
index c3634de9b4..a9c1b190cf 100755
--- a/indra/newview/llpanelnearbymedia.h
+++ b/indra/newview/llpanelnearbymedia.h
@@ -48,7 +48,7 @@ public:
/*virtual*/ void onMouseEnter(S32 x, S32 y, MASK mask);
/*virtual*/ void onMouseLeave(S32 x, S32 y, MASK mask);
/*virtual*/ void onTopLost();
- /*virtual*/ void handleVisibilityChange ( BOOL new_visibility );
+ /*virtual*/ void onVisibilityChange ( BOOL new_visibility );
/*virtual*/ void reshape(S32 width, S32 height, BOOL called_from_parent);
/*virtual*/ BOOL handleHover(S32 x, S32 y, MASK mask);
diff --git a/indra/newview/llpanelobject.cpp b/indra/newview/llpanelobject.cpp
index 25ef9a3d6a..9123252f4c 100755
--- a/indra/newview/llpanelobject.cpp
+++ b/indra/newview/llpanelobject.cpp
@@ -625,7 +625,7 @@ void LLPanelObject::getState( )
}
else
{
- llinfos << "Unknown path " << (S32) path << " profile " << (S32) profile << " in getState" << llendl;
+ LL_INFOS() << "Unknown path " << (S32) path << " profile " << (S32) profile << " in getState" << LL_ENDL;
selected_item = MI_BOX;
}
@@ -1175,11 +1175,11 @@ void LLPanelObject::sendIsPhysical()
LLSelectMgr::getInstance()->selectionUpdatePhysics(value);
mIsPhysical = value;
- llinfos << "update physics sent" << llendl;
+ LL_INFOS() << "update physics sent" << LL_ENDL;
}
else
{
- llinfos << "update physics not changed" << llendl;
+ LL_INFOS() << "update physics not changed" << LL_ENDL;
}
}
@@ -1191,11 +1191,11 @@ void LLPanelObject::sendIsTemporary()
LLSelectMgr::getInstance()->selectionUpdateTemporary(value);
mIsTemporary = value;
- llinfos << "update temporary sent" << llendl;
+ LL_INFOS() << "update temporary sent" << LL_ENDL;
}
else
{
- llinfos << "update temporary not changed" << llendl;
+ LL_INFOS() << "update temporary not changed" << LL_ENDL;
}
}
@@ -1208,11 +1208,11 @@ void LLPanelObject::sendIsPhantom()
LLSelectMgr::getInstance()->selectionUpdatePhantom(value);
mIsPhantom = value;
- llinfos << "update phantom sent" << llendl;
+ LL_INFOS() << "update phantom sent" << LL_ENDL;
}
else
{
- llinfos << "update phantom not changed" << llendl;
+ LL_INFOS() << "update phantom not changed" << LL_ENDL;
}
}
@@ -1322,8 +1322,8 @@ void LLPanelObject::getVolumeParams(LLVolumeParams& volume_params)
break;
default:
- llwarns << "Unknown base type " << selected_type
- << " in getVolumeParams()" << llendl;
+ LL_WARNS() << "Unknown base type " << selected_type
+ << " in getVolumeParams()" << LL_ENDL;
// assume a box
selected_type = MI_BOX;
profile = LL_PCODE_PROFILE_SQUARE;
@@ -1640,11 +1640,11 @@ void LLPanelObject::sendScale(BOOL btn_down)
}
LLSelectMgr::getInstance()->adjustTexturesByScale(TRUE, !dont_stretch_textures);
-// llinfos << "scale sent" << llendl;
+// LL_INFOS() << "scale sent" << LL_ENDL;
}
else
{
-// llinfos << "scale not changed" << llendl;
+// LL_INFOS() << "scale not changed" << LL_ENDL;
}
}
diff --git a/indra/newview/llpanelobjectinventory.cpp b/indra/newview/llpanelobjectinventory.cpp
index d7130820ab..77bfcec4e0 100755
--- a/indra/newview/llpanelobjectinventory.cpp
+++ b/indra/newview/llpanelobjectinventory.cpp
@@ -210,7 +210,7 @@ struct LLBuyInvItemData
void LLTaskInvFVBridge::buyItem()
{
- llinfos << "LLTaskInvFVBridge::buyItem()" << llendl;
+ LL_INFOS() << "LLTaskInvFVBridge::buyItem()" << LL_ENDL;
LLInventoryItem* item = findItem();
if(!item || !item->getSaleInfo().isForSale()) return;
LLBuyInvItemData* inv = new LLBuyInvItemData(mPanel->getTaskUUID(),
@@ -225,7 +225,7 @@ void LLTaskInvFVBridge::buyItem()
if( ( obj = gObjectList.findObject( mPanel->getTaskUUID() ) ) && obj->isAttachment() )
{
LLNotificationsUtil::add("Cannot_Purchase_an_Attachment");
- llinfos << "Attempt to purchase an attachment" << llendl;
+ LL_INFOS() << "Attempt to purchase an attachment" << LL_ENDL;
delete inv;
}
else
@@ -372,7 +372,7 @@ LLUIImagePtr LLTaskInvFVBridge::getIcon() const
void LLTaskInvFVBridge::openItem()
{
// no-op.
- lldebugs << "LLTaskInvFVBridge::openItem()" << llendl;
+ LL_DEBUGS() << "LLTaskInvFVBridge::openItem()" << LL_ENDL;
}
BOOL LLTaskInvFVBridge::isItemRenameable() const
@@ -562,7 +562,7 @@ void LLTaskInvFVBridge::pasteLinkFromClipboard()
BOOL LLTaskInvFVBridge::startDrag(EDragAndDropType* type, LLUUID* id) const
{
- //llinfos << "LLTaskInvFVBridge::startDrag()" << llendl;
+ //LL_INFOS() << "LLTaskInvFVBridge::startDrag()" << LL_ENDL;
if(mPanel)
{
LLViewerObject* object = gObjectList.findObject(mPanel->getTaskUUID());
@@ -603,7 +603,7 @@ BOOL LLTaskInvFVBridge::dragOrDrop(MASK mask, BOOL drop,
void* cargo_data,
std::string& tooltip_msg)
{
- //llinfos << "LLTaskInvFVBridge::dragOrDrop()" << llendl;
+ //LL_INFOS() << "LLTaskInvFVBridge::dragOrDrop()" << LL_ENDL;
return FALSE;
}
@@ -616,7 +616,7 @@ void LLTaskInvFVBridge::performAction(LLInventoryModel* model, std::string actio
S32 price = getPrice();
if (-1 == price)
{
- llwarns << "label_buy_task_bridged_item: Invalid price" << llendl;
+ LL_WARNS() << "label_buy_task_bridged_item: Invalid price" << LL_ENDL;
}
else
{
@@ -665,7 +665,7 @@ void LLTaskInvFVBridge::buildContextMenu(LLMenuGL& menu, U32 flags)
S32 price = getPrice();
if (-1 == price)
{
- llwarns << "label_buy_task_bridged_item: Invalid price" << llendl;
+ LL_WARNS() << "label_buy_task_bridged_item: Invalid price" << LL_ENDL;
}
else
{
@@ -799,7 +799,7 @@ void LLTaskCategoryBridge::openItem()
BOOL LLTaskCategoryBridge::startDrag(EDragAndDropType* type, LLUUID* id) const
{
- //llinfos << "LLTaskInvFVBridge::startDrag()" << llendl;
+ //LL_INFOS() << "LLTaskInvFVBridge::startDrag()" << LL_ENDL;
if(mPanel && mUUID.notNull())
{
LLViewerObject* object = gObjectList.findObject(mPanel->getTaskUUID());
@@ -822,7 +822,7 @@ BOOL LLTaskCategoryBridge::dragOrDrop(MASK mask, BOOL drop,
void* cargo_data,
std::string& tooltip_msg)
{
- //llinfos << "LLTaskCategoryBridge::dragOrDrop()" << llendl;
+ //LL_INFOS() << "LLTaskCategoryBridge::dragOrDrop()" << LL_ENDL;
BOOL accept = FALSE;
LLViewerObject* object = gObjectList.findObject(mPanel->getTaskUUID());
if(object)
@@ -901,7 +901,7 @@ public:
void LLTaskTextureBridge::openItem()
{
- llinfos << "LLTaskTextureBridge::openItem()" << llendl;
+ LL_INFOS() << "LLTaskTextureBridge::openItem()" << LL_ENDL;
LLPreviewTexture* preview = LLFloaterReg::showTypedInstance<LLPreviewTexture>("preview_texture", LLSD(mUUID), TAKE_FOCUS_YES);
if(preview)
{
@@ -978,7 +978,7 @@ void LLTaskSoundBridge::buildContextMenu(LLMenuGL& menu, U32 flags)
S32 price = getPrice();
if (-1 == price)
{
- llwarns << "label_buy_task_bridged_item: Invalid price" << llendl;
+ LL_WARNS() << "label_buy_task_bridged_item: Invalid price" << LL_ENDL;
}
else
{
@@ -1095,7 +1095,7 @@ public:
void LLTaskLSLBridge::openItem()
{
- llinfos << "LLTaskLSLBridge::openItem() " << mUUID << llendl;
+ LL_INFOS() << "LLTaskLSLBridge::openItem() " << mUUID << LL_ENDL;
LLViewerObject* object = gObjectList.findObject(mPanel->getTaskUUID());
if(!object || object->isInventoryPending())
{
@@ -1336,7 +1336,7 @@ void LLTaskMeshBridge::buildContextMenu(LLMenuGL& menu, U32 flags)
S32 price = getPrice();
if (-1 == price)
{
- llwarns << "label_buy_task_bridged_item: Invalid price" << llendl;
+ LL_WARNS() << "label_buy_task_bridged_item: Invalid price" << LL_ENDL;
}
else
{
@@ -1417,7 +1417,7 @@ LLTaskInvFVBridge* LLTaskInvFVBridge::createObjectBridge(LLPanelObjectInventory*
break;
case LLAssetType::AT_SCRIPT:
// OLD SCRIPTS DEPRECATED - JC
- llwarns << "Old script" << llendl;
+ LL_WARNS() << "Old script" << LL_ENDL;
//new_bridge = new LLTaskOldScriptBridge(panel,
// object_id,
// object_name);
@@ -1466,8 +1466,8 @@ LLTaskInvFVBridge* LLTaskInvFVBridge::createObjectBridge(LLPanelObjectInventory*
object_name);
break;
default:
- llinfos << "Unhandled inventory type (llassetstorage.h): "
- << (S32)type << llendl;
+ LL_INFOS() << "Unhandled inventory type (llassetstorage.h): "
+ << (S32)type << LL_ENDL;
break;
}
return new_bridge;
@@ -1508,7 +1508,7 @@ LLPanelObjectInventory::~LLPanelObjectInventory()
{
if (!gIdleCallbacks.deleteFunction(idle, this))
{
- llwarns << "LLPanelObjectInventory::~LLPanelObjectInventory() failed to delete callback" << llendl;
+ LL_WARNS() << "LLPanelObjectInventory::~LLPanelObjectInventory() failed to delete callback" << LL_ENDL;
}
}
@@ -1603,9 +1603,9 @@ void LLPanelObjectInventory::inventoryChanged(LLViewerObject* object,
{
if(!object) return;
- //llinfos << "invetnory arrived: \n"
+ //LL_INFOS() << "invetnory arrived: \n"
// << " panel UUID: " << panel->mTaskUUID << "\n"
- // << " task UUID: " << object->mID << llendl;
+ // << " task UUID: " << object->mID << LL_ENDL;
if(mTaskUUID == object->mID)
{
mInventoryNeedsUpdate = TRUE;
@@ -1629,9 +1629,9 @@ void LLPanelObjectInventory::inventoryChanged(LLViewerObject* object,
void LLPanelObjectInventory::updateInventory()
{
- //llinfos << "inventory arrived: \n"
+ //LL_INFOS() << "inventory arrived: \n"
// << " panel UUID: " << panel->mTaskUUID << "\n"
- // << " task UUID: " << object->mID << llendl;
+ // << " task UUID: " << object->mID << LL_ENDL;
// We're still interested in this task's inventory.
std::vector<LLUUID> selected_item_ids;
std::set<LLFolderViewItem*> selected_items;
@@ -1753,7 +1753,7 @@ void LLPanelObjectInventory::createViewsForCategory(LLInventoryObject::object_li
LLUIColor item_color = LLUIColorTable::instance().getColor("MenuItemEnabledColor", DEFAULT_WHITE);
// Find all in the first pass
- LLDynamicArray<obj_folder_pair*> child_categories;
+ std::vector<obj_folder_pair*> child_categories;
LLTaskInvFVBridge* bridge;
LLFolderViewItem* view;
@@ -1780,7 +1780,7 @@ void LLPanelObjectInventory::createViewsForCategory(LLInventoryObject::object_li
p.font_color = item_color;
p.font_highlight_color = item_color;
view = LLUICtrlFactory::create<LLFolderViewFolder>(p);
- child_categories.put(new obj_folder_pair(obj,
+ child_categories.push_back(new obj_folder_pair(obj,
(LLFolderViewFolder*)view));
}
else
@@ -1802,7 +1802,7 @@ void LLPanelObjectInventory::createViewsForCategory(LLInventoryObject::object_li
}
// now, for each category, do the second pass
- for(S32 i = 0; i < child_categories.count(); i++)
+ for(S32 i = 0; i < child_categories.size(); i++)
{
createViewsForCategory(inventory, child_categories[i]->first,
child_categories[i]->second );
@@ -1812,7 +1812,7 @@ void LLPanelObjectInventory::createViewsForCategory(LLInventoryObject::object_li
void LLPanelObjectInventory::refresh()
{
- //llinfos << "LLPanelObjectInventory::refresh()" << llendl;
+ //LL_INFOS() << "LLPanelObjectInventory::refresh()" << LL_ENDL;
BOOL has_inventory = FALSE;
const BOOL non_root_ok = TRUE;
LLSelectNode* node = LLSelectMgr::getInstance()->getSelection()->getFirstRootNode(NULL, non_root_ok);
@@ -1866,7 +1866,7 @@ void LLPanelObjectInventory::refresh()
clearContents();
}
mInventoryViewModel.setTaskID(mTaskUUID);
- //llinfos << "LLPanelObjectInventory::refresh() " << mTaskUUID << llendl;
+ //LL_INFOS() << "LLPanelObjectInventory::refresh() " << mTaskUUID << LL_ENDL;
}
void LLPanelObjectInventory::removeSelectedItem()
diff --git a/indra/newview/llpaneloutfitedit.cpp b/indra/newview/llpaneloutfitedit.cpp
index f75d76da94..e48aa88937 100755
--- a/indra/newview/llpaneloutfitedit.cpp
+++ b/indra/newview/llpaneloutfitedit.cpp
@@ -169,14 +169,14 @@ public:
return menu;
}
-
+
private:
static void onCreate(const LLSD& param)
{
LLWearableType::EType type = LLWearableType::typeNameToType(param.asString());
if (type == LLWearableType::WT_NONE)
{
- llwarns << "Invalid wearable type" << llendl;
+ LL_WARNS() << "Invalid wearable type" << LL_ENDL;
return;
}
@@ -263,7 +263,7 @@ private:
}
else
{
- llwarns << "Unrecognized sort order action" << llendl;
+ LL_WARNS() << "Unrecognized sort order action" << LL_ENDL;
return;
}
@@ -306,7 +306,7 @@ private:
// If inventory panel is not sorted by date then it is sorted by name.
return LLWearableItemsList::E_SORT_BY_MOST_RECENT & ~sort_order;
}
- llwarns << "Unrecognized inventory panel sort order" << llendl;
+ LL_WARNS() << "Unrecognized inventory panel sort order" << LL_ENDL;
}
else
{
@@ -324,7 +324,7 @@ private:
{
return LLWearableItemsList::E_SORT_BY_TYPE_NAME == sort_order;
}
- llwarns << "Unrecognized wearable list sort order" << llendl;
+ LL_WARNS() << "Unrecognized wearable list sort order" << LL_ENDL;
}
return false;
}
@@ -481,7 +481,7 @@ BOOL LLPanelOutfitEdit::postBuild()
childSetCommitCallback("shop_btn_1", boost::bind(&LLPanelOutfitEdit::onShopButtonClicked, this), NULL);
childSetCommitCallback("shop_btn_2", boost::bind(&LLPanelOutfitEdit::onShopButtonClicked, this), NULL);
- setVisibleCallback(boost::bind(&LLPanelOutfitEdit::onVisibilityChange, this, _2));
+ setVisibleCallback(boost::bind(&LLPanelOutfitEdit::onVisibilityChanged, this, _2));
mWearablesGearMenuBtn = getChild<LLMenuButton>("wearables_gear_menu_btn");
mGearMenuBtn = getChild<LLMenuButton>("gear_menu_btn");
@@ -767,7 +767,7 @@ void LLPanelOutfitEdit::onPlusBtnClicked(void)
}
}
-void LLPanelOutfitEdit::onVisibilityChange(const LLSD &in_visible_chain)
+void LLPanelOutfitEdit::onVisibilityChanged(const LLSD &in_visible_chain)
{
showAddWearablesPanel(false);
mWearableItemsList->resetSelection();
@@ -842,7 +842,7 @@ void LLPanelOutfitEdit::onShopButtonClicked()
}
else
{
- llwarns << "Agent avatar is invalid" << llendl;
+ LL_WARNS() << "Agent avatar is invalid" << LL_ENDL;
// the second argument is not important in this case: generic market place will be opened
url = url_resolver.resolveURL(LLWearableType::WT_NONE, SEX_FEMALE);
@@ -1154,7 +1154,7 @@ BOOL LLPanelOutfitEdit::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop,
{
if (cargo_data == NULL)
{
- llwarns << "cargo_data is NULL" << llendl;
+ LL_WARNS() << "cargo_data is NULL" << LL_ENDL;
return TRUE;
}
@@ -1260,7 +1260,7 @@ void LLPanelOutfitEdit::resetAccordionState()
}
else
{
- llwarns << "mCOFWearables is NULL" << llendl;
+ LL_WARNS() << "mCOFWearables is NULL" << LL_ENDL;
}
}
diff --git a/indra/newview/llpaneloutfitedit.h b/indra/newview/llpaneloutfitedit.h
index 5d4b8d4644..30870daf40 100755
--- a/indra/newview/llpaneloutfitedit.h
+++ b/indra/newview/llpaneloutfitedit.h
@@ -145,7 +145,7 @@ public:
void updatePlusButton();
void onPlusBtnClicked(void);
- void onVisibilityChange(const LLSD &in_visible_chain);
+ void onVisibilityChanged(const LLSD &in_visible_chain);
void applyFolderViewFilter(EFolderViewItemType type);
void applyListViewFilter(EListViewItemType type);
diff --git a/indra/newview/llpaneloutfitsinventory.cpp b/indra/newview/llpaneloutfitsinventory.cpp
index e0132d20fb..3c72607678 100755
--- a/indra/newview/llpaneloutfitsinventory.cpp
+++ b/indra/newview/llpaneloutfitsinventory.cpp
@@ -242,18 +242,12 @@ void LLPanelOutfitsInventory::updateListCommands()
bool wear_visible = !isCOFPanelActive();
bool make_outfit_enabled = isActionEnabled("save_outfit");
+ LLButton* wear_btn = mListCommands->getChild<LLButton>("wear_btn");
mMyOutfitsPanel->childSetEnabled("trash_btn", trash_enabled);
- mListCommands->childSetEnabled("wear_btn", wear_enabled);
- mListCommands->childSetVisible("wear_btn", wear_visible);
+ wear_btn->setEnabled(wear_enabled);
+ wear_btn->setVisible(wear_visible);
mSaveComboBtn->setMenuItemEnabled("save_outfit", make_outfit_enabled);
- if (mMyOutfitsPanel->hasItemSelected())
- {
- mListCommands->childSetToolTip("wear_btn", getString("wear_items_tooltip"));
- }
- else
- {
- mListCommands->childSetToolTip("wear_btn", getString("wear_outfit_tooltip"));
- }
+ wear_btn->setToolTip(getString(mMyOutfitsPanel->hasItemSelected() ? "wear_items_tooltip" : "wear_outfit_tooltip"));
}
void LLPanelOutfitsInventory::onTrashButtonClick()
diff --git a/indra/newview/llpanelpeople.cpp b/indra/newview/llpanelpeople.cpp
index f5542ee7a6..9d9fb4040d 100755
--- a/indra/newview/llpanelpeople.cpp
+++ b/indra/newview/llpanelpeople.cpp
@@ -394,7 +394,7 @@ private:
}
/*virtual*/ void changed(U32 mask)
{
- lldebugs << "Inventory changed: " << mask << llendl;
+ LL_DEBUGS() << "Inventory changed: " << mask << LL_ENDL;
static bool synchronize_friends_folders = true;
if (synchronize_friends_folders)
@@ -410,9 +410,9 @@ private:
// That means LLInventoryObserver::STRUCTURE is present in MASK instead of LLInventoryObserver::REMOVE
if ((CALLINGCARD_ADDED & mask) == CALLINGCARD_ADDED)
{
- lldebugs << "Calling card added: count: " << gInventory.getChangedIDs().size()
+ LL_DEBUGS() << "Calling card added: count: " << gInventory.getChangedIDs().size()
<< ", first Inventory ID: "<< (*gInventory.getChangedIDs().begin())
- << llendl;
+ << LL_ENDL;
bool friendFound = false;
std::set<LLUUID> changedIDs = gInventory.getChangedIDs();
@@ -427,7 +427,7 @@ private:
if (friendFound)
{
- lldebugs << "friend found, panel should be updated" << llendl;
+ LL_DEBUGS() << "friend found, panel should be updated" << LL_ENDL;
mUpdater->changed(LLFriendObserver::ADD);
}
}
@@ -556,7 +556,7 @@ void LLPanelPeople::onFriendsAccordionExpandedCollapsed(LLUICtrl* ctrl, const LL
{
if(!avatar_list)
{
- llerrs << "Bad parameter" << llendl;
+ LL_ERRS() << "Bad parameter" << LL_ENDL;
return;
}
@@ -668,7 +668,7 @@ BOOL LLPanelPeople::postBuild()
}
else
{
- llwarns << "People->Groups list menu not found" << llendl;
+ LL_WARNS() << "People->Groups list menu not found" << LL_ENDL;
}
LLAccordionCtrlTab* accordion_tab = getChild<LLAccordionCtrlTab>("tab_all");
@@ -753,12 +753,12 @@ void LLPanelPeople::updateFriendList()
if (buddies_uuids.size() > 0)
{
- lldebugs << "Friends added to the list: " << buddies_uuids.size() << llendl;
+ LL_DEBUGS() << "Friends added to the list: " << buddies_uuids.size() << LL_ENDL;
all_friendsp = buddies_uuids;
}
else
{
- lldebugs << "No friends found" << llendl;
+ LL_DEBUGS() << "No friends found" << LL_ENDL;
}
LLAvatarTracker::buddy_map_t::const_iterator buddy_it = all_buddies.begin();
@@ -902,8 +902,8 @@ void LLPanelPeople::updateButtons()
LLPanel* groups_panel = mTabContainer->getCurrentPanel();
groups_panel->getChildView("minus_btn")->setEnabled(item_selected && selected_id.notNull()); // a real group selected
- groups_panel->getChild<LLUICtrl>("groupcount")->setTextArg("[COUNT]", llformat("%d",gAgent.mGroups.count()));
- groups_panel->getChild<LLUICtrl>("groupcount")->setTextArg("[REMAINING]", llformat("%d",(gMaxAgentGroups-gAgent.mGroups.count())));
+ groups_panel->getChild<LLUICtrl>("groupcount")->setTextArg("[COUNT]", llformat("%d",gAgent.mGroups.size()));
+ groups_panel->getChild<LLUICtrl>("groupcount")->setTextArg("[REMAINING]", llformat("%d",(gMaxAgentGroups-gAgent.mGroups.size())));
}
else
{
@@ -1037,7 +1037,7 @@ void LLPanelPeople::setSortOrder(LLAvatarList* list, ESortOrder order, bool save
list->sort();
break;
default:
- llwarns << "Unrecognized people sort order for " << list->getName() << llendl;
+ LL_WARNS() << "Unrecognized people sort order for " << list->getName() << LL_ENDL;
return;
}
@@ -1435,7 +1435,7 @@ bool LLPanelPeople::notifyChildren(const LLSD& info)
LLSideTrayPanelContainer* container = dynamic_cast<LLSideTrayPanelContainer*>(getParent());
if (!container)
{
- llwarns << "Cannot find People panel container" << llendl;
+ LL_WARNS() << "Cannot find People panel container" << LL_ENDL;
return true;
}
@@ -1457,7 +1457,7 @@ void LLPanelPeople::showAccordion(const std::string name, bool show)
{
if(name.empty())
{
- llwarns << "No name provided" << llendl;
+ LL_WARNS() << "No name provided" << LL_ENDL;
return;
}
@@ -1510,7 +1510,7 @@ void LLPanelPeople::setAccordionCollapsedByUser(LLUICtrl* acc_tab, bool collapse
{
if(!acc_tab)
{
- llwarns << "Invalid parameter" << llendl;
+ LL_WARNS() << "Invalid parameter" << LL_ENDL;
return;
}
@@ -1528,7 +1528,7 @@ bool LLPanelPeople::isAccordionCollapsedByUser(LLUICtrl* acc_tab)
{
if(!acc_tab)
{
- llwarns << "Invalid parameter" << llendl;
+ LL_WARNS() << "Invalid parameter" << LL_ENDL;
return false;
}
diff --git a/indra/newview/llpanelpeople.h b/indra/newview/llpanelpeople.h
index c7141f36ee..34dc3d9ab7 100755
--- a/indra/newview/llpanelpeople.h
+++ b/indra/newview/llpanelpeople.h
@@ -39,6 +39,7 @@ class LLFilterEditor;
class LLGroupList;
class LLMenuButton;
class LLTabContainer;
+class LLNetMap;
class LLPanelPeople
: public LLPanel
diff --git a/indra/newview/llpanelpermissions.cpp b/indra/newview/llpanelpermissions.cpp
index 131e8e9359..58055d98c6 100755
--- a/indra/newview/llpanelpermissions.cpp
+++ b/indra/newview/llpanelpermissions.cpp
@@ -913,7 +913,6 @@ bool callback_deed_to_group(const LLSD& notification, const LLSD& response)
if(group_id.notNull() && groups_identical && (gAgent.hasPowerInGroup(group_id, GP_OBJECT_DEED)))
{
LLSelectMgr::getInstance()->sendOwner(LLUUID::null, group_id, FALSE);
-// LLViewerStats::getInstance()->incStat(LLViewerStats::ST_RELEASE_COUNT);
}
}
return false;
@@ -964,28 +963,28 @@ void LLPanelPermissions::onCommitEveryoneCopy(LLUICtrl *ctrl, void *data)
// static
void LLPanelPermissions::onCommitNextOwnerModify(LLUICtrl* ctrl, void* data)
{
- //llinfos << "LLPanelPermissions::onCommitNextOwnerModify" << llendl;
+ //LL_INFOS() << "LLPanelPermissions::onCommitNextOwnerModify" << LL_ENDL;
onCommitPerm(ctrl, data, PERM_NEXT_OWNER, PERM_MODIFY);
}
// static
void LLPanelPermissions::onCommitNextOwnerCopy(LLUICtrl* ctrl, void* data)
{
- //llinfos << "LLPanelPermissions::onCommitNextOwnerCopy" << llendl;
+ //LL_INFOS() << "LLPanelPermissions::onCommitNextOwnerCopy" << LL_ENDL;
onCommitPerm(ctrl, data, PERM_NEXT_OWNER, PERM_COPY);
}
// static
void LLPanelPermissions::onCommitNextOwnerTransfer(LLUICtrl* ctrl, void* data)
{
- //llinfos << "LLPanelPermissions::onCommitNextOwnerTransfer" << llendl;
+ //LL_INFOS() << "LLPanelPermissions::onCommitNextOwnerTransfer" << LL_ENDL;
onCommitPerm(ctrl, data, PERM_NEXT_OWNER, PERM_TRANSFER);
}
// static
void LLPanelPermissions::onCommitName(LLUICtrl*, void* data)
{
- //llinfos << "LLPanelPermissions::onCommitName()" << llendl;
+ //LL_INFOS() << "LLPanelPermissions::onCommitName()" << LL_ENDL;
LLPanelPermissions* self = (LLPanelPermissions*)data;
LLLineEditor* tb = self->getChild<LLLineEditor>("Object Name");
if(tb)
@@ -999,7 +998,7 @@ void LLPanelPermissions::onCommitName(LLUICtrl*, void* data)
// static
void LLPanelPermissions::onCommitDesc(LLUICtrl*, void* data)
{
- //llinfos << "LLPanelPermissions::onCommitDesc()" << llendl;
+ //LL_INFOS() << "LLPanelPermissions::onCommitDesc()" << LL_ENDL;
LLPanelPermissions* self = (LLPanelPermissions*)data;
LLLineEditor* le = self->getChild<LLLineEditor>("Object Description");
if(le)
@@ -1024,7 +1023,7 @@ void LLPanelPermissions::onCommitSaleType(LLUICtrl*, void* data)
void LLPanelPermissions::setAllSaleInfo()
{
- llinfos << "LLPanelPermissions::setAllSaleInfo()" << llendl;
+ LL_INFOS() << "LLPanelPermissions::setAllSaleInfo()" << LL_ENDL;
LLSaleInfo::EForSale sale_type = LLSaleInfo::FS_NOT;
LLCheckBoxCtrl *checkPurchase = getChild<LLCheckBoxCtrl>("checkbox for sale");
diff --git a/indra/newview/llpanelpicks.cpp b/indra/newview/llpanelpicks.cpp
index f0617266db..d73a5b402e 100755
--- a/indra/newview/llpanelpicks.cpp
+++ b/indra/newview/llpanelpicks.cpp
@@ -30,7 +30,6 @@
#include "llagent.h"
#include "llagentpicksinfo.h"
-#include "llavatarconstants.h"
#include "llcommandhandler.h"
#include "lldispatcher.h"
#include "llflatlistview.h"
@@ -123,7 +122,7 @@ public:
}
else
{
- llwarns << "unknown verb " << verb << llendl;
+ LL_WARNS() << "unknown verb " << verb << LL_ENDL;
return false;
}
}
@@ -174,7 +173,7 @@ public:
}
else
{
- llwarns << "Can't edit a pick you did not create" << llendl;
+ LL_WARNS() << "Can't edit a pick you did not create" << LL_ENDL;
}
// remove our observer now that we're done
@@ -281,7 +280,7 @@ public:
{
if (c_info->creator_id == gAgent.getID())
{
- llwarns << "edit in progress" << llendl;
+ LL_WARNS() << "edit in progress" << LL_ENDL;
// open the new classified panel on the Me > Picks sidetray
LLSD params;
params["id"] = gAgent.getID();
@@ -292,7 +291,7 @@ public:
}
else
{
- llwarns << "Can't edit a classified you did not create" << llendl;
+ LL_WARNS() << "Can't edit a classified you did not create" << LL_ENDL;
}
}
}
@@ -677,7 +676,7 @@ void LLPanelPicks::onListCommit(const LLFlatListView* f_list)
}
else
{
- llwarns << "Unknown list" << llendl;
+ LL_WARNS() << "Unknown list" << LL_ENDL;
}
updateButtons();
@@ -937,7 +936,7 @@ void LLPanelPicks::openClassifiedInfo(const LLSD &params)
void LLPanelPicks::openClassifiedEdit(const LLSD& params)
{
LLUUID classified_id = params["classified_id"].asUUID();;
- llinfos << "opening classified " << classified_id << " for edit" << llendl;
+ LL_INFOS() << "opening classified " << classified_id << " for edit" << LL_ENDL;
editClassified(classified_id);
}
@@ -1169,7 +1168,7 @@ void LLPanelPicks::editClassified(const LLUUID& classified_id)
LLClassifiedItem* c_item = findClassifiedById(classified_id);
if (!c_item)
{
- llwarns << "item not found for classified_id " << classified_id << llendl;
+ LL_WARNS() << "item not found for classified_id " << classified_id << LL_ENDL;
return;
}
diff --git a/indra/newview/llpanelplaceprofile.cpp b/indra/newview/llpanelplaceprofile.cpp
index 14b5d9af47..e501486ecb 100755
--- a/indra/newview/llpanelplaceprofile.cpp
+++ b/indra/newview/llpanelplaceprofile.cpp
@@ -302,9 +302,9 @@ void LLPanelPlaceProfile::processParcelInfo(const LLParcelData& parcel_data)
}
// virtual
-void LLPanelPlaceProfile::handleVisibilityChange(BOOL new_visibility)
+void LLPanelPlaceProfile::onVisibilityChange(BOOL new_visibility)
{
- LLPanel::handleVisibilityChange(new_visibility);
+ LLPanel::onVisibilityChange(new_visibility);
LLViewerParcelMgr* parcel_mgr = LLViewerParcelMgr::getInstance();
if (!parcel_mgr)
diff --git a/indra/newview/llpanelplaceprofile.h b/indra/newview/llpanelplaceprofile.h
index f4c6145881..01adfd4940 100755
--- a/indra/newview/llpanelplaceprofile.h
+++ b/indra/newview/llpanelplaceprofile.h
@@ -38,7 +38,7 @@ class LLPanelPlaceProfile : public LLPanelPlaceInfo
public:
LLPanelPlaceProfile();
/*virtual*/ ~LLPanelPlaceProfile();
-
+
/*virtual*/ BOOL postBuild();
/*virtual*/ void resetLocation();
@@ -47,7 +47,7 @@ public:
/*virtual*/ void processParcelInfo(const LLParcelData& parcel_data);
- /*virtual*/ void handleVisibilityChange(BOOL new_visibility);
+ /*virtual*/ void onVisibilityChange(BOOL new_visibility);
// Displays information about the currently selected parcel
// without sending a request to the server.
diff --git a/indra/newview/llpanelplaces.cpp b/indra/newview/llpanelplaces.cpp
index 499b9ab62e..c05b379fd8 100755
--- a/indra/newview/llpanelplaces.cpp
+++ b/indra/newview/llpanelplaces.cpp
@@ -219,8 +219,8 @@ public:
}
/*virtual*/ void setErrorStatus(U32 status, const std::string& reason)
{
- llerrs << "Can't complete remote parcel request. Http Status: "
- << status << ". Reason : " << reason << llendl;
+ LL_ERRS() << "Can't complete remote parcel request. Http Status: "
+ << status << ". Reason : " << reason << LL_ENDL;
}
private:
@@ -308,13 +308,13 @@ BOOL LLPanelPlaces::postBuild()
mPlaceMenu = LLUICtrlFactory::getInstance()->createFromFile<LLToggleableMenu>("menu_place.xml", gMenuHolder, LLViewerMenuHolderGL::child_registry_t::instance());
if (!mPlaceMenu)
{
- llwarns << "Error loading Place menu" << llendl;
+ LL_WARNS() << "Error loading Place menu" << LL_ENDL;
}
mLandmarkMenu = LLUICtrlFactory::getInstance()->createFromFile<LLToggleableMenu>("menu_landmark.xml", gMenuHolder, LLViewerMenuHolderGL::child_registry_t::instance());
if (!mLandmarkMenu)
{
- llwarns << "Error loading Landmark menu" << llendl;
+ LL_WARNS() << "Error loading Landmark menu" << LL_ENDL;
}
mTabContainer = getChild<LLTabContainer>("Places Tabs");
@@ -614,7 +614,7 @@ void LLPanelPlaces::onTeleportButtonClicked()
{
if (mItem.isNull())
{
- llwarns << "NULL landmark item" << llendl;
+ LL_WARNS() << "NULL landmark item" << LL_ENDL;
llassert(mItem.notNull());
return;
}
@@ -902,7 +902,7 @@ void LLPanelPlaces::onOverflowMenuItemClicked(const LLSD& param)
favorites_id,
std::string(),
LLPointer<LLInventoryCallback>(NULL));
- llinfos << "Copied inventory item #" << mItem->getUUID() << " to favorites." << llendl;
+ LL_INFOS() << "Copied inventory item #" << mItem->getUUID() << " to favorites." << LL_ENDL;
}
}
}
@@ -998,9 +998,9 @@ void LLPanelPlaces::togglePlaceInfoPanel(BOOL visible)
}
// virtual
-void LLPanelPlaces::handleVisibilityChange(BOOL new_visibility)
+void LLPanelPlaces::onVisibilityChange(BOOL new_visibility)
{
- LLPanel::handleVisibilityChange(new_visibility);
+ LLPanel::onVisibilityChange(new_visibility);
if (!new_visibility && mPlaceInfoType == AGENT_INFO_TYPE)
{
diff --git a/indra/newview/llpanelplaces.h b/indra/newview/llpanelplaces.h
index 85bdc2c4e1..b6019ca32e 100755
--- a/indra/newview/llpanelplaces.h
+++ b/indra/newview/llpanelplaces.h
@@ -102,7 +102,7 @@ private:
void togglePickPanel(BOOL visible);
void togglePlaceInfoPanel(BOOL visible);
- /*virtual*/ void handleVisibilityChange(BOOL new_visibility);
+ /*virtual*/ void onVisibilityChange(BOOL new_visibility);
void updateVerbs();
diff --git a/indra/newview/llpanelprimmediacontrols.cpp b/indra/newview/llpanelprimmediacontrols.cpp
index 9504f22a1d..7c0e448a99 100755
--- a/indra/newview/llpanelprimmediacontrols.cpp
+++ b/indra/newview/llpanelprimmediacontrols.cpp
@@ -830,7 +830,7 @@ bool LLPanelPrimMediaControls::isMouseOver()
if(hit_child && hit_child->getVisible())
{
// This was useful for debugging both coordinate translation and view hieararchy problems...
- // llinfos << "mouse coords: " << x << ", " << y << " hit child " << hit_child->getName() << llendl;
+ // LL_INFOS() << "mouse coords: " << x << ", " << y << " hit child " << hit_child->getName() << LL_ENDL;
// This will be a direct child of the LLLayoutStack, which should be a layout_panel.
// These may not shown/hidden by the logic in updateShape(), so we need to do another hit test on the children of the layout panel,
@@ -841,7 +841,7 @@ bool LLPanelPrimMediaControls::isMouseOver()
if(hit_child_2 && hit_child_2->getVisible())
{
// This was useful for debugging both coordinate translation and view hieararchy problems...
- // llinfos << " mouse coords: " << x << ", " << y << " hit child 2 " << hit_child_2->getName() << llendl;
+ // LL_INFOS() << " mouse coords: " << x << ", " << y << " hit child 2 " << hit_child_2->getName() << LL_ENDL;
result = true;
}
}
diff --git a/indra/newview/llpanelprofile.cpp b/indra/newview/llpanelprofile.cpp
index 5acc98904b..f91c4110c0 100755
--- a/indra/newview/llpanelprofile.cpp
+++ b/indra/newview/llpanelprofile.cpp
@@ -38,6 +38,7 @@
#include "llviewernetwork.h"
#include "llmutelist.h"
#include "llpanelblockedlist.h"
+#include "llweb.h"
static const std::string PANEL_PICKS = "panel_picks";
@@ -71,7 +72,7 @@ public:
{
if (params.size() < 1) return false;
std::string agent_name = params[0];
- llinfos << "Profile, agent_name " << agent_name << llendl;
+ LL_INFOS() << "Profile, agent_name " << agent_name << LL_ENDL;
std::string url = getProfileURL(agent_name);
LLWeb::loadURLInternal(url);
@@ -231,7 +232,7 @@ bool LLPanelProfile::ChildStack::pop()
{
if (mStack.size() == 0)
{
- llwarns << "Empty stack" << llendl;
+ LL_WARNS() << "Empty stack" << LL_ENDL;
llassert(mStack.size() == 0);
return false;
}
@@ -270,7 +271,7 @@ void LLPanelProfile::ChildStack::postParentReshape()
for (view_list_t::const_iterator list_it = vlist.begin(); list_it != vlist.end(); ++list_it)
{
LLView* viewp = *list_it;
- lldebugs << "removing " << viewp->getName() << llendl;
+ LL_DEBUGS() << "removing " << viewp->getName() << LL_ENDL;
mParent->removeChild(viewp);
}
}
@@ -279,7 +280,7 @@ void LLPanelProfile::ChildStack::postParentReshape()
void LLPanelProfile::ChildStack::dump()
{
unsigned lvl = 0;
- lldebugs << "child stack dump:" << llendl;
+ LL_DEBUGS() << "child stack dump:" << LL_ENDL;
for (stack_t::const_iterator stack_it = mStack.begin(); stack_it != mStack.end(); ++stack_it, ++lvl)
{
std::ostringstream dbg_line;
@@ -289,7 +290,7 @@ void LLPanelProfile::ChildStack::dump()
{
dbg_line << " " << (*list_it)->getName();
}
- lldebugs << dbg_line.str() << llendl;
+ LL_DEBUGS() << dbg_line.str() << LL_ENDL;
}
}
@@ -434,7 +435,7 @@ void LLPanelProfile::closePanel(LLPanel* panel)
}
else
{
- llwarns << "No underlying panel to focus." << llendl;
+ LL_WARNS() << "No underlying panel to focus." << LL_ENDL;
}
}
}
diff --git a/indra/newview/llpanelsnapshot.cpp b/indra/newview/llpanelsnapshot.cpp
index 2f29e758c6..5924448671 100755
--- a/indra/newview/llpanelsnapshot.cpp
+++ b/indra/newview/llpanelsnapshot.cpp
@@ -114,7 +114,7 @@ LLSideTrayPanelContainer* LLPanelSnapshot::getParentContainer()
LLSideTrayPanelContainer* parent = dynamic_cast<LLSideTrayPanelContainer*>(getParent());
if (!parent)
{
- llwarns << "Cannot find panel container" << llendl;
+ LL_WARNS() << "Cannot find panel container" << LL_ENDL;
return NULL;
}
diff --git a/indra/newview/llpanelsnapshotoptions.cpp b/indra/newview/llpanelsnapshotoptions.cpp
index 455c1c9e5f..21f95f38c0 100755
--- a/indra/newview/llpanelsnapshotoptions.cpp
+++ b/indra/newview/llpanelsnapshotoptions.cpp
@@ -90,7 +90,7 @@ void LLPanelSnapshotOptions::openPanel(const std::string& panel_name)
LLSideTrayPanelContainer* parent = dynamic_cast<LLSideTrayPanelContainer*>(getParent());
if (!parent)
{
- llwarns << "Cannot find panel container" << llendl;
+ LL_WARNS() << "Cannot find panel container" << LL_ENDL;
return;
}
diff --git a/indra/newview/llpanelsnapshotpostcard.cpp b/indra/newview/llpanelsnapshotpostcard.cpp
index aa109e9a51..95c443b826 100755
--- a/indra/newview/llpanelsnapshotpostcard.cpp
+++ b/indra/newview/llpanelsnapshotpostcard.cpp
@@ -236,7 +236,7 @@ void LLPanelSnapshotPostcard::onTabButtonPress(S32 btn_idx)
other_btn->toggleState();
//other_btn->setEnabled(TRUE);
- lldebugs << "Button #" << btn_idx << " (" << clicked_btn->getName() << ") clicked" << llendl;
+ LL_DEBUGS() << "Button #" << btn_idx << " (" << clicked_btn->getName() << ") clicked" << LL_ENDL;
}
void LLPanelSnapshotPostcard::onSend()
diff --git a/indra/newview/llpanelteleporthistory.cpp b/indra/newview/llpanelteleporthistory.cpp
index 9c380f63bd..8fddd9523f 100755
--- a/indra/newview/llpanelteleporthistory.cpp
+++ b/indra/newview/llpanelteleporthistory.cpp
@@ -421,7 +421,7 @@ BOOL LLTeleportHistoryPanel::postBuild()
// All accordion tabs are collapsed initially
setAccordionCollapsedByUser(tab, true);
- mItemContainers.put(tab);
+ mItemContainers.push_back(tab);
LLFlatListView* fl = getFlatListViewFromTab(tab);
if (fl)
@@ -437,14 +437,14 @@ BOOL LLTeleportHistoryPanel::postBuild()
// Open first 2 accordion tabs
if (mItemContainers.size() > 1)
{
- LLAccordionCtrlTab* tab = mItemContainers.get(mItemContainers.size() - 1);
+ LLAccordionCtrlTab* tab = mItemContainers.at(mItemContainers.size() - 1);
tab->setDisplayChildren(true);
setAccordionCollapsedByUser(tab, false);
}
if (mItemContainers.size() > 2)
{
- LLAccordionCtrlTab* tab = mItemContainers.get(mItemContainers.size() - 2);
+ LLAccordionCtrlTab* tab = mItemContainers.at(mItemContainers.size() - 2);
tab->setDisplayChildren(true);
setAccordionCollapsedByUser(tab, false);
}
@@ -688,7 +688,7 @@ void LLTeleportHistoryPanel::refresh()
tab_idx = mItemContainers.size() - 1 - tab_idx;
if (tab_idx >= 0)
{
- LLAccordionCtrlTab* tab = mItemContainers.get(tab_idx);
+ LLAccordionCtrlTab* tab = mItemContainers.at(tab_idx);
tab->setVisible(true);
// Expand all accordion tabs when filtering
@@ -722,7 +722,7 @@ void LLTeleportHistoryPanel::refresh()
mCurrentItem,
filter_string);
if ( !curr_flat_view->addItem(item, LLUUID::null, ADD_BOTTOM, false) )
- llerrs << "Couldn't add flat item to teleport history." << llendl;
+ LL_ERRS() << "Couldn't add flat item to teleport history." << LL_ENDL;
if (mLastSelectedItemIndex == mCurrentItem)
curr_flat_view->selectItem(item, true);
}
@@ -735,7 +735,7 @@ void LLTeleportHistoryPanel::refresh()
for (S32 n = mItemContainers.size() - 1; n >= 0; --n)
{
- LLAccordionCtrlTab* tab = mItemContainers.get(n);
+ LLAccordionCtrlTab* tab = mItemContainers.at(n);
LLFlatListView* fv = getFlatListViewFromTab(tab);
if (fv)
{
@@ -797,7 +797,7 @@ void LLTeleportHistoryPanel::replaceItem(S32 removed_index)
// to point to the right item in LLTeleportHistoryStorage
for (S32 tab_idx = mItemContainers.size() - 1; tab_idx >= 0; --tab_idx)
{
- LLAccordionCtrlTab* tab = mItemContainers.get(tab_idx);
+ LLAccordionCtrlTab* tab = mItemContainers.at(tab_idx);
if (!tab->getVisible())
continue;
@@ -851,7 +851,7 @@ void LLTeleportHistoryPanel::showTeleportHistory()
for (S32 n = mItemContainers.size() - 1; n >= 0; --n)
{
- LLAccordionCtrlTab* tab = mItemContainers.get(n);
+ LLAccordionCtrlTab* tab = mItemContainers.at(n);
if (tab)
{
tab->setVisible(false);
@@ -878,7 +878,7 @@ void LLTeleportHistoryPanel::handleItemSelect(LLFlatListView* selected)
for (S32 n = 0; n < tabs_cnt; n++)
{
- LLAccordionCtrlTab* tab = mItemContainers.get(n);
+ LLAccordionCtrlTab* tab = mItemContainers.at(n);
if (!tab->getVisible())
continue;
@@ -963,7 +963,7 @@ void LLTeleportHistoryPanel::onExpandAllFolders()
for (S32 n = 0; n < tabs_cnt; n++)
{
- mItemContainers.get(n)->setDisplayChildren(true);
+ mItemContainers.at(n)->setDisplayChildren(true);
}
mHistoryAccordion->arrange();
}
@@ -974,7 +974,7 @@ void LLTeleportHistoryPanel::onCollapseAllFolders()
for (S32 n = 0; n < tabs_cnt; n++)
{
- mItemContainers.get(n)->setDisplayChildren(false);
+ mItemContainers.at(n)->setDisplayChildren(false);
}
mHistoryAccordion->arrange();
@@ -1029,7 +1029,7 @@ bool LLTeleportHistoryPanel::isActionEnabled(const LLSD& userdata) const
for (S32 n = 0; n < tabs_cnt; n++)
{
- LLAccordionCtrlTab* tab = mItemContainers.get(n);
+ LLAccordionCtrlTab* tab = mItemContainers.at(n);
if (!tab->getVisible())
continue;
diff --git a/indra/newview/llpanelteleporthistory.h b/indra/newview/llpanelteleporthistory.h
index 47b607a2f4..b88861c5c6 100755
--- a/indra/newview/llpanelteleporthistory.h
+++ b/indra/newview/llpanelteleporthistory.h
@@ -112,7 +112,7 @@ private:
bool mDirty;
S32 mCurrentItem;
- typedef LLDynamicArray<LLAccordionCtrlTab*> item_containers_t;
+ typedef std::vector<LLAccordionCtrlTab*> item_containers_t;
item_containers_t mItemContainers;
ContextMenu mContextMenu;
diff --git a/indra/newview/llpaneltopinfobar.cpp b/indra/newview/llpaneltopinfobar.cpp
index 0d09f0bbfc..109013498e 100755
--- a/indra/newview/llpaneltopinfobar.cpp
+++ b/indra/newview/llpaneltopinfobar.cpp
@@ -169,7 +169,7 @@ BOOL LLPanelTopInfoBar::postBuild()
mParcelMgrConnection = gAgent.addParcelChangedCallback(
boost::bind(&LLPanelTopInfoBar::onAgentParcelChange, this));
- setVisibleCallback(boost::bind(&LLPanelTopInfoBar::onVisibilityChange, this, _2));
+ setVisibleCallback(boost::bind(&LLPanelTopInfoBar::onVisibilityChanged, this, _2));
return TRUE;
}
@@ -186,7 +186,7 @@ void LLPanelTopInfoBar::onNavBarShowParcelPropertiesCtrlChanged()
// when panel is shown, all minimized floaters should be shifted downwards to prevent overlapping of
// PanelTopInfoBar. See EXT-7951.
-void LLPanelTopInfoBar::onVisibilityChange(const LLSD& show)
+void LLPanelTopInfoBar::onVisibilityChanged(const LLSD& show)
{
// this height is used as a vertical offset for ALREADY MINIMIZED floaters
// when PanelTopInfoBar visibility changes
diff --git a/indra/newview/llpaneltopinfobar.h b/indra/newview/llpaneltopinfobar.h
index d58d95be90..f37bd9c048 100755
--- a/indra/newview/llpaneltopinfobar.h
+++ b/indra/newview/llpaneltopinfobar.h
@@ -57,7 +57,7 @@ public:
/**
* Called when the top info bar gets shown or hidden
*/
- void onVisibilityChange(const LLSD& show);
+ void onVisibilityChanged(const LLSD& show);
boost::signals2::connection setResizeCallback( const resize_signal_t::slot_type& cb );
diff --git a/indra/newview/llpanelvoicedevicesettings.cpp b/indra/newview/llpanelvoicedevicesettings.cpp
index 6f0a1624a7..3946d6a63b 100755
--- a/indra/newview/llpanelvoicedevicesettings.cpp
+++ b/indra/newview/llpanelvoicedevicesettings.cpp
@@ -85,7 +85,7 @@ BOOL LLPanelVoiceDeviceSettings::postBuild()
}
// virtual
-void LLPanelVoiceDeviceSettings::handleVisibilityChange ( BOOL new_visibility )
+void LLPanelVoiceDeviceSettings::onVisibilityChange ( BOOL new_visibility )
{
if (new_visibility)
{
diff --git a/indra/newview/llpanelvoicedevicesettings.h b/indra/newview/llpanelvoicedevicesettings.h
index ba3bcad0dc..83464f476a 100755
--- a/indra/newview/llpanelvoicedevicesettings.h
+++ b/indra/newview/llpanelvoicedevicesettings.h
@@ -44,7 +44,7 @@ public:
void initialize();
void cleanup();
- /*virtual*/ void handleVisibilityChange ( BOOL new_visibility );
+ /*virtual*/ void onVisibilityChange ( BOOL new_visibility );
void setUseTuningMode(bool use) { mUseTuningMode = use; };
diff --git a/indra/newview/llpanelvoiceeffect.cpp b/indra/newview/llpanelvoiceeffect.cpp
index 7da553801a..a3f0e25ef0 100755
--- 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 LLPanelInjector<LLPanelVoiceEffect> t_panel_voice_effect("panel_voice_effect");
diff --git a/indra/newview/llpanelvolume.cpp b/indra/newview/llpanelvolume.cpp
index a1d60b5b16..f1f87e212d 100755
--- a/indra/newview/llpanelvolume.cpp
+++ b/indra/newview/llpanelvolume.cpp
@@ -620,7 +620,7 @@ void LLPanelVolume::sendIsLight()
BOOL value = getChild<LLUICtrl>("Light Checkbox Ctrl")->getValue();
volobjp->setIsLight(value);
- llinfos << "update light sent" << llendl;
+ LL_INFOS() << "update light sent" << LL_ENDL;
}
void LLPanelVolume::sendIsFlexible()
@@ -652,7 +652,7 @@ void LLPanelVolume::sendIsFlexible()
LLSelectMgr::getInstance()->selectionUpdatePhantom(volobjp->flagPhantom());
}
- llinfos << "update flexible sent" << llendl;
+ LL_INFOS() << "update flexible sent" << LL_ENDL;
}
void LLPanelVolume::sendPhysicsShapeType(LLUICtrl* ctrl, void* userdata)
diff --git a/indra/newview/llpanelvolumepulldown.cpp b/indra/newview/llpanelvolumepulldown.cpp
index aea7b33d7f..cb00f742cc 100755
--- a/indra/newview/llpanelvolumepulldown.cpp
+++ b/indra/newview/llpanelvolumepulldown.cpp
@@ -87,7 +87,7 @@ void LLPanelVolumePulldown::onMouseLeave(S32 x, S32 y, MASK mask)
}
/*virtual*/
-void LLPanelVolumePulldown::handleVisibilityChange ( BOOL new_visibility )
+void LLPanelVolumePulldown::onVisibilityChange ( BOOL new_visibility )
{
if (new_visibility)
{
diff --git a/indra/newview/llpanelvolumepulldown.h b/indra/newview/llpanelvolumepulldown.h
index 0d86e6bd28..b843fab756 100755
--- a/indra/newview/llpanelvolumepulldown.h
+++ b/indra/newview/llpanelvolumepulldown.h
@@ -42,7 +42,7 @@ class LLPanelVolumePulldown : public LLPanel
/*virtual*/ void onMouseEnter(S32 x, S32 y, MASK mask);
/*virtual*/ void onMouseLeave(S32 x, S32 y, MASK mask);
/*virtual*/ void onTopLost();
- /*virtual*/ void handleVisibilityChange ( BOOL new_visibility );
+ /*virtual*/ void onVisibilityChange ( BOOL new_visibility );
/*virtual*/ BOOL postBuild();
private:
diff --git a/indra/newview/llpanelwearing.cpp b/indra/newview/llpanelwearing.cpp
index edb624e3aa..75e0ed3741 100755
--- a/indra/newview/llpanelwearing.cpp
+++ b/indra/newview/llpanelwearing.cpp
@@ -118,7 +118,7 @@ protected:
if (!item)
{
- llwarns << "Invalid item" << llendl;
+ LL_WARNS() << "Invalid item" << LL_ENDL;
continue;
}
diff --git a/indra/newview/llpatchvertexarray.cpp b/indra/newview/llpatchvertexarray.cpp
index dece2928c0..6e3e375488 100755
--- a/indra/newview/llpatchvertexarray.cpp
+++ b/indra/newview/llpatchvertexarray.cpp
@@ -128,7 +128,7 @@ void LLPatchVertexArray::create(U32 surface_width, U32 patch_width, F32 meters_p
{
// init() and some other things all want to deref these
// pointers, so this is serious.
- llerrs << "mRenderLevelp or mRenderStridep was NULL; we'd crash soon." << llendl;
+ LL_ERRS() << "mRenderLevelp or mRenderStridep was NULL; we'd crash soon." << LL_ENDL;
return;
}
diff --git a/indra/newview/llpathfindingmanager.cpp b/indra/newview/llpathfindingmanager.cpp
index c277359133..ae5b3b4e76 100755
--- a/indra/newview/llpathfindingmanager.cpp
+++ b/indra/newview/llpathfindingmanager.cpp
@@ -736,8 +736,8 @@ std::string LLPathfindingManager::getCapabilityURLForRegion(LLViewerRegion *pReg
if (capabilityURL.empty())
{
- llwarns << "cannot find capability '" << pCapabilityName << "' for current region '"
- << ((pRegion != NULL) ? pRegion->getName() : "<null>") << "'" << llendl;
+ LL_WARNS() << "cannot find capability '" << pCapabilityName << "' for current region '"
+ << ((pRegion != NULL) ? pRegion->getName() : "<null>") << "'" << LL_ENDL;
}
return capabilityURL;
@@ -804,7 +804,7 @@ void NavMeshStatusResponder::result(const LLSD &pContent)
void NavMeshStatusResponder::errorWithContent(U32 pStatus, const std::string& pReason, const LLSD& pContent)
{
- llwarns << "NavMeshStatusResponder error [status:" << pStatus << "]: " << pContent << llendl;
+ LL_WARNS() << "NavMeshStatusResponder error [status:" << pStatus << "]: " << pContent << LL_ENDL;
LLPathfindingNavMeshStatus navMeshStatus(mRegionUUID);
LLPathfindingManager::getInstance()->handleNavMeshStatusRequest(navMeshStatus, mRegion, mIsGetStatusOnly);
}
@@ -859,7 +859,7 @@ void AgentStateResponder::result(const LLSD &pContent)
void AgentStateResponder::errorWithContent(U32 pStatus, const std::string &pReason, const LLSD& pContent)
{
- llwarns << "AgentStateResponder error [status:" << pStatus << "]: " << pContent << llendl;
+ LL_WARNS() << "AgentStateResponder error [status:" << pStatus << "]: " << pContent << LL_ENDL;
LLPathfindingManager::getInstance()->handleAgentState(FALSE);
}
@@ -885,7 +885,7 @@ void NavMeshRebakeResponder::result(const LLSD &pContent)
void NavMeshRebakeResponder::errorWithContent(U32 pStatus, const std::string &pReason, const LLSD& pContent)
{
- llwarns << "NavMeshRebakeResponder error [status:" << pStatus << "]: " << pContent << llendl;
+ LL_WARNS() << "NavMeshRebakeResponder error [status:" << pStatus << "]: " << pContent << LL_ENDL;
mRebakeNavMeshCallback(false);
}
@@ -921,8 +921,8 @@ void LinksetsResponder::handleObjectLinksetsResult(const LLSD &pContent)
void LinksetsResponder::handleObjectLinksetsError(U32 pStatus, const std::string &pReason,
const LLSD& pContent, const std::string &pURL)
{
- llwarns << "LinksetsResponder object linksets error with request to URL '" << pURL << "' [status:"
- << pStatus << "]: " << pContent << llendl;
+ LL_WARNS() << "LinksetsResponder object linksets error with request to URL '" << pURL << "' [status:"
+ << pStatus << "]: " << pContent << LL_ENDL;
mObjectMessagingState = kReceivedError;
if (mTerrainMessagingState != kWaiting)
{
@@ -944,8 +944,8 @@ void LinksetsResponder::handleTerrainLinksetsResult(const LLSD &pContent)
void LinksetsResponder::handleTerrainLinksetsError(U32 pStatus, const std::string &pReason,
const LLSD& pContent, const std::string &pURL)
{
- llwarns << "LinksetsResponder terrain linksets error with request to URL '" << pURL << "' [status:"
- << pStatus << "]: " << pContent << llendl;
+ LL_WARNS() << "LinksetsResponder terrain linksets error with request to URL '" << pURL << "' [status:"
+ << pStatus << "]: " << pContent << LL_ENDL;
mTerrainMessagingState = kReceivedError;
if (mObjectMessagingState != kWaiting)
{
@@ -1049,7 +1049,7 @@ void CharactersResponder::result(const LLSD &pContent)
void CharactersResponder::errorWithContent(U32 pStatus, const std::string &pReason, const LLSD& pContent)
{
- llwarns << "CharactersResponder error [status:" << pStatus << "]: " << pContent << llendl;
+ LL_WARNS() << "CharactersResponder error [status:" << pStatus << "]: " << pContent << LL_ENDL;
LLPathfindingObjectListPtr characterListPtr = LLPathfindingObjectListPtr(new LLPathfindingCharacterList());
mCharactersCallback(mRequestId, LLPathfindingManager::kRequestError, characterListPtr);
diff --git a/indra/newview/llpathfindingnavmesh.cpp b/indra/newview/llpathfindingnavmesh.cpp
index 0c23e5ac92..40f5d8c23e 100755
--- a/indra/newview/llpathfindingnavmesh.cpp
+++ b/indra/newview/llpathfindingnavmesh.cpp
@@ -129,7 +129,7 @@ void LLPathfindingNavMesh::handleNavMeshResult(const LLSD &pContent, U32 pNavMes
llassert(embeddedNavMeshVersion == pNavMeshVersion); // stinson 03/13/2012 : does this ever occur?
if (embeddedNavMeshVersion != pNavMeshVersion)
{
- llwarns << "Mismatch between expected and embedded navmesh versions occurred" << llendl;
+ LL_WARNS() << "Mismatch between expected and embedded navmesh versions occurred" << LL_ENDL;
pNavMeshVersion = embeddedNavMeshVersion;
}
}
@@ -148,7 +148,7 @@ void LLPathfindingNavMesh::handleNavMeshResult(const LLSD &pContent, U32 pNavMes
U8* pUncompressedNavMeshContainer = unzip_llsdNavMesh( valid, decompBinSize, streamdecomp, binSize ) ;
if ( !valid )
{
- llwarns << "Unable to decompress the navmesh llsd." << llendl;
+ LL_WARNS() << "Unable to decompress the navmesh llsd." << LL_ENDL;
status = kNavMeshRequestError;
}
else
@@ -165,7 +165,7 @@ void LLPathfindingNavMesh::handleNavMeshResult(const LLSD &pContent, U32 pNavMes
}
else
{
- llwarns << "No mesh data received" << llendl;
+ LL_WARNS() << "No mesh data received" << LL_ENDL;
status = kNavMeshRequestError;
}
setRequestStatus(status);
@@ -186,8 +186,8 @@ void LLPathfindingNavMesh::handleNavMeshError()
void LLPathfindingNavMesh::handleNavMeshError(U32 pStatus, const std::string &pReason, const LLSD& pContent, const std::string &pURL, U32 pNavMeshVersion)
{
- llwarns << "LLPathfindingNavMesh error with request to URL '" << pURL << "' [status:"
- << pStatus << "]: " << pContent << llendl;
+ LL_WARNS() << "LLPathfindingNavMesh error with request to URL '" << pURL << "' [status:"
+ << pStatus << "]: " << pContent << LL_ENDL;
if (mNavMeshStatus.getVersion() == pNavMeshVersion)
{
handleNavMeshError();
diff --git a/indra/newview/llpersistentnotificationstorage.cpp b/indra/newview/llpersistentnotificationstorage.cpp
index 4f7d071d66..8658921dc4 100755
--- a/indra/newview/llpersistentnotificationstorage.cpp
+++ b/indra/newview/llpersistentnotificationstorage.cpp
@@ -47,11 +47,11 @@ LLPersistentNotificationStorage::~LLPersistentNotificationStorage()
{
}
-static LLFastTimer::DeclareTimer FTM_SAVE_NOTIFICATIONS("Save Notifications");
+static LLTrace::BlockTimerStatHandle FTM_SAVE_NOTIFICATIONS("Save Notifications");
void LLPersistentNotificationStorage::saveNotifications()
{
- LLFastTimer _(FTM_SAVE_NOTIFICATIONS);
+ LL_RECORD_BLOCK_TIME(FTM_SAVE_NOTIFICATIONS);
boost::intrusive_ptr<LLPersistentNotificationChannel> history_channel = boost::dynamic_pointer_cast<LLPersistentNotificationChannel>(LLNotifications::instance().getChannel("Persistent"));
if (!history_channel)
@@ -79,9 +79,9 @@ void LLPersistentNotificationStorage::saveNotifications()
data.append(notification->asLLSD(true));
if (data.size() >= gSavedSettings.getS32("MaxPersistentNotifications"))
{
- llwarns << "Too many persistent notifications."
+ LL_WARNS() << "Too many persistent notifications."
<< " Saved " << gSavedSettings.getS32("MaxPersistentNotifications") << " of " << history_channel->size()
- << " persistent notifications." << llendl;
+ << " persistent notifications." << LL_ENDL;
break;
}
@@ -90,11 +90,11 @@ void LLPersistentNotificationStorage::saveNotifications()
writeNotifications(output);
}
-static LLFastTimer::DeclareTimer FTM_LOAD_NOTIFICATIONS("Load Notifications");
+static LLTrace::BlockTimerStatHandle FTM_LOAD_NOTIFICATIONS("Load Notifications");
void LLPersistentNotificationStorage::loadNotifications()
{
- LLFastTimer _(FTM_LOAD_NOTIFICATIONS);
+ LL_RECORD_BLOCK_TIME(FTM_LOAD_NOTIFICATIONS);
LL_INFOS("LLPersistentNotificationStorage") << "start loading notifications" << LL_ENDL;
@@ -146,8 +146,8 @@ void LLPersistentNotificationStorage::loadNotifications()
++processed_notifications;
if (processed_notifications >= gSavedSettings.getS32("MaxPersistentNotifications"))
{
- llwarns << "Too many persistent notifications."
- << " Processed " << gSavedSettings.getS32("MaxPersistentNotifications") << " of " << data.size() << " persistent notifications." << llendl;
+ LL_WARNS() << "Too many persistent notifications."
+ << " Processed " << gSavedSettings.getS32("MaxPersistentNotifications") << " of " << data.size() << " persistent notifications." << LL_ENDL;
break;
}
}
diff --git a/indra/newview/llphysicsmotion.cpp b/indra/newview/llphysicsmotion.cpp
index 18b85cc9c3..05ef436bd9 100755
--- a/indra/newview/llphysicsmotion.cpp
+++ b/indra/newview/llphysicsmotion.cpp
@@ -224,7 +224,7 @@ BOOL LLPhysicsMotion::initialize()
mParamDriver = (LLViewerVisualParam*)mCharacter->getVisualParam(mParamDriverName.c_str());
if (mParamDriver == NULL)
{
- llinfos << "Failure reading in [ " << mParamDriverName << " ]" << llendl;
+ LL_INFOS() << "Failure reading in [ " << mParamDriverName << " ]" << LL_ENDL;
return FALSE;
}
diff --git a/indra/newview/llphysicsshapebuilderutil.h b/indra/newview/llphysicsshapebuilderutil.h
index 7dedfb05e2..bd5b7d799c 100755
--- a/indra/newview/llphysicsshapebuilderutil.h
+++ b/indra/newview/llphysicsshapebuilderutil.h
@@ -41,6 +41,8 @@
#define SHAPE_BUILDER_IMPLICIT_THRESHOLD_TWIST 0.09f
#define SHAPE_BUILDER_IMPLICIT_THRESHOLD_SHEAR 0.05f
+const F32 COLLISION_TOLERANCE = 0.1f;
+
const F32 SHAPE_BUILDER_ENTRY_SNAP_SCALE_BIN_SIZE = 0.15f;
const F32 SHAPE_BUILDER_ENTRY_SNAP_PARAMETER_BIN_SIZE = 0.010f;
const F32 SHAPE_BUILDER_CONVEXIFICATION_SIZE = 2.f * COLLISION_TOLERANCE;
diff --git a/indra/newview/llplacesfolderview.cpp b/indra/newview/llplacesfolderview.cpp
index 3caa93ae71..9e1b75b7e9 100755
--- a/indra/newview/llplacesfolderview.cpp
+++ b/indra/newview/llplacesfolderview.cpp
@@ -59,7 +59,7 @@ BOOL LLPlacesFolderView::handleRightMouseDown(S32 x, S32 y, MASK mask)
}
else
{
- llwarns << "Requested menu handle for non-setup inventory type: " << inventory_type << llendl;
+ LL_WARNS() << "Requested menu handle for non-setup inventory type: " << inventory_type << LL_ENDL;
}
}
diff --git a/indra/newview/llplacesinventorybridge.cpp b/indra/newview/llplacesinventorybridge.cpp
index ebd9604c5b..a498d27d2b 100755
--- a/indra/newview/llplacesinventorybridge.cpp
+++ b/indra/newview/llplacesinventorybridge.cpp
@@ -162,7 +162,7 @@ LLInvFVBridge* LLPlacesInventoryBridgeBuilder::createBridge(
case LLAssetType::AT_LANDMARK:
if(!(inv_type == LLInventoryType::IT_LANDMARK))
{
- llwarns << LLAssetType::lookup(asset_type) << " asset has inventory type " << LLInventoryType::lookupHumanReadable(inv_type) << " on uuid " << uuid << llendl;
+ LL_WARNS() << LLAssetType::lookup(asset_type) << " asset has inventory type " << LLInventoryType::lookupHumanReadable(inv_type) << " on uuid " << uuid << LL_ENDL;
}
new_listener = new LLPlacesLandmarkBridge(inv_type, inventory, root, uuid, flags);
break;
diff --git a/indra/newview/llpostcard.cpp b/indra/newview/llpostcard.cpp
index aebe636f59..649bb2fb2c 100755
--- a/indra/newview/llpostcard.cpp
+++ b/indra/newview/llpostcard.cpp
@@ -48,7 +48,7 @@ static void postcard_upload_callback(const LLUUID& asset_id, void *user_data, S3
if (result)
{
// TODO: display the error messages in UI
- llwarns << "Failed to send postcard: " << LLAssetStorage::getErrorString(result) << llendl;
+ LL_WARNS() << "Failed to send postcard: " << LLAssetStorage::getErrorString(result) << LL_ENDL;
LLPostCard::reportPostResult(false);
}
else
@@ -97,14 +97,14 @@ public:
/*virtual*/ void uploadComplete(const LLSD& content)
{
- llinfos << "Postcard sent" << llendl;
- LL_DEBUGS("Snapshots") << "content: " << content << llendl;
+ LL_INFOS() << "Postcard sent" << LL_ENDL;
+ LL_DEBUGS("Snapshots") << "content: " << content << LL_ENDL;
LLPostCard::reportPostResult(true);
}
/*virtual*/ void uploadFailure(const LLSD& content)
{
- llwarns << "Sending postcard failed: " << content << llendl;
+ LL_WARNS() << "Sending postcard failed: " << content << LL_ENDL;
LLPostCard::reportPostResult(false);
}
};
@@ -128,17 +128,17 @@ void LLPostCard::send(LLPointer<LLImageFormatted> image, const LLSD& postcard_da
std::string url = gAgent.getRegion()->getCapability("SendPostcard");
if (!url.empty())
{
- llinfos << "Sending postcard via capability" << llendl;
+ LL_INFOS() << "Sending postcard via capability" << LL_ENDL;
// the capability already encodes: agent ID, region ID
- LL_DEBUGS("Snapshots") << "url: " << url << llendl;
- LL_DEBUGS("Snapshots") << "body: " << postcard_data << llendl;
- LL_DEBUGS("Snapshots") << "data size: " << image->getDataSize() << llendl;
+ LL_DEBUGS("Snapshots") << "url: " << url << LL_ENDL;
+ LL_DEBUGS("Snapshots") << "body: " << postcard_data << LL_ENDL;
+ LL_DEBUGS("Snapshots") << "data size: " << image->getDataSize() << LL_ENDL;
LLHTTPClient::post(url, postcard_data,
new LLPostcardSendResponder(postcard_data, asset_id, LLAssetType::AT_IMAGE_JPEG));
}
else
{
- llinfos << "Sending postcard" << llendl;
+ LL_INFOS() << "Sending postcard" << LL_ENDL;
LLSD* data = new LLSD(postcard_data);
(*data)["asset-id"] = asset_id;
gAssetStorage->storeAssetData(transaction_id, LLAssetType::AT_IMAGE_JPEG,
diff --git a/indra/newview/llpreview.cpp b/indra/newview/llpreview.cpp
index 04934b13f1..b379ef7bdb 100755
--- a/indra/newview/llpreview.cpp
+++ b/indra/newview/llpreview.cpp
@@ -25,7 +25,6 @@
*/
#include "llviewerprecompiledheaders.h"
-#include "stdenums.h"
#include "llpreview.h"
@@ -135,10 +134,10 @@ void LLPreview::onCommit()
if (!item->isFinished())
{
// We are attempting to save an item that was never loaded
- llwarns << "LLPreview::onCommit() called with mIsComplete == FALSE"
+ LL_WARNS() << "LLPreview::onCommit() called with mIsComplete == FALSE"
<< " Type: " << item->getType()
<< " ID: " << item->getUUID()
- << llendl;
+ << LL_ENDL;
return;
}
diff --git a/indra/newview/llpreviewgesture.cpp b/indra/newview/llpreviewgesture.cpp
index f47928b131..c378738b05 100755
--- a/indra/newview/llpreviewgesture.cpp
+++ b/indra/newview/llpreviewgesture.cpp
@@ -253,7 +253,7 @@ void LLPreviewGesture::onUpdateSucceeded()
refresh();
}
-void LLPreviewGesture::onVisibilityChange ( const LLSD& new_visibility )
+void LLPreviewGesture::onVisibilityChanged ( const LLSD& new_visibility )
{
if (new_visibility.asBoolean())
{
@@ -333,7 +333,7 @@ LLPreviewGesture::~LLPreviewGesture()
BOOL LLPreviewGesture::postBuild()
{
- setVisibleCallback(boost::bind(&LLPreviewGesture::onVisibilityChange, this, _2));
+ setVisibleCallback(boost::bind(&LLPreviewGesture::onVisibilityChanged, this, _2));
LLLineEditor* edit;
LLComboBox* combo;
@@ -546,10 +546,10 @@ void LLPreviewGesture::addAnimations()
// Copy into something we can sort
std::vector<LLInventoryItem*> animations;
- S32 count = items.count();
+ S32 count = items.size();
for(i = 0; i < count; ++i)
{
- animations.push_back( items.get(i) );
+ animations.push_back( items.at(i) );
}
// Do the sort
@@ -592,10 +592,10 @@ void LLPreviewGesture::addSounds()
std::vector<LLInventoryItem*> sounds;
S32 i;
- S32 count = items.count();
+ S32 count = items.size();
for(i = 0; i < count; ++i)
{
- sounds.push_back( items.get(i) );
+ sounds.push_back( items.at(i) );
}
// Do the sort
@@ -873,7 +873,7 @@ void LLPreviewGesture::onLoadComplete(LLVFS *vfs,
}
else
{
- llwarns << "Unable to load gesture" << llendl;
+ LL_WARNS() << "Unable to load gesture" << LL_ENDL;
}
delete gesture;
@@ -883,8 +883,6 @@ void LLPreviewGesture::onLoadComplete(LLVFS *vfs,
}
else
{
- LLViewerStats::getInstance()->incStat( LLViewerStats::ST_DOWNLOAD_FAILED );
-
if( LL_ERR_ASSET_REQUEST_NOT_IN_DATABASE == status ||
LL_ERR_FILE_EMPTY == status)
{
@@ -895,7 +893,7 @@ void LLPreviewGesture::onLoadComplete(LLVFS *vfs,
LLDelayedGestureError::gestureFailedToLoad( *item_idp );
}
- llwarns << "Problem loading gesture: " << status << llendl;
+ LL_WARNS() << "Problem loading gesture: " << status << LL_ENDL;
self->mAssetStatus = PREVIEW_ASSET_ERROR;
}
}
@@ -1021,7 +1019,7 @@ void LLPreviewGesture::saveIfNeeded()
{
if (!gAssetStorage)
{
- llwarns << "Can't save gesture, no asset storage system." << llendl;
+ LL_WARNS() << "Can't save gesture, no asset storage system." << LL_ENDL;
return;
}
@@ -1168,8 +1166,8 @@ void LLPreviewGesture::onSaveComplete(const LLUUID& asset_uuid, void* user_data,
}
else
{
- llwarns << "Inventory item for gesture " << info->mItemUUID
- << " is no longer in agent inventory." << llendl;
+ LL_WARNS() << "Inventory item for gesture " << info->mItemUUID
+ << " is no longer in agent inventory." << LL_ENDL;
}
}
else
@@ -1204,7 +1202,7 @@ void LLPreviewGesture::onSaveComplete(const LLUUID& asset_uuid, void* user_data,
}
else
{
- llwarns << "Problem saving gesture: " << status << llendl;
+ LL_WARNS() << "Problem saving gesture: " << status << LL_ENDL;
LLSD args;
args["REASON"] = std::string(LLAssetStorage::getErrorString(status));
LLNotificationsUtil::add("GestureSaveFailedReason", args);
@@ -1535,7 +1533,7 @@ void LLPreviewGesture::onClickAdd(void* data)
if( library_item_index >= STEP_EOF )
{
- llerrs << "Unknown step type: " << library_text << llendl;
+ LL_ERRS() << "Unknown step type: " << library_text << LL_ENDL;
return;
}
@@ -1565,7 +1563,7 @@ LLScrollListItem* LLPreviewGesture::addStep( const EStepType step_type )
step = new LLGestureStepWait();
break;
default:
- llerrs << "Unknown step type: " << (S32)step_type << llendl;
+ LL_ERRS() << "Unknown step type: " << (S32)step_type << LL_ENDL;
return NULL;
}
diff --git a/indra/newview/llpreviewgesture.h b/indra/newview/llpreviewgesture.h
index fd4fcf9d8f..7ce5706a0d 100755
--- a/indra/newview/llpreviewgesture.h
+++ b/indra/newview/llpreviewgesture.h
@@ -102,7 +102,7 @@ protected:
// "Sound", "Chat", or "Wait"
LLScrollListItem* addStep(const enum EStepType step_type);
- void onVisibilityChange ( const LLSD& new_visibility );
+ void onVisibilityChanged ( const LLSD& new_visibility );
static std::string getLabel(std::vector<std::string> labels);
static void updateLabel(LLScrollListItem* item);
diff --git a/indra/newview/llpreviewnotecard.cpp b/indra/newview/llpreviewnotecard.cpp
index 3a9360fd23..c4858e241e 100755
--- a/indra/newview/llpreviewnotecard.cpp
+++ b/indra/newview/llpreviewnotecard.cpp
@@ -185,7 +185,7 @@ void LLPreviewNotecard::refreshFromInventory(const LLUUID& new_item_id)
mItemUUID = new_item_id;
setKey(LLSD(new_item_id));
}
- lldebugs << "LLPreviewNotecard::refreshFromInventory()" << llendl;
+ LL_DEBUGS() << "LLPreviewNotecard::refreshFromInventory()" << LL_ENDL;
loadAsset();
}
@@ -240,7 +240,7 @@ void LLPreviewNotecard::loadAsset()
else
{
// The object that we're trying to look at disappeared, bail.
- llwarns << "Can't find object " << mObjectUUID << " associated with notecard." << llendl;
+ LL_WARNS() << "Can't find object " << mObjectUUID << " associated with notecard." << LL_ENDL;
mAssetID.setNull();
editor->setText(getString("no_object"));
editor->makePristine();
@@ -295,7 +295,7 @@ void LLPreviewNotecard::onLoadComplete(LLVFS *vfs,
LLAssetType::EType type,
void* user_data, S32 status, LLExtStat ext_status)
{
- llinfos << "LLPreviewNotecard::onLoadComplete()" << llendl;
+ LL_INFOS() << "LLPreviewNotecard::onLoadComplete()" << LL_ENDL;
LLUUID* item_id = (LLUUID*)user_data;
LLPreviewNotecard* preview = LLFloaterReg::findTypedInstance<LLPreviewNotecard>("preview_notecard", LLSD(*item_id));
@@ -320,7 +320,7 @@ void LLPreviewNotecard::onLoadComplete(LLVFS *vfs,
{
if( !previewEditor->importBuffer( &buffer[0], file_length+1 ) )
{
- llwarns << "Problem importing notecard" << llendl;
+ LL_WARNS() << "Problem importing notecard" << LL_ENDL;
}
}
else
@@ -339,8 +339,6 @@ void LLPreviewNotecard::onLoadComplete(LLVFS *vfs,
}
else
{
- LLViewerStats::getInstance()->incStat( LLViewerStats::ST_DOWNLOAD_FAILED );
-
if( LL_ERR_ASSET_REQUEST_NOT_IN_DATABASE == status ||
LL_ERR_FILE_EMPTY == status)
{
@@ -355,7 +353,7 @@ void LLPreviewNotecard::onLoadComplete(LLVFS *vfs,
LLNotificationsUtil::add("UnableToLoadNotecard");
}
- llwarns << "Problem loading notecard: " << status << llendl;
+ LL_WARNS() << "Problem loading notecard: " << status << LL_ENDL;
preview->mAssetStatus = PREVIEW_ASSET_ERROR;
}
}
@@ -365,7 +363,7 @@ void LLPreviewNotecard::onLoadComplete(LLVFS *vfs,
// static
void LLPreviewNotecard::onClickSave(void* user_data)
{
- //llinfos << "LLPreviewNotecard::onBtnSave()" << llendl;
+ //LL_INFOS() << "LLPreviewNotecard::onBtnSave()" << LL_ENDL;
LLPreviewNotecard* preview = (LLPreviewNotecard*)user_data;
if(preview)
{
@@ -404,7 +402,7 @@ bool LLPreviewNotecard::saveIfNeeded(LLInventoryItem* copyitem)
if(!editor)
{
- llwarns << "Cannot get handle to the notecard editor." << llendl;
+ LL_WARNS() << "Cannot get handle to the notecard editor." << LL_ENDL;
return false;
}
@@ -437,7 +435,7 @@ bool LLPreviewNotecard::saveIfNeeded(LLInventoryItem* copyitem)
const LLViewerRegion* region = gAgent.getRegion();
if (!region)
{
- llwarns << "Not connected to a region, cannot save notecard." << llendl;
+ LL_WARNS() << "Not connected to a region, cannot save notecard." << LL_ENDL;
return false;
}
std::string agent_url = region->getCapability("UpdateNotecardAgentInventory");
@@ -450,8 +448,8 @@ bool LLPreviewNotecard::saveIfNeeded(LLInventoryItem* copyitem)
setEnabled(FALSE);
LLSD body;
body["item_id"] = mItemUUID;
- llinfos << "Saving notecard " << mItemUUID
- << " into agent inventory via " << agent_url << llendl;
+ LL_INFOS() << "Saving notecard " << mItemUUID
+ << " into agent inventory via " << agent_url << LL_ENDL;
LLHTTPClient::post(agent_url, body,
new LLUpdateAgentInventoryResponder(body, asset_id, LLAssetType::AT_NOTECARD));
}
@@ -463,8 +461,8 @@ bool LLPreviewNotecard::saveIfNeeded(LLInventoryItem* copyitem)
LLSD body;
body["task_id"] = mObjectUUID;
body["item_id"] = mItemUUID;
- llinfos << "Saving notecard " << mItemUUID << " into task "
- << mObjectUUID << " via " << task_url << llendl;
+ LL_INFOS() << "Saving notecard " << mItemUUID << " into task "
+ << mObjectUUID << " via " << task_url << LL_ENDL;
LLHTTPClient::post(task_url, body,
new LLUpdateTaskInventoryResponder(body, asset_id, LLAssetType::AT_NOTECARD));
}
@@ -479,7 +477,7 @@ bool LLPreviewNotecard::saveIfNeeded(LLInventoryItem* copyitem)
}
else // !gAssetStorage
{
- llwarns << "Not connected to an asset storage system." << llendl;
+ LL_WARNS() << "Not connected to an asset storage system." << LL_ENDL;
return false;
}
}
@@ -520,8 +518,8 @@ void LLPreviewNotecard::onSaveComplete(const LLUUID& asset_uuid, void* user_data
}
else
{
- llwarns << "Inventory item for script " << info->mItemUUID
- << " is no longer in agent inventory." << llendl;
+ LL_WARNS() << "Inventory item for script " << info->mItemUUID
+ << " is no longer in agent inventory." << LL_ENDL;
}
}
else
@@ -564,7 +562,7 @@ void LLPreviewNotecard::onSaveComplete(const LLUUID& asset_uuid, void* user_data
}
else
{
- llwarns << "Problem saving notecard: " << status << llendl;
+ LL_WARNS() << "Problem saving notecard: " << status << LL_ENDL;
LLSD args;
args["REASON"] = std::string(LLAssetStorage::getErrorString(status));
LLNotificationsUtil::add("SaveNotecardFailReason", args);
diff --git a/indra/newview/llpreviewscript.cpp b/indra/newview/llpreviewscript.cpp
index e533be7f24..870304a7b8 100755
--- a/indra/newview/llpreviewscript.cpp
+++ b/indra/newview/llpreviewscript.cpp
@@ -552,14 +552,14 @@ bool LLScriptEdCore::loadScriptText(const std::string& filename)
{
if (filename.empty())
{
- llwarns << "Empty file name" << llendl;
+ LL_WARNS() << "Empty file name" << LL_ENDL;
return false;
}
LLFILE* file = LLFile::fopen(filename, "rb"); /*Flawfinder: ignore*/
if (!file)
{
- llwarns << "Error opening " << filename << llendl;
+ LL_WARNS() << "Error opening " << filename << LL_ENDL;
return false;
}
@@ -571,7 +571,7 @@ bool LLScriptEdCore::loadScriptText(const std::string& filename)
size_t nread = fread(buffer, 1, file_length, file);
if (nread < file_length)
{
- llwarns << "Short read" << llendl;
+ LL_WARNS() << "Short read" << LL_ENDL;
}
buffer[nread] = '\0';
fclose(file);
@@ -587,7 +587,7 @@ bool LLScriptEdCore::writeToFile(const std::string& filename)
LLFILE* fp = LLFile::fopen(filename, "wb");
if (!fp)
{
- llwarns << "Unable to write to " << filename << llendl;
+ LL_WARNS() << "Unable to write to " << filename << LL_ENDL;
LLSD row;
row["columns"][0]["value"] = "Error writing to local file. Is your hard drive full?";
@@ -967,7 +967,7 @@ void LLScriptEdCore::onBtnInsertFunction(LLUICtrl *ui, void* userdata)
void LLScriptEdCore::doSave( BOOL close_after_save )
{
- LLViewerStats::getInstance()->incStat( LLViewerStats::ST_LSL_SAVE_COUNT );
+ add(LLStatViewer::LSL_SAVES, 1);
if( mSaveCallback )
{
@@ -1042,8 +1042,8 @@ void LLScriptEdCore::onErrorList(LLUICtrl*, void* user_data)
LLStringUtil::replaceChar(line, ',',' ');
LLStringUtil::replaceChar(line, ')',' ');
sscanf(line.c_str(), "%d %d", &row, &column);
- //llinfos << "LLScriptEdCore::onErrorList() - " << row << ", "
- //<< column << llendl;
+ //LL_INFOS() << "LLScriptEdCore::onErrorList() - " << row << ", "
+ //<< column << LL_ENDL;
self->mEditor->setCursor(row, column);
self->mEditor->setFocus(TRUE);
}
@@ -1090,15 +1090,15 @@ struct LLEntryAndEdCore
void LLScriptEdCore::deleteBridges()
{
- S32 count = mBridges.count();
+ S32 count = mBridges.size();
LLEntryAndEdCore* eandc;
for(S32 i = 0; i < count; i++)
{
- eandc = mBridges.get(i);
+ eandc = mBridges.at(i);
delete eandc;
mBridges[i] = NULL;
}
- mBridges.reset();
+ mBridges.clear();
}
// virtual
@@ -1171,8 +1171,7 @@ void LLScriptEdCore::onBtnLoadFromFile( void* data )
void LLScriptEdCore::onBtnSaveToFile( void* userdata )
{
-
- LLViewerStats::getInstance()->incStat( LLViewerStats::ST_LSL_SAVE_COUNT );
+ add(LLStatViewer::LSL_SAVES, 1);
LLScriptEdCore* self = (LLScriptEdCore*) userdata;
@@ -1311,7 +1310,7 @@ BOOL LLPreviewLSL::postBuild()
// virtual
void LLPreviewLSL::callbackLSLCompileSucceeded()
{
- llinfos << "LSL Bytecode saved" << llendl;
+ LL_INFOS() << "LSL Bytecode saved" << LL_ENDL;
mScriptEd->mErrorList->setCommentText(LLTrans::getString("CompileSuccessful"));
mScriptEd->mErrorList->setCommentText(LLTrans::getString("SaveComplete"));
closeIfNeeded();
@@ -1320,7 +1319,7 @@ void LLPreviewLSL::callbackLSLCompileSucceeded()
// virtual
void LLPreviewLSL::callbackLSLCompileFailed(const LLSD& compile_errors)
{
- llinfos << "Compile failed!" << llendl;
+ LL_INFOS() << "Compile failed!" << LL_ENDL;
for(LLSD::array_const_iterator line = compile_errors.beginArray();
line < compile_errors.endArray();
@@ -1435,7 +1434,7 @@ void LLPreviewLSL::onSave(void* userdata, BOOL close_after_save)
// fails, go ahead and save the text anyway.
void LLPreviewLSL::saveIfNeeded(bool sync /*= true*/)
{
- // llinfos << "LLPreviewLSL::saveIfNeeded()" << llendl;
+ // LL_INFOS() << "LLPreviewLSL::saveIfNeeded()" << LL_ENDL;
if(!mScriptEd->hasChanged())
{
return;
@@ -1481,7 +1480,7 @@ void LLPreviewLSL::uploadAssetViaCaps(const std::string& url,
const std::string& filename,
const LLUUID& item_id)
{
- llinfos << "Update Agent Inventory via capability" << llendl;
+ LL_INFOS() << "Update Agent Inventory via capability" << LL_ENDL;
LLSD body;
body["item_id"] = item_id;
body["target"] = "lsl2";
@@ -1514,7 +1513,7 @@ void LLPreviewLSL::uploadAssetLegacy(const std::string& filename,
asset_id.asString().c_str(),
gAgent.isGodlike()))
{
- llinfos << "Compile failed!" << llendl;
+ LL_INFOS() << "Compile failed!" << LL_ENDL;
//char command[256];
//sprintf(command, "type %s\n", err_filename.c_str());
//system(command);
@@ -1552,7 +1551,7 @@ void LLPreviewLSL::uploadAssetLegacy(const std::string& filename,
}
else
{
- llinfos << "Compile worked!" << llendl;
+ LL_INFOS() << "Compile worked!" << LL_ENDL;
if(gAssetStorage)
{
getWindow()->incBusyCount();
@@ -1594,8 +1593,8 @@ void LLPreviewLSL::onSaveComplete(const LLUUID& asset_uuid, void* user_data, S32
}
else
{
- llwarns << "Inventory item for script " << info->mItemUUID
- << " is no longer in agent inventory." << llendl;
+ LL_WARNS() << "Inventory item for script " << info->mItemUUID
+ << " is no longer in agent inventory." << LL_ENDL;
}
// Find our window and close it if requested.
@@ -1614,7 +1613,7 @@ void LLPreviewLSL::onSaveComplete(const LLUUID& asset_uuid, void* user_data, S32
}
else
{
- llwarns << "Problem saving script: " << status << llendl;
+ LL_WARNS() << "Problem saving script: " << status << LL_ENDL;
LLSD args;
args["REASON"] = std::string(LLAssetStorage::getErrorString(status));
LLNotificationsUtil::add("SaveScriptFailReason", args);
@@ -1652,7 +1651,7 @@ void LLPreviewLSL::onSaveBytecodeComplete(const LLUUID& asset_uuid, void* user_d
}
else
{
- llwarns << "Problem saving LSL Bytecode (Preview)" << llendl;
+ LL_WARNS() << "Problem saving LSL Bytecode (Preview)" << LL_ENDL;
LLSD args;
args["REASON"] = std::string(LLAssetStorage::getErrorString(status));
LLNotificationsUtil::add("SaveBytecodeFailReason", args);
@@ -1664,8 +1663,8 @@ void LLPreviewLSL::onSaveBytecodeComplete(const LLUUID& asset_uuid, void* user_d
void LLPreviewLSL::onLoadComplete( LLVFS *vfs, const LLUUID& asset_uuid, LLAssetType::EType type,
void* user_data, S32 status, LLExtStat ext_status)
{
- lldebugs << "LLPreviewLSL::onLoadComplete: got uuid " << asset_uuid
- << llendl;
+ LL_DEBUGS() << "LLPreviewLSL::onLoadComplete: got uuid " << asset_uuid
+ << LL_ENDL;
LLUUID* item_uuid = (LLUUID*)user_data;
LLPreviewLSL* preview = LLFloaterReg::findTypedInstance<LLPreviewLSL>("preview_script", *item_uuid);
if( preview )
@@ -1695,8 +1694,6 @@ void LLPreviewLSL::onLoadComplete( LLVFS *vfs, const LLUUID& asset_uuid, LLAsset
}
else
{
- LLViewerStats::getInstance()->incStat( LLViewerStats::ST_DOWNLOAD_FAILED );
-
if( LL_ERR_ASSET_REQUEST_NOT_IN_DATABASE == status ||
LL_ERR_FILE_EMPTY == status)
{
@@ -1712,7 +1709,7 @@ void LLPreviewLSL::onLoadComplete( LLVFS *vfs, const LLUUID& asset_uuid, LLAsset
}
preview->mAssetStatus = PREVIEW_ASSET_ERROR;
- llwarns << "Problem loading script: " << status << llendl;
+ LL_WARNS() << "Problem loading script: " << status << LL_ENDL;
}
}
delete item_uuid;
@@ -1779,7 +1776,7 @@ void LLLiveLSLEditor::callbackLSLCompileSucceeded(const LLUUID& task_id,
const LLUUID& item_id,
bool is_script_running)
{
- lldebugs << "LSL Bytecode saved" << llendl;
+ LL_DEBUGS() << "LSL Bytecode saved" << LL_ENDL;
mScriptEd->mErrorList->setCommentText(LLTrans::getString("CompileSuccessful"));
mScriptEd->mErrorList->setCommentText(LLTrans::getString("SaveComplete"));
closeIfNeeded();
@@ -1788,7 +1785,7 @@ void LLLiveLSLEditor::callbackLSLCompileSucceeded(const LLUUID& task_id,
// virtual
void LLLiveLSLEditor::callbackLSLCompileFailed(const LLSD& compile_errors)
{
- lldebugs << "Compile failed!" << llendl;
+ LL_DEBUGS() << "Compile failed!" << LL_ENDL;
for(LLSD::array_const_iterator line = compile_errors.beginArray();
line < compile_errors.endArray();
line++)
@@ -1807,7 +1804,7 @@ void LLLiveLSLEditor::callbackLSLCompileFailed(const LLSD& compile_errors)
void LLLiveLSLEditor::loadAsset()
{
- //llinfos << "LLLiveLSLEditor::loadAsset()" << llendl;
+ //LL_INFOS() << "LLLiveLSLEditor::loadAsset()" << LL_ENDL;
if(!mIsNew)
{
LLViewerObject* object = gObjectList.findObject(mObjectUUID);
@@ -1819,7 +1816,7 @@ void LLLiveLSLEditor::loadAsset()
|| gAgent.isGodlike()))
{
mItem = new LLViewerInventoryItem(item);
- //llinfos << "asset id " << mItem->getAssetUUID() << llendl;
+ //LL_INFOS() << "asset id " << mItem->getAssetUUID() << LL_ENDL;
}
if(!gAgent.isGodlike()
@@ -1911,8 +1908,8 @@ void LLLiveLSLEditor::onLoadComplete(LLVFS *vfs, const LLUUID& asset_id,
LLAssetType::EType type,
void* user_data, S32 status, LLExtStat ext_status)
{
- lldebugs << "LLLiveLSLEditor::onLoadComplete: got uuid " << asset_id
- << llendl;
+ LL_DEBUGS() << "LLLiveLSLEditor::onLoadComplete: got uuid " << asset_id
+ << LL_ENDL;
LLUUID* xored_id = (LLUUID*)user_data;
LLLiveLSLEditor* instance = LLFloaterReg::findTypedInstance<LLLiveLSLEditor>("preview_scriptedit", *xored_id);
@@ -1927,8 +1924,6 @@ void LLLiveLSLEditor::onLoadComplete(LLVFS *vfs, const LLUUID& asset_id,
}
else
{
- LLViewerStats::getInstance()->incStat( LLViewerStats::ST_DOWNLOAD_FAILED );
-
if( LL_ERR_ASSET_REQUEST_NOT_IN_DATABASE == status ||
LL_ERR_FILE_EMPTY == status)
{
@@ -1959,7 +1954,7 @@ void LLLiveLSLEditor::loadScriptText(LLVFS *vfs, const LLUUID &uuid, LLAssetType
if (file.getLastBytesRead() != file_length ||
file_length <= 0)
{
- llwarns << "Error reading " << uuid << ":" << type << llendl;
+ LL_WARNS() << "Error reading " << uuid << ":" << type << LL_ENDL;
}
buffer[file_length] = '\0';
@@ -2182,7 +2177,7 @@ void LLLiveLSLEditor::uploadAssetViaCaps(const std::string& url,
const LLUUID& item_id,
BOOL is_running)
{
- llinfos << "Update Task Inventory via capability " << url << llendl;
+ LL_INFOS() << "Update Task Inventory via capability " << url << LL_ENDL;
LLSD body;
body["task_id"] = task_id;
body["item_id"] = item_id;
@@ -2221,7 +2216,7 @@ void LLLiveLSLEditor::uploadAssetLegacy(const std::string& filename,
gAgent.isGodlike()))
{
// load the error file into the error scrolllist
- llinfos << "Compile failed!" << llendl;
+ LL_INFOS() << "Compile failed!" << LL_ENDL;
if(NULL != (fp = LLFile::fopen(err_filename, "r")))
{
char buffer[MAX_STRING]; /*Flawfinder: ignore*/
@@ -2259,12 +2254,12 @@ void LLLiveLSLEditor::uploadAssetLegacy(const std::string& filename,
}
else
{
- llinfos << "Compile worked!" << llendl;
+ LL_INFOS() << "Compile worked!" << LL_ENDL;
mScriptEd->mErrorList->setCommentText(LLTrans::getString("CompileSuccessfulSaving"));
if(gAssetStorage)
{
- llinfos << "LLLiveLSLEditor::saveAsset "
- << mItem->getAssetUUID() << llendl;
+ LL_INFOS() << "LLLiveLSLEditor::saveAsset "
+ << mItem->getAssetUUID() << LL_ENDL;
getWindow()->incBusyCount();
mPendingUploads++;
LLLiveLSLSaveData* data = NULL;
@@ -2297,7 +2292,7 @@ void LLLiveLSLEditor::onSaveTextComplete(const LLUUID& asset_uuid, void* user_da
if (status)
{
- llwarns << "Unable to save text for a script." << llendl;
+ LL_WARNS() << "Unable to save text for a script." << LL_ENDL;
LLSD args;
args["REASON"] = std::string(LLAssetStorage::getErrorString(status));
LLNotificationsUtil::add("CompileQueueSaveText", args);
@@ -2328,7 +2323,7 @@ void LLLiveLSLEditor::onSaveBytecodeComplete(const LLUUID& asset_uuid, void* use
return;
if(0 ==status)
{
- llinfos << "LSL Bytecode saved" << llendl;
+ LL_INFOS() << "LSL Bytecode saved" << LL_ENDL;
LLLiveLSLEditor* self = LLFloaterReg::findTypedInstance<LLLiveLSLEditor>("preview_scriptedit", data->mItem->getUUID()); // ^ data->mSaveObjectID
if (self)
{
@@ -2354,8 +2349,8 @@ void LLLiveLSLEditor::onSaveBytecodeComplete(const LLUUID& asset_uuid, void* use
}
else
{
- llinfos << "Problem saving LSL Bytecode (Live Editor)" << llendl;
- llwarns << "Unable to save a compiled script." << llendl;
+ LL_INFOS() << "Problem saving LSL Bytecode (Live Editor)" << LL_ENDL;
+ LL_WARNS() << "Unable to save a compiled script." << LL_ENDL;
LLSD args;
args["REASON"] = std::string(LLAssetStorage::getErrorString(status));
diff --git a/indra/newview/llpreviewscript.h b/indra/newview/llpreviewscript.h
index 9fb0a4fb63..cb53d1df07 100755
--- a/indra/newview/llpreviewscript.h
+++ b/indra/newview/llpreviewscript.h
@@ -27,7 +27,6 @@
#ifndef LL_LLPREVIEWSCRIPT_H
#define LL_LLPREVIEWSCRIPT_H
-#include "lldarray.h"
#include "llpreview.h"
#include "lltabcontainer.h"
#include "llinventory.h"
@@ -141,7 +140,7 @@ private:
BOOL mForceClose;
LLPanel* mCodePanel;
LLScrollListCtrl* mErrorList;
- LLDynamicArray<LLEntryAndEdCore*> mBridges;
+ std::vector<LLEntryAndEdCore*> mBridges;
LLHandle<LLFloater> mLiveHelpHandle;
LLKeywordToken* mLastHelpToken;
LLFrameTimer mLiveHelpTimer;
diff --git a/indra/newview/llproductinforequest.cpp b/indra/newview/llproductinforequest.cpp
index 1390000fc5..e85194d173 100755
--- a/indra/newview/llproductinforequest.cpp
+++ b/indra/newview/llproductinforequest.cpp
@@ -45,8 +45,8 @@ public:
//If we get back an error (not found, etc...), handle it here
virtual void errorWithContent(U32 status, const std::string& reason, const LLSD& content)
{
- llwarns << "LLProductInfoRequest error [status:"
- << status << ":] " << content << llendl;
+ LL_WARNS() << "LLProductInfoRequest error [status:"
+ << status << ":] " << content << LL_ENDL;
}
};
@@ -76,7 +76,7 @@ std::string LLProductInfoRequestManager::getDescriptionForSku(const std::string&
it != mSkuDescriptions.endArray();
++it)
{
- // llwarns << (*it)["sku"].asString() << " = " << (*it)["description"].asString() << llendl;
+ // LL_WARNS() << (*it)["sku"].asString() << " = " << (*it)["description"].asString() << LL_ENDL;
if ((*it)["sku"].asString() == sku)
{
return (*it)["description"].asString();
diff --git a/indra/newview/llregioninfomodel.cpp b/indra/newview/llregioninfomodel.cpp
index 590e246482..25c576468b 100755
--- a/indra/newview/llregioninfomodel.cpp
+++ b/indra/newview/llregioninfomodel.cpp
@@ -192,11 +192,11 @@ void LLRegionInfoModel::sendEstateOwnerMessage(
if (!cur_region)
{
- llwarns << "Agent region not set" << llendl;
+ LL_WARNS() << "Agent region not set" << LL_ENDL;
return;
}
- llinfos << "Sending estate request '" << request << "'" << llendl;
+ LL_INFOS() << "Sending estate request '" << request << "'" << LL_ENDL;
msg->newMessage("EstateOwnerMessage");
msg->nextBlockFast(_PREHASH_AgentData);
msg->addUUIDFast(_PREHASH_AgentID, gAgent.getID());
@@ -217,7 +217,7 @@ void LLRegionInfoModel::sendEstateOwnerMessage(
std::vector<std::string>::const_iterator end = strings.end();
for (unsigned i = 0; it != end; ++it, ++i)
{
- lldebugs << "- [" << i << "] " << (*it) << llendl;
+ LL_DEBUGS() << "- [" << i << "] " << (*it) << LL_ENDL;
msg->nextBlock("ParamList");
msg->addString("Parameter", *it);
}
diff --git a/indra/newview/llremoteparcelrequest.cpp b/indra/newview/llremoteparcelrequest.cpp
index 500dec7ee5..13120fdf45 100755
--- a/indra/newview/llremoteparcelrequest.cpp
+++ b/indra/newview/llremoteparcelrequest.cpp
@@ -64,8 +64,8 @@ void LLRemoteParcelRequestResponder::result(const LLSD& content)
//virtual
void LLRemoteParcelRequestResponder::errorWithContent(U32 status, const std::string& reason, const LLSD& content)
{
- llwarns << "LLRemoteParcelRequest error [status:"
- << status << "]: " << content << llendl;
+ LL_WARNS() << "LLRemoteParcelRequest error [status:"
+ << status << "]: " << content << LL_ENDL;
// Panel inspecting the information may be closed and destroyed
// before this response is received.
diff --git a/indra/newview/llremoteparcelrequest.h b/indra/newview/llremoteparcelrequest.h
index b87056573b..e4b8791f7c 100755
--- a/indra/newview/llremoteparcelrequest.h
+++ b/indra/newview/llremoteparcelrequest.h
@@ -30,7 +30,8 @@
#define LL_LLREMOTEPARCELREQUEST_H
#include "llhttpclient.h"
-#include "llpanel.h"
+#include "llhandle.h"
+#include "llsingleton.h"
class LLMessageSystem;
class LLRemoteParcelInfoObserver;
diff --git a/indra/newview/llscenemonitor.cpp b/indra/newview/llscenemonitor.cpp
new file mode 100644
index 0000000000..7f705e44d2
--- /dev/null
+++ b/indra/newview/llscenemonitor.cpp
@@ -0,0 +1,763 @@
+/**
+ * @file llscenemonitor.cpp
+ * @brief monitor the scene loading process.
+ *
+ * $LicenseInfo:firstyear=2003&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2010, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
+ * $/LicenseInfo$
+ */
+
+#include "llviewerprecompiledheaders.h"
+#include "llrendertarget.h"
+#include "llscenemonitor.h"
+#include "llviewerwindow.h"
+#include "llviewerdisplay.h"
+#include "llviewercontrol.h"
+#include "llviewershadermgr.h"
+#include "llui.h"
+#include "llstartup.h"
+#include "llappviewer.h"
+#include "llwindow.h"
+#include "llpointer.h"
+#include "llspatialpartition.h"
+#include "llagent.h"
+#include "pipeline.h"
+#include "llviewerpartsim.h"
+
+LLSceneMonitorView* gSceneMonitorView = NULL;
+
+//
+//The procedures of monitoring when the scene finishes loading visually,
+//i.e., no pixel differences among frames, are:
+//1, freeze all dynamic objects and avatars;
+//2, (?) disable all sky and water;
+//3, capture frames periodically, by calling "capture()";
+//4, compute pixel differences between two latest captured frames, by calling "compare()", results are stored at mDiff;
+//5, compute the number of pixels in mDiff above some tolerance threshold in GPU, by calling "calcDiffAggregate()";
+//6, use gl occlusion query to fetch the result from GPU, by calling "fetchQueryResult()";
+//END.
+//
+
+LLSceneMonitor::LLSceneMonitor() :
+ mEnabled(false),
+ mDiff(NULL),
+ mDiffResult(0.f),
+ mDiffTolerance(0.1f),
+ mDiffState(WAITING_FOR_NEXT_DIFF),
+ mDebugViewerVisible(false),
+ mQueryObject(0),
+ mDiffPixelRatio(0.5f)
+{
+ mFrames[0] = NULL;
+ mFrames[1] = NULL;
+}
+
+LLSceneMonitor::~LLSceneMonitor()
+{
+ mDiffState = VIEWER_QUITTING;
+ reset();
+
+ mDitheringTexture = NULL;
+}
+
+void LLSceneMonitor::reset()
+{
+ delete mFrames[0];
+ delete mFrames[1];
+ delete mDiff;
+
+ mFrames[0] = NULL;
+ mFrames[1] = NULL;
+ mDiff = NULL;
+
+ mMonitorRecording.reset();
+ mSceneLoadRecording.reset();
+ mRecordingTimer.reset();
+
+ unfreezeScene();
+
+ if(mQueryObject > 0)
+ {
+ LLOcclusionCullingGroup::releaseOcclusionQueryObjectName(mQueryObject);
+ mQueryObject = 0;
+ }
+}
+
+void LLSceneMonitor::generateDitheringTexture(S32 width, S32 height)
+{
+#if 1
+ //4 * 4 matrix
+ mDitherMatrixWidth = 4;
+ S32 dither_matrix[4][4] =
+ {
+ {1, 9, 3, 11},
+ {13, 5, 15, 7},
+ {4, 12, 2, 10},
+ {16, 8, 14, 6}
+ };
+
+ mDitherScale = 255.f / 17;
+#else
+ //8 * 8 matrix
+ mDitherMatrixWidth = 16;
+ S32 dither_matrix[16][16] =
+ {
+ {1, 49, 13, 61, 4, 52, 16, 64, 1, 49, 13, 61, 4, 52, 16, 64},
+ {33, 17, 45, 29, 36, 20, 48, 32, 33, 17, 45, 29, 36, 20, 48, 32},
+ {9, 57, 5, 53, 12, 60, 8, 56, 9, 57, 5, 53, 12, 60, 8, 56},
+ {41, 25, 37, 21, 44, 28, 40, 24, 41, 25, 37, 21, 44, 28, 40, 24},
+ {3, 51, 15, 63, 2, 50, 14, 62, 3, 51, 15, 63, 2, 50, 14, 62},
+ {35, 19, 47, 31, 34, 18, 46, 30, 35, 19, 47, 31, 34, 18, 46, 30},
+ {11, 59, 7, 55, 10, 58, 6, 54, 11, 59, 7, 55, 10, 58, 6, 54},
+ {43, 27, 39, 23, 42, 26, 38, 22, 43, 27, 39, 23, 42, 26, 38, 22},
+ {1, 49, 13, 61, 4, 52, 16, 64, 1, 49, 13, 61, 4, 52, 16, 64},
+ {33, 17, 45, 29, 36, 20, 48, 32, 33, 17, 45, 29, 36, 20, 48, 32},
+ {9, 57, 5, 53, 12, 60, 8, 56, 9, 57, 5, 53, 12, 60, 8, 56},
+ {41, 25, 37, 21, 44, 28, 40, 24, 41, 25, 37, 21, 44, 28, 40, 24},
+ {3, 51, 15, 63, 2, 50, 14, 62, 3, 51, 15, 63, 2, 50, 14, 62},
+ {35, 19, 47, 31, 34, 18, 46, 30, 35, 19, 47, 31, 34, 18, 46, 30},
+ {11, 59, 7, 55, 10, 58, 6, 54, 11, 59, 7, 55, 10, 58, 6, 54},
+ {43, 27, 39, 23, 42, 26, 38, 22, 43, 27, 39, 23, 42, 26, 38, 22}
+ };
+
+ mDitherScale = 255.f / 65;
+#endif
+
+ LLPointer<LLImageRaw> image_raw = new LLImageRaw(mDitherMatrixWidth, mDitherMatrixWidth, 3);
+ U8* data = image_raw->getData();
+ for (S32 i = 0; i < mDitherMatrixWidth; i++)
+ {
+ for (S32 j = 0; j < mDitherMatrixWidth; j++)
+ {
+ U8 val = dither_matrix[i][j];
+ *data++ = val;
+ *data++ = val;
+ *data++ = val;
+ }
+ }
+
+ mDitheringTexture = LLViewerTextureManager::getLocalTexture(image_raw.get(), FALSE) ;
+ mDitheringTexture->setAddressMode(LLTexUnit::TAM_WRAP);
+ mDitheringTexture->setFilteringOption(LLTexUnit::TFO_POINT);
+
+ mDitherScaleS = (F32)width / mDitherMatrixWidth;
+ mDitherScaleT = (F32)height / mDitherMatrixWidth;
+}
+
+void LLSceneMonitor::setDebugViewerVisible(bool visible)
+{
+ mDebugViewerVisible = visible;
+}
+
+LLRenderTarget& LLSceneMonitor::getCaptureTarget()
+{
+ LLRenderTarget* cur_target = NULL;
+
+ S32 width = gViewerWindow->getWorldViewWidthRaw();
+ S32 height = gViewerWindow->getWorldViewHeightRaw();
+
+ if(!mFrames[0])
+ {
+ mFrames[0] = new LLRenderTarget();
+ mFrames[0]->allocate(width, height, GL_RGB, false, false, LLTexUnit::TT_TEXTURE, true);
+ gGL.getTexUnit(0)->bind(mFrames[0]);
+ gGL.getTexUnit(0)->setTextureFilteringOption(LLTexUnit::TFO_POINT);
+ gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE);
+
+ cur_target = mFrames[0];
+ }
+ else if(!mFrames[1])
+ {
+ mFrames[1] = new LLRenderTarget();
+ mFrames[1]->allocate(width, height, GL_RGB, false, false, LLTexUnit::TT_TEXTURE, true);
+ gGL.getTexUnit(0)->bind(mFrames[1]);
+ gGL.getTexUnit(0)->setTextureFilteringOption(LLTexUnit::TFO_POINT);
+ gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE);
+
+ cur_target = mFrames[1];
+ }
+ else //swap
+ {
+ cur_target = mFrames[0];
+ mFrames[0] = mFrames[1];
+ mFrames[1] = cur_target;
+ }
+
+ if(cur_target->getWidth() != width || cur_target->getHeight() != height) //size changed
+ {
+ cur_target->resize(width, height);
+ }
+
+ // we're promising the target exists
+ return *cur_target;
+}
+
+void LLSceneMonitor::freezeAvatar(LLCharacter* avatarp)
+{
+ if(mEnabled)
+ {
+ mAvatarPauseHandles.push_back(avatarp->requestPause());
+ }
+}
+
+void LLSceneMonitor::freezeScene()
+{
+ if(!mEnabled)
+ {
+ return;
+ }
+
+ //freeze all avatars
+ for (std::vector<LLCharacter*>::iterator iter = LLCharacter::sInstances.begin();
+ iter != LLCharacter::sInstances.end(); ++iter)
+ {
+ freezeAvatar((LLCharacter*)(*iter));
+ }
+
+ // freeze everything else
+ gSavedSettings.setBOOL("FreezeTime", TRUE);
+
+ //disable sky, water and clouds
+ gPipeline.clearRenderTypeMask(LLPipeline::RENDER_TYPE_SKY, LLPipeline::RENDER_TYPE_WL_SKY,
+ LLPipeline::RENDER_TYPE_WATER, LLPipeline::RENDER_TYPE_CLOUDS, LLPipeline::END_RENDER_TYPES);
+
+ //disable particle system
+ LLViewerPartSim::getInstance()->enable(false);
+}
+
+void LLSceneMonitor::unfreezeScene()
+{
+ //thaw all avatars
+ mAvatarPauseHandles.clear();
+
+ if(mDiffState == VIEWER_QUITTING)
+ {
+ return;
+ }
+
+ // thaw everything else
+ gSavedSettings.setBOOL("FreezeTime", FALSE);
+
+ //enable sky, water and clouds
+ gPipeline.setRenderTypeMask(LLPipeline::RENDER_TYPE_SKY, LLPipeline::RENDER_TYPE_WL_SKY,
+ LLPipeline::RENDER_TYPE_WATER, LLPipeline::RENDER_TYPE_CLOUDS, LLPipeline::END_RENDER_TYPES);
+
+ //enable particle system
+ LLViewerPartSim::getInstance()->enable(true);
+}
+
+void LLSceneMonitor::capture()
+{
+ static U32 last_capture_frame = 0;
+ static LLCachedControl<bool> monitor_enabled(gSavedSettings, "SceneLoadingMonitorEnabled");
+ static LLCachedControl<F32> scene_load_sample_time(gSavedSettings, "SceneLoadingMonitorSampleTime");
+ static bool force_capture = true;
+
+ bool enabled = LLGLSLShader::sNoFixedFunction && (monitor_enabled || mDebugViewerVisible);
+ if(mEnabled != enabled)
+ {
+ if(mEnabled)
+ {
+ mEnabled = enabled;
+ unfreezeScene();
+ reset();
+ force_capture = true;
+ }
+ else
+ {
+ mEnabled = enabled;
+ reset();
+ freezeScene();
+ }
+ }
+
+ if (mEnabled
+ && (mMonitorRecording.getSum(*LLViewerCamera::getVelocityStat()) > 0.1f
+ || mMonitorRecording.getSum(*LLViewerCamera::getAngularVelocityStat()) > 0.05f))
+ {
+ reset();
+ freezeScene();
+ force_capture = true;
+ }
+
+ if(mEnabled
+ && (mRecordingTimer.getElapsedTimeF32() > scene_load_sample_time()
+ || force_capture)
+ && last_capture_frame != gFrameCount)
+ {
+ force_capture = false;
+
+ mSceneLoadRecording.resume();
+ mMonitorRecording.resume();
+
+ last_capture_frame = gFrameCount;
+
+ LLRenderTarget& cur_target = getCaptureTarget();
+
+ U32 old_FBO = LLRenderTarget::sCurFBO;
+
+ gGL.getTexUnit(0)->bind(&cur_target);
+ glBindFramebuffer(GL_READ_FRAMEBUFFER, 0); //point to the main frame buffer.
+
+ glCopyTexSubImage2D(GL_TEXTURE_2D, 0, 0, 0, 0, 0, cur_target.getWidth(), cur_target.getHeight()); //copy the content
+
+ glBindFramebuffer(GL_READ_FRAMEBUFFER, 0);
+ glBindFramebuffer(GL_DRAW_FRAMEBUFFER, 0);
+ glBindFramebuffer(GL_FRAMEBUFFER, old_FBO);
+
+ mDiffState = NEED_DIFF;
+ }
+}
+
+bool LLSceneMonitor::needsUpdate() const
+{
+ return mDiffState == NEED_DIFF;
+}
+
+static LLTrace::BlockTimerStatHandle FTM_GENERATE_SCENE_LOAD_DITHER_TEXTURE("Generate Scene Load Dither Texture");
+static LLTrace::BlockTimerStatHandle FTM_SCENE_LOAD_IMAGE_DIFF("Scene Load Image Diff");
+
+static LLStaticHashedString sDitherScale("dither_scale");
+static LLStaticHashedString sDitherScaleS("dither_scale_s");
+static LLStaticHashedString sDitherScaleT("dither_scale_t");
+
+void LLSceneMonitor::compare()
+{
+#ifdef LL_WINDOWS
+ if(mDiffState != NEED_DIFF)
+ {
+ return;
+ }
+
+ if(!mFrames[0] || !mFrames[1])
+ {
+ return;
+ }
+ if(mFrames[0]->getWidth() != mFrames[1]->getWidth() || mFrames[0]->getHeight() != mFrames[1]->getHeight())
+ { //size does not match
+ return;
+ }
+
+ LL_RECORD_BLOCK_TIME(FTM_SCENE_LOAD_IMAGE_DIFF);
+ mDiffState = EXECUTE_DIFF;
+
+ S32 width = gViewerWindow->getWindowWidthRaw();
+ S32 height = gViewerWindow->getWindowHeightRaw();
+ if(!mDiff)
+ {
+ LL_RECORD_BLOCK_TIME(FTM_GENERATE_SCENE_LOAD_DITHER_TEXTURE);
+ mDiff = new LLRenderTarget();
+ mDiff->allocate(width, height, GL_RGBA, false, false, LLTexUnit::TT_TEXTURE, true);
+
+ generateDitheringTexture(width, height);
+ }
+ else if(mDiff->getWidth() != width || mDiff->getHeight() != height)
+ {
+ LL_RECORD_BLOCK_TIME(FTM_GENERATE_SCENE_LOAD_DITHER_TEXTURE);
+ mDiff->resize(width, height);
+ generateDitheringTexture(width, height);
+ }
+
+ mDiff->bindTarget();
+ mDiff->clear();
+
+ gTwoTextureCompareProgram.bind();
+
+ gTwoTextureCompareProgram.uniform1f(sDitherScale, mDitherScale);
+ gTwoTextureCompareProgram.uniform1f(sDitherScaleS, mDitherScaleS);
+ gTwoTextureCompareProgram.uniform1f(sDitherScaleT, mDitherScaleT);
+
+ gGL.getTexUnit(0)->activate();
+ gGL.getTexUnit(0)->enable(LLTexUnit::TT_TEXTURE);
+ gGL.getTexUnit(0)->bind(mFrames[0]);
+ gGL.getTexUnit(0)->activate();
+
+ gGL.getTexUnit(1)->activate();
+ gGL.getTexUnit(1)->enable(LLTexUnit::TT_TEXTURE);
+ gGL.getTexUnit(1)->bind(mFrames[1]);
+ gGL.getTexUnit(1)->activate();
+
+ gGL.getTexUnit(2)->activate();
+ gGL.getTexUnit(2)->enable(LLTexUnit::TT_TEXTURE);
+ gGL.getTexUnit(2)->bind(mDitheringTexture);
+ gGL.getTexUnit(2)->activate();
+
+ gl_rect_2d_simple_tex(width, height);
+
+ mDiff->flush();
+
+ gTwoTextureCompareProgram.unbind();
+
+ gGL.getTexUnit(0)->disable();
+ gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE);
+ gGL.getTexUnit(1)->disable();
+ gGL.getTexUnit(1)->unbind(LLTexUnit::TT_TEXTURE);
+ gGL.getTexUnit(2)->disable();
+ gGL.getTexUnit(2)->unbind(LLTexUnit::TT_TEXTURE);
+
+ if (!mDebugViewerVisible)
+ {
+ calcDiffAggregate();
+ }
+#endif
+}
+
+static LLStaticHashedString sTolerance("tolerance");
+
+//calculate Diff aggregate information in GPU, and enable gl occlusion query to capture it.
+void LLSceneMonitor::calcDiffAggregate()
+{
+#ifdef LL_WINDOWS
+
+ LL_RECORD_BLOCK_TIME(FTM_SCENE_LOAD_IMAGE_DIFF);
+
+ if(mDiffState != EXECUTE_DIFF && !mDebugViewerVisible)
+ {
+ return;
+ }
+
+ if(!mQueryObject)
+ {
+ mQueryObject = LLOcclusionCullingGroup::getNewOcclusionQueryObjectName();
+ }
+
+ LLGLDepthTest depth(true, false, GL_ALWAYS);
+ if(!mDebugViewerVisible)
+ {
+ glColorMask(GL_FALSE, GL_FALSE, GL_FALSE, GL_FALSE);
+ }
+
+ LLGLSLShader* cur_shader = NULL;
+
+ cur_shader = LLGLSLShader::sCurBoundShaderPtr;
+ gOneTextureFilterProgram.bind();
+ gOneTextureFilterProgram.uniform1f(sTolerance, mDiffTolerance);
+
+ if(mDiffState == EXECUTE_DIFF)
+ {
+ glBeginQueryARB(GL_SAMPLES_PASSED_ARB, mQueryObject);
+ }
+
+ gl_draw_scaled_target(0, 0, S32(mDiff->getWidth() * mDiffPixelRatio), S32(mDiff->getHeight() * mDiffPixelRatio), mDiff);
+
+ if(mDiffState == EXECUTE_DIFF)
+ {
+ glEndQueryARB(GL_SAMPLES_PASSED_ARB);
+ mDiffState = WAIT_ON_RESULT;
+ }
+
+ gOneTextureFilterProgram.unbind();
+
+ if(cur_shader != NULL)
+ {
+ cur_shader->bind();
+ }
+
+ if(!mDebugViewerVisible)
+ {
+ glColorMask(GL_TRUE, GL_TRUE, GL_TRUE, GL_TRUE);
+ }
+#endif
+}
+
+static LLTrace::EventStatHandle<> sFramePixelDiff("FramePixelDifference");
+void LLSceneMonitor::fetchQueryResult()
+{
+ LL_RECORD_BLOCK_TIME(FTM_SCENE_LOAD_IMAGE_DIFF);
+
+ // also throttle timing here, to avoid going below sample time due to phasing with frame capture
+ static LLCachedControl<F32> scene_load_sample_time_control(gSavedSettings, "SceneLoadingMonitorSampleTime");
+ F32Seconds scene_load_sample_time = (F32Seconds)scene_load_sample_time_control();
+
+ if(mDiffState == WAIT_ON_RESULT
+ && !LLAppViewer::instance()->quitRequested())
+ {
+ mDiffState = WAITING_FOR_NEXT_DIFF;
+
+ GLuint available = 0;
+ glGetQueryObjectuivARB(mQueryObject, GL_QUERY_RESULT_AVAILABLE_ARB, &available);
+ if(available)
+ {
+ GLuint count = 0;
+ glGetQueryObjectuivARB(mQueryObject, GL_QUERY_RESULT_ARB, &count);
+
+ mDiffResult = sqrtf(count * 0.5f / (mDiff->getWidth() * mDiff->getHeight() * mDiffPixelRatio * mDiffPixelRatio)); //0.5 -> (front face + back face)
+
+ LL_DEBUGS("SceneMonitor") << "Frame difference: " << mDiffResult << LL_ENDL;
+ record(sFramePixelDiff, mDiffResult);
+
+ static LLCachedControl<F32> diff_threshold(gSavedSettings,"SceneLoadingMonitorPixelDiffThreshold");
+ F32Seconds elapsed_time = mRecordingTimer.getElapsedTimeF32();
+
+ if (elapsed_time > scene_load_sample_time)
+ {
+ if(mDiffResult > diff_threshold())
+ {
+ mSceneLoadRecording.extend();
+ llassert_always(mSceneLoadRecording.getResults().getLastRecording().getDuration() > scene_load_sample_time);
+ }
+ else
+ {
+ mSceneLoadRecording.nextPeriod();
+ }
+ mRecordingTimer.reset();
+ }
+ }
+ }
+}
+
+//dump results to a file _scene_xmonitor_results.csv
+void LLSceneMonitor::dumpToFile(std::string file_name)
+{ using namespace LLTrace;
+
+ if (!hasResults()) return;
+
+ LL_INFOS("SceneMonitor") << "Saving scene load stats to " << file_name << LL_ENDL;
+
+ std::ofstream os(file_name.c_str());
+
+ os << std::setprecision(10);
+
+ PeriodicRecording& scene_load_recording = mSceneLoadRecording.getResults();
+ const U32 frame_count = scene_load_recording.getNumRecordedPeriods();
+
+ F64Seconds frame_time;
+
+ os << "Stat";
+ for (S32 frame = 1; frame <= frame_count; frame++)
+ {
+ frame_time += scene_load_recording.getPrevRecording(frame_count - frame).getDuration();
+ os << ", " << frame_time.value();
+ }
+ os << '\n';
+
+ os << "Sample period(s)";
+ for (S32 frame = 1; frame <= frame_count; frame++)
+ {
+ frame_time = scene_load_recording.getPrevRecording(frame_count - frame).getDuration();
+ os << ", " << frame_time.value();
+ }
+ os << '\n';
+
+
+ typedef StatType<CountAccumulator> trace_count;
+ for (trace_count::instance_iter it = trace_count::beginInstances(), end_it = trace_count::endInstances();
+ it != end_it;
+ ++it)
+ {
+ std::ostringstream row;
+ row << std::setprecision(10);
+
+ row << it->getName();
+
+ const char* unit_label = it->getUnitLabel();
+ if(unit_label[0])
+ {
+ row << "(" << unit_label << ")";
+ }
+
+ S32 samples = 0;
+
+ for (S32 frame = 1; frame <= frame_count; frame++)
+ {
+ Recording& recording = scene_load_recording.getPrevRecording(frame_count - frame);
+ samples += recording.getSampleCount(*it);
+ row << ", " << recording.getSum(*it);
+ }
+
+ row << '\n';
+
+ if (samples > 0)
+ {
+ os << row.str();
+ }
+ }
+
+ typedef StatType<EventAccumulator> trace_event;
+
+ for (trace_event::instance_iter it = trace_event::beginInstances(), end_it = trace_event::endInstances();
+ it != end_it;
+ ++it)
+ {
+ std::ostringstream row;
+ row << std::setprecision(10);
+ row << it->getName();
+
+ const char* unit_label = it->getUnitLabel();
+ if(unit_label[0])
+ {
+ row << "(" << unit_label << ")";
+ }
+
+ S32 samples = 0;
+
+ for (S32 frame = 1; frame <= frame_count; frame++)
+ {
+ Recording& recording = scene_load_recording.getPrevRecording(frame_count - frame);
+ samples += recording.getSampleCount(*it);
+ F64 mean = recording.getMean(*it);
+ if (llisnan(mean))
+ {
+ row << ", n/a";
+ }
+ else
+ {
+ row << ", " << mean;
+ }
+ }
+
+ row << '\n';
+
+ if (samples > 0)
+ {
+ os << row.str();
+ }
+ }
+
+ typedef StatType<SampleAccumulator> trace_sample;
+
+ for (trace_sample::instance_iter it = trace_sample::beginInstances(), end_it = trace_sample::endInstances();
+ it != end_it;
+ ++it)
+ {
+ std::ostringstream row;
+ row << std::setprecision(10);
+ row << it->getName();
+
+ const char* unit_label = it->getUnitLabel();
+ if(unit_label[0])
+ {
+ row << "(" << unit_label << ")";
+ }
+
+ S32 samples = 0;
+
+ for (S32 frame = 1; frame <= frame_count; frame++)
+ {
+ Recording& recording = scene_load_recording.getPrevRecording(frame_count - frame);
+ samples += recording.getSampleCount(*it);
+ F64 mean = recording.getMean(*it);
+ if (llisnan(mean))
+ {
+ row << ", n/a";
+ }
+ else
+ {
+ row << ", " << mean;
+ }
+ }
+
+ row << '\n';
+
+ if (samples > 0)
+ {
+ os << row.str();
+ }
+ }
+
+ typedef StatType<MemAccumulator> trace_mem;
+ for (trace_mem::instance_iter it = trace_mem::beginInstances(), end_it = trace_mem::endInstances();
+ it != end_it;
+ ++it)
+ {
+ os << it->getName() << "(KiB)";
+
+ for (S32 frame = 1; frame <= frame_count; frame++)
+ {
+ os << ", " << scene_load_recording.getPrevRecording(frame_count - frame).getMax(*it).valueInUnits<LLUnits::Kilobytes>();
+ }
+
+ os << '\n';
+ }
+
+ os.flush();
+ os.close();
+}
+
+//-------------------------------------------------------------------------------------------------------------
+//definition of class LLSceneMonitorView
+//-------------------------------------------------------------------------------------------------------------
+LLSceneMonitorView::LLSceneMonitorView(const LLRect& rect)
+ : LLFloater(LLSD())
+{
+ setRect(rect);
+ setVisible(FALSE);
+
+ setCanMinimize(false);
+ setCanClose(true);
+}
+
+void LLSceneMonitorView::onClose(bool app_quitting)
+{
+ setVisible(false);
+}
+
+void LLSceneMonitorView::onVisibilityChange(BOOL visible)
+{
+ visible = visible && LLGLSLShader::sNoFixedFunction;
+ LLSceneMonitor::getInstance()->setDebugViewerVisible(visible);
+}
+
+void LLSceneMonitorView::draw()
+{
+ const LLRenderTarget* target = LLSceneMonitor::getInstance()->getDiffTarget();
+ if(!target)
+ {
+ return;
+ }
+
+ F32 ratio = LLSceneMonitor::getInstance()->getDiffPixelRatio();
+ S32 height = (S32)(target->getHeight() * ratio);
+ S32 width = (S32)(target->getWidth() * ratio);
+
+ LLRect new_rect;
+ new_rect.setLeftTopAndSize(getRect().mLeft, getRect().mTop, width, height);
+ setRect(new_rect);
+
+ //draw background
+ gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE);
+ gl_rect_2d(0, getRect().getHeight(), getRect().getWidth(), 0, LLColor4(0.f, 0.f, 0.f, 0.25f));
+
+ LLSceneMonitor::getInstance()->calcDiffAggregate();
+
+ //show some texts
+ LLColor4 color = LLColor4::white;
+ S32 line_height = LLFontGL::getFontMonospace()->getLineHeight();
+
+ S32 lines = 0;
+ std::string num_str = llformat("Frame difference: %.6f", LLSceneMonitor::getInstance()->getDiffResult());
+ LLFontGL::getFontMonospace()->renderUTF8(num_str, 0, 5, getRect().getHeight() - line_height * lines, color, LLFontGL::LEFT, LLFontGL::TOP);
+ lines++;
+
+ num_str = llformat("Pixel tolerance: (R+G+B) < %.4f", LLSceneMonitor::getInstance()->getDiffTolerance());
+ LLFontGL::getFontMonospace()->renderUTF8(num_str, 0, 5, getRect().getHeight() - line_height * lines, color, LLFontGL::LEFT, LLFontGL::TOP);
+ lines++;
+
+ num_str = llformat("Sampling time: %.3f seconds", gSavedSettings.getF32("SceneLoadingMonitorSampleTime"));
+ LLFontGL::getFontMonospace()->renderUTF8(num_str, 0, 5, getRect().getHeight() - line_height * lines, color, LLFontGL::LEFT, LLFontGL::TOP);
+ lines++;
+
+ num_str = llformat("Scene Loading time: %.3f seconds", (F32)LLSceneMonitor::getInstance()->getRecording()->getResults().getDuration().value());
+ LLFontGL::getFontMonospace()->renderUTF8(num_str, 0, 5, getRect().getHeight() - line_height * lines, color, LLFontGL::LEFT, LLFontGL::TOP);
+ lines++;
+
+ LLView::draw();
+}
+
diff --git a/indra/newview/llscenemonitor.h b/indra/newview/llscenemonitor.h
new file mode 100644
index 0000000000..e9ceb2aa2a
--- /dev/null
+++ b/indra/newview/llscenemonitor.h
@@ -0,0 +1,124 @@
+/**
+ * @file llscenemonitor.h
+ * @brief monitor the process of scene loading
+ *
+ * $LicenseInfo:firstyear=2003&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2010, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
+ * $/LicenseInfo$
+ */
+
+#ifndef LL_LLSCENE_MONITOR_H
+#define LL_LLSCENE_MONITOR_H
+
+#include "llsingleton.h"
+#include "llmath.h"
+#include "llfloater.h"
+#include "llcharacter.h"
+#include "lltracerecording.h"
+
+class LLCharacter;
+class LLRenderTarget;
+class LLViewerTexture;
+
+class LLSceneMonitor : public LLSingleton<LLSceneMonitor>
+{
+ LOG_CLASS(LLSceneMonitor);
+public:
+ LLSceneMonitor();
+ ~LLSceneMonitor();
+
+ void freezeAvatar(LLCharacter* avatarp);
+ void setDebugViewerVisible(bool visible);
+
+ void capture(); //capture the main frame buffer
+ void compare(); //compare the stored two buffers.
+ void fetchQueryResult();
+ void calcDiffAggregate();
+ void setDiffTolerance(F32 tol) {mDiffTolerance = tol;}
+
+ const LLRenderTarget* getDiffTarget() const {return mDiff;}
+ F32 getDiffTolerance() const {return mDiffTolerance;}
+ F32 getDiffResult() const { return mDiffResult;}
+ F32 getDiffPixelRatio() const { return mDiffPixelRatio;}
+ bool isEnabled()const {return mEnabled;}
+ bool needsUpdate() const;
+
+ const LLTrace::ExtendablePeriodicRecording* getRecording() const {return &mSceneLoadRecording;}
+ void dumpToFile(std::string file_name);
+ bool hasResults() const { return mSceneLoadRecording.getResults().getDuration() != S32Seconds(0);}
+
+private:
+ void freezeScene();
+ void unfreezeScene();
+ void reset();
+ LLRenderTarget& getCaptureTarget();
+ void generateDitheringTexture(S32 width, S32 height);
+
+private:
+ bool mEnabled,
+ mDebugViewerVisible;
+
+ enum EDiffState
+ {
+ WAITING_FOR_NEXT_DIFF,
+ NEED_DIFF,
+ EXECUTE_DIFF,
+ WAIT_ON_RESULT,
+ VIEWER_QUITTING
+ } mDiffState;
+
+ LLRenderTarget* mFrames[2];
+ LLRenderTarget* mDiff;
+
+ GLuint mQueryObject; //used for glQuery
+ F32 mDiffResult, //aggregate results of mDiff.
+ mDiffTolerance, //pixels are filtered out when R+G+B < mDiffTolerance
+ mDiffPixelRatio; //ratio of pixels used for comparison against the original mDiff size along one dimension
+
+ LLPointer<LLViewerTexture> mDitheringTexture;
+ S32 mDitherMatrixWidth;
+ F32 mDitherScale,
+ mDitherScaleS,
+ mDitherScaleT;
+
+ std::vector<LLAnimPauseRequest> mAvatarPauseHandles;
+
+ LLTimer mRecordingTimer;
+ LLTrace::ExtendablePeriodicRecording mSceneLoadRecording;
+ LLTrace::Recording mMonitorRecording;
+};
+
+class LLSceneMonitorView : public LLFloater
+{
+public:
+ LLSceneMonitorView(const LLRect& rect);
+
+ virtual void draw();
+
+ virtual void onVisibilityChange(BOOL visible);
+
+protected:
+ virtual void onClose(bool app_quitting=false);
+};
+
+extern LLSceneMonitorView* gSceneMonitorView;
+
+#endif
+
diff --git a/indra/newview/llsceneview.cpp b/indra/newview/llsceneview.cpp
index cbd8bee9d5..32f327b762 100755
--- a/indra/newview/llsceneview.cpp
+++ b/indra/newview/llsceneview.cpp
@@ -51,7 +51,7 @@ LLSceneView::LLSceneView(const LLRect& rect)
setCanClose(true);
}
-void LLSceneView::onClickCloseBtn(bool)
+void LLSceneView::onClose(bool)
{
setVisible(false);
}
diff --git a/indra/newview/llsceneview.h b/indra/newview/llsceneview.h
index 1fceecb9e1..6d839bcf08 100755
--- a/indra/newview/llsceneview.h
+++ b/indra/newview/llsceneview.h
@@ -38,7 +38,7 @@ public:
virtual void draw();
protected:
- virtual void onClickCloseBtn(bool app_qutting = false);
+ virtual void onClose(bool app_qutting = false);
};
diff --git a/indra/newview/llscreenchannel.cpp b/indra/newview/llscreenchannel.cpp
index 168a941ec3..6a840f3f40 100755
--- a/indra/newview/llscreenchannel.cpp
+++ b/indra/newview/llscreenchannel.cpp
@@ -49,10 +49,10 @@ using namespace LLNotificationsUI;
bool LLScreenChannel::mWasStartUpToastShown = false;
-LLFastTimer::DeclareTimer FTM_GET_CHANNEL_RECT("Calculate Notification Channel Region");
+LLTrace::BlockTimerStatHandle FTM_GET_CHANNEL_RECT("Calculate Notification Channel Region");
LLRect LLScreenChannelBase::getChannelRect()
{
- LLFastTimer _(FTM_GET_CHANNEL_RECT);
+ LL_RECORD_BLOCK_TIME(FTM_GET_CHANNEL_RECT);
if (mFloaterSnapRegion == NULL)
{
@@ -599,7 +599,7 @@ void LLScreenChannel::showToastsBottom()
LLToast* toast = (it-1)->getToast();
if (!toast)
{
- llwarns << "Attempt to display a deleted toast." << llendl;
+ LL_WARNS() << "Attempt to display a deleted toast." << LL_ENDL;
return;
}
@@ -610,7 +610,7 @@ void LLScreenChannel::showToastsBottom()
LLToast* toast = it->getToast();
if(!toast)
{
- llwarns << "Attempt to display a deleted toast." << llendl;
+ LL_WARNS() << "Attempt to display a deleted toast." << LL_ENDL;
return;
}
@@ -698,7 +698,7 @@ void LLScreenChannel::showToastsCentre()
LLToast* toast = mToastList[0].getToast();
if (!toast)
{
- llwarns << "Attempt to display a deleted toast." << llendl;
+ LL_WARNS() << "Attempt to display a deleted toast." << LL_ENDL;
return;
}
@@ -711,7 +711,7 @@ void LLScreenChannel::showToastsCentre()
LLToast* toast = it->getToast();
if (!toast)
{
- llwarns << "Attempt to display a deleted toast." << llendl;
+ LL_WARNS() << "Attempt to display a deleted toast." << LL_ENDL;
return;
}
@@ -747,7 +747,7 @@ void LLScreenChannel::showToastsTop()
LLToast* toast = (it-1)->getToast();
if (!toast)
{
- llwarns << "Attempt to display a deleted toast." << llendl;
+ LL_WARNS() << "Attempt to display a deleted toast." << LL_ENDL;
return;
}
@@ -758,7 +758,7 @@ void LLScreenChannel::showToastsTop()
LLToast* toast = it->getToast();
if (!toast)
{
- llwarns << "Attempt to display a deleted toast." << llendl;
+ LL_WARNS() << "Attempt to display a deleted toast." << LL_ENDL;
return;
}
@@ -954,7 +954,7 @@ void LLScreenChannel::hideToastsFromScreen()
}
else
{
- llwarns << "Attempt to hide a deleted toast." << llendl;
+ LL_WARNS() << "Attempt to hide a deleted toast." << LL_ENDL;
}
}
}
@@ -972,7 +972,7 @@ void LLScreenChannel::hideToast(const LLUUID& notification_id)
}
else
{
- llwarns << "Attempt to hide a deleted toast." << llendl;
+ LL_WARNS() << "Attempt to hide a deleted toast." << LL_ENDL;
}
}
}
diff --git a/indra/newview/llscriptfloater.cpp b/indra/newview/llscriptfloater.cpp
index 0e0da6bdc7..590a1c2647 100755
--- a/indra/newview/llscriptfloater.cpp
+++ b/indra/newview/llscriptfloater.cpp
@@ -234,7 +234,7 @@ void LLScriptFloater::onMouseDown()
// Remove new message icon
if (NULL == chicletp)
{
- llerror("Dock chiclet for LLScriptFloater doesn't exist", 0);
+ LL_ERRS() << "Dock chiclet for LLScriptFloater doesn't exist" << LL_ENDL;
}
else
{
@@ -306,7 +306,7 @@ void LLScriptFloater::dockToChiclet(bool dock)
LLChiclet * chicletp = chiclet_panelp->findChiclet<LLChiclet>(getNotificationId());
if (NULL == chicletp)
{
- llwarns << "Dock chiclet for LLScriptFloater doesn't exist" << llendl;
+ LL_WARNS() << "Dock chiclet for LLScriptFloater doesn't exist" << LL_ENDL;
return;
}
@@ -350,7 +350,7 @@ void LLScriptFloaterManager::onAddNotification(const LLUUID& notification_id)
{
if(notification_id.isNull())
{
- llwarns << "Invalid notification ID" << llendl;
+ LL_WARNS() << "Invalid notification ID" << LL_ENDL;
return;
}
@@ -434,7 +434,7 @@ void LLScriptFloaterManager::onRemoveNotification(const LLUUID& notification_id)
{
if(notification_id.isNull())
{
- llwarns << "Invalid notification ID" << llendl;
+ LL_WARNS() << "Invalid notification ID" << LL_ENDL;
return;
}
@@ -505,7 +505,7 @@ LLScriptFloaterManager::EObjectType LLScriptFloaterManager::getObjectType(const
{
if(notification_id.isNull())
{
- llwarns << "Invalid notification ID" << llendl;
+ LL_WARNS() << "Invalid notification ID" << LL_ENDL;
return OBJ_UNKNOWN;
}
@@ -518,7 +518,7 @@ LLScriptFloaterManager::EObjectType LLScriptFloaterManager::getObjectType(const
return it->second;
}
- llwarns << "Unknown object type" << llendl;
+ LL_WARNS() << "Unknown object type" << LL_ENDL;
return OBJ_UNKNOWN;
}
@@ -529,7 +529,7 @@ std::string LLScriptFloaterManager::getObjectName(const LLUUID& notification_id)
LLNotificationPtr notification = LLNotifications::getInstance()->find(notification_id);
if(!notification)
{
- llwarns << "Invalid notification" << llendl;
+ LL_WARNS() << "Invalid notification" << LL_ENDL;
return LLStringUtil::null;
}
@@ -586,7 +586,7 @@ void LLScriptFloaterManager::saveFloaterPosition(const LLUUID& object_id, const
}
else
{
- llwarns << "Invalid object id" << llendl;
+ LL_WARNS() << "Invalid object id" << LL_ENDL;
}
}
diff --git a/indra/newview/llsecapi.h b/indra/newview/llsecapi.h
index db57848320..c01d318f56 100755
--- a/indra/newview/llsecapi.h
+++ b/indra/newview/llsecapi.h
@@ -28,8 +28,10 @@
#ifndef LLSECAPI_H
#define LLSECAPI_H
#include <vector>
+#include "llwin32headerslean.h"
#include <openssl/x509.h>
#include <ostream>
+#include "llpointer.h"
#ifdef LL_WINDOWS
#pragma warning(disable:4250)
diff --git a/indra/newview/llsechandler_basic.cpp b/indra/newview/llsechandler_basic.cpp
index c4d5450e2b..fc9d9f0842 100755
--- a/indra/newview/llsechandler_basic.cpp
+++ b/indra/newview/llsechandler_basic.cpp
@@ -1220,7 +1220,7 @@ void LLSecAPIBasicHandler::init()
// grab the application CA.pem file that contains the well-known certs shipped
// with the product
std::string ca_file_path = gDirUtilp->getExpandedFilename(LL_PATH_APP_SETTINGS, "CA.pem");
- llinfos << "app path " << ca_file_path << llendl;
+ LL_INFOS() << "app path " << ca_file_path << LL_ENDL;
LLPointer<LLBasicCertificateStore> app_ca_store = new LLBasicCertificateStore(ca_file_path);
// push the applicate CA files into the store, therefore adding any new CA certs that
@@ -1372,7 +1372,7 @@ void LLSecAPIBasicHandler::_writeProtectedData()
// EXP-1825 crash in LLSecAPIBasicHandler::_writeProtectedData()
// Decided throwing an exception here was overkill until we figure out why this happens
//throw LLProtectedDataException("Error writing Protected Data Store");
- llinfos << "LLProtectedDataException(Error writing Protected Data Store)" << llendl;
+ LL_INFOS() << "LLProtectedDataException(Error writing Protected Data Store)" << LL_ENDL;
}
// move the temporary file to the specified file location.
@@ -1385,7 +1385,7 @@ void LLSecAPIBasicHandler::_writeProtectedData()
// EXP-1825 crash in LLSecAPIBasicHandler::_writeProtectedData()
// Decided throwing an exception here was overkill until we figure out why this happens
//throw LLProtectedDataException("Could not overwrite protected data store");
- llinfos << "LLProtectedDataException(Could not overwrite protected data store)" << llendl;
+ LL_INFOS() << "LLProtectedDataException(Could not overwrite protected data store)" << LL_ENDL;
}
}
diff --git a/indra/newview/llselectmgr.cpp b/indra/newview/llselectmgr.cpp
index c83b459279..eb3a4c37d9 100755
--- a/indra/newview/llselectmgr.cpp
+++ b/indra/newview/llselectmgr.cpp
@@ -10,7 +10,7 @@
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation;
* version 2.1 of the License only.
- *
+ *
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
@@ -104,6 +104,9 @@ const F32 SILHOUETTE_UPDATE_THRESHOLD_SQUARED = 0.02f;
const S32 MAX_ACTION_QUEUE_SIZE = 20;
const S32 MAX_SILS_PER_FRAME = 50;
const S32 MAX_OBJECTS_PER_PACKET = 254;
+// For linked sets
+const S32 MAX_CHILDREN_PER_TASK = 255;
+const S32 MAX_CHILDREN_PER_PHYSICAL_TASK = 32;
//
// Globals
@@ -323,7 +326,7 @@ LLObjectSelectionHandle LLSelectMgr::selectObjectOnly(LLViewerObject* object, S3
return NULL;
}
- // llinfos << "Adding object to selected object list" << llendl;
+ // LL_INFOS() << "Adding object to selected object list" << LL_ENDL;
// Place it in the list and tag it.
// This will refresh dialogs.
@@ -889,7 +892,7 @@ void LLSelectMgr::addAsIndividual(LLViewerObject *objectp, S32 face, BOOL undoab
}
else
{
- llerrs << "LLSelectMgr::add face " << face << " out-of-range" << llendl;
+ LL_ERRS() << "LLSelectMgr::add face " << face << " out-of-range" << LL_ENDL;
return;
}
@@ -940,6 +943,10 @@ LLObjectSelectionHandle LLSelectMgr::setHoverObject(LLViewerObject *objectp, S32
iter != objects.end(); ++iter)
{
LLViewerObject* cur_objectp = *iter;
+ if(!cur_objectp || cur_objectp->isDead())
+ {
+ continue;
+ }
LLSelectNode* nodep = new LLSelectNode(cur_objectp, FALSE);
nodep->selectTE(face, TRUE);
mHoverObjects->addNodeAtEnd(nodep);
@@ -1333,7 +1340,7 @@ void LLSelectMgr::remove(LLViewerObject *objectp, S32 te, BOOL undoable)
}
else
{
- llerrs << "LLSelectMgr::remove - tried to remove TE " << te << " that wasn't selected" << llendl;
+ LL_ERRS() << "LLSelectMgr::remove - tried to remove TE " << te << " that wasn't selected" << LL_ENDL;
return;
}
@@ -1356,7 +1363,7 @@ void LLSelectMgr::remove(LLViewerObject *objectp, S32 te, BOOL undoable)
else
{
// ...out of range face
- llerrs << "LLSelectMgr::remove - TE " << te << " out of range" << llendl;
+ LL_ERRS() << "LLSelectMgr::remove - TE " << te << " out of range" << LL_ENDL;
}
updateSelectionCenter();
@@ -1455,26 +1462,26 @@ void LLSelectMgr::demoteSelectionToIndividuals()
//-----------------------------------------------------------------------------
void LLSelectMgr::dump()
{
- llinfos << "Selection Manager: " << mSelectedObjects->getNumNodes() << " items" << llendl;
+ LL_INFOS() << "Selection Manager: " << mSelectedObjects->getNumNodes() << " items" << LL_ENDL;
- llinfos << "TE mode " << mTEMode << llendl;
+ LL_INFOS() << "TE mode " << mTEMode << LL_ENDL;
S32 count = 0;
for (LLObjectSelection::iterator iter = getSelection()->begin();
iter != getSelection()->end(); iter++ )
{
LLViewerObject* objectp = (*iter)->getObject();
- llinfos << "Object " << count << " type " << LLPrimitive::pCodeToString(objectp->getPCode()) << llendl;
- llinfos << " hasLSL " << objectp->flagScripted() << llendl;
- llinfos << " hasTouch " << objectp->flagHandleTouch() << llendl;
- llinfos << " hasMoney " << objectp->flagTakesMoney() << llendl;
- llinfos << " getposition " << objectp->getPosition() << llendl;
- llinfos << " getpositionAgent " << objectp->getPositionAgent() << llendl;
- llinfos << " getpositionRegion " << objectp->getPositionRegion() << llendl;
- llinfos << " getpositionGlobal " << objectp->getPositionGlobal() << llendl;
+ LL_INFOS() << "Object " << count << " type " << LLPrimitive::pCodeToString(objectp->getPCode()) << LL_ENDL;
+ LL_INFOS() << " hasLSL " << objectp->flagScripted() << LL_ENDL;
+ LL_INFOS() << " hasTouch " << objectp->flagHandleTouch() << LL_ENDL;
+ LL_INFOS() << " hasMoney " << objectp->flagTakesMoney() << LL_ENDL;
+ LL_INFOS() << " getposition " << objectp->getPosition() << LL_ENDL;
+ LL_INFOS() << " getpositionAgent " << objectp->getPositionAgent() << LL_ENDL;
+ LL_INFOS() << " getpositionRegion " << objectp->getPositionRegion() << LL_ENDL;
+ LL_INFOS() << " getpositionGlobal " << objectp->getPositionGlobal() << LL_ENDL;
LLDrawable* drawablep = objectp->mDrawable;
- llinfos << " " << (drawablep&& drawablep->isVisible() ? "visible" : "invisible") << llendl;
- llinfos << " " << (drawablep&& drawablep->isState(LLDrawable::FORCE_INVISIBLE) ? "force_invisible" : "") << llendl;
+ LL_INFOS() << " " << (drawablep&& drawablep->isVisible() ? "visible" : "invisible") << LL_ENDL;
+ LL_INFOS() << " " << (drawablep&& drawablep->isState(LLDrawable::FORCE_INVISIBLE) ? "force_invisible" : "") << LL_ENDL;
count++;
}
@@ -1490,14 +1497,14 @@ void LLSelectMgr::dump()
{
if (node->isTESelected(te))
{
- llinfos << "Object " << objectp << " te " << te << llendl;
+ LL_INFOS() << "Object " << objectp << " te " << te << LL_ENDL;
}
}
}
- llinfos << mHighlightedObjects->getNumNodes() << " objects currently highlighted." << llendl;
+ LL_INFOS() << mHighlightedObjects->getNumNodes() << " objects currently highlighted." << LL_ENDL;
- llinfos << "Center global " << mSelectionCenterGlobal << llendl;
+ LL_INFOS() << "Center global " << mSelectionCenterGlobal << LL_ENDL;
}
//-----------------------------------------------------------------------------
@@ -1557,7 +1564,7 @@ void LLObjectSelection::applyNoCopyTextureToTEs(LLViewerInventoryItem* item)
}
// apply texture for the selected faces
- LLViewerStats::getInstance()->incStat(LLViewerStats::ST_EDIT_TEXTURE_COUNT );
+ add(LLStatViewer::EDIT_TEXTURE, 1);
object->setTEImage(te, image);
dialog_refresh_all();
@@ -1580,8 +1587,8 @@ void LLSelectMgr::selectionSetImage(const LLUUID& imageid)
&& !item->getPermissions().allowOperationBy(PERM_COPY, gAgent.getID())
&& (mSelectedObjects->getNumNodes() > 1) )
{
- llwarns << "Attempted to apply no-copy texture to multiple objects"
- << llendl;
+ LL_WARNS() << "Attempted to apply no-copy texture to multiple objects"
+ << LL_ENDL;
return;
}
@@ -3510,7 +3517,7 @@ bool LLSelectMgr::confirmDelete(const LLSD& notification, const LLSD& response,
S32 option = LLNotification::getSelectedOption(notification, response);
if (!handle->getObjectCount())
{
- llwarns << "Nothing to delete!" << llendl;
+ LL_WARNS() << "Nothing to delete!" << LL_ENDL;
return false;
}
@@ -3541,9 +3548,7 @@ bool LLSelectMgr::confirmDelete(const LLSD& notification, const LLSD& response,
gAgentCamera.setLookAt(LOOKAT_TARGET_CLEAR);
// Keep track of how many objects have been deleted.
- F64 obj_delete_count = LLViewerStats::getInstance()->getStat(LLViewerStats::ST_OBJECT_DELETE_COUNT);
- obj_delete_count += LLSelectMgr::getInstance()->mSelectedObjects->getObjectCount();
- LLViewerStats::getInstance()->setStat(LLViewerStats::ST_OBJECT_DELETE_COUNT, obj_delete_count );
+ add(LLStatViewer::DELETE_OBJECT, LLSelectMgr::getInstance()->mSelectedObjects->getObjectCount());
}
break;
case 1:
@@ -3950,7 +3955,7 @@ void LLSelectMgr::packMultipleUpdate(LLSelectNode* node, void *user_data)
}
if (type & UPD_SCALE)
{
- //llinfos << "Sending object scale " << object->getScale() << llendl;
+ //LL_INFOS() << "Sending object scale " << object->getScale() << LL_ENDL;
htonmemcpy(&data[offset], &(object->getScale().mV), MVT_LLVector3, 12);
offset += 12;
}
@@ -4088,7 +4093,7 @@ void LLSelectMgr::packPermissionsHead(void* user_data)
/*
void LLSelectMgr::sendSelect()
{
- llerrs << "Not implemented" << llendl;
+ LL_ERRS() << "Not implemented" << LL_ENDL;
}
*/
@@ -4202,9 +4207,9 @@ void LLSelectMgr::deselectAllIfTooFar()
{
if (mDebugSelectMgr)
{
- llinfos << "Selection manager: auto-deselecting, select_dist = " << (F32) sqrt(select_dist_sq) << llendl;
- llinfos << "agent pos global = " << gAgent.getPositionGlobal() << llendl;
- llinfos << "selection pos global = " << selectionCenter << llendl;
+ LL_INFOS() << "Selection manager: auto-deselecting, select_dist = " << (F32) sqrt(select_dist_sq) << LL_ENDL;
+ LL_INFOS() << "agent pos global = " << gAgent.getPositionGlobal() << LL_ENDL;
+ LL_INFOS() << "selection pos global = " << selectionCenter << LL_ENDL;
}
deselectAll();
@@ -4916,7 +4921,7 @@ void LLSelectMgr::sendListToRegions(const std::string& message_name,
break;
default:
- llerrs << "Bad send type " << send_type << " passed to SendListToRegions()" << llendl;
+ LL_ERRS() << "Bad send type " << send_type << " passed to SendListToRegions()" << LL_ENDL;
}
// bail if nothing selected
@@ -4990,7 +4995,7 @@ void LLSelectMgr::sendListToRegions(const std::string& message_name,
gMessageSystem->clearMessage();
}
- // llinfos << "sendListToRegions " << message_name << " obj " << objects_sent << " pkt " << packets_sent << llendl;
+ // LL_INFOS() << "sendListToRegions " << message_name << " obj " << objects_sent << " pkt " << packets_sent << LL_ENDL;
}
@@ -5107,7 +5112,7 @@ void LLSelectMgr::processObjectProperties(LLMessageSystem* msg, void** user_data
if (!node)
{
- llwarns << "Couldn't find object " << id << " selected." << llendl;
+ LL_WARNS() << "Couldn't find object " << id << " selected." << LL_ENDL;
}
else
{
@@ -5913,7 +5918,7 @@ void LLSelectNode::saveTextureScaleRatios(LLRender::eTexIndex index_to_query)
LLPrimitive::getTESTAxes(i, &s_axis, &t_axis);
tep->getScale(&diffuse_s,&diffuse_t);
-
+
if (tep->getTexGen() == LLTextureEntry::TEX_GEN_PLANAR)
{
v.mV[s_axis] = diffuse_s*scale.mV[s_axis];
@@ -5925,7 +5930,7 @@ void LLSelectNode::saveTextureScaleRatios(LLRender::eTexIndex index_to_query)
v.mV[s_axis] = diffuse_s/scale.mV[s_axis];
v.mV[t_axis] = diffuse_t/scale.mV[t_axis];
mTextureScaleRatios.push_back(v);
- }
+ }
}
}
}
@@ -6369,7 +6374,7 @@ S32 get_family_count(LLViewerObject *parent)
{
if (!parent)
{
- llwarns << "Trying to get_family_count on null parent!" << llendl;
+ LL_WARNS() << "Trying to get_family_count on null parent!" << LL_ENDL;
}
S32 count = 1; // for this object
LLViewerObject::const_child_list_t& child_list = parent->getChildren();
@@ -6380,11 +6385,11 @@ S32 get_family_count(LLViewerObject *parent)
if (!child)
{
- llwarns << "Family object has NULL child! Show Doug." << llendl;
+ LL_WARNS() << "Family object has NULL child! Show Doug." << LL_ENDL;
}
else if (child->isDead())
{
- llwarns << "Family object has dead child object. Show Doug." << llendl;
+ LL_WARNS() << "Family object has dead child object. Show Doug." << LL_ENDL;
}
else
{
diff --git a/indra/newview/llselectmgr.h b/indra/newview/llselectmgr.h
index d4b736640c..a68328167a 100755
--- a/indra/newview/llselectmgr.h
+++ b/indra/newview/llselectmgr.h
@@ -56,6 +56,33 @@ class LLColor4;
class LLVector3;
class LLSelectNode;
+const U8 UPD_NONE = 0x00;
+const U8 UPD_POSITION = 0x01;
+const U8 UPD_ROTATION = 0x02;
+const U8 UPD_SCALE = 0x04;
+const U8 UPD_LINKED_SETS = 0x08;
+const U8 UPD_UNIFORM = 0x10; // used with UPD_SCALE
+
+// This is used by the DeRezObject message to determine where to put
+// derezed tasks.
+enum EDeRezDestination
+{
+ DRD_SAVE_INTO_AGENT_INVENTORY = 0,
+ DRD_ACQUIRE_TO_AGENT_INVENTORY = 1, // try to leave copy in world
+ DRD_SAVE_INTO_TASK_INVENTORY = 2,
+ DRD_ATTACHMENT = 3,
+ DRD_TAKE_INTO_AGENT_INVENTORY = 4, // delete from world
+ DRD_FORCE_TO_GOD_INVENTORY = 5, // force take copy
+ DRD_TRASH = 6,
+ DRD_ATTACHMENT_TO_INV = 7,
+ DRD_ATTACHMENT_EXISTS = 8,
+ DRD_RETURN_TO_OWNER = 9, // back to owner's inventory
+ DRD_RETURN_TO_LAST_OWNER = 10, // deeded object back to last owner's inventory
+
+ DRD_COUNT = 11
+};
+
+
const S32 SELECT_ALL_TES = -1;
const S32 SELECT_MAX_TES = 32;
diff --git a/indra/newview/llsidepanelappearance.cpp b/indra/newview/llsidepanelappearance.cpp
index ec6a1d9bdc..c938a478f7 100755
--- a/indra/newview/llsidepanelappearance.cpp
+++ b/indra/newview/llsidepanelappearance.cpp
@@ -142,7 +142,7 @@ BOOL LLSidepanelAppearance::postBuild()
mCurrOutfitPanel = getChild<LLPanel>("panel_currentlook");
- setVisibleCallback(boost::bind(&LLSidepanelAppearance::onVisibilityChange,this,_2));
+ setVisibleCallback(boost::bind(&LLSidepanelAppearance::onVisibilityChanged,this,_2));
return TRUE;
}
@@ -181,7 +181,7 @@ void LLSidepanelAppearance::onOpen(const LLSD& key)
mOpened = true;
}
-void LLSidepanelAppearance::onVisibilityChange(const LLSD &new_visibility)
+void LLSidepanelAppearance::onVisibilityChanged(const LLSD &new_visibility)
{
LLSD visibility;
visibility["visible"] = new_visibility.asBoolean();
@@ -201,7 +201,7 @@ void LLSidepanelAppearance::updateToVisibility(const LLSD &new_visibility)
const LLViewerWearable *wearable_ptr = mEditWearable->getWearable();
if (!wearable_ptr)
{
- llwarns << "Visibility change to invalid wearable" << llendl;
+ LL_WARNS() << "Visibility change to invalid wearable" << LL_ENDL;
return;
}
// Disable camera switch is currently just for WT_PHYSICS type since we don't want to freeze the avatar
@@ -231,7 +231,7 @@ void LLSidepanelAppearance::updateToVisibility(const LLSD &new_visibility)
{
gAgentCamera.changeCameraToDefault();
gAgentCamera.resetView();
- }
+ }
}
}
diff --git a/indra/newview/llsidepanelappearance.h b/indra/newview/llsidepanelappearance.h
index b0a6b9cf91..cde05a8d9b 100755
--- a/indra/newview/llsidepanelappearance.h
+++ b/indra/newview/llsidepanelappearance.h
@@ -47,7 +47,7 @@ public:
virtual ~LLSidepanelAppearance();
/*virtual*/ BOOL postBuild();
- /*virtual*/ void onOpen(const LLSD& key);
+ /*virtual*/ void onOpen(const LLSD& key);
void refreshCurrentOutfitName(const std::string& name = "");
@@ -68,7 +68,7 @@ public:
private:
void onFilterEdit(const std::string& search_string);
- void onVisibilityChange ( const LLSD& new_visibility );
+ void onVisibilityChanged ( const LLSD& new_visibility );
void onOpenOutfitButtonClicked();
void onEditAppearanceButtonClicked();
diff --git a/indra/newview/llsidepanelinventory.cpp b/indra/newview/llsidepanelinventory.cpp
index 2e91ceee2e..0c8c3ba187 100755
--- a/indra/newview/llsidepanelinventory.cpp
+++ b/indra/newview/llsidepanelinventory.cpp
@@ -161,7 +161,7 @@ BOOL LLSidepanelInventory::postBuild()
{
// UI elements from inventory panel
{
- mInventoryPanel = getChild<LLPanel>("sidepanel__inventory_panel");
+ mInventoryPanel = getChild<LLPanel>("sidepanel_inventory_panel");
mInfoBtn = mInventoryPanel->getChild<LLButton>("info_btn");
mInfoBtn->setClickedCallback(boost::bind(&LLSidepanelInventory::onInfoButtonClicked, this));
@@ -310,7 +310,7 @@ void LLSidepanelInventory::observeInboxModifications(const LLUUID& inboxID)
if (inboxID.isNull())
{
- llwarns << "Attempting to track modifications to non-existent inbox" << llendl;
+ LL_WARNS() << "Attempting to track modifications to non-existent inbox" << LL_ENDL;
return;
}
diff --git a/indra/newview/llsidepaneliteminfo.cpp b/indra/newview/llsidepaneliteminfo.cpp
index e52b2f2559..1d20b7bed5 100755
--- a/indra/newview/llsidepaneliteminfo.cpp
+++ b/indra/newview/llsidepaneliteminfo.cpp
@@ -678,7 +678,7 @@ void LLSidepanelItemInfo::startObjectInventoryObserver()
if (mObjectID.isNull())
{
- llwarns << "Empty object id passed to inventory observer" << llendl;
+ LL_WARNS() << "Empty object id passed to inventory observer" << LL_ENDL;
return;
}
@@ -721,7 +721,7 @@ void LLSidepanelItemInfo::onClickOwner()
// static
void LLSidepanelItemInfo::onCommitName()
{
- //llinfos << "LLSidepanelItemInfo::onCommitName()" << llendl;
+ //LL_INFOS() << "LLSidepanelItemInfo::onCommitName()" << LL_ENDL;
LLViewerInventoryItem* item = findItem();
if(!item)
{
@@ -757,7 +757,7 @@ void LLSidepanelItemInfo::onCommitName()
void LLSidepanelItemInfo::onCommitDescription()
{
- //llinfos << "LLSidepanelItemInfo::onCommitDescription()" << llendl;
+ //LL_INFOS() << "LLSidepanelItemInfo::onCommitDescription()" << LL_ENDL;
LLViewerInventoryItem* item = findItem();
if(!item) return;
@@ -795,7 +795,7 @@ void LLSidepanelItemInfo::onCommitDescription()
// static
void LLSidepanelItemInfo::onCommitPermissions()
{
- //llinfos << "LLSidepanelItemInfo::onCommitPermissions()" << llendl;
+ //LL_INFOS() << "LLSidepanelItemInfo::onCommitPermissions()" << LL_ENDL;
LLViewerInventoryItem* item = findItem();
if(!item) return;
LLPermissions perm(item->getPermissions());
@@ -892,14 +892,14 @@ void LLSidepanelItemInfo::onCommitPermissions()
// static
void LLSidepanelItemInfo::onCommitSaleInfo()
{
- //llinfos << "LLSidepanelItemInfo::onCommitSaleInfo()" << llendl;
+ //LL_INFOS() << "LLSidepanelItemInfo::onCommitSaleInfo()" << LL_ENDL;
updateSaleInfo();
}
// static
void LLSidepanelItemInfo::onCommitSaleType()
{
- //llinfos << "LLSidepanelItemInfo::onCommitSaleType()" << llendl;
+ //LL_INFOS() << "LLSidepanelItemInfo::onCommitSaleType()" << LL_ENDL;
updateSaleInfo();
}
diff --git a/indra/newview/llsidepaneltaskinfo.cpp b/indra/newview/llsidepaneltaskinfo.cpp
index 4428098929..636654ad23 100755
--- a/indra/newview/llsidepaneltaskinfo.cpp
+++ b/indra/newview/llsidepaneltaskinfo.cpp
@@ -162,7 +162,7 @@ BOOL LLSidepanelTaskInfo::postBuild()
return TRUE;
}
-/*virtual*/ void LLSidepanelTaskInfo::handleVisibilityChange ( BOOL visible )
+/*virtual*/ void LLSidepanelTaskInfo::onVisibilityChange ( BOOL visible )
{
if (visible)
{
@@ -945,7 +945,6 @@ static bool callback_deed_to_group(const LLSD& notification, const LLSD& respons
if (group_id.notNull() && groups_identical && (gAgent.hasPowerInGroup(group_id, GP_OBJECT_DEED)))
{
LLSelectMgr::getInstance()->sendOwner(LLUUID::null, group_id, FALSE);
-// LLViewerStats::getInstance()->incStat(LLViewerStats::ST_RELEASE_COUNT);
}
}
return FALSE;
@@ -996,28 +995,28 @@ void LLSidepanelTaskInfo::onCommitEveryoneCopy(LLUICtrl *ctrl, void *data)
// static
void LLSidepanelTaskInfo::onCommitNextOwnerModify(LLUICtrl* ctrl, void* data)
{
- //llinfos << "LLSidepanelTaskInfo::onCommitNextOwnerModify" << llendl;
+ //LL_INFOS() << "LLSidepanelTaskInfo::onCommitNextOwnerModify" << LL_ENDL;
onCommitPerm(ctrl, data, PERM_NEXT_OWNER, PERM_MODIFY);
}
// static
void LLSidepanelTaskInfo::onCommitNextOwnerCopy(LLUICtrl* ctrl, void* data)
{
- //llinfos << "LLSidepanelTaskInfo::onCommitNextOwnerCopy" << llendl;
+ //LL_INFOS() << "LLSidepanelTaskInfo::onCommitNextOwnerCopy" << LL_ENDL;
onCommitPerm(ctrl, data, PERM_NEXT_OWNER, PERM_COPY);
}
// static
void LLSidepanelTaskInfo::onCommitNextOwnerTransfer(LLUICtrl* ctrl, void* data)
{
- //llinfos << "LLSidepanelTaskInfo::onCommitNextOwnerTransfer" << llendl;
+ //LL_INFOS() << "LLSidepanelTaskInfo::onCommitNextOwnerTransfer" << LL_ENDL;
onCommitPerm(ctrl, data, PERM_NEXT_OWNER, PERM_TRANSFER);
}
// static
void LLSidepanelTaskInfo::onCommitName(LLUICtrl*, void* data)
{
- //llinfos << "LLSidepanelTaskInfo::onCommitName()" << llendl;
+ //LL_INFOS() << "LLSidepanelTaskInfo::onCommitName()" << LL_ENDL;
LLSidepanelTaskInfo* self = (LLSidepanelTaskInfo*)data;
LLLineEditor* tb = self->getChild<LLLineEditor>("Object Name");
if(tb)
@@ -1031,7 +1030,7 @@ void LLSidepanelTaskInfo::onCommitName(LLUICtrl*, void* data)
// static
void LLSidepanelTaskInfo::onCommitDesc(LLUICtrl*, void* data)
{
- //llinfos << "LLSidepanelTaskInfo::onCommitDesc()" << llendl;
+ //LL_INFOS() << "LLSidepanelTaskInfo::onCommitDesc()" << LL_ENDL;
LLSidepanelTaskInfo* self = (LLSidepanelTaskInfo*)data;
LLLineEditor* le = self->getChild<LLLineEditor>("Object Description");
if(le)
diff --git a/indra/newview/llsidepaneltaskinfo.h b/indra/newview/llsidepaneltaskinfo.h
index 05edcda5ed..a1479ef0e7 100755
--- a/indra/newview/llsidepaneltaskinfo.h
+++ b/indra/newview/llsidepaneltaskinfo.h
@@ -50,7 +50,7 @@ public:
virtual ~LLSidepanelTaskInfo();
/*virtual*/ BOOL postBuild();
- /*virtual*/ void handleVisibilityChange ( BOOL new_visibility );
+ /*virtual*/ void onVisibilityChange ( BOOL new_visibility );
void setObjectSelection(LLObjectSelectionHandle selection);
diff --git a/indra/newview/llsimplestat.h b/indra/newview/llsimplestat.h
deleted file mode 100755
index 9d7780c4f9..0000000000
--- a/indra/newview/llsimplestat.h
+++ /dev/null
@@ -1,152 +0,0 @@
-/**
- * @file llsimplestat.h
- * @brief Runtime statistics accumulation.
- *
- * $LicenseInfo:firstyear=2010&license=viewerlgpl$
- * Second Life Viewer Source Code
- * Copyright (C) 2010, Linden Research, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation;
- * version 2.1 of the License only.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- *
- * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
- * $/LicenseInfo$
- */
-
-#ifndef LL_SIMPLESTAT_H
-#define LL_SIMPLESTAT_H
-
-// History
-//
-// The original source for this code is the server repositories'
-// llcommon/llstat.h file. This particular code was added after the
-// viewer/server code schism but before the effort to convert common
-// code to libraries was complete. Rather than add to merge issues,
-// the needed code was cut'n'pasted into this new header as it isn't
-// too awful a burden. Post-modularization, we can look at removing
-// this redundancy.
-
-
-/**
- * @class LLSimpleStatCounter
- * @brief Just counts events.
- *
- * Really not needed but have a pattern in mind in the future.
- * Interface limits what can be done at that's just fine.
- *
- * *TODO: Update/transfer unit tests
- * Unit tests: indra/test/llcommon_llstat_tut.cpp
- */
-class LLSimpleStatCounter
-{
-public:
- inline LLSimpleStatCounter() { reset(); }
- // Default destructor and assignment operator are valid
-
- inline void reset() { mCount = 0; }
-
- inline void merge(const LLSimpleStatCounter & src)
- { mCount += src.mCount; }
-
- inline U32 operator++() { return ++mCount; }
-
- inline U32 getCount() const { return mCount; }
-
-protected:
- U32 mCount;
-};
-
-
-/**
- * @class LLSimpleStatMMM
- * @brief Templated collector of min, max and mean data for stats.
- *
- * Fed a stream of data samples, keeps a running account of the
- * min, max and mean seen since construction or the last reset()
- * call. A freshly-constructed or reset instance returns counts
- * and values of zero.
- *
- * Overflows and underflows (integer, inf or -inf) and NaN's
- * are the caller's problem. As is loss of precision when
- * the running sum's exponent (when parameterized by a floating
- * point of some type) differs from a given data sample's.
- *
- * Unit tests: indra/test/llcommon_llstat_tut.cpp
- */
-template <typename VALUE_T = F32>
-class LLSimpleStatMMM
-{
-public:
- typedef VALUE_T Value;
-
-public:
- LLSimpleStatMMM() { reset(); }
- // Default destructor and assignment operator are valid
-
- /**
- * Resets the object returning all counts and derived
- * values back to zero.
- */
- void reset()
- {
- mCount = 0;
- mMin = Value(0);
- mMax = Value(0);
- mTotal = Value(0);
- }
-
- void record(Value v)
- {
- if (mCount)
- {
- mMin = llmin(mMin, v);
- mMax = llmax(mMax, v);
- }
- else
- {
- mMin = v;
- mMax = v;
- }
- mTotal += v;
- ++mCount;
- }
-
- void merge(const LLSimpleStatMMM<VALUE_T> & src)
- {
- if (! mCount)
- {
- *this = src;
- }
- else if (src.mCount)
- {
- mMin = llmin(mMin, src.mMin);
- mMax = llmax(mMax, src.mMax);
- mCount += src.mCount;
- mTotal += src.mTotal;
- }
- }
-
- inline U32 getCount() const { return mCount; }
- inline Value getMin() const { return mMin; }
- inline Value getMax() const { return mMax; }
- inline Value getMean() const { return mCount ? mTotal / mCount : mTotal; }
-
-protected:
- U32 mCount;
- Value mMin;
- Value mMax;
- Value mTotal;
-};
-
-#endif // LL_SIMPLESTAT_H
diff --git a/indra/newview/llsnapshotlivepreview.cpp b/indra/newview/llsnapshotlivepreview.cpp
index 7532ebfc57..737f665954 100644
--- a/indra/newview/llsnapshotlivepreview.cpp
+++ b/indra/newview/llsnapshotlivepreview.cpp
@@ -164,7 +164,7 @@ F32 LLSnapshotLivePreview::getImageAspect()
void LLSnapshotLivePreview::updateSnapshot(BOOL new_snapshot, BOOL new_thumbnail, F32 delay)
{
// Invalidate current image.
- lldebugs << "updateSnapshot: mSnapshotUpToDate = " << getSnapshotUpToDate() << llendl;
+ LL_DEBUGS() << "updateSnapshot: mSnapshotUpToDate = " << getSnapshotUpToDate() << LL_ENDL;
if (getSnapshotUpToDate())
{
S32 old_image_index = mCurImageIndex;
@@ -338,7 +338,7 @@ void LLSnapshotLivePreview::draw()
}
else if (mShineAnimTimer.getStarted())
{
- lldebugs << "Drawing shining animation" << llendl;
+ LL_DEBUGS() << "Drawing shining animation" << LL_ENDL;
F32 shine_interp = llmin(1.f, mShineAnimTimer.getElapsedTimeF32() / SHINE_TIME);
// draw "shine" effect
@@ -415,7 +415,7 @@ void LLSnapshotLivePreview::draw()
S32 old_image_index = (mCurImageIndex + 1) % 2;
if (mViewerImage[old_image_index].notNull() && mFallAnimTimer.getElapsedTimeF32() < FALL_TIME)
{
- lldebugs << "Drawing fall animation" << llendl;
+ LL_DEBUGS() << "Drawing fall animation" << LL_ENDL;
F32 fall_interp = mFallAnimTimer.getElapsedTimeF32() / FALL_TIME;
F32 alpha = clamp_rescale(fall_interp, 0.f, 1.f, 0.8f, 0.4f);
LLColor4 image_color(1.f, 1.f, 1.f, alpha);
@@ -459,7 +459,7 @@ void LLSnapshotLivePreview::reshape(S32 width, S32 height, BOOL called_from_pare
LLView::reshape(width, height, called_from_parent);
if (old_rect.getWidth() != width || old_rect.getHeight() != height)
{
- lldebugs << "window reshaped, updating thumbnail" << llendl;
+ LL_DEBUGS() << "window reshaped, updating thumbnail" << LL_ENDL;
updateSnapshot(FALSE, TRUE);
}
}
@@ -592,7 +592,7 @@ BOOL LLSnapshotLivePreview::onIdle( void* snapshot_preview )
LLSnapshotLivePreview* previewp = (LLSnapshotLivePreview*)snapshot_preview;
if (previewp->getWidth() == 0 || previewp->getHeight() == 0)
{
- llwarns << "Incorrect dimensions: " << previewp->getWidth() << "x" << previewp->getHeight() << llendl;
+ LL_WARNS() << "Incorrect dimensions: " << previewp->getWidth() << "x" << previewp->getHeight() << LL_ENDL;
return FALSE;
}
@@ -606,7 +606,7 @@ BOOL LLSnapshotLivePreview::onIdle( void* snapshot_preview )
previewp->mCameraRot = new_camera_rot;
// request a new snapshot whenever the camera moves, with a time delay
BOOL autosnap = gSavedSettings.getBOOL("AutoSnapshot");
- lldebugs << "camera moved, updating thumbnail" << llendl;
+ LL_DEBUGS() << "camera moved, updating thumbnail" << LL_ENDL;
previewp->updateSnapshot(
autosnap, // whether a new snapshot is needed or merely invalidate the existing one
FALSE, // or if 1st arg is false, whether to produce a new thumbnail image.
@@ -625,7 +625,7 @@ BOOL LLSnapshotLivePreview::onIdle( void* snapshot_preview )
// time to produce a snapshot
previewp->setThumbnailImageSize();
- lldebugs << "producing snapshot" << llendl;
+ LL_DEBUGS() << "producing snapshot" << LL_ENDL;
if (!previewp->mPreviewImage)
{
previewp->mPreviewImage = new LLImageRaw;
@@ -661,7 +661,7 @@ BOOL LLSnapshotLivePreview::onIdle( void* snapshot_preview )
if(previewp->getSnapshotType() == SNAPSHOT_TEXTURE)
{
- lldebugs << "Encoding new image of format J2C" << llendl;
+ LL_DEBUGS() << "Encoding new image of format J2C" << LL_ENDL;
LLPointer<LLImageJ2C> formatted = new LLImageJ2C;
LLPointer<LLImageRaw> scaled = new LLImageRaw(
previewp->mPreviewImage->getData(),
@@ -683,7 +683,7 @@ BOOL LLSnapshotLivePreview::onIdle( void* snapshot_preview )
previewp->mFormattedImage = NULL;
// now create the new one of the appropriate format.
LLFloaterSnapshot::ESnapshotFormat format = previewp->getSnapshotFormat();
- lldebugs << "Encoding new image of format " << format << llendl;
+ LL_DEBUGS() << "Encoding new image of format " << format << LL_ENDL;
switch(format)
{
@@ -763,7 +763,7 @@ BOOL LLSnapshotLivePreview::onIdle( void* snapshot_preview )
{
previewp->generateThumbnailImage() ;
}
- lldebugs << "done creating snapshot" << llendl;
+ LL_DEBUGS() << "done creating snapshot" << LL_ENDL;
LLFloaterSnapshot::postUpdate();
LLFloaterSocial::postUpdate();
@@ -772,7 +772,7 @@ BOOL LLSnapshotLivePreview::onIdle( void* snapshot_preview )
void LLSnapshotLivePreview::setSize(S32 w, S32 h)
{
- lldebugs << "setSize(" << w << ", " << h << ")" << llendl;
+ LL_DEBUGS() << "setSize(" << w << ", " << h << ")" << LL_ENDL;
setWidth(w);
setHeight(h);
}
@@ -785,7 +785,7 @@ void LLSnapshotLivePreview::getSize(S32& w, S32& h) const
void LLSnapshotLivePreview::saveTexture()
{
- lldebugs << "saving texture: " << mPreviewImage->getWidth() << "x" << mPreviewImage->getHeight() << llendl;
+ LL_DEBUGS() << "saving texture: " << mPreviewImage->getWidth() << "x" << mPreviewImage->getHeight() << LL_ENDL;
// gen a new uuid for this asset
LLTransactionID tid;
tid.generate();
@@ -798,7 +798,7 @@ void LLSnapshotLivePreview::saveTexture()
mPreviewImage->getComponents());
scaled->biasedScaleToPowerOfTwo(MAX_TEXTURE_SIZE);
- lldebugs << "scaled texture to " << scaled->getWidth() << "x" << scaled->getHeight() << llendl;
+ LL_DEBUGS() << "scaled texture to " << scaled->getWidth() << "x" << scaled->getHeight() << LL_ENDL;
if (formatted->encode(scaled, 0.0f))
{
@@ -827,10 +827,10 @@ void LLSnapshotLivePreview::saveTexture()
else
{
LLNotificationsUtil::add("ErrorEncodingSnapshot");
- llwarns << "Error encoding snapshot" << llendl;
+ LL_WARNS() << "Error encoding snapshot" << LL_ENDL;
}
- LLViewerStats::getInstance()->incStat(LLViewerStats::ST_SNAPSHOT_COUNT );
+ add(LLStatViewer::SNAPSHOT, 1);
mDataSize = 0;
}
@@ -853,7 +853,7 @@ void LLSnapshotLivePreview::saveWeb()
LLImageJPEG* jpg = dynamic_cast<LLImageJPEG*>(mFormattedImage.get());
if(!jpg)
{
- llwarns << "Formatted image not a JPEG" << llendl;
+ LL_WARNS() << "Formatted image not a JPEG" << LL_ENDL;
return;
}
diff --git a/indra/newview/llspatialpartition.cpp b/indra/newview/llspatialpartition.cpp
index 2c83f6d0b7..7b894d8d98 100755
--- a/indra/newview/llspatialpartition.cpp
+++ b/indra/newview/llspatialpartition.cpp
@@ -51,32 +51,16 @@
#include "llvoavatar.h"
#include "llvolumemgr.h"
#include "lltextureatlas.h"
-#include "llglslshader.h"
#include "llviewershadermgr.h"
-static LLFastTimer::DeclareTimer FTM_FRUSTUM_CULL("Frustum Culling");
-static LLFastTimer::DeclareTimer FTM_CULL_REBOUND("Cull Rebound Partition");
-
-const F32 SG_OCCLUSION_FUDGE = 0.25f;
-#define SG_DISCARD_TOLERANCE 0.01f
-
-#if LL_OCTREE_PARANOIA_CHECK
-#define assert_octree_valid(x) x->validate()
-#define assert_states_valid(x) ((LLSpatialGroup*) x->mSpatialPartition->mOctree->getListener(0))->checkStates()
-#else
-#define assert_octree_valid(x)
-#define assert_states_valid(x)
-#endif
+static LLTrace::BlockTimerStatHandle FTM_FRUSTUM_CULL("Frustum Culling");
+static LLTrace::BlockTimerStatHandle FTM_CULL_REBOUND("Cull Rebound Partition");
extern bool gShiftFrame;
static U32 sZombieGroups = 0;
U32 LLSpatialGroup::sNodeCount = 0;
-#define LL_TRACK_PENDING_OCCLUSION_QUERIES 0
-
-std::set<GLuint> LLSpatialGroup::sPendingQueries;
-
U32 gOctreeMaxCapacity;
BOOL LLSpatialGroup::sNoDelete = FALSE;
@@ -84,35 +68,7 @@ BOOL LLSpatialGroup::sNoDelete = FALSE;
static F32 sLastMaxTexPriority = 1.f;
static F32 sCurMaxTexPriority = 1.f;
-class LLOcclusionQueryPool : public LLGLNamePool
-{
-public:
- LLOcclusionQueryPool()
- {
-
- }
-
-protected:
-
- virtual GLuint allocateName()
- {
- GLuint ret = 0;
-
- glGenQueriesARB(1, &ret);
-
- return ret;
- }
-
- virtual void releaseName(GLuint name)
- {
-#if LL_TRACK_PENDING_OCCLUSION_QUERIES
- LLSpatialGroup::sPendingQueries.erase(name);
-#endif
- glDeleteQueriesARB(1, &name);
- }
-};
-
-static LLOcclusionQueryPool sQueryPool;
+BOOL LLSpatialPartition::sTeleportRequested = FALSE;
//static counter for frame to switch LOD on
@@ -121,190 +77,11 @@ void sg_assert(BOOL expr)
#if LL_OCTREE_PARANOIA_CHECK
if (!expr)
{
- llerrs << "Octree invalid!" << llendl;
+ LL_ERRS() << "Octree invalid!" << LL_ENDL;
}
#endif
}
-S32 AABBSphereIntersect(const LLVector3& min, const LLVector3& max, const LLVector3 &origin, const F32 &rad)
-{
- return AABBSphereIntersectR2(min, max, origin, rad*rad);
-}
-
-S32 AABBSphereIntersectR2(const LLVector3& min, const LLVector3& max, const LLVector3 &origin, const F32 &r)
-{
- F32 d = 0.f;
- F32 t;
-
- if ((min-origin).magVecSquared() < r &&
- (max-origin).magVecSquared() < r)
- {
- return 2;
- }
-
- for (U32 i = 0; i < 3; i++)
- {
- if (origin.mV[i] < min.mV[i])
- {
- t = min.mV[i] - origin.mV[i];
- d += t*t;
- }
- else if (origin.mV[i] > max.mV[i])
- {
- t = origin.mV[i] - max.mV[i];
- d += t*t;
- }
-
- if (d > r)
- {
- return 0;
- }
- }
-
- return 1;
-}
-
-
-S32 AABBSphereIntersect(const LLVector4a& min, const LLVector4a& max, const LLVector3 &origin, const F32 &rad)
-{
- return AABBSphereIntersectR2(min, max, origin, rad*rad);
-}
-
-S32 AABBSphereIntersectR2(const LLVector4a& min, const LLVector4a& max, const LLVector3 &origin, const F32 &r)
-{
- F32 d = 0.f;
- F32 t;
-
- LLVector4a origina;
- origina.load3(origin.mV);
-
- LLVector4a v;
- v.setSub(min, origina);
-
- if (v.dot3(v) < r)
- {
- v.setSub(max, origina);
- if (v.dot3(v) < r)
- {
- return 2;
- }
- }
-
-
- for (U32 i = 0; i < 3; i++)
- {
- if (origin.mV[i] < min[i])
- {
- t = min[i] - origin.mV[i];
- d += t*t;
- }
- else if (origin.mV[i] > max[i])
- {
- t = origin.mV[i] - max[i];
- d += t*t;
- }
-
- if (d > r)
- {
- return 0;
- }
- }
-
- return 1;
-}
-
-
-typedef enum
-{
- b000 = 0x00,
- b001 = 0x01,
- b010 = 0x02,
- b011 = 0x03,
- b100 = 0x04,
- b101 = 0x05,
- b110 = 0x06,
- b111 = 0x07,
-} eLoveTheBits;
-
-//contact Runitai Linden for a copy of the SL object used to write this table
-//basically, you give the table a bitmask of the look-at vector to a node and it
-//gives you a triangle fan index array
-static U16 sOcclusionIndices[] =
-{
- //000
- b111, b110, b010, b011, b001, b101, b100, b110,
- //001
- b011, b010, b000, b001, b101, b111, b110, b010,
- //010
- b101, b100, b110, b111, b011, b001, b000, b100,
- //011
- b001, b000, b100, b101, b111, b011, b010, b000,
- //100
- b110, b000, b010, b011, b111, b101, b100, b000,
- //101
- b010, b100, b000, b001, b011, b111, b110, b100,
- //110
- b100, b010, b110, b111, b101, b001, b000, b010,
- //111
- b000, b110, b100, b101, b001, b011, b010, b110,
-};
-
-U32 get_box_fan_indices(LLCamera* camera, const LLVector4a& center)
-{
- LLVector4a origin;
- origin.load3(camera->getOrigin().mV);
-
- S32 cypher = center.greaterThan(origin).getGatheredBits() & 0x7;
-
- return cypher*8;
-}
-
-U8* get_box_fan_indices_ptr(LLCamera* camera, const LLVector4a& center)
-{
- LLVector4a origin;
- origin.load3(camera->getOrigin().mV);
-
- S32 cypher = center.greaterThan(origin).getGatheredBits() & 0x7;
-
- return (U8*) (sOcclusionIndices+cypher*8);
-}
-
-//create a vertex buffer for efficiently rendering cubes
-LLVertexBuffer* ll_create_cube_vb(U32 type_mask, U32 usage)
-{
- LLVertexBuffer* ret = new LLVertexBuffer(type_mask, usage);
-
- ret->allocateBuffer(8, 64, true);
-
- LLStrider<LLVector3> pos;
- LLStrider<U16> idx;
-
- ret->getVertexStrider(pos);
- ret->getIndexStrider(idx);
-
- pos[0] = LLVector3(-1,-1,-1);
- pos[1] = LLVector3(-1,-1, 1);
- pos[2] = LLVector3(-1, 1,-1);
- pos[3] = LLVector3(-1, 1, 1);
- pos[4] = LLVector3( 1,-1,-1);
- pos[5] = LLVector3( 1,-1, 1);
- pos[6] = LLVector3( 1, 1,-1);
- pos[7] = LLVector3( 1, 1, 1);
-
- for (U32 i = 0; i < 64; i++)
- {
- idx[i] = sOcclusionIndices[i];
- }
-
- ret->flush();
-
- return ret;
-}
-
-static LLFastTimer::DeclareTimer FTM_BUILD_OCCLUSION("Build Occlusion");
-
-BOOL earlyFail(LLCamera* camera, LLSpatialGroup* group);
-
//returns:
// 0 if sphere and AABB are not intersecting
// 1 if they are
@@ -338,7 +115,7 @@ LLSpatialGroup::~LLSpatialGroup()
{
/*if (sNoDelete)
{
- llerrs << "Illegal deletion of LLSpatialGroup!" << llendl;
+ LL_ERRS() << "Illegal deletion of LLSpatialGroup!" << LL_ENDL;
}*/
if (gDebugGL)
@@ -346,24 +123,13 @@ LLSpatialGroup::~LLSpatialGroup()
gPipeline.checkReferences(this);
}
- if (isState(DEAD))
+ if (hasState(DEAD))
{
sZombieGroups--;
}
sNodeCount--;
- if (gGLManager.mHasOcclusionQuery)
- {
- for (U32 i = 0; i < LLViewerCamera::NUM_CAMERAS; ++i)
- {
- if (mOcclusionQuery[i])
- {
- sQueryPool.release(mOcclusionQuery[i]);
- }
- }
- }
-
clearDrawMap();
clearAtlasList() ;
}
@@ -497,22 +263,7 @@ void LLSpatialGroup::clearDrawMap()
BOOL LLSpatialGroup::isHUDGroup()
{
- return mSpatialPartition && mSpatialPartition->isHUDPartition() ;
-}
-
-BOOL LLSpatialGroup::isRecentlyVisible() const
-{
- return (LLDrawable::getCurrentFrame() - mVisible[LLViewerCamera::sCurCameraID]) < LLDrawable::getMinVisFrameRange() ;
-}
-
-BOOL LLSpatialGroup::isVisible() const
-{
- return mVisible[LLViewerCamera::sCurCameraID] >= LLDrawable::getCurrentFrame() ? TRUE : FALSE;
-}
-
-void LLSpatialGroup::setVisible()
-{
- mVisible[LLViewerCamera::sCurCameraID] = LLDrawable::getCurrentFrame();
+ return getSpatialPartition() && getSpatialPartition()->isHUDPartition() ;
}
void LLSpatialGroup::validate()
@@ -536,7 +287,7 @@ void LLSpatialGroup::validate()
sg_assert(drawable->getSpatialGroup() == this);
if (drawable->getSpatialBridge())
{
- sg_assert(drawable->getSpatialBridge() == mSpatialPartition->asBridge());
+ sg_assert(drawable->getSpatialBridge() == getSpatialPartition()->asBridge());
}
/*if (drawable->isSpatialBridge())
@@ -544,7 +295,7 @@ void LLSpatialGroup::validate()
LLSpatialPartition* part = drawable->asPartition();
if (!part)
{
- llerrs << "Drawable reports it is a spatial bridge but not a partition." << llendl;
+ LL_ERRS() << "Drawable reports it is a spatial bridge but not a partition." << LL_ENDL;
}
LLSpatialGroup* group = (LLSpatialGroup*) part->mOctree->getListener(0);
group->validate();
@@ -576,14 +327,6 @@ void LLSpatialGroup::validate()
#endif
}
-void LLSpatialGroup::checkStates()
-{
-#if LL_OCTREE_PARANOIA_CHECK
- //LLOctreeStateCheck checker;
- //checker.traverse(mOctreeNode);
-#endif
-}
-
void LLSpatialGroup::validateDrawMap()
{
#if LL_OCTREE_PARANOIA_CHECK
@@ -607,7 +350,7 @@ BOOL LLSpatialGroup::updateInGroup(LLDrawable *drawablep, BOOL immediate)
OctreeNode* parent = mOctreeNode->getOctParent();
if (mOctreeNode->isInside(drawablep->getPositionGroup()) &&
- (mOctreeNode->contains(drawablep) ||
+ (mOctreeNode->contains(drawablep->getEntry()) ||
(drawablep->getBinRadius() > mOctreeNode->getSize()[0] &&
parent && parent->getElementCount() >= gOctreeMaxCapacity)))
{
@@ -621,15 +364,14 @@ BOOL LLSpatialGroup::updateInGroup(LLDrawable *drawablep, BOOL immediate)
}
-BOOL LLSpatialGroup::addObject(LLDrawable *drawablep, BOOL add_all, BOOL from_octree)
+BOOL LLSpatialGroup::addObject(LLDrawable *drawablep)
{
- if (!from_octree)
+ if(!drawablep)
{
- mOctreeNode->insert(drawablep);
+ return FALSE;
}
- else
{
- drawablep->setSpatialGroup(this);
+ drawablep->setGroup(this);
setState(OBJECT_DIRTY | GEOM_DIRTY);
setOcclusionState(LLSpatialGroup::DISCARD_QUERY, LLSpatialGroup::STATE_MODE_ALL_CAMERAS);
gPipeline.markRebuild(this, TRUE);
@@ -650,9 +392,9 @@ void LLSpatialGroup::rebuildGeom()
{
if (!isDead())
{
- mSpatialPartition->rebuildGeom(this);
+ getSpatialPartition()->rebuildGeom(this);
- if (isState(LLSpatialGroup::MESH_DIRTY))
+ if (hasState(LLSpatialGroup::MESH_DIRTY))
{
gPipeline.markMeshDirty(this);
}
@@ -663,18 +405,18 @@ void LLSpatialGroup::rebuildMesh()
{
if (!isDead())
{
- mSpatialPartition->rebuildMesh(this);
+ getSpatialPartition()->rebuildMesh(this);
}
}
-static LLFastTimer::DeclareTimer FTM_REBUILD_VBO("VBO Rebuilt");
-static LLFastTimer::DeclareTimer FTM_ADD_GEOMETRY_COUNT("Add Geometry");
-static LLFastTimer::DeclareTimer FTM_CREATE_VB("Create VB");
-static LLFastTimer::DeclareTimer FTM_GET_GEOMETRY("Get Geometry");
+static LLTrace::BlockTimerStatHandle FTM_REBUILD_VBO("VBO Rebuilt");
+static LLTrace::BlockTimerStatHandle FTM_ADD_GEOMETRY_COUNT("Add Geometry");
+static LLTrace::BlockTimerStatHandle FTM_CREATE_VB("Create VB");
+static LLTrace::BlockTimerStatHandle FTM_GET_GEOMETRY("Get Geometry");
void LLSpatialPartition::rebuildGeom(LLSpatialGroup* group)
{
- if (group->isDead() || !group->isState(LLSpatialGroup::GEOM_DIRTY))
+ if (group->isDead() || !group->hasState(LLSpatialGroup::GEOM_DIRTY))
{
return;
}
@@ -685,7 +427,7 @@ void LLSpatialPartition::rebuildGeom(LLSpatialGroup* group)
group->mLastUpdateViewAngle = group->mViewAngle;
}
- LLFastTimer ftm(FTM_REBUILD_VBO);
+ LL_RECORD_BLOCK_TIME(FTM_REBUILD_VBO);
group->clearDrawMap();
@@ -694,14 +436,14 @@ void LLSpatialPartition::rebuildGeom(LLSpatialGroup* group)
U32 vertex_count = 0;
{
- LLFastTimer t(FTM_ADD_GEOMETRY_COUNT);
+ LL_RECORD_BLOCK_TIME(FTM_ADD_GEOMETRY_COUNT);
addGeometryCount(group, vertex_count, index_count);
}
if (vertex_count > 0 && index_count > 0)
{ //create vertex buffer containing volume geometry for this node
{
- LLFastTimer t(FTM_CREATE_VB);
+ LL_RECORD_BLOCK_TIME(FTM_CREATE_VB);
group->mBuilt = 1.f;
if (group->mVertexBuffer.isNull() ||
!group->mVertexBuffer->isWriteable() ||
@@ -719,7 +461,7 @@ void LLSpatialPartition::rebuildGeom(LLSpatialGroup* group)
}
{
- LLFastTimer t(FTM_GET_GEOMETRY);
+ LL_RECORD_BLOCK_TIME(FTM_GET_GEOMETRY);
getGeometry(group);
}
}
@@ -739,137 +481,26 @@ void LLSpatialPartition::rebuildMesh(LLSpatialGroup* group)
}
-BOOL LLSpatialGroup::boundObjects(BOOL empty, LLVector4a& minOut, LLVector4a& maxOut)
-{
- const OctreeNode* node = mOctreeNode;
-
- if (node->isEmpty())
- { //don't do anything if there are no objects
- if (empty && mOctreeNode->getParent())
- { //only root is allowed to be empty
- OCT_ERRS << "Empty leaf found in octree." << llendl;
- }
- return FALSE;
- }
-
- LLVector4a& newMin = mObjectExtents[0];
- LLVector4a& newMax = mObjectExtents[1];
-
- if (isState(OBJECT_DIRTY))
- { //calculate new bounding box
- clearState(OBJECT_DIRTY);
-
- //initialize bounding box to first element
- OctreeNode::const_element_iter i = node->getDataBegin();
- LLDrawable* drawablep = *i;
- const LLVector4a* minMax = drawablep->getSpatialExtents();
-
- newMin = minMax[0];
- newMax = minMax[1];
-
- for (++i; i != node->getDataEnd(); ++i)
- {
- drawablep = *i;
- minMax = drawablep->getSpatialExtents();
-
- update_min_max(newMin, newMax, minMax[0]);
- update_min_max(newMin, newMax, minMax[1]);
-
- //bin up the object
- /*for (U32 i = 0; i < 3; i++)
- {
- if (minMax[0].mV[i] < newMin.mV[i])
- {
- newMin.mV[i] = minMax[0].mV[i];
- }
- if (minMax[1].mV[i] > newMax.mV[i])
- {
- newMax.mV[i] = minMax[1].mV[i];
- }
- }*/
- }
-
- mObjectBounds[0].setAdd(newMin, newMax);
- mObjectBounds[0].mul(0.5f);
- mObjectBounds[1].setSub(newMax, newMin);
- mObjectBounds[1].mul(0.5f);
- }
-
- if (empty)
- {
- minOut = newMin;
- maxOut = newMax;
- }
- else
- {
- minOut.setMin(minOut, newMin);
- maxOut.setMax(maxOut, newMax);
- }
-
- return TRUE;
-}
-
-void LLSpatialGroup::unbound()
-{
- if (isState(DIRTY))
- {
- return;
- }
-
- setState(DIRTY);
-
- //all the parent nodes need to rebound this child
- if (mOctreeNode)
- {
- OctreeNode* parent = (OctreeNode*) mOctreeNode->getParent();
- while (parent != NULL)
- {
- LLSpatialGroup* group = (LLSpatialGroup*) parent->getListener(0);
- if (group->isState(DIRTY))
- {
- return;
- }
-
- group->setState(DIRTY);
- parent = (OctreeNode*) parent->getParent();
- }
- }
-}
-
LLSpatialGroup* LLSpatialGroup::getParent()
{
- if (isDead())
- {
- return NULL;
+ return (LLSpatialGroup*)LLViewerOctreeGroup::getParent();
}
- if(!mOctreeNode)
+BOOL LLSpatialGroup::removeObject(LLDrawable *drawablep, BOOL from_octree)
{
- return NULL;
- }
- OctreeNode* parent = mOctreeNode->getOctParent();
-
- if (parent)
+ if(!drawablep)
{
- return (LLSpatialGroup*) parent->getListener(0);
+ return FALSE;
}
- return NULL;
-}
-
-BOOL LLSpatialGroup::removeObject(LLDrawable *drawablep, BOOL from_octree)
-{
unbound();
if (mOctreeNode && !from_octree)
{
- if (!mOctreeNode->remove(drawablep))
- {
- OCT_ERRS << "Could not remove drawable from spatial group" << llendl;
- }
+ drawablep->setGroup(NULL);
}
else
{
- drawablep->setSpatialGroup(NULL);
+ drawablep->setGroup(NULL);
setState(GEOM_DIRTY);
gPipeline.markRebuild(this, TRUE);
@@ -906,22 +537,22 @@ void LLSpatialGroup::shift(const LLVector4a &offset)
mObjectExtents[0].add(offset);
mObjectExtents[1].add(offset);
- if (!mSpatialPartition->mRenderByGroup &&
- mSpatialPartition->mPartitionType != LLViewerRegion::PARTITION_TREE &&
- mSpatialPartition->mPartitionType != LLViewerRegion::PARTITION_TERRAIN &&
- mSpatialPartition->mPartitionType != LLViewerRegion::PARTITION_BRIDGE)
+ if (!getSpatialPartition()->mRenderByGroup &&
+ getSpatialPartition()->mPartitionType != LLViewerRegion::PARTITION_TREE &&
+ getSpatialPartition()->mPartitionType != LLViewerRegion::PARTITION_TERRAIN &&
+ getSpatialPartition()->mPartitionType != LLViewerRegion::PARTITION_BRIDGE)
{
setState(GEOM_DIRTY);
gPipeline.markRebuild(this, TRUE);
}
}
-class LLSpatialSetState : public LLSpatialGroup::OctreeTraveler
+class LLSpatialSetState : public OctreeTraveler
{
public:
U32 mState;
LLSpatialSetState(U32 state) : mState(state) { }
- virtual void visit(const LLSpatialGroup::OctreeNode* branch) { ((LLSpatialGroup*) branch->getListener(0))->setState(mState); }
+ virtual void visit(const OctreeNode* branch) { ((LLSpatialGroup*) branch->getListener(0))->setState(mState); }
};
class LLSpatialSetStateDiff : public LLSpatialSetState
@@ -929,24 +560,17 @@ class LLSpatialSetStateDiff : public LLSpatialSetState
public:
LLSpatialSetStateDiff(U32 state) : LLSpatialSetState(state) { }
- virtual void traverse(const LLSpatialGroup::OctreeNode* n)
+ virtual void traverse(const OctreeNode* n)
{
LLSpatialGroup* group = (LLSpatialGroup*) n->getListener(0);
- if (!group->isState(mState))
+ if (!group->hasState(mState))
{
- LLSpatialGroup::OctreeTraveler::traverse(n);
+ OctreeTraveler::traverse(n);
}
}
};
-void LLSpatialGroup::setState(U32 state)
-{
- mState |= state;
-
- llassert(state <= LLSpatialGroup::STATE_MASK);
-}
-
void LLSpatialGroup::setState(U32 state, S32 mode)
{
llassert(state <= LLSpatialGroup::STATE_MASK);
@@ -970,12 +594,12 @@ void LLSpatialGroup::setState(U32 state, S32 mode)
}
}
-class LLSpatialClearState : public LLSpatialGroup::OctreeTraveler
+class LLSpatialClearState : public OctreeTraveler
{
public:
U32 mState;
LLSpatialClearState(U32 state) : mState(state) { }
- virtual void visit(const LLSpatialGroup::OctreeNode* branch) { ((LLSpatialGroup*) branch->getListener(0))->clearState(mState); }
+ virtual void visit(const OctreeNode* branch) { ((LLSpatialGroup*) branch->getListener(0))->clearState(mState); }
};
class LLSpatialClearStateDiff : public LLSpatialClearState
@@ -983,24 +607,17 @@ class LLSpatialClearStateDiff : public LLSpatialClearState
public:
LLSpatialClearStateDiff(U32 state) : LLSpatialClearState(state) { }
- virtual void traverse(const LLSpatialGroup::OctreeNode* n)
+ virtual void traverse(const OctreeNode* n)
{
LLSpatialGroup* group = (LLSpatialGroup*) n->getListener(0);
- if (group->isState(mState))
+ if (group->hasState(mState))
{
- LLSpatialGroup::OctreeTraveler::traverse(n);
+ OctreeTraveler::traverse(n);
}
}
};
-void LLSpatialGroup::clearState(U32 state)
-{
- llassert(state <= LLSpatialGroup::STATE_MASK);
-
- mState &= ~state;
-}
-
void LLSpatialGroup::clearState(U32 state, S32 mode)
{
llassert(state <= LLSpatialGroup::STATE_MASK);
@@ -1024,144 +641,15 @@ void LLSpatialGroup::clearState(U32 state, S32 mode)
}
}
-BOOL LLSpatialGroup::isState(U32 state) const
-{
- llassert(state <= LLSpatialGroup::STATE_MASK);
-
- return mState & state ? TRUE : FALSE;
-}
-
-//=====================================
-// Occlusion State Set/Clear
-//=====================================
-class LLSpatialSetOcclusionState : public LLSpatialGroup::OctreeTraveler
-{
-public:
- U32 mState;
- LLSpatialSetOcclusionState(U32 state) : mState(state) { }
- virtual void visit(const LLSpatialGroup::OctreeNode* branch) { ((LLSpatialGroup*) branch->getListener(0))->setOcclusionState(mState); }
-};
-
-class LLSpatialSetOcclusionStateDiff : public LLSpatialSetOcclusionState
-{
-public:
- LLSpatialSetOcclusionStateDiff(U32 state) : LLSpatialSetOcclusionState(state) { }
-
- virtual void traverse(const LLSpatialGroup::OctreeNode* n)
- {
- LLSpatialGroup* group = (LLSpatialGroup*) n->getListener(0);
-
- if (!group->isOcclusionState(mState))
- {
- LLSpatialGroup::OctreeTraveler::traverse(n);
- }
- }
-};
-
-
-void LLSpatialGroup::setOcclusionState(U32 state, S32 mode)
-{
- if (mode > STATE_MODE_SINGLE)
- {
- if (mode == STATE_MODE_DIFF)
- {
- LLSpatialSetOcclusionStateDiff setter(state);
- setter.traverse(mOctreeNode);
- }
- else if (mode == STATE_MODE_BRANCH)
- {
- LLSpatialSetOcclusionState setter(state);
- setter.traverse(mOctreeNode);
- }
- else
- {
- for (U32 i = 0; i < LLViewerCamera::NUM_CAMERAS; i++)
- {
- mOcclusionState[i] |= state;
-
- if ((state & DISCARD_QUERY) && mOcclusionQuery[i])
- {
- sQueryPool.release(mOcclusionQuery[i]);
- mOcclusionQuery[i] = 0;
- }
- }
- }
- }
- else
- {
- mOcclusionState[LLViewerCamera::sCurCameraID] |= state;
- if ((state & DISCARD_QUERY) && mOcclusionQuery[LLViewerCamera::sCurCameraID])
- {
- sQueryPool.release(mOcclusionQuery[LLViewerCamera::sCurCameraID]);
- mOcclusionQuery[LLViewerCamera::sCurCameraID] = 0;
- }
- }
-}
-
-class LLSpatialClearOcclusionState : public LLSpatialGroup::OctreeTraveler
-{
-public:
- U32 mState;
-
- LLSpatialClearOcclusionState(U32 state) : mState(state) { }
- virtual void visit(const LLSpatialGroup::OctreeNode* branch) { ((LLSpatialGroup*) branch->getListener(0))->clearOcclusionState(mState); }
-};
-
-class LLSpatialClearOcclusionStateDiff : public LLSpatialClearOcclusionState
-{
-public:
- LLSpatialClearOcclusionStateDiff(U32 state) : LLSpatialClearOcclusionState(state) { }
-
- virtual void traverse(const LLSpatialGroup::OctreeNode* n)
- {
- LLSpatialGroup* group = (LLSpatialGroup*) n->getListener(0);
-
- if (group->isOcclusionState(mState))
- {
- LLSpatialGroup::OctreeTraveler::traverse(n);
- }
- }
-};
-
-void LLSpatialGroup::clearOcclusionState(U32 state, S32 mode)
-{
- if (mode > STATE_MODE_SINGLE)
- {
- if (mode == STATE_MODE_DIFF)
- {
- LLSpatialClearOcclusionStateDiff clearer(state);
- clearer.traverse(mOctreeNode);
- }
- else if (mode == STATE_MODE_BRANCH)
- {
- LLSpatialClearOcclusionState clearer(state);
- clearer.traverse(mOctreeNode);
- }
- else
- {
- for (U32 i = 0; i < LLViewerCamera::NUM_CAMERAS; i++)
- {
- mOcclusionState[i] &= ~state;
- }
- }
- }
- else
- {
- mOcclusionState[LLViewerCamera::sCurCameraID] &= ~state;
- }
-}
//======================================
// Octree Listener Implementation
//======================================
-LLSpatialGroup::LLSpatialGroup(OctreeNode* node, LLSpatialPartition* part) :
+LLSpatialGroup::LLSpatialGroup(OctreeNode* node, LLSpatialPartition* part) : LLOcclusionCullingGroup(node, part),
mObjectBoxSize(1.f),
- mState(0),
mGeometryBytes(0),
mSurfaceArea(0.f),
mBuilt(0.f),
- mOctreeNode(node),
- mSpatialPartition(part),
mVertexBuffer(NULL),
mBufferUsage(part->mBufferUsage),
mDistance(0.f),
@@ -1179,32 +667,11 @@ LLSpatialGroup::LLSpatialGroup(OctreeNode* node, LLSpatialPartition* part) :
mViewAngle.splat(0.f);
mLastUpdateViewAngle.splat(-1.f);
- mExtents[0] = mExtents[1] = mObjectBounds[0] = mObjectBounds[0] = mObjectBounds[1] =
- mObjectExtents[0] = mObjectExtents[1] = mViewAngle;
sg_assert(mOctreeNode->getListenerCount() == 0);
- mOctreeNode->addListener(this);
setState(SG_INITIAL_STATE_MASK);
gPipeline.markRebuild(this, TRUE);
- mBounds[0] = node->getCenter();
- mBounds[1] = node->getSize();
-
- part->mLODSeed = (part->mLODSeed+1)%part->mLODPeriod;
- mLODHash = part->mLODSeed;
-
- OctreeNode* oct_parent = node->getOctParent();
-
- LLSpatialGroup* parent = oct_parent ? (LLSpatialGroup*) oct_parent->getListener(0) : NULL;
-
- for (U32 i = 0; i < LLViewerCamera::NUM_CAMERAS; i++)
- {
- mOcclusionQuery[i] = 0;
- mOcclusionIssued[i] = 0;
- mOcclusionState[i] = parent ? SG_STATE_INHERIT_MASK & parent->mOcclusionState[i] : 0;
- mVisible[i] = 0;
- }
-
mRadius = 1;
mPixelArea = 1024.f;
}
@@ -1213,7 +680,7 @@ void LLSpatialGroup::updateDistance(LLCamera &camera)
{
if (LLViewerCamera::sCurCameraID != LLViewerCamera::CAMERA_WORLD)
{
- llwarns << "Attempted to update distance for camera other than world camera!" << llendl;
+ LL_WARNS() << "Attempted to update distance for camera other than world camera!" << LL_ENDL;
return;
}
@@ -1223,17 +690,17 @@ void LLSpatialGroup::updateDistance(LLCamera &camera)
}
#if !LL_RELEASE_FOR_DOWNLOAD
- if (isState(LLSpatialGroup::OBJECT_DIRTY))
+ if (hasState(LLSpatialGroup::OBJECT_DIRTY))
{
- llerrs << "Spatial group dirty on distance update." << llendl;
+ LL_ERRS() << "Spatial group dirty on distance update." << LL_ENDL;
}
#endif
if (!isEmpty())
{
- mRadius = mSpatialPartition->mRenderByGroup ? mObjectBounds[1].getLength3().getF32() :
+ mRadius = getSpatialPartition()->mRenderByGroup ? mObjectBounds[1].getLength3().getF32() :
(F32) mOctreeNode->getSize().getLength3().getF32();
- mDistance = mSpatialPartition->calcDistance(this, camera);
- mPixelArea = mSpatialPartition->calcPixelArea(this, camera);
+ mDistance = getSpatialPartition()->calcDistance(this, camera);
+ mPixelArea = getSpatialPartition()->calcPixelArea(this, camera);
}
}
@@ -1254,9 +721,9 @@ F32 LLSpatialPartition::calcDistance(LLSpatialGroup* group, LLCamera& camera)
dist = eye.getLength3().getF32();
eye.normalize3fast();
- if (!group->isState(LLSpatialGroup::ALPHA_DIRTY))
+ if (!group->hasState(LLSpatialGroup::ALPHA_DIRTY))
{
- if (!group->mSpatialPartition->isBridge())
+ if (!group->getSpatialPartition()->isBridge())
{
LLVector4a view_angle = eye;
@@ -1324,23 +791,18 @@ F32 LLSpatialGroup::getUpdateUrgency() const
}
}
-BOOL LLSpatialGroup::needsUpdate()
-{
- return (LLDrawable::getCurrentFrame()%mSpatialPartition->mLODPeriod == mLODHash) ? TRUE : FALSE;
-}
-
BOOL LLSpatialGroup::changeLOD()
{
- if (isState(ALPHA_DIRTY | OBJECT_DIRTY))
+ if (hasState(ALPHA_DIRTY | OBJECT_DIRTY))
{ ///a rebuild is going to happen, update distance and LoD
return TRUE;
}
- if (mSpatialPartition->mSlopRatio > 0.f)
+ if (getSpatialPartition()->mSlopRatio > 0.f)
{
F32 ratio = (mDistance - mLastUpdateDistance)/(llmax(mLastUpdateDistance, mRadius));
- if (fabsf(ratio) >= mSpatialPartition->mSlopRatio)
+ if (fabsf(ratio) >= getSpatialPartition()->mSlopRatio)
{
return TRUE;
}
@@ -1359,34 +821,42 @@ BOOL LLSpatialGroup::changeLOD()
return FALSE;
}
-void LLSpatialGroup::handleInsertion(const TreeNode* node, LLDrawable* drawablep)
+void LLSpatialGroup::handleInsertion(const TreeNode* node, LLViewerOctreeEntry* entry)
{
- addObject(drawablep, FALSE, TRUE);
+ addObject((LLDrawable*)entry->getDrawable());
unbound();
setState(OBJECT_DIRTY);
}
-void LLSpatialGroup::handleRemoval(const TreeNode* node, LLDrawable* drawable)
+void LLSpatialGroup::handleRemoval(const TreeNode* node, LLViewerOctreeEntry* entry)
{
- removeObject(drawable, TRUE);
- setState(OBJECT_DIRTY);
+ removeObject((LLDrawable*)entry->getDrawable(), TRUE);
+ LLViewerOctreeGroup::handleRemoval(node, entry);
}
void LLSpatialGroup::handleDestruction(const TreeNode* node)
{
- setState(DEAD);
-
+ if(isDead())
+ {
+ return;
+ }
+ setState(DEAD);
+
for (element_iter i = getDataBegin(); i != getDataEnd(); ++i)
{
- LLDrawable* drawable = *i;
- if (drawable->getSpatialGroup() == this)
+ LLViewerOctreeEntry* entry = *i;
+
+ if (entry->getGroup() == this)
{
- drawable->setSpatialGroup(NULL);
+ if(entry->hasDrawable())
+ {
+ ((LLDrawable*)entry->getDrawable())->setGroup(NULL);
+ }
}
}
//clean up avatar attachment stats
- LLSpatialBridge* bridge = mSpatialPartition->asBridge();
+ LLSpatialBridge* bridge = getSpatialPartition()->asBridge();
if (bridge)
{
if (bridge->mAvatar.notNull())
@@ -1405,25 +875,15 @@ void LLSpatialGroup::handleDestruction(const TreeNode* node)
mOctreeNode = NULL;
}
-void LLSpatialGroup::handleStateChange(const TreeNode* node)
-{
- //drop bounding box upon state change
- if (mOctreeNode != node)
- {
- mOctreeNode = (OctreeNode*) node;
- }
- unbound();
-}
-
void LLSpatialGroup::handleChildAddition(const OctreeNode* parent, OctreeNode* child)
{
if (child->getListenerCount() == 0)
{
- new LLSpatialGroup(child, mSpatialPartition);
+ new LLSpatialGroup(child, getSpatialPartition());
}
else
{
- OCT_ERRS << "LLSpatialGroup redundancy detected." << llendl;
+ OCT_ERRS << "LLSpatialGroup redundancy detected." << LL_ENDL;
}
unbound();
@@ -1431,11 +891,6 @@ void LLSpatialGroup::handleChildAddition(const OctreeNode* parent, OctreeNode* c
assert_states_valid(this);
}
-void LLSpatialGroup::handleChildRemoval(const OctreeNode* parent, const OctreeNode* child)
-{
- unbound();
-}
-
void LLSpatialGroup::destroyGL(bool keep_occlusion)
{
setState(LLSpatialGroup::GEOM_DIRTY | LLSpatialGroup::IMAGE_DIRTY);
@@ -1453,20 +908,17 @@ void LLSpatialGroup::destroyGL(bool keep_occlusion)
if (!keep_occlusion)
{
- for (U32 i = 0; i < LLViewerCamera::NUM_CAMERAS; i++)
- {
- if (mOcclusionQuery[i])
- {
- sQueryPool.release(mOcclusionQuery[i]);
- mOcclusionQuery[i] = 0;
- }
- }
+ releaseOcclusionQueryObjectNames();
}
for (LLSpatialGroup::element_iter i = getDataBegin(); i != getDataEnd(); ++i)
{
- LLDrawable* drawable = *i;
+ LLDrawable* drawable = (LLDrawable*)(*i)->getDrawable();
+ if(!drawable)
+ {
+ continue;
+ }
for (S32 j = 0; j < drawable->getNumFaces(); j++)
{
LLFace* facep = drawable->getFace(j);
@@ -1478,324 +930,27 @@ void LLSpatialGroup::destroyGL(bool keep_occlusion)
}
}
-BOOL LLSpatialGroup::rebound()
-{
- if (!isState(DIRTY))
- { //return TRUE if we're not empty
- return TRUE;
- }
-
- if (mOctreeNode->getChildCount() == 1 && mOctreeNode->getElementCount() == 0)
- {
- LLSpatialGroup* group = (LLSpatialGroup*) mOctreeNode->getChild(0)->getListener(0);
-
- //rebound single child
- group->rebound();
-
- //copy single child's bounding box
- mBounds[0] = group->mBounds[0];
- mBounds[1] = group->mBounds[1];
- mExtents[0] = group->mExtents[0];
- mExtents[1] = group->mExtents[1];
-
- //treat this node as a "chute" to a deeper level of the tree
- group->setState(SKIP_FRUSTUM_CHECK);
- }
- else if (mOctreeNode->isLeaf())
- { //copy object bounding box if this is a leaf
- boundObjects(TRUE, mExtents[0], mExtents[1]);
- mBounds[0] = mObjectBounds[0];
- mBounds[1] = mObjectBounds[1];
- }
- else
- {
- LLVector4a& newMin = mExtents[0];
- LLVector4a& newMax = mExtents[1];
-
- //get bounding box of first child
- LLSpatialGroup* group = (LLSpatialGroup*) mOctreeNode->getChild(0)->getListener(0);
- group->clearState(SKIP_FRUSTUM_CHECK);
- group->rebound();
-
- //initialize to first child
- newMin = group->mExtents[0];
- newMax = group->mExtents[1];
-
- //rebound remaining children, expanding bounding box to encompass children
- for (U32 i = 1; i < mOctreeNode->getChildCount(); i++)
- {
- group = (LLSpatialGroup*) mOctreeNode->getChild(i)->getListener(0);
- group->clearState(SKIP_FRUSTUM_CHECK);
- group->rebound();
- const LLVector4a& max = group->mExtents[1];
- const LLVector4a& min = group->mExtents[0];
-
- newMax.setMax(newMax, max);
- newMin.setMin(newMin, min);
- }
-
- boundObjects(FALSE, newMin, newMax);
-
- mBounds[0].setAdd(newMin, newMax);
- mBounds[0].mul(0.5f);
- mBounds[1].setSub(newMax, newMin);
- mBounds[1].mul(0.5f);
- }
-
- clearState(DIRTY);
-
- return TRUE;
-}
-
-static LLFastTimer::DeclareTimer FTM_OCCLUSION_READBACK("Readback Occlusion");
-static LLFastTimer::DeclareTimer FTM_OCCLUSION_WAIT("Occlusion Wait");
-
-void LLSpatialGroup::checkOcclusion()
-{
- if (LLPipeline::sUseOcclusion > 1)
- {
- LLFastTimer t(FTM_OCCLUSION_READBACK);
- LLSpatialGroup* parent = getParent();
- if (parent && parent->isOcclusionState(LLSpatialGroup::OCCLUDED))
- { //if the parent has been marked as occluded, the child is implicitly occluded
- clearOcclusionState(QUERY_PENDING | DISCARD_QUERY);
- }
- else if (isOcclusionState(QUERY_PENDING))
- { //otherwise, if a query is pending, read it back
-
- GLuint available = 0;
- if (mOcclusionQuery[LLViewerCamera::sCurCameraID])
- {
- glGetQueryObjectuivARB(mOcclusionQuery[LLViewerCamera::sCurCameraID], GL_QUERY_RESULT_AVAILABLE_ARB, &available);
-
- static LLCachedControl<bool> wait_for_query(gSavedSettings, "RenderSynchronousOcclusion", true);
-
- if (wait_for_query && mOcclusionIssued[LLViewerCamera::sCurCameraID] < gFrameCount)
- { //query was issued last frame, wait until it's available
- S32 max_loop = 1024;
- LLFastTimer t(FTM_OCCLUSION_WAIT);
- while (!available && max_loop-- > 0)
- {
- F32 max_time = llmin(gFrameIntervalSeconds*10.f, 1.f);
- //do some usefu work while we wait
- LLAppViewer::getTextureCache()->update(max_time); // unpauses the texture cache thread
- LLAppViewer::getImageDecodeThread()->update(max_time); // unpauses the image thread
- LLAppViewer::getTextureFetch()->update(max_time); // unpauses the texture fetch thread
-
- glGetQueryObjectuivARB(mOcclusionQuery[LLViewerCamera::sCurCameraID], GL_QUERY_RESULT_AVAILABLE_ARB, &available);
- }
- }
- }
- else
- {
- available = 1;
- }
-
- if (available)
- { //result is available, read it back, otherwise wait until next frame
- GLuint res = 1;
- if (!isOcclusionState(DISCARD_QUERY) && mOcclusionQuery[LLViewerCamera::sCurCameraID])
- {
- glGetQueryObjectuivARB(mOcclusionQuery[LLViewerCamera::sCurCameraID], GL_QUERY_RESULT_ARB, &res);
-#if LL_TRACK_PENDING_OCCLUSION_QUERIES
- sPendingQueries.erase(mOcclusionQuery[LLViewerCamera::sCurCameraID]);
-#endif
- }
- else if (mOcclusionQuery[LLViewerCamera::sCurCameraID])
- { //delete the query to avoid holding onto hundreds of pending queries
- sQueryPool.release(mOcclusionQuery[LLViewerCamera::sCurCameraID]);
- mOcclusionQuery[LLViewerCamera::sCurCameraID] = 0;
- }
-
- if (isOcclusionState(DISCARD_QUERY))
- {
- res = 2;
- }
-
- if (res > 0)
- {
- assert_states_valid(this);
- clearOcclusionState(LLSpatialGroup::OCCLUDED, LLSpatialGroup::STATE_MODE_DIFF);
- assert_states_valid(this);
- }
- else
- {
- assert_states_valid(this);
-
- setOcclusionState(LLSpatialGroup::OCCLUDED, LLSpatialGroup::STATE_MODE_DIFF);
-
- assert_states_valid(this);
- }
-
- clearOcclusionState(QUERY_PENDING | DISCARD_QUERY);
- }
- }
- else if (mSpatialPartition->isOcclusionEnabled() && isOcclusionState(LLSpatialGroup::OCCLUDED))
- { //check occlusion has been issued for occluded node that has not had a query issued
- assert_states_valid(this);
- clearOcclusionState(LLSpatialGroup::OCCLUDED, LLSpatialGroup::STATE_MODE_DIFF);
- assert_states_valid(this);
- }
- }
-}
-
-static LLFastTimer::DeclareTimer FTM_PUSH_OCCLUSION_VERTS("Push Occlusion");
-static LLFastTimer::DeclareTimer FTM_SET_OCCLUSION_STATE("Occlusion State");
-static LLFastTimer::DeclareTimer FTM_OCCLUSION_EARLY_FAIL("Occlusion Early Fail");
-static LLFastTimer::DeclareTimer FTM_OCCLUSION_ALLOCATE("Allocate");
-static LLFastTimer::DeclareTimer FTM_OCCLUSION_BUILD("Build");
-static LLFastTimer::DeclareTimer FTM_OCCLUSION_BEGIN_QUERY("Begin Query");
-static LLFastTimer::DeclareTimer FTM_OCCLUSION_END_QUERY("End Query");
-static LLFastTimer::DeclareTimer FTM_OCCLUSION_SET_BUFFER("Set Buffer");
-static LLFastTimer::DeclareTimer FTM_OCCLUSION_DRAW_WATER("Draw Water");
-static LLFastTimer::DeclareTimer FTM_OCCLUSION_DRAW("Draw");
-
-
-
-void LLSpatialGroup::doOcclusion(LLCamera* camera)
-{
- if (mSpatialPartition->isOcclusionEnabled() && LLPipeline::sUseOcclusion > 1)
- {
- // Don't cull hole/edge water, unless we have the GL_ARB_depth_clamp extension
- if (earlyFail(camera, this))
- {
- LLFastTimer t(FTM_OCCLUSION_EARLY_FAIL);
- setOcclusionState(LLSpatialGroup::DISCARD_QUERY);
- assert_states_valid(this);
- clearOcclusionState(LLSpatialGroup::OCCLUDED, LLSpatialGroup::STATE_MODE_DIFF);
- assert_states_valid(this);
- }
- else
- {
- if (!isOcclusionState(QUERY_PENDING) || isOcclusionState(DISCARD_QUERY))
- {
- { //no query pending, or previous query to be discarded
- LLFastTimer t(FTM_RENDER_OCCLUSION);
-
- if (!mOcclusionQuery[LLViewerCamera::sCurCameraID])
- {
- LLFastTimer t(FTM_OCCLUSION_ALLOCATE);
- mOcclusionQuery[LLViewerCamera::sCurCameraID] = sQueryPool.allocate();
- }
-
- // Depth clamp all water to avoid it being culled as a result of being
- // behind the far clip plane, and in the case of edge water to avoid
- // it being culled while still visible.
- bool const use_depth_clamp = gGLManager.mHasDepthClamp &&
- (mSpatialPartition->mDrawableType == LLDrawPool::POOL_WATER ||
- mSpatialPartition->mDrawableType == LLDrawPool::POOL_VOIDWATER);
-
- LLGLEnable clamp(use_depth_clamp ? GL_DEPTH_CLAMP : 0);
-
-#if !LL_DARWIN
- U32 mode = gGLManager.mHasOcclusionQuery2 ? GL_ANY_SAMPLES_PASSED : GL_SAMPLES_PASSED_ARB;
-#else
- U32 mode = GL_SAMPLES_PASSED_ARB;
-#endif
-
-#if LL_TRACK_PENDING_OCCLUSION_QUERIES
- sPendingQueries.insert(mOcclusionQuery[LLViewerCamera::sCurCameraID]);
-#endif
-
- {
- LLFastTimer t(FTM_PUSH_OCCLUSION_VERTS);
-
- //store which frame this query was issued on
- mOcclusionIssued[LLViewerCamera::sCurCameraID] = gFrameCount;
-
- {
- LLFastTimer t(FTM_OCCLUSION_BEGIN_QUERY);
- glBeginQueryARB(mode, mOcclusionQuery[LLViewerCamera::sCurCameraID]);
- }
-
- LLGLSLShader* shader = LLGLSLShader::sCurBoundShaderPtr;
- llassert(shader);
-
- shader->uniform3fv(LLShaderMgr::BOX_CENTER, 1, mBounds[0].getF32ptr());
- shader->uniform3f(LLShaderMgr::BOX_SIZE, mBounds[1][0]+SG_OCCLUSION_FUDGE,
- mBounds[1][1]+SG_OCCLUSION_FUDGE,
- mBounds[1][2]+SG_OCCLUSION_FUDGE);
-
- if (!use_depth_clamp && mSpatialPartition->mDrawableType == LLDrawPool::POOL_VOIDWATER)
- {
- LLFastTimer t(FTM_OCCLUSION_DRAW_WATER);
-
- LLGLSquashToFarClip squash(glh_get_current_projection(), 1);
- if (camera->getOrigin().isExactlyZero())
- { //origin is invalid, draw entire box
- gPipeline.mCubeVB->drawRange(LLRender::TRIANGLE_FAN, 0, 7, 8, 0);
- gPipeline.mCubeVB->drawRange(LLRender::TRIANGLE_FAN, 0, 7, 8, b111*8);
- }
- else
- {
- gPipeline.mCubeVB->drawRange(LLRender::TRIANGLE_FAN, 0, 7, 8, get_box_fan_indices(camera, mBounds[0]));
- }
- }
- else
- {
- LLFastTimer t(FTM_OCCLUSION_DRAW);
- if (camera->getOrigin().isExactlyZero())
- { //origin is invalid, draw entire box
- gPipeline.mCubeVB->drawRange(LLRender::TRIANGLE_FAN, 0, 7, 8, 0);
- gPipeline.mCubeVB->drawRange(LLRender::TRIANGLE_FAN, 0, 7, 8, b111*8);
- }
- else
- {
- gPipeline.mCubeVB->drawRange(LLRender::TRIANGLE_FAN, 0, 7, 8, get_box_fan_indices(camera, mBounds[0]));
- }
- }
-
-
- {
- LLFastTimer t(FTM_OCCLUSION_END_QUERY);
- glEndQueryARB(mode);
- }
- }
- }
-
- {
- LLFastTimer t(FTM_SET_OCCLUSION_STATE);
- setOcclusionState(LLSpatialGroup::QUERY_PENDING);
- clearOcclusionState(LLSpatialGroup::DISCARD_QUERY);
- }
- }
- }
- }
-}
-
//==============================================
-LLSpatialPartition::LLSpatialPartition(U32 data_mask, BOOL render_by_group, U32 buffer_usage)
+LLSpatialPartition::LLSpatialPartition(U32 data_mask, BOOL render_by_group, U32 buffer_usage, LLViewerRegion* regionp)
: mRenderByGroup(render_by_group), mBridge(NULL)
{
- mOcclusionEnabled = TRUE;
- mDrawableType = 0;
+ mRegionp = regionp;
mPartitionType = LLViewerRegion::PARTITION_NONE;
- mLODSeed = 0;
- mLODPeriod = 1;
mVertexDataMask = data_mask;
mBufferUsage = buffer_usage;
mDepthMask = FALSE;
mSlopRatio = 0.25f;
mInfiniteFarClip = FALSE;
- LLVector4a center, size;
- center.splat(0.f);
- size.splat(1.f);
-
- mOctree = new LLSpatialGroup::OctreeRoot(center,size,
- NULL);
new LLSpatialGroup(mOctree, this);
}
LLSpatialPartition::~LLSpatialPartition()
{
- delete mOctree;
- mOctree = NULL;
}
-
LLSpatialGroup *LLSpatialPartition::put(LLDrawable *drawablep, BOOL was_visible)
{
drawablep->updateSpatialExtents();
@@ -1803,11 +958,15 @@ LLSpatialGroup *LLSpatialPartition::put(LLDrawable *drawablep, BOOL was_visible)
//keep drawable from being garbage collected
LLPointer<LLDrawable> ptr = drawablep;
+ if(!drawablep->getGroup())
+ {
assert_octree_valid(mOctree);
- mOctree->insert(drawablep);
+ mOctree->insert(drawablep->getEntry());
assert_octree_valid(mOctree);
+ }
LLSpatialGroup* group = drawablep->getSpatialGroup();
+ llassert(group != NULL);
if (group && was_visible && group->isOcclusionState(LLSpatialGroup::QUERY_PENDING))
{
@@ -1821,15 +980,13 @@ BOOL LLSpatialPartition::remove(LLDrawable *drawablep, LLSpatialGroup *curp)
{
if (!curp->removeObject(drawablep))
{
- OCT_ERRS << "Failed to remove drawable from octree!" << llendl;
+ OCT_ERRS << "Failed to remove drawable from octree!" << LL_ENDL;
}
else
{
- drawablep->setSpatialGroup(NULL);
+ drawablep->setGroup(NULL);
}
- drawablep->setSpatialGroup(NULL);
-
assert_octree_valid(mOctree);
return TRUE;
@@ -1841,24 +998,24 @@ void LLSpatialPartition::move(LLDrawable *drawablep, LLSpatialGroup *curp, BOOL
// who was seeing crashing here. (See VWR-424 reported by Bunny Mayne)
if (!drawablep)
{
- OCT_ERRS << "LLSpatialPartition::move was passed a bad drawable." << llendl;
+ OCT_ERRS << "LLSpatialPartition::move was passed a bad drawable." << LL_ENDL;
return;
}
BOOL was_visible = curp ? curp->isVisible() : FALSE;
- if (curp && curp->mSpatialPartition != this)
+ if (curp && curp->getSpatialPartition() != this)
{
//keep drawable from being garbage collected
LLPointer<LLDrawable> ptr = drawablep;
- if (curp->mSpatialPartition->remove(drawablep, curp))
+ if (curp->getSpatialPartition()->remove(drawablep, curp))
{
put(drawablep, was_visible);
return;
}
else
{
- OCT_ERRS << "Drawable lost between spatial partitions on outbound transition." << llendl;
+ OCT_ERRS << "Drawable lost between spatial partitions on outbound transition." << LL_ENDL;
}
}
@@ -1873,19 +1030,19 @@ void LLSpatialPartition::move(LLDrawable *drawablep, LLSpatialGroup *curp, BOOL
LLPointer<LLDrawable> ptr = drawablep;
if (curp && !remove(drawablep, curp))
{
- OCT_ERRS << "Move couldn't find existing spatial group!" << llendl;
+ OCT_ERRS << "Move couldn't find existing spatial group!" << LL_ENDL;
}
put(drawablep, was_visible);
}
-class LLSpatialShift : public LLSpatialGroup::OctreeTraveler
+class LLSpatialShift : public OctreeTraveler
{
public:
const LLVector4a& mOffset;
LLSpatialShift(const LLVector4a& offset) : mOffset(offset) { }
- virtual void visit(const LLSpatialGroup::OctreeNode* branch)
+ virtual void visit(const OctreeNode* branch)
{
((LLSpatialGroup*) branch->getListener(0))->shift(mOffset);
}
@@ -1897,17 +1054,17 @@ void LLSpatialPartition::shift(const LLVector4a &offset)
shifter.traverse(mOctree);
}
-class LLOctreeCull : public LLSpatialGroup::OctreeTraveler
+class LLOctreeCull : public LLViewerOctreeCull
{
public:
- LLOctreeCull(LLCamera* camera)
- : mCamera(camera), mRes(0) { }
+ LLOctreeCull(LLCamera* camera) : LLViewerOctreeCull(camera) {}
- virtual bool earlyFail(LLSpatialGroup* group)
+ virtual bool earlyFail(LLViewerOctreeGroup* base_group)
{
+ LLSpatialGroup* group = (LLSpatialGroup*)base_group;
group->checkOcclusion();
- if (group->mOctreeNode->getParent() && //never occlusion cull the root node
+ if (group->getOctreeNode()->getParent() && //never occlusion cull the root node
LLPipeline::sUseOcclusion && //ignore occlusion if disabled
group->isOcclusionState(LLSpatialGroup::OCCLUDED))
{
@@ -1918,100 +1075,36 @@ public:
return false;
}
- virtual void traverse(const LLSpatialGroup::OctreeNode* n)
- {
- LLSpatialGroup* group = (LLSpatialGroup*) n->getListener(0);
-
- if (earlyFail(group))
- {
- return;
- }
-
- if (mRes == 2 ||
- (mRes && group->isState(LLSpatialGroup::SKIP_FRUSTUM_CHECK)))
- { //fully in, just add everything
- LLSpatialGroup::OctreeTraveler::traverse(n);
- }
- else
- {
- mRes = frustumCheck(group);
-
- if (mRes)
- { //at least partially in, run on down
- LLSpatialGroup::OctreeTraveler::traverse(n);
- }
-
- mRes = 0;
- }
- }
-
- virtual S32 frustumCheck(const LLSpatialGroup* group)
+ virtual S32 frustumCheck(const LLViewerOctreeGroup* group)
{
- S32 res = mCamera->AABBInFrustumNoFarClip(group->mBounds[0], group->mBounds[1]);
+ S32 res = AABBInFrustumNoFarClipGroupBounds(group);
if (res != 0)
{
- res = llmin(res, AABBSphereIntersect(group->mExtents[0], group->mExtents[1], mCamera->getOrigin(), mCamera->mFrustumCornerDist));
+ res = llmin(res, AABBSphereIntersectGroupExtents(group));
}
return res;
}
- virtual S32 frustumCheckObjects(const LLSpatialGroup* group)
+ virtual S32 frustumCheckObjects(const LLViewerOctreeGroup* group)
{
- S32 res = mCamera->AABBInFrustumNoFarClip(group->mObjectBounds[0], group->mObjectBounds[1]);
+ S32 res = AABBInFrustumNoFarClipObjectBounds(group);
if (res != 0)
{
- res = llmin(res, AABBSphereIntersect(group->mObjectExtents[0], group->mObjectExtents[1], mCamera->getOrigin(), mCamera->mFrustumCornerDist));
+ res = llmin(res, AABBSphereIntersectObjectExtents(group));
}
return res;
}
- virtual bool checkObjects(const LLSpatialGroup::OctreeNode* branch, const LLSpatialGroup* group)
- {
- if (branch->getElementCount() == 0) //no elements
- {
- return false;
- }
- else if (branch->getChildCount() == 0) //leaf state, already checked tightest bounding box
- {
- return true;
- }
- else if (mRes == 1 && !frustumCheckObjects(group)) //no objects in frustum
- {
- return false;
- }
-
- return true;
- }
-
- virtual void preprocess(LLSpatialGroup* group)
- {
-
- }
-
- virtual void processGroup(LLSpatialGroup* group)
+ virtual void processGroup(LLViewerOctreeGroup* base_group)
{
+ LLSpatialGroup* group = (LLSpatialGroup*)base_group;
if (group->needsUpdate() ||
- group->mVisible[LLViewerCamera::sCurCameraID] < LLDrawable::getCurrentFrame() - 1)
+ group->getVisible(LLViewerCamera::sCurCameraID) < LLDrawable::getCurrentFrame() - 1)
{
group->doOcclusion(mCamera);
}
gPipeline.markNotCulled(group, *mCamera);
}
-
- virtual void visit(const LLSpatialGroup::OctreeNode* branch)
- {
- LLSpatialGroup* group = (LLSpatialGroup*) branch->getListener(0);
-
- preprocess(group);
-
- if (checkObjects(branch, group))
- {
- processGroup(group);
- }
- }
-
- LLCamera *mCamera;
- S32 mRes;
};
class LLOctreeCullNoFarClip : public LLOctreeCull
@@ -2020,14 +1113,14 @@ public:
LLOctreeCullNoFarClip(LLCamera* camera)
: LLOctreeCull(camera) { }
- virtual S32 frustumCheck(const LLSpatialGroup* group)
+ virtual S32 frustumCheck(const LLViewerOctreeGroup* group)
{
- return mCamera->AABBInFrustumNoFarClip(group->mBounds[0], group->mBounds[1]);
+ return AABBInFrustumNoFarClipGroupBounds(group);
}
- virtual S32 frustumCheckObjects(const LLSpatialGroup* group)
+ virtual S32 frustumCheckObjects(const LLViewerOctreeGroup* group)
{
- S32 res = mCamera->AABBInFrustumNoFarClip(group->mObjectBounds[0], group->mObjectBounds[1]);
+ S32 res = AABBInFrustumNoFarClipObjectBounds(group);
return res;
}
};
@@ -2038,14 +1131,14 @@ public:
LLOctreeCullShadow(LLCamera* camera)
: LLOctreeCull(camera) { }
- virtual S32 frustumCheck(const LLSpatialGroup* group)
+ virtual S32 frustumCheck(const LLViewerOctreeGroup* group)
{
- return mCamera->AABBInFrustum(group->mBounds[0], group->mBounds[1]);
+ return AABBInFrustumGroupBounds(group);
}
- virtual S32 frustumCheckObjects(const LLSpatialGroup* group)
+ virtual S32 frustumCheckObjects(const LLViewerOctreeGroup* group)
{
- return mCamera->AABBInFrustum(group->mObjectBounds[0], group->mObjectBounds[1]);
+ return AABBInFrustumObjectBounds(group);
}
};
@@ -2055,9 +1148,11 @@ public:
LLOctreeCullVisExtents(LLCamera* camera, LLVector4a& min, LLVector4a& max)
: LLOctreeCullShadow(camera), mMin(min), mMax(max), mEmpty(TRUE) { }
- virtual bool earlyFail(LLSpatialGroup* group)
+ virtual bool earlyFail(LLViewerOctreeGroup* base_group)
{
- if (group->mOctreeNode->getParent() && //never occlusion cull the root node
+ LLSpatialGroup* group = (LLSpatialGroup*)base_group;
+
+ if (group->getOctreeNode()->getParent() && //never occlusion cull the root node
LLPipeline::sUseOcclusion && //ignore occlusion if disabled
group->isOcclusionState(LLSpatialGroup::OCCLUDED))
{
@@ -2067,7 +1162,7 @@ public:
return false;
}
- virtual void traverse(const LLSpatialGroup::OctreeNode* n)
+ virtual void traverse(const OctreeNode* n)
{
LLSpatialGroup* group = (LLSpatialGroup*) n->getListener(0);
@@ -2076,10 +1171,10 @@ public:
return;
}
- if ((mRes && group->isState(LLSpatialGroup::SKIP_FRUSTUM_CHECK)) ||
+ if ((mRes && group->hasState(LLSpatialGroup::SKIP_FRUSTUM_CHECK)) ||
mRes == 2)
{ //don't need to do frustum check
- LLSpatialGroup::OctreeTraveler::traverse(n);
+ OctreeTraveler::traverse(n);
}
else
{
@@ -2087,31 +1182,35 @@ public:
if (mRes)
{ //at least partially in, run on down
- LLSpatialGroup::OctreeTraveler::traverse(n);
+ OctreeTraveler::traverse(n);
}
mRes = 0;
}
}
- virtual void processGroup(LLSpatialGroup* group)
+ virtual void processGroup(LLViewerOctreeGroup* base_group)
{
- llassert(!group->isState(LLSpatialGroup::DIRTY) && !group->isEmpty())
+ LLSpatialGroup* group = (LLSpatialGroup*)base_group;
+
+ llassert(!group->hasState(LLSpatialGroup::DIRTY) && !group->isEmpty());
if (mRes < 2)
{
- if (mCamera->AABBInFrustum(group->mObjectBounds[0], group->mObjectBounds[1]) > 0)
+ if (AABBInFrustumObjectBounds(group) > 0)
{
mEmpty = FALSE;
- update_min_max(mMin, mMax, group->mObjectExtents[0]);
- update_min_max(mMin, mMax, group->mObjectExtents[1]);
+ const LLVector4a* exts = group->getObjectExtents();
+ update_min_max(mMin, mMax, exts[0]);
+ update_min_max(mMin, mMax, exts[1]);
}
}
else
{
mEmpty = FALSE;
- update_min_max(mMin, mMax, group->mExtents[0]);
- update_min_max(mMin, mMax, group->mExtents[1]);
+ const LLVector4a* exts = group->getExtents();
+ update_min_max(mMin, mMax, exts[0]);
+ update_min_max(mMin, mMax, exts[1]);
}
}
@@ -2126,10 +1225,12 @@ public:
LLOctreeCullDetectVisible(LLCamera* camera)
: LLOctreeCullShadow(camera), mResult(FALSE) { }
- virtual bool earlyFail(LLSpatialGroup* group)
+ virtual bool earlyFail(LLViewerOctreeGroup* base_group)
{
+ LLSpatialGroup* group = (LLSpatialGroup*)base_group;
+
if (mResult || //already found a node, don't check any more
- (group->mOctreeNode->getParent() && //never occlusion cull the root node
+ (group->getOctreeNode()->getParent() && //never occlusion cull the root node
LLPipeline::sUseOcclusion && //ignore occlusion if disabled
group->isOcclusionState(LLSpatialGroup::OCCLUDED)))
{
@@ -2139,9 +1240,9 @@ public:
return false;
}
- virtual void processGroup(LLSpatialGroup* group)
+ virtual void processGroup(LLViewerOctreeGroup* base_group)
{
- if (group->isVisible())
+ if (base_group->isVisible())
{
mResult = TRUE;
}
@@ -2156,17 +1257,21 @@ public:
LLOctreeSelect(LLCamera* camera, std::vector<LLDrawable*>* results)
: LLOctreeCull(camera), mResults(results) { }
- virtual bool earlyFail(LLSpatialGroup* group) { return false; }
- virtual void preprocess(LLSpatialGroup* group) { }
+ virtual bool earlyFail(LLViewerOctreeGroup* group) { return false; }
+ virtual void preprocess(LLViewerOctreeGroup* group) { }
- virtual void processGroup(LLSpatialGroup* group)
+ virtual void processGroup(LLViewerOctreeGroup* base_group)
{
- LLSpatialGroup::OctreeNode* branch = group->mOctreeNode;
+ LLSpatialGroup* group = (LLSpatialGroup*)base_group;
+ OctreeNode* branch = group->getOctreeNode();
- for (LLSpatialGroup::OctreeNode::const_element_iter i = branch->getDataBegin(); i != branch->getDataEnd(); ++i)
+ for (OctreeNode::const_element_iter i = branch->getDataBegin(); i != branch->getDataEnd(); ++i)
{
- LLDrawable* drawable = *i;
-
+ LLDrawable* drawable = (LLDrawable*)(*i)->getDrawable();
+ if(!drawable)
+ {
+ continue;
+ }
if (!drawable->isDead())
{
if (drawable->isSpatialBridge())
@@ -2291,18 +1396,24 @@ void drawBoxOutline(const LLVector4a& pos, const LLVector4a& size)
drawBoxOutline(reinterpret_cast<const LLVector3&>(pos), reinterpret_cast<const LLVector3&>(size));
}
-class LLOctreeDirty : public LLOctreeTraveler<LLDrawable>
+class LLOctreeDirty : public OctreeTraveler
{
public:
- virtual void visit(const LLOctreeNode<LLDrawable>* state)
+ LLOctreeDirty(bool no_rebuild) : mNoRebuild(no_rebuild){}
+
+ virtual void visit(const OctreeNode* state)
{
LLSpatialGroup* group = (LLSpatialGroup*) state->getListener(0);
group->destroyGL();
for (LLSpatialGroup::element_iter i = group->getDataBegin(); i != group->getDataEnd(); ++i)
{
- LLDrawable* drawable = *i;
- if (drawable->getVObj().notNull() && !group->mSpatialPartition->mRenderByGroup)
+ LLDrawable* drawable = (LLDrawable*)(*i)->getDrawable();
+ if(!drawable)
+ {
+ continue;
+ }
+ if (!mNoRebuild && drawable->getVObj().notNull() && !group->getSpatialPartition()->mRenderByGroup)
{
gPipeline.markRebuild(drawable, LLDrawable::REBUILD_ALL, TRUE);
}
@@ -2314,6 +1425,9 @@ public:
traverse(bridge->mOctree);
}
}
+
+private:
+ BOOL mNoRebuild;
};
void LLSpatialPartition::restoreGL()
@@ -2322,15 +1436,10 @@ void LLSpatialPartition::restoreGL()
void LLSpatialPartition::resetVertexBuffers()
{
- LLOctreeDirty dirty;
+ LLOctreeDirty dirty(sTeleportRequested);
dirty.traverse(mOctree);
}
-BOOL LLSpatialPartition::isOcclusionEnabled()
-{
- return mOcclusionEnabled || LLPipeline::sUseOcclusion > 2;
-}
-
BOOL LLSpatialPartition::getVisibleExtents(LLCamera& camera, LLVector3& visMin, LLVector3& visMax)
{
LLVector4a visMina, visMaxa;
@@ -2338,7 +1447,7 @@ BOOL LLSpatialPartition::getVisibleExtents(LLCamera& camera, LLVector3& visMin,
visMaxa.load3(visMax.mV);
{
- LLFastTimer ftm(FTM_CULL_REBOUND);
+ LL_RECORD_BLOCK_TIME(FTM_CULL_REBOUND);
LLSpatialGroup* group = (LLSpatialGroup*) mOctree->getListener(0);
group->rebound();
}
@@ -2364,7 +1473,7 @@ S32 LLSpatialPartition::cull(LLCamera &camera, std::vector<LLDrawable *>* result
((LLSpatialGroup*)mOctree->getListener(0))->checkStates();
#endif
{
- LLFastTimer ftm(FTM_CULL_REBOUND);
+ LL_RECORD_BLOCK_TIME(FTM_CULL_REBOUND);
LLSpatialGroup* group = (LLSpatialGroup*) mOctree->getListener(0);
group->rebound();
}
@@ -2373,27 +1482,42 @@ S32 LLSpatialPartition::cull(LLCamera &camera, std::vector<LLDrawable *>* result
((LLSpatialGroup*)mOctree->getListener(0))->validate();
#endif
-
- if (for_select)
- {
LLOctreeSelect selecter(&camera, results);
selecter.traverse(mOctree);
+
+ return 0;
}
- else if (LLPipeline::sShadowRender)
+
+S32 LLSpatialPartition::cull(LLCamera &camera, bool do_occlusion)
+{
+#if LL_OCTREE_PARANOIA_CHECK
+ ((LLSpatialGroup*)mOctree->getListener(0))->checkStates();
+#endif
{
- LLFastTimer ftm(FTM_FRUSTUM_CULL);
+ LL_RECORD_BLOCK_TIME(FTM_CULL_REBOUND);
+ LLSpatialGroup* group = (LLSpatialGroup*) mOctree->getListener(0);
+ group->rebound();
+ }
+
+#if LL_OCTREE_PARANOIA_CHECK
+ ((LLSpatialGroup*)mOctree->getListener(0))->validate();
+#endif
+
+ if (LLPipeline::sShadowRender)
+ {
+ LL_RECORD_BLOCK_TIME(FTM_FRUSTUM_CULL);
LLOctreeCullShadow culler(&camera);
culler.traverse(mOctree);
}
else if (mInfiniteFarClip || !LLPipeline::sUseFarClip)
{
- LLFastTimer ftm(FTM_FRUSTUM_CULL);
+ LL_RECORD_BLOCK_TIME(FTM_FRUSTUM_CULL);
LLOctreeCullNoFarClip culler(&camera);
culler.traverse(mOctree);
}
else
{
- LLFastTimer ftm(FTM_FRUSTUM_CULL);
+ LL_RECORD_BLOCK_TIME(FTM_FRUSTUM_CULL);
LLOctreeCull culler(&camera);
culler.traverse(mOctree);
}
@@ -2401,50 +1525,6 @@ S32 LLSpatialPartition::cull(LLCamera &camera, std::vector<LLDrawable *>* result
return 0;
}
-BOOL earlyFail(LLCamera* camera, LLSpatialGroup* group)
-{
- if (camera->getOrigin().isExactlyZero())
- {
- return FALSE;
- }
-
- const F32 vel = SG_OCCLUSION_FUDGE*2.f;
- LLVector4a fudge;
- fudge.splat(vel);
-
- const LLVector4a& c = group->mBounds[0];
- LLVector4a r;
- r.setAdd(group->mBounds[1], fudge);
-
- /*if (r.magVecSquared() > 1024.0*1024.0)
- {
- return TRUE;
- }*/
-
- LLVector4a e;
- e.load3(camera->getOrigin().mV);
-
- LLVector4a min;
- min.setSub(c,r);
- LLVector4a max;
- max.setAdd(c,r);
-
- S32 lt = e.lessThan(min).getGatheredBits() & 0x7;
- if (lt)
- {
- return FALSE;
- }
-
- S32 gt = e.greaterThan(max).getGatheredBits() & 0x7;
- if (gt)
- {
- return FALSE;
- }
-
- return TRUE;
-}
-
-
void pushVerts(LLDrawInfo* params, U32 mask)
{
LLRenderPass::applyModelMatrix(*params);
@@ -2516,7 +1596,7 @@ void pushBufferVerts(LLVertexBuffer* buffer, U32 mask)
void pushBufferVerts(LLSpatialGroup* group, U32 mask, bool push_alpha = true)
{
- if (group->mSpatialPartition->mRenderByGroup)
+ if (group->getSpatialPartition()->mRenderByGroup)
{
if (!group->mDrawMap.empty())
{
@@ -2542,7 +1622,8 @@ void pushBufferVerts(LLSpatialGroup* group, U32 mask, bool push_alpha = true)
}
/*else
{
- //drawBox(group->mBounds[0], group->mBounds[1]);
+ //const LLVector4a* bounds = group->getBounds();
+ //drawBox(bounds[0], bounds[1]);
}*/
}
@@ -2587,7 +1668,7 @@ void renderOctree(LLSpatialGroup* group)
LLVector4 col;
if (group->mBuilt > 0.f)
{
- group->mBuilt -= 2.f * gFrameIntervalSeconds;
+ group->mBuilt -= 2.f * gFrameIntervalSeconds.value();
if (group->mBufferUsage == GL_STATIC_DRAW_ARB)
{
col.setVec(1.0f, 0, 0, group->mBuilt*0.5f);
@@ -2606,14 +1687,20 @@ void renderOctree(LLSpatialGroup* group)
gGL.diffuseColor4f(1,0,0,group->mBuilt);
gGL.flush();
glLineWidth(5.f);
- drawBoxOutline(group->mObjectBounds[0], group->mObjectBounds[1]);
+
+ const LLVector4a* bounds = group->getObjectBounds();
+ drawBoxOutline(bounds[0], bounds[1]);
gGL.flush();
glLineWidth(1.f);
gGL.flush();
for (LLSpatialGroup::element_iter i = group->getDataBegin(); i != group->getDataEnd(); ++i)
{
- LLDrawable* drawable = *i;
- if (!group->mSpatialPartition->isBridge())
+ LLDrawable* drawable = (LLDrawable*)(*i)->getDrawable();
+ if(!drawable)
+ {
+ continue;
+ }
+ if (!group->getSpatialPartition()->isBridge())
{
gGL.pushMatrix();
LLVector3 trans = drawable->getRegion()->getOriginAgent();
@@ -2645,7 +1732,7 @@ void renderOctree(LLSpatialGroup* group)
}
}
- if (!group->mSpatialPartition->isBridge())
+ if (!group->getSpatialPartition()->isBridge())
{
gGL.popMatrix();
}
@@ -2657,7 +1744,7 @@ void renderOctree(LLSpatialGroup* group)
else
{
if (group->mBufferUsage == GL_STATIC_DRAW_ARB && !group->isEmpty()
- && group->mSpatialPartition->mRenderByGroup)
+ && group->getSpatialPartition()->mRenderByGroup)
{
col.setVec(0.8f, 0.4f, 0.1f, 0.1f);
}
@@ -2670,9 +1757,10 @@ void renderOctree(LLSpatialGroup* group)
gGL.diffuseColor4fv(col.mV);
LLVector4a fudge;
fudge.splat(0.001f);
- LLVector4a size = group->mObjectBounds[1];
- size.mul(1.01f);
- size.add(fudge);
+
+ //LLVector4a size = group->mObjectBounds[1];
+ //size.mul(1.01f);
+ //size.add(fudge);
//{
// LLGLDepthTest depth(GL_TRUE, GL_FALSE);
@@ -2688,10 +1776,12 @@ void renderOctree(LLSpatialGroup* group)
//drawBoxOutline(group->mObjectBounds[0], group->mObjectBounds[1]);
gGL.diffuseColor4f(0,1,1,1);
- drawBoxOutline(group->mBounds[0],group->mBounds[1]);
+
+ const LLVector4a* bounds = group->getBounds();
+ drawBoxOutline(bounds[0], bounds[1]);
//draw bounding box for draw info
- /*if (group->mSpatialPartition->mRenderByGroup)
+ /*if (group->getSpatialPartition()->mRenderByGroup)
{
gGL.diffuseColor4f(1.0f, 0.75f, 0.25f, 0.6f);
for (LLSpatialGroup::draw_map_t::iterator i = group->mDrawMap.begin(); i != group->mDrawMap.end(); ++i)
@@ -2821,7 +1911,7 @@ void renderXRay(LLSpatialGroup* group, LLCamera* camera)
for (LLSpatialGroup::element_iter iter = group->getDataBegin(); iter != group->getDataEnd(); ++iter)
{
- LLDrawable* drawable = *iter;
+ LLDrawable* drawable = (LLDrawable*)(*iter)->getDrawable();
if (drawable->getVObj().notNull() && drawable->getVObj()->isSelected())
{
selected = true;
@@ -2832,13 +1922,13 @@ void renderXRay(LLSpatialGroup* group, LLCamera* camera)
if (selected)
{ //store for rendering occlusion volume as overlay
- if (!group->mSpatialPartition->isBridge())
+ if (!group->getSpatialPartition()->isBridge())
{
visible_selected_groups.insert(group);
}
else
{
- visible_selected_groups.insert(group->mSpatialPartition->asBridge()->getSpatialGroup());
+ visible_selected_groups.insert(group->getSpatialPartition()->asBridge()->getSpatialGroup());
}
}
}
@@ -2889,7 +1979,7 @@ void renderUpdateType(LLDrawable* drawablep)
gGL.diffuseColor4f(0,0,1,0.5f);
break;
default:
- llwarns << "Unknown update_type " << vobj->getLastUpdateType() << llendl;
+ LL_WARNS() << "Unknown update_type " << vobj->getLastUpdateType() << LL_ENDL;
break;
};
S32 num_faces = drawablep->getNumFaces();
@@ -3539,7 +2629,7 @@ void renderPhysicsShape(LLDrawable* drawable, LLVOVolume* volume)
}
else
{
- llerrs << "Unhandled type" << llendl;
+ LL_ERRS() << "Unhandled type" << LL_ENDL;
}
gGL.popMatrix();
@@ -3547,9 +2637,13 @@ void renderPhysicsShape(LLDrawable* drawable, LLVOVolume* volume)
void renderPhysicsShapes(LLSpatialGroup* group)
{
- for (LLSpatialGroup::OctreeNode::const_element_iter i = group->getDataBegin(); i != group->getDataEnd(); ++i)
+ for (OctreeNode::const_element_iter i = group->getDataBegin(); i != group->getDataEnd(); ++i)
{
- LLDrawable* drawable = *i;
+ LLDrawable* drawable = (LLDrawable*)(*i)->getDrawable();
+ if(!drawable)
+ {
+ continue;
+ }
if (drawable->isSpatialBridge())
{
@@ -3568,7 +2662,7 @@ void renderPhysicsShapes(LLSpatialGroup* group)
LLVOVolume* volume = drawable->getVOVolume();
if (volume && !volume->isAttachment() && volume->getPhysicsShapeType() != LLViewerObject::PHYSICS_SHAPE_NONE )
{
- if (!group->mSpatialPartition->isBridge())
+ if (!group->getSpatialPartition()->isBridge())
{
gGL.pushMatrix();
LLVector3 trans = drawable->getRegion()->getOriginAgent();
@@ -4133,17 +3227,18 @@ void renderAgentTarget(LLVOAvatar* avatar)
}
}
-class LLOctreeRenderNonOccluded : public LLOctreeTraveler<LLDrawable>
+class LLOctreeRenderNonOccluded : public OctreeTraveler
{
public:
LLCamera* mCamera;
LLOctreeRenderNonOccluded(LLCamera* camera): mCamera(camera) {}
- virtual void traverse(const LLSpatialGroup::OctreeNode* node)
+ virtual void traverse(const OctreeNode* node)
{
LLSpatialGroup* group = (LLSpatialGroup*) node->getListener(0);
- if (!mCamera || mCamera->AABBInFrustumNoFarClip(group->mBounds[0], group->mBounds[1]))
+ const LLVector4a* bounds = group->getBounds();
+ if (!mCamera || mCamera->AABBInFrustumNoFarClip(bounds[0], bounds[1]))
{
node->accept(this);
stop_glerror();
@@ -4183,11 +3278,11 @@ public:
}
}
- virtual void visit(const LLSpatialGroup::OctreeNode* branch)
+ virtual void visit(const OctreeNode* branch)
{
LLSpatialGroup* group = (LLSpatialGroup*) branch->getListener(0);
-
- if (group->isState(LLSpatialGroup::GEOM_DIRTY) || (mCamera && !mCamera->AABBInFrustumNoFarClip(group->mBounds[0], group->mBounds[1])))
+ const LLVector4a* bounds = group->getBounds();
+ if (group->hasState(LLSpatialGroup::GEOM_DIRTY) || (mCamera && !mCamera->AABBInFrustumNoFarClip(bounds[0], bounds[1])))
{
return;
}
@@ -4200,18 +3295,18 @@ public:
if (!group->isEmpty())
{
gGL.diffuseColor3f(0,0,1);
-
- llassert(group->mObjectBounds[0].isFinite3());
- llassert(group->mObjectBounds[1].isFinite3());
-
- drawBoxOutline(group->mObjectBounds[0],
- group->mObjectBounds[1]);
+ const LLVector4a* obj_bounds = group->getObjectBounds();
+ drawBoxOutline(obj_bounds[0], obj_bounds[1]);
}
}
- for (LLSpatialGroup::OctreeNode::const_element_iter i = branch->getDataBegin(); i != branch->getDataEnd(); ++i)
+ for (OctreeNode::const_element_iter i = branch->getDataBegin(); i != branch->getDataEnd(); ++i)
{
- LLDrawable* drawable = *i;
+ LLDrawable* drawable = (LLDrawable*)(*i)->getDrawable();
+ if(!drawable)
+ {
+ continue;
+ }
if (gPipeline.hasRenderDebugMask(LLPipeline::RENDER_DEBUG_BBOXES))
{
@@ -4297,11 +3392,11 @@ public:
{
if (facep->mDrawInfo->mTextureList.size() <= index)
{
- llerrs << "Face texture index out of bounds." << llendl;
+ LL_ERRS() << "Face texture index out of bounds." << LL_ENDL;
}
else if (facep->mDrawInfo->mTextureList[index] != facep->getTexture())
{
- llerrs << "Face texture index incorrect." << llendl;
+ LL_ERRS() << "Face texture index incorrect." << LL_ENDL;
}
}
}
@@ -4333,17 +3428,18 @@ public:
}
};
-class LLOctreeRenderXRay : public LLOctreeTraveler<LLDrawable>
+class LLOctreeRenderXRay : public OctreeTraveler
{
public:
LLCamera* mCamera;
LLOctreeRenderXRay(LLCamera* camera): mCamera(camera) {}
- virtual void traverse(const LLSpatialGroup::OctreeNode* node)
+ virtual void traverse(const OctreeNode* node)
{
LLSpatialGroup* group = (LLSpatialGroup*) node->getListener(0);
- if (!mCamera || mCamera->AABBInFrustumNoFarClip(group->mBounds[0], group->mBounds[1]))
+ const LLVector4a* bounds = group->getBounds();
+ if (!mCamera || mCamera->AABBInFrustumNoFarClip(bounds[0], bounds[1]))
{
node->accept(this);
stop_glerror();
@@ -4372,21 +3468,22 @@ public:
}
}
- virtual void visit(const LLSpatialGroup::OctreeNode* node) {}
+ virtual void visit(const OctreeNode* node) {}
};
-class LLOctreeRenderPhysicsShapes : public LLOctreeTraveler<LLDrawable>
+class LLOctreeRenderPhysicsShapes : public OctreeTraveler
{
public:
LLCamera* mCamera;
LLOctreeRenderPhysicsShapes(LLCamera* camera): mCamera(camera) {}
- virtual void traverse(const LLSpatialGroup::OctreeNode* node)
+ virtual void traverse(const OctreeNode* node)
{
LLSpatialGroup* group = (LLSpatialGroup*) node->getListener(0);
- if (!mCamera || mCamera->AABBInFrustumNoFarClip(group->mBounds[0], group->mBounds[1]))
+ const LLVector4a* bounds = group->getBounds();
+ if (!mCamera || mCamera->AABBInFrustumNoFarClip(bounds[0], bounds[1]))
{
node->accept(this);
stop_glerror();
@@ -4404,23 +3501,24 @@ public:
}
}
- virtual void visit(const LLSpatialGroup::OctreeNode* branch)
+ virtual void visit(const OctreeNode* branch)
{
}
};
-class LLOctreePushBBoxVerts : public LLOctreeTraveler<LLDrawable>
+class LLOctreePushBBoxVerts : public OctreeTraveler
{
public:
LLCamera* mCamera;
LLOctreePushBBoxVerts(LLCamera* camera): mCamera(camera) {}
- virtual void traverse(const LLSpatialGroup::OctreeNode* node)
+ virtual void traverse(const OctreeNode* node)
{
LLSpatialGroup* group = (LLSpatialGroup*) node->getListener(0);
- if (!mCamera || mCamera->AABBInFrustum(group->mBounds[0], group->mBounds[1]))
+ const LLVector4a* bounds = group->getBounds();
+ if (!mCamera || mCamera->AABBInFrustum(bounds[0], bounds[1]))
{
node->accept(this);
@@ -4431,19 +3529,23 @@ public:
}
}
- virtual void visit(const LLSpatialGroup::OctreeNode* branch)
+ virtual void visit(const OctreeNode* branch)
{
LLSpatialGroup* group = (LLSpatialGroup*) branch->getListener(0);
- if (group->isState(LLSpatialGroup::GEOM_DIRTY) || (mCamera && !mCamera->AABBInFrustumNoFarClip(group->mBounds[0], group->mBounds[1])))
+ const LLVector4a* bounds = group->getBounds();
+ if (group->hasState(LLSpatialGroup::GEOM_DIRTY) || (mCamera && !mCamera->AABBInFrustumNoFarClip(bounds[0], bounds[1])))
{
return;
}
- for (LLSpatialGroup::OctreeNode::const_element_iter i = branch->getDataBegin(); i != branch->getDataEnd(); ++i)
+ for (OctreeNode::const_element_iter i = branch->getDataBegin(); i != branch->getDataEnd(); ++i)
{
- LLDrawable* drawable = *i;
-
+ LLDrawable* drawable = (LLDrawable*)(*i)->getDrawable();
+ if(!drawable)
+ {
+ continue;
+ }
renderBoundingBox(drawable, FALSE);
}
}
@@ -4455,7 +3557,7 @@ void LLSpatialPartition::renderIntersectingBBoxes(LLCamera* camera)
pusher.traverse(mOctree);
}
-class LLOctreeStateCheck : public LLOctreeTraveler<LLDrawable>
+class LLOctreeStateCheck : public OctreeTraveler
{
public:
U32 mInheritedMask[LLViewerCamera::NUM_CAMERAS];
@@ -4468,7 +3570,7 @@ public:
}
}
- virtual void traverse(const LLSpatialGroup::OctreeNode* node)
+ virtual void traverse(const OctreeNode* node)
{
LLSpatialGroup* group = (LLSpatialGroup*) node->getListener(0);
@@ -4495,7 +3597,7 @@ public:
}
- virtual void visit(const LLOctreeNode<LLDrawable>* state)
+ virtual void visit(const OctreeNode* state)
{
LLSpatialGroup* group = (LLSpatialGroup*) state->getListener(0);
@@ -4503,11 +3605,11 @@ public:
{
if (mInheritedMask[i] && !(group->mOcclusionState[i] & mInheritedMask[i]))
{
- llerrs << "Spatial group failed inherited mask test." << llendl;
+ LL_ERRS() << "Spatial group failed inherited mask test." << LL_ENDL;
}
}
- if (group->isState(LLSpatialGroup::DIRTY))
+ if (group->hasState(LLSpatialGroup::DIRTY))
{
assert_parent_state(group, LLSpatialGroup::DIRTY);
}
@@ -4518,9 +3620,9 @@ public:
LLSpatialGroup* parent = group->getParent();
while (parent)
{
- if (!parent->isState(state))
+ if (!parent->hasState(state))
{
- llerrs << "Spatial group failed parent state check." << llendl;
+ LL_ERRS() << "Spatial group failed parent state check." << LL_ENDL;
}
parent = parent->getParent();
}
@@ -4654,7 +3756,7 @@ BOOL LLSpatialPartition::isVisible(const LLVector3& v)
}
LL_ALIGN_PREFIX(16)
-class LLOctreeIntersect : public LLSpatialGroup::OctreeTraveler
+class LLOctreeIntersect : public LLOctreeTraveler<LLViewerOctreeEntry>
{
public:
LL_ALIGN_16(LLVector4a mStart);
@@ -4682,21 +3784,21 @@ public:
{
}
- virtual void visit(const LLSpatialGroup::OctreeNode* branch)
+ virtual void visit(const OctreeNode* branch)
{
- for (LLSpatialGroup::OctreeNode::const_element_iter i = branch->getDataBegin(); i != branch->getDataEnd(); ++i)
+ for (OctreeNode::const_element_iter i = branch->getDataBegin(); i != branch->getDataEnd(); ++i)
{
check(*i);
}
}
- virtual LLDrawable* check(const LLSpatialGroup::OctreeNode* node)
+ virtual LLDrawable* check(const OctreeNode* node)
{
node->accept(this);
for (U32 i = 0; i < node->getChildCount(); i++)
{
- const LLSpatialGroup::OctreeNode* child = node->getChild(i);
+ const OctreeNode* child = node->getChild(i);
LLVector3 res;
LLSpatialGroup* group = (LLSpatialGroup*) child->getListener(0);
@@ -4704,17 +3806,18 @@ public:
LLVector4a size;
LLVector4a center;
- size = group->mBounds[1];
- center = group->mBounds[0];
+ const LLVector4a* bounds = group->getBounds();
+ size = bounds[1];
+ center = bounds[0];
LLVector4a local_start = mStart;
LLVector4a local_end = mEnd;
- if (group->mSpatialPartition->isBridge())
+ if (group->getSpatialPartition()->isBridge())
{
- LLMatrix4 local_matrix = group->mSpatialPartition->asBridge()->mDrawable->getRenderMatrix();
+ LLMatrix4 local_matrix = group->getSpatialPartition()->asBridge()->mDrawable->getRenderMatrix();
local_matrix.invert();
-
+
LLMatrix4a local_matrix4a;
local_matrix4a.loadu(local_matrix);
@@ -4731,8 +3834,10 @@ public:
return mHit;
}
- virtual bool check(LLDrawable* drawable)
+ virtual bool check(LLViewerOctreeEntry* entry)
{
+ LLDrawable* drawable = (LLDrawable*)entry->getDrawable();
+
if (!drawable || !gPipeline.hasRenderType(drawable->getRenderType()) || !drawable->isVisible())
{
return false;
@@ -4812,7 +3917,7 @@ LLDrawable* LLSpatialPartition::lineSegmentIntersect(const LLVector4a& start, co
LLDrawInfo::LLDrawInfo(U16 start, U16 end, U32 count, U32 offset,
LLViewerTexture* texture, LLVertexBuffer* buffer,
BOOL fullbright, U8 bump, BOOL particle, F32 part_size)
-:
+: LLTrace::MemTrackableNonVirtual<LLDrawInfo, 16>("LLDrawInfo"),
mVertexBuffer(buffer),
mTexture(texture),
mTextureMatrix(NULL),
@@ -4849,7 +3954,7 @@ LLDrawInfo::~LLDrawInfo()
{
/*if (LLSpatialGroup::sNoDelete)
{
- llerrs << "LLDrawInfo deleted illegally!" << llendl;
+ LL_ERRS() << "LLDrawInfo deleted illegally!" << LL_ENDL;
}*/
if (mFace)
@@ -5127,10 +4232,8 @@ void LLCullResult::assertDrawMapsEmpty()
{
if (mRenderMapSize[i] != 0)
{
- llerrs << "Stale LLDrawInfo's in LLCullResult!" << llendl;
+ LL_ERRS() << "Stale LLDrawInfo's in LLCullResult!" << LL_ENDL;
}
}
}
-
-
diff --git a/indra/newview/llspatialpartition.h b/indra/newview/llspatialpartition.h
index f26defd5e1..a7b99a0f6b 100755
--- a/indra/newview/llspatialpartition.h
+++ b/indra/newview/llspatialpartition.h
@@ -45,48 +45,31 @@
#define SG_STATE_INHERIT_MASK (OCCLUDED)
#define SG_INITIAL_STATE_MASK (DIRTY | GEOM_DIRTY)
+class LLViewerOctreePartition;
class LLSpatialPartition;
class LLSpatialBridge;
class LLSpatialGroup;
class LLTextureAtlas;
class LLTextureAtlasSlot;
+class LLViewerRegion;
-S32 AABBSphereIntersect(const LLVector4a& min, const LLVector4a& max, const LLVector3 &origin, const F32 &rad);
-S32 AABBSphereIntersectR2(const LLVector4a& min, const LLVector4a& max, const LLVector3 &origin, const F32 &radius_squared);
-
-S32 AABBSphereIntersect(const LLVector3& min, const LLVector3& max, const LLVector3 &origin, const F32 &rad);
-S32 AABBSphereIntersectR2(const LLVector3& min, const LLVector3& max, const LLVector3 &origin, const F32 &radius_squared);
void pushVerts(LLFace* face, U32 mask);
-// get index buffer for binary encoded axis vertex buffer given a box at center being viewed by given camera
-U32 get_box_fan_indices(LLCamera* camera, const LLVector4a& center);
-U8* get_box_fan_indices_ptr(LLCamera* camera, const LLVector4a& center);
-
-class LLDrawInfo : public LLRefCount
+class LLDrawInfo : public LLRefCount, public LLTrace::MemTrackableNonVirtual<LLDrawInfo, 16>
{
protected:
~LLDrawInfo();
public:
- void* operator new(size_t size)
- {
- return ll_aligned_malloc(size,64);
- }
-
- void operator delete(void* ptr)
- {
- ll_aligned_free(ptr);
- }
-
-
LLDrawInfo(const LLDrawInfo& rhs)
+ : LLTrace::MemTrackableNonVirtual<LLDrawInfo, 16>("LLDrawInfo")
{
*this = rhs;
}
const LLDrawInfo& operator=(const LLDrawInfo& rhs)
{
- llerrs << "Illegal operation!" << llendl;
+ LL_ERRS() << "Illegal operation!" << LL_ENDL;
return *this;
}
@@ -185,7 +168,7 @@ public:
}
};
-
+
struct CompareBump
{
bool operator()(const LLPointer<LLDrawInfo>& lhs, const LLPointer<LLDrawInfo>& rhs)
@@ -208,34 +191,23 @@ public:
};
LL_ALIGN_PREFIX(64)
-class LLSpatialGroup : public LLOctreeListener<LLDrawable>
+class LLSpatialGroup : public LLOcclusionCullingGroup
{
friend class LLSpatialPartition;
friend class LLOctreeStateCheck;
public:
- LLSpatialGroup(const LLSpatialGroup& rhs)
+ LLSpatialGroup(const LLSpatialGroup& rhs) : LLOcclusionCullingGroup(rhs)
{
*this = rhs;
}
- void* operator new(size_t size)
- {
- return ll_aligned_malloc_16(size);
- }
-
- void operator delete(void* ptr)
- {
- ll_aligned_free_16(ptr);
- }
-
const LLSpatialGroup& operator=(const LLSpatialGroup& rhs)
{
- llerrs << "Illegal operation!" << llendl;
+ LL_ERRS() << "Illegal operation!" << LL_ENDL;
return *this;
}
- static std::set<GLuint> sPendingQueries; //pending occlusion queries
static U32 sNodeCount;
static BOOL sNoDelete; //deletion of spatial groups and draw info not allowed if TRUE
@@ -247,15 +219,6 @@ public:
typedef std::map<LLFace*, buffer_list_t> buffer_texture_map_t;
typedef std::map<U32, buffer_texture_map_t> buffer_map_t;
- typedef LLOctreeListener<LLDrawable> BaseType;
- typedef LLOctreeListener<LLDrawable> OctreeListener;
- typedef LLTreeNode<LLDrawable> TreeNode;
- typedef LLOctreeNode<LLDrawable> OctreeNode;
- typedef LLOctreeRoot<LLDrawable> OctreeRoot;
- typedef LLOctreeTraveler<LLDrawable> OctreeTraveler;
- typedef LLOctreeNode<LLDrawable>::element_iter element_iter;
- typedef LLOctreeNode<LLDrawable>::element_list element_list;
-
struct CompareDistanceGreater
{
bool operator()(const LLSpatialGroup* const& lhs, const LLSpatialGroup* const& rhs)
@@ -282,104 +245,56 @@ public:
typedef enum
{
- OCCLUDED = 0x00010000,
- QUERY_PENDING = 0x00020000,
- ACTIVE_OCCLUSION = 0x00040000,
- DISCARD_QUERY = 0x00080000,
- EARLY_FAIL = 0x00100000,
- } eOcclusionState;
-
- typedef enum
- {
- DEAD = 0x00000001,
- DIRTY = 0x00000002,
- OBJECT_DIRTY = 0x00000004,
- GEOM_DIRTY = 0x00000008,
- ALPHA_DIRTY = 0x00000010,
- SKIP_FRUSTUM_CHECK = 0x00000020,
- IN_IMAGE_QUEUE = 0x00000040,
- IMAGE_DIRTY = 0x00000080,
- MESH_DIRTY = 0x00000100,
- NEW_DRAWINFO = 0x00000200,
- IN_BUILD_Q1 = 0x00000400,
- IN_BUILD_Q2 = 0x00000800,
+ GEOM_DIRTY = LLViewerOctreeGroup::INVALID_STATE,
+ ALPHA_DIRTY = (GEOM_DIRTY << 1),
+ IN_IMAGE_QUEUE = (ALPHA_DIRTY << 1),
+ IMAGE_DIRTY = (IN_IMAGE_QUEUE << 1),
+ MESH_DIRTY = (IMAGE_DIRTY << 1),
+ NEW_DRAWINFO = (MESH_DIRTY << 1),
+ IN_BUILD_Q1 = (NEW_DRAWINFO << 1),
+ IN_BUILD_Q2 = (IN_BUILD_Q1 << 1),
STATE_MASK = 0x0000FFFF,
} eSpatialState;
- typedef enum
- {
- STATE_MODE_SINGLE = 0, //set one node
- STATE_MODE_BRANCH, //set entire branch
- STATE_MODE_DIFF, //set entire branch as long as current state is different
- STATE_MODE_ALL_CAMERAS, //used for occlusion state, set state for all cameras
- } eSetStateMode;
-
LLSpatialGroup(OctreeNode* node, LLSpatialPartition* part);
BOOL isHUDGroup() ;
- BOOL isDead() { return isState(DEAD); }
- BOOL isState(U32 state) const;
- BOOL isOcclusionState(U32 state) const { return mOcclusionState[LLViewerCamera::sCurCameraID] & state ? TRUE : FALSE; }
- U32 getState() { return mState; }
- void setState(U32 state);
- void clearState(U32 state);
void clearDrawMap();
void validate();
- void checkStates();
void validateDrawMap();
void setState(U32 state, S32 mode);
void clearState(U32 state, S32 mode);
-
- void setOcclusionState(U32 state, S32 mode = STATE_MODE_SINGLE);
- void clearOcclusionState(U32 state, S32 mode = STATE_MODE_SINGLE);
+ void clearState(U32 state) {mState &= ~state;}
LLSpatialGroup* getParent();
-
- BOOL addObject(LLDrawable *drawablep, BOOL add_all = FALSE, BOOL from_octree = FALSE);
+ BOOL addObject(LLDrawable *drawablep);
BOOL removeObject(LLDrawable *drawablep, BOOL from_octree = FALSE);
BOOL updateInGroup(LLDrawable *drawablep, BOOL immediate = FALSE); // Update position if it's in the group
- BOOL isVisible() const;
- BOOL isRecentlyVisible() const;
- void setVisible();
void shift(const LLVector4a &offset);
- BOOL boundObjects(BOOL empty, LLVector4a& newMin, LLVector4a& newMax);
- void unbound();
- BOOL rebound();
- void checkOcclusion(); //read back last occlusion query (if any)
- void doOcclusion(LLCamera* camera); //issue occlusion query
void destroyGL(bool keep_occlusion = false);
void updateDistance(LLCamera& camera);
- BOOL needsUpdate();
F32 getUpdateUrgency() const;
BOOL changeLOD();
void rebuildGeom();
void rebuildMesh();
+ void setState(U32 state) {mState |= state;}
void dirtyGeom() { setState(GEOM_DIRTY); }
void dirtyMesh() { setState(MESH_DIRTY); }
- //octree wrappers to make code more readable
- element_list& getData() { return mOctreeNode->getData(); }
- element_iter getDataBegin() { return mOctreeNode->getDataBegin(); }
- element_iter getDataEnd() { return mOctreeNode->getDataEnd(); }
- bool hasElement(LLDrawable* drawablep) { return std::find(mOctreeNode->getDataBegin(), mOctreeNode->getDataEnd(), drawablep) != mOctreeNode->getDataEnd(); }
-
- U32 getElementCount() const { return mOctreeNode->getElementCount(); }
- bool isEmpty() const { return mOctreeNode->isEmpty(); }
-
void drawObjectBox(LLColor4 col);
+ LLSpatialPartition* getSpatialPartition() {return (LLSpatialPartition*)mSpatialPartition;}
+
//LISTENER FUNCTIONS
- virtual void handleInsertion(const TreeNode* node, LLDrawable* face);
- virtual void handleRemoval(const TreeNode* node, LLDrawable* face);
+ virtual void handleInsertion(const TreeNode* node, LLViewerOctreeEntry* face);
+ virtual void handleRemoval(const TreeNode* node, LLViewerOctreeEntry* face);
virtual void handleDestruction(const TreeNode* node);
- virtual void handleStateChange(const TreeNode* node);
virtual void handleChildAddition(const OctreeNode* parent, OctreeNode* child);
- virtual void handleChildRemoval(const OctreeNode* parent, const OctreeNode* child);
//-------------------
//for atlas use
@@ -402,21 +317,6 @@ public:
public:
- typedef enum
- {
- BOUNDS = 0,
- EXTENTS = 2,
- OBJECT_BOUNDS = 4,
- OBJECT_EXTENTS = 6,
- VIEW_ANGLE = 8,
- LAST_VIEW_ANGLE = 9,
- V4_COUNT = 10
- } eV4Index;
-
- LL_ALIGN_16(LLVector4a mBounds[2]); // bounding box (center, size) of this node and all its children (tight fit to objects)
- LL_ALIGN_16(LLVector4a mExtents[2]); // extents (min, max) of this node and all its children
- LL_ALIGN_16(LLVector4a mObjectExtents[2]); // extents (min, max) of objects in this node
- LL_ALIGN_16(LLVector4a mObjectBounds[2]); // bounding box (center, size) of objects in this node
LL_ALIGN_16(LLVector4a mViewAngle);
LL_ALIGN_16(LLVector4a mLastUpdateViewAngle);
@@ -437,11 +337,6 @@ private:
protected:
virtual ~LLSpatialGroup();
- U32 mState;
- U32 mOcclusionState[LLViewerCamera::NUM_CAMERAS];
- U32 mOcclusionIssued[LLViewerCamera::NUM_CAMERAS];
-
- S32 mLODHash;
static S32 sLODSeed;
public:
@@ -452,16 +347,12 @@ public:
F32 mSurfaceArea; //used by volumes to track estimated surface area of geometry in this node
F32 mBuilt;
- OctreeNode* mOctreeNode;
- LLSpatialPartition* mSpatialPartition;
LLPointer<LLVertexBuffer> mVertexBuffer;
- GLuint mOcclusionQuery[LLViewerCamera::NUM_CAMERAS];
U32 mBufferUsage;
draw_map_t mDrawMap;
- S32 mVisible[LLViewerCamera::NUM_CAMERAS];
F32 mDistance;
F32 mDepth;
F32 mLastUpdateDistance;
@@ -484,10 +375,10 @@ public:
virtual LLVertexBuffer* createVertexBuffer(U32 type_mask, U32 usage);
};
-class LLSpatialPartition: public LLGeometryManager
+class LLSpatialPartition: public LLViewerOctreePartition, public LLGeometryManager
{
public:
- LLSpatialPartition(U32 data_mask, BOOL render_by_group, U32 mBufferUsage);
+ LLSpatialPartition(U32 data_mask, BOOL render_by_group, U32 mBufferUsage, LLViewerRegion* regionp);
virtual ~LLSpatialPartition();
LLSpatialGroup *put(LLDrawable *drawablep, BOOL was_visible = FALSE);
@@ -514,7 +405,8 @@ public:
virtual void rebuildMesh(LLSpatialGroup* group);
BOOL visibleObjectsInFrustum(LLCamera& camera);
- S32 cull(LLCamera &camera, std::vector<LLDrawable *>* results = NULL, BOOL for_select = FALSE); // Cull on arbitrary frustum
+ /*virtual*/ S32 cull(LLCamera &camera, bool do_occlusion=false); // Cull on arbitrary frustum
+ S32 cull(LLCamera &camera, std::vector<LLDrawable *>* results, BOOL for_select); // Cull on arbitrary frustum
BOOL isVisible(const LLVector3& v);
bool isHUDPartition() ;
@@ -527,25 +419,22 @@ public:
void renderIntersectingBBoxes(LLCamera* camera);
void restoreGL();
void resetVertexBuffers();
- BOOL isOcclusionEnabled();
+
BOOL getVisibleExtents(LLCamera& camera, LLVector3& visMin, LLVector3& visMax);
public:
- LLSpatialGroup::OctreeNode* mOctree;
LLSpatialBridge* mBridge; // NULL for non-LLSpatialBridge instances, otherwise, mBridge == this
// use a pointer instead of making "isBridge" and "asBridge" virtual so it's safe
// to call asBridge() from the destructor
- BOOL mOcclusionEnabled; // if TRUE, occlusion culling is performed
+
BOOL mInfiniteFarClip; // if TRUE, frustum culling ignores far clip plane
U32 mBufferUsage;
const BOOL mRenderByGroup;
- U32 mLODSeed;
- U32 mLODPeriod; //number of frames between LOD updates for a given spatial group (staggered by mLODSeed)
U32 mVertexDataMask;
F32 mSlopRatio; //percentage distance must change before drawables receive LOD update (default is 0.25);
BOOL mDepthMask; //if TRUE, objects in this partition will be written to depth during alpha rendering
- U32 mDrawableType;
- U32 mPartitionType;
+
+ static BOOL sTeleportRequested; //started to issue a teleport request
};
// class for creating bridges between spatial partitions
@@ -557,7 +446,7 @@ protected:
public:
typedef std::vector<LLPointer<LLSpatialBridge> > bridge_vector_t;
- LLSpatialBridge(LLDrawable* root, BOOL render_by_group, U32 data_mask);
+ LLSpatialBridge(LLDrawable* root, BOOL render_by_group, U32 data_mask, LLViewerRegion* regionp);
void destroyTree();
@@ -679,7 +568,7 @@ private:
class LLWaterPartition : public LLSpatialPartition
{
public:
- LLWaterPartition();
+ LLWaterPartition(LLViewerRegion* regionp);
virtual void getGeometry(LLSpatialGroup* group) { }
virtual void addGeometryCount(LLSpatialGroup* group, U32 &vertex_count, U32& index_count) { }
};
@@ -688,14 +577,14 @@ public:
class LLVoidWaterPartition : public LLWaterPartition
{
public:
- LLVoidWaterPartition();
+ LLVoidWaterPartition(LLViewerRegion* regionp);
};
//spatial partition for terrain (impelmented in LLVOSurfacePatch.cpp)
class LLTerrainPartition : public LLSpatialPartition
{
public:
- LLTerrainPartition();
+ LLTerrainPartition(LLViewerRegion* regionp);
virtual void getGeometry(LLSpatialGroup* group);
virtual LLVertexBuffer* createVertexBuffer(U32 type_mask, U32 usage);
};
@@ -704,7 +593,7 @@ public:
class LLTreePartition : public LLSpatialPartition
{
public:
- LLTreePartition();
+ LLTreePartition(LLViewerRegion* regionp);
virtual void getGeometry(LLSpatialGroup* group) { }
virtual void addGeometryCount(LLSpatialGroup* group, U32 &vertex_count, U32& index_count) { }
@@ -714,7 +603,7 @@ public:
class LLParticlePartition : public LLSpatialPartition
{
public:
- LLParticlePartition();
+ LLParticlePartition(LLViewerRegion* regionp);
virtual void rebuildGeom(LLSpatialGroup* group);
virtual void getGeometry(LLSpatialGroup* group);
virtual void addGeometryCount(LLSpatialGroup* group, U32 &vertex_count, U32& index_count);
@@ -726,14 +615,14 @@ protected:
class LLHUDParticlePartition : public LLParticlePartition
{
public:
- LLHUDParticlePartition();
+ LLHUDParticlePartition(LLViewerRegion* regionp);
};
//spatial partition for grass (implemented in LLVOGrass.cpp)
class LLGrassPartition : public LLSpatialPartition
{
public:
- LLGrassPartition();
+ LLGrassPartition(LLViewerRegion* regionp);
virtual void getGeometry(LLSpatialGroup* group);
virtual void addGeometryCount(LLSpatialGroup* group, U32 &vertex_count, U32& index_count);
protected:
@@ -763,7 +652,7 @@ class LLVolumeGeometryManager: public LLGeometryManager
class LLVolumePartition : public LLSpatialPartition, public LLVolumeGeometryManager
{
public:
- LLVolumePartition();
+ LLVolumePartition(LLViewerRegion* regionp);
virtual void rebuildGeom(LLSpatialGroup* group) { LLVolumeGeometryManager::rebuildGeom(group); }
virtual void getGeometry(LLSpatialGroup* group) { LLVolumeGeometryManager::getGeometry(group); }
virtual void rebuildMesh(LLSpatialGroup* group) { LLVolumeGeometryManager::rebuildMesh(group); }
@@ -774,7 +663,7 @@ public:
class LLVolumeBridge : public LLSpatialBridge, public LLVolumeGeometryManager
{
public:
- LLVolumeBridge(LLDrawable* drawable);
+ LLVolumeBridge(LLDrawable* drawable, LLViewerRegion* regionp);
virtual void rebuildGeom(LLSpatialGroup* group) { LLVolumeGeometryManager::rebuildGeom(group); }
virtual void getGeometry(LLSpatialGroup* group) { LLVolumeGeometryManager::getGeometry(group); }
virtual void rebuildMesh(LLSpatialGroup* group) { LLVolumeGeometryManager::rebuildMesh(group); }
@@ -784,7 +673,7 @@ public:
class LLHUDBridge : public LLVolumeBridge
{
public:
- LLHUDBridge(LLDrawable* drawablep);
+ LLHUDBridge(LLDrawable* drawablep, LLViewerRegion* regionp);
virtual void shiftPos(const LLVector4a& vec);
virtual F32 calcPixelArea(LLSpatialGroup* group, LLCamera& camera);
};
@@ -793,7 +682,7 @@ public:
class LLBridgePartition : public LLSpatialPartition
{
public:
- LLBridgePartition();
+ LLBridgePartition(LLViewerRegion* regionp);
virtual void getGeometry(LLSpatialGroup* group) { }
virtual void addGeometryCount(LLSpatialGroup* group, U32 &vertex_count, U32& index_count) { }
};
@@ -801,7 +690,7 @@ public:
class LLHUDPartition : public LLBridgePartition
{
public:
- LLHUDPartition();
+ LLHUDPartition(LLViewerRegion* regionp);
virtual void shift(const LLVector4a &offset);
};
diff --git a/indra/newview/llspeakers.cpp b/indra/newview/llspeakers.cpp
index a4582071e8..f25076d47e 100755
--- a/indra/newview/llspeakers.cpp
+++ b/indra/newview/llspeakers.cpp
@@ -34,7 +34,9 @@
#include "llgroupmgr.h"
#include "llsdutil.h"
#include "lluicolortable.h"
+#include "llhttpclient.h"
#include "llviewerobjectlist.h"
+#include "llviewerregion.h"
#include "llvoavatar.h"
#include "llworld.h"
@@ -276,7 +278,7 @@ public:
virtual void error(U32 status, const std::string& reason)
{
- llwarns << status << ": " << reason << llendl;
+ LL_WARNS() << status << ": " << reason << LL_ENDL;
if ( gIMMgr )
{
@@ -339,7 +341,7 @@ LLPointer<LLSpeaker> LLSpeakerMgr::setSpeaker(const LLUUID& id, const std::strin
speakerp->mStatus = status;
mSpeakers.insert(std::make_pair(speakerp->mID, speakerp));
mSpeakersSorted.push_back(speakerp);
- LL_DEBUGS("Speakers") << "Added speaker " << id << llendl;
+ LL_DEBUGS("Speakers") << "Added speaker " << id << LL_ENDL;
fireEvent(new LLSpeakerListChangeEvent(this, speakerp->mID), "add");
}
else
@@ -360,7 +362,7 @@ LLPointer<LLSpeaker> LLSpeakerMgr::setSpeaker(const LLUUID& id, const std::strin
}
else
{
- LL_WARNS("Speakers") << "Speaker " << id << " not found" << llendl;
+ LL_WARNS("Speakers") << "Speaker " << id << " not found" << LL_ENDL;
}
}
@@ -424,7 +426,7 @@ void LLSpeakerMgr::update(BOOL resort_ok)
if (moderator_muted_voice != speakerp->mModeratorMutedVoice)
{
speakerp->mModeratorMutedVoice = moderator_muted_voice;
- LL_DEBUGS("Speakers") << (speakerp->mModeratorMutedVoice? "Muted" : "Umuted") << " speaker " << speaker_id<< llendl;
+ LL_DEBUGS("Speakers") << (speakerp->mModeratorMutedVoice? "Muted" : "Umuted") << " speaker " << speaker_id<< LL_ENDL;
speakerp->fireEvent(new LLSpeakerVoiceModerationEvent(speakerp));
}
@@ -621,7 +623,7 @@ bool LLSpeakerMgr::removeSpeaker(const LLUUID& speaker_id)
}
}
- LL_DEBUGS("Speakers") << "Removed speaker " << speaker_id << llendl;
+ LL_DEBUGS("Speakers") << "Removed speaker " << speaker_id << LL_ENDL;
fireEvent(new LLSpeakerListChangeEvent(this, speaker_id), "remove");
update(TRUE);
@@ -739,7 +741,7 @@ void LLIMSpeakerMgr::setSpeakers(const LLSD& speakers)
// Fire event only if moderator changed
if ( is_moderator != speakerp->mIsModerator )
{
- LL_DEBUGS("Speakers") << "Speaker " << agent_id << (is_moderator ? "is now" : "no longer is") << " a moderator" << llendl;
+ LL_DEBUGS("Speakers") << "Speaker " << agent_id << (is_moderator ? "is now" : "no longer is") << " a moderator" << LL_ENDL;
fireEvent(new LLSpeakerUpdateModeratorEvent(speakerp), "update_moderator");
}
}
@@ -794,7 +796,7 @@ void LLIMSpeakerMgr::updateSpeakers(const LLSD& update)
}
else
{
- llwarns << "bad membership list update " << ll_print_sd(agent_data["transition"]) << llendl;
+ LL_WARNS() << "bad membership list update " << ll_print_sd(agent_data["transition"]) << LL_ENDL;
}
}
@@ -812,7 +814,7 @@ void LLIMSpeakerMgr::updateSpeakers(const LLSD& update)
// Fire event only if moderator changed
if ( is_moderator != speakerp->mIsModerator )
{
- LL_DEBUGS("Speakers") << "Speaker " << agent_id << (is_moderator ? "is now" : "no longer is") << " a moderator" << llendl;
+ LL_DEBUGS("Speakers") << "Speaker " << agent_id << (is_moderator ? "is now" : "no longer is") << " a moderator" << LL_ENDL;
fireEvent(new LLSpeakerUpdateModeratorEvent(speakerp), "update_moderator");
}
}
@@ -847,15 +849,15 @@ void LLIMSpeakerMgr::updateSpeakers(const LLSD& update)
}
else
{
- llwarns << "bad membership list update "
- << agent_transition << llendl;
+ LL_WARNS() << "bad membership list update "
+ << agent_transition << LL_ENDL;
}
}
}
}
/*prep#
virtual void errorWithContent(U32 status, const std::string& reason, const LLSD& content)
- llwarns << "ModerationResponder error [status:" << status << "]: " << content << llendl;
+ LL_WARNS() << "ModerationResponder error [status:" << status << "]: " << content << LL_ENDL;
*/
void LLIMSpeakerMgr::toggleAllowTextChat(const LLUUID& speaker_id)
{
@@ -972,7 +974,7 @@ void LLActiveSpeakerMgr::updateSpeakerList()
// always populate from active voice channel
if (LLVoiceChannel::getCurrentVoiceChannel() != mVoiceChannel) //MA: seems this is always false
{
- LL_DEBUGS("Speakers") << "Removed all speakers" << llendl;
+ LL_DEBUGS("Speakers") << "Removed all speakers" << LL_ENDL;
fireEvent(new LLSpeakerListChangeEvent(this, LLUUID::null), "clear");
mSpeakers.clear();
mSpeakersSorted.clear();
@@ -1036,7 +1038,7 @@ void LLLocalSpeakerMgr::updateSpeakerList()
if (speakerp->mStatus == LLSpeaker::STATUS_TEXT_ONLY)
{
LLVOAvatar* avatarp = (LLVOAvatar*)gObjectList.findObject(speaker_id);
- if (!avatarp || dist_vec_squared(avatarp->getPositionAgent(), gAgent.getPositionAgent()) > CHAT_NORMAL_RADIUS_SQUARED)
+ if (!avatarp || dist_vec_squared(avatarp->getPositionAgent(), gAgent.getPositionAgent()) > CHAT_NORMAL_RADIUS * CHAT_NORMAL_RADIUS)
{
setSpeakerNotInChannel(speakerp);
}
diff --git a/indra/newview/llspeakingindicatormanager.cpp b/indra/newview/llspeakingindicatormanager.cpp
index 07e9371124..78fe7863c8 100755
--- a/indra/newview/llspeakingindicatormanager.cpp
+++ b/indra/newview/llspeakingindicatormanager.cpp
@@ -279,7 +279,7 @@ void SpeakingIndicatorManager::ensureInstanceDoesNotExist(LLSpeakingIndicator* c
// So, using stored deleted pointer leads to crash. See EXT-4782.
if (it != mSpeakingIndicators.end())
{
- llwarns << "The same instance of indicator has already been registered, removing it: " << it->first << "|"<< speaking_indicator << llendl;
+ LL_WARNS() << "The same instance of indicator has already been registered, removing it: " << it->first << "|"<< speaking_indicator << LL_ENDL;
llassert(it == mSpeakingIndicators.end());
mSpeakingIndicators.erase(it);
}
diff --git a/indra/newview/llsrv.cpp b/indra/newview/llsrv.cpp
index 567c2a0158..8b9aead165 100755
--- a/indra/newview/llsrv.cpp
+++ b/indra/newview/llsrv.cpp
@@ -35,7 +35,7 @@ struct Responder : public LLAres::UriRewriteResponder
void rewriteResult(const std::vector<std::string> &uris) {
for (size_t i = 0; i < uris.size(); i++)
{
- llinfos << "[" << i << "] " << uris[i] << llendl;
+ LL_INFOS() << "[" << i << "] " << uris[i] << LL_ENDL;
}
mUris = uris;
}
diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp
index d5f8a1e46e..ca006a60f0 100755
--- a/indra/newview/llstartup.cpp
+++ b/indra/newview/llstartup.cpp
@@ -75,7 +75,6 @@
#include "llsd.h"
#include "llsdserialize.h"
#include "llsdutil_math.h"
-#include "llsecondlifeurls.h"
#include "llstring.h"
#include "lluserrelations.h"
#include "llversioninfo.h"
@@ -84,7 +83,6 @@
#include "llvfs.h"
#include "llxorcipher.h" // saved password, MAC address
#include "llwindow.h"
-#include "imageids.h"
#include "message.h"
#include "v3math.h"
@@ -133,7 +131,6 @@
#include "llpreviewscript.h"
#include "llproxy.h"
#include "llproductinforequest.h"
-#include "llsecondlifeurls.h"
#include "llselectmgr.h"
#include "llsky.h"
#include "llstatview.h"
@@ -243,6 +240,7 @@ static LLVector3 gAgentStartLookAt(1.0f, 0.f, 0.f);
static std::string gAgentStartLocation = "safe";
static bool mLoginStatePastUI = false;
+const S32 DEFAULT_MAX_AGENT_GROUPS = 25;
boost::scoped_ptr<LLEventPump> LLStartUp::sStateWatcher(new LLEventStream("StartupState"));
boost::scoped_ptr<LLStartupListener> LLStartUp::sListener(new LLStartupListener());
@@ -647,7 +645,7 @@ bool idle_startup()
gAudiop = (LLAudioEngine *) new LLAudioEngine_OpenAL();
}
#endif
-
+
if (gAudiop)
{
#if LL_WINDOWS
@@ -1195,6 +1193,7 @@ bool idle_startup()
// create the default proximal channel
LLVoiceChannel::initClass();
LLStartUp::setStartupState( STATE_WORLD_INIT);
+ LLTrace::get_frame_recording().reset();
}
else
{
@@ -1440,8 +1439,8 @@ bool idle_startup()
LL_DEBUGS("AppInit") << "Initializing camera..." << LL_ENDL;
gFrameTime = totalTime();
- F32 last_time = gFrameTimeSeconds;
- gFrameTimeSeconds = (S64)(gFrameTime - gStartTime)/SEC_TO_MICROSEC;
+ F32Seconds last_time = gFrameTimeSeconds;
+ gFrameTimeSeconds = (gFrameTime - gStartTime);
gFrameIntervalSeconds = gFrameTimeSeconds - last_time;
if (gFrameIntervalSeconds < 0.f)
@@ -1518,7 +1517,7 @@ bool idle_startup()
gFirstSim,
gSavedSettings.getS32("UseCircuitCodeMaxRetries"),
FALSE,
- gSavedSettings.getF32("UseCircuitCodeTimeout"),
+ (F32Seconds)gSavedSettings.getF32("UseCircuitCodeTimeout"),
use_circuit_callback,
NULL);
@@ -1686,7 +1685,7 @@ bool idle_startup()
LLSD inv_basic = response["inventory-basic"];
if(inv_basic.isDefined())
{
- llinfos << "Basic inventory root folder id is " << inv_basic["folder_id"] << llendl;
+ LL_INFOS() << "Basic inventory root folder id is " << inv_basic["folder_id"] << LL_ENDL;
}
LLSD buddy_list = response["buddy-list"];
@@ -1781,30 +1780,30 @@ bool idle_startup()
gInventory.findCategoryUUIDForType(LLFolderType::FT_FAVORITE,true);
// set up callbacks
- llinfos << "Registering Callbacks" << llendl;
+ LL_INFOS() << "Registering Callbacks" << LL_ENDL;
LLMessageSystem* msg = gMessageSystem;
- llinfos << " Inventory" << llendl;
+ LL_INFOS() << " Inventory" << LL_ENDL;
LLInventoryModel::registerCallbacks(msg);
- llinfos << " AvatarTracker" << llendl;
+ LL_INFOS() << " AvatarTracker" << LL_ENDL;
LLAvatarTracker::instance().registerCallbacks(msg);
- llinfos << " Landmark" << llendl;
+ LL_INFOS() << " Landmark" << LL_ENDL;
LLLandmark::registerCallbacks(msg);
display_startup();
// request mute list
- llinfos << "Requesting Mute List" << llendl;
+ LL_INFOS() << "Requesting Mute List" << LL_ENDL;
LLMuteList::getInstance()->requestFromServer(gAgent.getID());
display_startup();
// Get L$ and ownership credit information
- llinfos << "Requesting Money Balance" << llendl;
+ LL_INFOS() << "Requesting Money Balance" << LL_ENDL;
LLStatusBar::sendMoneyBalanceRequest();
display_startup();
// request all group information
- llinfos << "Requesting Agent Data" << llendl;
+ LL_INFOS() << "Requesting Agent Data" << LL_ENDL;
gAgent.sendAgentDataUpdateRequest();
display_startup();
// Create the inventory views
- llinfos << "Creating Inventory Views" << llendl;
+ LL_INFOS() << "Creating Inventory Views" << LL_ENDL;
LLFloaterReg::getInstance("inventory");
display_startup();
LLStartUp::setStartupState( STATE_MISC );
@@ -1942,6 +1941,7 @@ bool idle_startup()
LL_DEBUGS("AppInit") << "Initialization complete" << LL_ENDL;
+ LL_DEBUGS("SceneLoadTiming", "Start") << "Scene Load Started " << LL_ENDL;
gRenderStartTime.reset();
gForegroundTime.reset();
@@ -1958,7 +1958,7 @@ bool idle_startup()
// thus, do not show this alert.
if (!gAgent.isFirstLogin())
{
- llinfos << "gAgentStartLocation : " << gAgentStartLocation << llendl;
+ LL_INFOS() << "gAgentStartLocation : " << gAgentStartLocation << LL_ENDL;
LLSLURL start_slurl = LLStartUp::getStartSLURL();
LL_DEBUGS("AppInit") << "start slurl "<<start_slurl.asString()<<LL_ENDL;
@@ -1966,10 +1966,9 @@ bool idle_startup()
((start_slurl.getType() == LLSLURL::LAST_LOCATION) && (gAgentStartLocation == "last")) ||
((start_slurl.getType() == LLSLURL::HOME_LOCATION) && (gAgentStartLocation == "home")))
{
- // Start location is OK
- // Disabled code to restore camera location and focus if logging in to default location
- static bool samename = false;
- if (samename)
+ if (start_slurl.getType() == LLSLURL::LAST_LOCATION
+ && gAgentStartLocation == "last"
+ && gSavedSettings.getBOOL("RestoreCameraPosOnLogin"))
{
// restore old camera pos
gAgentCamera.setFocusOnAvatar(FALSE, FALSE);
@@ -2062,8 +2061,9 @@ bool idle_startup()
static LLFrameTimer wearables_timer;
const F32 wearables_time = wearables_timer.getElapsedTimeF32();
- const F32 MAX_WEARABLES_TIME = 10.f;
+ static LLCachedControl<F32> max_wearables_time(gSavedSettings, "ClothingLoadingDelay");
+ display_startup();
if (!gAgent.isGenderChosen() && isAgentAvatarValid())
{
// No point in waiting for clothing, we don't even
@@ -2077,50 +2077,39 @@ bool idle_startup()
LLNotificationsUtil::add("WelcomeChooseSex", LLSD(), LLSD(),
callback_choose_gender);
LLStartUp::setStartupState( STATE_CLEANUP );
- return TRUE;
}
-
- display_startup();
-
- if (wearables_time > MAX_WEARABLES_TIME)
+ else if (wearables_time >= max_wearables_time())
{
LLNotificationsUtil::add("ClothingLoading");
- LLViewerStats::getInstance()->incStat(LLViewerStats::ST_WEARABLES_TOO_LONG);
+ record(LLStatViewer::LOADING_WEARABLES_LONG_DELAY, wearables_time);
LLStartUp::setStartupState( STATE_CLEANUP );
- return TRUE;
}
-
- if (gAgent.isFirstLogin())
+ else if (gAgent.isFirstLogin()
+ && isAgentAvatarValid()
+ && gAgentAvatarp->isFullyLoaded())
{
// wait for avatar to be completely loaded
- if (isAgentAvatarValid()
- && gAgentAvatarp->isFullyLoaded())
- {
- //llinfos << "avatar fully loaded" << llendl;
- LLStartUp::setStartupState( STATE_CLEANUP );
- return TRUE;
- }
+ //LL_INFOS() << "avatar fully loaded" << LL_ENDL;
+ LLStartUp::setStartupState( STATE_CLEANUP );
+ }
+ // OK to just get the wearables
+ else if (!gAgent.isFirstLogin() && gAgentWearables.areWearablesLoaded() )
+ {
+ // We have our clothing, proceed.
+ //LL_INFOS() << "wearables loaded" << LL_ENDL;
+ LLStartUp::setStartupState( STATE_CLEANUP );
}
else
{
- // OK to just get the wearables
- if ( gAgentWearables.areWearablesLoaded() )
- {
- // We have our clothing, proceed.
- //llinfos << "wearables loaded" << llendl;
- LLStartUp::setStartupState( STATE_CLEANUP );
- return TRUE;
- }
+ display_startup();
+ update_texture_fetch();
+ display_startup();
+ set_startup_status(0.9f + 0.1f * wearables_time / max_wearables_time(),
+ LLTrans::getString("LoginDownloadingClothing").c_str(),
+ gAgent.mMOTD.c_str());
+ display_startup();
}
-
- display_startup();
- update_texture_fetch();
- display_startup();
- set_startup_status(0.9f + 0.1f * wearables_time / MAX_WEARABLES_TIME,
- LLTrans::getString("LoginDownloadingClothing").c_str(),
- gAgent.mMOTD.c_str());
- display_startup();
- return TRUE;
+ //fall through this frame to STATE_CLEANUP
}
if (STATE_CLEANUP == LLStartUp::getStartupState())
@@ -2182,7 +2171,7 @@ bool idle_startup()
// Unmute audio if desired and setup volumes.
// This is a not-uncommon crash site, so surround it with
- // llinfos output to aid diagnosis.
+ // LL_INFOS() output to aid diagnosis.
LL_INFOS("AppInit") << "Doing first audio_update_volume..." << LL_ENDL;
audio_update_volume();
LL_INFOS("AppInit") << "Done first audio_update_volume." << LL_ENDL;
@@ -2190,15 +2179,8 @@ bool idle_startup()
// reset keyboard focus to sane state of pointing at world
gFocusMgr.setKeyboardFocus(NULL);
-#if 0 // sjb: enable for auto-enabling timer display
- gDebugView->mFastTimerView->setVisible(TRUE);
-#endif
-
LLAppViewer::instance()->handleLoginComplete();
- // reset timers now that we are running "logged in" logic
- LLFastTimer::reset();
-
LLAgentPicksInfo::getInstance()->requestNumberOfPicks();
display_startup();
@@ -2553,7 +2535,7 @@ bool callback_choose_gender(const LLSD& notification, const LLSD& response)
void LLStartUp::loadInitialOutfit( const std::string& outfit_folder_name,
const std::string& gender_name )
{
- lldebugs << "starting" << llendl;
+ LL_DEBUGS() << "starting" << LL_ENDL;
// Not going through the processAgentInitialWearables path, so need to set this here.
LLAppearanceMgr::instance().setAttachmentInvLinkEnable(true);
@@ -2563,18 +2545,18 @@ void LLStartUp::loadInitialOutfit( const std::string& outfit_folder_name,
ESex gender;
if (gender_name == "male")
{
- lldebugs << "male" << llendl;
+ LL_DEBUGS() << "male" << LL_ENDL;
gender = SEX_MALE;
}
else
{
- lldebugs << "female" << llendl;
+ LL_DEBUGS() << "female" << LL_ENDL;
gender = SEX_FEMALE;
}
if (!isAgentAvatarValid())
{
- llwarns << "Trying to load an initial outfit for an invalid agent avatar" << llendl;
+ LL_WARNS() << "Trying to load an initial outfit for an invalid agent avatar" << LL_ENDL;
return;
}
@@ -2587,7 +2569,7 @@ void LLStartUp::loadInitialOutfit( const std::string& outfit_folder_name,
outfit_folder_name);
if (cat_id.isNull())
{
- lldebugs << "standard wearables" << llendl;
+ LL_DEBUGS() << "standard wearables" << LL_ENDL;
gAgentWearables.createStandardWearables();
}
else
@@ -2603,7 +2585,7 @@ void LLStartUp::loadInitialOutfit( const std::string& outfit_folder_name,
// Need to fetch cof contents before we can wear.
callAfterCategoryFetch(LLAppearanceMgr::instance().getCOF(),
boost::bind(&LLAppearanceMgr::wearInventoryCategory, LLAppearanceMgr::getInstance(), cat, do_copy, do_append));
- lldebugs << "initial outfit category id: " << cat_id << llendl;
+ LL_DEBUGS() << "initial outfit category id: " << cat_id << LL_ENDL;
}
// This is really misnamed -- it means we have started loading
@@ -2615,16 +2597,16 @@ void LLStartUp::loadInitialOutfit( const std::string& outfit_folder_name,
void LLStartUp::saveInitialOutfit()
{
if (sInitialOutfit.empty()) {
- lldebugs << "sInitialOutfit is empty" << llendl;
+ LL_DEBUGS() << "sInitialOutfit is empty" << LL_ENDL;
return;
}
if (sWearablesLoadedCon.connected())
{
- lldebugs << "sWearablesLoadedCon is connected, disconnecting" << llendl;
+ LL_DEBUGS() << "sWearablesLoadedCon is connected, disconnecting" << LL_ENDL;
sWearablesLoadedCon.disconnect();
}
- lldebugs << "calling makeNewOutfitLinks( \"" << sInitialOutfit << "\" )" << llendl;
+ LL_DEBUGS() << "calling makeNewOutfitLinks( \"" << sInitialOutfit << "\" )" << LL_ENDL;
LLAppearanceMgr::getInstance()->makeNewOutfitLinks(sInitialOutfit,false);
}
@@ -3163,7 +3145,7 @@ void apply_udp_blacklist(const std::string& csv)
}
std::string item(csv, start, comma-start);
- lldebugs << "udp_blacklist " << item << llendl;
+ LL_DEBUGS() << "udp_blacklist " << item << LL_ENDL;
gMessageSystem->banUdpMessage(item);
start = comma + 1;
diff --git a/indra/newview/llstartup.h b/indra/newview/llstartup.h
index 760e38890b..e39810713a 100755
--- a/indra/newview/llstartup.h
+++ b/indra/newview/llstartup.h
@@ -45,6 +45,18 @@ bool login_alert_done(const LLSD& notification, const LLSD& response);
extern std::string SCREEN_HOME_FILENAME;
extern std::string SCREEN_LAST_FILENAME;
+// start location constants
+enum EStartLocation
+{
+ START_LOCATION_ID_LAST,
+ START_LOCATION_ID_HOME,
+ START_LOCATION_ID_DIRECT,
+ START_LOCATION_ID_PARCEL,
+ START_LOCATION_ID_TELEHUB,
+ START_LOCATION_ID_URL,
+ START_LOCATION_ID_COUNT
+};
+
typedef enum {
STATE_FIRST, // Initial startup
STATE_BROWSER_INIT, // Initialize web browser for login screen
diff --git a/indra/newview/llstatusbar.cpp b/indra/newview/llstatusbar.cpp
index ff69c6e9fd..047538a32a 100755
--- a/indra/newview/llstatusbar.cpp
+++ b/indra/newview/llstatusbar.cpp
@@ -37,7 +37,6 @@
#include "llviewercontrol.h"
#include "llfloaterbuycurrency.h"
#include "llbuycurrencyhtml.h"
-#include "llfloaterlagmeter.h"
#include "llpanelnearbymedia.h"
#include "llpanelvolumepulldown.h"
#include "llfloaterregioninfo.h"
@@ -73,7 +72,6 @@
#include "lltrans.h"
// library includes
-#include "imageids.h"
#include "llfloaterreg.h"
#include "llfontgl.h"
#include "llrect.h"
@@ -199,10 +197,10 @@ BOOL LLStatusBar::postBuild()
sgp.rect(r);
sgp.follows.flags(FOLLOWS_BOTTOM | FOLLOWS_RIGHT);
sgp.mouse_opaque(false);
+ sgp.stat.count_stat_float(&LLStatViewer::ACTIVE_MESSAGE_DATA_RECEIVED);
+ sgp.units("Kbps");
+ sgp.precision(0);
mSGBandwidth = LLUICtrlFactory::create<LLStatGraph>(sgp);
- mSGBandwidth->setStat(&LLViewerStats::getInstance()->mKBitStat);
- mSGBandwidth->setUnits("Kbps");
- mSGBandwidth->setPrecision(0);
addChild(mSGBandwidth);
x -= SIM_STAT_WIDTH + 2;
@@ -213,17 +211,20 @@ BOOL LLStatusBar::postBuild()
pgp.rect(r);
pgp.follows.flags(FOLLOWS_BOTTOM | FOLLOWS_RIGHT);
pgp.mouse_opaque(false);
+ pgp.stat.sample_stat_float(&LLStatViewer::PACKETS_LOST_PERCENT);
+ pgp.units("%");
+ pgp.min(0.f);
+ pgp.max(5.f);
+ pgp.precision(1);
+ pgp.per_sec(false);
+ LLStatGraph::Thresholds thresholds;
+ thresholds.threshold.add(LLStatGraph::ThresholdParams().value(0.1).color(LLColor4::green))
+ .add(LLStatGraph::ThresholdParams().value(0.25f).color(LLColor4::yellow))
+ .add(LLStatGraph::ThresholdParams().value(0.6f).color(LLColor4::red));
+
+ pgp.thresholds(thresholds);
mSGPacketLoss = LLUICtrlFactory::create<LLStatGraph>(pgp);
- mSGPacketLoss->setStat(&LLViewerStats::getInstance()->mPacketsLostPercentStat);
- mSGPacketLoss->setUnits("%");
- mSGPacketLoss->setMin(0.f);
- mSGPacketLoss->setMax(5.f);
- mSGPacketLoss->setThreshold(0, 0.5f);
- mSGPacketLoss->setThreshold(1, 1.f);
- mSGPacketLoss->setThreshold(2, 3.f);
- mSGPacketLoss->setPrecision(1);
- mSGPacketLoss->mPerSec = FALSE;
addChild(mSGPacketLoss);
mPanelVolumePulldown = new LLPanelVolumePulldown();
@@ -253,9 +254,9 @@ void LLStatusBar::refresh()
F32 bwtotal = gViewerThrottle.getMaxBandwidth() / 1000.f;
mSGBandwidth->setMin(0.f);
mSGBandwidth->setMax(bwtotal*1.25f);
- mSGBandwidth->setThreshold(0, bwtotal*0.75f);
- mSGBandwidth->setThreshold(1, bwtotal);
- mSGBandwidth->setThreshold(2, bwtotal);
+ //mSGBandwidth->setThreshold(0, bwtotal*0.75f);
+ //mSGBandwidth->setThreshold(1, bwtotal);
+ //mSGBandwidth->setThreshold(2, bwtotal);
}
// update clock every 10 seconds
@@ -390,7 +391,7 @@ void LLStatusBar::sendMoneyBalanceRequest()
void LLStatusBar::setHealth(S32 health)
{
- //llinfos << "Setting health to: " << buffer << llendl;
+ //LL_INFOS() << "Setting health to: " << buffer << LL_ENDL;
if( mHealth > health )
{
if (mHealth > (health + gSavedSettings.getF32("UISndHealthReductionThreshold")))
diff --git a/indra/newview/llsurface.cpp b/indra/newview/llsurface.cpp
index 93c7f54101..e75af8db53 100755
--- a/indra/newview/llsurface.cpp
+++ b/indra/newview/llsurface.cpp
@@ -34,7 +34,7 @@
#include "llpatchvertexarray.h"
#include "patch_dct.h"
#include "patch_code.h"
-#include "bitpack.h"
+#include "llbitpack.h"
#include "llviewerobjectlist.h"
#include "llregionhandle.h"
#include "llagent.h"
@@ -123,7 +123,7 @@ LLSurface::~LLSurface()
LLDrawPoolTerrain *poolp = (LLDrawPoolTerrain*) gPipeline.findPool(LLDrawPool::POOL_TERRAIN, mSTexturep);
if (!poolp)
{
- llwarns << "No pool for terrain on destruction!" << llendl;
+ LL_WARNS() << "No pool for terrain on destruction!" << LL_ENDL;
}
else if (poolp->mReferences.empty())
{
@@ -140,7 +140,7 @@ LLSurface::~LLSurface()
}
else
{
- llerrs << "Terrain pool not empty!" << llendl;
+ LL_ERRS() << "Terrain pool not empty!" << LL_ENDL;
}
}
@@ -709,7 +709,7 @@ void LLSurface::decompressDCTPatch(LLBitPack &bitpack, LLGroupHeader *gopp, BOOL
if ((i >= mPatchesPerEdge) || (j >= mPatchesPerEdge))
{
- llwarns << "Received invalid terrain packet - patch header patch ID incorrect!"
+ LL_WARNS() << "Received invalid terrain packet - patch header patch ID incorrect!"
<< " patches per edge " << mPatchesPerEdge
<< " i " << i
<< " j " << j
@@ -717,7 +717,7 @@ void LLSurface::decompressDCTPatch(LLBitPack &bitpack, LLGroupHeader *gopp, BOOL
<< " range " << (S32)ph.range
<< " quant_wbits " << (S32)ph.quant_wbits
<< " patchids " << (S32)ph.patchids
- << llendl;
+ << LL_ENDL;
LLAppViewer::instance()->badNetworkHandler();
return;
}
@@ -955,13 +955,13 @@ LLSurfacePatch *LLSurface::resolvePatchRegion(const F32 x, const F32 y) const
{
if(0 == mNumberOfPatches)
{
- llwarns << "No patches for current region!" << llendl;
+ LL_WARNS() << "No patches for current region!" << LL_ENDL;
return NULL;
}
S32 old_index = index;
index = llclamp(old_index, 0, (mNumberOfPatches - 1));
- llwarns << "Clamping out of range patch index " << old_index
- << " to " << index << llendl;
+ LL_WARNS() << "Clamping out of range patch index " << old_index
+ << " to " << index << LL_ENDL;
}
return &(mPatchList[index]);
}
@@ -1150,12 +1150,12 @@ LLSurfacePatch *LLSurface::getPatch(const S32 x, const S32 y) const
{
if ((x < 0) || (x >= mPatchesPerEdge))
{
- llerrs << "Asking for patch out of bounds" << llendl;
+ LL_ERRS() << "Asking for patch out of bounds" << LL_ENDL;
return NULL;
}
if ((y < 0) || (y >= mPatchesPerEdge))
{
- llerrs << "Asking for patch out of bounds" << llendl;
+ LL_ERRS() << "Asking for patch out of bounds" << LL_ENDL;
return NULL;
}
@@ -1194,7 +1194,7 @@ void LLSurface::setWaterHeight(F32 height)
}
else
{
- llwarns << "LLSurface::setWaterHeight with no water object!" << llendl;
+ LL_WARNS() << "LLSurface::setWaterHeight with no water object!" << LL_ENDL;
}
}
diff --git a/indra/newview/llsurface.h b/indra/newview/llsurface.h
index 9d24bf8771..33a64ae7d5 100755
--- a/indra/newview/llsurface.h
+++ b/indra/newview/llsurface.h
@@ -45,7 +45,6 @@
class LLTimer;
class LLUUID;
class LLAgent;
-class LLStat;
static const U8 NO_EDGE = 0x00;
static const U8 EAST_EDGE = 0x01;
diff --git a/indra/newview/llsurfacepatch.cpp b/indra/newview/llsurfacepatch.cpp
index a9ba2bce9c..2d06b8599c 100755
--- a/indra/newview/llsurfacepatch.cpp
+++ b/indra/newview/llsurfacepatch.cpp
@@ -33,7 +33,6 @@
#include "llsurface.h"
#include "pipeline.h"
#include "llagent.h"
-#include "timing.h"
#include "llsky.h"
#include "llviewercamera.h"
@@ -44,11 +43,11 @@
#include "noise.h"
extern bool gShiftFrame;
-extern U64 gFrameTime;
+extern U64MicrosecondsImplicit gFrameTime;
extern LLPipeline gPipeline;
-LLSurfacePatch::LLSurfacePatch() :
- mHasReceivedData(FALSE),
+LLSurfacePatch::LLSurfacePatch()
+: mHasReceivedData(FALSE),
mSTexUpdate(FALSE),
mDirty(FALSE),
mDirtyZStats(TRUE),
@@ -100,7 +99,7 @@ void LLSurfacePatch::dirty()
}
else
{
- llwarns << "No viewer object for this surface patch!" << llendl;
+ LL_WARNS() << "No viewer object for this surface patch!" << LL_ENDL;
}
mDirtyZStats = TRUE;
diff --git a/indra/newview/llsyswellwindow.cpp b/indra/newview/llsyswellwindow.cpp
index 626d69aca4..8babb874f8 100755
--- a/indra/newview/llsyswellwindow.cpp
+++ b/indra/newview/llsyswellwindow.cpp
@@ -107,8 +107,8 @@ void LLSysWellWindow::removeItemByID(const LLUUID& id)
}
else
{
- llwarns << "Unable to remove notification from the list, ID: " << id
- << llendl;
+ LL_WARNS() << "Unable to remove notification from the list, ID: " << id
+ << LL_ENDL;
}
// hide chiclet window if there are no items left
@@ -132,7 +132,7 @@ void LLSysWellWindow::initChannel()
mChannel = dynamic_cast<LLNotificationsUI::LLScreenChannel*>(channel);
if(NULL == mChannel)
{
- llwarns << "LLSysWellWindow::initChannel() - could not get a requested screen channel" << llendl;
+ LL_WARNS() << "LLSysWellWindow::initChannel() - could not get a requested screen channel" << LL_ENDL;
}
}
@@ -360,9 +360,9 @@ void LLNotificationWellWindow::addItem(LLSysWellItem::Params p)
}
else
{
- llwarns << "Unable to add Notification into the list, notification ID: " << p.notification_id
+ LL_WARNS() << "Unable to add Notification into the list, notification ID: " << p.notification_id
<< ", title: " << p.title
- << llendl;
+ << LL_ENDL;
new_item->die();
}
@@ -509,7 +509,7 @@ void LLIMWellWindow::addObjectRow(const LLUUID& notification_id, bool new_messag
ObjectRowPanel* item = new ObjectRowPanel(notification_id, new_message);
if (!mMessageList->addItem(item, notification_id))
{
- llwarns << "Unable to add Object Row into the list, notificationID: " << notification_id << llendl;
+ LL_WARNS() << "Unable to add Object Row into the list, notificationID: " << notification_id << LL_ENDL;
item->die();
}
reshapeWindow();
@@ -520,7 +520,7 @@ void LLIMWellWindow::removeObjectRow(const LLUUID& notification_id)
{
if (!mMessageList->removeItemByValue(notification_id))
{
- llwarns << "Unable to remove Object Row from the list, notificationID: " << notification_id << llendl;
+ LL_WARNS() << "Unable to remove Object Row from the list, notificationID: " << notification_id << LL_ENDL;
}
reshapeWindow();
diff --git a/indra/newview/llteleporthistory.cpp b/indra/newview/llteleporthistory.cpp
index 50a088b799..a20d69dd41 100755
--- a/indra/newview/llteleporthistory.cpp
+++ b/indra/newview/llteleporthistory.cpp
@@ -77,14 +77,14 @@ void LLTeleportHistory::goToItem(int idx)
// Validate specified index.
if (idx < 0 || idx >= (int)mItems.size())
{
- llwarns << "Invalid teleport history index (" << idx << ") specified" << llendl;
+ LL_WARNS() << "Invalid teleport history index (" << idx << ") specified" << LL_ENDL;
dump();
return;
}
if (idx == mCurrentItem)
{
- llwarns << "Will not teleport to the same location." << llendl;
+ LL_WARNS() << "Will not teleport to the same location." << LL_ENDL;
dump();
return;
}
@@ -156,7 +156,7 @@ void LLTeleportHistory::updateCurrentLocation(const LLVector3d& new_pos)
// Update current history item.
if (mCurrentItem < 0 || mCurrentItem >= (int) mItems.size()) // sanity check
{
- llwarns << "Invalid current item. (this should not happen)" << llendl;
+ LL_WARNS() << "Invalid current item. (this should not happen)" << LL_ENDL;
llassert(!"Invalid current teleport history item");
return;
}
@@ -222,7 +222,7 @@ std::string LLTeleportHistory::getCurrentLocationTitle(bool full, const LLVector
void LLTeleportHistory::dump() const
{
- llinfos << "Teleport history dump (" << mItems.size() << " items):" << llendl;
+ LL_INFOS() << "Teleport history dump (" << mItems.size() << " items):" << LL_ENDL;
for (size_t i=0; i<mItems.size(); i++)
{
@@ -231,6 +231,6 @@ void LLTeleportHistory::dump() const
line << i << ": " << mItems[i].mTitle;
line << " REGION_ID: " << mItems[i].mRegionID;
line << ", pos: " << mItems[i].mGlobalPos;
- llinfos << line.str() << llendl;
+ LL_INFOS() << line.str() << LL_ENDL;
}
}
diff --git a/indra/newview/llteleporthistorystorage.cpp b/indra/newview/llteleporthistorystorage.cpp
index af5a047da4..f88f88a4fa 100755
--- a/indra/newview/llteleporthistorystorage.cpp
+++ b/indra/newview/llteleporthistorystorage.cpp
@@ -167,7 +167,7 @@ void LLTeleportHistoryStorage::save()
llofstream file (resolvedFilename);
if (!file.is_open())
{
- llwarns << "can't open teleport history file \"" << mFilename << "\" for writing" << llendl;
+ LL_WARNS() << "can't open teleport history file \"" << mFilename << "\" for writing" << LL_ENDL;
return;
}
@@ -189,7 +189,7 @@ void LLTeleportHistoryStorage::load()
llifstream file(resolved_filename);
if (!file.is_open())
{
- llwarns << "can't load teleport history from file \"" << mFilename << "\"" << llendl;
+ LL_WARNS() << "can't load teleport history from file \"" << mFilename << "\"" << LL_ENDL;
return;
}
@@ -205,7 +205,7 @@ void LLTeleportHistoryStorage::load()
std::istringstream iss(line);
if (parser->parse(iss, s_item, line.length()) == LLSDParser::PARSE_FAILURE)
{
- llinfos << "Parsing saved teleport history failed" << llendl;
+ LL_INFOS() << "Parsing saved teleport history failed" << LL_ENDL;
break;
}
@@ -221,7 +221,7 @@ void LLTeleportHistoryStorage::load()
void LLTeleportHistoryStorage::dump() const
{
- llinfos << "Teleport history storage dump (" << mItems.size() << " items):" << llendl;
+ LL_INFOS() << "Teleport history storage dump (" << mItems.size() << " items):" << LL_ENDL;
for (size_t i=0; i<mItems.size(); i++)
{
@@ -230,7 +230,7 @@ void LLTeleportHistoryStorage::dump() const
line << " global pos: " << mItems[i].mGlobalPos;
line << " date: " << mItems[i].mDate;
- llinfos << line.str() << llendl;
+ LL_INFOS() << line.str() << LL_ENDL;
}
}
@@ -244,7 +244,7 @@ void LLTeleportHistoryStorage::goToItem(S32 idx)
// Validate specified index.
if (idx < 0 || idx >= (S32)mItems.size())
{
- llwarns << "Invalid teleport history index (" << idx << ") specified" << llendl;
+ LL_WARNS() << "Invalid teleport history index (" << idx << ") specified" << LL_ENDL;
dump();
return;
}
diff --git a/indra/newview/lltextureatlas.cpp b/indra/newview/lltextureatlas.cpp
index dbbe331954..1c8e4f796e 100755
--- a/indra/newview/lltextureatlas.cpp
+++ b/indra/newview/lltextureatlas.cpp
@@ -63,7 +63,7 @@ LLTextureAtlas::~LLTextureAtlas()
{
if(mSpatialGroupList.size() > 0)
{
- llerrs << "Not clean up the spatial groups!" << llendl ;
+ LL_ERRS() << "Not clean up the spatial groups!" << LL_ENDL ;
}
releaseUsageBits() ;
}
@@ -105,7 +105,7 @@ LLGLuint LLTextureAtlas::insertSubTexture(LLImageGL* source_gl_tex, S32 discard_
BOOL res = gGL.getTexUnit(0)->bindManual(LLTexUnit::TT_TEXTURE, getTexName());
if (!res)
{
- llerrs << "bindTexture failed" << llendl;
+ LL_ERRS() << "bindTexture failed" << LL_ENDL;
}
GLint xoffset = sSlotSize * slot_col ;
@@ -342,7 +342,7 @@ BOOL LLTextureAtlas::areUsageBitsMarked(S8 bits_len, U8 mask, S16 col, S16 row)
if(ret != ret2)
{
- llerrs << "bits map corrupted." << llendl ;
+ LL_ERRS() << "bits map corrupted." << LL_ENDL ;
}
#endif
return ret ;//FALSE ;
diff --git a/indra/newview/lltexturecache.cpp b/indra/newview/lltexturecache.cpp
index 5bc2e971eb..ef852bc905 100755
--- a/indra/newview/lltexturecache.cpp
+++ b/indra/newview/lltexturecache.cpp
@@ -191,7 +191,7 @@ bool LLTextureCacheLocalFileWorker::doRead()
if (mImageFormat == IMG_CODEC_INVALID)
{
-// llwarns << "Unrecognized file extension " << extension << " for local texture " << mFileName << llendl;
+// LL_WARNS() << "Unrecognized file extension " << extension << " for local texture " << mFileName << LL_ENDL;
mDataSize = 0; // no data
return true;
}
@@ -232,9 +232,9 @@ bool LLTextureCacheLocalFileWorker::doRead()
{
if (mBytesRead != mBytesToRead)
{
-// llwarns << "Error reading file from local cache: " << local_filename
+// LL_WARNS() << "Error reading file from local cache: " << local_filename
// << " Bytes: " << mDataSize << " Offset: " << mOffset
-// << " / " << mDataSize << llendl;
+// << " / " << mDataSize << LL_ENDL;
mDataSize = 0; // failed
FREE_MEM(LLImageBase::getPrivatePool(), mReadData);
mReadData = NULL;
@@ -257,9 +257,9 @@ bool LLTextureCacheLocalFileWorker::doRead()
if (bytes_read != mDataSize)
{
-// llwarns << "Error reading file from local cache: " << mFileName
+// LL_WARNS() << "Error reading file from local cache: " << mFileName
// << " Bytes: " << mDataSize << " Offset: " << mOffset
-// << " / " << mDataSize << llendl;
+// << " / " << mDataSize << LL_ENDL;
mDataSize = 0;
FREE_MEM(LLImageBase::getPrivatePool(), mReadData);
mReadData = NULL;
@@ -390,16 +390,16 @@ bool LLTextureCacheRemoteWorker::doRead()
mReadData, mOffset, mDataSize, mCache->getLocalAPRFilePool());
if (bytes_read != mDataSize)
{
- llwarns << "Error reading file from local cache: " << local_filename
+ LL_WARNS() << "Error reading file from local cache: " << local_filename
<< " Bytes: " << mDataSize << " Offset: " << mOffset
- << " / " << mDataSize << llendl;
+ << " / " << mDataSize << LL_ENDL;
mDataSize = 0;
FREE_MEM(LLImageBase::getPrivatePool(), mReadData);
mReadData = NULL;
}
else
{
- //llinfos << "texture " << mID.asString() << " found in local_assets" << llendl;
+ //LL_INFOS() << "texture " << mID.asString() << " found in local_assets" << LL_ENDL;
mImageSize = local_size;
mImageLocal = TRUE;
}
@@ -442,9 +442,9 @@ bool LLTextureCacheRemoteWorker::doRead()
mReadData, offset, size, mCache->getLocalAPRFilePool());
if (bytes_read != size)
{
- llwarns << "LLTextureCacheWorker: " << mID
+ LL_WARNS() << "LLTextureCacheWorker: " << mID
<< " incorrect number of bytes read from header: " << bytes_read
- << " / " << size << llendl;
+ << " / " << size << LL_ENDL;
FREE_MEM(LLImageBase::getPrivatePool(), mReadData);
mReadData = NULL;
mDataSize = -1; // failed
@@ -511,9 +511,9 @@ bool LLTextureCacheRemoteWorker::doRead()
mCache->getLocalAPRFilePool());
if (bytes_read != file_size)
{
- llwarns << "LLTextureCacheWorker: " << mID
+ LL_WARNS() << "LLTextureCacheWorker: " << mID
<< " incorrect number of bytes read from body: " << bytes_read
- << " / " << file_size << llendl;
+ << " / " << file_size << LL_ENDL;
FREE_MEM(LLImageBase::getPrivatePool(), mReadData);
mReadData = NULL;
mDataSize = -1; // failed
@@ -524,7 +524,7 @@ bool LLTextureCacheRemoteWorker::doRead()
{
// No body, we're done.
mDataSize = llmax(TEXTURE_CACHE_ENTRY_SIZE - mOffset, 0);
- lldebugs << "No body file for: " << filename << llendl;
+ LL_DEBUGS() << "No body file for: " << filename << LL_ENDL;
}
// Nothing else to do at that point...
done = true;
@@ -571,10 +571,10 @@ bool LLTextureCacheRemoteWorker::doWrite()
// (almost always) write to the fast cache.
if (mRawImage->getDataSize())
{
- llassert_always(mCache->writeToFastCache(idx, mRawImage, mRawDiscardLevel));
- }
+ llassert_always(mCache->writeToFastCache(idx, mRawImage, mRawDiscardLevel));
}
}
+ }
else
{
alreadyCached = mCache->updateEntry(idx, entry, mImageSize, mDataSize); // update the existing entry.
@@ -582,8 +582,8 @@ bool LLTextureCacheRemoteWorker::doWrite()
if (idx < 0)
{
- llwarns << "LLTextureCacheWorker: " << mID
- << " Unable to create header entry for writing!" << llendl;
+ LL_WARNS() << "LLTextureCacheWorker: " << mID
+ << " Unable to create header entry for writing!" << LL_ENDL;
mDataSize = -1; // failed
done = true;
}
@@ -628,8 +628,8 @@ bool LLTextureCacheRemoteWorker::doWrite()
if (bytes_written <= 0)
{
- llwarns << "LLTextureCacheWorker: " << mID
- << " Unable to write header entry!" << llendl;
+ LL_WARNS() << "LLTextureCacheWorker: " << mID
+ << " Unable to write header entry!" << LL_ENDL;
mDataSize = -1; // failed
done = true;
}
@@ -655,16 +655,16 @@ bool LLTextureCacheRemoteWorker::doWrite()
{
// build the cache file name from the UUID
std::string filename = mCache->getTextureFileName(mID);
-// llinfos << "Writing Body: " << filename << " Bytes: " << file_offset+file_size << llendl;
+// LL_INFOS() << "Writing Body: " << filename << " Bytes: " << file_offset+file_size << LL_ENDL;
S32 bytes_written = LLAPRFile::writeEx( filename,
mWriteData + TEXTURE_CACHE_ENTRY_SIZE,
0, file_size,
mCache->getLocalAPRFilePool());
if (bytes_written <= 0)
{
- llwarns << "LLTextureCacheWorker: " << mID
+ LL_WARNS() << "LLTextureCacheWorker: " << mID
<< " incorrect number of bytes written to body: " << bytes_written
- << " / " << file_size << llendl;
+ << " / " << file_size << LL_ENDL;
mDataSize = -1; // failed
done = true;
}
@@ -922,7 +922,7 @@ void LLTextureCache::setDirNames(ELLPath location)
mFastCacheFileName = gDirUtilp->getExpandedFilename(location, textures_dirname, fast_cache_filename);
}
-void LLTextureCache::purgeCache(ELLPath location)
+void LLTextureCache::purgeCache(ELLPath location, bool remove_dir)
{
LLMutexLock lock(&mHeaderMutex);
@@ -948,7 +948,7 @@ void LLTextureCache::purgeCache(ELLPath location)
}
//remove the current texture cache.
- purgeAllTextures(true);
+ purgeAllTextures(remove_dir);
}
//is called in the main thread before initCache(...) is called.
@@ -1135,7 +1135,7 @@ S32 LLTextureCache::openAndReadEntry(const LLUUID& id, Entry& entry, bool create
}
if(entry.mImageSize <= entry.mBodySize)//it happens on 64-bit systems, do not know why
{
- llwarns << "corrupted entry: " << id << " entry image size: " << entry.mImageSize << " entry body size: " << entry.mBodySize << llendl ;
+ LL_WARNS() << "corrupted entry: " << id << " entry image size: " << entry.mImageSize << " entry body size: " << entry.mBodySize << LL_ENDL ;
//erase this entry and the cached texture from the cache.
std::string tex_filename = getTextureFileName(id);
@@ -1303,13 +1303,13 @@ U32 LLTextureCache::openAndReadEntries(std::vector<Entry>& entries)
S32 bytes_read = aprfile->read((void*)(&entry), (S32)sizeof(Entry));
if (bytes_read < sizeof(Entry))
{
- llwarns << "Corrupted header entries, failed at " << idx << " / " << num_entries << llendl;
+ LL_WARNS() << "Corrupted header entries, failed at " << idx << " / " << num_entries << LL_ENDL;
closeHeaderEntriesFile();
purgeAllTextures(false);
return 0;
}
entries.push_back(entry);
-// llinfos << "ENTRY: " << entry.mTime << " TEX: " << entry.mID << " IDX: " << idx << " Size: " << entry.mImageSize << llendl;
+// LL_INFOS() << "ENTRY: " << entry.mTime << " TEX: " << entry.mID << " IDX: " << idx << " Size: " << entry.mImageSize << LL_ENDL;
if(entry.mImageSize > entry.mBodySize)
{
mHeaderIDMap[entry.mID] = idx;
@@ -1439,7 +1439,7 @@ void LLTextureCache::readHeaderCache()
if (entry.mBodySize > entry.mImageSize)
{
// Shouldn't happen, failsafe only
- llwarns << "Bad entry: " << i << ": " << entry.mID << ": BodySize: " << entry.mBodySize << llendl;
+ LL_WARNS() << "Bad entry: " << i << ": " << entry.mID << ": BodySize: " << entry.mBodySize << LL_ENDL;
purge_list.insert(i);
}
}
@@ -1450,7 +1450,7 @@ void LLTextureCache::readHeaderCache()
// Special case: cache size was reduced, need to remove entries
// Note: After we prune entries, we will call this again and create the LRU
U32 entries_to_purge = (num_entries - empty_entries) - sCacheMaxEntries;
- llinfos << "Texture Cache Entries: " << num_entries << " Max: " << sCacheMaxEntries << " Empty: " << empty_entries << " Purging: " << entries_to_purge << llendl;
+ LL_INFOS() << "Texture Cache Entries: " << num_entries << " Max: " << sCacheMaxEntries << " Empty: " << empty_entries << " Purging: " << entries_to_purge << LL_ENDL;
// We can exit the following loop with the given condition, since if we'd reach the end of the lru set we'd have:
// purge_list.size() = lru.size() = num_entries - empty_entries = entries_to_purge + sCacheMaxEntries >= entries_to_purge
// So, it's certain that iter will never reach lru.end() first.
@@ -1467,7 +1467,7 @@ void LLTextureCache::readHeaderCache()
for (std::set<lru_data_t>::iterator iter = lru.begin(); iter != lru.end(); ++iter)
{
mLRU.insert(entries[iter->second].mID);
-// llinfos << "LRU: " << iter->first << " : " << iter->second << llendl;
+// LL_INFOS() << "LRU: " << iter->first << " : " << iter->second << LL_ENDL;
if (--lru_entries <= 0)
break;
}
@@ -1513,7 +1513,7 @@ void LLTextureCache::readHeaderCache()
//the header mutex is locked before calling this.
void LLTextureCache::clearCorruptedCache()
{
- llwarns << "the texture cache is corrupted, need to be cleared." << llendl ;
+ LL_WARNS() << "the texture cache is corrupted, need to be cleared." << LL_ENDL ;
closeHeaderEntriesFile();//close possible file handler
purgeAllTextures(false) ; //clear the cache.
@@ -1543,7 +1543,7 @@ void LLTextureCache::purgeAllTextures(bool purge_directories)
for (S32 i=0; i<16; i++)
{
std::string dirname = mTexturesDirName + delem + subdirs[i];
- llinfos << "Deleting files in directory: " << dirname << llendl;
+ LL_INFOS() << "Deleting files in directory: " << dirname << LL_ENDL;
gDirUtilp->deleteFilesInDir(dirname, mask);
if (purge_directories)
{
@@ -1568,7 +1568,7 @@ void LLTextureCache::purgeAllTextures(bool purge_directories)
mHeaderEntriesInfo.mEntries = 0;
writeEntriesHeader();
- llinfos << "The entire texture cache is cleared." << llendl ;
+ LL_INFOS() << "The entire texture cache is cleared." << LL_ENDL ;
}
void LLTextureCache::purgeTextures(bool validate)
@@ -1586,7 +1586,7 @@ void LLTextureCache::purgeTextures(bool validate)
LLMutexLock lock(&mHeaderMutex);
- llinfos << "TEXTURE CACHE: Purging." << llendl;
+ LL_INFOS() << "TEXTURE CACHE: Purging." << LL_ENDL;
// Read the entries list
std::vector<Entry> entries;
@@ -1609,11 +1609,11 @@ void LLTextureCache::purgeTextures(bool validate)
{
S32 idx = iter2->second;
time_idx_set.insert(std::make_pair(entries[idx].mTime, idx));
-// llinfos << "TIME: " << entries[idx].mTime << " TEX: " << entries[idx].mID << " IDX: " << idx << " Size: " << entries[idx].mImageSize << llendl;
+// LL_INFOS() << "TIME: " << entries[idx].mTime << " TEX: " << entries[idx].mID << " IDX: " << idx << " Size: " << entries[idx].mImageSize << LL_ENDL;
}
else
{
- llerrs << "mTexturesSizeMap / mHeaderIDMap corrupted." << llendl ;
+ LL_ERRS() << "mTexturesSizeMap / mHeaderIDMap corrupted." << LL_ENDL ;
}
}
}
@@ -1682,7 +1682,7 @@ void LLTextureCache::purgeTextures(bool validate)
<< " PURGED: " << purge_count
<< " ENTRIES: " << num_entries
<< " CACHE SIZE: " << mTexturesSizeTotal / (1024 * 1024) << " MB"
- << llendl;
+ << LL_ENDL;
}
//////////////////////////////////////////////////////////////////////////////
@@ -1900,7 +1900,7 @@ bool LLTextureCache::writeToFastCache(S32 id, LLPointer<LLImageRaw> raw, S32 dis
//rescale image if needed
if (raw.isNull() || !raw->getData())
{
- llerrs << "Attempted to write NULL raw image to fastcache" << llendl;
+ LL_ERRS() << "Attempted to write NULL raw image to fastcache" << LL_ENDL;
return false;
}
@@ -2094,7 +2094,7 @@ void LLTextureCache::removeEntry(S32 idx, Entry& entry, std::string& filename)
bool LLTextureCache::removeFromCache(const LLUUID& id)
{
- //llwarns << "Removing texture from cache: " << id << llendl;
+ //LL_WARNS() << "Removing texture from cache: " << id << LL_ENDL;
bool ret = false ;
if (!mReadOnly)
{
diff --git a/indra/newview/lltexturecache.h b/indra/newview/lltexturecache.h
index deaacc4975..6ff4c44568 100755
--- a/indra/newview/lltexturecache.h
+++ b/indra/newview/lltexturecache.h
@@ -104,7 +104,7 @@ public:
/*virtual*/ S32 update(F32 max_time_ms);
- void purgeCache(ELLPath location);
+ void purgeCache(ELLPath location, bool remove_dir = true);
void setReadOnly(BOOL read_only) ;
S64 initCache(ELLPath location, S64 maxsize, BOOL texture_cache_mismatch);
@@ -131,8 +131,8 @@ public:
// debug
S32 getNumReads() { return mReaders.size(); }
S32 getNumWrites() { return mWriters.size(); }
- S64 getUsage() { return mTexturesSizeTotal; }
- S64 getMaxUsage() { return sCacheMaxTexturesSize; }
+ S64Bytes getUsage() { return S64Bytes(mTexturesSizeTotal); }
+ S64Bytes getMaxUsage() { return S64Bytes(sCacheMaxTexturesSize); }
U32 getEntries() { return mHeaderEntriesInfo.mEntries; }
U32 getMaxEntries() { return sCacheMaxEntries; };
BOOL isInCache(const LLUUID& id) ;
diff --git a/indra/newview/lltexturectrl.cpp b/indra/newview/lltexturectrl.cpp
index ea837c9127..9d1290b86d 100755
--- a/indra/newview/lltexturectrl.cpp
+++ b/indra/newview/lltexturectrl.cpp
@@ -208,7 +208,7 @@ LLFloaterTexturePicker::LLFloaterTexturePicker(
: LLFloater(LLSD()),
mOwner( owner ),
mImageAssetID( owner->getImageAssetID() ),
- mFallbackImage( fallback_image ),
+ mFallbackImage( fallback_image ),
mOriginalImageAssetID(owner->getImageAssetID()),
mLabel(label),
mTentativeLabel(NULL),
@@ -355,7 +355,7 @@ BOOL LLFloaterTexturePicker::handleDragAndDrop(
}
handled = TRUE;
- lldebugst(LLERR_USER_INPUT) << "dragAndDrop handled by LLFloaterTexturePicker " << getName() << llendl;
+ LL_DEBUGS("UserInput") << "dragAndDrop handled by LLFloaterTexturePicker " << getName() << LL_ENDL;
return handled;
}
@@ -549,11 +549,11 @@ void LLFloaterTexturePicker::draw()
if (gFocusMgr.childHasMouseCapture(getDragHandle()))
{
- mContextConeOpacity = lerp(mContextConeOpacity, gSavedSettings.getF32("PickerContextOpacity"), LLCriticalDamp::getInterpolant(CONTEXT_FADE_TIME));
+ mContextConeOpacity = lerp(mContextConeOpacity, gSavedSettings.getF32("PickerContextOpacity"), LLSmoothInterpolation::getInterpolant(CONTEXT_FADE_TIME));
}
else
{
- mContextConeOpacity = lerp(mContextConeOpacity, 0.f, LLCriticalDamp::getInterpolant(CONTEXT_FADE_TIME));
+ mContextConeOpacity = lerp(mContextConeOpacity, 0.f, LLSmoothInterpolation::getInterpolant(CONTEXT_FADE_TIME));
}
updateImageStats();
@@ -667,10 +667,10 @@ const LLUUID& LLFloaterTexturePicker::findItemID(const LLUUID& asset_id, BOOL co
LLInventoryModel::INCLUDE_TRASH,
asset_id_matches);
- if (items.count())
+ if (items.size())
{
// search for copyable version first
- for (S32 i = 0; i < items.count(); i++)
+ for (S32 i = 0; i < items.size(); i++)
{
LLInventoryItem* itemp = items[i];
LLPermissions item_permissions = itemp->getPermissions();
@@ -1342,9 +1342,9 @@ void LLTextureCtrl::onFloaterCommit(ETexturePickOp op, LLUUID id)
else
{
mImageItemID = floaterp->findItemID(floaterp->getAssetID(), FALSE);
- lldebugs << "mImageItemID: " << mImageItemID << llendl;
+ LL_DEBUGS() << "mImageItemID: " << mImageItemID << LL_ENDL;
mImageAssetID = floaterp->getAssetID();
- lldebugs << "mImageAssetID: " << mImageAssetID << llendl;
+ LL_DEBUGS() << "mImageAssetID: " << mImageAssetID << LL_ENDL;
}
if (op == TEXTURE_SELECT && mOnSelectCallback)
@@ -1445,7 +1445,7 @@ BOOL LLTextureCtrl::handleDragAndDrop(S32 x, S32 y, MASK mask,
}
handled = TRUE;
- lldebugst(LLERR_USER_INPUT) << "dragAndDrop handled by LLTextureCtrl " << getName() << llendl;
+ LL_DEBUGS("UserInput") << "dragAndDrop handled by LLTextureCtrl " << getName() << LL_ENDL;
return handled;
}
diff --git a/indra/newview/lltexturectrl.h b/indra/newview/lltexturectrl.h
index ad79042ef1..15ca7bed92 100755
--- a/indra/newview/lltexturectrl.h
+++ b/indra/newview/lltexturectrl.h
@@ -227,8 +227,4 @@ private:
S32 mLabelWidth;
};
-// XUI HACK: When floaters converted, switch this file to lltexturepicker.h/cpp
-// and class to LLTexturePicker
-#define LLTexturePicker LLTextureCtrl
-
#endif // LL_LLTEXTURECTRL_H
diff --git a/indra/newview/lltexturefetch.cpp b/indra/newview/lltexturefetch.cpp
index e5f2ca7e5c..2acd38b753 100644..100755
--- a/indra/newview/lltexturefetch.cpp
+++ b/indra/newview/lltexturefetch.cpp
@@ -53,6 +53,7 @@
#include "llviewerstatsrecorder.h"
#include "llviewerassetstats.h"
#include "llworld.h"
+#include "llsdparam.h"
#include "llsdutil.h"
#include "llstartup.h"
#include "llsdserialize.h"
@@ -64,8 +65,8 @@
#include "bufferstream.h"
bool LLTextureFetchDebugger::sDebuggerEnabled = false ;
-LLStat LLTextureFetch::sCacheHitRate("texture_cache_hits", 128);
-LLStat LLTextureFetch::sCacheReadLatency("texture_cache_read_latency", 128);
+LLTrace::EventStatHandle<LLUnit<F32, LLUnits::Percent> > LLTextureFetch::sCacheHitRate("texture_cache_hits");
+LLTrace::EventStatHandle<F64Milliseconds > LLTextureFetch::sCacheReadLatency("texture_cache_read_latency");
//////////////////////////////////////////////////////////////////////////////
@@ -503,11 +504,12 @@ private:
static const char* sStateDescs[];
e_state mState;
void setState(e_state new_state);
+
e_write_to_cache_state mWriteToCacheState;
LLTextureFetch* mFetcher;
LLPointer<LLImageFormatted> mFormattedImage;
- LLPointer<LLImageRaw> mRawImage;
- LLPointer<LLImageRaw> mAuxImage;
+ LLPointer<LLImageRaw> mRawImage,
+ mAuxImage;
FTType mFTType;
LLUUID mID;
LLHost mHost;
@@ -516,22 +518,22 @@ private:
F32 mImagePriority;
U32 mWorkPriority;
F32 mRequestedPriority;
- S32 mDesiredDiscard;
- S32 mSimRequestedDiscard;
- S32 mRequestedDiscard;
- S32 mLoadedDiscard;
- S32 mDecodedDiscard;
- LLFrameTimer mRequestedTimer;
- LLFrameTimer mFetchTimer;
+ S32 mDesiredDiscard,
+ mSimRequestedDiscard,
+ mRequestedDiscard,
+ mLoadedDiscard,
+ mDecodedDiscard;
+ LLFrameTimer mRequestedTimer,
+ mFetchTimer;
LLTimer mCacheReadTimer;
F32 mCacheReadTime;
- LLTextureCache::handle_t mCacheReadHandle;
- LLTextureCache::handle_t mCacheWriteHandle;
- S32 mRequestedSize;
- S32 mRequestedOffset;
- S32 mDesiredSize;
- S32 mFileSize;
- S32 mCachedSize;
+ LLTextureCache::handle_t mCacheReadHandle,
+ mCacheWriteHandle;
+ S32 mRequestedSize,
+ mRequestedOffset,
+ mDesiredSize,
+ mFileSize,
+ mCachedSize;
e_request_state mSentRequest;
handle_t mDecodeHandle;
BOOL mLoaded;
@@ -541,8 +543,8 @@ private:
BOOL mHaveAllData;
BOOL mInLocalCache;
BOOL mInCache;
- bool mCanUseHTTP ;
- bool mCanUseNET ; //can get from asset server.
+ bool mCanUseHTTP,
+ mCanUseNET ; //can get from asset server.
S32 mRetryAttempt;
S32 mActiveCount;
LLCore::HttpStatus mGetStatus;
@@ -552,9 +554,12 @@ private:
LLMutex mWorkMutex;
struct PacketData
{
- PacketData(U8* data, S32 size) { mData = data; mSize = size; }
+ PacketData(U8* data, S32 size)
+ : mData(data), mSize(size)
+ {}
~PacketData() { clearData(); }
void clearData() { delete[] mData; mData = NULL; }
+
U8* mData;
U32 mSize;
};
@@ -568,16 +573,16 @@ private:
LLCore::HttpHandle mHttpHandle; // Handle of any active request
LLCore::BufferArray * mHttpBufferArray; // Refcounted pointer to response data
- int mHttpPolicyClass;
+ S32 mHttpPolicyClass;
bool mHttpActive; // Active request to http library
- unsigned int mHttpReplySize; // Actual received data size
- unsigned int mHttpReplyOffset; // Actual received data offset
+ U32 mHttpReplySize, // Actual received data size
+ mHttpReplyOffset; // Actual received data offset
bool mHttpHasResource; // Counts against Fetcher's mHttpSemaphore
// State history
- U32 mCacheReadCount;
- U32 mCacheWriteCount;
- U32 mResourceWaitCount; // Requests entering WAIT_HTTP_RESOURCE2
+ U32 mCacheReadCount,
+ mCacheWriteCount,
+ mResourceWaitCount; // Requests entering WAIT_HTTP_RESOURCE2
};
//////////////////////////////////////////////////////////////////////////////
@@ -895,7 +900,7 @@ LLTextureFetchWorker::LLTextureFetchWorker(LLTextureFetch* fetcher,
calcWorkPriority();
mType = host.isOk() ? LLImageBase::TYPE_AVATAR_BAKE : LLImageBase::TYPE_NORMAL;
-// llinfos << "Create: " << mID << " mHost:" << host << " Discard=" << discard << llendl;
+// LL_INFOS() << "Create: " << mID << " mHost:" << host << " Discard=" << discard << LL_ENDL;
if (!mFetcher->mDebugPause)
{
U32 work_priority = mWorkPriority | LLWorkerThread::PRIORITY_HIGH;
@@ -906,10 +911,10 @@ LLTextureFetchWorker::LLTextureFetchWorker(LLTextureFetch* fetcher,
LLTextureFetchWorker::~LLTextureFetchWorker()
{
-// llinfos << "Destroy: " << mID
+// LL_INFOS() << "Destroy: " << mID
// << " Decoded=" << mDecodedDiscard
// << " Requested=" << mRequestedDiscard
-// << " Desired=" << mDesiredDiscard << llendl;
+// << " Desired=" << mDesiredDiscard << LL_ENDL;
llassert_always(!haveWork());
lockWorkMutex(); // +Mw (should be useless)
@@ -941,7 +946,7 @@ LLTextureFetchWorker::~LLTextureFetchWorker()
mHttpBufferArray = NULL;
}
unlockWorkMutex(); // -Mw
- mFetcher->removeFromHTTPQueue(mID, 0);
+ mFetcher->removeFromHTTPQueue(mID, (S32Bytes)0);
mFetcher->removeHttpWaiter(mID);
mFetcher->updateStateStats(mCacheReadCount, mCacheWriteCount, mResourceWaitCount);
}
@@ -970,7 +975,7 @@ void LLTextureFetchWorker::setupPacketData()
mFirstPacket = (data_size - FIRST_PACKET_SIZE) / MAX_IMG_PACKET_SIZE + 1;
if (FIRST_PACKET_SIZE + (mFirstPacket-1) * MAX_IMG_PACKET_SIZE != data_size)
{
- llwarns << "Bad CACHED TEXTURE size: " << data_size << " removing." << llendl;
+ LL_WARNS() << "Bad CACHED TEXTURE size: " << data_size << " removing." << LL_ENDL;
removeFromCache();
resetFormattedData();
clearPackets();
@@ -1093,14 +1098,14 @@ bool LLTextureFetchWorker::doWork(S32 param)
{
if (mState == INIT || mState == LOAD_FROM_NETWORK || mState == LOAD_FROM_SIMULATOR)
{
- LL_DEBUGS("Texture") << mID << " abort: mImagePriority < F_ALMOST_ZERO" << llendl;
+ LL_DEBUGS("Texture") << mID << " abort: mImagePriority < F_ALMOST_ZERO" << LL_ENDL;
return true; // abort
}
}
if(mState > CACHE_POST && !mCanUseNET && !mCanUseHTTP)
{
//nowhere to get data, abort.
- LL_WARNS("Texture") << mID << " abort, nowhere to get data" << llendl;
+ LL_WARNS("Texture") << mID << " abort, nowhere to get data" << LL_ENDL;
return true ;
}
@@ -1216,7 +1221,7 @@ bool LLTextureFetchWorker::doWork(S32 param)
//
//This should never happen
//
- LL_DEBUGS("Texture") << mID << " this should never happen" << llendl;
+ LL_DEBUGS("Texture") << mID << " this should never happen" << LL_ENDL;
return false;
}
}
@@ -1238,7 +1243,7 @@ bool LLTextureFetchWorker::doWork(S32 param)
if (mLoadedDiscard < 0)
{
LL_WARNS("Texture") << mID << " mLoadedDiscard is " << mLoadedDiscard
- << ", should be >=0" << llendl;
+ << ", should be >=0" << LL_ENDL;
}
setState(DECODE_IMAGE);
mInCache = TRUE;
@@ -1246,7 +1251,7 @@ bool LLTextureFetchWorker::doWork(S32 param)
LL_DEBUGS("Texture") << mID << ": Cached. Bytes: " << mFormattedImage->getDataSize()
<< " Size: " << llformat("%dx%d",mFormattedImage->getWidth(),mFormattedImage->getHeight())
<< " Desired Discard: " << mDesiredDiscard << " Desired Size: " << mDesiredSize << LL_ENDL;
- LLTextureFetch::sCacheHitRate.addValue(100.f);
+ record(LLTextureFetch::sCacheHitRate, LLUnits::Ratio::fromValue(1));
}
else
{
@@ -1264,7 +1269,7 @@ bool LLTextureFetchWorker::doWork(S32 param)
}
// fall through
- LLTextureFetch::sCacheHitRate.addValue(0.f);
+ record(LLTextureFetch::sCacheHitRate, LLUnits::Ratio::fromValue(0));
}
}
@@ -1297,7 +1302,7 @@ bool LLTextureFetchWorker::doWork(S32 param)
else
{
// This will happen if not logged in or if a region deoes not have HTTP Texture enabled
- //llwarns << "Region not found for host: " << mHost << llendl;
+ //LL_WARNS() << "Region not found for host: " << mHost << LL_ENDL;
mCanUseHTTP = false;
}
}
@@ -1340,7 +1345,7 @@ bool LLTextureFetchWorker::doWork(S32 param)
//recordTextureStart(false);
//setPriority(LLWorkerThread::PRIORITY_LOW | mWorkPriority);
- LL_DEBUGS("Texture") << mID << " does this happen?" << llendl;
+ LL_DEBUGS("Texture") << mID << " does this happen?" << LL_ENDL;
return false;
}
}
@@ -1358,15 +1363,15 @@ bool LLTextureFetchWorker::doWork(S32 param)
if (mFormattedImage.isNull() || !mFormattedImage->getDataSize())
{
// processSimulatorPackets() failed
-// llwarns << "processSimulatorPackets() failed to load buffer" << llendl;
- LL_WARNS("Texture") << mID << " processSimulatorPackets() failed to load buffer" << llendl;
+// LL_WARNS() << "processSimulatorPackets() failed to load buffer" << LL_ENDL;
+ LL_WARNS("Texture") << mID << " processSimulatorPackets() failed to load buffer" << LL_ENDL;
return true; // failed
}
setPriority(LLWorkerThread::PRIORITY_HIGH | mWorkPriority);
if (mLoadedDiscard < 0)
{
LL_WARNS("Texture") << mID << " mLoadedDiscard is " << mLoadedDiscard
- << ", should be >=0" << llendl;
+ << ", should be >=0" << LL_ENDL;
}
setState(DECODE_IMAGE);
mWriteToCacheState = SHOULD_WRITE;
@@ -1416,7 +1421,7 @@ bool LLTextureFetchWorker::doWork(S32 param)
if (! mCanUseHTTP)
{
releaseHttpSemaphore();
- LL_WARNS("Texture") << mID << " abort: SEND_HTTP_REQ but !mCanUseHTTP" << llendl;
+ LL_WARNS("Texture") << mID << " abort: SEND_HTTP_REQ but !mCanUseHTTP" << LL_ENDL;
return true; // abort
}
@@ -1436,7 +1441,7 @@ bool LLTextureFetchWorker::doWork(S32 param)
if (mLoadedDiscard < 0)
{
LL_WARNS("Texture") << mID << " mLoadedDiscard is " << mLoadedDiscard
- << ", should be >=0" << llendl;
+ << ", should be >=0" << LL_ENDL;
}
setState(DECODE_IMAGE);
releaseHttpSemaphore();
@@ -1445,7 +1450,7 @@ bool LLTextureFetchWorker::doWork(S32 param)
else
{
releaseHttpSemaphore();
- LL_WARNS("Texture") << mID << " SEND_HTTP_REQ abort: cur_size " << cur_size << " <=0" << llendl;
+ LL_WARNS("Texture") << mID << " SEND_HTTP_REQ abort: cur_size " << cur_size << " <=0" << LL_ENDL;
return true; // abort.
}
}
@@ -1493,7 +1498,7 @@ bool LLTextureFetchWorker::doWork(S32 param)
}
if (LLCORE_HTTP_HANDLE_INVALID == mHttpHandle)
{
- llwarns << "HTTP GET request failed for " << mID << llendl;
+ LL_WARNS() << "HTTP GET request failed for " << mID << LL_ENDL;
resetFormattedData();
releaseHttpSemaphore();
return true; // failed
@@ -1523,11 +1528,11 @@ bool LLTextureFetchWorker::doWork(S32 param)
{
setState(DONE);
releaseHttpSemaphore();
- LL_DEBUGS("Texture") << mID << " abort: WAIT_HTTP_REQ not found" << llendl;
+ LL_DEBUGS("Texture") << mID << " abort: WAIT_HTTP_REQ not found" << LL_ENDL;
return true; // failed, means no map tile on the empty region.
}
- llwarns << "Texture missing from server (404): " << mUrl << llendl;
+ LL_WARNS() << "Texture missing from server (404): " << mUrl << LL_ENDL;
// roll back to try UDP
if (mCanUseNET)
@@ -1551,10 +1556,10 @@ bool LLTextureFetchWorker::doWork(S32 param)
}
else
{
- llinfos << "HTTP GET failed for: " << mUrl
+ LL_INFOS() << "HTTP GET failed for: " << mUrl
<< " Status: " << mGetStatus.toTerseString()
<< " Reason: '" << mGetReason << "'"
- << llendl;
+ << LL_ENDL;
}
mUrl.clear();
@@ -1566,7 +1571,7 @@ bool LLTextureFetchWorker::doWork(S32 param)
if (mLoadedDiscard < 0)
{
LL_WARNS("Texture") << mID << " mLoadedDiscard is " << mLoadedDiscard
- << ", should be >=0" << llendl;
+ << ", should be >=0" << LL_ENDL;
}
setState(DECODE_IMAGE);
releaseHttpSemaphore();
@@ -1577,7 +1582,7 @@ bool LLTextureFetchWorker::doWork(S32 param)
resetFormattedData();
setState(DONE);
releaseHttpSemaphore();
- LL_WARNS("Texture") << mID << " abort: fail harder" << llendl;
+ LL_WARNS("Texture") << mID << " abort: fail harder" << LL_ENDL;
return true; // failed
}
@@ -1601,7 +1606,7 @@ bool LLTextureFetchWorker::doWork(S32 param)
// abort.
setState(DONE);
- LL_WARNS("Texture") << mID << " abort: no data received" << llendl;
+ LL_WARNS("Texture") << mID << " abort: no data received" << LL_ENDL;
releaseHttpSemaphore();
return true;
}
@@ -1670,7 +1675,7 @@ bool LLTextureFetchWorker::doWork(S32 param)
if (mLoadedDiscard < 0)
{
LL_WARNS("Texture") << mID << " mLoadedDiscard is " << mLoadedDiscard
- << ", should be >=0" << llendl;
+ << ", should be >=0" << LL_ENDL;
}
setState(DECODE_IMAGE);
if (mWriteToCacheState != NOT_WRITE)
@@ -1711,26 +1716,26 @@ bool LLTextureFetchWorker::doWork(S32 param)
{
// We aborted, don't decode
setState(DONE);
- LL_DEBUGS("Texture") << mID << " DECODE_IMAGE abort: desired discard " << mDesiredDiscard << "<0" << llendl;
+ LL_DEBUGS("Texture") << mID << " DECODE_IMAGE abort: desired discard " << mDesiredDiscard << "<0" << LL_ENDL;
return true;
}
if (mFormattedImage->getDataSize() <= 0)
{
- llwarns << "Decode entered with invalid mFormattedImage. ID = " << mID << llendl;
+ LL_WARNS() << "Decode entered with invalid mFormattedImage. ID = " << mID << LL_ENDL;
//abort, don't decode
setState(DONE);
- LL_DEBUGS("Texture") << mID << " DECODE_IMAGE abort: (mFormattedImage->getDataSize() <= 0)" << llendl;
+ LL_DEBUGS("Texture") << mID << " DECODE_IMAGE abort: (mFormattedImage->getDataSize() <= 0)" << LL_ENDL;
return true;
}
if (mLoadedDiscard < 0)
{
- llwarns << "Decode entered with invalid mLoadedDiscard. ID = " << mID << llendl;
+ LL_WARNS() << "Decode entered with invalid mLoadedDiscard. ID = " << mID << LL_ENDL;
//abort, don't decode
setState(DONE);
- LL_DEBUGS("Texture") << mID << " DECODE_IMAGE abort: mLoadedDiscard < 0" << llendl;
+ LL_DEBUGS("Texture") << mID << " DECODE_IMAGE abort: mLoadedDiscard < 0" << LL_ENDL;
return true;
}
@@ -1763,7 +1768,7 @@ bool LLTextureFetchWorker::doWork(S32 param)
if (mCachedSize > 0 && !mInLocalCache && mRetryAttempt == 0)
{
// Cache file should be deleted, try again
-// llwarns << mID << ": Decode of cached file failed (removed), retrying" << llendl;
+// LL_WARNS() << mID << ": Decode of cached file failed (removed), retrying" << LL_ENDL;
llassert_always(mDecodeHandle == 0);
mFormattedImage = NULL;
++mRetryAttempt;
@@ -1773,7 +1778,7 @@ bool LLTextureFetchWorker::doWork(S32 param)
}
else
{
-// llwarns << "UNABLE TO LOAD TEXTURE: " << mID << " RETRIES: " << mRetryAttempt << llendl;
+// LL_WARNS() << "UNABLE TO LOAD TEXTURE: " << mID << " RETRIES: " << mRetryAttempt << LL_ENDL;
setState(DONE); // failed
}
}
@@ -1855,7 +1860,7 @@ bool LLTextureFetchWorker::doWork(S32 param)
setState(INIT);
LL_DEBUGS("Texture") << mID << " more data requested, returning to INIT: "
<< " mDecodedDiscard " << mDecodedDiscard << ">= 0 && mDesiredDiscard " << mDesiredDiscard
- << "<" << " mDecodedDiscard " << mDecodedDiscard << llendl;
+ << "<" << " mDecodedDiscard " << mDecodedDiscard << LL_ENDL;
setPriority(LLWorkerThread::PRIORITY_HIGH | mWorkPriority);
return false;
}
@@ -1883,12 +1888,11 @@ void LLTextureFetchWorker::onCompleted(LLCore::HttpHandle handle, LLCore::HttpRe
if (log_to_viewer_log || log_to_sim)
{
- U64 timeNow = LLTimer::getTotalTime();
- mFetcher->mTextureInfo.setRequestStartTime(mID, mMetricsStartTime);
+ mFetcher->mTextureInfo.setRequestStartTime(mID, mMetricsStartTime.value());
mFetcher->mTextureInfo.setRequestType(mID, LLTextureInfoDetails::REQUEST_TYPE_HTTP);
mFetcher->mTextureInfo.setRequestSize(mID, mRequestedSize);
mFetcher->mTextureInfo.setRequestOffset(mID, mRequestedOffset);
- mFetcher->mTextureInfo.setRequestCompleteTimeAndLog(mID, timeNow);
+ mFetcher->mTextureInfo.setRequestCompleteTimeAndLog(mID, LLTimer::getTotalTime());
}
bool success = true;
@@ -1898,22 +1902,22 @@ void LLTextureFetchWorker::onCompleted(LLCore::HttpHandle handle, LLCore::HttpRe
LL_DEBUGS("Texture") << "HTTP COMPLETE: " << mID
<< " status: " << status.toTerseString()
<< " '" << status.toString() << "'"
- << llendl;
+ << LL_ENDL;
// unsigned int offset(0), length(0), full_length(0);
// response->getRange(&offset, &length, &full_length);
-// llwarns << "HTTP COMPLETE: " << mID << " handle: " << handle
+// LL_WARNS() << "HTTP COMPLETE: " << mID << " handle: " << handle
// << " status: " << status.toULong() << " '" << status.toString() << "'"
// << " req offset: " << mRequestedOffset << " req length: " << mRequestedSize
// << " offset: " << offset << " length: " << length
-// << llendl;
+// << LL_ENDL;
if (! status)
{
success = false;
std::string reason(status.toString());
setGetStatus(status, reason);
- llwarns << "CURL GET FAILED, status: " << status.toTerseString()
- << " reason: " << reason << llendl;
+ LL_WARNS() << "CURL GET FAILED, status: " << status.toTerseString()
+ << " reason: " << reason << LL_ENDL;
}
else
{
@@ -1927,7 +1931,7 @@ void LLTextureFetchWorker::onCompleted(LLCore::HttpHandle handle, LLCore::HttpRe
partial = (par_status == status);
}
- S32 data_size = callbackHttpGet(response, partial, success);
+ S32BytesImplicit data_size = callbackHttpGet(response, partial, success);
if (log_texture_traffic && data_size > 0)
{
@@ -2123,13 +2127,13 @@ S32 LLTextureFetchWorker::callbackHttpGet(LLCore::HttpResponse * response,
if (mState != WAIT_HTTP_REQ)
{
- llwarns << "callbackHttpGet for unrequested fetch worker: " << mID
- << " req=" << mSentRequest << " state= " << mState << llendl;
+ LL_WARNS() << "callbackHttpGet for unrequested fetch worker: " << mID
+ << " req=" << mSentRequest << " state= " << mState << LL_ENDL;
return data_size;
}
if (mLoaded)
{
- llwarns << "Duplicate callback for " << mID.asString() << llendl;
+ LL_WARNS() << "Duplicate callback for " << mID.asString() << LL_ENDL;
return data_size ; // ignore duplicate callback
}
if (success)
@@ -2194,7 +2198,7 @@ S32 LLTextureFetchWorker::callbackHttpGet(LLCore::HttpResponse * response,
else if (data_size > mRequestedSize)
{
// *TODO: This shouldn't be happening any more (REALLY don't expect this anymore)
- llwarns << "data_size = " << data_size << " > requested: " << mRequestedSize << llendl;
+ LL_WARNS() << "data_size = " << data_size << " > requested: " << mRequestedSize << LL_ENDL;
mHaveAllData = TRUE;
llassert_always(mDecodeHandle == 0);
mFormattedImage = NULL; // discard any previous data we had
@@ -2229,7 +2233,7 @@ void LLTextureFetchWorker::callbackCacheRead(bool success, LLImageFormatted* ima
LLMutexLock lock(&mWorkMutex); // +Mw
if (mState != LOAD_FROM_TEXTURE_CACHE)
{
-// llwarns << "Read callback for " << mID << " with state = " << mState << llendl;
+// LL_WARNS() << "Read callback for " << mID << " with state = " << mState << LL_ENDL;
return;
}
if (success)
@@ -2254,7 +2258,7 @@ void LLTextureFetchWorker::callbackCacheWrite(bool success)
LLMutexLock lock(&mWorkMutex); // +Mw
if (mState != WAIT_ON_WRITE)
{
-// llwarns << "Write callback for " << mID << " with state = " << mState << llendl;
+// LL_WARNS() << "Write callback for " << mID << " with state = " << mState << LL_ENDL;
return;
}
mWritten = TRUE;
@@ -2273,7 +2277,7 @@ void LLTextureFetchWorker::callbackDecoded(bool success, LLImageRaw* raw, LLImag
}
if (mState != DECODE_IMAGE_UPDATE)
{
-// llwarns << "Decode callback for " << mID << " with state = " << mState << llendl;
+// LL_WARNS() << "Decode callback for " << mID << " with state = " << mState << LL_ENDL;
mDecodeHandle = 0;
return;
}
@@ -2291,12 +2295,12 @@ void LLTextureFetchWorker::callbackDecoded(bool success, LLImageRaw* raw, LLImag
}
else
{
- llwarns << "DECODE FAILED: " << mID << " Discard: " << (S32)mFormattedImage->getDiscardLevel() << llendl;
+ LL_WARNS() << "DECODE FAILED: " << mID << " Discard: " << (S32)mFormattedImage->getDiscardLevel() << LL_ENDL;
removeFromCache();
mDecodedDiscard = -1; // Redundant, here for clarity and paranoia
}
mDecoded = TRUE;
-// llinfos << mID << " : DECODE COMPLETE " << llendl;
+// LL_INFOS() << mID << " : DECODE COMPLETE " << LL_ENDL;
setPriority(LLWorkerThread::PRIORITY_HIGH | mWorkPriority);
mCacheReadTime = mCacheReadTimer.getElapsedTimeF32();
} // -Mw
@@ -2329,11 +2333,11 @@ bool LLTextureFetchWorker::writeToCacheComplete()
// Threads: Ttf
void LLTextureFetchWorker::recordTextureStart(bool is_http)
{
- if (! mMetricsStartTime)
+ if (! mMetricsStartTime.value())
{
mMetricsStartTime = LLViewerAssetStatsFF::get_timestamp();
}
- LLViewerAssetStatsFF::record_enqueue_thread1(LLViewerAssetType::AT_TEXTURE,
+ LLViewerAssetStatsFF::record_enqueue(LLViewerAssetType::AT_TEXTURE,
is_http,
LLImageBase::TYPE_AVATAR_BAKE == mType);
}
@@ -2342,15 +2346,15 @@ void LLTextureFetchWorker::recordTextureStart(bool is_http)
// Threads: Ttf
void LLTextureFetchWorker::recordTextureDone(bool is_http)
{
- if (mMetricsStartTime)
+ if (mMetricsStartTime.value())
{
- LLViewerAssetStatsFF::record_response_thread1(LLViewerAssetType::AT_TEXTURE,
+ LLViewerAssetStatsFF::record_response(LLViewerAssetType::AT_TEXTURE,
is_http,
LLImageBase::TYPE_AVATAR_BAKE == mType,
LLViewerAssetStatsFF::get_timestamp() - mMetricsStartTime);
- mMetricsStartTime = 0;
+ mMetricsStartTime = (U32Seconds)0;
}
- LLViewerAssetStatsFF::record_dequeue_thread1(LLViewerAssetType::AT_TEXTURE,
+ LLViewerAssetStatsFF::record_dequeue(LLViewerAssetType::AT_TEXTURE,
is_http,
LLImageBase::TYPE_AVATAR_BAKE == mType);
}
@@ -2390,7 +2394,7 @@ LLTextureFetch::LLTextureFetch(LLTextureCache* cache, LLImageDecodeThread* image
mFetcherLocked(FALSE)
{
mMaxBandwidth = gSavedSettings.getF32("ThrottleBandwidthKBPS");
- mTextureInfo.setUpLogging(gSavedSettings.getBOOL("LogTextureDownloadsToViewerLog"), gSavedSettings.getBOOL("LogTextureDownloadsToSimulator"), gSavedSettings.getU32("TextureLoggingThreshold"));
+ mTextureInfo.setUpLogging(gSavedSettings.getBOOL("LogTextureDownloadsToViewerLog"), gSavedSettings.getBOOL("LogTextureDownloadsToSimulator"), U32Bytes(gSavedSettings.getU32("TextureLoggingThreshold")));
LLTextureFetchDebugger::sDebuggerEnabled = gSavedSettings.getBOOL("TextureFetchDebuggerEnabled");
if(LLTextureFetchDebugger::isEnabled())
@@ -2479,8 +2483,8 @@ bool LLTextureFetch::createRequest(FTType f_type, const std::string& url, const
{
if (worker->mHost != host)
{
- llwarns << "LLTextureFetch::createRequest " << id << " called with multiple hosts: "
- << host << " != " << worker->mHost << llendl;
+ LL_WARNS() << "LLTextureFetch::createRequest " << id << " called with multiple hosts: "
+ << host << " != " << worker->mHost << LL_ENDL;
removeRequest(worker, true);
worker = NULL;
return false;
@@ -2491,7 +2495,7 @@ bool LLTextureFetch::createRequest(FTType f_type, const std::string& url, const
std::string exten = gDirUtilp->getExtension(url);
if (!url.empty() && (!exten.empty() && LLImageBase::getCodecFromExtension(exten) != IMG_CODEC_J2C))
{
- LL_DEBUGS("Texture") << "full request for " << id << " exten is not J2C: " << exten << llendl;
+ LL_DEBUGS("Texture") << "full request for " << id << " exten is not J2C: " << exten << LL_ENDL;
// Only do partial requests for J2C at the moment
desired_size = MAX_IMAGE_DATA_SIZE;
desired_discard = 0;
@@ -2558,7 +2562,7 @@ bool LLTextureFetch::createRequest(FTType f_type, const std::string& url, const
worker->unlockWorkMutex(); // -Mw
}
- LL_DEBUGS("Texture") << "REQUESTED: " << id << " Discard: " << desired_discard << " size " << desired_size << llendl;
+ LL_DEBUGS("Texture") << "REQUESTED: " << id << " Discard: " << desired_discard << " size " << desired_size << LL_ENDL;
return true;
}
@@ -2608,11 +2612,11 @@ void LLTextureFetch::addToHTTPQueue(const LLUUID& id)
} // -Mfnq
// Threads: T*
-void LLTextureFetch::removeFromHTTPQueue(const LLUUID& id, S32 received_size)
+void LLTextureFetch::removeFromHTTPQueue(const LLUUID& id, S32Bytes received_size)
{
LLMutexLock lock(&mNetworkQueueMutex); // +Mfnq
mHTTPTextureQueue.erase(id);
- mHTTPTextureBits += received_size * 8; // Approximate - does not include header bits
+ mHTTPTextureBits += received_size; // Approximate - does not include header bits
} // -Mfnq
// NB: If you change deleteRequest() you should probably make
@@ -2752,7 +2756,7 @@ bool LLTextureFetch::getRequestFinished(const LLUUID& id, S32& discard_level,
// Should only happen if we set mDebugPause...
if (!mDebugPause)
{
-// llwarns << "Adding work for inactive worker: " << id << llendl;
+// LL_WARNS() << "Adding work for inactive worker: " << id << LL_ENDL;
worker->addWork(0, LLWorkerThread::PRIORITY_HIGH | worker->mWorkPriority);
}
}
@@ -2762,10 +2766,10 @@ bool LLTextureFetch::getRequestFinished(const LLUUID& id, S32& discard_level,
discard_level = worker->mDecodedDiscard;
raw = worker->mRawImage;
aux = worker->mAuxImage;
- F32 cache_read_time = worker->mCacheReadTime;
- if (cache_read_time != 0.f)
+ F32Seconds cache_read_time(worker->mCacheReadTime);
+ if (cache_read_time != (F32Seconds)0.f)
{
- sCacheReadLatency.addValue(cache_read_time * 1000.f);
+ record(sCacheReadLatency, cache_read_time);
}
res = true;
LL_DEBUGS("Texture") << id << ": Request Finished. State: " << worker->mState << " Discard: " << discard_level << LL_ENDL;
@@ -2889,10 +2893,10 @@ S32 LLTextureFetch::update(F32 max_time_ms)
{
mNetworkQueueMutex.lock(); // +Mfnq
- mMaxBandwidth = band_width;
+ mMaxBandwidth = band_width();
- gTextureList.sTextureBits += mHTTPTextureBits;
- mHTTPTextureBits = 0;
+ add(LLStatViewer::TEXTURE_NETWORK_DATA_RECEIVED, mHTTPTextureBits);
+ mHTTPTextureBits = (U32Bits)0;
mNetworkQueueMutex.unlock(); // -Mfnq
}
@@ -2988,7 +2992,7 @@ void LLTextureFetch::threadedUpdate()
S32 q = mCurlGetRequest->getQueued();
if (q > 0)
{
- llinfos << "Queued gets: " << q << llendl;
+ LL_INFOS() << "Queued gets: " << q << LL_ENDL;
info_timer.reset();
}
}
@@ -3037,7 +3041,7 @@ void LLTextureFetch::sendRequestListToSimulators()
(req->mState != LLTextureFetchWorker::LOAD_FROM_SIMULATOR))
{
// We already received our URL, remove from the queue
- llwarns << "Worker: " << req->mID << " in mNetworkQueue but in wrong state: " << req->mState << llendl;
+ LL_WARNS() << "Worker: " << req->mID << " in mNetworkQueue but in wrong state: " << req->mState << LL_ENDL;
mNetworkQueue.erase(curiter);
continue;
}
@@ -3105,8 +3109,8 @@ void LLTextureFetch::sendRequestListToSimulators()
gMessageSystem->addF32Fast(_PREHASH_DownloadPriority, req->mImagePriority);
gMessageSystem->addU32Fast(_PREHASH_Packet, packet);
gMessageSystem->addU8Fast(_PREHASH_Type, req->mType);
-// llinfos << "IMAGE REQUEST: " << req->mID << " Discard: " << req->mDesiredDiscard
-// << " Packet: " << packet << " Priority: " << req->mImagePriority << llendl;
+// LL_INFOS() << "IMAGE REQUEST: " << req->mID << " Discard: " << req->mDesiredDiscard
+// << " Packet: " << packet << " Priority: " << req->mImagePriority << LL_ENDL;
static LLCachedControl<bool> log_to_viewer_log(gSavedSettings,"LogTextureDownloadsToViewerLog", false);
static LLCachedControl<bool> log_to_sim(gSavedSettings,"LogTextureDownloadsToSimulator", false);
@@ -3127,7 +3131,7 @@ void LLTextureFetch::sendRequestListToSimulators()
sim_request_count++;
if (sim_request_count >= IMAGES_PER_REQUEST)
{
-// llinfos << "REQUESTING " << sim_request_count << " IMAGES FROM HOST: " << host.getIPString() << llendl;
+// LL_INFOS() << "REQUESTING " << sim_request_count << " IMAGES FROM HOST: " << host.getIPString() << LL_ENDL;
gMessageSystem->sendSemiReliable(host, NULL, NULL);
sim_request_count = 0;
@@ -3136,7 +3140,7 @@ void LLTextureFetch::sendRequestListToSimulators()
}
if (gMessageSystem && sim_request_count > 0 && sim_request_count < IMAGES_PER_REQUEST)
{
-// llinfos << "REQUESTING " << sim_request_count << " IMAGES FROM HOST: " << host.getIPString() << llendl;
+// LL_INFOS() << "REQUESTING " << sim_request_count << " IMAGES FROM HOST: " << host.getIPString() << LL_ENDL;
gMessageSystem->sendSemiReliable(host, NULL, NULL);
sim_request_count = 0;
}
@@ -3172,7 +3176,7 @@ void LLTextureFetch::sendRequestListToSimulators()
gMessageSystem->addF32Fast(_PREHASH_DownloadPriority, 0);
gMessageSystem->addU32Fast(_PREHASH_Packet, 0);
gMessageSystem->addU8Fast(_PREHASH_Type, 0);
-// llinfos << "CANCELING IMAGE REQUEST: " << (*iter2) << llendl;
+// LL_INFOS() << "CANCELING IMAGE REQUEST: " << (*iter2) << LL_ENDL;
request_count++;
if (request_count >= IMAGES_PER_REQUEST)
@@ -3200,12 +3204,12 @@ bool LLTextureFetchWorker::insertPacket(S32 index, U8* data, S32 size)
mRequestedTimer.reset();
if (index >= mTotalPackets)
{
-// llwarns << "Received Image Packet " << index << " > max: " << mTotalPackets << " for image: " << mID << llendl;
+// LL_WARNS() << "Received Image Packet " << index << " > max: " << mTotalPackets << " for image: " << mID << LL_ENDL;
return false;
}
if (index > 0 && index < mTotalPackets-1 && size != MAX_IMG_PACKET_SIZE)
{
-// llwarns << "Received bad sized packet: " << index << ", " << size << " != " << MAX_IMG_PACKET_SIZE << " for image: " << mID << llendl;
+// LL_WARNS() << "Received bad sized packet: " << index << ", " << size << " != " << MAX_IMG_PACKET_SIZE << " for image: " << mID << LL_ENDL;
return false;
}
@@ -3215,7 +3219,7 @@ bool LLTextureFetchWorker::insertPacket(S32 index, U8* data, S32 size)
}
else if (mPackets[index] != NULL)
{
-// llwarns << "Received duplicate packet: " << index << " for image: " << mID << llendl;
+// LL_WARNS() << "Received duplicate packet: " << index << " for image: " << mID << LL_ENDL;
return false;
}
@@ -3247,7 +3251,7 @@ void LLTextureFetchWorker::setState(e_state new_state)
"WAIT_ON_WRITE",
"DONE"
};
- LL_DEBUGS("Texture") << "id: " << mID << " FTType: " << mFTType << " disc: " << mDesiredDiscard << " sz: " << mDesiredSize << " state: " << e_state_name[mState] << " => " << e_state_name[new_state] << llendl;
+ LL_DEBUGS("Texture") << "id: " << mID << " FTType: " << mFTType << " disc: " << mDesiredDiscard << " sz: " << mDesiredSize << " state: " << e_state_name[mState] << " => " << e_state_name[new_state] << LL_ENDL;
mState = new_state;
}
@@ -3262,26 +3266,26 @@ bool LLTextureFetch::receiveImageHeader(const LLHost& host, const LLUUID& id, U8
if (!worker)
{
-// llwarns << "Received header for non active worker: " << id << llendl;
+// LL_WARNS() << "Received header for non active worker: " << id << LL_ENDL;
res = false;
}
else if (worker->mState != LLTextureFetchWorker::LOAD_FROM_NETWORK ||
worker->mSentRequest != LLTextureFetchWorker::SENT_SIM)
{
-// llwarns << "receiveImageHeader for worker: " << id
+// LL_WARNS() << "receiveImageHeader for worker: " << id
// << " in state: " << LLTextureFetchWorker::sStateDescs[worker->mState]
-// << " sent: " << worker->mSentRequest << llendl;
+// << " sent: " << worker->mSentRequest << LL_ENDL;
res = false;
}
else if (worker->mLastPacket != -1)
{
// check to see if we've gotten this packet before
-// llwarns << "Received duplicate header for: " << id << llendl;
+// LL_WARNS() << "Received duplicate header for: " << id << LL_ENDL;
res = false;
}
else if (!data_size)
{
-// llwarns << "Img: " << id << ":" << " Empty Image Header" << llendl;
+// LL_WARNS() << "Img: " << id << ":" << " Empty Image Header" << LL_ENDL;
res = false;
}
if (!res)
@@ -3323,17 +3327,17 @@ bool LLTextureFetch::receiveImagePacket(const LLHost& host, const LLUUID& id, U1
if (!worker)
{
-// llwarns << "Received packet " << packet_num << " for non active worker: " << id << llendl;
+// LL_WARNS() << "Received packet " << packet_num << " for non active worker: " << id << LL_ENDL;
res = false;
}
else if (worker->mLastPacket == -1)
{
-// llwarns << "Received packet " << packet_num << " before header for: " << id << llendl;
+// LL_WARNS() << "Received packet " << packet_num << " before header for: " << id << LL_ENDL;
res = false;
}
else if (!data_size)
{
-// llwarns << "Img: " << id << ":" << " Empty Image Header" << llendl;
+// LL_WARNS() << "Img: " << id << ":" << " Empty Image Header" << LL_ENDL;
res = false;
}
if (!res)
@@ -3361,8 +3365,8 @@ bool LLTextureFetch::receiveImagePacket(const LLHost& host, const LLUUID& id, U1
}
else
{
-// llwarns << "receiveImagePacket " << packet_num << "/" << worker->mLastPacket << " for worker: " << id
-// << " in state: " << LLTextureFetchWorker::sStateDescs[worker->mState] << llendl;
+// LL_WARNS() << "receiveImagePacket " << packet_num << "/" << worker->mLastPacket << " for worker: " << id
+// << " in state: " << LLTextureFetchWorker::sStateDescs[worker->mState] << LL_ENDL;
removeFromNetworkQueue(worker, true); // failsafe
}
@@ -3373,7 +3377,7 @@ bool LLTextureFetch::receiveImagePacket(const LLHost& host, const LLUUID& id, U1
if (log_to_viewer_log || log_to_sim)
{
- U64 timeNow = LLTimer::getTotalTime();
+ U64Microseconds timeNow = LLTimer::getTotalTime();
mTextureInfo.setRequestSize(id, worker->mFileSize);
mTextureInfo.setRequestCompleteTimeAndLog(id, timeNow);
}
@@ -3454,33 +3458,33 @@ S32 LLTextureFetch::getFetchState(const LLUUID& id, F32& data_progress_p, F32& r
void LLTextureFetch::dump()
{
- llinfos << "LLTextureFetch REQUESTS:" << llendl;
+ LL_INFOS() << "LLTextureFetch REQUESTS:" << LL_ENDL;
for (request_queue_t::iterator iter = mRequestQueue.begin();
iter != mRequestQueue.end(); ++iter)
{
LLQueuedThread::QueuedRequest* qreq = *iter;
LLWorkerThread::WorkRequest* wreq = (LLWorkerThread::WorkRequest*)qreq;
LLTextureFetchWorker* worker = (LLTextureFetchWorker*)wreq->getWorkerClass();
- llinfos << " ID: " << worker->mID
+ LL_INFOS() << " ID: " << worker->mID
<< " PRI: " << llformat("0x%08x",wreq->getPriority())
<< " STATE: " << worker->sStateDescs[worker->mState]
- << llendl;
+ << LL_ENDL;
}
- llinfos << "LLTextureFetch ACTIVE_HTTP:" << llendl;
+ LL_INFOS() << "LLTextureFetch ACTIVE_HTTP:" << LL_ENDL;
for (queue_t::const_iterator iter(mHTTPTextureQueue.begin());
mHTTPTextureQueue.end() != iter;
++iter)
{
- llinfos << " ID: " << (*iter) << llendl;
+ LL_INFOS() << " ID: " << (*iter) << LL_ENDL;
}
- llinfos << "LLTextureFetch WAIT_HTTP_RESOURCE:" << llendl;
+ LL_INFOS() << "LLTextureFetch WAIT_HTTP_RESOURCE:" << LL_ENDL;
for (wait_http_res_queue_t::const_iterator iter(mHttpWaitResource.begin());
mHttpWaitResource.end() != iter;
++iter)
{
- llinfos << " ID: " << (*iter) << llendl;
+ LL_INFOS() << " ID: " << (*iter) << LL_ENDL;
}
}
@@ -3798,7 +3802,7 @@ AssetReportHandler stats_handler;
bool
TFReqSetRegion::doWork(LLTextureFetch *)
{
- LLViewerAssetStatsFF::set_region_thread1(mRegionHandle);
+ LLViewerAssetStatsFF::set_region(mRegionHandle);
return true;
}
@@ -3823,8 +3827,8 @@ TFReqSendMetrics::doWork(LLTextureFetch * fetcher)
static const U32 report_priority(1);
static LLCore::HttpHandler * const handler(fetcher->isQAMode() || true ? &stats_handler : NULL);
- if (! gViewerAssetStatsThread1)
- return true;
+ //if (! gViewerAssetStatsThread1)
+ // return true;
static volatile bool reporting_started(false);
static volatile S32 report_sequence(0);
@@ -3834,17 +3838,21 @@ TFReqSendMetrics::doWork(LLTextureFetch * fetcher)
// but leave it in 'this'. Destructor will rid us of it.
LLViewerAssetStats & main_stats = *mMainStats;
- // Merge existing stats into those from main, convert to LLSD
- main_stats.merge(*gViewerAssetStatsThread1);
- LLSD merged_llsd = main_stats.asLLSD(true);
-
- // Add some additional meta fields to the content
- merged_llsd["session_id"] = mSessionID;
- merged_llsd["agent_id"] = mAgentID;
- merged_llsd["message"] = "ViewerAssetMetrics"; // Identifies the type of metrics
- merged_llsd["sequence"] = report_sequence; // Sequence number
- merged_llsd["initial"] = ! reporting_started; // Initial data from viewer
- merged_llsd["break"] = LLTextureFetch::svMetricsDataBreak; // Break in data prior to this report
+ LLViewerAssetStats::AssetStats stats;
+ main_stats.getStats(stats, true);
+ //LLSD merged_llsd = main_stats.asLLSD();
+
+ bool initial_report = !reporting_started;
+ stats.session_id = mSessionID;
+ stats.agent_id = mAgentID;
+ stats.message = "ViewerAssetMetrics";
+ stats.sequence = static_cast<bool>(report_sequence);
+ stats.initial = initial_report;
+ stats.break_ = static_cast<bool>(LLTextureFetch::svMetricsDataBreak);
+
+ LLSD sd;
+ LLParamSDParser parser;
+ parser.writeSD(sd, stats);
// Update sequence number
if (S32_MAX == ++report_sequence)
@@ -3852,13 +3860,14 @@ TFReqSendMetrics::doWork(LLTextureFetch * fetcher)
reporting_started = true;
// Limit the size of the stats report if necessary.
- merged_llsd["truncated"] = truncate_viewer_metrics(10, merged_llsd);
+
+ sd["truncated"] = truncate_viewer_metrics(10, sd);
if (! mCapsURL.empty())
{
LLCore::BufferArray * ba = new LLCore::BufferArray;
LLCore::BufferArrayStream bas(ba);
- LLSDSerialize::toXML(merged_llsd, bas);
+ LLSDSerialize::toXML(sd, bas);
fetcher->getHttpRequest().requestPost(fetcher->getPolicyClass(),
report_priority,
@@ -3878,11 +3887,9 @@ TFReqSendMetrics::doWork(LLTextureFetch * fetcher)
// In QA mode, Metrics submode, log the result for ease of testing
if (fetcher->isQAMode())
{
- LL_INFOS("Textures") << ll_pretty_print_sd(merged_llsd) << LL_ENDL;
+ LL_INFOS("Textures") << ll_pretty_print_sd(sd) << LL_ENDL;
}
- gViewerAssetStatsThread1->reset();
-
return true;
}
@@ -4390,14 +4397,14 @@ void LLTextureFetchDebugger::debugHTTP()
LLViewerRegion* region = gAgent.getRegion();
if (!region)
{
- llinfos << "Fetch Debugger : Current region undefined. Cannot fetch textures through HTTP." << llendl;
+ LL_INFOS() << "Fetch Debugger : Current region undefined. Cannot fetch textures through HTTP." << LL_ENDL;
return;
}
mHTTPUrl = region->getHttpUrl();
if (mHTTPUrl.empty())
{
- llinfos << "Fetch Debugger : Current region URL undefined. Cannot fetch textures through HTTP." << llendl;
+ LL_INFOS() << "Fetch Debugger : Current region URL undefined. Cannot fetch textures through HTTP." << LL_ENDL;
return;
}
@@ -4476,7 +4483,7 @@ S32 LLTextureFetchDebugger::fillCurlQueue()
mFetchingHistory[i].mCurlState = FetchEntry::CURL_DONE;
}
}
- //llinfos << "Fetch Debugger : Having " << mNbCurlRequests << " requests through the curl thread." << llendl;
+ //LL_INFOS() << "Fetch Debugger : Having " << mNbCurlRequests << " requests through the curl thread." << LL_ENDL;
return mNbCurlRequests;
}
@@ -4778,7 +4785,7 @@ void LLTextureFetchDebugger::onCompleted(LLCore::HttpHandle handle, LLCore::Http
handle_fetch_map_t::iterator iter(mHandleToFetchIndex.find(handle));
if (mHandleToFetchIndex.end() == iter)
{
- llinfos << "Fetch Debugger : Couldn't find handle " << handle << " in fetch list." << llendl;
+ LL_INFOS() << "Fetch Debugger : Couldn't find handle " << handle << " in fetch list." << LL_ENDL;
return;
}
@@ -4786,7 +4793,7 @@ void LLTextureFetchDebugger::onCompleted(LLCore::HttpHandle handle, LLCore::Http
mHandleToFetchIndex.erase(iter);
if (fetch_ind >= mFetchingHistory.size() || mFetchingHistory[fetch_ind].mHttpHandle != handle)
{
- llinfos << "Fetch Debugger : Handle and fetch object in disagreement. Punting." << llendl;
+ LL_INFOS() << "Fetch Debugger : Handle and fetch object in disagreement. Punting." << LL_ENDL;
}
else
{
@@ -4836,7 +4843,7 @@ void LLTextureFetchDebugger::callbackHTTP(FetchEntry & fetch, LLCore::HttpRespon
S32 data_size = ba ? ba->size() : 0;
fetch.mCurlReceivedSize += data_size;
- //llinfos << "Fetch Debugger : got results for " << fetch.mID << ", data_size = " << data_size << ", received = " << fetch.mCurlReceivedSize << ", requested = " << fetch.mRequestedSize << ", partial = " << partial << llendl;
+ //LL_INFOS() << "Fetch Debugger : got results for " << fetch.mID << ", data_size = " << data_size << ", received = " << fetch.mCurlReceivedSize << ", requested = " << fetch.mRequestedSize << ", partial = " << partial << LL_ENDL;
if ((fetch.mCurlReceivedSize >= fetch.mRequestedSize) || !partial || (fetch.mRequestedSize == 600))
{
U8* d_buffer = (U8*)ALLOCATE_MEM(LLImageBase::getPrivatePool(), data_size);
@@ -4862,9 +4869,9 @@ void LLTextureFetchDebugger::callbackHTTP(FetchEntry & fetch, LLCore::HttpRespon
}
else //failed
{
- llinfos << "Fetch Debugger : CURL GET FAILED, ID = " << fetch.mID
+ LL_INFOS() << "Fetch Debugger : CURL GET FAILED, ID = " << fetch.mID
<< ", status: " << status.toTerseString()
- << " reason: " << status.toString() << llendl;
+ << " reason: " << status.toString() << LL_ENDL;
}
}
diff --git a/indra/newview/lltexturefetch.h b/indra/newview/lltexturefetch.h
index 3c79a5a24d..d7fb2b4356 100755
--- a/indra/newview/lltexturefetch.h
+++ b/indra/newview/lltexturefetch.h
@@ -37,15 +37,15 @@
#include "lltextureinfo.h"
#include "llapr.h"
#include "llimageworker.h"
-#include "llstat.h"
#include "llcurl.h"
-#include "llstat.h"
#include "httprequest.h"
#include "httpoptions.h"
#include "httpheaders.h"
#include "httphandler.h"
+#include "lltrace.h"
#include "llviewertexture.h"
+class LLViewerTexture;
class LLTextureFetchWorker;
class LLImageDecodeThread;
class LLHost;
@@ -234,7 +234,7 @@ protected:
// XXX possible delete
// Threads: T*
- void removeFromHTTPQueue(const LLUUID& id, S32 received_size);
+ void removeFromHTTPQueue(const LLUUID& id, S32Bytes received_size);
// Identical to @deleteRequest but with different arguments
// (caller already has the worker pointer).
@@ -309,8 +309,8 @@ private:
LLMutex mQueueMutex; //to protect mRequestMap and mCommands only
LLMutex mNetworkQueueMutex; //to protect mNetworkQueue, mHTTPTextureQueue and mCancelQueue.
- static LLStat sCacheHitRate;
- static LLStat sCacheReadLatency;
+ static LLTrace::EventStatHandle<LLUnit<F32, LLUnits::Percent> > sCacheHitRate;
+ static LLTrace::EventStatHandle<F64Milliseconds > sCacheReadLatency;
LLTextureCache* mTextureCache;
LLImageDecodeThread* mImageDecodeThread;
@@ -330,7 +330,7 @@ private:
LLTextureInfo mTextureInfo;
// XXX possible delete
- U32 mHTTPTextureBits; // Mfnq
+ U32Bits mHTTPTextureBits; // Mfnq
// XXX possible delete
//debug use
diff --git a/indra/newview/lltextureinfo.cpp b/indra/newview/lltextureinfo.cpp
index adfdbc997e..59d692b287 100755
--- a/indra/newview/lltextureinfo.cpp
+++ b/indra/newview/lltextureinfo.cpp
@@ -29,26 +29,28 @@
#include "lltextureinfo.h"
#include "lltexturestats.h"
#include "llviewercontrol.h"
+#include "lltrace.h"
+
+static LLTrace::CountStatHandle<S32> sTextureDownloadsStarted("texture_downloads_started", "number of texture downloads initiated");
+static LLTrace::CountStatHandle<S32> sTextureDownloadsCompleted("texture_downloads_completed", "number of texture downloads completed");
+static LLTrace::CountStatHandle<S32Bytes > sTextureDataDownloaded("texture_data_downloaded", "amount of texture data downloaded");
+static LLTrace::CountStatHandle<U32Milliseconds > sTexureDownloadTime("texture_download_time", "amount of time spent fetching textures");
LLTextureInfo::LLTextureInfo() :
mLogTextureDownloadsToViewerLog(false),
mLogTextureDownloadsToSimulator(false),
- mTotalBytes(0),
- mTotalMilliseconds(0),
- mTextureDownloadsStarted(0),
- mTextureDownloadsCompleted(0),
mTextureDownloadProtocol("NONE"),
- mTextureLogThreshold(100 * 1024),
- mCurrentStatsBundleStartTime(0)
+ mTextureLogThreshold(LLUnits::Kilobytes::fromValue(100))
{
mTextures.clear();
+ mRecording.start();
}
-void LLTextureInfo::setUpLogging(bool writeToViewerLog, bool sendToSim, U32 textureLogThreshold)
+void LLTextureInfo::setUpLogging(bool writeToViewerLog, bool sendToSim, U32Bytes textureLogThreshold)
{
mLogTextureDownloadsToViewerLog = writeToViewerLog;
mLogTextureDownloadsToSimulator = sendToSim;
- mTextureLogThreshold = textureLogThreshold;
+ mTextureLogThreshold = U32Bytes(textureLogThreshold);
}
LLTextureInfo::~LLTextureInfo()
@@ -93,8 +95,8 @@ void LLTextureInfo::setRequestStartTime(const LLUUID& id, U64 startTime)
{
addRequest(id);
}
- mTextures[id]->mStartTime = startTime;
- mTextureDownloadsStarted++;
+ mTextures[id]->mStartTime = (U64Microseconds)startTime;
+ add(sTextureDownloadsStarted, 1);
}
void LLTextureInfo::setRequestSize(const LLUUID& id, U32 size)
@@ -103,7 +105,7 @@ void LLTextureInfo::setRequestSize(const LLUUID& id, U32 size)
{
addRequest(id);
}
- mTextures[id]->mSize = size;
+ mTextures[id]->mSize = (U32Bytes)size;
}
void LLTextureInfo::setRequestOffset(const LLUUID& id, U32 offset)
@@ -124,16 +126,19 @@ void LLTextureInfo::setRequestType(const LLUUID& id, LLTextureInfoDetails::LLReq
mTextures[id]->mType = type;
}
-void LLTextureInfo::setRequestCompleteTimeAndLog(const LLUUID& id, U64 completeTime)
+void LLTextureInfo::setRequestCompleteTimeAndLog(const LLUUID& id, U64Microseconds completeTime)
{
if (!has(id))
{
addRequest(id);
}
- mTextures[id]->mCompleteTime = completeTime;
+
+ LLTextureInfoDetails& details = *mTextures[id];
+
+ details.mCompleteTime = completeTime;
std::string protocol = "NONE";
- switch(mTextures[id]->mType)
+ switch(details.mType)
{
case LLTextureInfoDetails::REQUEST_TYPE_HTTP:
protocol = "HTTP";
@@ -150,24 +155,23 @@ void LLTextureInfo::setRequestCompleteTimeAndLog(const LLUUID& id, U64 completeT
if (mLogTextureDownloadsToViewerLog)
{
- llinfos << "texture=" << id
- << " start=" << mTextures[id]->mStartTime
- << " end=" << mTextures[id]->mCompleteTime
- << " size=" << mTextures[id]->mSize
- << " offset=" << mTextures[id]->mOffset
- << " length_in_ms=" << (mTextures[id]->mCompleteTime - mTextures[id]->mStartTime) / 1000
- << " protocol=" << protocol
- << llendl;
+ LL_INFOS() << "texture=" << id
+ << " start=" << details.mStartTime
+ << " end=" << details.mCompleteTime
+ << " size=" << details.mSize
+ << " offset=" << details.mOffset
+ << " length=" << U32Milliseconds(details.mCompleteTime - details.mStartTime)
+ << " protocol=" << protocol
+ << LL_ENDL;
}
if(mLogTextureDownloadsToSimulator)
{
- S32 texture_stats_upload_threshold = mTextureLogThreshold;
- mTotalBytes += mTextures[id]->mSize;
- mTotalMilliseconds += mTextures[id]->mCompleteTime - mTextures[id]->mStartTime;
- mTextureDownloadsCompleted++;
+ add(sTextureDataDownloaded, details.mSize);
+ add(sTexureDownloadTime, details.mCompleteTime - details.mStartTime);
+ add(sTextureDownloadsCompleted, 1);
mTextureDownloadProtocol = protocol;
- if (mTotalBytes >= texture_stats_upload_threshold)
+ if (mRecording.getSum(sTextureDataDownloaded) >= mTextureLogThreshold)
{
LLSD texture_data;
std::stringstream startTime;
@@ -189,39 +193,37 @@ LLSD LLTextureInfo::getAverages()
{
LLSD averagedTextureData;
S32 averageDownloadRate;
- if(mTotalMilliseconds == 0)
+ U32Milliseconds download_time = mRecording.getSum(sTexureDownloadTime);
+ if(download_time == (U32Milliseconds)0)
{
averageDownloadRate = 0;
}
else
{
- averageDownloadRate = (mTotalBytes * 8) / mTotalMilliseconds;
+ averageDownloadRate = mRecording.getSum(sTextureDataDownloaded).valueInUnits<LLUnits::Bits>() / download_time.valueInUnits<LLUnits::Seconds>();
}
- averagedTextureData["bits_per_second"] = averageDownloadRate;
- averagedTextureData["bytes_downloaded"] = mTotalBytes;
- averagedTextureData["texture_downloads_started"] = mTextureDownloadsStarted;
- averagedTextureData["texture_downloads_completed"] = mTextureDownloadsCompleted;
- averagedTextureData["transport"] = mTextureDownloadProtocol;
+ averagedTextureData["bits_per_second"] = averageDownloadRate;
+ averagedTextureData["bytes_downloaded"] = mRecording.getSum(sTextureDataDownloaded).valueInUnits<LLUnits::Bytes>();
+ averagedTextureData["texture_downloads_started"] = mRecording.getSum(sTextureDownloadsStarted);
+ averagedTextureData["texture_downloads_completed"] = mRecording.getSum(sTextureDownloadsCompleted);
+ averagedTextureData["transport"] = mTextureDownloadProtocol;
return averagedTextureData;
}
void LLTextureInfo::resetTextureStatistics()
{
- mTotalMilliseconds = 0;
- mTotalBytes = 0;
- mTextureDownloadsStarted = 0;
- mTextureDownloadsCompleted = 0;
+ mRecording.restart();
mTextureDownloadProtocol = "NONE";
mCurrentStatsBundleStartTime = LLTimer::getTotalTime();
}
-U32 LLTextureInfo::getRequestStartTime(const LLUUID& id)
+U32Microseconds LLTextureInfo::getRequestStartTime(const LLUUID& id)
{
if (!has(id))
{
- return 0;
+ return U32Microseconds(0);
}
else
{
@@ -230,11 +232,11 @@ U32 LLTextureInfo::getRequestStartTime(const LLUUID& id)
}
}
-U32 LLTextureInfo::getRequestSize(const LLUUID& id)
+U32Bytes LLTextureInfo::getRequestSize(const LLUUID& id)
{
if (!has(id))
{
- return 0;
+ return U32Bytes(0);
}
else
{
@@ -269,11 +271,11 @@ LLTextureInfoDetails::LLRequestType LLTextureInfo::getRequestType(const LLUUID&
}
}
-U32 LLTextureInfo::getRequestCompleteTime(const LLUUID& id)
+U32Microseconds LLTextureInfo::getRequestCompleteTime(const LLUUID& id)
{
if (!has(id))
{
- return 0;
+ return U32Microseconds(0);
}
else
{
diff --git a/indra/newview/lltextureinfo.h b/indra/newview/lltextureinfo.h
index 2ccbcc5fd2..176f2cbb74 100755
--- a/indra/newview/lltextureinfo.h
+++ b/indra/newview/lltextureinfo.h
@@ -29,6 +29,7 @@
#include "lluuid.h"
#include "lltextureinfodetails.h"
+#include "lltracerecording.h"
#include <map>
class LLTextureInfo
@@ -37,18 +38,18 @@ public:
LLTextureInfo();
~LLTextureInfo();
- void setUpLogging(bool writeToViewerLog, bool sendToSim, U32 textureLogThreshold);
+ void setUpLogging(bool writeToViewerLog, bool sendToSim, U32Bytes textureLogThreshold);
bool has(const LLUUID& id);
void setRequestStartTime(const LLUUID& id, U64 startTime);
void setRequestSize(const LLUUID& id, U32 size);
void setRequestOffset(const LLUUID& id, U32 offset);
void setRequestType(const LLUUID& id, LLTextureInfoDetails::LLRequestType type);
- void setRequestCompleteTimeAndLog(const LLUUID& id, U64 completeTime);
- U32 getRequestStartTime(const LLUUID& id);
- U32 getRequestSize(const LLUUID& id);
+ void setRequestCompleteTimeAndLog(const LLUUID& id, U64Microseconds completeTime);
+ U32Microseconds getRequestStartTime(const LLUUID& id);
+ U32Bytes getRequestSize(const LLUUID& id);
U32 getRequestOffset(const LLUUID& id);
LLTextureInfoDetails::LLRequestType getRequestType(const LLUUID& id);
- U32 getRequestCompleteTime(const LLUUID& id);
+ U32Microseconds getRequestCompleteTime(const LLUUID& id);
void resetTextureStatistics();
U32 getTextureInfoMapSize();
LLSD getAverages();
@@ -56,19 +57,14 @@ public:
private:
void addRequest(const LLUUID& id);
- std::map<LLUUID, LLTextureInfoDetails *> mTextures;
-
- LLSD mAverages;
-
- bool mLogTextureDownloadsToViewerLog;
- bool mLogTextureDownloadsToSimulator;
- S32 mTotalBytes;
- S32 mTotalMilliseconds;
- S32 mTextureDownloadsStarted;
- S32 mTextureDownloadsCompleted;
- std::string mTextureDownloadProtocol;
- U32 mTextureLogThreshold; // in bytes
- U64 mCurrentStatsBundleStartTime;
+ std::map<LLUUID, LLTextureInfoDetails *> mTextures;
+ LLSD mAverages;
+ bool mLogTextureDownloadsToViewerLog,
+ mLogTextureDownloadsToSimulator;
+ std::string mTextureDownloadProtocol;
+ U32Bytes mTextureLogThreshold;
+ U64Microseconds mCurrentStatsBundleStartTime;
+ LLTrace::Recording mRecording;
};
#endif // LL_LLTEXTUREINFO_H
diff --git a/indra/newview/lltextureinfodetails.cpp b/indra/newview/lltextureinfodetails.cpp
index 0d750db3bf..cab16eb922 100755
--- a/indra/newview/lltextureinfodetails.cpp
+++ b/indra/newview/lltextureinfodetails.cpp
@@ -28,7 +28,9 @@
#include "lltextureinfodetails.h"
-LLTextureInfoDetails::LLTextureInfoDetails() : mStartTime(0), mCompleteTime(0), mSize(0), mType(REQUEST_TYPE_NONE), mOffset(0)
+LLTextureInfoDetails::LLTextureInfoDetails()
+: mType(REQUEST_TYPE_NONE),
+ mOffset(0)
{
}
diff --git a/indra/newview/lltextureinfodetails.h b/indra/newview/lltextureinfodetails.h
index 4a3cd29084..a42c335035 100755
--- a/indra/newview/lltextureinfodetails.h
+++ b/indra/newview/lltextureinfodetails.h
@@ -28,10 +28,10 @@
#define LL_LLTEXTUREINFODETAILS_H
#include "lluuid.h"
+#include "llunits.h"
-class LLTextureInfoDetails
+struct LLTextureInfoDetails
{
-public:
enum LLRequestType
{
REQUEST_TYPE_NONE,
@@ -39,11 +39,11 @@ public:
REQUEST_TYPE_UDP
};
- U32 mStartTime;
- U32 mCompleteTime;
- U32 mOffset;
- U32 mSize;
- LLRequestType mType;
+ U32Microseconds mStartTime,
+ mCompleteTime;
+ U32 mOffset;
+ U32Bytes mSize;
+ LLRequestType mType;
LLTextureInfoDetails();
};
diff --git a/indra/newview/lltexturestats.cpp b/indra/newview/lltexturestats.cpp
index f820ae65df..ca42d710f8 100755
--- a/indra/newview/lltexturestats.cpp
+++ b/indra/newview/lltexturestats.cpp
@@ -48,8 +48,7 @@ void send_texture_stats_to_sim(const LLSD &texture_stats)
texture_stats_report["stats_data"] = texture_stats;
std::string texture_cap_url = gAgent.getRegion()->getCapability("TextureStats");
- LLTextureStatsUploader tsu;
- llinfos << "uploading texture stats data to simulator" << llendl;
- tsu.uploadStatsToSimulator(texture_cap_url, texture_stats);
+ LL_INFOS() << "uploading texture stats data to simulator" << LL_ENDL;
+ LLTextureStatsUploader::uploadStatsToSimulator(texture_cap_url, texture_stats);
}
diff --git a/indra/newview/lltexturestatsuploader.cpp b/indra/newview/lltexturestatsuploader.cpp
index 23ba09cb91..c4809bc8e7 100755
--- a/indra/newview/lltexturestatsuploader.cpp
+++ b/indra/newview/lltexturestatsuploader.cpp
@@ -30,14 +30,8 @@
#include "llhttpclient.h"
-LLTextureStatsUploader::LLTextureStatsUploader()
-{
-}
-
-LLTextureStatsUploader::~LLTextureStatsUploader()
-{
-}
+// static
void LLTextureStatsUploader::uploadStatsToSimulator(const std::string texture_cap_url, const LLSD &texture_stats)
{
if ( texture_cap_url != "" )
@@ -46,10 +40,10 @@ void LLTextureStatsUploader::uploadStatsToSimulator(const std::string texture_ca
}
else
{
- llinfos << "Not sending texture stats: "
+ LL_INFOS() << "Not sending texture stats: "
<< texture_stats
<< " as there is no cap url."
- << llendl;
+ << LL_ENDL;
}
}
diff --git a/indra/newview/lltexturestatsuploader.h b/indra/newview/lltexturestatsuploader.h
index 6b02aeb845..ac268c2516 100755
--- a/indra/newview/lltexturestatsuploader.h
+++ b/indra/newview/lltexturestatsuploader.h
@@ -34,9 +34,7 @@
class LLTextureStatsUploader
{
public:
- LLTextureStatsUploader();
- ~LLTextureStatsUploader();
- void uploadStatsToSimulator(const std::string texture_cap_url, const LLSD &texture_stats);
+ static void uploadStatsToSimulator(const std::string texture_cap_url, const LLSD &texture_stats);
};
#endif // LL_LLTEXTURESTATSUPLOADER_H
diff --git a/indra/newview/lltextureview.cpp b/indra/newview/lltextureview.cpp
index 50edbb61a8..8ee83b5df0 100755
--- a/indra/newview/lltextureview.cpp
+++ b/indra/newview/lltextureview.cpp
@@ -39,17 +39,19 @@
#include "lltooltip.h"
#include "llappviewer.h"
+#include "llmeshrepository.h"
#include "llselectmgr.h"
#include "llviewertexlayer.h"
#include "lltexturecache.h"
#include "lltexturefetch.h"
#include "llviewercontrol.h"
#include "llviewerobject.h"
+#include "llviewerobjectlist.h"
#include "llviewertexture.h"
#include "llviewertexturelist.h"
#include "llvovolume.h"
#include "llviewerstats.h"
-#include "llmeshrepository.h"
+#include "llworld.h"
// For avatar texture view
#include "llvoavatarself.h"
@@ -349,7 +351,7 @@ void LLTextureBar::draw()
// draw the image size at the end
{
std::string num_str = llformat("%3dx%3d (%2d) %7d", mImagep->getWidth(), mImagep->getHeight(),
- mImagep->getDiscardLevel(), mImagep->hasGLTexture() ? mImagep->getTextureMemory() : 0);
+ mImagep->getDiscardLevel(), mImagep->hasGLTexture() ? mImagep->getTextureMemory().value() : 0);
LLFontGL::getFontMonospace()->renderUTF8(num_str, 0, title_x4, getRect().getHeight(), color,
LLFontGL::LEFT, LLFontGL::TOP);
}
@@ -506,20 +508,22 @@ private:
void LLGLTexMemBar::draw()
{
- S32 bound_mem = BYTES_TO_MEGA_BYTES(LLViewerTexture::sBoundTextureMemoryInBytes);
- S32 max_bound_mem = LLViewerTexture::sMaxBoundTextureMemInMegaBytes;
- S32 total_mem = BYTES_TO_MEGA_BYTES(LLViewerTexture::sTotalTextureMemoryInBytes);
- S32 max_total_mem = LLViewerTexture::sMaxTotalTextureMemInMegaBytes;
+ S32Megabytes bound_mem = LLViewerTexture::sBoundTextureMemory;
+ S32Megabytes max_bound_mem = LLViewerTexture::sMaxBoundTextureMem;
+ S32Megabytes total_mem = LLViewerTexture::sTotalTextureMemory;
+ S32Megabytes max_total_mem = LLViewerTexture::sMaxTotalTextureMem;
F32 discard_bias = LLViewerTexture::sDesiredDiscardBias;
- F32 cache_usage = (F32)BYTES_TO_MEGA_BYTES(LLAppViewer::getTextureCache()->getUsage()) ;
- F32 cache_max_usage = (F32)BYTES_TO_MEGA_BYTES(LLAppViewer::getTextureCache()->getMaxUsage()) ;
+ F32 cache_usage = LLAppViewer::getTextureCache()->getUsage().valueInUnits<LLUnits::Megabytes>();
+ F32 cache_max_usage = LLAppViewer::getTextureCache()->getMaxUsage().valueInUnits<LLUnits::Megabytes>();
S32 line_height = LLFontGL::getFontMonospace()->getLineHeight();
S32 v_offset = 0;//(S32)((texture_bar_height + 2.2f) * mTextureView->mNumTextureBars + 2.0f);
- F32 total_texture_downloaded = (F32)gTotalTextureBytes / (1024 * 1024);
- F32 total_object_downloaded = (F32)gTotalObjectBytes / (1024 * 1024);
+ F32Bytes total_texture_downloaded = gTotalTextureData;
+ F32Bytes total_object_downloaded = gTotalObjectData;
U32 total_http_requests = LLAppViewer::getTextureFetch()->getTotalNumHTTPRequests();
+ U32 total_active_cached_objects = LLWorld::getInstance()->getNumOfActiveCachedObjects();
+ U32 total_objects = gObjectList.getNumObjects();
F32 x_right = 0.0;
-
+
//----------------------------------------------------------------------------
LLGLSUIDefault gls_ui;
LLColor4 text_color(1.f, 1.f, 1.f, 0.75f);
@@ -535,10 +539,10 @@ void LLGLTexMemBar::draw()
text_color, LLFontGL::LEFT, LLFontGL::TOP);
text = llformat("GL Tot: %d/%d MB Bound: %d/%d MB FBO: %d MB Raw Tot: %d MB Bias: %.2f Cache: %.1f/%.1f MB",
- total_mem,
- max_total_mem,
- bound_mem,
- max_bound_mem,
+ total_mem.value(),
+ max_total_mem.value(),
+ bound_mem.value(),
+ max_bound_mem.value(),
LLRenderTarget::sBytesAllocated/(1024*1024),
LLImageRaw::sGlobalRawMemory >> 20,
discard_bias,
@@ -552,9 +556,11 @@ void LLGLTexMemBar::draw()
U32 cache_read(0U), cache_write(0U), res_wait(0U);
LLAppViewer::getTextureFetch()->getStateStats(&cache_read, &cache_write, &res_wait);
- text = llformat("Net Tot Tex: %.1f MB Tot Obj: %.1f MB Tot Htp: %d Cread: %u Cwrite: %u Rwait: %u",
- total_texture_downloaded,
- total_object_downloaded,
+ text = llformat("Net Tot Tex: %.1f MB Tot Obj: %.1f MB #Objs/#Cached: %d/%d Tot Htp: %d Cread: %u Cwrite: %u Rwait: %u",
+ total_texture_downloaded.valueInUnits<LLUnits::Megabytes>(),
+ total_object_downloaded.valueInUnits<LLUnits::Megabytes>(),
+ total_objects,
+ total_active_cached_objects,
total_http_requests,
cache_read,
cache_write,
@@ -565,7 +571,7 @@ void LLGLTexMemBar::draw()
//----------------------------------------------------------------------------
- text = llformat("Textures: %d Fetch: %d(%d) Pkts:%d(%d) Cache R/W: %d/%d LFS:%d RAW:%d HTP:%d DEC:%d CRE:%d ",
+ text = llformat("Textures: %d Fetch: %d(%d) Pkts:%d(%d) Cache R/W: %d/%d LFS:%d RAW:%d HTP:%d DEC:%d CRE:%d",
gTextureList.getNumImages(),
LLAppViewer::getTextureFetch()->getNumRequests(), LLAppViewer::getTextureFetch()->getNumDeletes(),
LLAppViewer::getTextureFetch()->mPacketCount, LLAppViewer::getTextureFetch()->mBadPacketCount,
@@ -582,14 +588,14 @@ void LLGLTexMemBar::draw()
LLFontGL::NORMAL, LLFontGL::NO_SHADOW, S32_MAX, S32_MAX,
&x_right, FALSE);
- F32 bandwidth = LLAppViewer::getTextureFetch()->getTextureBandwidth();
- F32 max_bandwidth = gSavedSettings.getF32("ThrottleBandwidthKBPS");
- color = bandwidth > max_bandwidth ? LLColor4::red : bandwidth > max_bandwidth * .75f ? LLColor4::yellow : text_color;
+ F32Kilobits bandwidth(LLAppViewer::getTextureFetch()->getTextureBandwidth());
+ F32Kilobits max_bandwidth(gSavedSettings.getF32("ThrottleBandwidthKBPS"));
+ color = bandwidth > max_bandwidth ? LLColor4::red : bandwidth > max_bandwidth*.75f ? LLColor4::yellow : text_color;
color[VALPHA] = text_color[VALPHA];
- text = llformat("BW:%.0f/%.0f", bandwidth, max_bandwidth);
- LLFontGL::getFontMonospace()->renderUTF8(text, 0, x_right, v_offset + line_height*3,
+ text = llformat("BW:%.0f/%.0f",bandwidth.value(), max_bandwidth.value());
+ LLFontGL::getFontMonospace()->renderUTF8(text, 0, x_right, v_offset + line_height*2,
color, LLFontGL::LEFT, LLFontGL::TOP);
-
+
// Mesh status line
text = llformat("Mesh: Reqs(Tot/Htp/Big): %u/%u/%u Rtr/Err: %u/%u Cread/Cwrite: %u/%u Low/At/High: %d/%d/%d",
LLMeshRepository::sMeshRequestCount, LLMeshRepository::sHTTPRequestCount, LLMeshRepository::sHTTPLargeRequestCount,
@@ -692,7 +698,7 @@ void LLGLTexSizeBar::draw()
if(LLImageGL::sCurTexSizeBar == mIndex)
{
- F32 text_color[] = {1.f, 1.f, 1.f, 0.75f};
+ LLColor4 text_color(1.f, 1.f, 1.f, 0.75f);
std::string text;
text = llformat("%d", mTopLoaded) ;
@@ -704,8 +710,8 @@ void LLGLTexSizeBar::draw()
text_color, LLFontGL::LEFT, LLFontGL::TOP);
}
- F32 loaded_color[] = {1.0f, 0.0f, 0.0f, 0.75f};
- F32 bound_color[] = {1.0f, 1.0f, 0.0f, 0.75f};
+ LLColor4 loaded_color(1.0f, 0.0f, 0.0f, 0.75f);
+ LLColor4 bound_color(1.0f, 1.0f, 0.0f, 0.75f);
gl_rect_2d(mLeft, mBottom + (S32)(mTopLoaded * mScale), (mLeft + mRight) / 2, mBottom, loaded_color) ;
gl_rect_2d((mLeft + mRight) / 2, mBottom + (S32)(mTopBound * mScale), mRight, mBottom, bound_color) ;
}
@@ -782,7 +788,7 @@ void LLTextureView::draw()
if (mPrintList)
{
- llinfos << "ID\tMEM\tBOOST\tPRI\tWIDTH\tHEIGHT\tDISCARD" << llendl;
+ LL_INFOS() << "ID\tMEM\tBOOST\tPRI\tWIDTH\tHEIGHT\tDISCARD" << LL_ENDL;
}
for (LLViewerTextureList::image_priority_list_t::iterator iter = gTextureList.mImageList.begin();
@@ -799,15 +805,15 @@ void LLTextureView::draw()
if (mPrintList)
{
- S32 tex_mem = imagep->hasGLTexture() ? imagep->getTextureMemory() : 0 ;
- llinfos << imagep->getID()
+ S32 tex_mem = imagep->hasGLTexture() ? imagep->getTextureMemory().value() : 0 ;
+ LL_INFOS() << imagep->getID()
<< "\t" << tex_mem
<< "\t" << imagep->getBoostLevel()
<< "\t" << imagep->getDecodePriority()
<< "\t" << imagep->getWidth()
<< "\t" << imagep->getHeight()
<< "\t" << cur_discard
- << llendl;
+ << LL_ENDL;
}
if (imagep->getID() == LLAppViewer::getTextureFetch()->mDebugID)
diff --git a/indra/newview/lltoast.cpp b/indra/newview/lltoast.cpp
index 448fae48de..1b5b44423f 100755
--- a/indra/newview/lltoast.cpp
+++ b/indra/newview/lltoast.cpp
@@ -605,7 +605,7 @@ void LLToast::cleanupToasts()
toastp = &(*iter);
}
- //llinfos << "Cleaning up toast id " << toastp->getNotificationID() << llendl;
+ //LL_INFOS() << "Cleaning up toast id " << toastp->getNotificationID() << LL_ENDL;
// LLToast destructor will remove it from the LLInstanceTracker.
if (!toastp)
diff --git a/indra/newview/lltoastalertpanel.cpp b/indra/newview/lltoastalertpanel.cpp
index 6083210080..8fd0eb5931 100755
--- a/indra/newview/lltoastalertpanel.cpp
+++ b/indra/newview/lltoastalertpanel.cpp
@@ -42,7 +42,6 @@
#include "lllineeditor.h"
#include "lluictrlfactory.h"
#include "llnotifications.h"
-#include "llfunctorregistry.h"
#include "llrootview.h"
#include "lltransientfloatermgr.h"
#include "llviewercontrol.h" // for gSavedSettings
@@ -175,7 +174,7 @@ LLToastAlertPanel::LLToastAlertPanel( LLNotificationPtr notification, bool modal
// Message: create text box using raw string, as text has been structure deliberately
// Use size of created text box to generate dialog box size
std::string msg = mNotification->getMessage();
- llwarns << "Alert: " << msg << llendl;
+ LL_WARNS() << "Alert: " << msg << LL_ENDL;
LLTextBox::Params params;
params.name("Alert message");
params.font(font);
@@ -509,7 +508,7 @@ void LLToastAlertPanel::setEditTextArgs(const LLSD& edit_args)
}
else
{
- llwarns << "LLToastAlertPanel::setEditTextArgs called on dialog with no line editor" << llendl;
+ LL_WARNS() << "LLToastAlertPanel::setEditTextArgs called on dialog with no line editor" << LL_ENDL;
}
}
diff --git a/indra/newview/lltoastgroupnotifypanel.cpp b/indra/newview/lltoastgroupnotifypanel.cpp
index beb45e8179..e00b18dedb 100755
--- a/indra/newview/lltoastgroupnotifypanel.cpp
+++ b/indra/newview/lltoastgroupnotifypanel.cpp
@@ -61,7 +61,7 @@ LLToastGroupNotifyPanel::LLToastGroupNotifyPanel(const LLNotificationPtr& notifi
LLGroupData groupData;
if (!gAgent.getGroupData(payload["group_id"].asUUID(),groupData))
{
- llwarns << "Group notice for unknown group: " << payload["group_id"].asUUID() << llendl;
+ LL_WARNS() << "Group notice for unknown group: " << payload["group_id"].asUUID() << LL_ENDL;
}
//group icon
diff --git a/indra/newview/lltoastgroupnotifypanel.h b/indra/newview/lltoastgroupnotifypanel.h
index dfdc6ae559..431fd32da2 100755
--- a/indra/newview/lltoastgroupnotifypanel.h
+++ b/indra/newview/lltoastgroupnotifypanel.h
@@ -29,7 +29,6 @@
#include "llfontgl.h"
#include "lltoastpanel.h"
-#include "lldarray.h"
#include "lltimer.h"
#include "llviewermessage.h"
#include "llnotificationptr.h"
diff --git a/indra/newview/lltoastimpanel.cpp b/indra/newview/lltoastimpanel.cpp
index bdbd8f1f83..a27105e22d 100755
--- a/indra/newview/lltoastimpanel.cpp
+++ b/indra/newview/lltoastimpanel.cpp
@@ -189,7 +189,7 @@ void LLToastIMPanel::spawnGroupIconToolTip()
LLGroupData g_data;
if(!gAgent.getGroupData(mSessionID, g_data))
{
- llwarns << "Error getting group data" << llendl;
+ LL_WARNS() << "Error getting group data" << LL_ENDL;
}
LLInspector::Params params;
@@ -222,7 +222,7 @@ void LLToastIMPanel::initIcon()
LLIMModel::LLIMSession* im_session = LLIMModel::getInstance()->findIMSession(mSessionID);
if(!im_session)
{
- llwarns << "Invalid IM session" << llendl;
+ LL_WARNS() << "Invalid IM session" << LL_ENDL;
return;
}
@@ -242,7 +242,7 @@ void LLToastIMPanel::initIcon()
mAdhocIcon->setToolTip(im_session->mName);
break;
default:
- llwarns << "Unknown IM session type" << llendl;
+ LL_WARNS() << "Unknown IM session type" << LL_ENDL;
break;
}
}
diff --git a/indra/newview/lltoastnotifypanel.cpp b/indra/newview/lltoastnotifypanel.cpp
index 9824f2dd38..51935dc03b 100755
--- a/indra/newview/lltoastnotifypanel.cpp
+++ b/indra/newview/lltoastnotifypanel.cpp
@@ -58,7 +58,7 @@ LLToastNotifyPanel::button_click_signal_t LLToastNotifyPanel::sButtonClickSignal
LLToastNotifyPanel::LLToastNotifyPanel(const LLNotificationPtr& notification, const LLRect& rect, bool show_images)
: LLToastPanel(notification),
- LLInstanceTracker<LLToastNotifyPanel, LLUUID>(notification->getID())
+ LLInstanceTracker<LLToastNotifyPanel, LLUUID, LLInstanceTrackerReplaceOnCollision>(notification->getID())
{
init(rect, show_images);
}
diff --git a/indra/newview/lltoastnotifypanel.h b/indra/newview/lltoastnotifypanel.h
index fe7f1cf8f3..e4a75acfda 100755
--- a/indra/newview/lltoastnotifypanel.h
+++ b/indra/newview/lltoastnotifypanel.h
@@ -47,7 +47,7 @@ class LLNotificationForm;
* @deprecated this class will be removed after all toast panel types are
* implemented in separate classes.
*/
-class LLToastNotifyPanel: public LLToastPanel, public LLInstanceTracker<LLToastNotifyPanel, LLUUID>
+class LLToastNotifyPanel: public LLToastPanel, public LLInstanceTracker<LLToastNotifyPanel, LLUUID, LLInstanceTrackerReplaceOnCollision>
{
public:
/**
diff --git a/indra/newview/lltoastscripttextbox.cpp b/indra/newview/lltoastscripttextbox.cpp
index 45fbabad59..78d9e92b5c 100755
--- a/indra/newview/lltoastscripttextbox.cpp
+++ b/indra/newview/lltoastscripttextbox.cpp
@@ -109,7 +109,7 @@ void LLToastScriptTextbox::onClickSubmit()
}
mNotification->respond(response);
close();
- llwarns << response << llendl;
+ LL_WARNS() << response << LL_ENDL;
}
}
diff --git a/indra/newview/lltool.cpp b/indra/newview/lltool.cpp
index 2d8ce95347..4aad650b68 100755
--- a/indra/newview/lltool.cpp
+++ b/indra/newview/lltool.cpp
@@ -55,7 +55,7 @@ LLTool::~LLTool()
{
if( hasMouseCapture() )
{
- llwarns << "Tool deleted holding mouse capture. Mouse capture removed." << llendl;
+ LL_WARNS() << "Tool deleted holding mouse capture. Mouse capture removed." << LL_ENDL;
gFocusMgr.removeMouseCaptureWithoutCallback( this );
}
}
@@ -80,10 +80,10 @@ BOOL LLTool::handleMouseDown(S32 x, S32 y, MASK mask)
{
if (gDebugClicks)
{
- llinfos << "LLTool left mouse down" << llendl;
+ LL_INFOS() << "LLTool left mouse down" << LL_ENDL;
}
// by default, didn't handle it
- // llinfos << "LLTool::handleMouseDown" << llendl;
+ // LL_INFOS() << "LLTool::handleMouseDown" << LL_ENDL;
gAgent.setControlFlags(AGENT_CONTROL_LBUTTON_DOWN);
return TRUE;
}
@@ -92,10 +92,10 @@ BOOL LLTool::handleMouseUp(S32 x, S32 y, MASK mask)
{
if (gDebugClicks)
{
- llinfos << "LLTool left mouse up" << llendl;
+ LL_INFOS() << "LLTool left mouse up" << LL_ENDL;
}
// by default, didn't handle it
- // llinfos << "LLTool::handleMouseUp" << llendl;
+ // LL_INFOS() << "LLTool::handleMouseUp" << LL_ENDL;
gAgent.setControlFlags(AGENT_CONTROL_LBUTTON_UP);
return TRUE;
}
@@ -103,7 +103,7 @@ BOOL LLTool::handleMouseUp(S32 x, S32 y, MASK mask)
BOOL LLTool::handleHover(S32 x, S32 y, MASK mask)
{
gViewerWindow->setCursor(UI_CURSOR_ARROW);
- lldebugst(LLERR_USER_INPUT) << "hover handled by a tool" << llendl;
+ LL_DEBUGS("UserInput") << "hover handled by a tool" << LL_ENDL;
// by default, do nothing, say we handled it
return TRUE;
}
@@ -111,13 +111,13 @@ BOOL LLTool::handleHover(S32 x, S32 y, MASK mask)
BOOL LLTool::handleScrollWheel(S32 x, S32 y, S32 clicks)
{
// by default, didn't handle it
- // llinfos << "LLTool::handleScrollWheel" << llendl;
+ // LL_INFOS() << "LLTool::handleScrollWheel" << LL_ENDL;
return FALSE;
}
BOOL LLTool::handleDoubleClick(S32 x,S32 y,MASK mask)
{
- // llinfos << "LLTool::handleDoubleClick" << llendl;
+ // LL_INFOS() << "LLTool::handleDoubleClick" << LL_ENDL;
// by default, pretend it's a left click
return FALSE;
}
@@ -125,35 +125,35 @@ BOOL LLTool::handleDoubleClick(S32 x,S32 y,MASK mask)
BOOL LLTool::handleRightMouseDown(S32 x,S32 y,MASK mask)
{
// by default, didn't handle it
- // llinfos << "LLTool::handleRightMouseDown" << llendl;
+ // LL_INFOS() << "LLTool::handleRightMouseDown" << LL_ENDL;
return FALSE;
}
BOOL LLTool::handleRightMouseUp(S32 x, S32 y, MASK mask)
{
// by default, didn't handle it
- // llinfos << "LLTool::handleRightMouseDown" << llendl;
+ // LL_INFOS() << "LLTool::handleRightMouseDown" << LL_ENDL;
return FALSE;
}
BOOL LLTool::handleMiddleMouseDown(S32 x,S32 y,MASK mask)
{
// by default, didn't handle it
- // llinfos << "LLTool::handleMiddleMouseDown" << llendl;
+ // LL_INFOS() << "LLTool::handleMiddleMouseDown" << LL_ENDL;
return FALSE;
}
BOOL LLTool::handleMiddleMouseUp(S32 x, S32 y, MASK mask)
{
// by default, didn't handle it
- // llinfos << "LLTool::handleMiddleMouseUp" << llendl;
+ // LL_INFOS() << "LLTool::handleMiddleMouseUp" << LL_ENDL;
return FALSE;
}
BOOL LLTool::handleToolTip(S32 x, S32 y, MASK mask)
{
// by default, didn't handle it
- // llinfos << "LLTool::handleToolTip" << llendl;
+ // LL_INFOS() << "LLTool::handleToolTip" << LL_ENDL;
return FALSE;
}
diff --git a/indra/newview/lltoolbarview.cpp b/indra/newview/lltoolbarview.cpp
index 36d4654393..fd950864aa 100755
--- a/indra/newview/lltoolbarview.cpp
+++ b/indra/newview/lltoolbarview.cpp
@@ -203,7 +203,7 @@ bool LLToolBarView::addCommandInternal(const LLCommandId& command, LLToolBar* to
}
else
{
- llwarns << "Toolbars creation : the command with id " << command.uuid().asString() << " cannot be found in the command manager" << llendl;
+ LL_WARNS() << "Toolbars creation : the command with id " << command.uuid().asString() << " cannot be found in the command manager" << LL_ENDL;
return false;
}
return true;
@@ -222,20 +222,20 @@ bool LLToolBarView::loadToolbars(bool force_default)
}
else if (!gDirUtilp->fileExists(toolbar_file))
{
- llwarns << "User toolbars def not found -> use default" << llendl;
+ LL_WARNS() << "User toolbars def not found -> use default" << LL_ENDL;
toolbar_file = gDirUtilp->getExpandedFilename(LL_PATH_APP_SETTINGS, "toolbars.xml");
}
LLXMLNodePtr root;
if(!LLXMLNode::parseFile(toolbar_file, root, NULL))
{
- llwarns << "Unable to load toolbars from file: " << toolbar_file << llendl;
+ LL_WARNS() << "Unable to load toolbars from file: " << toolbar_file << LL_ENDL;
err = true;
}
if (!err && !root->hasName("toolbars"))
{
- llwarns << toolbar_file << " is not a valid toolbars definition file" << llendl;
+ LL_WARNS() << toolbar_file << " is not a valid toolbars definition file" << LL_ENDL;
err = true;
}
@@ -248,7 +248,7 @@ bool LLToolBarView::loadToolbars(bool force_default)
if (!err && !toolbar_set.validateBlock())
{
- llwarns << "Unable to validate toolbars from file: " << toolbar_file << llendl;
+ LL_WARNS() << "Unable to validate toolbars from file: " << toolbar_file << LL_ENDL;
err = true;
}
@@ -256,7 +256,7 @@ bool LLToolBarView::loadToolbars(bool force_default)
{
if (force_default)
{
- llerrs << "Unable to load toolbars from default file : " << toolbar_file << llendl;
+ LL_ERRS() << "Unable to load toolbars from default file : " << toolbar_file << LL_ENDL;
return false;
}
@@ -285,7 +285,7 @@ bool LLToolBarView::loadToolbars(bool force_default)
{
if (addCommandInternal(LLCommandId(command_params), mToolbars[LLToolBarEnums::TOOLBAR_LEFT]))
{
- llwarns << "Error adding command '" << command_params.name() << "' to left toolbar." << llendl;
+ LL_WARNS() << "Error adding command '" << command_params.name() << "' to left toolbar." << LL_ENDL;
}
}
}
@@ -300,7 +300,7 @@ bool LLToolBarView::loadToolbars(bool force_default)
{
if (addCommandInternal(LLCommandId(command_params), mToolbars[LLToolBarEnums::TOOLBAR_RIGHT]))
{
- llwarns << "Error adding command '" << command_params.name() << "' to right toolbar." << llendl;
+ LL_WARNS() << "Error adding command '" << command_params.name() << "' to right toolbar." << LL_ENDL;
}
}
}
@@ -315,7 +315,7 @@ bool LLToolBarView::loadToolbars(bool force_default)
{
if (addCommandInternal(LLCommandId(command_params), mToolbars[LLToolBarEnums::TOOLBAR_BOTTOM]))
{
- llwarns << "Error adding command '" << command_params.name() << "' to bottom toolbar." << llendl;
+ LL_WARNS() << "Error adding command '" << command_params.name() << "' to bottom toolbar." << LL_ENDL;
}
}
}
@@ -523,7 +523,7 @@ void LLToolBarView::draw()
{
if (mToolbars[i])
{
- LLLayoutStack::ELayoutOrientation orientation = LLToolBarEnums::getOrientation(mToolbars[i]->getSideType());
+ LLView::EOrientation orientation = LLToolBarEnums::getOrientation(mToolbars[i]->getSideType());
if (orientation == LLLayoutStack::HORIZONTAL)
{
@@ -653,7 +653,7 @@ BOOL LLToolBarView::handleDropTool( void* cargo_data, S32 x, S32 y, LLToolBar* t
}
else
{
- llwarns << "Command couldn't be found in command manager" << llendl;
+ LL_WARNS() << "Command couldn't be found in command manager" << LL_ENDL;
}
}
diff --git a/indra/newview/lltoolbrush.cpp b/indra/newview/lltoolbrush.cpp
index 08d82ea9cb..56f0f8be25 100755
--- a/indra/newview/lltoolbrush.cpp
+++ b/indra/newview/lltoolbrush.cpp
@@ -401,9 +401,9 @@ BOOL LLToolBrushLand::handleMouseDown(S32 x, S32 y, MASK mask)
BOOL LLToolBrushLand::handleHover( S32 x, S32 y, MASK mask )
{
- lldebugst(LLERR_USER_INPUT) << "hover handled by LLToolBrushLand ("
+ LL_DEBUGS("UserInput") << "hover handled by LLToolBrushLand ("
<< (hasMouseCapture() ? "active":"inactive")
- << ")" << llendl;
+ << ")" << LL_ENDL;
mMouseX = x;
mMouseY = y;
mGotHover = TRUE;
@@ -456,7 +456,7 @@ void LLToolBrushLand::render()
{
if(mGotHover)
{
- //llinfos << "LLToolBrushLand::render()" << llendl;
+ //LL_INFOS() << "LLToolBrushLand::render()" << LL_ENDL;
LLVector3d spot;
if(gViewerWindow->mousePointOnLandGlobal(mMouseX, mMouseY, &spot))
{
diff --git a/indra/newview/lltooldraganddrop.cpp b/indra/newview/lltooldraganddrop.cpp
index 1a137f7129..12086dad5f 100755
--- a/indra/newview/lltooldraganddrop.cpp
+++ b/indra/newview/lltooldraganddrop.cpp
@@ -175,7 +175,7 @@ public:
virtual void done()
{
/* no-op: it's fire n forget right? */
- lldebugs << "LLCategoryFireAndForget::done()" << llendl;
+ LL_DEBUGS() << "LLCategoryFireAndForget::done()" << LL_ENDL;
}
};
@@ -256,7 +256,7 @@ void LLCategoryDropDescendentsObserver::done()
LLInventoryModel::EXCLUDE_TRASH);
}
- S32 count = items.count();
+ S32 count = items.size();
if (count)
{
std::set<LLUUID> unique_ids;
@@ -371,7 +371,7 @@ void LLToolDragAndDrop::beginDrag(EDragAndDropType type,
{
if (type == DAD_NONE)
{
- llwarns << "Attempted to start drag without a cargo type" << llendl;
+ LL_WARNS() << "Attempted to start drag without a cargo type" << LL_ENDL;
return;
}
mCargoTypes.clear();
@@ -408,16 +408,16 @@ void LLToolDragAndDrop::beginDrag(EDragAndDropType type,
items,
LLInventoryModel::EXCLUDE_TRASH,
is_not_preferred);
- S32 count = cats.count();
+ S32 count = cats.size();
S32 i;
for(i = 0; i < count; ++i)
{
- folder_ids.push_back(cats.get(i)->getUUID());
+ folder_ids.push_back(cats.at(i)->getUUID());
}
- count = items.count();
+ count = items.size();
for(i = 0; i < count; ++i)
{
- item_ids.push_back(items.get(i)->getUUID());
+ item_ids.push_back(items.at(i)->getUUID());
}
if (!folder_ids.empty() || !item_ids.empty())
{
@@ -443,7 +443,7 @@ void LLToolDragAndDrop::beginMultiDrag(
{
if (DAD_NONE == *types_it)
{
- llwarns << "Attempted to start drag without a cargo type" << llendl;
+ LL_WARNS() << "Attempted to start drag without a cargo type" << LL_ENDL;
return;
}
}
@@ -479,7 +479,7 @@ void LLToolDragAndDrop::beginMultiDrag(
items,
LLInventoryModel::EXCLUDE_TRASH,
is_not_preferred);
- S32 cat_count = cats.count();
+ S32 cat_count = cats.size();
for(S32 i = 0; i < cat_count; ++i)
{
cat_ids.insert(cat->getUUID());
@@ -598,7 +598,7 @@ BOOL LLToolDragAndDrop::handleHover( S32 x, S32 y, MASK mask )
ECursorType cursor = acceptanceToCursor(acceptance);
gViewerWindow->getWindow()->setCursor( cursor );
- lldebugst(LLERR_USER_INPUT) << "hover handled by LLToolDragAndDrop" << llendl;
+ LL_DEBUGS("UserInput") << "hover handled by LLToolDragAndDrop" << LL_ENDL;
return TRUE;
}
@@ -1035,7 +1035,7 @@ BOOL LLToolDragAndDrop::handleDropTextureProtections(LLViewerObject* hit_obj,
}
else
{
- llwarns << "Unable to find source object." << llendl;
+ LL_WARNS() << "Unable to find source object." << LL_ENDL;
return FALSE;
}
}
@@ -1085,7 +1085,7 @@ void LLToolDragAndDrop::dropTextureAllFaces(LLViewerObject* hit_obj,
{
if (!item)
{
- llwarns << "LLToolDragAndDrop::dropTextureAllFaces no texture item." << llendl;
+ LL_WARNS() << "LLToolDragAndDrop::dropTextureAllFaces no texture item." << LL_ENDL;
return;
}
LLUUID asset_id = item->getAssetUUID();
@@ -1095,7 +1095,7 @@ void LLToolDragAndDrop::dropTextureAllFaces(LLViewerObject* hit_obj,
return;
}
LLViewerTexture* image = LLViewerTextureManager::getFetchedTexture(asset_id);
- LLViewerStats::getInstance()->incStat(LLViewerStats::ST_EDIT_TEXTURE_COUNT );
+ add(LLStatViewer::EDIT_TEXTURE, 1);
S32 num_faces = hit_obj->getNumTEs();
for( S32 face = 0; face < num_faces; face++ )
{
@@ -1115,7 +1115,7 @@ void LLToolDragAndDrop::dropMesh(LLViewerObject* hit_obj,
{
if (!item)
{
- llwarns << "no inventory item." << llendl;
+ LL_WARNS() << "no inventory item." << LL_ENDL;
return;
}
LLUUID asset_id = item->getAssetUUID();
@@ -1152,7 +1152,7 @@ void LLToolDragAndDrop::dropTextureOneFace(LLViewerObject* hit_obj,
if (hit_face == -1) return;
if (!item)
{
- llwarns << "LLToolDragAndDrop::dropTextureOneFace no texture item." << llendl;
+ LL_WARNS() << "LLToolDragAndDrop::dropTextureOneFace no texture item." << LL_ENDL;
return;
}
LLUUID asset_id = item->getAssetUUID();
@@ -1163,7 +1163,7 @@ void LLToolDragAndDrop::dropTextureOneFace(LLViewerObject* hit_obj,
}
// update viewer side image in anticipation of update from simulator
LLViewerTexture* image = LLViewerTextureManager::getFetchedTexture(asset_id);
- LLViewerStats::getInstance()->incStat(LLViewerStats::ST_EDIT_TEXTURE_COUNT );
+ add(LLStatViewer::EDIT_TEXTURE, 1);
LLTextureEntry* tep = hit_obj ? (hit_obj->getTE(hit_face)) : NULL;
@@ -1227,8 +1227,8 @@ void LLToolDragAndDrop::dropScript(LLViewerObject* hit_obj,
if ((SOURCE_WORLD == LLToolDragAndDrop::getInstance()->mSource)
|| (SOURCE_NOTECARD == LLToolDragAndDrop::getInstance()->mSource))
{
- llwarns << "Call to LLToolDragAndDrop::dropScript() from world"
- << " or notecard." << llendl;
+ LL_WARNS() << "Call to LLToolDragAndDrop::dropScript() from world"
+ << " or notecard." << LL_ENDL;
return;
}
if (hit_obj && item)
@@ -1255,7 +1255,7 @@ void LLToolDragAndDrop::dropScript(LLViewerObject* hit_obj,
}
else
{
- llwarns << "Unable to find source object." << llendl;
+ LL_WARNS() << "Unable to find source object." << LL_ENDL;
return;
}
}
@@ -1280,11 +1280,11 @@ void LLToolDragAndDrop::dropObject(LLViewerObject* raycast_target,
LLViewerRegion* regionp = LLWorld::getInstance()->getRegionFromPosGlobal(mLastHitPos);
if (!regionp)
{
- llwarns << "Couldn't find region to rez object" << llendl;
+ LL_WARNS() << "Couldn't find region to rez object" << LL_ENDL;
return;
}
- //llinfos << "Rezzing object" << llendl;
+ //LL_INFOS() << "Rezzing object" << LL_ENDL;
make_ui_sound("UISndObjectRezIn");
LLViewerInventoryItem* item;
LLViewerInventoryCategory* cat;
@@ -1431,7 +1431,7 @@ void LLToolDragAndDrop::dropObject(LLViewerObject* raycast_target,
effectp->setDuration(LL_HUD_DUR_SHORT);
effectp->setColor(LLColor4U(gAgent.getEffectColor()));
- LLViewerStats::getInstance()->incStat(LLViewerStats::ST_REZ_COUNT);
+ add(LLStatViewer::OBJECT_REZ, 1);
}
void LLToolDragAndDrop::dropInventory(LLViewerObject* hit_obj,
@@ -1444,8 +1444,8 @@ void LLToolDragAndDrop::dropInventory(LLViewerObject* hit_obj,
if ((SOURCE_WORLD == LLToolDragAndDrop::getInstance()->mSource)
|| (SOURCE_NOTECARD == LLToolDragAndDrop::getInstance()->mSource))
{
- llwarns << "Call to LLToolDragAndDrop::dropInventory() from world"
- << " or notecard." << llendl;
+ LL_WARNS() << "Call to LLToolDragAndDrop::dropInventory() from world"
+ << " or notecard." << LL_ENDL;
return;
}
@@ -1475,7 +1475,7 @@ void LLToolDragAndDrop::dropInventory(LLViewerObject* hit_obj,
}
else
{
- llwarns << "Unable to find source object." << llendl;
+ LL_WARNS() << "Unable to find source object." << LL_ENDL;
return;
}
}
@@ -1742,14 +1742,14 @@ bool LLToolDragAndDrop::handleGiveDragAndDrop(LLUUID dest_agent, LLUUID session_
EAcceptance LLToolDragAndDrop::dad3dNULL(
LLViewerObject*, S32, MASK, BOOL)
{
- lldebugs << "LLToolDragAndDrop::dad3dNULL()" << llendl;
+ LL_DEBUGS() << "LLToolDragAndDrop::dad3dNULL()" << LL_ENDL;
return ACCEPT_NO;
}
EAcceptance LLToolDragAndDrop::dad3dRezAttachmentFromInv(
LLViewerObject* obj, S32 face, MASK mask, BOOL drop)
{
- lldebugs << "LLToolDragAndDrop::dad3dRezAttachmentFromInv()" << llendl;
+ LL_DEBUGS() << "LLToolDragAndDrop::dad3dRezAttachmentFromInv()" << LL_ENDL;
// must be in the user's inventory
if(mSource != SOURCE_AGENT && mSource != SOURCE_LIBRARY)
{
@@ -1812,7 +1812,7 @@ EAcceptance LLToolDragAndDrop::dad3dRezObjectOnLand(
return dad3dRezFromObjectOnLand(obj, face, mask, drop);
}
- lldebugs << "LLToolDragAndDrop::dad3dRezObjectOnLand()" << llendl;
+ LL_DEBUGS() << "LLToolDragAndDrop::dad3dRezObjectOnLand()" << LL_ENDL;
LLViewerInventoryItem* item;
LLViewerInventoryCategory* cat;
locateInventory(item, cat);
@@ -1875,7 +1875,7 @@ EAcceptance LLToolDragAndDrop::dad3dRezObjectOnObject(
return dad3dRezFromObjectOnObject(obj, face, mask, drop);
}
- lldebugs << "LLToolDragAndDrop::dad3dRezObjectOnObject()" << llendl;
+ LL_DEBUGS() << "LLToolDragAndDrop::dad3dRezObjectOnObject()" << LL_ENDL;
LLViewerInventoryItem* item;
LLViewerInventoryCategory* cat;
locateInventory(item, cat);
@@ -1947,7 +1947,7 @@ EAcceptance LLToolDragAndDrop::dad3dRezObjectOnObject(
EAcceptance LLToolDragAndDrop::dad3dRezScript(
LLViewerObject* obj, S32 face, MASK mask, BOOL drop)
{
- lldebugs << "LLToolDragAndDrop::dad3dRezScript()" << llendl;
+ LL_DEBUGS() << "LLToolDragAndDrop::dad3dRezScript()" << LL_ENDL;
// *HACK: In order to resolve SL-22177, we need to block drags
// from notecards and objects onto other objects.
@@ -1985,7 +1985,7 @@ EAcceptance LLToolDragAndDrop::dad3dRezScript(
EAcceptance LLToolDragAndDrop::dad3dApplyToObject(
LLViewerObject* obj, S32 face, MASK mask, BOOL drop, EDragAndDropType cargo_type)
{
- lldebugs << "LLToolDragAndDrop::dad3dApplyToObject()" << llendl;
+ LL_DEBUGS() << "LLToolDragAndDrop::dad3dApplyToObject()" << LL_ENDL;
// *HACK: In order to resolve SL-22177, we need to block drags
// from notecards and objects onto other objects.
@@ -2036,7 +2036,7 @@ EAcceptance LLToolDragAndDrop::dad3dApplyToObject(
}
else
{
- llwarns << "unsupported asset type" << llendl;
+ LL_WARNS() << "unsupported asset type" << LL_ENDL;
}
// VEFFECT: SetTexture
@@ -2069,7 +2069,7 @@ EAcceptance LLToolDragAndDrop::dad3dMeshObject(
EAcceptance LLToolDragAndDrop::dad3dTextureSelf(
LLViewerObject* obj, S32 face, MASK mask, BOOL drop)
{
- lldebugs << "LLToolDragAndDrop::dad3dTextureAvatar()" << llendl;
+ LL_DEBUGS() << "LLToolDragAndDrop::dad3dTextureAvatar()" << LL_ENDL;
if(drop)
{
if( !(mask & MASK_SHIFT) )
@@ -2084,7 +2084,7 @@ EAcceptance LLToolDragAndDrop::dad3dTextureSelf(
EAcceptance LLToolDragAndDrop::dad3dWearItem(
LLViewerObject* obj, S32 face, MASK mask, BOOL drop)
{
- lldebugs << "LLToolDragAndDrop::dad3dWearItem()" << llendl;
+ LL_DEBUGS() << "LLToolDragAndDrop::dad3dWearItem()" << LL_ENDL;
LLViewerInventoryItem* item;
LLViewerInventoryCategory* cat;
locateInventory(item, cat);
@@ -2117,7 +2117,7 @@ EAcceptance LLToolDragAndDrop::dad3dWearItem(
EAcceptance LLToolDragAndDrop::dad3dActivateGesture(
LLViewerObject* obj, S32 face, MASK mask, BOOL drop)
{
- lldebugs << "LLToolDragAndDrop::dad3dActivateGesture()" << llendl;
+ LL_DEBUGS() << "LLToolDragAndDrop::dad3dActivateGesture()" << LL_ENDL;
LLViewerInventoryItem* item;
LLViewerInventoryCategory* cat;
locateInventory(item, cat);
@@ -2166,7 +2166,7 @@ EAcceptance LLToolDragAndDrop::dad3dActivateGesture(
EAcceptance LLToolDragAndDrop::dad3dWearCategory(
LLViewerObject* obj, S32 face, MASK mask, BOOL drop)
{
- lldebugs << "LLToolDragAndDrop::dad3dWearCategory()" << llendl;
+ LL_DEBUGS() << "LLToolDragAndDrop::dad3dWearCategory()" << LL_ENDL;
LLViewerInventoryItem* item;
LLViewerInventoryCategory* category;
locateInventory(item, category);
@@ -2217,7 +2217,7 @@ EAcceptance LLToolDragAndDrop::dad3dWearCategory(
EAcceptance LLToolDragAndDrop::dad3dUpdateInventory(
LLViewerObject* obj, S32 face, MASK mask, BOOL drop)
{
- lldebugs << "LLToolDragAndDrop::dadUpdateInventory()" << llendl;
+ LL_DEBUGS() << "LLToolDragAndDrop::dadUpdateInventory()" << LL_ENDL;
// *HACK: In order to resolve SL-22177, we need to block drags
// from notecards and objects onto other objects.
@@ -2257,10 +2257,10 @@ BOOL LLToolDragAndDrop::dadUpdateInventory(LLViewerObject* obj, BOOL drop)
EAcceptance LLToolDragAndDrop::dad3dUpdateInventoryCategory(
LLViewerObject* obj, S32 face, MASK mask, BOOL drop)
{
- lldebugs << "LLToolDragAndDrop::dad3dUpdateInventoryCategory()" << llendl;
+ LL_DEBUGS() << "LLToolDragAndDrop::dad3dUpdateInventoryCategory()" << LL_ENDL;
if (obj == NULL)
{
- llwarns << "obj is NULL; aborting func with ACCEPT_NO" << llendl;
+ LL_WARNS() << "obj is NULL; aborting func with ACCEPT_NO" << LL_ENDL;
return ACCEPT_NO;
}
@@ -2290,10 +2290,10 @@ EAcceptance LLToolDragAndDrop::dad3dUpdateInventoryCategory(
items,
LLInventoryModel::EXCLUDE_TRASH,
droppable);
- cats.put(cat);
+ cats.push_back(cat);
if (droppable.countNoCopy() > 0)
{
- llwarns << "*** Need to confirm this step" << llendl;
+ LL_WARNS() << "*** Need to confirm this step" << LL_ENDL;
}
LLViewerObject* root_object = obj;
if (obj->getParent())
@@ -2316,7 +2316,7 @@ EAcceptance LLToolDragAndDrop::dad3dUpdateInventoryCategory(
rv = gInventory.isCategoryComplete(cat->getUUID()) ? ACCEPT_YES_MULTI : ACCEPT_NO;
if(rv < ACCEPT_YES_SINGLE)
{
- lldebugs << "Category " << cat->getUUID() << "is not complete." << llendl;
+ LL_DEBUGS() << "Category " << cat->getUUID() << "is not complete." << LL_ENDL;
break;
}
}
@@ -2338,7 +2338,7 @@ EAcceptance LLToolDragAndDrop::dad3dUpdateInventoryCategory(
rv = willObjectAcceptInventory(root_object, item);
if (rv < ACCEPT_YES_COPY_SINGLE)
{
- lldebugs << "Object will not accept " << item->getUUID() << llendl;
+ LL_DEBUGS() << "Object will not accept " << item->getUUID() << LL_ENDL;
break;
}
}
@@ -2379,7 +2379,7 @@ BOOL LLToolDragAndDrop::dadUpdateInventoryCategory(LLViewerObject* obj,
EAcceptance LLToolDragAndDrop::dad3dGiveInventoryObject(
LLViewerObject* obj, S32 face, MASK mask, BOOL drop)
{
- lldebugs << "LLToolDragAndDrop::dad3dGiveInventoryObject()" << llendl;
+ LL_DEBUGS() << "LLToolDragAndDrop::dad3dGiveInventoryObject()" << LL_ENDL;
// item has to be in agent inventory.
if(mSource != SOURCE_AGENT) return ACCEPT_NO;
@@ -2417,7 +2417,7 @@ EAcceptance LLToolDragAndDrop::dad3dGiveInventoryObject(
EAcceptance LLToolDragAndDrop::dad3dGiveInventory(
LLViewerObject* obj, S32 face, MASK mask, BOOL drop)
{
- lldebugs << "LLToolDragAndDrop::dad3dGiveInventory()" << llendl;
+ LL_DEBUGS() << "LLToolDragAndDrop::dad3dGiveInventory()" << LL_ENDL;
// item has to be in agent inventory.
if(mSource != SOURCE_AGENT) return ACCEPT_NO;
LLViewerInventoryItem* item;
@@ -2440,7 +2440,7 @@ EAcceptance LLToolDragAndDrop::dad3dGiveInventory(
EAcceptance LLToolDragAndDrop::dad3dGiveInventoryCategory(
LLViewerObject* obj, S32 face, MASK mask, BOOL drop)
{
- lldebugs << "LLToolDragAndDrop::dad3dGiveInventoryCategory()" << llendl;
+ LL_DEBUGS() << "LLToolDragAndDrop::dad3dGiveInventoryCategory()" << LL_ENDL;
if(drop && obj)
{
LLViewerInventoryItem* item;
@@ -2458,7 +2458,7 @@ EAcceptance LLToolDragAndDrop::dad3dGiveInventoryCategory(
EAcceptance LLToolDragAndDrop::dad3dRezFromObjectOnLand(
LLViewerObject* obj, S32 face, MASK mask, BOOL drop)
{
- lldebugs << "LLToolDragAndDrop::dad3dRezFromObjectOnLand()" << llendl;
+ LL_DEBUGS() << "LLToolDragAndDrop::dad3dRezFromObjectOnLand()" << LL_ENDL;
LLViewerInventoryItem* item = NULL;
LLViewerInventoryCategory* cat = NULL;
locateInventory(item, cat);
@@ -2479,7 +2479,7 @@ EAcceptance LLToolDragAndDrop::dad3dRezFromObjectOnLand(
EAcceptance LLToolDragAndDrop::dad3dRezFromObjectOnObject(
LLViewerObject* obj, S32 face, MASK mask, BOOL drop)
{
- lldebugs << "LLToolDragAndDrop::dad3dRezFromObjectOnObject()" << llendl;
+ LL_DEBUGS() << "LLToolDragAndDrop::dad3dRezFromObjectOnObject()" << LL_ENDL;
LLViewerInventoryItem* item;
LLViewerInventoryCategory* cat;
locateInventory(item, cat);
@@ -2516,7 +2516,7 @@ EAcceptance LLToolDragAndDrop::dad3dCategoryOnLand(
{
return ACCEPT_NO;
/*
- lldebugs << "LLToolDragAndDrop::dad3dCategoryOnLand()" << llendl;
+ LL_DEBUGS() << "LLToolDragAndDrop::dad3dCategoryOnLand()" << LL_ENDL;
LLInventoryItem* item;
LLInventoryCategory* cat;
locateInventory(item, cat);
@@ -2532,7 +2532,7 @@ EAcceptance LLToolDragAndDrop::dad3dCategoryOnLand(
items,
LLInventoryModel::EXCLUDE_TRASH,
droppable);
- if(items.count() > 0)
+ if(items.size() > 0)
{
rv = ACCEPT_YES_SINGLE;
}
@@ -2554,19 +2554,19 @@ EAcceptance LLToolDragAndDrop::dad3dAssetOnLand(
{
return ACCEPT_NO;
/*
- lldebugs << "LLToolDragAndDrop::dad3dAssetOnLand()" << llendl;
+ LL_DEBUGS() << "LLToolDragAndDrop::dad3dAssetOnLand()" << LL_ENDL;
LLViewerInventoryCategory::cat_array_t cats;
LLViewerInventoryItem::item_array_t items;
LLViewerInventoryItem::item_array_t copyable_items;
locateMultipleInventory(items, cats);
- if(!items.count()) return ACCEPT_NO;
+ if(!items.size()) return ACCEPT_NO;
EAcceptance rv = ACCEPT_NO;
- for (S32 i = 0; i < items.count(); i++)
+ for (S32 i = 0; i < items.size(); i++)
{
LLInventoryItem* item = items[i];
if(item->getPermissions().allowCopyBy(gAgent.getID()))
{
- copyable_items.put(item);
+ copyable_items.push_back(item);
rv = ACCEPT_YES_SINGLE;
}
}
@@ -2638,21 +2638,21 @@ LLInventoryObject* LLToolDragAndDrop::locateInventory(
LLInventoryObject* LLToolDragAndDrop::locateMultipleInventory(LLViewerInventoryCategory::cat_array_t& cats,
LLViewerInventoryItem::item_array_t& items)
{
- if(mCargoIDs.count() == 0) return NULL;
+ if(mCargoIDs.size() == 0) return NULL;
if((mSource == SOURCE_AGENT) || (mSource == SOURCE_LIBRARY))
{
// The object should be in user inventory.
- for (S32 i = 0; i < mCargoIDs.count(); i++)
+ for (S32 i = 0; i < mCargoIDs.size(); i++)
{
LLInventoryItem* item = gInventory.getItem(mCargoIDs[i]);
if (item)
{
- items.put(item);
+ items.push_back(item);
}
LLInventoryCategory* category = gInventory.getCategory(mCargoIDs[i]);
if (category)
{
- cats.put(category);
+ cats.push_back(category);
}
}
}
@@ -2666,23 +2666,23 @@ LLInventoryObject* LLToolDragAndDrop::locateMultipleInventory(LLViewerInventoryC
|| (mCargoType == DAD_ROOT_CATEGORY))
{
// The object should be in user inventory.
- for (S32 i = 0; i < mCargoIDs.count(); i++)
+ for (S32 i = 0; i < mCargoIDs.size(); i++)
{
LLInventoryCategory* category = (LLInventoryCategory*)obj->getInventoryObject(mCargoIDs[i]);
if (category)
{
- cats.put(category);
+ cats.push_back(category);
}
}
}
else
{
- for (S32 i = 0; i < mCargoIDs.count(); i++)
+ for (S32 i = 0; i < mCargoIDs.size(); i++)
{
LLInventoryItem* item = (LLInventoryItem*)obj->getInventoryObject(mCargoIDs[i]);
if (item)
{
- items.put(item);
+ items.push_back(item);
}
}
}
@@ -2694,18 +2694,18 @@ LLInventoryObject* LLToolDragAndDrop::locateMultipleInventory(LLViewerInventoryC
card = (LLPreviewNotecard*)LLPreview::find(mSourceID);
if(card)
{
- items.put((LLInventoryItem*)card->getDragItem());
+ items.push_back((LLInventoryItem*)card->getDragItem());
}
}
- if(items.count()) return items[0];
- if(cats.count()) return cats[0];
+ if(items.size()) return items[0];
+ if(cats.size()) return cats[0];
return NULL;
}
*/
// void LLToolDragAndDrop::createContainer(LLViewerInventoryItem::item_array_t &items, const char* preferred_name )
// {
-// llwarns << "LLToolDragAndDrop::createContainer()" << llendl;
+// LL_WARNS() << "LLToolDragAndDrop::createContainer()" << LL_ENDL;
// return;
// }
diff --git a/indra/newview/lltooldraganddrop.h b/indra/newview/lltooldraganddrop.h
index f17300a76a..99b794ce58 100755
--- a/indra/newview/lltooldraganddrop.h
+++ b/indra/newview/lltooldraganddrop.h
@@ -31,9 +31,7 @@
#include "lltool.h"
#include "llview.h"
#include "lluuid.h"
-#include "stdenums.h"
#include "llassetstorage.h"
-#include "lldarray.h"
#include "llpermissions.h"
#include "llwindow.h"
#include "llviewerinventory.h"
diff --git a/indra/newview/lltoolfocus.cpp b/indra/newview/lltoolfocus.cpp
index 857b0f0714..ee4ec112f8 100755
--- a/indra/newview/lltoolfocus.cpp
+++ b/indra/newview/lltoolfocus.cpp
@@ -334,7 +334,7 @@ BOOL LLToolCamera::handleHover(S32 x, S32 y, MASK mask)
{
if (!mValidClickPoint)
{
- lldebugst(LLERR_USER_INPUT) << "hover handled by LLToolFocus [invalid point]" << llendl;
+ LL_DEBUGS("UserInput") << "hover handled by LLToolFocus [invalid point]" << LL_ENDL;
gViewerWindow->setCursor(UI_CURSOR_NO);
gViewerWindow->showCursor();
return TRUE;
@@ -361,7 +361,7 @@ BOOL LLToolCamera::handleHover(S32 x, S32 y, MASK mask)
gViewerWindow->moveCursorToCenter();
}
- lldebugst(LLERR_USER_INPUT) << "hover handled by LLToolFocus [active]" << llendl;
+ LL_DEBUGS("UserInput") << "hover handled by LLToolFocus [active]" << LL_ENDL;
}
else if ( gCameraBtnPan ||
mask == MASK_PAN ||
@@ -389,7 +389,7 @@ BOOL LLToolCamera::handleHover(S32 x, S32 y, MASK mask)
gViewerWindow->moveCursorToCenter();
}
- lldebugst(LLERR_USER_INPUT) << "hover handled by LLToolPan" << llendl;
+ LL_DEBUGS("UserInput") << "hover handled by LLToolPan" << LL_ENDL;
}
else if (gCameraBtnZoom)
{
@@ -421,7 +421,7 @@ BOOL LLToolCamera::handleHover(S32 x, S32 y, MASK mask)
gViewerWindow->moveCursorToCenter();
}
- lldebugst(LLERR_USER_INPUT) << "hover handled by LLToolZoom" << llendl;
+ LL_DEBUGS("UserInput") << "hover handled by LLToolZoom" << LL_ENDL;
}
}
diff --git a/indra/newview/lltoolgrab.cpp b/indra/newview/lltoolgrab.cpp
index 9907da0f0e..493c970141 100755
--- a/indra/newview/lltoolgrab.cpp
+++ b/indra/newview/lltoolgrab.cpp
@@ -115,7 +115,7 @@ BOOL LLToolGrab::handleDoubleClick(S32 x, S32 y, MASK mask)
{
if (gDebugClicks)
{
- llinfos << "LLToolGrab handleDoubleClick (becoming mouseDown)" << llendl;
+ LL_INFOS() << "LLToolGrab handleDoubleClick (becoming mouseDown)" << LL_ENDL;
}
return FALSE;
@@ -125,7 +125,7 @@ BOOL LLToolGrab::handleMouseDown(S32 x, S32 y, MASK mask)
{
if (gDebugClicks)
{
- llinfos << "LLToolGrab handleMouseDown" << llendl;
+ LL_INFOS() << "LLToolGrab handleMouseDown" << LL_ENDL;
}
// call the base class to propogate info to sim
@@ -176,12 +176,12 @@ BOOL LLToolGrab::handleObjectHit(const LLPickInfo& info)
if (gDebugClicks)
{
- llinfos << "LLToolGrab handleObjectHit " << info.mMousePt.mX << "," << info.mMousePt.mY << llendl;
+ LL_INFOS() << "LLToolGrab handleObjectHit " << info.mMousePt.mX << "," << info.mMousePt.mY << LL_ENDL;
}
if (NULL == objectp) // unexpected
{
- llwarns << "objectp was NULL; returning FALSE" << llendl;
+ LL_WARNS() << "objectp was NULL; returning FALSE" << LL_ENDL;
return FALSE;
}
@@ -707,7 +707,7 @@ void LLToolGrab::handleHoverActive(S32 x, S32 y, MASK mask)
// HACK to avoid assert: error checking system makes sure that the cursor is set during every handleHover. This is actually a no-op since the cursor is hidden.
gViewerWindow->setCursor(UI_CURSOR_ARROW);
- lldebugst(LLERR_USER_INPUT) << "hover handled by LLToolGrab (active) [cursor hidden]" << llendl;
+ LL_DEBUGS("UserInput") << "hover handled by LLToolGrab (active) [cursor hidden]" << LL_ENDL;
}
@@ -871,7 +871,7 @@ void LLToolGrab::handleHoverNonPhysical(S32 x, S32 y, MASK mask)
void LLToolGrab::handleHoverInactive(S32 x, S32 y, MASK mask)
{
// JC - TODO - change cursor based on gGrabBtnVertical, gGrabBtnSpin
- lldebugst(LLERR_USER_INPUT) << "hover handled by LLToolGrab (inactive-not over editable object)" << llendl;
+ LL_DEBUGS("UserInput") << "hover handled by LLToolGrab (inactive-not over editable object)" << LL_ENDL;
gViewerWindow->setCursor(UI_CURSOR_TOOLGRAB);
}
@@ -881,7 +881,7 @@ void LLToolGrab::handleHoverFailed(S32 x, S32 y, MASK mask)
if( GRAB_NOOBJECT == mMode )
{
gViewerWindow->setCursor(UI_CURSOR_NO);
- lldebugst(LLERR_USER_INPUT) << "hover handled by LLToolGrab (not on object)" << llendl;
+ LL_DEBUGS("UserInput") << "hover handled by LLToolGrab (not on object)" << LL_ENDL;
}
else
{
@@ -894,13 +894,13 @@ void LLToolGrab::handleHoverFailed(S32 x, S32 y, MASK mask)
{
case GRAB_LOCKED:
gViewerWindow->setCursor(UI_CURSOR_GRABLOCKED);
- lldebugst(LLERR_USER_INPUT) << "hover handled by LLToolGrab (grab failed, no move permission)" << llendl;
+ LL_DEBUGS("UserInput") << "hover handled by LLToolGrab (grab failed, no move permission)" << LL_ENDL;
break;
// Non physical now handled by handleHoverActive - CRO
// case GRAB_NONPHYSICAL:
// gViewerWindow->setCursor(UI_CURSOR_ARROW);
-// lldebugst(LLERR_USER_INPUT) << "hover handled by LLToolGrab (grab failed, nonphysical)" << llendl;
+// LL_DEBUGS("UserInput") << "hover handled by LLToolGrab (grab failed, nonphysical)" << LL_ENDL;
// break;
default:
llassert(0);
@@ -909,7 +909,7 @@ void LLToolGrab::handleHoverFailed(S32 x, S32 y, MASK mask)
else
{
gViewerWindow->setCursor(UI_CURSOR_ARROW);
- lldebugst(LLERR_USER_INPUT) << "hover handled by LLToolGrab (grab failed but within slop)" << llendl;
+ LL_DEBUGS("UserInput") << "hover handled by LLToolGrab (grab failed but within slop)" << LL_ENDL;
}
}
}
@@ -1108,16 +1108,16 @@ void send_ObjectGrab_message(LLViewerObject* object, const LLPickInfo & pick, co
msg->sendMessage( object->getRegion()->getHost());
/* Diagnostic code
- llinfos << "mUVCoords: " << pick.mUVCoords
+ LL_INFOS() << "mUVCoords: " << pick.mUVCoords
<< ", mSTCoords: " << pick.mSTCoords
<< ", mObjectFace: " << pick.mObjectFace
<< ", mIntersection: " << pick.mIntersection
<< ", mNormal: " << pick.mNormal
<< ", mBinormal: " << pick.mBinormal
- << llendl;
+ << LL_ENDL;
- llinfos << "Avatar pos: " << gAgent.getPositionAgent() << llendl;
- llinfos << "Object pos: " << object->getPosition() << llendl;
+ LL_INFOS() << "Avatar pos: " << gAgent.getPositionAgent() << LL_ENDL;
+ LL_INFOS() << "Object pos: " << object->getPosition() << LL_ENDL;
*/
}
diff --git a/indra/newview/lltoolgun.cpp b/indra/newview/lltoolgun.cpp
index c1735adc9c..6c9155be85 100755
--- a/indra/newview/lltoolgun.cpp
+++ b/indra/newview/lltoolgun.cpp
@@ -116,11 +116,11 @@ BOOL LLToolGun::handleHover(S32 x, S32 y, MASK mask)
gViewerWindow->hideCursor();
}
- lldebugst(LLERR_USER_INPUT) << "hover handled by LLToolGun (mouselook)" << llendl;
+ LL_DEBUGS("UserInput") << "hover handled by LLToolGun (mouselook)" << LL_ENDL;
}
else
{
- lldebugst(LLERR_USER_INPUT) << "hover handled by LLToolGun (not mouselook)" << llendl;
+ LL_DEBUGS("UserInput") << "hover handled by LLToolGun (not mouselook)" << LL_ENDL;
}
// HACK to avoid assert: error checking system makes sure that the cursor is set during every handleHover. This is actually a no-op since the cursor is hidden.
diff --git a/indra/newview/lltoolmgr.cpp b/indra/newview/lltoolmgr.cpp
index a135ba70f5..aa55caf7ec 100755
--- a/indra/newview/lltoolmgr.cpp
+++ b/indra/newview/lltoolmgr.cpp
@@ -357,7 +357,7 @@ void LLToolMgr::clearTransientTool()
mTransientTool = NULL;
if (!mBaseTool)
{
- llwarns << "mBaseTool is NULL" << llendl;
+ LL_WARNS() << "mBaseTool is NULL" << LL_ENDL;
}
}
updateToolStatus();
diff --git a/indra/newview/lltoolobjpicker.cpp b/indra/newview/lltoolobjpicker.cpp
index b65c4c1ec8..0d9fe9e577 100755
--- a/indra/newview/lltoolobjpicker.cpp
+++ b/indra/newview/lltoolobjpicker.cpp
@@ -76,7 +76,7 @@ BOOL LLToolObjPicker::handleMouseDown(S32 x, S32 y, MASK mask)
}
else
{
- llwarns << "PickerTool doesn't have mouse capture on mouseDown" << llendl;
+ LL_WARNS() << "PickerTool doesn't have mouse capture on mouseDown" << LL_ENDL;
}
}
@@ -109,7 +109,7 @@ BOOL LLToolObjPicker::handleMouseUp(S32 x, S32 y, MASK mask)
}
else
{
- llwarns << "PickerTool doesn't have mouse capture on mouseUp" << llendl;
+ LL_WARNS() << "PickerTool doesn't have mouse capture on mouseUp" << LL_ENDL;
}
return handled;
}
diff --git a/indra/newview/lltoolpie.cpp b/indra/newview/lltoolpie.cpp
index 1c362c18e0..558159775f 100755
--- 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"
@@ -557,7 +558,7 @@ BOOL LLToolPie::handleHover(S32 x, S32 y, MASK mask)
// could disable it here.
show_highlight = true;
// cursor set by media object
- lldebugst(LLERR_USER_INPUT) << "hover handled by LLToolPie (inactive)" << llendl;
+ LL_DEBUGS("UserInput") << "hover handled by LLToolPie (inactive)" << LL_ENDL;
}
else if (!mMouseOutsideSlop
&& mMouseButtonDown
@@ -594,7 +595,7 @@ BOOL LLToolPie::handleHover(S32 x, S32 y, MASK mask)
show_highlight = true;
ECursorType cursor = cursorFromObject(click_action_object);
gViewerWindow->setCursor(cursor);
- lldebugst(LLERR_USER_INPUT) << "hover handled by LLToolPie (inactive)" << llendl;
+ LL_DEBUGS("UserInput") << "hover handled by LLToolPie (inactive)" << LL_ENDL;
}
else if ((object && !object->isAvatar() && object->flagUsePhysics())
@@ -602,19 +603,19 @@ BOOL LLToolPie::handleHover(S32 x, S32 y, MASK mask)
{
show_highlight = true;
gViewerWindow->setCursor(UI_CURSOR_TOOLGRAB);
- lldebugst(LLERR_USER_INPUT) << "hover handled by LLToolPie (inactive)" << llendl;
+ LL_DEBUGS("UserInput") << "hover handled by LLToolPie (inactive)" << LL_ENDL;
}
else if ( (object && object->flagHandleTouch())
|| (parent && parent->flagHandleTouch()))
{
show_highlight = true;
gViewerWindow->setCursor(UI_CURSOR_HAND);
- lldebugst(LLERR_USER_INPUT) << "hover handled by LLToolPie (inactive)" << llendl;
+ LL_DEBUGS("UserInput") << "hover handled by LLToolPie (inactive)" << LL_ENDL;
}
else
{
gViewerWindow->setCursor(UI_CURSOR_ARROW);
- lldebugst(LLERR_USER_INPUT) << "hover handled by LLToolPie (inactive)" << llendl;
+ LL_DEBUGS("UserInput") << "hover handled by LLToolPie (inactive)" << LL_ENDL;
}
}
@@ -706,7 +707,7 @@ BOOL LLToolPie::handleDoubleClick(S32 x, S32 y, MASK mask)
{
if (gDebugClicks)
{
- llinfos << "LLToolPie handleDoubleClick (becoming mouseDown)" << llendl;
+ LL_INFOS() << "LLToolPie handleDoubleClick (becoming mouseDown)" << LL_ENDL;
}
if (gSavedSettings.getBOOL("DoubleClickAutoPilot"))
diff --git a/indra/newview/lltoolplacer.cpp b/indra/newview/lltoolplacer.cpp
index 641fbc5042..ceb57d0172 100755
--- a/indra/newview/lltoolplacer.cpp
+++ b/indra/newview/lltoolplacer.cpp
@@ -127,7 +127,7 @@ BOOL LLToolPlacer::raycastForNewObjPos( S32 x, S32 y, LLViewerObject** hit_obj,
LLViewerRegion *regionp = LLWorld::getInstance()->getRegionFromPosGlobal(surface_pos_global);
if (!regionp)
{
- llwarns << "Trying to add object outside of all known regions!" << llendl;
+ LL_WARNS() << "Trying to add object outside of all known regions!" << LL_ENDL;
return FALSE;
}
@@ -178,7 +178,7 @@ BOOL LLToolPlacer::addObject( LLPCode pcode, S32 x, S32 y, U8 use_physics )
if (NULL == regionp)
{
- llwarns << "regionp was NULL; aborting function." << llendl;
+ LL_WARNS() << "regionp was NULL; aborting function." << LL_ENDL;
return FALSE;
}
@@ -433,7 +433,7 @@ BOOL LLToolPlacer::addObject( LLPCode pcode, S32 x, S32 y, U8 use_physics )
effectp->setDuration(LL_HUD_DUR_SHORT);
effectp->setColor(LLColor4U(gAgent.getEffectColor()));
- LLViewerStats::getInstance()->incStat(LLViewerStats::ST_CREATE_COUNT);
+ add(LLStatViewer::OBJECT_CREATE, 1);
return TRUE;
}
@@ -518,7 +518,7 @@ BOOL LLToolPlacer::placeObject(S32 x, S32 y, MASK mask)
BOOL LLToolPlacer::handleHover(S32 x, S32 y, MASK mask)
{
- lldebugst(LLERR_USER_INPUT) << "hover handled by LLToolPlacer" << llendl;
+ LL_DEBUGS("UserInput") << "hover handled by LLToolPlacer" << LL_ENDL;
gViewerWindow->setCursor(UI_CURSOR_TOOLCREATE);
return TRUE;
}
diff --git a/indra/newview/lltoolselect.cpp b/indra/newview/lltoolselect.cpp
index 7c604a04bf..0a9153eecb 100755
--- 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/lltoolselectland.cpp b/indra/newview/lltoolselectland.cpp
index a48388c591..44c0cb3124 100755
--- a/indra/newview/lltoolselectland.cpp
+++ b/indra/newview/lltoolselectland.cpp
@@ -168,13 +168,13 @@ BOOL LLToolSelectLand::handleHover(S32 x, S32 y, MASK mask)
roundXY(mWestSouthBottom);
roundXY(mEastNorthTop);
- lldebugst(LLERR_USER_INPUT) << "hover handled by LLToolSelectLand (active, land)" << llendl;
+ LL_DEBUGS("UserInput") << "hover handled by LLToolSelectLand (active, land)" << LL_ENDL;
gViewerWindow->setCursor(UI_CURSOR_ARROW);
}
else
{
mDragEndValid = FALSE;
- lldebugst(LLERR_USER_INPUT) << "hover handled by LLToolSelectLand (active, no land)" << llendl;
+ LL_DEBUGS("UserInput") << "hover handled by LLToolSelectLand (active, no land)" << LL_ENDL;
gViewerWindow->setCursor(UI_CURSOR_NO);
}
@@ -183,13 +183,13 @@ BOOL LLToolSelectLand::handleHover(S32 x, S32 y, MASK mask)
}
else
{
- lldebugst(LLERR_USER_INPUT) << "hover handled by LLToolSelectLand (active, in slop)" << llendl;
+ LL_DEBUGS("UserInput") << "hover handled by LLToolSelectLand (active, in slop)" << LL_ENDL;
gViewerWindow->setCursor(UI_CURSOR_ARROW);
}
}
else
{
- lldebugst(LLERR_USER_INPUT) << "hover handled by LLToolSelectLand (inactive)" << llendl;
+ LL_DEBUGS("UserInput") << "hover handled by LLToolSelectLand (inactive)" << LL_ENDL;
gViewerWindow->setCursor(UI_CURSOR_ARROW);
}
diff --git a/indra/newview/lltoolselectrect.cpp b/indra/newview/lltoolselectrect.cpp
index a3f4e5a18c..c5616fb208 100755
--- a/indra/newview/lltoolselectrect.cpp
+++ b/indra/newview/lltoolselectrect.cpp
@@ -32,7 +32,6 @@
// Library includes
#include "llgl.h"
#include "llrender.h"
-#include "lldarray.h"
// Viewer includes
#include "llviewercontrol.h"
@@ -145,11 +144,11 @@ BOOL LLToolSelectRect::handleHover(S32 x, S32 y, MASK mask)
return LLToolSelect::handleHover(x, y, mask);
}
- lldebugst(LLERR_USER_INPUT) << "hover handled by LLToolSelectRect (active)" << llendl;
+ LL_DEBUGS("UserInput") << "hover handled by LLToolSelectRect (active)" << LL_ENDL;
}
else
{
- lldebugst(LLERR_USER_INPUT) << "hover handled by LLToolSelectRect (inactive)" << llendl;
+ LL_DEBUGS("UserInput") << "hover handled by LLToolSelectRect (inactive)" << LL_ENDL;
}
gViewerWindow->setCursor(UI_CURSOR_ARROW);
diff --git a/indra/newview/lltoolview.cpp b/indra/newview/lltoolview.cpp
index 8c40ff3cb3..678e2c241a 100755
--- a/indra/newview/lltoolview.cpp
+++ b/indra/newview/lltoolview.cpp
@@ -179,7 +179,7 @@ LLToolContainer* LLToolView::findToolContainer( LLTool *tool )
return contain;
}
}
- llerrs << "LLToolView::findToolContainer - tool not found" << llendl;
+ LL_ERRS() << "LLToolView::findToolContainer - tool not found" << LL_ENDL;
return NULL;
}
diff --git a/indra/newview/lltracker.cpp b/indra/newview/lltracker.cpp
index 73ceb783b5..f611d0503f 100755
--- a/indra/newview/lltracker.cpp
+++ b/indra/newview/lltracker.cpp
@@ -28,7 +28,6 @@
// library includes
#include "llcoord.h"
-#include "lldarray.h"
#include "llfontgl.h"
#include "llgl.h"
#include "llrender.h"
@@ -427,9 +426,9 @@ F32 pulse_func(F32 t, F32 z, bool tracking_avatar, std::string direction)
}
else
{
- z -= t*64.f - 256.f;
+ z -= t*64.f - 256.f;
}
-
+
F32 a = cosf(z*F_PI/512.f)*10.0f;
a = llmax(a, 9.9f);
a -= 9.9f;
@@ -502,54 +501,54 @@ void LLTracker::drawBeacon(LLVector3 pos_agent, std::string direction, LLColor4
step = pos_agent.mV[2] / BEACON_VERTS;
}
- gGL.color4fv(fogged_color.mV);
-
- LLVector3 x_axis = LLViewerCamera::getInstance()->getLeftAxis();
- F32 t = gRenderStartTime.getElapsedTimeF32();
-
- for (U32 i = 0; i < BEACON_VERTS; i++)
- {
- F32 x = x_axis.mV[0];
- F32 y = x_axis.mV[1];
+ gGL.color4fv(fogged_color.mV);
+
+ LLVector3 x_axis = LLViewerCamera::getInstance()->getLeftAxis();
+ F32 t = gRenderStartTime.getElapsedTimeF32();
+
+ for (U32 i = 0; i < BEACON_VERTS; i++)
+ {
+ F32 x = x_axis.mV[0];
+ F32 y = x_axis.mV[1];
- F32 z = i * step;
- F32 z_next = (i+1)*step;
-
+ F32 z = i * step;
+ F32 z_next = (i+1)*step;
+
bool tracking_avatar = getTrackingStatus() == TRACKING_AVATAR;
F32 a = pulse_func(t, z, tracking_avatar, direction);
F32 an = pulse_func(t, z_next, tracking_avatar, direction);
-
- LLColor4 c_col = fogged_color + LLColor4(a,a,a,a);
- LLColor4 col_next = fogged_color + LLColor4(an,an,an,an);
- LLColor4 col_edge = fogged_color * LLColor4(a,a,a,0.0f);
- LLColor4 col_edge_next = fogged_color * LLColor4(an,an,an,0.0f);
-
- a *= 2.f;
+
+ LLColor4 c_col = fogged_color + LLColor4(a,a,a,a);
+ LLColor4 col_next = fogged_color + LLColor4(an,an,an,an);
+ LLColor4 col_edge = fogged_color * LLColor4(a,a,a,0.0f);
+ LLColor4 col_edge_next = fogged_color * LLColor4(an,an,an,0.0f);
+
+ a *= 2.f;
a += 1.0f;
-
- an *= 2.f;
+
+ an *= 2.f;
an += 1.0f;
-
- gGL.begin(LLRender::TRIANGLE_STRIP);
- gGL.color4fv(col_edge.mV);
- gGL.vertex3f(-x*a, -y*a, z);
- gGL.color4fv(col_edge_next.mV);
- gGL.vertex3f(-x*an, -y*an, z_next);
-
- gGL.color4fv(c_col.mV);
- gGL.vertex3f(0, 0, z);
- gGL.color4fv(col_next.mV);
- gGL.vertex3f(0, 0, z_next);
-
- gGL.color4fv(col_edge.mV);
- gGL.vertex3f(x*a,y*a,z);
- gGL.color4fv(col_edge_next.mV);
- gGL.vertex3f(x*an,y*an,z_next);
+
+ gGL.begin(LLRender::TRIANGLE_STRIP);
+ gGL.color4fv(col_edge.mV);
+ gGL.vertex3f(-x*a, -y*a, z);
+ gGL.color4fv(col_edge_next.mV);
+ gGL.vertex3f(-x*an, -y*an, z_next);
+
+ gGL.color4fv(c_col.mV);
+ gGL.vertex3f(0, 0, z);
+ gGL.color4fv(col_next.mV);
+ gGL.vertex3f(0, 0, z_next);
+
+ gGL.color4fv(col_edge.mV);
+ gGL.vertex3f(x*a,y*a,z);
+ gGL.color4fv(col_edge_next.mV);
+ gGL.vertex3f(x*an,y*an,z_next);
gGL.end();
}
gGL.popMatrix();
}
-
+
// static
void LLTracker::renderBeacon(LLVector3d pos_global,
const LLColor4& color,
@@ -566,7 +565,7 @@ void LLTracker::renderBeacon(LLVector3d pos_global,
{
color_frac = 0.4f;
// pos_global = gAgentCamera.getCameraPositionGlobal() + 0.99f*(LLViewerCamera::getInstance()->getFar()/dist)*to_vec;
- }
+ }
else
{
color_frac = 1.f - 0.6f*(dist/LLViewerCamera::getInstance()->getFar());
@@ -805,7 +804,7 @@ void LLTracker::cacheLandmarkPosition()
}
else
{
- llwarns << "LLTracker couldn't find home pos" << llendl;
+ LL_WARNS() << "LLTracker couldn't find home pos" << LL_ENDL;
mTrackedLandmarkAssetID.setNull();
mTrackedLandmarkItemID.setNull();
}
diff --git a/indra/newview/lltracker.h b/indra/newview/lltracker.h
index d8d5803787..218f3430a6 100755
--- a/indra/newview/lltracker.h
+++ b/indra/newview/lltracker.h
@@ -33,7 +33,6 @@
#ifndef LL_LLTRACKER_H
#define LL_LLTRACKER_H
-#include "lldarray.h"
#include "llpointer.h"
#include "llstring.h"
#include "lluuid.h"
@@ -140,8 +139,8 @@ protected:
std::string mTrackedLandmarkName;
LLUUID mTrackedLandmarkAssetID;
LLUUID mTrackedLandmarkItemID;
- LLDynamicArray<LLUUID> mLandmarkAssetIDList;
- LLDynamicArray<LLUUID> mLandmarkItemIDList;
+ std::vector<LLUUID> mLandmarkAssetIDList;
+ std::vector<LLUUID> mLandmarkItemIDList;
BOOL mHasReachedLandmark;
BOOL mHasLandmarkPosition;
BOOL mLandmarkHasBeenVisited;
diff --git a/indra/newview/lltranslate.cpp b/indra/newview/lltranslate.cpp
index f3d8de1904..7e80d72dec 100755
--- a/indra/newview/lltranslate.cpp
+++ b/indra/newview/lltranslate.cpp
@@ -284,7 +284,7 @@ void LLTranslate::TranslationReceiver::completedRaw(
err_msg = LLTrans::getString("TranslationResponseParseError");
}
- llwarns << "Translation request failed: " << err_msg << llendl;
+ LL_WARNS() << "Translation request failed: " << err_msg << LL_ENDL;
handleFailure(status, err_msg);
}
}
diff --git a/indra/newview/lluploadfloaterobservers.cpp b/indra/newview/lluploadfloaterobservers.cpp
index 1d777b3f7f..248f1bf1d5 100755
--- a/indra/newview/lluploadfloaterobservers.cpp
+++ b/indra/newview/lluploadfloaterobservers.cpp
@@ -35,8 +35,8 @@ LLUploadModelPremissionsResponder::LLUploadModelPremissionsResponder(const LLHan
void LLUploadModelPremissionsResponder::errorWithContent(U32 status, const std::string& reason, const LLSD& content)
{
- llwarns << "LLUploadModelPremissionsResponder error [status:"
- << status << "]: " << content << llendl;
+ LL_WARNS() << "LLUploadModelPremissionsResponder error [status:"
+ << status << "]: " << content << LL_ENDL;
LLUploadPermissionsObserver* observer = mObserverHandle.get();
diff --git a/indra/newview/llurl.cpp b/indra/newview/llurl.cpp
index aa90d16c67..01a81c5f83 100755
--- a/indra/newview/llurl.cpp
+++ b/indra/newview/llurl.cpp
@@ -126,13 +126,13 @@ void LLURL::init(const char * url)
strncpy(mPath,leftover_url, LL_MAX_PATH -1); /* Flawfinder: ignore */
mPath[LL_MAX_PATH -1] = '\0';
-// llinfos << url << " decomposed into: " << llendl;
-// llinfos << " URI : <" << mURI << ">" << llendl;
-// llinfos << " Auth: <" << mAuthority << ">" << llendl;
-// llinfos << " Path: <" << mPath << ">" << llendl;
-// llinfos << " File: <" << mFilename << ">" << llendl;
-// llinfos << " Ext : <" << mExtension << ">" << llendl;
-// llinfos << " Tag : <" << mTag << ">" << llendl;
+// LL_INFOS() << url << " decomposed into: " << LL_ENDL;
+// LL_INFOS() << " URI : <" << mURI << ">" << LL_ENDL;
+// LL_INFOS() << " Auth: <" << mAuthority << ">" << LL_ENDL;
+// LL_INFOS() << " Path: <" << mPath << ">" << LL_ENDL;
+// LL_INFOS() << " File: <" << mFilename << ">" << LL_ENDL;
+// LL_INFOS() << " Ext : <" << mExtension << ">" << LL_ENDL;
+// LL_INFOS() << " Tag : <" << mTag << ">" << LL_ENDL;
}
void LLURL::cleanup()
diff --git a/indra/newview/llurldispatcher.cpp b/indra/newview/llurldispatcher.cpp
index 0c34db39b5..b905ea2684 100755
--- a/indra/newview/llurldispatcher.cpp
+++ b/indra/newview/llurldispatcher.cpp
@@ -150,7 +150,7 @@ bool LLURLDispatcherImpl::dispatchApp(const LLSLURL& slurl,
LLMediaCtrl* web,
bool trusted_browser)
{
- llinfos << "cmd: " << slurl.getAppCmd() << " path: " << slurl.getAppPath() << " query: " << slurl.getAppQuery() << llendl;
+ LL_INFOS() << "cmd: " << slurl.getAppCmd() << " path: " << slurl.getAppPath() << " query: " << slurl.getAppQuery() << LL_ENDL;
const LLSD& query_map = LLURI::queryMap(slurl.getAppQuery());
bool handled = LLCommandDispatcher::dispatch(
slurl.getAppCmd(), slurl.getAppPath(), query_map, web, nav_type, trusted_browser);
diff --git a/indra/newview/llurlhistory.cpp b/indra/newview/llurlhistory.cpp
index a80b9da13c..8eea2b242a 100755
--- a/indra/newview/llurlhistory.cpp
+++ b/indra/newview/llurlhistory.cpp
@@ -48,15 +48,15 @@ bool LLURLHistory::loadFile(const std::string& filename)
if (file.is_open())
{
- llinfos << "Loading history.xml file at " << filename << llendl;
+ LL_INFOS() << "Loading history.xml file at " << filename << LL_ENDL;
LLSDSerialize::fromXML(data, file);
}
if (data.isUndefined())
{
- llinfos << "file missing, ill-formed, "
+ LL_INFOS() << "file missing, ill-formed, "
"or simply undefined; not changing the"
- " file" << llendl;
+ " file" << LL_ENDL;
sHistorySD = LLSD();
return false;
}
@@ -71,7 +71,7 @@ bool LLURLHistory::saveFile(const std::string& filename)
std::string temp_str = gDirUtilp->getLindenUserDir();
if( temp_str.empty() )
{
- llinfos << "Can't save URL history - no user directory set yet." << llendl;
+ LL_INFOS() << "Can't save URL history - no user directory set yet." << LL_ENDL;
return false;
}
@@ -79,7 +79,7 @@ bool LLURLHistory::saveFile(const std::string& filename)
llofstream out(temp_str);
if (!out.good())
{
- llwarns << "Unable to open " << filename << " for output." << llendl;
+ LL_WARNS() << "Unable to open " << filename << " for output." << LL_ENDL;
return false;
}
diff --git a/indra/newview/llurlwhitelist.cpp b/indra/newview/llurlwhitelist.cpp
index 72029203d9..8211ce12f6 100755
--- a/indra/newview/llurlwhitelist.cpp
+++ b/indra/newview/llurlwhitelist.cpp
@@ -117,7 +117,7 @@ bool LLUrlWhiteList::save ()
if (resolvedFilename.empty())
{
- llinfos << "No per-user dir for saving URL whitelist - presumably not logged in yet. Skipping." << llendl;
+ LL_INFOS() << "No per-user dir for saving URL whitelist - presumably not logged in yet. Skipping." << LL_ENDL;
return false;
}
diff --git a/indra/newview/llviewerassetstats.cpp b/indra/newview/llviewerassetstats.cpp
index aaa81c57d4..54ac29723f 100755
--- a/indra/newview/llviewerassetstats.cpp
+++ b/indra/newview/llviewerassetstats.cpp
@@ -31,6 +31,8 @@
#include "stdtypes.h"
#include "llvoavatar.h"
+#include "llsdparam.h"
+#include "llsdutil.h"
/*
* Classes and utility functions for per-thread and per-region
@@ -78,126 +80,259 @@
*
*/
+namespace LLViewerAssetStatsFF
+{
+ static EViewerAssetCategories asset_type_to_category(const LLViewerAssetType::EType at, bool with_http, bool is_temp)
+ {
+ // For statistical purposes, we divide GETs into several
+ // populations of asset fetches:
+ // - textures which are de-prioritized in the asset system
+ // - wearables (clothing, bodyparts) which directly affect
+ // user experiences when they log in
+ // - sounds
+ // - gestures
+ // - everything else.
+ //
+ llassert_always(50 == LLViewerAssetType::AT_COUNT);
+
+ // Multiple asset definitions are floating around so this requires some
+ // maintenance and attention.
+ static const EViewerAssetCategories asset_to_bin_map[LLViewerAssetType::AT_COUNT] =
+ {
+ EVACTextureTempHTTPGet, // (0) AT_TEXTURE
+ EVACSoundUDPGet, // AT_SOUND
+ EVACOtherGet, // AT_CALLINGCARD
+ EVACOtherGet, // AT_LANDMARK
+ EVACOtherGet, // AT_SCRIPT
+ EVACWearableUDPGet, // AT_CLOTHING
+ EVACOtherGet, // AT_OBJECT
+ EVACOtherGet, // AT_NOTECARD
+ EVACOtherGet, // AT_CATEGORY
+ EVACOtherGet, // AT_ROOT_CATEGORY
+ EVACOtherGet, // (10) AT_LSL_TEXT
+ EVACOtherGet, // AT_LSL_BYTECODE
+ EVACOtherGet, // AT_TEXTURE_TGA
+ EVACWearableUDPGet, // AT_BODYPART
+ EVACOtherGet, // AT_TRASH
+ EVACOtherGet, // AT_SNAPSHOT_CATEGORY
+ EVACOtherGet, // AT_LOST_AND_FOUND
+ EVACSoundUDPGet, // AT_SOUND_WAV
+ EVACOtherGet, // AT_IMAGE_TGA
+ EVACOtherGet, // AT_IMAGE_JPEG
+ EVACGestureUDPGet, // (20) AT_ANIMATION
+ EVACGestureUDPGet, // AT_GESTURE
+ EVACOtherGet, // AT_SIMSTATE
+ EVACOtherGet, // AT_FAVORITE
+ EVACOtherGet, // AT_LINK
+ EVACOtherGet, // AT_LINK_FOLDER
+ EVACOtherGet, //
+ EVACOtherGet, //
+ EVACOtherGet, //
+ EVACOtherGet, //
+ EVACOtherGet, // (30)
+ EVACOtherGet, //
+ EVACOtherGet, //
+ EVACOtherGet, //
+ EVACOtherGet, //
+ EVACOtherGet, //
+ EVACOtherGet, //
+ EVACOtherGet, //
+ EVACOtherGet, //
+ EVACOtherGet, //
+ EVACOtherGet, // (40)
+ EVACOtherGet, //
+ EVACOtherGet, //
+ EVACOtherGet, //
+ EVACOtherGet, //
+ EVACOtherGet, //
+ EVACOtherGet, //
+ EVACOtherGet, //
+ EVACOtherGet, //
+ EVACOtherGet, // AT_MESH
+ // (50)
+ };
-// ------------------------------------------------------
-// Global data definitions
-// ------------------------------------------------------
-LLViewerAssetStats * gViewerAssetStatsMain(0);
-LLViewerAssetStats * gViewerAssetStatsThread1(0);
+ if (at < 0 || at >= LLViewerAssetType::AT_COUNT)
+ {
+ return EVACOtherGet;
+ }
+ EViewerAssetCategories ret(asset_to_bin_map[at]);
+ if (EVACTextureTempHTTPGet == ret)
+ {
+ // Indexed with [is_temp][with_http]
+ static const EViewerAssetCategories texture_bin_map[2][2] =
+ {
+ {
+ EVACTextureNonTempUDPGet,
+ EVACTextureNonTempHTTPGet,
+ },
+ {
+ EVACTextureTempUDPGet,
+ EVACTextureTempHTTPGet,
+ }
+ };
+
+ ret = texture_bin_map[is_temp][with_http];
+ }
+ return ret;
+ }
+ static LLTrace::CountStatHandle<> sEnqueueAssetRequestsTempTextureHTTP ("enqueuedassetrequeststemptexturehttp",
+ "Number of temporary texture asset http requests enqueued"),
+ sEnqueueAssetRequestsTempTextureUDP ("enqueuedassetrequeststemptextureudp",
+ "Number of temporary texture asset udp requests enqueued"),
+ sEnqueueAssetRequestsNonTempTextureHTTP("enqueuedassetrequestsnontemptexturehttp",
+ "Number of texture asset http requests enqueued"),
+ sEnqueueAssetRequestsNonTempTextureUDP ("enqueuedassetrequestsnontemptextureudp",
+ "Number of texture asset udp requests enqueued"),
+ sEnqueuedAssetRequestsWearableUdp ("enqueuedassetrequestswearableudp",
+ "Number of wearable asset requests enqueued"),
+ sEnqueuedAssetRequestsSoundUdp ("enqueuedassetrequestssoundudp",
+ "Number of sound asset requests enqueued"),
+ sEnqueuedAssetRequestsGestureUdp ("enqueuedassetrequestsgestureudp",
+ "Number of gesture asset requests enqueued"),
+ sEnqueuedAssetRequestsOther ("enqueuedassetrequestsother",
+ "Number of other asset requests enqueued");
+
+ static LLTrace::CountStatHandle<>* sEnqueued[EVACCount] = {
+ &sEnqueueAssetRequestsTempTextureHTTP,
+ &sEnqueueAssetRequestsTempTextureUDP,
+ &sEnqueueAssetRequestsNonTempTextureHTTP,
+ &sEnqueueAssetRequestsNonTempTextureUDP,
+ &sEnqueuedAssetRequestsWearableUdp,
+ &sEnqueuedAssetRequestsSoundUdp,
+ &sEnqueuedAssetRequestsGestureUdp,
+ &sEnqueuedAssetRequestsOther
+ };
+
+ static LLTrace::CountStatHandle<> sDequeueAssetRequestsTempTextureHTTP ("dequeuedassetrequeststemptexturehttp",
+ "Number of temporary texture asset http requests dequeued"),
+ sDequeueAssetRequestsTempTextureUDP ("dequeuedassetrequeststemptextureudp",
+ "Number of temporary texture asset udp requests dequeued"),
+ sDequeueAssetRequestsNonTempTextureHTTP("dequeuedassetrequestsnontemptexturehttp",
+ "Number of texture asset http requests dequeued"),
+ sDequeueAssetRequestsNonTempTextureUDP ("dequeuedassetrequestsnontemptextureudp",
+ "Number of texture asset udp requests dequeued"),
+ sDequeuedAssetRequestsWearableUdp ("dequeuedassetrequestswearableudp",
+ "Number of wearable asset requests dequeued"),
+ sDequeuedAssetRequestsSoundUdp ("dequeuedassetrequestssoundudp",
+ "Number of sound asset requests dequeued"),
+ sDequeuedAssetRequestsGestureUdp ("dequeuedassetrequestsgestureudp",
+ "Number of gesture asset requests dequeued"),
+ sDequeuedAssetRequestsOther ("dequeuedassetrequestsother",
+ "Number of other asset requests dequeued");
+
+ static LLTrace::CountStatHandle<>* sDequeued[EVACCount] = {
+ &sDequeueAssetRequestsTempTextureHTTP,
+ &sDequeueAssetRequestsTempTextureUDP,
+ &sDequeueAssetRequestsNonTempTextureHTTP,
+ &sDequeueAssetRequestsNonTempTextureUDP,
+ &sDequeuedAssetRequestsWearableUdp,
+ &sDequeuedAssetRequestsSoundUdp,
+ &sDequeuedAssetRequestsGestureUdp,
+ &sDequeuedAssetRequestsOther
+ };
+
+ static LLTrace::EventStatHandle<F64Seconds > sResponseAssetRequestsTempTextureHTTP ("assetresponsetimestemptexturehttp",
+ "Time spent responding to temporary texture asset http requests"),
+ sResponseAssetRequestsTempTextureUDP ("assetresponsetimestemptextureudp",
+ "Time spent responding to temporary texture asset udp requests"),
+ sResponseAssetRequestsNonTempTextureHTTP("assetresponsetimesnontemptexturehttp",
+ "Time spent responding to texture asset http requests"),
+ sResponseAssetRequestsNonTempTextureUDP ("assetresponsetimesnontemptextureudp",
+ "Time spent responding to texture asset udp requests"),
+ sResponsedAssetRequestsWearableUdp ("assetresponsetimeswearableudp",
+ "Time spent responding to wearable asset requests"),
+ sResponsedAssetRequestsSoundUdp ("assetresponsetimessoundudp",
+ "Time spent responding to sound asset requests"),
+ sResponsedAssetRequestsGestureUdp ("assetresponsetimesgestureudp",
+ "Time spent responding to gesture asset requests"),
+ sResponsedAssetRequestsOther ("assetresponsetimesother",
+ "Time spent responding to other asset requests");
+
+ static LLTrace::EventStatHandle<F64Seconds >* sResponse[EVACCount] = {
+ &sResponseAssetRequestsTempTextureHTTP,
+ &sResponseAssetRequestsTempTextureUDP,
+ &sResponseAssetRequestsNonTempTextureHTTP,
+ &sResponseAssetRequestsNonTempTextureUDP,
+ &sResponsedAssetRequestsWearableUdp,
+ &sResponsedAssetRequestsSoundUdp,
+ &sResponsedAssetRequestsGestureUdp,
+ &sResponsedAssetRequestsOther
+ };
+}
// ------------------------------------------------------
-// Local declarations
+// Global data definitions
// ------------------------------------------------------
-namespace
-{
-
-static LLViewerAssetStats::EViewerAssetCategories
-asset_type_to_category(const LLViewerAssetType::EType at, bool with_http, bool is_temp);
-
-}
+LLViewerAssetStats * gViewerAssetStats(0);
// ------------------------------------------------------
-// LLViewerAssetStats::PerRegionStats struct definition
+// LLViewerAssetStats class definition
// ------------------------------------------------------
-void
-LLViewerAssetStats::PerRegionStats::reset()
+LLViewerAssetStats::LLViewerAssetStats()
+: mRegionHandle(U64(0)),
+ mCurRecording(NULL)
{
- for (int i(0); i < LL_ARRAY_SIZE(mRequests); ++i)
- {
- mRequests[i].mEnqueued.reset();
- mRequests[i].mDequeued.reset();
- mRequests[i].mResponse.reset();
- }
- mFPS.reset();
-
- mTotalTime = 0;
- mStartTimestamp = LLViewerAssetStatsFF::get_timestamp();
+ start();
}
-void
-LLViewerAssetStats::PerRegionStats::merge(const LLViewerAssetStats::PerRegionStats & src)
+LLViewerAssetStats::LLViewerAssetStats(const LLViewerAssetStats & src)
+: mRegionHandle(src.mRegionHandle)
{
- // mRegionHandle, mTotalTime, mStartTimestamp are left alone.
+ mRegionRecordings = src.mRegionRecordings;
+
+ mCurRecording = &mRegionRecordings[mRegionHandle];
- // mFPS
- if (src.mFPS.getCount() && mFPS.getCount())
+ // assume this is being passed to another thread, so make sure we have unique copies of recording data
+ for (PerRegionRecordingContainer::iterator it = mRegionRecordings.begin(), end_it = mRegionRecordings.end();
+ it != end_it;
+ ++it)
{
- mFPS.merge(src.mFPS);
+ it->second.stop();
+ it->second.makeUnique();
}
- // Avatar stats - data all comes from main thread, so leave alone.
+ LLStopWatchControlsMixin<LLViewerAssetStats>::setPlayState(src.getPlayState());
+}
- // Requests
- for (int i = 0; i < LL_ARRAY_SIZE(mRequests); ++i)
+void LLViewerAssetStats::handleStart()
+{
+ if (mCurRecording)
{
- mRequests[i].mEnqueued.merge(src.mRequests[i].mEnqueued);
- mRequests[i].mDequeued.merge(src.mRequests[i].mDequeued);
- mRequests[i].mResponse.merge(src.mRequests[i].mResponse);
+ mCurRecording->start();
}
-
}
-
-void
-LLViewerAssetStats::PerRegionStats::accumulateTime(duration_t now)
+void LLViewerAssetStats::handleStop()
{
- mTotalTime += (now - mStartTimestamp);
- mStartTimestamp = now;
+ if (mCurRecording)
+ {
+ mCurRecording->stop();
+ }
}
-
-// ------------------------------------------------------
-// LLViewerAssetStats class definition
-// ------------------------------------------------------
-LLViewerAssetStats::LLViewerAssetStats()
- : mRegionHandle(U64(0))
+void LLViewerAssetStats::handleReset()
{
reset();
}
-LLViewerAssetStats::LLViewerAssetStats(const LLViewerAssetStats & src)
- : mRegionHandle(src.mRegionHandle),
- mResetTimestamp(src.mResetTimestamp)
-{
- const PerRegionContainer::const_iterator it_end(src.mRegionStats.end());
- for (PerRegionContainer::const_iterator it(src.mRegionStats.begin()); it_end != it; ++it)
- {
- mRegionStats[it->first] = new PerRegionStats(*it->second);
- }
- mCurRegionStats = mRegionStats[mRegionHandle];
-}
-
-
-void
-LLViewerAssetStats::reset()
+void LLViewerAssetStats::reset()
{
// Empty the map of all region stats
- mRegionStats.clear();
+ mRegionRecordings.clear();
- // If we have a current stats, reset it, otherwise, as at construction,
- // create a new one as we must always have a current stats block.
- if (mCurRegionStats)
- {
- mCurRegionStats->reset();
- }
- else
+ // initialize new recording for current region
+ if (mRegionHandle)
{
- mCurRegionStats = new PerRegionStats(mRegionHandle);
+ mCurRecording = &mRegionRecordings[mRegionHandle];
+ mCurRecording->setPlayState(getPlayState());
}
-
- // And add reference to map
- mRegionStats[mRegionHandle] = mCurRegionStats;
-
- // Start timestamp consistent with per-region collector
- mResetTimestamp = mCurRegionStats->mStartTimestamp;
}
-
-void
-LLViewerAssetStats::setRegion(region_handle_t region_handle)
+void LLViewerAssetStats::setRegion(region_handle_t region_handle)
{
if (region_handle == mRegionHandle)
{
@@ -205,410 +340,259 @@ LLViewerAssetStats::setRegion(region_handle_t region_handle)
return;
}
- // Get duration for current set
- const duration_t now = LLViewerAssetStatsFF::get_timestamp();
- mCurRegionStats->accumulateTime(now);
-
- // Prepare new set
- PerRegionContainer::iterator new_stats = mRegionStats.find(region_handle);
- if (mRegionStats.end() == new_stats)
+ if (mCurRecording)
{
- // Haven't seen this region_id before, create a new block and make it current.
- mCurRegionStats = new PerRegionStats(region_handle);
- mRegionStats[region_handle] = mCurRegionStats;
+ mCurRecording->pause();
}
- else
+ if (region_handle)
{
- mCurRegionStats = new_stats->second;
+ mCurRecording = &mRegionRecordings[region_handle];
+ mCurRecording->setPlayState(getPlayState());
}
- mCurRegionStats->mStartTimestamp = now;
- mRegionHandle = region_handle;
-}
-
-void
-LLViewerAssetStats::recordGetEnqueued(LLViewerAssetType::EType at, bool with_http, bool is_temp)
-{
- const EViewerAssetCategories eac(asset_type_to_category(at, with_http, is_temp));
-
- ++(mCurRegionStats->mRequests[int(eac)].mEnqueued);
-}
-
-void
-LLViewerAssetStats::recordGetDequeued(LLViewerAssetType::EType at, bool with_http, bool is_temp)
-{
- const EViewerAssetCategories eac(asset_type_to_category(at, with_http, is_temp));
-
- ++(mCurRegionStats->mRequests[int(eac)].mDequeued);
+ mRegionHandle = region_handle;
}
-void
-LLViewerAssetStats::recordGetServiced(LLViewerAssetType::EType at, bool with_http, bool is_temp, duration_t duration)
+void LLViewerAssetStats::getStats(AssetStats& stats, bool compact_output)
{
- const EViewerAssetCategories eac(asset_type_to_category(at, with_http, is_temp));
+ using namespace LLViewerAssetStatsFF;
- mCurRegionStats->mRequests[int(eac)].mResponse.record(duration);
-}
+ stats.regions.setProvided();
+
+ for (PerRegionRecordingContainer::iterator it = mRegionRecordings.begin(), end_it = mRegionRecordings.end();
+ it != end_it;
+ ++it)
+ {
+ RegionStats& r = stats.regions.add();
+ LLTrace::Recording& rec = it->second;
+ if (!compact_output
+ || rec.getSum(*sEnqueued[EVACTextureTempHTTPGet])
+ || rec.getSum(*sDequeued[EVACTextureTempHTTPGet])
+ || rec.getSum(*sResponse[EVACTextureTempHTTPGet]).value())
+ {
+ r.get_texture_temp_http .enqueued((S32)rec.getSum(*sEnqueued[EVACTextureTempHTTPGet]))
+ .dequeued((S32)rec.getSum(*sDequeued[EVACTextureTempHTTPGet]))
+ .resp_count((S32)rec.getSum(*sResponse[EVACTextureTempHTTPGet]).value())
+ .resp_min(rec.getMin(*sResponse[EVACTextureTempHTTPGet]).value())
+ .resp_max(rec.getMax(*sResponse[EVACTextureTempHTTPGet]).value())
+ .resp_mean(rec.getMean(*sResponse[EVACTextureTempHTTPGet]).value());
+ }
+ if (!compact_output
+ || rec.getSum(*sEnqueued[EVACTextureTempUDPGet])
+ || rec.getSum(*sDequeued[EVACTextureTempUDPGet])
+ || rec.getSum(*sResponse[EVACTextureTempUDPGet]).value())
+ {
+ r.get_texture_temp_udp .enqueued((S32)rec.getSum(*sEnqueued[EVACTextureTempUDPGet]))
+ .dequeued((S32)rec.getSum(*sDequeued[EVACTextureTempUDPGet]))
+ .resp_count((S32)rec.getSum(*sResponse[EVACTextureTempUDPGet]).value())
+ .resp_min(rec.getMin(*sResponse[EVACTextureTempUDPGet]).value())
+ .resp_max(rec.getMax(*sResponse[EVACTextureTempUDPGet]).value())
+ .resp_mean(rec.getMean(*sResponse[EVACTextureTempUDPGet]).value());
+ }
+ if (!compact_output
+ || rec.getSum(*sEnqueued[EVACTextureNonTempHTTPGet])
+ || rec.getSum(*sDequeued[EVACTextureNonTempHTTPGet])
+ || rec.getSum(*sResponse[EVACTextureNonTempHTTPGet]).value())
+ {
+ r.get_texture_non_temp_http .enqueued((S32)rec.getSum(*sEnqueued[EVACTextureNonTempHTTPGet]))
+ .dequeued((S32)rec.getSum(*sDequeued[EVACTextureNonTempHTTPGet]))
+ .resp_count((S32)rec.getSum(*sResponse[EVACTextureNonTempHTTPGet]).value())
+ .resp_min(rec.getMin(*sResponse[EVACTextureNonTempHTTPGet]).value())
+ .resp_max(rec.getMax(*sResponse[EVACTextureNonTempHTTPGet]).value())
+ .resp_mean(rec.getMean(*sResponse[EVACTextureNonTempHTTPGet]).value());
+ }
-void
-LLViewerAssetStats::recordFPS(F32 fps)
-{
- mCurRegionStats->mFPS.record(fps);
-}
+ if (!compact_output
+ || rec.getSum(*sEnqueued[EVACTextureNonTempUDPGet])
+ || rec.getSum(*sDequeued[EVACTextureNonTempUDPGet])
+ || rec.getSum(*sResponse[EVACTextureNonTempUDPGet]).value())
+ {
+ r.get_texture_non_temp_udp .enqueued((S32)rec.getSum(*sEnqueued[EVACTextureNonTempUDPGet]))
+ .dequeued((S32)rec.getSum(*sDequeued[EVACTextureNonTempUDPGet]))
+ .resp_count((S32)rec.getSum(*sResponse[EVACTextureNonTempUDPGet]).value())
+ .resp_min(rec.getMin(*sResponse[EVACTextureNonTempUDPGet]).value())
+ .resp_max(rec.getMax(*sResponse[EVACTextureNonTempUDPGet]).value())
+ .resp_mean(rec.getMean(*sResponse[EVACTextureNonTempUDPGet]).value());
+ }
-LLSD
-LLViewerAssetStats::asLLSD(bool compact_output)
-{
- // Top-level tags
- static const LLSD::String tags[EVACCount] =
+ if (!compact_output
+ || rec.getSum(*sEnqueued[EVACWearableUDPGet])
+ || rec.getSum(*sDequeued[EVACWearableUDPGet])
+ || rec.getSum(*sResponse[EVACWearableUDPGet]).value())
{
- LLSD::String("get_texture_temp_http"),
- LLSD::String("get_texture_temp_udp"),
- LLSD::String("get_texture_non_temp_http"),
- LLSD::String("get_texture_non_temp_udp"),
- LLSD::String("get_wearable_udp"),
- LLSD::String("get_sound_udp"),
- LLSD::String("get_gesture_udp"),
- LLSD::String("get_other")
- };
+ r.get_wearable_udp .enqueued((S32)rec.getSum(*sEnqueued[EVACWearableUDPGet]))
+ .dequeued((S32)rec.getSum(*sDequeued[EVACWearableUDPGet]))
+ .resp_count((S32)rec.getSum(*sResponse[EVACWearableUDPGet]).value())
+ .resp_min(rec.getMin(*sResponse[EVACWearableUDPGet]).value())
+ .resp_max(rec.getMax(*sResponse[EVACWearableUDPGet]).value())
+ .resp_mean(rec.getMean(*sResponse[EVACWearableUDPGet]).value());
+ }
- // Stats Group Sub-tags.
- static const LLSD::String enq_tag("enqueued");
- static const LLSD::String deq_tag("dequeued");
- static const LLSD::String rcnt_tag("resp_count");
- static const LLSD::String rmin_tag("resp_min");
- static const LLSD::String rmax_tag("resp_max");
- static const LLSD::String rmean_tag("resp_mean");
-
- // MMM Group Sub-tags.
- static const LLSD::String cnt_tag("count");
- static const LLSD::String min_tag("min");
- static const LLSD::String max_tag("max");
- static const LLSD::String mean_tag("mean");
-
- const duration_t now = LLViewerAssetStatsFF::get_timestamp();
- mCurRegionStats->accumulateTime(now);
-
- LLSD regions = LLSD::emptyArray();
- for (PerRegionContainer::iterator it = mRegionStats.begin();
- mRegionStats.end() != it;
- ++it)
- {
- if (0 == it->first)
+ if (!compact_output
+ || rec.getSum(*sEnqueued[EVACSoundUDPGet])
+ || rec.getSum(*sDequeued[EVACSoundUDPGet])
+ || rec.getSum(*sResponse[EVACSoundUDPGet]).value())
{
- // Never emit NULL UUID/handle in results.
- continue;
+ r.get_sound_udp .enqueued((S32)rec.getSum(*sEnqueued[EVACSoundUDPGet]))
+ .dequeued((S32)rec.getSum(*sDequeued[EVACSoundUDPGet]))
+ .resp_count((S32)rec.getSum(*sResponse[EVACSoundUDPGet]).value())
+ .resp_min(rec.getMin(*sResponse[EVACSoundUDPGet]).value())
+ .resp_max(rec.getMax(*sResponse[EVACSoundUDPGet]).value())
+ .resp_mean(rec.getMean(*sResponse[EVACSoundUDPGet]).value());
}
- PerRegionStats & stats = *it->second;
-
- LLSD reg_stat = LLSD::emptyMap();
-
- for (int i = 0; i < LL_ARRAY_SIZE(tags); ++i)
+ if (!compact_output
+ || rec.getSum(*sEnqueued[EVACGestureUDPGet])
+ || rec.getSum(*sDequeued[EVACGestureUDPGet])
+ || rec.getSum(*sResponse[EVACGestureUDPGet]).value())
{
- PerRegionStats::prs_group & group(stats.mRequests[i]);
+ r.get_gesture_udp .enqueued((S32)rec.getSum(*sEnqueued[EVACGestureUDPGet]))
+ .dequeued((S32)rec.getSum(*sDequeued[EVACGestureUDPGet]))
+ .resp_count((S32)rec.getSum(*sResponse[EVACGestureUDPGet]).value())
+ .resp_min(rec.getMin(*sResponse[EVACGestureUDPGet]).value())
+ .resp_max(rec.getMax(*sResponse[EVACGestureUDPGet]).value())
+ .resp_mean(rec.getMean(*sResponse[EVACGestureUDPGet]).value());
+ }
- if ((! compact_output) ||
- group.mEnqueued.getCount() ||
- group.mDequeued.getCount() ||
- group.mResponse.getCount())
+ if (!compact_output
+ || rec.getSum(*sEnqueued[EVACOtherGet])
+ || rec.getSum(*sDequeued[EVACOtherGet])
+ || rec.getSum(*sResponse[EVACOtherGet]).value())
{
- LLSD & slot = reg_stat[tags[i]];
- slot = LLSD::emptyMap();
- slot[enq_tag] = LLSD(S32(stats.mRequests[i].mEnqueued.getCount()));
- slot[deq_tag] = LLSD(S32(stats.mRequests[i].mDequeued.getCount()));
- slot[rcnt_tag] = LLSD(S32(stats.mRequests[i].mResponse.getCount()));
- slot[rmin_tag] = LLSD(F64(stats.mRequests[i].mResponse.getMin() * 1.0e-6));
- slot[rmax_tag] = LLSD(F64(stats.mRequests[i].mResponse.getMax() * 1.0e-6));
- slot[rmean_tag] = LLSD(F64(stats.mRequests[i].mResponse.getMean() * 1.0e-6));
- }
+ r.get_other .enqueued((S32)rec.getSum(*sEnqueued[EVACOtherGet]))
+ .dequeued((S32)rec.getSum(*sDequeued[EVACOtherGet]))
+ .resp_count((S32)rec.getSum(*sResponse[EVACOtherGet]).value())
+ .resp_min(rec.getMin(*sResponse[EVACOtherGet]).value())
+ .resp_max(rec.getMax(*sResponse[EVACOtherGet]).value())
+ .resp_mean(rec.getMean(*sResponse[EVACOtherGet]).value());
}
- if ((! compact_output) || stats.mFPS.getCount())
+ S32 fps = (S32)rec.getLastValue(LLStatViewer::FPS_SAMPLE);
+ if (!compact_output || fps != 0)
{
- LLSD & slot = reg_stat["fps"];
- slot = LLSD::emptyMap();
- slot[cnt_tag] = LLSD(S32(stats.mFPS.getCount()));
- slot[min_tag] = LLSD(F64(stats.mFPS.getMin()));
- slot[max_tag] = LLSD(F64(stats.mFPS.getMax()));
- slot[mean_tag] = LLSD(F64(stats.mFPS.getMean()));
+ r.fps .count(fps)
+ .min(rec.getMin(LLStatViewer::FPS_SAMPLE))
+ .max(rec.getMax(LLStatViewer::FPS_SAMPLE))
+ .mean(rec.getMean(LLStatViewer::FPS_SAMPLE));
}
U32 grid_x(0), grid_y(0);
grid_from_region_handle(it->first, &grid_x, &grid_y);
- reg_stat["grid_x"] = LLSD::Integer(grid_x);
- reg_stat["grid_y"] = LLSD::Integer(grid_y);
- reg_stat["duration"] = LLSD::Real(stats.mTotalTime * 1.0e-6);
- regions.append(reg_stat);
+ r .grid_x(grid_x)
+ .grid_y(grid_y)
+ .duration(F64Microseconds(rec.getDuration()).value());
}
- LLSD ret = LLSD::emptyMap();
- ret["regions"] = regions;
- ret["duration"] = LLSD::Real((now - mResetTimestamp) * 1.0e-6);
-
- return ret;
+ stats.duration(mCurRecording ? F64Microseconds(mCurRecording->getDuration()).value() : 0.0);
}
-void
-LLViewerAssetStats::merge(const LLViewerAssetStats & src)
+LLSD LLViewerAssetStats::asLLSD(bool compact_output)
{
- // mRegionHandle, mCurRegionStats and mResetTimestamp are left untouched.
- // Just merge the stats bodies
-
- const PerRegionContainer::const_iterator it_end(src.mRegionStats.end());
- for (PerRegionContainer::const_iterator it(src.mRegionStats.begin()); it_end != it; ++it)
+ LLParamSDParser parser;
+ LLSD sd;
+ AssetStats stats;
+ getStats(stats, compact_output);
+ LLInitParam::predicate_rule_t rule = LLInitParam::default_parse_rules();
+ if (!compact_output)
{
- PerRegionContainer::iterator dst(mRegionStats.find(it->first));
- if (mRegionStats.end() == dst)
- {
- // Destination is missing data, just make a private copy
- mRegionStats[it->first] = new PerRegionStats(*it->second);
- }
- else
- {
- dst->second->merge(*it->second);
- }
+ rule.allow(LLInitParam::EMPTY);
}
+ parser.writeSD(sd, stats, rule);
+ return sd;
}
-
// ------------------------------------------------------
// Global free-function definitions (LLViewerAssetStatsFF namespace)
// ------------------------------------------------------
namespace LLViewerAssetStatsFF
{
-
-//
-// Target thread is elaborated in the function name. This could
-// have been something 'templatey' like specializations iterated
-// over a set of constants but with so few, this is clearer I think.
-//
-// As for the threads themselves... rather than do fine-grained
-// locking as we gather statistics, this code creates a collector
-// for each thread, allocated and run independently. Logging
-// happens at relatively infrequent intervals and at that time
-// the data is sent to a single thread to be aggregated into
-// a single entity with locks, thread safety and other niceties.
-//
-// A particularly fussy implementation would distribute the
-// per-thread pointers across separate cache lines. But that should
-// be beyond current requirements.
-//
-
-// 'main' thread - initial program thread
-
-void
-set_region_main(LLViewerAssetStats::region_handle_t region_handle)
-{
- if (! gViewerAssetStatsMain)
- return;
-
- gViewerAssetStatsMain->setRegion(region_handle);
-}
-
-void
-record_enqueue_main(LLViewerAssetType::EType at, bool with_http, bool is_temp)
-{
- if (! gViewerAssetStatsMain)
- return;
-
- gViewerAssetStatsMain->recordGetEnqueued(at, with_http, is_temp);
-}
-
-void
-record_dequeue_main(LLViewerAssetType::EType at, bool with_http, bool is_temp)
-{
- if (! gViewerAssetStatsMain)
- return;
-
- gViewerAssetStatsMain->recordGetDequeued(at, with_http, is_temp);
-}
-
-void
-record_response_main(LLViewerAssetType::EType at, bool with_http, bool is_temp, LLViewerAssetStats::duration_t duration)
+void set_region(LLViewerAssetStats::region_handle_t region_handle)
{
- if (! gViewerAssetStatsMain)
+ if (! gViewerAssetStats)
return;
- gViewerAssetStatsMain->recordGetServiced(at, with_http, is_temp, duration);
+ gViewerAssetStats->setRegion(region_handle);
}
-void
-record_fps_main(F32 fps)
+void record_enqueue(LLViewerAssetType::EType at, bool with_http, bool is_temp)
{
- if (! gViewerAssetStatsMain)
- return;
-
- gViewerAssetStatsMain->recordFPS(fps);
-}
-
-// 'thread1' - should be for TextureFetch thread
-
-void
-set_region_thread1(LLViewerAssetStats::region_handle_t region_handle)
-{
- if (! gViewerAssetStatsThread1)
- return;
-
- gViewerAssetStatsThread1->setRegion(region_handle);
-}
-
-void
-record_enqueue_thread1(LLViewerAssetType::EType at, bool with_http, bool is_temp)
-{
- if (! gViewerAssetStatsThread1)
- return;
+ const EViewerAssetCategories eac(asset_type_to_category(at, with_http, is_temp));
- gViewerAssetStatsThread1->recordGetEnqueued(at, with_http, is_temp);
+ add(*sEnqueued[int(eac)], 1);
}
-void
-record_dequeue_thread1(LLViewerAssetType::EType at, bool with_http, bool is_temp)
+void record_dequeue(LLViewerAssetType::EType at, bool with_http, bool is_temp)
{
- if (! gViewerAssetStatsThread1)
- return;
+ const EViewerAssetCategories eac(asset_type_to_category(at, with_http, is_temp));
- gViewerAssetStatsThread1->recordGetDequeued(at, with_http, is_temp);
+ add(*sDequeued[int(eac)], 1);
}
-void
-record_response_thread1(LLViewerAssetType::EType at, bool with_http, bool is_temp, LLViewerAssetStats::duration_t duration)
+void record_response(LLViewerAssetType::EType at, bool with_http, bool is_temp, LLViewerAssetStats::duration_t duration)
{
- if (! gViewerAssetStatsThread1)
- return;
+ const EViewerAssetCategories eac(asset_type_to_category(at, with_http, is_temp));
- gViewerAssetStatsThread1->recordGetServiced(at, with_http, is_temp, duration);
+ record(*sResponse[int(eac)], F64Microseconds(duration));
}
-
-void
-init()
+void init()
{
- if (! gViewerAssetStatsMain)
- {
- gViewerAssetStatsMain = new LLViewerAssetStats();
- }
- if (! gViewerAssetStatsThread1)
+ if (! gViewerAssetStats)
{
- gViewerAssetStatsThread1 = new LLViewerAssetStats();
+ gViewerAssetStats = new LLViewerAssetStats();
}
}
void
cleanup()
{
- delete gViewerAssetStatsMain;
- gViewerAssetStatsMain = 0;
-
- delete gViewerAssetStatsThread1;
- gViewerAssetStatsThread1 = 0;
+ delete gViewerAssetStats;
+ gViewerAssetStats = 0;
}
} // namespace LLViewerAssetStatsFF
-// ------------------------------------------------------
-// Local function definitions
-// ------------------------------------------------------
-
-namespace
-{
-LLViewerAssetStats::EViewerAssetCategories
-asset_type_to_category(const LLViewerAssetType::EType at, bool with_http, bool is_temp)
-{
- // For statistical purposes, we divide GETs into several
- // populations of asset fetches:
- // - textures which are de-prioritized in the asset system
- // - wearables (clothing, bodyparts) which directly affect
- // user experiences when they log in
- // - sounds
- // - gestures
- // - everything else.
- //
- llassert_always(50 == LLViewerAssetType::AT_COUNT);
-
- // Multiple asset definitions are floating around so this requires some
- // maintenance and attention.
- static const LLViewerAssetStats::EViewerAssetCategories asset_to_bin_map[LLViewerAssetType::AT_COUNT] =
- {
- LLViewerAssetStats::EVACTextureTempHTTPGet, // (0) AT_TEXTURE
- LLViewerAssetStats::EVACSoundUDPGet, // AT_SOUND
- LLViewerAssetStats::EVACOtherGet, // AT_CALLINGCARD
- LLViewerAssetStats::EVACOtherGet, // AT_LANDMARK
- LLViewerAssetStats::EVACOtherGet, // AT_SCRIPT
- LLViewerAssetStats::EVACWearableUDPGet, // AT_CLOTHING
- LLViewerAssetStats::EVACOtherGet, // AT_OBJECT
- LLViewerAssetStats::EVACOtherGet, // AT_NOTECARD
- LLViewerAssetStats::EVACOtherGet, // AT_CATEGORY
- LLViewerAssetStats::EVACOtherGet, // AT_ROOT_CATEGORY
- LLViewerAssetStats::EVACOtherGet, // (10) AT_LSL_TEXT
- LLViewerAssetStats::EVACOtherGet, // AT_LSL_BYTECODE
- LLViewerAssetStats::EVACOtherGet, // AT_TEXTURE_TGA
- LLViewerAssetStats::EVACWearableUDPGet, // AT_BODYPART
- LLViewerAssetStats::EVACOtherGet, // AT_TRASH
- LLViewerAssetStats::EVACOtherGet, // AT_SNAPSHOT_CATEGORY
- LLViewerAssetStats::EVACOtherGet, // AT_LOST_AND_FOUND
- LLViewerAssetStats::EVACSoundUDPGet, // AT_SOUND_WAV
- LLViewerAssetStats::EVACOtherGet, // AT_IMAGE_TGA
- LLViewerAssetStats::EVACOtherGet, // AT_IMAGE_JPEG
- LLViewerAssetStats::EVACGestureUDPGet, // (20) AT_ANIMATION
- LLViewerAssetStats::EVACGestureUDPGet, // AT_GESTURE
- LLViewerAssetStats::EVACOtherGet, // AT_SIMSTATE
- LLViewerAssetStats::EVACOtherGet, // AT_FAVORITE
- LLViewerAssetStats::EVACOtherGet, // AT_LINK
- LLViewerAssetStats::EVACOtherGet, // AT_LINK_FOLDER
- LLViewerAssetStats::EVACOtherGet, //
- LLViewerAssetStats::EVACOtherGet, //
- LLViewerAssetStats::EVACOtherGet, //
- LLViewerAssetStats::EVACOtherGet, //
- LLViewerAssetStats::EVACOtherGet, // (30)
- LLViewerAssetStats::EVACOtherGet, //
- LLViewerAssetStats::EVACOtherGet, //
- LLViewerAssetStats::EVACOtherGet, //
- LLViewerAssetStats::EVACOtherGet, //
- LLViewerAssetStats::EVACOtherGet, //
- LLViewerAssetStats::EVACOtherGet, //
- LLViewerAssetStats::EVACOtherGet, //
- LLViewerAssetStats::EVACOtherGet, //
- LLViewerAssetStats::EVACOtherGet, //
- LLViewerAssetStats::EVACOtherGet, // (40)
- LLViewerAssetStats::EVACOtherGet, //
- LLViewerAssetStats::EVACOtherGet, //
- LLViewerAssetStats::EVACOtherGet, //
- LLViewerAssetStats::EVACOtherGet, //
- LLViewerAssetStats::EVACOtherGet, //
- LLViewerAssetStats::EVACOtherGet, //
- LLViewerAssetStats::EVACOtherGet, //
- LLViewerAssetStats::EVACOtherGet, //
- LLViewerAssetStats::EVACOtherGet, // AT_MESH
- // (50)
- };
+LLViewerAssetStats::AssetRequestType::AssetRequestType()
+: enqueued("enqueued"),
+ dequeued("dequeued"),
+ resp_count("resp_count"),
+ resp_min("resp_min"),
+ resp_max("resp_max"),
+ resp_mean("resp_mean")
+{}
- if (at < 0 || at >= LLViewerAssetType::AT_COUNT)
- {
- return LLViewerAssetStats::EVACOtherGet;
- }
- LLViewerAssetStats::EViewerAssetCategories ret(asset_to_bin_map[at]);
- if (LLViewerAssetStats::EVACTextureTempHTTPGet == ret)
- {
- // Indexed with [is_temp][with_http]
- static const LLViewerAssetStats::EViewerAssetCategories texture_bin_map[2][2] =
- {
- {
- LLViewerAssetStats::EVACTextureNonTempUDPGet,
- LLViewerAssetStats::EVACTextureNonTempHTTPGet,
- },
- {
- LLViewerAssetStats::EVACTextureTempUDPGet,
- LLViewerAssetStats::EVACTextureTempHTTPGet,
- }
- };
-
- ret = texture_bin_map[is_temp][with_http];
- }
- return ret;
-}
-
-} // anonymous namespace
+LLViewerAssetStats::FPSStats::FPSStats()
+: count("count"),
+ min("min"),
+ max("max"),
+ mean("mean")
+{}
+
+LLViewerAssetStats::RegionStats::RegionStats()
+: get_texture_temp_http("get_texture_temp_http"),
+ get_texture_temp_udp("get_texture_temp_udp"),
+ get_texture_non_temp_http("get_texture_non_temp_http"),
+ get_texture_non_temp_udp("get_texture_non_temp_udp"),
+ get_wearable_udp("get_wearable_udp"),
+ get_sound_udp("get_sound_udp"),
+ get_gesture_udp("get_gesture_udp"),
+ get_other("get_other"),
+ fps("fps"),
+ grid_x("grid_x"),
+ grid_y("grid_y"),
+ duration("duration")
+{}
+
+LLViewerAssetStats::AssetStats::AssetStats()
+: regions("regions"),
+ duration("duration"),
+ session_id("session_id"),
+ agent_id("agent_id"),
+ message("message"),
+ sequence("sequence"),
+ initial("initial"),
+ break_("break")
+{}
diff --git a/indra/newview/llviewerassetstats.h b/indra/newview/llviewerassetstats.h
index e4581d2120..9d425c82fc 100755
--- a/indra/newview/llviewerassetstats.h
+++ b/indra/newview/llviewerassetstats.h
@@ -34,9 +34,10 @@
#include "llrefcount.h"
#include "llviewerassettype.h"
#include "llviewerassetstorage.h"
-#include "llsimplestat.h"
#include "llsd.h"
#include "llvoavatar.h"
+#include "lltrace.h"
+#include "llinitparam.h"
/**
* @class LLViewerAssetStats
@@ -73,29 +74,15 @@
* LLViewerAssetStatsFF is provided for conditional test-and-call
* operations.
*/
-class LLViewerAssetStats
+class LLViewerAssetStats : public LLStopWatchControlsMixin<LLViewerAssetStats>
{
public:
- enum EViewerAssetCategories
- {
- EVACTextureTempHTTPGet, //< Texture GETs - temp/baked, HTTP
- EVACTextureTempUDPGet, //< Texture GETs - temp/baked, UDP
- EVACTextureNonTempHTTPGet, //< Texture GETs - perm, HTTP
- EVACTextureNonTempUDPGet, //< Texture GETs - perm, UDP
- EVACWearableUDPGet, //< Wearable GETs
- EVACSoundUDPGet, //< Sound GETs
- EVACGestureUDPGet, //< Gesture GETs
- EVACOtherGet, //< Other GETs
-
- EVACCount // Must be last
- };
-
/**
* Type for duration and other time values in the metrics. Selected
* for compatibility with the pre-existing timestamp on the texture
* fetcher class, LLTextureFetch.
*/
- typedef U64 duration_t;
+ typedef U64Microseconds duration_t;
/**
* Type for the region identifier used in stats. Currently uses
@@ -104,64 +91,65 @@ public:
*/
typedef U64 region_handle_t;
- /**
- * @brief Collected data for a single region visited by the avatar.
- *
- * Fairly simple, for each asset bin enumerated above a count
- * of enqueue and dequeue operations and simple stats on response
- * times for completed requests.
- */
- class PerRegionStats : public LLRefCount
+ struct AssetRequestType : public LLInitParam::Block<AssetRequestType>
{
- public:
- PerRegionStats(const region_handle_t region_handle)
- : LLRefCount(),
- mRegionHandle(region_handle)
- {
- reset();
- }
-
- PerRegionStats(const PerRegionStats & src)
- : LLRefCount(),
- mRegionHandle(src.mRegionHandle),
- mTotalTime(src.mTotalTime),
- mStartTimestamp(src.mStartTimestamp),
- mFPS(src.mFPS)
+ Mandatory<S32> enqueued,
+ dequeued,
+ resp_count;
+ Mandatory<F64> resp_min,
+ resp_max,
+ resp_mean;
+
+ AssetRequestType();
+ };
+
+ struct FPSStats : public LLInitParam::Block<FPSStats>
{
- for (int i = 0; i < LL_ARRAY_SIZE(mRequests); ++i)
- {
- mRequests[i] = src.mRequests[i];
- }
- }
+ Mandatory<S32> count;
+ Mandatory<F64> min,
+ max,
+ mean;
+ FPSStats();
+ };
- // Default assignment and destructor are correct.
+ struct RegionStats : public LLInitParam::Block<RegionStats>
+ {
+ Optional<AssetRequestType> get_texture_temp_http,
+ get_texture_temp_udp,
+ get_texture_non_temp_http,
+ get_texture_non_temp_udp,
+ get_wearable_udp,
+ get_sound_udp,
+ get_gesture_udp,
+ get_other;
+ Optional<FPSStats> fps;
+ Optional<S32> grid_x,
+ grid_y;
+ Optional<F64> duration;
+
+ RegionStats();
+ };
- void reset();
-
- void merge(const PerRegionStats & src);
+ struct AssetStats : public LLInitParam::Block<AssetStats>
+ {
+ Multiple<RegionStats> regions;
+ Mandatory<F64> duration;
- // Apply current running time to total and reset start point.
- // Return current timestamp as a convenience.
- void accumulateTime(duration_t now);
+ Mandatory<LLUUID> session_id,
+ agent_id;
- public:
- region_handle_t mRegionHandle;
- duration_t mTotalTime;
- duration_t mStartTimestamp;
- LLSimpleStatMMM<> mFPS;
+ Mandatory<std::string> message;
+ Mandatory<S32> sequence;
+ Mandatory<bool> initial,
+ break_;
- struct prs_group
- {
- LLSimpleStatCounter mEnqueued;
- LLSimpleStatCounter mDequeued;
- LLSimpleStatMMM<duration_t> mResponse;
- }
- mRequests [EVACCount];
+ AssetStats();
};
public:
LLViewerAssetStats();
LLViewerAssetStats(const LLViewerAssetStats &);
+
// Default destructor is correct.
LLViewerAssetStats & operator=(const LLViewerAssetStats &); // Not defined
@@ -174,88 +162,28 @@ public:
// collection calls.
void setRegion(region_handle_t region_handle);
- // Asset GET Requests
- void recordGetEnqueued(LLViewerAssetType::EType at, bool with_http, bool is_temp);
- void recordGetDequeued(LLViewerAssetType::EType at, bool with_http, bool is_temp);
- void recordGetServiced(LLViewerAssetType::EType at, bool with_http, bool is_temp, duration_t duration);
-
- // Frames-Per-Second Samples
- void recordFPS(F32 fps);
-
- // Avatar-related statistics
- void recordAvatarStats();
-
- // Merge a source instance into a destination instance. This is
- // conceptually an 'operator+=()' method:
- // - counts are added
- // - minimums are min'd
- // - maximums are max'd
- // - other scalars are ignored ('this' wins)
- //
- void merge(const LLViewerAssetStats & src);
-
// Retrieve current metrics for all visited regions (NULL region UUID/handle excluded)
- // Returned LLSD is structured as follows:
- //
- // &stats_group = {
- // enqueued : int,
- // dequeued : int,
- // resp_count : int,
- // resp_min : float,
- // resp_max : float,
- // resp_mean : float
- // }
- //
- // &mmm_group = {
- // count : int,
- // min : float,
- // max : float,
- // mean : float
- // }
- //
- // {
- // duration: int
- // regions: {
- // $: { // Keys are strings of the region's handle in hex
- // duration: : int,
- // fps: : &mmm_group,
- // get_texture_temp_http : &stats_group,
- // get_texture_temp_udp : &stats_group,
- // get_texture_non_temp_http : &stats_group,
- // get_texture_non_temp_udp : &stats_group,
- // get_wearable_udp : &stats_group,
- // get_sound_udp : &stats_group,
- // get_gesture_udp : &stats_group,
- // get_other : &stats_group
- // }
- // }
- // }
- //
- // @param compact_output If true, omits from conversion any mmm_block
- // or stats_block that would contain all zero data.
- // Useful for transmission when the receiver knows
- // what is expected and will assume zero for missing
- // blocks.
+ // Uses AssetStats structure seen above
+ void getStats(AssetStats& stats, bool compact_output);
LLSD asLLSD(bool compact_output);
protected:
- typedef std::map<region_handle_t, LLPointer<PerRegionStats> > PerRegionContainer;
+ void handleStart();
+ void handleStop();
+ void handleReset();
+
+ typedef std::map<region_handle_t, LLTrace::Recording > PerRegionRecordingContainer;
// Region of the currently-active region. Always valid but may
// be zero after construction or when explicitly set. Unchanged
// by a reset() call.
region_handle_t mRegionHandle;
- // Pointer to metrics collection for currently-active region. Always
- // valid and unchanged after reset() though contents will be changed.
- // Always points to a collection contained in mRegionStats.
- LLPointer<PerRegionStats> mCurRegionStats;
+ // Pointer to metrics collection for currently-active region.
+ LLTrace::Recording* mCurRecording;
// Metrics data for all regions during one collection cycle
- PerRegionContainer mRegionStats;
-
- // Time of last reset
- duration_t mResetTimestamp;
+ PerRegionRecordingContainer mRegionRecordings;
};
@@ -273,12 +201,24 @@ protected:
* - Main: main() program execution thread
* - Thread1: TextureFetch worker thread
*/
-extern LLViewerAssetStats * gViewerAssetStatsMain;
-
-extern LLViewerAssetStats * gViewerAssetStatsThread1;
+extern LLViewerAssetStats * gViewerAssetStats;
namespace LLViewerAssetStatsFF
{
+ enum EViewerAssetCategories
+ {
+ EVACTextureTempHTTPGet, //< Texture GETs - temp/baked, HTTP
+ EVACTextureTempUDPGet, //< Texture GETs - temp/baked, UDP
+ EVACTextureNonTempHTTPGet, //< Texture GETs - perm, HTTP
+ EVACTextureNonTempUDPGet, //< Texture GETs - perm, UDP
+ EVACWearableUDPGet, //< Wearable GETs
+ EVACSoundUDPGet, //< Sound GETs
+ EVACGestureUDPGet, //< Gesture GETs
+ EVACOtherGet, //< Other GETs
+
+ EVACCount // Must be last
+ };
+
/**
* @brief Allocation and deallocation of globals.
*
@@ -303,28 +243,16 @@ inline LLViewerAssetStats::duration_t get_timestamp()
/**
* Region context, event and duration loggers for the Main thread.
*/
-void set_region_main(LLViewerAssetStats::region_handle_t region_handle);
+void set_region(LLViewerAssetStats::region_handle_t region_handle);
-void record_enqueue_main(LLViewerAssetType::EType at, bool with_http, bool is_temp);
+void record_enqueue(LLViewerAssetType::EType at, bool with_http, bool is_temp);
-void record_dequeue_main(LLViewerAssetType::EType at, bool with_http, bool is_temp);
+void record_dequeue(LLViewerAssetType::EType at, bool with_http, bool is_temp);
-void record_response_main(LLViewerAssetType::EType at, bool with_http, bool is_temp,
+void record_response(LLViewerAssetType::EType at, bool with_http, bool is_temp,
LLViewerAssetStats::duration_t duration);
-void record_fps_main(F32 fps);
-
-/**
- * Region context, event and duration loggers for Thread 1.
- */
-void set_region_thread1(LLViewerAssetStats::region_handle_t region_handle);
-
-void record_enqueue_thread1(LLViewerAssetType::EType at, bool with_http, bool is_temp);
-
-void record_dequeue_thread1(LLViewerAssetType::EType at, bool with_http, bool is_temp);
-
-void record_response_thread1(LLViewerAssetType::EType at, bool with_http, bool is_temp,
- LLViewerAssetStats::duration_t duration);
+void record_avatar_stats();
} // namespace LLViewerAssetStatsFF
diff --git a/indra/newview/llviewerassetstorage.cpp b/indra/newview/llviewerassetstorage.cpp
index d042f62830..5fb99ce02f 100755
--- a/indra/newview/llviewerassetstorage.cpp
+++ b/indra/newview/llviewerassetstorage.cpp
@@ -69,15 +69,15 @@ public:
protected:
void recordMetrics()
{
- if (mMetricsStartTime)
+ if (mMetricsStartTime.value())
{
// Okay, it appears this request was used for useful things. Record
// the expected dequeue and duration of request processing.
- LLViewerAssetStatsFF::record_dequeue_main(mType, false, false);
- LLViewerAssetStatsFF::record_response_main(mType, false, false,
+ LLViewerAssetStatsFF::record_dequeue(mType, false, false);
+ LLViewerAssetStatsFF::record_response(mType, false, false,
(LLViewerAssetStatsFF::get_timestamp()
- mMetricsStartTime));
- mMetricsStartTime = 0;
+ mMetricsStartTime = (U32Seconds)0;
}
}
@@ -113,11 +113,11 @@ void LLViewerAssetStorage::storeAssetData(
bool is_priority,
bool store_local,
bool user_waiting,
- F64 timeout)
+ F64Seconds timeout)
{
LLAssetID asset_id = tid.makeAssetID(gAgent.getSecureSessionID());
LL_DEBUGS("AssetStorage") << "LLViewerAssetStorage::storeAssetData (legacy) " << tid << ":" << LLAssetType::lookup(asset_type)
- << " ASSET_ID: " << asset_id << llendl;
+ << " ASSET_ID: " << asset_id << LL_ENDL;
if (mUpstreamHost.isOk())
{
@@ -137,7 +137,7 @@ void LLViewerAssetStorage::storeAssetData(
if (asset_size < 1)
{
// This can happen if there's a bug in our code or if the VFS has been corrupted.
- llwarns << "LLViewerAssetStorage::storeAssetData() Data _should_ already be in the VFS, but it's not! " << asset_id << llendl;
+ LL_WARNS() << "LLViewerAssetStorage::storeAssetData() Data _should_ already be in the VFS, but it's not! " << asset_id << LL_ENDL;
// LLAssetStorage metric: Zero size VFS
reportMetric( asset_id, asset_type, LLStringUtil::null, LLUUID::null, 0, MR_ZERO_SIZE, __FILE__, __LINE__, "The file didn't exist or was zero length (VFS - can't tell which)" );
@@ -174,11 +174,11 @@ void LLViewerAssetStorage::storeAssetData(
if( bytes_read == asset_size )
{
req->mDataSentInFirstPacket = TRUE;
- //llinfos << "LLViewerAssetStorage::createAsset sending data in first packet" << llendl;
+ //LL_INFOS() << "LLViewerAssetStorage::createAsset sending data in first packet" << LL_ENDL;
}
else
{
- llwarns << "Probable corruption in VFS file, aborting store asset data" << llendl;
+ LL_WARNS() << "Probable corruption in VFS file, aborting store asset data" << LL_ENDL;
// LLAssetStorage metric: VFS corrupt - bogus size
reportMetric( asset_id, asset_type, LLStringUtil::null, LLUUID::null, asset_size, MR_VFS_CORRUPTION, __FILE__, __LINE__, "VFS corruption" );
@@ -207,7 +207,7 @@ void LLViewerAssetStorage::storeAssetData(
}
else
{
- llwarns << "AssetStorage: attempt to upload non-existent vfile " << asset_id << ":" << LLAssetType::lookup(asset_type) << llendl;
+ LL_WARNS() << "AssetStorage: attempt to upload non-existent vfile " << asset_id << ":" << LLAssetType::lookup(asset_type) << LL_ENDL;
// LLAssetStorage metric: Zero size VFS
reportMetric( asset_id, asset_type, LLStringUtil::null, LLUUID::null, 0, MR_ZERO_SIZE, __FILE__, __LINE__, "The file didn't exist or was zero length (VFS - can't tell which)" );
if (callback)
@@ -218,7 +218,7 @@ void LLViewerAssetStorage::storeAssetData(
}
else
{
- llwarns << "Attempt to move asset store request upstream w/o valid upstream provider" << llendl;
+ LL_WARNS() << "Attempt to move asset store request upstream w/o valid upstream provider" << LL_ENDL;
// LLAssetStorage metric: Upstream provider dead
reportMetric( asset_id, asset_type, LLStringUtil::null, LLUUID::null, 0, MR_NO_UPSTREAM, __FILE__, __LINE__, "No upstream provider" );
if (callback)
@@ -237,20 +237,20 @@ void LLViewerAssetStorage::storeAssetData(
bool temp_file,
bool is_priority,
bool user_waiting,
- F64 timeout)
+ F64Seconds timeout)
{
if(filename.empty())
{
// LLAssetStorage metric: no filename
reportMetric( LLUUID::null, asset_type, LLStringUtil::null, LLUUID::null, 0, MR_VFS_CORRUPTION, __FILE__, __LINE__, "Filename missing" );
- llerrs << "No filename specified" << llendl;
+ LL_ERRS() << "No filename specified" << LL_ENDL;
return;
}
LLAssetID asset_id = tid.makeAssetID(gAgent.getSecureSessionID());
- LL_DEBUGS("AssetStorage") << "LLViewerAssetStorage::storeAssetData (legacy)" << asset_id << ":" << LLAssetType::lookup(asset_type) << llendl;
+ LL_DEBUGS("AssetStorage") << "LLViewerAssetStorage::storeAssetData (legacy)" << asset_id << ":" << LLAssetType::lookup(asset_type) << LL_ENDL;
- LL_DEBUGS("AssetStorage") << "ASSET_ID: " << asset_id << llendl;
+ LL_DEBUGS("AssetStorage") << "ASSET_ID: " << asset_id << LL_ENDL;
S32 size = 0;
LLFILE* fp = LLFile::fopen(filename, "rb");
@@ -369,17 +369,17 @@ void LLViewerAssetStorage::_queueDataRequest(
tpvf.setAsset(uuid, atype);
tpvf.setCallback(downloadCompleteCallback, req);
- LL_DEBUGS("AssetStorage") << "Starting transfer for " << uuid << llendl;
+ LL_DEBUGS("AssetStorage") << "Starting transfer for " << uuid << LL_ENDL;
LLTransferTargetChannel *ttcp = gTransferManager.getTargetChannel(mUpstreamHost, LLTCT_ASSET);
ttcp->requestTransfer(spa, tpvf, 100.f + (is_priority ? 1.f : 0.f));
- LLViewerAssetStatsFF::record_enqueue_main(atype, false, false);
+ LLViewerAssetStatsFF::record_enqueue(atype, false, false);
}
}
else
{
// uh-oh, we shouldn't have gotten here
- llwarns << "Attempt to move asset data request upstream w/o valid upstream provider" << llendl;
+ LL_WARNS() << "Attempt to move asset data request upstream w/o valid upstream provider" << LL_ENDL;
if (callback)
{
callback(mVFS, uuid, atype, user_data, LL_ERR_CIRCUIT_GONE, LL_EXSTAT_NO_UPSTREAM);
diff --git a/indra/newview/llviewerassetstorage.h b/indra/newview/llviewerassetstorage.h
index ca9b9943fa..6baec647e6 100755
--- a/indra/newview/llviewerassetstorage.h
+++ b/indra/newview/llviewerassetstorage.h
@@ -51,7 +51,7 @@ public:
bool is_priority = false,
bool store_local = false,
bool user_waiting=FALSE,
- F64 timeout=LL_ASSET_STORAGE_TIMEOUT);
+ F64Seconds timeout=LL_ASSET_STORAGE_TIMEOUT);
virtual void storeAssetData(
const std::string& filename,
@@ -62,7 +62,7 @@ public:
bool temp_file = false,
bool is_priority = false,
bool user_waiting=FALSE,
- F64 timeout=LL_ASSET_STORAGE_TIMEOUT);
+ F64Seconds timeout=LL_ASSET_STORAGE_TIMEOUT);
protected:
using LLAssetStorage::_queueDataRequest;
diff --git a/indra/newview/llviewerassettype.h b/indra/newview/llviewerassettype.h
index ec8b822917..9ad8ea7eeb 100755
--- a/indra/newview/llviewerassettype.h
+++ b/indra/newview/llviewerassettype.h
@@ -29,6 +29,7 @@
#include <string>
#include "llassettype.h"
+#include "llui.h" //EDragAndDropType
// This class is similar to llassettype, but contains methods
// only used by the viewer.
diff --git a/indra/newview/llvieweraudio.cpp b/indra/newview/llvieweraudio.cpp
index 826d296117..e27ebe8663 100755
--- a/indra/newview/llvieweraudio.cpp
+++ b/indra/newview/llvieweraudio.cpp
@@ -37,6 +37,7 @@
#include "llviewerwindow.h"
#include "llvoiceclient.h"
#include "llviewermedia.h"
+#include "llviewerregion.h"
#include "llprogressview.h"
#include "llcallbacklist.h"
#include "llstartup.h"
@@ -125,7 +126,7 @@ void LLViewerAudio::startInternetStreamWithAutoFade(std::string streamURI)
break;
default:
- llwarns << "Unknown fading state: " << mFadeState << llendl;
+ LL_WARNS() << "Unknown fading state: " << mFadeState << LL_ENDL;
break;
}
}
@@ -291,7 +292,7 @@ void LLViewerAudio::onTeleportFailed()
if (parcel)
{
mNextStreamURI = parcel->getMusicURL();
- llinfos << "Teleport failed -- setting music stream to " << mNextStreamURI << llendl;
+ LL_INFOS() << "Teleport failed -- setting music stream to " << mNextStreamURI << LL_ENDL;
}
}
mWasPlaying = false;
@@ -309,7 +310,7 @@ void LLViewerAudio::onTeleportFinished(const LLVector3d& pos, const bool& local)
if (parcel)
{
mNextStreamURI = parcel->getMusicURL();
- llinfos << "Intraparcel teleport -- setting music stream to " << mNextStreamURI << llendl;
+ LL_INFOS() << "Intraparcel teleport -- setting music stream to " << mNextStreamURI << LL_ENDL;
}
}
mWasPlaying = false;
@@ -319,7 +320,7 @@ void init_audio()
{
if (!gAudiop)
{
- llwarns << "Failed to create an appropriate Audio Engine" << llendl;
+ LL_WARNS() << "Failed to create an appropriate Audio Engine" << LL_ENDL;
return;
}
LLVector3d lpos_global = gAgentCamera.getCameraPositionGlobal();
diff --git a/indra/newview/llviewercamera.cpp b/indra/newview/llviewercamera.cpp
index b5aa0ac92a..57a0195d23 100755
--- a/indra/newview/llviewercamera.cpp
+++ b/indra/newview/llviewercamera.cpp
@@ -49,11 +49,15 @@
#include "llglheaders.h"
#include "llquaternion.h"
#include "llwindow.h" // getPixelAspectRatio()
+#include "lltracerecording.h"
// System includes
#include <iomanip> // for setprecision
-U32 LLViewerCamera::sCurCameraID = LLViewerCamera::CAMERA_WORLD;
+LLTrace::CountStatHandle<> LLViewerCamera::sVelocityStat("camera_velocity");
+LLTrace::CountStatHandle<> LLViewerCamera::sAngularVelocityStat("camera_angular_velocity");
+
+LLViewerCamera::eCameraID LLViewerCamera::sCurCameraID = LLViewerCamera::CAMERA_WORLD;
//glu pick matrix implementation borrowed from Mesa3D
glh::matrix4f gl_pick_matrix(GLfloat x, GLfloat y, GLfloat width, GLfloat height, GLint* viewport)
@@ -151,7 +155,7 @@ void LLViewerCamera::updateCameraLocation(const LLVector3 &center,
setOriginAndLookAt(origin, up_direction, point_of_interest);
- mVelocityDir = center - last_position ;
+ mVelocityDir = origin - last_position ;
F32 dpos = mVelocityDir.normVec() ;
LLQuaternion rotation;
rotation.shortestArc(last_axis, getAtAxis());
@@ -160,11 +164,11 @@ void LLViewerCamera::updateCameraLocation(const LLVector3 &center,
F32 drot;
rotation.getAngleAxis(&drot, &x, &y, &z);
- mVelocityStat.addValue(dpos);
- mAngularVelocityStat.addValue(drot);
+ add(sVelocityStat, dpos);
+ add(sAngularVelocityStat, drot);
- mAverageSpeed = mVelocityStat.getMeanPerSec() ;
- mAverageAngularSpeed = mAngularVelocityStat.getMeanPerSec() ;
+ mAverageSpeed = LLTrace::get_frame_recording().getPeriodMeanPerSec(sVelocityStat, 50);
+ mAverageAngularSpeed = LLTrace::get_frame_recording().getPeriodMeanPerSec(sAngularVelocityStat);
mCosHalfCameraFOV = cosf(0.5f * getView() * llmax(1.0f, getAspect()));
// update pixel meter ratio using default fov, not modified one
diff --git a/indra/newview/llviewercamera.h b/indra/newview/llviewercamera.h
index b857c7fe89..7b2887d725 100755
--- a/indra/newview/llviewercamera.h
+++ b/indra/newview/llviewercamera.h
@@ -29,10 +29,10 @@
#include "llcamera.h"
#include "llsingleton.h"
-#include "llstat.h"
#include "lltimer.h"
#include "m4math.h"
#include "llcoord.h"
+#include "lltrace.h"
class LLViewerObject;
@@ -80,7 +80,7 @@ public:
NUM_CAMERAS
} eCameraID;
- static U32 sCurCameraID;
+ static eCameraID sCurCameraID;
LLViewerCamera();
@@ -100,9 +100,9 @@ public:
BOOL projectPosAgentToScreen(const LLVector3 &pos_agent, LLCoordGL &out_point, const BOOL clamp = TRUE) const;
BOOL projectPosAgentToScreenEdge(const LLVector3 &pos_agent, LLCoordGL &out_point) const;
- const LLVector3* getVelocityDir() const {return &mVelocityDir;}
- LLStat *getVelocityStat() { return &mVelocityStat; }
- LLStat *getAngularVelocityStat() { return &mAngularVelocityStat; }
+ LLVector3 getVelocityDir() const {return mVelocityDir;}
+ static LLTrace::CountStatHandle<>* getVelocityStat() {return &sVelocityStat; }
+ static LLTrace::CountStatHandle<>* getAngularVelocityStat() {return &sAngularVelocityStat; }
F32 getCosHalfFov() {return mCosHalfCameraFOV;}
F32 getAverageSpeed() {return mAverageSpeed ;}
F32 getAverageAngularSpeed() {return mAverageAngularSpeed;}
@@ -117,9 +117,9 @@ public:
F32 getDefaultFOV() { return mCameraFOVDefault; }
BOOL cameraUnderWater() const;
+ BOOL areVertsVisible(LLViewerObject* volumep, BOOL all_verts);
const LLVector3 &getPointOfInterest() { return mLastPointOfInterest; }
- BOOL areVertsVisible(LLViewerObject* volumep, BOOL all_verts);
F32 getPixelMeterRatio() const { return mPixelMeterRatio; }
S32 getScreenPixelArea() const { return mScreenPixelArea; }
@@ -130,12 +130,12 @@ public:
protected:
void calcProjection(const F32 far_distance) const;
- LLStat mVelocityStat;
- LLStat mAngularVelocityStat;
+ static LLTrace::CountStatHandle<> sVelocityStat;
+ static LLTrace::CountStatHandle<> sAngularVelocityStat;
+
LLVector3 mVelocityDir ;
F32 mAverageSpeed ;
F32 mAverageAngularSpeed ;
-
mutable LLMatrix4 mProjectionMatrix; // Cache of perspective matrix
mutable LLMatrix4 mModelviewMatrix;
F32 mCameraFOVDefault;
diff --git a/indra/newview/llviewerchat.cpp b/indra/newview/llviewerchat.cpp
index 93687dbd5f..1c3c547bc1 100755
--- a/indra/newview/llviewerchat.cpp
+++ b/indra/newview/llviewerchat.cpp
@@ -241,7 +241,7 @@ std::string LLViewerChat::getSenderSLURL(const LLChat& chat, const LLSD& args)
return getObjectImSLURL(chat, args);
default:
- llwarns << "Getting SLURL for an unsupported sender type: " << chat.mSourceType << llendl;
+ LL_WARNS() << "Getting SLURL for an unsupported sender type: " << chat.mSourceType << LL_ENDL;
}
return LLStringUtil::null;
diff --git a/indra/newview/llviewercontrol.cpp b/indra/newview/llviewercontrol.cpp
index 744ec4de2b..70d3fc9462 100755
--- a/indra/newview/llviewercontrol.cpp
+++ b/indra/newview/llviewercontrol.cpp
@@ -264,7 +264,7 @@ static bool handleGammaChanged(const LLSD& newvalue)
// Only save it if it's changed
if (!gViewerWindow->getWindow()->setGamma(gamma))
{
- llwarns << "setGamma failed!" << llendl;
+ LL_WARNS() << "setGamma failed!" << LL_ENDL;
}
}
@@ -289,7 +289,7 @@ static bool handleMaxPartCountChanged(const LLSD& newvalue)
static bool handleVideoMemoryChanged(const LLSD& newvalue)
{
- gTextureList.updateMaxResidentTexMem(newvalue.asInteger());
+ gTextureList.updateMaxResidentTexMem(S32Megabytes(newvalue.asInteger()));
return true;
}
@@ -499,7 +499,7 @@ bool handleVelocityInterpolate(const LLSD& newvalue)
msg->addUUIDFast(_PREHASH_AgentID, gAgent.getID());
msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID());
gAgent.sendReliableMessage();
- llinfos << "Velocity Interpolation On" << llendl;
+ LL_INFOS() << "Velocity Interpolation On" << LL_ENDL;
}
else
{
@@ -508,7 +508,7 @@ bool handleVelocityInterpolate(const LLSD& newvalue)
msg->addUUIDFast(_PREHASH_AgentID, gAgent.getID());
msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID());
gAgent.sendReliableMessage();
- llinfos << "Velocity Interpolation Off" << llendl;
+ LL_INFOS() << "Velocity Interpolation Off" << LL_ENDL;
}
return true;
}
@@ -785,13 +785,13 @@ static LLCachedControl<std::string> test_BrowserHomePage("BrowserHomePage", "hah
void test_cached_control()
{
-#define do { TEST_LLCC(T, V) if((T)mySetting_##T != V) llerrs << "Fail "#T << llendl; } while(0)
+#define do { TEST_LLCC(T, V) if((T)mySetting_##T != V) LL_ERRS() << "Fail "#T << LL_ENDL; } while(0)
TEST_LLCC(U32, 666);
TEST_LLCC(S32, (S32)-666);
TEST_LLCC(F32, (F32)-666.666);
TEST_LLCC(bool, true);
TEST_LLCC(BOOL, FALSE);
- if((std::string)mySetting_string != "Default String Value") llerrs << "Fail string" << llendl;
+ if((std::string)mySetting_string != "Default String Value") LL_ERRS() << "Fail string" << LL_ENDL;
TEST_LLCC(LLVector3, LLVector3(1.0f, 2.0f, 3.0f));
TEST_LLCC(LLVector3d, LLVector3d(6.0f, 5.0f, 4.0f));
TEST_LLCC(LLRect, LLRect(0, 0, 100, 500));
@@ -800,7 +800,7 @@ void test_cached_control()
TEST_LLCC(LLColor4U, LLColor4U(255, 200, 100, 255));
//There's no LLSD comparsion for LLCC yet. TEST_LLCC(LLSD, test_llsd);
- if((std::string)test_BrowserHomePage != "http://www.secondlife.com") llerrs << "Fail BrowserHomePage" << llendl;
+ if((std::string)test_BrowserHomePage != "http://www.secondlife.com") LL_ERRS() << "Fail BrowserHomePage" << LL_ENDL;
}
#endif // TEST_CACHED_CONTROL
diff --git a/indra/newview/llviewerdisplay.cpp b/indra/newview/llviewerdisplay.cpp
index bbebeea3e0..981e4c40aa 100755
--- a/indra/newview/llviewerdisplay.cpp
+++ b/indra/newview/llviewerdisplay.cpp
@@ -77,6 +77,7 @@
#include "llwlparammanager.h"
#include "llwaterparammanager.h"
#include "llpostprocess.h"
+#include "llscenemonitor.h"
extern LLPointer<LLViewerTexture> gStartTexture;
extern bool gShiftFrame;
@@ -84,9 +85,6 @@ extern bool gShiftFrame;
LLPointer<LLViewerTexture> gDisconnectedImagep = NULL;
// used to toggle renderer back on after teleport
-const F32 TELEPORT_RENDER_DELAY = 20.f; // Max time a teleport is allowed to take before we raise the curtain
-const F32 TELEPORT_ARRIVAL_DELAY = 2.f; // Time to preload the world before raising the curtain after we've actually already arrived.
-const F32 TELEPORT_LOCAL_DELAY = 1.0f; // Delay to prevent teleports after starting an in-sim teleport.
BOOL gTeleportDisplay = FALSE;
LLFrameTimer gTeleportDisplayTimer;
LLFrameTimer gTeleportArrivalTimer;
@@ -100,6 +98,11 @@ BOOL gWindowResized = FALSE;
BOOL gSnapshot = FALSE;
BOOL gShaderProfileFrame = FALSE;
+// This is how long the sim will try to teleport you before giving up.
+const F32 TELEPORT_EXPIRY = 15.0f;
+// Additional time (in seconds) to wait per attachment
+const F32 TELEPORT_EXPIRY_PER_ATTACHMENT = 3.f;
+
U32 gRecentFrameCount = 0; // number of 'recent' frames
LLFrameTimer gRecentFPSTime;
LLFrameTimer gRecentMemoryTime;
@@ -108,6 +111,7 @@ LLFrameTimer gRecentMemoryTime;
void pre_show_depth_buffer();
void post_show_depth_buffer();
void render_ui(F32 zoom_factor = 1.f, int subfield = 0);
+void swap();
void render_hud_attachments();
void render_ui_3d();
void render_ui_2d();
@@ -133,7 +137,7 @@ void display_startup()
//
if (!LLViewerFetchedTexture::sWhiteImagep.isNull())
{
- LLTexUnit::sWhiteTexture = LLViewerFetchedTexture::sWhiteImagep->getTexName();
+ LLTexUnit::sWhiteTexture = LLViewerFetchedTexture::sWhiteImagep->getTexName();
}
LLGLSDefault gls_default;
@@ -176,11 +180,11 @@ void display_startup()
glClear(GL_DEPTH_BUFFER_BIT);
}
-static LLFastTimer::DeclareTimer FTM_UPDATE_CAMERA("Update Camera");
+static LLTrace::BlockTimerStatHandle FTM_UPDATE_CAMERA("Update Camera");
void display_update_camera()
{
- LLFastTimer t(FTM_UPDATE_CAMERA);
+ LL_RECORD_BLOCK_TIME(FTM_UPDATE_CAMERA);
// TODO: cut draw distance down if customizing avatar?
// TODO: cut draw distance on per-parcel basis?
@@ -202,51 +206,51 @@ void display_update_camera()
LLWorld::getInstance()->setLandFarClip(final_far);
}
-// Write some stats to llinfos
+// Write some stats to LL_INFOS()
void display_stats()
{
F32 fps_log_freq = gSavedSettings.getF32("FPSLogFrequency");
if (fps_log_freq > 0.f && gRecentFPSTime.getElapsedTimeF32() >= fps_log_freq)
{
F32 fps = gRecentFrameCount / fps_log_freq;
- llinfos << llformat("FPS: %.02f", fps) << llendl;
+ LL_INFOS() << llformat("FPS: %.02f", fps) << LL_ENDL;
gRecentFrameCount = 0;
gRecentFPSTime.reset();
}
F32 mem_log_freq = gSavedSettings.getF32("MemoryLogFrequency");
if (mem_log_freq > 0.f && gRecentMemoryTime.getElapsedTimeF32() >= mem_log_freq)
{
- gMemoryAllocated = LLMemory::getCurrentRSS();
- U32 memory = (U32)(gMemoryAllocated / (1024*1024));
- llinfos << llformat("MEMORY: %d MB", memory) << llendl;
+ gMemoryAllocated = (U64Bytes)LLMemory::getCurrentRSS();
+ U32Megabytes memory = gMemoryAllocated;
+ LL_INFOS() << llformat("MEMORY: %d MB", memory.value()) << LL_ENDL;
LLMemory::logMemoryInfo(TRUE) ;
gRecentMemoryTime.reset();
}
}
-static LLFastTimer::DeclareTimer FTM_PICK("Picking");
-static LLFastTimer::DeclareTimer FTM_RENDER("Render", true);
-static LLFastTimer::DeclareTimer FTM_UPDATE_SKY("Update Sky");
-static LLFastTimer::DeclareTimer FTM_UPDATE_TEXTURES("Update Textures");
-static LLFastTimer::DeclareTimer FTM_IMAGE_UPDATE("Update Images");
-static LLFastTimer::DeclareTimer FTM_IMAGE_UPDATE_CLASS("Class");
-static LLFastTimer::DeclareTimer FTM_IMAGE_UPDATE_BUMP("Image Update Bump");
-static LLFastTimer::DeclareTimer FTM_IMAGE_UPDATE_LIST("List");
-static LLFastTimer::DeclareTimer FTM_IMAGE_UPDATE_DELETE("Delete");
-static LLFastTimer::DeclareTimer FTM_RESIZE_WINDOW("Resize Window");
-static LLFastTimer::DeclareTimer FTM_HUD_UPDATE("HUD Update");
-static LLFastTimer::DeclareTimer FTM_DISPLAY_UPDATE_GEOM("Update Geom");
-static LLFastTimer::DeclareTimer FTM_TEXTURE_UNBIND("Texture Unbind");
-static LLFastTimer::DeclareTimer FTM_TELEPORT_DISPLAY("Teleport Display");
+static LLTrace::BlockTimerStatHandle FTM_PICK("Picking");
+static LLTrace::BlockTimerStatHandle FTM_RENDER("Render");
+static LLTrace::BlockTimerStatHandle FTM_UPDATE_SKY("Update Sky");
+static LLTrace::BlockTimerStatHandle FTM_UPDATE_DYNAMIC_TEXTURES("Update Dynamic Textures");
+static LLTrace::BlockTimerStatHandle FTM_IMAGE_UPDATE("Update Images");
+static LLTrace::BlockTimerStatHandle FTM_IMAGE_UPDATE_CLASS("Class");
+static LLTrace::BlockTimerStatHandle FTM_IMAGE_UPDATE_BUMP("Image Update Bump");
+static LLTrace::BlockTimerStatHandle FTM_IMAGE_UPDATE_LIST("List");
+static LLTrace::BlockTimerStatHandle FTM_IMAGE_UPDATE_DELETE("Delete");
+static LLTrace::BlockTimerStatHandle FTM_RESIZE_WINDOW("Resize Window");
+static LLTrace::BlockTimerStatHandle FTM_HUD_UPDATE("HUD Update");
+static LLTrace::BlockTimerStatHandle FTM_DISPLAY_UPDATE_GEOM("Update Geom");
+static LLTrace::BlockTimerStatHandle FTM_TEXTURE_UNBIND("Texture Unbind");
+static LLTrace::BlockTimerStatHandle FTM_TELEPORT_DISPLAY("Teleport Display");
// Paint the display!
void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot)
{
- LLFastTimer t(FTM_RENDER);
+ LL_RECORD_BLOCK_TIME(FTM_RENDER);
if (gWindowResized)
{ //skip render on frames where window has been resized
- LLFastTimer t(FTM_RESIZE_WINDOW);
+ LL_RECORD_BLOCK_TIME(FTM_RESIZE_WINDOW);
gGL.flush();
glClear(GL_COLOR_BUFFER_BIT);
gViewerWindow->getWindow()->swapBuffers();
@@ -310,7 +314,7 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot)
gViewerWindow->checkSettings();
{
- LLFastTimer ftm(FTM_PICK);
+ LL_RECORD_BLOCK_TIME(FTM_PICK);
LLAppViewer::instance()->pingMainloopTimeout("Display:Pick");
gViewerWindow->performPick();
}
@@ -346,7 +350,7 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot)
// Bail out if we're in the startup state and don't want to try to
// render the world.
//
- if (LLStartUp::getStartupState() < STATE_STARTED)
+ if (LLStartUp::getStartupState() < STATE_PRECACHE)
{
LLAppViewer::instance()->pingMainloopTimeout("Display:Startup");
display_startup();
@@ -389,9 +393,10 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot)
if (gTeleportDisplay)
{
- LLFastTimer t(FTM_TELEPORT_DISPLAY);
+ LL_RECORD_BLOCK_TIME(FTM_TELEPORT_DISPLAY);
LLAppViewer::instance()->pingMainloopTimeout("Display:Teleport");
- const F32 TELEPORT_ARRIVAL_DELAY = 2.f; // Time to preload the world before raising the curtain after we've actually already arrived.
+ static LLCachedControl<F32> teleport_arrival_delay(gSavedSettings, "TeleportArrivalDelay");
+ static LLCachedControl<F32> teleport_local_delay(gSavedSettings, "TeleportLocalDelay");
S32 attach_count = 0;
if (isAgentAvatarValid())
@@ -459,7 +464,7 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot)
case LLAgent::TELEPORT_ARRIVING:
// Make the user wait while content "pre-caches"
{
- F32 arrival_fraction = (gTeleportArrivalTimer.getElapsedTimeF32() / TELEPORT_ARRIVAL_DELAY);
+ F32 arrival_fraction = (gTeleportArrivalTimer.getElapsedTimeF32() / teleport_arrival_delay());
if( arrival_fraction > 1.f )
{
arrival_fraction = 1.f;
@@ -476,7 +481,7 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot)
// Short delay when teleporting in the same sim (progress screen active but not shown - did not
// fall-through from TELEPORT_START)
{
- if( gTeleportDisplayTimer.getElapsedTimeF32() > TELEPORT_LOCAL_DELAY )
+ if( gTeleportDisplayTimer.getElapsedTimeF32() > teleport_local_delay() )
{
//LLFirstUse::useTeleport();
gAgent.setTeleportState( LLAgent::TELEPORT_NONE );
@@ -554,6 +559,7 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot)
{
LLAppViewer::instance()->pingMainloopTimeout("Display:Disconnected");
render_ui();
+ swap();
}
//////////////////////////
@@ -584,7 +590,7 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot)
if (gPipeline.hasRenderDebugFeatureMask(LLPipeline::RENDER_DEBUG_FEATURE_DYNAMIC_TEXTURES))
{
LLAppViewer::instance()->pingMainloopTimeout("Display:DynamicTextures");
- LLFastTimer t(FTM_UPDATE_TEXTURES);
+ LL_RECORD_BLOCK_TIME(FTM_UPDATE_DYNAMIC_TEXTURES);
if (LLViewerDynamicTexture::updateAllInstances())
{
gGL.setColorMask(true, true);
@@ -618,15 +624,15 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot)
// *TODO: merge these two methods
{
- LLFastTimer t(FTM_HUD_UPDATE);
+ LL_RECORD_BLOCK_TIME(FTM_HUD_UPDATE);
LLHUDManager::getInstance()->updateEffects();
LLHUDObject::updateAll();
stop_glerror();
}
{
- LLFastTimer t(FTM_DISPLAY_UPDATE_GEOM);
- const F32 max_geom_update_time = 0.005f*10.f*gFrameIntervalSeconds; // 50 ms/second update time
+ LL_RECORD_BLOCK_TIME(FTM_DISPLAY_UPDATE_GEOM);
+ const F32 max_geom_update_time = 0.005f*10.f*gFrameIntervalSeconds.value(); // 50 ms/second update time
gPipeline.createObjects(max_geom_update_time);
gPipeline.processPartitionQ();
gPipeline.updateGeom(max_geom_update_time);
@@ -764,29 +770,31 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot)
LLAppViewer::instance()->pingMainloopTimeout("Display:UpdateImages");
{
- LLFastTimer t(FTM_IMAGE_UPDATE);
+ LL_RECORD_BLOCK_TIME(FTM_IMAGE_UPDATE);
{
- LLFastTimer t(FTM_IMAGE_UPDATE_CLASS);
- LLViewerTexture::updateClass(LLViewerCamera::getInstance()->getVelocityStat()->getMean(),
- LLViewerCamera::getInstance()->getAngularVelocityStat()->getMean());
+ LL_RECORD_BLOCK_TIME(FTM_IMAGE_UPDATE_CLASS);
+ LLTrace::CountStatHandle<>* velocity_stat = LLViewerCamera::getVelocityStat();
+ LLTrace::CountStatHandle<>* angular_velocity_stat = LLViewerCamera::getAngularVelocityStat();
+ LLViewerTexture::updateClass(LLTrace::get_frame_recording().getPeriodMeanPerSec(*velocity_stat),
+ LLTrace::get_frame_recording().getPeriodMeanPerSec(*angular_velocity_stat));
}
{
- LLFastTimer t(FTM_IMAGE_UPDATE_BUMP);
+ LL_RECORD_BLOCK_TIME(FTM_IMAGE_UPDATE_BUMP);
gBumpImageList.updateImages(); // must be called before gTextureList version so that it's textures are thrown out first.
}
{
- LLFastTimer t(FTM_IMAGE_UPDATE_LIST);
- F32 max_image_decode_time = 0.050f*gFrameIntervalSeconds; // 50 ms/second decode time
+ LL_RECORD_BLOCK_TIME(FTM_IMAGE_UPDATE_LIST);
+ F32 max_image_decode_time = 0.050f*gFrameIntervalSeconds.value(); // 50 ms/second decode time
max_image_decode_time = llclamp(max_image_decode_time, 0.002f, 0.005f ); // min 2ms/frame, max 5ms/frame)
gTextureList.updateImages(max_image_decode_time);
}
/*{
- LLFastTimer t(FTM_IMAGE_UPDATE_DELETE);
+ LL_RECORD_BLOCK_TIME(FTM_IMAGE_UPDATE_DELETE);
//remove dead textures from GL
LLImageGL::deleteDeadTextures();
stop_glerror();
@@ -822,6 +830,8 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot)
}
}
+ LLSceneMonitor::getInstance()->fetchQueryResult();
+
LLGLState::checkStates();
LLGLState::checkClientArrays();
@@ -829,7 +839,7 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot)
{
LLAppViewer::instance()->pingMainloopTimeout("Display:Sky");
- LLFastTimer t(FTM_UPDATE_SKY);
+ LL_RECORD_BLOCK_TIME(FTM_UPDATE_SKY);
gSky.updateSky();
}
@@ -961,7 +971,7 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot)
}
{
- LLFastTimer t(FTM_TEXTURE_UNBIND);
+ LL_RECORD_BLOCK_TIME(FTM_TEXTURE_UNBIND);
for (U32 i = 0; i < gGLManager.mNumTextureImageUnits; i++)
{ //dummy cleanup of any currently bound textures
if (gGL.getTexUnit(i)->getCurrType() != LLTexUnit::TT_NONE)
@@ -1009,11 +1019,17 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot)
LLPipeline::sUnderWaterRender = FALSE;
+ {
+ //capture the frame buffer.
+ LLSceneMonitor::getInstance()->capture();
+ }
+
LLAppViewer::instance()->pingMainloopTimeout("Display:RenderUI");
if (!for_snapshot)
{
- LLFastTimer t(FTM_RENDER_UI);
+ LL_RECORD_BLOCK_TIME(FTM_RENDER_UI);
render_ui();
+ swap();
}
@@ -1059,7 +1075,7 @@ void render_hud_attachments()
// clamp target zoom level to reasonable values
gAgentCamera.mHUDTargetZoom = llclamp(gAgentCamera.mHUDTargetZoom, 0.1f, 1.f);
// smoothly interpolate current zoom level
- gAgentCamera.mHUDCurZoom = lerp(gAgentCamera.mHUDCurZoom, gAgentCamera.mHUDTargetZoom, LLCriticalDamp::getInterpolant(0.03f));
+ gAgentCamera.mHUDCurZoom = lerp(gAgentCamera.mHUDCurZoom, gAgentCamera.mHUDTargetZoom, LLSmoothInterpolation::getInterpolant(0.03f));
if (LLPipeline::sShowHUDAttachments && !gDisconnected && setup_hud_matrices())
{
@@ -1237,8 +1253,6 @@ BOOL setup_hud_matrices(const LLRect& screen_region)
return TRUE;
}
-static LLFastTimer::DeclareTimer FTM_SWAP("Swap");
-
void render_ui(F32 zoom_factor, int subfield)
{
LLGLState::checkStates();
@@ -1252,6 +1266,15 @@ void render_ui(F32 zoom_factor, int subfield)
glh_set_current_modelview(glh_copy_matrix(gGLLastModelView));
}
+ if(LLSceneMonitor::getInstance()->needsUpdate())
+ {
+ gGL.pushMatrix();
+ gViewerWindow->setup2DRender();
+ LLSceneMonitor::getInstance()->compare();
+ gViewerWindow->setup3DRender();
+ gGL.popMatrix();
+ }
+
{
BOOL to_texture = gPipeline.canUseVertexShaders() &&
LLPipeline::sRenderGlow;
@@ -1275,7 +1298,7 @@ void render_ui(F32 zoom_factor, int subfield)
gGL.color4f(1,1,1,1);
if (gPipeline.hasRenderDebugFeatureMask(LLPipeline::RENDER_DEBUG_FEATURE_UI))
{
- LLFastTimer t(FTM_RENDER_UI);
+ LL_RECORD_BLOCK_TIME(FTM_RENDER_UI);
if (!gDisconnected)
{
@@ -1306,10 +1329,16 @@ void render_ui(F32 zoom_factor, int subfield)
glh_set_current_modelview(saved_view);
gGL.popMatrix();
}
+}
+
+static LLTrace::BlockTimerStatHandle FTM_SWAP("Swap");
+
+void swap()
+{
+ LL_RECORD_BLOCK_TIME(FTM_SWAP);
if (gDisplaySwapBuffers)
{
- LLFastTimer t(FTM_SWAP);
gViewerWindow->getWindow()->swapBuffers();
}
gDisplaySwapBuffers = TRUE;
@@ -1545,7 +1574,7 @@ void render_disconnected_background()
gGL.color4f(1,1,1,1);
if (!gDisconnectedImagep && gDisconnected)
{
- llinfos << "Loading last bitmap..." << llendl;
+ LL_INFOS() << "Loading last bitmap..." << LL_ENDL;
std::string temp_str;
temp_str = gDirUtilp->getLindenUserDir() + gDirUtilp->getDirDelimiter() + SCREEN_LAST_FILENAME;
@@ -1553,14 +1582,14 @@ void render_disconnected_background()
LLPointer<LLImageBMP> image_bmp = new LLImageBMP;
if( !image_bmp->load(temp_str) )
{
- //llinfos << "Bitmap load failed" << llendl;
+ //LL_INFOS() << "Bitmap load failed" << LL_ENDL;
return;
}
LLPointer<LLImageRaw> raw = new LLImageRaw;
if (!image_bmp->decode(raw, 0.0f))
{
- llinfos << "Bitmap decode failed" << llendl;
+ LL_INFOS() << "Bitmap decode failed" << LL_ENDL;
gDisconnectedImagep = NULL;
return;
}
diff --git a/indra/newview/llviewerdisplayname.cpp b/indra/newview/llviewerdisplayname.cpp
index f81206ffec..3d794f0d91 100755
--- a/indra/newview/llviewerdisplayname.cpp
+++ b/indra/newview/llviewerdisplayname.cpp
@@ -62,8 +62,8 @@ public:
// only care about errors
/*virtual*/ void errorWithContent(U32 status, const std::string& reason, const LLSD& content)
{
- llwarns << "LLSetDisplayNameResponder error [status:"
- << status << "]: " << content << llendl;
+ LL_WARNS() << "LLSetDisplayNameResponder error [status:"
+ << status << "]: " << content << LL_ENDL;
LLViewerDisplayName::sSetDisplayNameSignal(false, "", LLSD());
LLViewerDisplayName::sSetDisplayNameSignal.disconnect_all_slots();
}
@@ -103,7 +103,7 @@ void LLViewerDisplayName::set(const std::string& display_name, const set_name_sl
change_array.append(av_name.getDisplayName());
change_array.append(display_name);
- llinfos << "Set name POST to " << cap_url << llendl;
+ LL_INFOS() << "Set name POST to " << cap_url << LL_ENDL;
// Record our caller for when the server sends back a reply
sSetDisplayNameSignal.connect(slot);
@@ -132,7 +132,7 @@ public:
std::string reason = body["reason"].asString();
LLSD content = body["content"];
- llinfos << "status " << status << " reason " << reason << llendl;
+ LL_INFOS() << "status " << status << " reason " << reason << LL_ENDL;
// If viewer's concept of display name is out-of-date, the set request
// will fail with 409 Conflict. If that happens, fetch up-to-date
@@ -173,9 +173,9 @@ class LLDisplayNameUpdate : public LLHTTPNode
LLAvatarName av_name;
av_name.fromLLSD( name_data );
- llinfos << "name-update now " << LLDate::now()
+ LL_INFOS() << "name-update now " << LLDate::now()
<< " next_update " << LLDate(av_name.mNextUpdate)
- << llendl;
+ << LL_ENDL;
// Name expiration time may be provided in headers, or we may use a
// default value
diff --git a/indra/newview/llviewerfloaterreg.cpp b/indra/newview/llviewerfloaterreg.cpp
index a8eeddb798..e427bb1735 100755
--- a/indra/newview/llviewerfloaterreg.cpp
+++ b/indra/newview/llviewerfloaterreg.cpp
@@ -28,66 +28,65 @@
#include "llviewerprecompiledheaders.h"
#include "llfloaterreg.h"
-
#include "llviewerfloaterreg.h"
-#include "llfloaterautoreplacesettings.h"
+
+#include "llcommandhandler.h"
#include "llcompilequeue.h"
#include "llfasttimerview.h"
#include "llfloaterabout.h"
#include "llfloaterauction.h"
+#include "llfloaterautoreplacesettings.h"
#include "llfloateravatar.h"
#include "llfloateravatarpicker.h"
#include "llfloateravatartextures.h"
#include "llfloaterbeacons.h"
#include "llfloaterbuildoptions.h"
+#include "llfloaterbulkpermission.h"
+#include "llfloaterbump.h"
#include "llfloaterbuy.h"
#include "llfloaterbuycontents.h"
#include "llfloaterbuycurrency.h"
#include "llfloaterbuycurrencyhtml.h"
#include "llfloaterbuyland.h"
-#include "llfloaterbulkpermission.h"
-#include "llfloaterbump.h"
#include "llfloaterbvhpreview.h"
#include "llfloatercamera.h"
#include "llfloaterchatvoicevolume.h"
#include "llfloaterconversationlog.h"
#include "llfloaterconversationpreview.h"
#include "llfloaterdeleteenvpreset.h"
+#include "llfloaterdestinations.h"
#include "llfloaterdisplayname.h"
#include "llfloatereditdaycycle.h"
#include "llfloatereditsky.h"
#include "llfloatereditwater.h"
#include "llfloaterenvironmentsettings.h"
#include "llfloaterevent.h"
-#include "llfloaterdestinations.h"
#include "llfloaterfonttest.h"
#include "llfloatergesture.h"
#include "llfloatergodtools.h"
#include "llfloatergroups.h"
#include "llfloaterhardwaresettings.h"
#include "llfloaterhelpbrowser.h"
-#include "llfloaterwebcontent.h"
-#include "llfloaterwebprofile.h"
-#include "llfloatermediasettings.h"
#include "llfloaterhud.h"
#include "llfloaterimagepreview.h"
#include "llfloaterimsession.h"
#include "llfloaterinspect.h"
#include "llfloaterinventory.h"
#include "llfloaterjoystick.h"
-#include "llfloaterlagmeter.h"
#include "llfloaterland.h"
#include "llfloaterlandholdings.h"
#include "llfloatermap.h"
+#include "llfloatermediasettings.h"
#include "llfloatermemleak.h"
+#include "llfloatermodelpreview.h"
#include "llfloaternamedesc.h"
#include "llfloaternotificationsconsole.h"
#include "llfloaterobjectweights.h"
#include "llfloateropenobject.h"
#include "llfloateroutbox.h"
#include "llfloaterpathfindingcharacters.h"
-#include "llfloaterpathfindinglinksets.h"
#include "llfloaterpathfindingconsole.h"
+#include "llfloaterpathfindinglinksets.h"
#include "llfloaterpay.h"
#include "llfloaterperms.h"
#include "llfloaterpostprocess.h"
@@ -97,6 +96,7 @@
#include "llfloaterregioninfo.h"
#include "llfloaterregionrestarting.h"
#include "llfloaterreporter.h"
+#include "llfloatersceneloadstats.h"
#include "llfloaterscriptdebug.h"
#include "llfloaterscriptlimits.h"
#include "llfloatersearch.h"
@@ -112,12 +112,14 @@
#include "llfloatertestlistview.h"
#include "llfloatertexturefetchdebugger.h"
#include "llfloatertools.h"
-#include "llfloatertos.h"
#include "llfloatertopobjects.h"
+#include "llfloatertos.h"
#include "llfloatertoybox.h"
#include "llfloatertranslationsettings.h"
#include "llfloateruipreview.h"
#include "llfloatervoiceeffect.h"
+#include "llfloaterwebcontent.h"
+#include "llfloaterwebprofile.h"
#include "llfloatervoicevolume.h"
#include "llfloaterwhitelistentry.h"
#include "llfloaterwindowsize.h"
@@ -138,10 +140,8 @@
#include "llpreviewscript.h"
#include "llpreviewsound.h"
#include "llpreviewtexture.h"
-#include "llsyswellwindow.h"
#include "llscriptfloater.h"
-#include "llfloatermodelpreview.h"
-#include "llcommandhandler.h"
+#include "llsyswellwindow.h"
// *NOTE: Please add files in alphabetical order to keep merges easy.
@@ -174,7 +174,7 @@ void LLViewerFloaterReg::registerFloaters()
// *NOTE: Please keep these alphabetized for easier merges
LLFloaterAboutUtil::registerFloater();
- LLFloaterReg::add("fast_timers", "floater_fast_timers.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFastTimerView>);
+ LLFloaterReg::add("block_timers", "floater_fast_timers.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFastTimerView>);
LLFloaterReg::add("about_land", "floater_about_land.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterLand>);
LLFloaterReg::add("appearance", "floater_my_appearance.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterSidePanelContainer>);
LLFloaterReg::add("auction", "floater_auction.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterAuction>);
@@ -233,7 +233,6 @@ void LLViewerFloaterReg::registerFloaters()
LLNotificationsUI::registerFloater();
LLFloaterDisplayNameUtil::registerFloater();
- LLFloaterReg::add("lagmeter", "floater_lagmeter.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterLagMeter>);
LLFloaterReg::add("land_holdings", "floater_land_holdings.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterLandHoldings>);
LLFloaterReg::add("mem_leaking", "floater_mem_leaking.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterMemLeak>);
@@ -309,6 +308,7 @@ void LLViewerFloaterReg::registerFloaters()
LLFloaterReg::add("social", "floater_social.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterSocial>);
LLFloaterReg::add("stats", "floater_stats.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloater>);
LLFloaterReg::add("start_queue", "floater_script_queue.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterRunQueue>);
+ LLFloaterReg::add("scene_load_stats", "floater_scene_load_stats.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterSceneLoadStats>);
LLFloaterReg::add("stop_queue", "floater_script_queue.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterNotRunQueue>);
LLFloaterReg::add("snapshot", "floater_snapshot.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterSnapshot>);
LLFloaterReg::add("search", "floater_search.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterSearch>);
diff --git a/indra/newview/llviewerfoldertype.cpp b/indra/newview/llviewerfoldertype.cpp
index a179b61cff..8a96f22027 100644
--- a/indra/newview/llviewerfoldertype.cpp
+++ b/indra/newview/llviewerfoldertype.cpp
@@ -155,7 +155,7 @@ bool LLViewerFolderDictionary::initEnsemblesFromFile()
LLXmlTree folder_def;
if (!folder_def.parseFile(xml_filename))
{
- llerrs << "Failed to parse folders file " << xml_filename << llendl;
+ LL_ERRS() << "Failed to parse folders file " << xml_filename << LL_ENDL;
return false;
}
@@ -166,7 +166,7 @@ bool LLViewerFolderDictionary::initEnsemblesFromFile()
{
if (!ensemble->hasName("ensemble"))
{
- llwarns << "Invalid ensemble definition node " << ensemble->getName() << llendl;
+ LL_WARNS() << "Invalid ensemble definition node " << ensemble->getName() << LL_ENDL;
continue;
}
@@ -174,14 +174,14 @@ bool LLViewerFolderDictionary::initEnsemblesFromFile()
static LLStdStringHandle ensemble_num_string = LLXmlTree::addAttributeString("foldertype_num");
if (!ensemble->getFastAttributeS32(ensemble_num_string, ensemble_type))
{
- llwarns << "No ensemble type defined" << llendl;
+ LL_WARNS() << "No ensemble type defined" << LL_ENDL;
continue;
}
if (ensemble_type < S32(LLFolderType::FT_ENSEMBLE_START) || ensemble_type > S32(LLFolderType::FT_ENSEMBLE_END))
{
- llwarns << "Exceeded maximum ensemble index" << LLFolderType::FT_ENSEMBLE_END << llendl;
+ LL_WARNS() << "Exceeded maximum ensemble index" << LLFolderType::FT_ENSEMBLE_END << LL_ENDL;
break;
}
@@ -189,7 +189,7 @@ bool LLViewerFolderDictionary::initEnsemblesFromFile()
static LLStdStringHandle xui_name_string = LLXmlTree::addAttributeString("xui_name");
if (!ensemble->getFastAttributeString(xui_name_string, xui_name))
{
- llwarns << "No xui name defined" << llendl;
+ LL_WARNS() << "No xui name defined" << LL_ENDL;
continue;
}
@@ -197,7 +197,7 @@ bool LLViewerFolderDictionary::initEnsemblesFromFile()
static LLStdStringHandle icon_name_string = LLXmlTree::addAttributeString("icon_name");
if (!ensemble->getFastAttributeString(icon_name_string, icon_name))
{
- llwarns << "No ensemble icon name defined" << llendl;
+ LL_WARNS() << "No ensemble icon name defined" << LL_ENDL;
continue;
}
diff --git a/indra/newview/llviewergenericmessage.cpp b/indra/newview/llviewergenericmessage.cpp
index f8a2be14d4..3df53a4a30 100755
--- a/indra/newview/llviewergenericmessage.cpp
+++ b/indra/newview/llviewergenericmessage.cpp
@@ -78,7 +78,7 @@ void process_generic_message(LLMessageSystem* msg, void**)
msg->getUUID("AgentData", "AgentID", agent_id);
if (agent_id != gAgent.getID())
{
- llwarns << "GenericMessage for wrong agent" << llendl;
+ LL_WARNS() << "GenericMessage for wrong agent" << LL_ENDL;
return;
}
@@ -89,7 +89,7 @@ void process_generic_message(LLMessageSystem* msg, void**)
if(!gGenericDispatcher.dispatch(request, invoice, strings))
{
- llwarns << "GenericMessage " << request << " failed to dispatch"
- << llendl;
+ LL_WARNS() << "GenericMessage " << request << " failed to dispatch"
+ << LL_ENDL;
}
}
diff --git a/indra/newview/llviewergesture.cpp b/indra/newview/llviewergesture.cpp
index 3f35a5001d..f30279d1e9 100755
--- a/indra/newview/llviewergesture.cpp
+++ b/indra/newview/llviewergesture.cpp
@@ -194,13 +194,13 @@ void LLViewerGestureList::xferCallback(void *data, S32 size, void** /*user_data*
if (end - buffer > size)
{
- llerrs << "Read off of end of array, error in serialization" << llendl;
+ LL_ERRS() << "Read off of end of array, error in serialization" << LL_ENDL;
}
gGestureList.mIsLoaded = TRUE;
}
else
{
- llwarns << "Unable to load gesture list!" << llendl;
+ LL_WARNS() << "Unable to load gesture list!" << LL_ENDL;
}
}
diff --git a/indra/newview/llviewergesture.h b/indra/newview/llviewergesture.h
index 8dba10226b..8b621850ea 100755
--- a/indra/newview/llviewergesture.h
+++ b/indra/newview/llviewergesture.h
@@ -30,7 +30,6 @@
#include "llanimationstates.h"
#include "lluuid.h"
#include "llstring.h"
-#include "lldarray.h"
#include "llgesture.h"
class LLMessageSystem;
diff --git a/indra/newview/llviewerinventory.cpp b/indra/newview/llviewerinventory.cpp
index fff9821e86..a4773646ef 100755
--- a/indra/newview/llviewerinventory.cpp
+++ b/indra/newview/llviewerinventory.cpp
@@ -303,8 +303,8 @@ LLViewerInventoryItem::LLViewerInventoryItem(const LLViewerInventoryItem* other)
copyViewerItem(other);
if (!mIsComplete)
{
- llwarns << "LLViewerInventoryItem copy constructor for incomplete item"
- << mUUID << llendl;
+ LL_WARNS() << "LLViewerInventoryItem copy constructor for incomplete item"
+ << mUUID << LL_ENDL;
}
}
@@ -347,8 +347,8 @@ void LLViewerInventoryItem::cloneViewerItem(LLPointer<LLViewerInventoryItem>& ne
void LLViewerInventoryItem::removeFromServer()
{
- lldebugs << "Removing inventory item " << mUUID << " from server."
- << llendl;
+ LL_DEBUGS() << "Removing inventory item " << mUUID << " from server."
+ << LL_ENDL;
LLInventoryModel::LLCategoryUpdate up(mParentUUID, -1);
gInventory.accountForUpdate(up);
@@ -369,15 +369,15 @@ void LLViewerInventoryItem::updateServer(BOOL is_new) const
{
// *FIX: deal with this better.
// If we're crashing here then the UI is incorrectly enabled.
- llerrs << "LLViewerInventoryItem::updateServer() - for incomplete item"
- << llendl;
+ LL_ERRS() << "LLViewerInventoryItem::updateServer() - for incomplete item"
+ << LL_ENDL;
return;
}
if(gAgent.getID() != mPermissions.getOwner())
{
// *FIX: deal with this better.
- llwarns << "LLViewerInventoryItem::updateServer() - for unowned item"
- << llendl;
+ LL_WARNS() << "LLViewerInventoryItem::updateServer() - for unowned item"
+ << LL_ENDL;
return;
}
LLInventoryModel::LLCategoryUpdate up(mParentUUID, is_new ? 1 : 0);
@@ -416,7 +416,7 @@ void LLViewerInventoryItem::fetchFromServer(void) const
}
else
{
- llwarns << "Agent Region is absent" << llendl;
+ LL_WARNS() << "Agent Region is absent" << LL_ENDL;
}
if (!url.empty())
@@ -639,8 +639,8 @@ void LLViewerInventoryCategory::updateServer(BOOL is_new) const
void LLViewerInventoryCategory::removeFromServer( void )
{
- llinfos << "Removing inventory category " << mUUID << " from server."
- << llendl;
+ LL_INFOS() << "Removing inventory category " << mUUID << " from server."
+ << LL_ENDL;
// communicate that change with the server.
if(LLFolderType::lookupIsProtectedType(mPreferredType))
{
@@ -701,7 +701,7 @@ bool LLViewerInventoryCategory::fetch()
}
else
{
- llwarns << "agent region is null" << llendl;
+ LL_WARNS() << "agent region is null" << LL_ENDL;
}
if (!url.empty()) //Capability found. Build up LLSD and use it.
{
@@ -709,7 +709,7 @@ bool LLViewerInventoryCategory::fetch()
}
else
{ //Deprecated, but if we don't have a capability, use the old system.
- llinfos << "FetchInventoryDescendents2 capability not found. Using deprecated UDP message." << llendl;
+ LL_INFOS() << "FetchInventoryDescendents2 capability not found. Using deprecated UDP message." << LL_ENDL;
LLMessageSystem* msg = gMessageSystem;
msg->newMessage("FetchInventoryDescendents");
msg->nextBlock("AgentData");
@@ -791,8 +791,8 @@ bool LLViewerInventoryCategory::importFileLocal(LLFILE* fp)
}
else
{
- llwarns << "unknown keyword '" << keyword
- << "' in inventory import category " << mUUID << llendl;
+ LL_WARNS() << "unknown keyword '" << keyword
+ << "' in inventory import category " << mUUID << LL_ENDL;
}
}
return true;
@@ -905,7 +905,7 @@ LLInventoryCallbackManager::LLInventoryCallbackManager() :
{
if( sInstance != NULL )
{
- llwarns << "LLInventoryCallbackManager::LLInventoryCallbackManager: unexpected multiple instances" << llendl;
+ LL_WARNS() << "LLInventoryCallbackManager::LLInventoryCallbackManager: unexpected multiple instances" << LL_ENDL;
return;
}
sInstance = this;
@@ -915,7 +915,7 @@ LLInventoryCallbackManager::~LLInventoryCallbackManager()
{
if( sInstance != this )
{
- llwarns << "LLInventoryCallbackManager::~LLInventoryCallbackManager: unexpected multiple instances" << llendl;
+ LL_WARNS() << "LLInventoryCallbackManager::~LLInventoryCallbackManager: unexpected multiple instances" << LL_ENDL;
return;
}
sInstance = NULL;
@@ -1099,12 +1099,12 @@ void link_inventory_item(
const LLInventoryObject *baseobj = gInventory.getObject(item_id);
if (!baseobj)
{
- llwarns << "attempt to link to unknown item, linked-to-item's itemID " << item_id << llendl;
+ LL_WARNS() << "attempt to link to unknown item, linked-to-item's itemID " << item_id << LL_ENDL;
return;
}
if (baseobj && baseobj->getIsLinkType())
{
- llwarns << "attempt to create a link to a link, linked-to-item's itemID " << item_id << llendl;
+ LL_WARNS() << "attempt to create a link to a link, linked-to-item's itemID " << item_id << LL_ENDL;
return;
}
@@ -1113,7 +1113,7 @@ void link_inventory_item(
// Fail if item can be found but is of a type that can't be linked.
// Arguably should fail if the item can't be found too, but that could
// be a larger behavioral change.
- llwarns << "attempt to link an unlinkable item, type = " << baseobj->getActualType() << llendl;
+ LL_WARNS() << "attempt to link an unlinkable item, type = " << baseobj->getActualType() << LL_ENDL;
return;
}
@@ -1134,7 +1134,7 @@ void link_inventory_item(
#if 1 // debugging stuff
LLViewerInventoryCategory* cat = gInventory.getCategory(parent_id);
- lldebugs << "cat: " << cat << llendl;
+ LL_DEBUGS() << "cat: " << cat << LL_ENDL;
#endif
LLMessageSystem* msg = gMessageSystem;
@@ -1347,7 +1347,7 @@ void menu_create_inventory_item(LLInventoryPanel* panel, LLFolderBridge *bridge,
}
else
{
- llwarns << "Can't create unrecognized type " << type_name << llendl;
+ LL_WARNS() << "Can't create unrecognized type " << type_name << LL_ENDL;
}
}
panel->getRootFolder()->setNeedsAutoRename(TRUE);
@@ -1582,7 +1582,7 @@ LLViewerInventoryItem *LLViewerInventoryItem::getLinkedItem() const
LLViewerInventoryItem *linked_item = gInventory.getItem(mAssetUUID);
if (linked_item && linked_item->getIsLinkType())
{
- llwarns << "Warning: Accessing link to link" << llendl;
+ LL_WARNS() << "Warning: Accessing link to link" << LL_ENDL;
return NULL;
}
return linked_item;
diff --git a/indra/newview/llviewerinventory.h b/indra/newview/llviewerinventory.h
index ab19a12014..a10eda947d 100755
--- a/indra/newview/llviewerinventory.h
+++ b/indra/newview/llviewerinventory.h
@@ -49,7 +49,7 @@ class LLViewerInventoryCategory;
class LLViewerInventoryItem : public LLInventoryItem, public boost::signals2::trackable
{
public:
- typedef LLDynamicArray<LLPointer<LLViewerInventoryItem> > item_array_t;
+ typedef std::vector<LLPointer<LLViewerInventoryItem> > item_array_t;
protected:
~LLViewerInventoryItem( void ); // ref counted
@@ -181,7 +181,7 @@ public:
class LLViewerInventoryCategory : public LLInventoryCategory
{
public:
- typedef LLDynamicArray<LLPointer<LLViewerInventoryCategory> > cat_array_t;
+ typedef std::vector<LLPointer<LLViewerInventoryCategory> > cat_array_t;
protected:
~LLViewerInventoryCategory();
diff --git a/indra/newview/llviewerjointattachment.cpp b/indra/newview/llviewerjointattachment.cpp
index 3a04bbed4f..888decd3be 100755
--- a/indra/newview/llviewerjointattachment.cpp
+++ b/indra/newview/llviewerjointattachment.cpp
@@ -28,7 +28,6 @@
#include "llviewerjointattachment.h"
-#include "llagentconstants.h"
#include "llviewercontrol.h"
#include "lldrawable.h"
#include "llgl.h"
@@ -46,6 +45,7 @@
#include "llglheaders.h"
extern LLPipeline gPipeline;
+const F32 MAX_ATTACHMENT_DIST = 3.5f; // meters?
//-----------------------------------------------------------------------------
// LLViewerJointAttachment()
@@ -171,7 +171,7 @@ BOOL LLViewerJointAttachment::addObject(LLViewerObject* object)
// Same object reattached
if (isObjectAttached(object))
{
- llinfos << "(same object re-attached)" << llendl;
+ LL_INFOS() << "(same object re-attached)" << LL_ENDL;
removeObject(object);
// Pass through anyway to let setupDrawable()
// re-connect object to the joint correctly
@@ -181,7 +181,7 @@ BOOL LLViewerJointAttachment::addObject(LLViewerObject* object)
// Request detach, and kill the object in the meantime.
if (getAttachedObject(object->getAttachmentItemID()))
{
- llinfos << "(same object re-attached)" << llendl;
+ LL_INFOS() << "(same object re-attached)" << LL_ENDL;
object->markDead();
// If this happens to be attached to self, then detach.
@@ -233,7 +233,7 @@ void LLViewerJointAttachment::removeObject(LLViewerObject *object)
}
if (iter == mAttachedObjects.end())
{
- llwarns << "Could not find object to detach" << llendl;
+ LL_WARNS() << "Could not find object to detach" << LL_ENDL;
return;
}
diff --git a/indra/newview/llviewerjointmesh.cpp b/indra/newview/llviewerjointmesh.cpp
index 64454a03d1..bf7cf08c63 100755
--- a/indra/newview/llviewerjointmesh.cpp
+++ b/indra/newview/llviewerjointmesh.cpp
@@ -29,7 +29,6 @@
//-----------------------------------------------------------------------------
#include "llviewerprecompiledheaders.h"
-#include "imageids.h"
#include "llfasttimer.h"
#include "llrender.h"
@@ -116,7 +115,7 @@ void LLViewerJointMesh::uploadJointMatrices()
BOOL hardware_skinning = (poolp && poolp->getVertexShaderLevel() > 0) ? TRUE : FALSE;
//calculate joint matrices
- for (joint_num = 0; joint_num < reference_mesh->mJointRenderData.count(); joint_num++)
+ for (joint_num = 0; joint_num < reference_mesh->mJointRenderData.size(); joint_num++)
{
LLMatrix4 joint_mat = *reference_mesh->mJointRenderData[joint_num]->mWorldMatrix;
@@ -132,7 +131,7 @@ void LLViewerJointMesh::uploadJointMatrices()
S32 j = 0;
//upload joint pivots
- for (joint_num = 0; joint_num < reference_mesh->mJointRenderData.count(); joint_num++)
+ for (joint_num = 0; joint_num < reference_mesh->mJointRenderData.size(); joint_num++)
{
LLSkinJoint *sj = reference_mesh->mJointRenderData[joint_num]->mSkinJoint;
if (sj)
@@ -172,7 +171,7 @@ void LLViewerJointMesh::uploadJointMatrices()
GLfloat mat[45*4];
memset(mat, 0, sizeof(GLfloat)*45*4);
- for (joint_num = 0; joint_num < reference_mesh->mJointRenderData.count(); joint_num++)
+ for (joint_num = 0; joint_num < reference_mesh->mJointRenderData.size(); joint_num++)
{
gJointMatUnaligned[joint_num].transpose();
@@ -193,7 +192,7 @@ void LLViewerJointMesh::uploadJointMatrices()
else
{
//load gJointMatUnaligned into gJointMatAligned
- for (joint_num = 0; joint_num < reference_mesh->mJointRenderData.count(); ++joint_num)
+ for (joint_num = 0; joint_num < reference_mesh->mJointRenderData.size(); ++joint_num)
{
gJointMatAligned[joint_num].loadu(gJointMatUnaligned[joint_num]);
}
@@ -377,7 +376,7 @@ void LLViewerJointMesh::updateFaceSizes(U32 &num_vertices, U32& num_indices, F32
//-----------------------------------------------------------------------------
// updateFaceData()
//-----------------------------------------------------------------------------
-static LLFastTimer::DeclareTimer FTM_AVATAR_FACE("Avatar Face");
+static LLTrace::BlockTimerStatHandle FTM_AVATAR_FACE("Avatar Face");
void LLViewerJointMesh::updateFaceData(LLFace *face, F32 pixel_area, BOOL damp_wind, bool terse_update)
{
@@ -400,7 +399,7 @@ void LLViewerJointMesh::updateFaceData(LLFace *face, F32 pixel_area, BOOL damp_w
}
- LLFastTimer t(FTM_AVATAR_FACE);
+ LL_RECORD_BLOCK_TIME(FTM_AVATAR_FACE);
LLStrider<LLVector3> verticesp;
LLStrider<LLVector3> normalsp;
@@ -552,7 +551,7 @@ void LLViewerJointMesh::dump()
{
if (mValid)
{
- llinfos << "Usable LOD " << mName << llendl;
+ LL_INFOS() << "Usable LOD " << mName << LL_ENDL;
}
}
diff --git a/indra/newview/llviewerjoystick.cpp b/indra/newview/llviewerjoystick.cpp
index aeeb591d55..e44d80b7ce 100755
--- a/indra/newview/llviewerjoystick.cpp
+++ b/indra/newview/llviewerjoystick.cpp
@@ -107,7 +107,7 @@ NDOF_HotPlugResult LLViewerJoystick::HotPlugAddCallback(NDOF_Device *dev)
LLViewerJoystick* joystick(LLViewerJoystick::getInstance());
if (joystick->mDriverState == JDS_UNINITIALIZED)
{
- llinfos << "HotPlugAddCallback: will use device:" << llendl;
+ LL_INFOS() << "HotPlugAddCallback: will use device:" << LL_ENDL;
ndof_dump(dev);
joystick->mNdofDev = dev;
joystick->mDriverState = JDS_INITIALIZED;
@@ -125,8 +125,8 @@ void LLViewerJoystick::HotPlugRemovalCallback(NDOF_Device *dev)
LLViewerJoystick* joystick(LLViewerJoystick::getInstance());
if (joystick->mNdofDev == dev)
{
- llinfos << "HotPlugRemovalCallback: joystick->mNdofDev="
- << joystick->mNdofDev << "; removed device:" << llendl;
+ LL_INFOS() << "HotPlugRemovalCallback: joystick->mNdofDev="
+ << joystick->mNdofDev << "; removed device:" << LL_ENDL;
ndof_dump(dev);
joystick->mDriverState = JDS_UNINITIALIZED;
}
@@ -215,7 +215,7 @@ void LLViewerJoystick::init(bool autoenable)
if (ndof_init_first(mNdofDev, NULL))
{
mDriverState = JDS_UNINITIALIZED;
- llwarns << "ndof_init_first FAILED" << llendl;
+ LL_WARNS() << "ndof_init_first FAILED" << LL_ENDL;
}
else
{
@@ -259,8 +259,8 @@ void LLViewerJoystick::init(bool autoenable)
// No device connected, don't change any settings
}
- llinfos << "ndof: mDriverState=" << mDriverState << "; mNdofDev="
- << mNdofDev << "; libinit=" << libinit << llendl;
+ LL_INFOS() << "ndof: mDriverState=" << mDriverState << "; mNdofDev="
+ << mNdofDev << "; libinit=" << libinit << LL_ENDL;
#endif
}
@@ -270,7 +270,7 @@ void LLViewerJoystick::terminate()
#if LIB_NDOF
ndof_libcleanup();
- llinfos << "Terminated connection with NDOF device." << llendl;
+ LL_INFOS() << "Terminated connection with NDOF device." << LL_ENDL;
mDriverState = JDS_UNINITIALIZED;
#endif
}
@@ -501,7 +501,7 @@ void LLViewerJoystick::moveObjects(bool reset)
};
F32 cur_delta[6];
- F32 time = gFrameIntervalSeconds;
+ F32 time = gFrameIntervalSeconds.value();
// avoid making ridicously big movements if there's a big drop in fps
if (time > .2f)
@@ -665,7 +665,7 @@ void LLViewerJoystick::moveAvatar(bool reset)
};
// time interval in seconds between this frame and the previous
- F32 time = gFrameIntervalSeconds;
+ F32 time = gFrameIntervalSeconds.value();
// avoid making ridicously big movements if there's a big drop in fps
if (time > .2f)
@@ -878,7 +878,7 @@ void LLViewerJoystick::moveFlycam(bool reset)
gSavedSettings.getF32("FlycamAxisDeadZone6")
};
- F32 time = gFrameIntervalSeconds;
+ F32 time = gFrameIntervalSeconds.value();
// avoid making ridiculously big movements if there's a big drop in fps
if (time > .2f)
@@ -1101,7 +1101,7 @@ void LLViewerJoystick::setSNDefaults()
#endif
//gViewerWindow->alertXml("CacheWillClear");
- llinfos << "restoring SpaceNavigator defaults..." << llendl;
+ LL_INFOS() << "restoring SpaceNavigator defaults..." << LL_ENDL;
gSavedSettings.setS32("JoystickAxis0", 1); // z (at)
gSavedSettings.setS32("JoystickAxis1", 0); // x (slide)
diff --git a/indra/newview/llviewerkeyboard.cpp b/indra/newview/llviewerkeyboard.cpp
index aa9de076b8..160478788c 100755
--- a/indra/newview/llviewerkeyboard.cpp
+++ b/indra/newview/llviewerkeyboard.cpp
@@ -146,9 +146,11 @@ void agent_push_forward( EKeystate s )
if (LLFloaterCamera::inFreeCameraMode())
{
camera_move_forward(s);
- return;
}
- agent_push_forwardbackward(s, 1, LLAgent::DOUBLETAP_FORWARD);
+ else
+ {
+ agent_push_forwardbackward(s, 1, LLAgent::DOUBLETAP_FORWARD);
+ }
}
void camera_move_backward( EKeystate s );
@@ -159,9 +161,15 @@ void agent_push_backward( EKeystate s )
if (LLFloaterCamera::inFreeCameraMode())
{
camera_move_backward(s);
- return;
}
- agent_push_forwardbackward(s, -1, LLAgent::DOUBLETAP_BACKWARD);
+ else if (!gAgent.backwardGrabbed() && gAgentAvatarp->isSitting())
+ {
+ gAgentCamera.changeCameraToThirdPerson();
+ }
+ else
+ {
+ agent_push_forwardbackward(s, -1, LLAgent::DOUBLETAP_BACKWARD);
+ }
}
static void agent_slide_leftright( EKeystate s, S32 direction, LLAgent::EDoubleTapRunMode mode )
@@ -269,7 +277,7 @@ F32 get_orbit_rate()
if( time < NUDGE_TIME )
{
F32 rate = ORBIT_NUDGE_RATE + time * (1 - ORBIT_NUDGE_RATE)/ NUDGE_TIME;
- //llinfos << rate << llendl;
+ //LL_INFOS() << rate << LL_ENDL;
return rate;
}
else
@@ -676,7 +684,7 @@ BOOL LLViewerKeyboard::handleKey(KEY translated_key, MASK translated_mask, BOOL
return FALSE;
}
- lldebugst(LLERR_USER_INPUT) << "keydown -" << translated_key << "-" << llendl;
+ LL_DEBUGS("UserInput") << "keydown -" << translated_key << "-" << LL_ENDL;
// skip skipped keys
if(mKeysSkippedByUI.find(translated_key) != mKeysSkippedByUI.end())
{
@@ -733,7 +741,7 @@ BOOL LLViewerKeyboard::bindKey(const S32 mode, const KEY key, const MASK mask, c
if (!function)
{
- llerrs << "Can't bind key to function " << function_name << ", no function with this name found" << llendl;
+ LL_ERRS() << "Can't bind key to function " << function_name << ", no function with this name found" << LL_ENDL;
return FALSE;
}
@@ -746,13 +754,13 @@ BOOL LLViewerKeyboard::bindKey(const S32 mode, const KEY key, const MASK mask, c
if (index >= MAX_KEY_BINDINGS)
{
- llerrs << "LLKeyboard::bindKey() - too many keys for mode " << mode << llendl;
+ LL_ERRS() << "LLKeyboard::bindKey() - too many keys for mode " << mode << LL_ENDL;
return FALSE;
}
if (mode >= MODE_COUNT)
{
- llerror("LLKeyboard::bindKey() - unknown mode passed", mode);
+ LL_ERRS() << "LLKeyboard::bindKey() - unknown mode passed" << mode << LL_ENDL;
return FALSE;
}
@@ -841,7 +849,7 @@ S32 LLViewerKeyboard::loadBindings(const std::string& filename)
if(filename.empty())
{
- llerrs << " No filename specified" << llendl;
+ LL_ERRS() << " No filename specified" << LL_ENDL;
return 0;
}
@@ -873,35 +881,35 @@ S32 LLViewerKeyboard::loadBindings(const std::string& filename)
if (tokens_read == EOF)
{
- llinfos << "Unexpected end-of-file at line " << line_count << " of key binding file " << filename << llendl;
+ LL_INFOS() << "Unexpected end-of-file at line " << line_count << " of key binding file " << filename << LL_ENDL;
fclose(fp);
return 0;
}
else if (tokens_read < 4)
{
- llinfos << "Can't read line " << line_count << " of key binding file " << filename << llendl;
+ LL_INFOS() << "Can't read line " << line_count << " of key binding file " << filename << LL_ENDL;
continue;
}
// convert mode
if (!modeFromString(mode_string, &mode))
{
- llinfos << "Unknown mode on line " << line_count << " of key binding file " << filename << llendl;
- llinfos << "Mode must be one of FIRST_PERSON, THIRD_PERSON, EDIT, EDIT_AVATAR" << llendl;
+ LL_INFOS() << "Unknown mode on line " << line_count << " of key binding file " << filename << LL_ENDL;
+ LL_INFOS() << "Mode must be one of FIRST_PERSON, THIRD_PERSON, EDIT, EDIT_AVATAR" << LL_ENDL;
continue;
}
// convert key
if (!LLKeyboard::keyFromString(key_string, &key))
{
- llinfos << "Can't interpret key on line " << line_count << " of key binding file " << filename << llendl;
+ LL_INFOS() << "Can't interpret key on line " << line_count << " of key binding file " << filename << LL_ENDL;
continue;
}
// convert mask
if (!LLKeyboard::maskFromString(mask_string, &mask))
{
- llinfos << "Can't interpret mask on line " << line_count << " of key binding file " << filename << llendl;
+ LL_INFOS() << "Can't interpret mask on line " << line_count << " of key binding file " << filename << LL_ENDL;
continue;
}
diff --git a/indra/newview/llviewermedia.cpp b/indra/newview/llviewermedia.cpp
index 21fb8d519b..7958537856 100755
--- a/indra/newview/llviewermedia.cpp
+++ b/indra/newview/llviewermedia.cpp
@@ -166,7 +166,7 @@ public:
{
if(mMediaImpl->mMimeTypeProbe != NULL)
{
- llerrs << "impl already has an outstanding responder" << llendl;
+ LL_ERRS() << "impl already has an outstanding responder" << LL_ENDL;
}
mMediaImpl->mMimeTypeProbe = this;
@@ -183,7 +183,7 @@ public:
std::string::size_type idx1 = media_type.find_first_of(";");
std::string mime_type = media_type.substr(0, idx1);
- lldebugs << "status is " << status << ", media type \"" << media_type << "\"" << llendl;
+ LL_DEBUGS() << "status is " << status << ", media type \"" << media_type << "\"" << LL_ENDL;
// 2xx status codes indicate success.
// Most 4xx status codes are successful enough for our purposes.
@@ -214,7 +214,7 @@ public:
}
else
{
- llwarns << "responder failed with status " << status << ", reason " << reason << llendl;
+ LL_WARNS() << "responder failed with status " << status << ", reason " << reason << LL_ENDL;
if(mMediaImpl)
{
@@ -253,7 +253,7 @@ private:
{
if(mMediaImpl->mMimeTypeProbe != this)
{
- llerrs << "internal error: mMediaImpl->mMimeTypeProbe != this" << llendl;
+ LL_ERRS() << "internal error: mMediaImpl->mMimeTypeProbe != this" << LL_ENDL;
}
mMediaImpl->mMimeTypeProbe = NULL;
@@ -429,10 +429,10 @@ viewer_media_t LLViewerMedia::updateMediaImpl(LLMediaEntry* media_entry, const s
// Try to find media with the same media ID
viewer_media_t media_impl = getMediaImplFromTextureID(media_entry->getMediaID());
- lldebugs << "called, current URL is \"" << media_entry->getCurrentURL()
+ LL_DEBUGS() << "called, current URL is \"" << media_entry->getCurrentURL()
<< "\", previous URL is \"" << previous_url
<< "\", update_from_self is " << (update_from_self?"true":"false")
- << llendl;
+ << LL_ENDL;
bool was_loaded = false;
bool needs_navigate = false;
@@ -464,7 +464,7 @@ viewer_media_t LLViewerMedia::updateMediaImpl(LLMediaEntry* media_entry, const s
// The current media URL is now empty. Unload the media source.
media_impl->unload();
- lldebugs << "Unloading media instance (new current URL is empty)." << llendl;
+ LL_DEBUGS() << "Unloading media instance (new current URL is empty)." << LL_ENDL;
}
}
else
@@ -478,9 +478,9 @@ viewer_media_t LLViewerMedia::updateMediaImpl(LLMediaEntry* media_entry, const s
needs_navigate = url_changed;
}
- lldebugs << "was_loaded is " << (was_loaded?"true":"false")
+ LL_DEBUGS() << "was_loaded is " << (was_loaded?"true":"false")
<< ", auto_play is " << (auto_play?"true":"false")
- << ", needs_navigate is " << (needs_navigate?"true":"false") << llendl;
+ << ", needs_navigate is " << (needs_navigate?"true":"false") << LL_ENDL;
}
}
else
@@ -506,7 +506,7 @@ viewer_media_t LLViewerMedia::updateMediaImpl(LLMediaEntry* media_entry, const s
if(needs_navigate)
{
media_impl->navigateTo(media_impl->mMediaEntryURL, "", true, true);
- lldebugs << "navigating to URL " << media_impl->mMediaEntryURL << llendl;
+ LL_DEBUGS() << "navigating to URL " << media_impl->mMediaEntryURL << LL_ENDL;
}
else if(!media_impl->mMediaURL.empty() && (media_impl->mMediaURL != media_impl->mMediaEntryURL))
{
@@ -516,7 +516,7 @@ viewer_media_t LLViewerMedia::updateMediaImpl(LLMediaEntry* media_entry, const s
// If this causes a navigate at some point (such as after a reload), it should be considered server-driven so it isn't broadcast.
media_impl->mNavigateServerRequest = true;
- lldebugs << "updating URL in the media impl to " << media_impl->mMediaEntryURL << llendl;
+ LL_DEBUGS() << "updating URL in the media impl to " << media_impl->mMediaEntryURL << LL_ENDL;
}
}
@@ -561,7 +561,7 @@ std::string LLViewerMedia::getCurrentUserAgent()
codec << "SecondLife/";
codec << LLVersionInfo::getVersion();
codec << " (" << channel << "; " << skin_name << " skin)";
- llinfos << codec.str() << llendl;
+ LL_INFOS() << codec.str() << LL_ENDL;
return codec.str();
}
@@ -678,7 +678,7 @@ bool LLViewerMedia::isInterestingEnough(const LLVOVolume *object, const F64 &obj
}
else
{
- lldebugs << "object interest = " << object_interest << ", lowest loadable = " << sLowestLoadableImplInterest << llendl;
+ LL_DEBUGS() << "object interest = " << object_interest << ", lowest loadable = " << sLowestLoadableImplInterest << LL_ENDL;
if(object_interest >= sLowestLoadableImplInterest)
result = true;
}
@@ -776,19 +776,19 @@ static bool proximity_comparitor(const LLViewerMediaImpl* i1, const LLViewerMedi
}
}
-static LLFastTimer::DeclareTimer FTM_MEDIA_UPDATE("Update Media");
-static LLFastTimer::DeclareTimer FTM_MEDIA_SPARE_IDLE("Spare Idle");
-static LLFastTimer::DeclareTimer FTM_MEDIA_UPDATE_INTEREST("Update/Interest");
-static LLFastTimer::DeclareTimer FTM_MEDIA_SORT("Sort");
-static LLFastTimer::DeclareTimer FTM_MEDIA_SORT2("Sort 2");
-static LLFastTimer::DeclareTimer FTM_MEDIA_MISC("Misc");
+static LLTrace::BlockTimerStatHandle FTM_MEDIA_UPDATE("Update Media");
+static LLTrace::BlockTimerStatHandle FTM_MEDIA_SPARE_IDLE("Spare Idle");
+static LLTrace::BlockTimerStatHandle FTM_MEDIA_UPDATE_INTEREST("Update/Interest");
+static LLTrace::BlockTimerStatHandle FTM_MEDIA_SORT("Media Sort");
+static LLTrace::BlockTimerStatHandle FTM_MEDIA_SORT2("Media Sort 2");
+static LLTrace::BlockTimerStatHandle FTM_MEDIA_MISC("Misc");
//////////////////////////////////////////////////////////////////////////////////////////
// static
void LLViewerMedia::updateMedia(void *dummy_arg)
{
- LLFastTimer t1(FTM_MEDIA_UPDATE);
+ LL_RECORD_BLOCK_TIME(FTM_MEDIA_UPDATE);
// Enable/disable the plugin read thread
LLPluginProcessParent::setUseReadThread(gSavedSettings.getBOOL("PluginUseReadThread"));
@@ -800,15 +800,15 @@ void LLViewerMedia::updateMedia(void *dummy_arg)
sUpdatedCookies = getCookieStore()->getChangedCookies();
if(!sUpdatedCookies.empty())
{
- lldebugs << "updated cookies will be sent to all loaded plugins: " << llendl;
- lldebugs << sUpdatedCookies << llendl;
+ LL_DEBUGS() << "updated cookies will be sent to all loaded plugins: " << LL_ENDL;
+ LL_DEBUGS() << sUpdatedCookies << LL_ENDL;
}
impl_list::iterator iter = sViewerMediaImplList.begin();
impl_list::iterator end = sViewerMediaImplList.end();
{
- LLFastTimer t(FTM_MEDIA_UPDATE_INTEREST);
+ LL_RECORD_BLOCK_TIME(FTM_MEDIA_UPDATE_INTEREST);
for(; iter != end;)
{
LLViewerMediaImpl* pimpl = *iter++;
@@ -820,12 +820,12 @@ void LLViewerMedia::updateMedia(void *dummy_arg)
// Let the spare media source actually launch
if(sSpareBrowserMediaSource)
{
- LLFastTimer t(FTM_MEDIA_SPARE_IDLE);
+ LL_RECORD_BLOCK_TIME(FTM_MEDIA_SPARE_IDLE);
sSpareBrowserMediaSource->idle();
}
{
- LLFastTimer t(FTM_MEDIA_SORT);
+ LL_RECORD_BLOCK_TIME(FTM_MEDIA_SORT);
// Sort the static instance list using our interest criteria
sViewerMediaImplList.sort(priorityComparitor);
}
@@ -857,7 +857,7 @@ void LLViewerMedia::updateMedia(void *dummy_arg)
// If max_normal + max_low is less than max_instances, things will tend to get unloaded instead of being set to slideshow.
{
- LLFastTimer t(FTM_MEDIA_MISC);
+ LL_RECORD_BLOCK_TIME(FTM_MEDIA_MISC);
for(; iter != end; iter++)
{
LLViewerMediaImpl* pimpl = *iter;
@@ -1025,7 +1025,7 @@ void LLViewerMedia::updateMedia(void *dummy_arg)
}
else
{
- LLFastTimer t(FTM_MEDIA_SORT2);
+ LL_RECORD_BLOCK_TIME(FTM_MEDIA_SORT2);
// Use a distance-based sort for proximity values.
std::stable_sort(proximity_order.begin(), proximity_order.end(), proximity_comparitor);
}
@@ -1036,7 +1036,7 @@ void LLViewerMedia::updateMedia(void *dummy_arg)
proximity_order[i]->mProximity = i;
}
- LL_DEBUGS("PluginPriority") << "Total reported CPU usage is " << total_cpu << llendl;
+ LL_DEBUGS("PluginPriority") << "Total reported CPU usage is " << total_cpu << LL_ENDL;
}
@@ -1171,14 +1171,14 @@ void LLViewerMedia::clearAllCookies()
std::string target;
std::string filename;
- lldebugs << "base dir = " << base_dir << llendl;
+ LL_DEBUGS() << "base dir = " << base_dir << LL_ENDL;
// The non-logged-in version is easy
target = base_dir;
target += "browser_profile";
target += gDirUtilp->getDirDelimiter();
target += "cookies";
- lldebugs << "target = " << target << llendl;
+ LL_DEBUGS() << "target = " << target << LL_ENDL;
if(LLFile::isfile(target))
{
LLFile::remove(target);
@@ -1191,7 +1191,7 @@ void LLViewerMedia::clearAllCookies()
target = gDirUtilp->add(base_dir, filename);
gDirUtilp->append(target, "browser_profile");
gDirUtilp->append(target, "cookies");
- lldebugs << "target = " << target << llendl;
+ LL_DEBUGS() << "target = " << target << LL_ENDL;
if(LLFile::isfile(target))
{
LLFile::remove(target);
@@ -1200,7 +1200,7 @@ void LLViewerMedia::clearAllCookies()
// Other accounts may have new-style cookie files too -- delete them as well
target = gDirUtilp->add(base_dir, filename);
gDirUtilp->append(target, PLUGIN_COOKIE_FILE_NAME);
- lldebugs << "target = " << target << llendl;
+ LL_DEBUGS() << "target = " << target << LL_ENDL;
if(LLFile::isfile(target))
{
LLFile::remove(target);
@@ -1282,7 +1282,7 @@ void LLViewerMedia::loadCookieFile()
if (resolved_filename.empty())
{
- llinfos << "can't get path to plugin cookie file - probably not logged in yet." << llendl;
+ LL_INFOS() << "can't get path to plugin cookie file - probably not logged in yet." << LL_ENDL;
return;
}
@@ -1290,7 +1290,7 @@ void LLViewerMedia::loadCookieFile()
llifstream file(resolved_filename);
if (!file.is_open())
{
- llwarns << "can't load plugin cookies from file \"" << PLUGIN_COOKIE_FILE_NAME << "\"" << llendl;
+ LL_WARNS() << "can't load plugin cookies from file \"" << PLUGIN_COOKIE_FILE_NAME << "\"" << LL_ENDL;
return;
}
@@ -1324,7 +1324,7 @@ void LLViewerMedia::saveCookieFile()
if (resolved_filename.empty())
{
- llinfos << "can't get path to plugin cookie file - probably not logged in yet." << llendl;
+ LL_INFOS() << "can't get path to plugin cookie file - probably not logged in yet." << LL_ENDL;
return;
}
@@ -1332,7 +1332,7 @@ void LLViewerMedia::saveCookieFile()
llofstream file (resolved_filename);
if (!file.is_open())
{
- llwarns << "can't open plugin cookie file \"" << PLUGIN_COOKIE_FILE_NAME << "\" for writing" << llendl;
+ LL_WARNS() << "can't open plugin cookie file \"" << PLUGIN_COOKIE_FILE_NAME << "\" for writing" << LL_ENDL;
return;
}
@@ -1438,8 +1438,8 @@ void LLViewerMedia::setOpenIDCookie()
std::string profile_url = getProfileURL("");
LLURL raw_profile_url( profile_url.c_str() );
- LL_DEBUGS("MediaAuth") << "Requesting " << profile_url << llendl;
- LL_DEBUGS("MediaAuth") << "sOpenIDCookie = [" << sOpenIDCookie << "]" << llendl;
+ LL_DEBUGS("MediaAuth") << "Requesting " << profile_url << LL_ENDL;
+ LL_DEBUGS("MediaAuth") << "sOpenIDCookie = [" << sOpenIDCookie << "]" << LL_ENDL;
LLHTTPClient::get(profile_url,
new LLViewerMediaWebProfileResponder(raw_profile_url.getAuthority()),
headers);
@@ -1958,7 +1958,7 @@ bool LLViewerMediaImpl::initializePlugin(const std::string& media_type)
// Due to the ordering of messages, it's possible we wouldn't get that information back in time to send cookies before sending a navigate message,
// which could cause odd race conditions.
std::string all_cookies = LLViewerMedia::getCookieStore()->getAllCookies();
- lldebugs << "setting cookies: " << all_cookies << llendl;
+ LL_DEBUGS() << "setting cookies: " << all_cookies << LL_ENDL;
if(!all_cookies.empty())
{
media_source->set_cookies(all_cookies);
@@ -2004,7 +2004,7 @@ void LLViewerMediaImpl::loadURI()
// Do not log the query parts
LLURI u(uri);
std::string sanitized_uri = (u.query().empty() ? uri : u.scheme() + "://" + u.authority() + u.path());
- llinfos << "Asking media source to load URI: " << sanitized_uri << llendl;
+ LL_INFOS() << "Asking media source to load URI: " << sanitized_uri << LL_ENDL;
}
mMediaSource->loadURI( uri );
@@ -2277,7 +2277,7 @@ void LLViewerMediaImpl::mouseDown(S32 x, S32 y, MASK mask, S32 button)
scaleMouse(&x, &y);
mLastMouseX = x;
mLastMouseY = y;
-// llinfos << "mouse down (" << x << ", " << y << ")" << llendl;
+// LL_INFOS() << "mouse down (" << x << ", " << y << ")" << LL_ENDL;
if (mMediaSource)
{
mMediaSource->mouseEvent(LLPluginClassMedia::MOUSE_EVENT_DOWN, button, x, y, mask);
@@ -2290,7 +2290,7 @@ void LLViewerMediaImpl::mouseUp(S32 x, S32 y, MASK mask, S32 button)
scaleMouse(&x, &y);
mLastMouseX = x;
mLastMouseY = y;
-// llinfos << "mouse up (" << x << ", " << y << ")" << llendl;
+// LL_INFOS() << "mouse up (" << x << ", " << y << ")" << LL_ENDL;
if (mMediaSource)
{
mMediaSource->mouseEvent(LLPluginClassMedia::MOUSE_EVENT_UP, button, x, y, mask);
@@ -2303,7 +2303,7 @@ void LLViewerMediaImpl::mouseMove(S32 x, S32 y, MASK mask)
scaleMouse(&x, &y);
mLastMouseX = x;
mLastMouseY = y;
-// llinfos << "mouse move (" << x << ", " << y << ")" << llendl;
+// LL_INFOS() << "mouse move (" << x << ", " << y << ")" << LL_ENDL;
if (mMediaSource)
{
mMediaSource->mouseEvent(LLPluginClassMedia::MOUSE_EVENT_MOVE, 0, x, y, mask);
@@ -2576,7 +2576,7 @@ void LLViewerMediaImpl::navigateTo(const std::string& url, const std::string& mi
// Do not log the query parts
LLURI u(url);
std::string sanitized_url = (u.query().empty() ? url : u.scheme() + "://" + u.authority() + u.path());
- llinfos << "NOT LOADING media id= " << mTextureId << " url=" << sanitized_url << ", mime_type=" << mime_type << llendl;
+ LL_INFOS() << "NOT LOADING media id= " << mTextureId << " url=" << sanitized_url << ", mime_type=" << mime_type << LL_ENDL;
}
// This impl should not be loaded at this time.
@@ -2596,19 +2596,19 @@ void LLViewerMediaImpl::navigateInternal()
// Do not log the query parts
LLURI u(mMediaURL);
std::string sanitized_url = (u.query().empty() ? mMediaURL : u.scheme() + "://" + u.authority() + u.path());
- llinfos << "media id= " << mTextureId << " url=" << sanitized_url << ", mime_type=" << mMimeType << llendl;
+ LL_INFOS() << "media id= " << mTextureId << " url=" << sanitized_url << ", mime_type=" << mMimeType << LL_ENDL;
}
if(mNavigateSuspended)
{
- llwarns << "Deferring navigate." << llendl;
+ LL_WARNS() << "Deferring navigate." << LL_ENDL;
mNavigateSuspendedDeferred = true;
return;
}
if(mMimeTypeProbe != NULL)
{
- llwarns << "MIME type probe already in progress -- bailing out." << llendl;
+ LL_WARNS() << "MIME type probe already in progress -- bailing out." << LL_ENDL;
return;
}
@@ -2761,14 +2761,14 @@ bool LLViewerMediaImpl::canNavigateBack()
}
//////////////////////////////////////////////////////////////////////////////////////////
-static LLFastTimer::DeclareTimer FTM_MEDIA_DO_UPDATE("Do Update");
-static LLFastTimer::DeclareTimer FTM_MEDIA_GET_DATA("Get Data");
-static LLFastTimer::DeclareTimer FTM_MEDIA_SET_SUBIMAGE("Set Subimage");
+static LLTrace::BlockTimerStatHandle FTM_MEDIA_DO_UPDATE("Do Update");
+static LLTrace::BlockTimerStatHandle FTM_MEDIA_GET_DATA("Get Data");
+static LLTrace::BlockTimerStatHandle FTM_MEDIA_SET_SUBIMAGE("Set Subimage");
void LLViewerMediaImpl::update()
{
- LLFastTimer t(FTM_MEDIA_DO_UPDATE);
+ LL_RECORD_BLOCK_TIME(FTM_MEDIA_DO_UPDATE);
if(mMediaSource == NULL)
{
if(mPriority == LLPluginClassMedia::PRIORITY_UNLOADED)
@@ -2870,7 +2870,7 @@ void LLViewerMediaImpl::update()
U8* data = NULL;
{
- LLFastTimer t(FTM_MEDIA_GET_DATA);
+ LL_RECORD_BLOCK_TIME(FTM_MEDIA_GET_DATA);
data = mMediaSource->getBitsData();
}
@@ -2879,7 +2879,7 @@ void LLViewerMediaImpl::update()
data += ( y_pos * mMediaSource->getTextureDepth() );
{
- LLFastTimer t(FTM_MEDIA_SET_SUBIMAGE);
+ LL_RECORD_BLOCK_TIME(FTM_MEDIA_SET_SUBIMAGE);
placeholder_image->setSubImage(
data,
mMediaSource->getBitsWidth(),
@@ -3328,7 +3328,7 @@ void LLViewerMediaImpl::handleMediaEvent(LLPluginClassMedia* plugin, LLPluginCla
{
std::string uuid = plugin->getClickUUID();
- llinfos << "MEDIA_EVENT_CLOSE_REQUEST for uuid " << uuid << llendl;
+ LL_INFOS() << "MEDIA_EVENT_CLOSE_REQUEST for uuid " << uuid << LL_ENDL;
if(uuid.empty())
{
@@ -3347,7 +3347,7 @@ void LLViewerMediaImpl::handleMediaEvent(LLPluginClassMedia* plugin, LLPluginCla
{
std::string uuid = plugin->getClickUUID();
- llinfos << "MEDIA_EVENT_GEOMETRY_CHANGE for uuid " << uuid << llendl;
+ LL_INFOS() << "MEDIA_EVENT_GEOMETRY_CHANGE for uuid " << uuid << LL_ENDL;
if(uuid.empty())
{
@@ -3450,11 +3450,11 @@ BOOL LLViewerMediaImpl::isUpdated()
return mIsUpdated ;
}
-static LLFastTimer::DeclareTimer FTM_MEDIA_CALCULATE_INTEREST("Calculate Interest");
+static LLTrace::BlockTimerStatHandle FTM_MEDIA_CALCULATE_INTEREST("Calculate Interest");
void LLViewerMediaImpl::calculateInterest()
{
- LLFastTimer t(FTM_MEDIA_CALCULATE_INTEREST);
+ LL_RECORD_BLOCK_TIME(FTM_MEDIA_CALCULATE_INTEREST);
LLViewerMediaTexture* texture = LLViewerTextureManager::findMediaTexture( mTextureId );
if(texture != NULL)
@@ -3637,16 +3637,16 @@ void LLViewerMediaImpl::setNavState(EMediaNavState state)
switch (state)
{
- case MEDIANAVSTATE_NONE: LL_DEBUGS("Media") << "Setting nav state to MEDIANAVSTATE_NONE" << llendl; break;
- case MEDIANAVSTATE_BEGUN: LL_DEBUGS("Media") << "Setting nav state to MEDIANAVSTATE_BEGUN" << llendl; break;
- case MEDIANAVSTATE_FIRST_LOCATION_CHANGED: LL_DEBUGS("Media") << "Setting nav state to MEDIANAVSTATE_FIRST_LOCATION_CHANGED" << llendl; break;
- case MEDIANAVSTATE_FIRST_LOCATION_CHANGED_SPURIOUS: LL_DEBUGS("Media") << "Setting nav state to MEDIANAVSTATE_FIRST_LOCATION_CHANGED_SPURIOUS" << llendl; break;
- case MEDIANAVSTATE_COMPLETE_BEFORE_LOCATION_CHANGED: LL_DEBUGS("Media") << "Setting nav state to MEDIANAVSTATE_COMPLETE_BEFORE_LOCATION_CHANGED" << llendl; break;
- case MEDIANAVSTATE_COMPLETE_BEFORE_LOCATION_CHANGED_SPURIOUS: LL_DEBUGS("Media") << "Setting nav state to MEDIANAVSTATE_COMPLETE_BEFORE_LOCATION_CHANGED_SPURIOUS" << llendl; break;
- case MEDIANAVSTATE_SERVER_SENT: LL_DEBUGS("Media") << "Setting nav state to MEDIANAVSTATE_SERVER_SENT" << llendl; break;
- case MEDIANAVSTATE_SERVER_BEGUN: LL_DEBUGS("Media") << "Setting nav state to MEDIANAVSTATE_SERVER_BEGUN" << llendl; break;
- case MEDIANAVSTATE_SERVER_FIRST_LOCATION_CHANGED: LL_DEBUGS("Media") << "Setting nav state to MEDIANAVSTATE_SERVER_FIRST_LOCATION_CHANGED" << llendl; break;
- case MEDIANAVSTATE_SERVER_COMPLETE_BEFORE_LOCATION_CHANGED: LL_DEBUGS("Media") << "Setting nav state to MEDIANAVSTATE_SERVER_COMPLETE_BEFORE_LOCATION_CHANGED" << llendl; break;
+ case MEDIANAVSTATE_NONE: LL_DEBUGS("Media") << "Setting nav state to MEDIANAVSTATE_NONE" << LL_ENDL; break;
+ case MEDIANAVSTATE_BEGUN: LL_DEBUGS("Media") << "Setting nav state to MEDIANAVSTATE_BEGUN" << LL_ENDL; break;
+ case MEDIANAVSTATE_FIRST_LOCATION_CHANGED: LL_DEBUGS("Media") << "Setting nav state to MEDIANAVSTATE_FIRST_LOCATION_CHANGED" << LL_ENDL; break;
+ case MEDIANAVSTATE_FIRST_LOCATION_CHANGED_SPURIOUS: LL_DEBUGS("Media") << "Setting nav state to MEDIANAVSTATE_FIRST_LOCATION_CHANGED_SPURIOUS" << LL_ENDL; break;
+ case MEDIANAVSTATE_COMPLETE_BEFORE_LOCATION_CHANGED: LL_DEBUGS("Media") << "Setting nav state to MEDIANAVSTATE_COMPLETE_BEFORE_LOCATION_CHANGED" << LL_ENDL; break;
+ case MEDIANAVSTATE_COMPLETE_BEFORE_LOCATION_CHANGED_SPURIOUS: LL_DEBUGS("Media") << "Setting nav state to MEDIANAVSTATE_COMPLETE_BEFORE_LOCATION_CHANGED_SPURIOUS" << LL_ENDL; break;
+ case MEDIANAVSTATE_SERVER_SENT: LL_DEBUGS("Media") << "Setting nav state to MEDIANAVSTATE_SERVER_SENT" << LL_ENDL; break;
+ case MEDIANAVSTATE_SERVER_BEGUN: LL_DEBUGS("Media") << "Setting nav state to MEDIANAVSTATE_SERVER_BEGUN" << LL_ENDL; break;
+ case MEDIANAVSTATE_SERVER_FIRST_LOCATION_CHANGED: LL_DEBUGS("Media") << "Setting nav state to MEDIANAVSTATE_SERVER_FIRST_LOCATION_CHANGED" << LL_ENDL; break;
+ case MEDIANAVSTATE_SERVER_COMPLETE_BEFORE_LOCATION_CHANGED: LL_DEBUGS("Media") << "Setting nav state to MEDIANAVSTATE_SERVER_COMPLETE_BEFORE_LOCATION_CHANGED" << LL_ENDL; break;
}
}
@@ -3678,7 +3678,7 @@ void LLViewerMediaImpl::cancelMimeTypeProbe()
// The above should already have set mMimeTypeProbe to NULL.
if(mMimeTypeProbe != NULL)
{
- llerrs << "internal error: mMimeTypeProbe is not NULL after cancelling request." << llendl;
+ LL_ERRS() << "internal error: mMimeTypeProbe is not NULL after cancelling request." << LL_ENDL;
}
}
}
@@ -3760,10 +3760,10 @@ bool LLViewerMediaImpl::shouldShowBasedOnClass() const
bool attached_to_another_avatar = isAttachedToAnotherAvatar();
bool inside_parcel = isInAgentParcel();
- // llinfos << " hasFocus = " << hasFocus() <<
+ // LL_INFOS() << " hasFocus = " << hasFocus() <<
// " others = " << (attached_to_another_avatar && gSavedSettings.getBOOL(LLViewerMedia::SHOW_MEDIA_ON_OTHERS_SETTING)) <<
// " within = " << (inside_parcel && gSavedSettings.getBOOL(LLViewerMedia::SHOW_MEDIA_WITHIN_PARCEL_SETTING)) <<
- // " outside = " << (!inside_parcel && gSavedSettings.getBOOL(LLViewerMedia::SHOW_MEDIA_OUTSIDE_PARCEL_SETTING)) << llendl;
+ // " outside = " << (!inside_parcel && gSavedSettings.getBOOL(LLViewerMedia::SHOW_MEDIA_OUTSIDE_PARCEL_SETTING)) << LL_ENDL;
// If it has focus, we should show it
// This is incorrect, and causes EXT-6750 (disabled attachment media still plays)
diff --git a/indra/newview/llviewermedia_streamingaudio.cpp b/indra/newview/llviewermedia_streamingaudio.cpp
index e2a74e8e3c..c107e8472c 100755
--- a/indra/newview/llviewermedia_streamingaudio.cpp
+++ b/indra/newview/llviewermedia_streamingaudio.cpp
@@ -56,20 +56,20 @@ void LLStreamingAudio_MediaPlugins::start(const std::string& url)
if (!mMediaPlugin) // lazy-init the underlying media plugin
{
mMediaPlugin = initializeMedia("audio/mpeg"); // assumes that whatever media implementation supports mp3 also supports vorbis.
- llinfos << "streaming audio mMediaPlugin is now " << mMediaPlugin << llendl;
+ LL_INFOS() << "streaming audio mMediaPlugin is now " << mMediaPlugin << LL_ENDL;
}
if(!mMediaPlugin)
return;
if (!url.empty()) {
- llinfos << "Starting internet stream: " << url << llendl;
+ LL_INFOS() << "Starting internet stream: " << url << LL_ENDL;
mURL = url;
mMediaPlugin->loadURI ( url );
mMediaPlugin->start();
- llinfos << "Playing stream..." << llendl;
+ LL_INFOS() << "Playing stream..." << LL_ENDL;
} else {
- llinfos << "setting stream to NULL"<< llendl;
+ LL_INFOS() << "setting stream to NULL"<< LL_ENDL;
mURL.clear();
mMediaPlugin->stop();
}
@@ -77,7 +77,7 @@ void LLStreamingAudio_MediaPlugins::start(const std::string& url)
void LLStreamingAudio_MediaPlugins::stop()
{
- llinfos << "Stopping internet stream." << llendl;
+ LL_INFOS() << "Stopping internet stream." << LL_ENDL;
if(mMediaPlugin)
{
mMediaPlugin->stop();
@@ -93,12 +93,12 @@ void LLStreamingAudio_MediaPlugins::pause(int pause)
if(pause)
{
- llinfos << "Pausing internet stream." << llendl;
+ LL_INFOS() << "Pausing internet stream." << LL_ENDL;
mMediaPlugin->pause();
}
else
{
- llinfos << "Unpausing internet stream." << llendl;
+ LL_INFOS() << "Unpausing internet stream." << LL_ENDL;
mMediaPlugin->start();
}
}
diff --git a/indra/newview/llviewermediafocus.cpp b/indra/newview/llviewermediafocus.cpp
index 297906803b..aa019dfdd8 100755
--- a/indra/newview/llviewermediafocus.cpp
+++ b/indra/newview/llviewermediafocus.cpp
@@ -108,7 +108,7 @@ void LLViewerMediaFocus::setFocusFace(LLPointer<LLViewerObject> objectp, S32 fac
else
{
// This should never happen.
- llwarns << "Can't find media entry for focused face" << llendl;
+ LL_WARNS() << "Can't find media entry for focused face" << LL_ENDL;
}
media_impl->focus(true);
@@ -223,7 +223,7 @@ void LLViewerMediaFocus::setCameraZoom(LLViewerObject* object, LLVector3 normal,
F32 aspect_ratio = getBBoxAspectRatio(bbox, normal, &height, &width, &depth);
F32 camera_aspect = LLViewerCamera::getInstance()->getAspect();
- lldebugs << "normal = " << normal << ", aspect_ratio = " << aspect_ratio << ", camera_aspect = " << camera_aspect << llendl;
+ LL_DEBUGS() << "normal = " << normal << ", aspect_ratio = " << aspect_ratio << ", camera_aspect = " << camera_aspect << LL_ENDL;
// We will normally use the side of the volume aligned with the short side of the screen (i.e. the height for
// a screen in a landscape aspect ratio), however there is an edge case where the aspect ratio of the object is
@@ -241,14 +241,14 @@ void LLViewerMediaFocus::setCameraZoom(LLViewerObject* object, LLVector3 normal,
angle_of_view = llmax(0.1f, LLViewerCamera::getInstance()->getView() * LLViewerCamera::getInstance()->getAspect());
distance = width * 0.5 * padding_factor / tan(angle_of_view * 0.5f );
- lldebugs << "using width (" << width << "), angle_of_view = " << angle_of_view << ", distance = " << distance << llendl;
+ LL_DEBUGS() << "using width (" << width << "), angle_of_view = " << angle_of_view << ", distance = " << distance << LL_ENDL;
}
else
{
angle_of_view = llmax(0.1f, LLViewerCamera::getInstance()->getView());
distance = height * 0.5 * padding_factor / tan(angle_of_view * 0.5f );
- lldebugs << "using height (" << height << "), angle_of_view = " << angle_of_view << ", distance = " << distance << llendl;
+ LL_DEBUGS() << "using height (" << height << "), angle_of_view = " << angle_of_view << ", distance = " << distance << LL_ENDL;
}
distance += depth * 0.5;
@@ -452,7 +452,7 @@ F32 LLViewerMediaFocus::getBBoxAspectRatio(const LLBBox& bbox, const LLVector3&
F32 dot1 = 0.f;
F32 dot2 = 0.f;
- lldebugs << "bounding box local size = " << bbox_max << ", local_normal = " << local_normal << llendl;
+ LL_DEBUGS() << "bounding box local size = " << bbox_max << ", local_normal = " << local_normal << LL_ENDL;
// The largest component of the localized normal vector is the depth component
// meaning that the other two are the legs of the rectangle.
@@ -465,21 +465,21 @@ F32 LLViewerMediaFocus::getBBoxAspectRatio(const LLBBox& bbox, const LLVector3&
if(XgtY && XgtZ)
{
- lldebugs << "x component of normal is longest, using y and z" << llendl;
+ LL_DEBUGS() << "x component of normal is longest, using y and z" << LL_ENDL;
comp1.mV[VY] = bbox_max.mV[VY];
comp2.mV[VZ] = bbox_max.mV[VZ];
*depth = bbox_max.mV[VX];
}
else if(!XgtY && YgtZ)
{
- lldebugs << "y component of normal is longest, using x and z" << llendl;
+ LL_DEBUGS() << "y component of normal is longest, using x and z" << LL_ENDL;
comp1.mV[VX] = bbox_max.mV[VX];
comp2.mV[VZ] = bbox_max.mV[VZ];
*depth = bbox_max.mV[VY];
}
else
{
- lldebugs << "z component of normal is longest, using x and y" << llendl;
+ LL_DEBUGS() << "z component of normal is longest, using x and y" << LL_ENDL;
comp1.mV[VX] = bbox_max.mV[VX];
comp2.mV[VY] = bbox_max.mV[VY];
*depth = bbox_max.mV[VZ];
@@ -493,19 +493,19 @@ F32 LLViewerMediaFocus::getBBoxAspectRatio(const LLBBox& bbox, const LLVector3&
*height = comp1.length();
*width = comp2.length();
- lldebugs << "comp1 = " << comp1 << ", height = " << *height << llendl;
- lldebugs << "comp2 = " << comp2 << ", width = " << *width << llendl;
+ LL_DEBUGS() << "comp1 = " << comp1 << ", height = " << *height << LL_ENDL;
+ LL_DEBUGS() << "comp2 = " << comp2 << ", width = " << *width << LL_ENDL;
}
else
{
*height = comp2.length();
*width = comp1.length();
- lldebugs << "comp2 = " << comp2 << ", height = " << *height << llendl;
- lldebugs << "comp1 = " << comp1 << ", width = " << *width << llendl;
+ LL_DEBUGS() << "comp2 = " << comp2 << ", height = " << *height << LL_ENDL;
+ LL_DEBUGS() << "comp1 = " << comp1 << ", width = " << *width << LL_ENDL;
}
- lldebugs << "returning " << (*width / *height) << llendl;
+ LL_DEBUGS() << "returning " << (*width / *height) << LL_ENDL;
// Return the aspect ratio.
return *width / *height;
@@ -560,7 +560,7 @@ void LLViewerMediaFocus::focusZoomOnMedia(LLUUID media_id)
if(normal.isNull())
{
// If that didn't work, use the inverse of the camera "look at" axis, which should keep the camera pointed in the same direction.
-// llinfos << "approximate face normal invalid, using camera direction." << llendl;
+// LL_INFOS() << "approximate face normal invalid, using camera direction." << LL_ENDL;
normal = LLViewerCamera::getInstance()->getAtAxis();
normal *= (F32)-1.0f;
}
diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp
index c7c8da27f3..88f1dd14ff 100755
--- a/indra/newview/llviewermenu.cpp
+++ b/indra/newview/llviewermenu.cpp
@@ -126,6 +126,7 @@
#include "lltoolgrab.h"
#include "llwindow.h"
#include "llpathfindingmanager.h"
+#include "llstartup.h"
#include "boost/unordered_map.hpp"
using namespace LLAvatarAppearanceDefines;
@@ -482,14 +483,12 @@ void init_menus()
gAttachSubMenu = gMenuBarView->findChildMenuByName("Attach Object", TRUE);
gDetachSubMenu = gMenuBarView->findChildMenuByName("Detach Object", TRUE);
-#if !MEM_TRACK_MEM
// Don't display the Memory console menu if the feature is turned off
LLMenuItemCheckGL *memoryMenu = gMenuBarView->getChild<LLMenuItemCheckGL>("Memory", TRUE);
if (memoryMenu)
{
memoryMenu->setVisible(FALSE);
}
-#endif
gMenuBarView->createJumpKeys();
@@ -528,19 +527,13 @@ class LLAdvancedToggleConsole : public view_listener_t
}
else if ("fast timers" == console_type)
{
- LLFloaterReg::toggleInstance("fast_timers");
+ LLFloaterReg::toggleInstance("block_timers");
}
else if ("scene view" == console_type)
{
toggle_visibility( (void*)gSceneView);
}
-#if MEM_TRACK_MEM
- else if ("memory view" == console_type)
- {
- toggle_visibility( (void*)gDebugView->mMemoryView );
- }
-#endif
return true;
}
};
@@ -560,18 +553,12 @@ class LLAdvancedCheckConsole : public view_listener_t
}
else if ("fast timers" == console_type)
{
- new_value = LLFloaterReg::instanceVisible("fast_timers");
+ new_value = LLFloaterReg::instanceVisible("block_timers");
}
else if ("scene view" == console_type)
{
new_value = get_visibility( (void*) gSceneView);
}
-#if MEM_TRACK_MEM
- else if ("memory view" == console_type)
- {
- new_value = get_visibility( (void*)gDebugView->mMemoryView );
- }
-#endif
return new_value;
}
@@ -1660,7 +1647,7 @@ class LLAdvancedAnimTenFaster : public view_listener_t
{
bool handleEvent(const LLSD& userdata)
{
- //llinfos << "LLAdvancedAnimTenFaster" << llendl;
+ //LL_INFOS() << "LLAdvancedAnimTenFaster" << LL_ENDL;
F32 time_factor = LLMotionController::getCurrentTimeFactor();
time_factor = llmin(time_factor + 0.1f, 2.f); // Upper limit is 200% speed
set_all_animation_time_factors(time_factor);
@@ -1672,7 +1659,7 @@ class LLAdvancedAnimTenSlower : public view_listener_t
{
bool handleEvent(const LLSD& userdata)
{
- //llinfos << "LLAdvancedAnimTenSlower" << llendl;
+ //LL_INFOS() << "LLAdvancedAnimTenSlower" << LL_ENDL;
F32 time_factor = LLMotionController::getCurrentTimeFactor();
time_factor = llmax(time_factor - 0.1f, 0.1f); // Lower limit is at 10% of normal speed
set_all_animation_time_factors(time_factor);
@@ -1971,9 +1958,9 @@ class LLAdvancedViewerEventRecorder : public view_listener_t
std::string command = userdata.asString();
if ("start playback" == command)
{
- llinfos << "Event Playback starting" << llendl;
+ LL_INFOS() << "Event Playback starting" << LL_ENDL;
LLViewerEventRecorder::instance().playbackRecording();
- llinfos << "Event Playback completed" << llendl;
+ LL_INFOS() << "Event Playback completed" << LL_ENDL;
}
else if ("stop playback" == command)
{
@@ -1982,12 +1969,12 @@ class LLAdvancedViewerEventRecorder : public view_listener_t
else if ("start recording" == command)
{
LLViewerEventRecorder::instance().setEventLoggingOn();
- llinfos << "Event recording started" << llendl;
+ LL_INFOS() << "Event recording started" << LL_ENDL;
}
else if ("stop recording" == command)
{
LLViewerEventRecorder::instance().setEventLoggingOff();
- llinfos << "Event recording stopped" << llendl;
+ LL_INFOS() << "Event recording stopped" << LL_ENDL;
}
return true;
@@ -2594,11 +2581,11 @@ bool enable_object_touch(LLUICtrl* ctrl)
LLSelectNode* node = LLSelectMgr::getInstance()->getSelection()->getFirstRootNode();
if (node && node->mValid && !node->mTouchName.empty())
{
- gMenuHolder->childSetText(item_name, node->mTouchName);
+ gMenuHolder->childSetValue(item_name, node->mTouchName);
}
else
{
- gMenuHolder->childSetText(item_name, get_default_item_label(item_name));
+ gMenuHolder->childSetValue(item_name, get_default_item_label(item_name));
}
return new_value;
@@ -3234,7 +3221,7 @@ class LLAvatarDebug : public view_listener_t
{
((LLVOAvatarSelf *)avatar)->dumpLocalTextures();
}
- llinfos << "Dumping temporary asset data to simulator logs for avatar " << avatar->getID() << llendl;
+ LL_INFOS() << "Dumping temporary asset data to simulator logs for avatar " << avatar->getID() << LL_ENDL;
std::vector<std::string> strings;
strings.push_back(avatar->getID().asString());
LLUUID invoice;
@@ -3508,7 +3495,7 @@ void handle_buy_contents(LLSaleInfo sale_info)
void handle_region_dump_temp_asset_data(void*)
{
- llinfos << "Dumping temporary asset data to simulator logs" << llendl;
+ LL_INFOS() << "Dumping temporary asset data to simulator logs" << LL_ENDL;
std::vector<std::string> strings;
LLUUID invoice;
send_generic_message("dumptempassetdata", strings, invoice);
@@ -3516,7 +3503,7 @@ void handle_region_dump_temp_asset_data(void*)
void handle_region_clear_temp_asset_data(void*)
{
- llinfos << "Clearing temporary asset data" << llendl;
+ LL_INFOS() << "Clearing temporary asset data" << LL_ENDL;
std::vector<std::string> strings;
LLUUID invoice;
send_generic_message("cleartempassetdata", strings, invoice);
@@ -3527,14 +3514,14 @@ void handle_region_dump_settings(void*)
LLViewerRegion* regionp = gAgent.getRegion();
if (regionp)
{
- llinfos << "Damage: " << (regionp->getAllowDamage() ? "on" : "off") << llendl;
- llinfos << "Landmark: " << (regionp->getAllowLandmark() ? "on" : "off") << llendl;
- llinfos << "SetHome: " << (regionp->getAllowSetHome() ? "on" : "off") << llendl;
- llinfos << "ResetHome: " << (regionp->getResetHomeOnTeleport() ? "on" : "off") << llendl;
- llinfos << "SunFixed: " << (regionp->getSunFixed() ? "on" : "off") << llendl;
- llinfos << "BlockFly: " << (regionp->getBlockFly() ? "on" : "off") << llendl;
- llinfos << "AllowP2P: " << (regionp->getAllowDirectTeleport() ? "on" : "off") << llendl;
- llinfos << "Water: " << (regionp->getWaterHeight()) << llendl;
+ LL_INFOS() << "Damage: " << (regionp->getAllowDamage() ? "on" : "off") << LL_ENDL;
+ LL_INFOS() << "Landmark: " << (regionp->getAllowLandmark() ? "on" : "off") << LL_ENDL;
+ LL_INFOS() << "SetHome: " << (regionp->getAllowSetHome() ? "on" : "off") << LL_ENDL;
+ LL_INFOS() << "ResetHome: " << (regionp->getResetHomeOnTeleport() ? "on" : "off") << LL_ENDL;
+ LL_INFOS() << "SunFixed: " << (regionp->getSunFixed() ? "on" : "off") << LL_ENDL;
+ LL_INFOS() << "BlockFly: " << (regionp->getBlockFly() ? "on" : "off") << LL_ENDL;
+ LL_INFOS() << "AllowP2P: " << (regionp->getAllowDirectTeleport() ? "on" : "off") << LL_ENDL;
+ LL_INFOS() << "Water: " << (regionp->getWaterHeight()) << LL_ENDL;
}
}
@@ -3565,7 +3552,7 @@ void handle_dump_focus()
{
LLUICtrl *ctrl = dynamic_cast<LLUICtrl*>(gFocusMgr.getKeyboardFocus());
- llinfos << "Keyboard focus " << (ctrl ? ctrl->getName() : "(none)") << llendl;
+ LL_INFOS() << "Keyboard focus " << (ctrl ? ctrl->getName() : "(none)") << LL_ENDL;
}
class LLSelfStandUp : public view_listener_t
@@ -3777,7 +3764,7 @@ void process_grant_godlike_powers(LLMessageSystem* msg, void**)
}
else
{
- llwarns << "Grant godlike for wrong agent " << agent_id << llendl;
+ LL_WARNS() << "Grant godlike for wrong agent " << agent_id << LL_ENDL;
}
}
@@ -4119,7 +4106,7 @@ class LLEditEnableDuplicate : public view_listener_t
void handle_duplicate_in_place(void*)
{
- llinfos << "handle_duplicate_in_place" << llendl;
+ LL_INFOS() << "handle_duplicate_in_place" << LL_ENDL;
LLVector3 offset(0.f, 0.f, 0.f);
LLSelectMgr::getInstance()->selectDuplicate(offset, TRUE);
@@ -4290,13 +4277,16 @@ static bool get_derezzable_objects(
EDeRezDestination dest,
std::string& error,
LLViewerRegion*& first_region,
- LLDynamicArray<LLViewerObjectPtr>* derez_objectsp,
+ std::vector<LLViewerObjectPtr>* derez_objectsp,
bool only_check = false)
{
bool found = false;
LLObjectSelectionHandle selection = LLSelectMgr::getInstance()->getSelection();
+ if (derez_objectsp)
+ derez_objectsp->reserve(selection->getRootObjectCount());
+
// Check conditions that we can't deal with, building a list of
// everything that we'll actually be derezzing.
for (LLObjectSelection::valid_root_iterator iter = selection->valid_root_begin();
@@ -4333,7 +4323,7 @@ static bool get_derezzable_objects(
&& dest != DRD_RETURN_TO_OWNER)
{
// this object is an asset container, derez its contents, not it
- llwarns << "Attempt to derez deprecated AssetContainer object type not supported." << llendl;
+ LL_WARNS() << "Attempt to derez deprecated AssetContainer object type not supported." << LL_ENDL;
/*
object->requestInventory(container_inventory_arrived,
(void *)(BOOL)(DRD_TAKE_INTO_AGENT_INVENTORY == dest));
@@ -4375,7 +4365,7 @@ static bool get_derezzable_objects(
break;
if (derez_objectsp)
- derez_objectsp->put(object);
+ derez_objectsp->push_back(object);
}
}
@@ -4395,16 +4385,16 @@ static void derez_objects(
const LLUUID& dest_id,
LLViewerRegion*& first_region,
std::string& error,
- LLDynamicArray<LLViewerObjectPtr>* objectsp)
+ std::vector<LLViewerObjectPtr>* objectsp)
{
- LLDynamicArray<LLViewerObjectPtr> derez_objects;
+ std::vector<LLViewerObjectPtr> derez_objects;
if (!objectsp) // if objects to derez not specified
{
// get them from selection
if (!get_derezzable_objects(dest, error, first_region, &derez_objects, false))
{
- llwarns << "No objects to derez" << llendl;
+ LL_WARNS() << "No objects to derez" << LL_ENDL;
return;
}
@@ -4424,13 +4414,13 @@ static void derez_objects(
// satisfy anybody.
const S32 MAX_ROOTS_PER_PACKET = 250;
const S32 MAX_PACKET_COUNT = 254;
- F32 packets = ceil((F32)objectsp->count() / (F32)MAX_ROOTS_PER_PACKET);
+ F32 packets = ceil((F32)objectsp->size() / (F32)MAX_ROOTS_PER_PACKET);
if(packets > (F32)MAX_PACKET_COUNT)
{
error = "AcquireErrorTooManyObjects";
}
- if(error.empty() && objectsp->count() > 0)
+ if(error.empty() && objectsp->size() > 0)
{
U8 d = (U8)dest;
LLUUID tid;
@@ -4455,11 +4445,11 @@ static void derez_objects(
msg->addU8Fast(_PREHASH_PacketCount, packet_count);
msg->addU8Fast(_PREHASH_PacketNumber, packet_number);
objects_in_packet = 0;
- while((object_index < objectsp->count())
+ while((object_index < objectsp->size())
&& (objects_in_packet++ < MAX_ROOTS_PER_PACKET))
{
- LLViewerObject* object = objectsp->get(object_index++);
+ LLViewerObject* object = objectsp->at(object_index++);
msg->nextBlockFast(_PREHASH_ObjectData);
msg->addU32Fast(_PREHASH_ObjectLocalID, object->getLocalID());
// VEFFECT: DerezObject
@@ -4539,7 +4529,7 @@ private:
LLObjectSelectionHandle mObjectSelection;
- LLDynamicArray<LLViewerObjectPtr> mReturnableObjects;
+ std::vector<LLViewerObjectPtr> mReturnableObjects;
std::string mError;
LLViewerRegion* mFirstRegion;
};
@@ -4892,7 +4882,7 @@ bool callback_show_buy_currency(const LLSD& notification, const LLSD& response)
S32 option = LLNotificationsUtil::getSelectedOption(notification, response);
if (0 == option)
{
- llinfos << "Loading page " << LLNotifications::instance().getGlobalString("BUY_CURRENCY_URL") << llendl;
+ LL_INFOS() << "Loading page " << LLNotifications::instance().getGlobalString("BUY_CURRENCY_URL") << LL_ENDL;
LLWeb::loadURL(LLNotifications::instance().getGlobalString("BUY_CURRENCY_URL"));
}
return false;
@@ -5411,7 +5401,7 @@ public:
};
LLObjectSelectionHandle mObjectSelection;
- LLDynamicArray<LLViewerObjectPtr> mReturnableObjects;
+ std::vector<LLViewerObjectPtr> mReturnableObjects;
std::string mError;
LLViewerRegion *mFirstRegion;
};
@@ -5579,7 +5569,7 @@ void print_agent_nvpairs(void*)
{
LLViewerObject *objectp;
- llinfos << "Agent Name Value Pairs" << llendl;
+ LL_INFOS() << "Agent Name Value Pairs" << LL_ENDL;
objectp = gObjectList.findObject(gAgentID);
if (objectp)
@@ -5588,10 +5578,10 @@ void print_agent_nvpairs(void*)
}
else
{
- llinfos << "Can't find agent object" << llendl;
+ LL_INFOS() << "Can't find agent object" << LL_ENDL;
}
- llinfos << "Camera at " << gAgentCamera.getCameraPositionGlobal() << llendl;
+ LL_INFOS() << "Camera at " << gAgentCamera.getCameraPositionGlobal() << LL_ENDL;
}
void show_debug_menus()
@@ -5644,7 +5634,7 @@ void toggle_debug_menus(void*)
// {
// return;
// }
-// llinfos << "Exporting selected objects:" << llendl;
+// LL_INFOS() << "Exporting selected objects:" << LL_ENDL;
// gExporterRequestID.generate();
// gExportDirectory = "";
@@ -5663,7 +5653,7 @@ void toggle_debug_menus(void*)
// LLViewerObject* object = node->getObject();
// msg->nextBlockFast(_PREHASH_ObjectData);
// msg->addUUIDFast(_PREHASH_ObjectID, object->getID());
-// llinfos << "Object: " << object->getID() << llendl;
+// LL_INFOS() << "Object: " << object->getID() << LL_ENDL;
// }
// msg->sendReliable(gAgent.getRegion()->getHost());
@@ -6005,11 +5995,11 @@ bool enable_object_sit(LLUICtrl* ctrl)
LLSelectNode* node = LLSelectMgr::getInstance()->getSelection()->getFirstRootNode();
if (node && node->mValid && !node->mSitName.empty())
{
- gMenuHolder->childSetText(item_name, node->mSitName);
+ gMenuHolder->childSetValue(item_name, node->mSitName);
}
else
{
- gMenuHolder->childSetText(item_name, get_default_item_label(item_name));
+ gMenuHolder->childSetValue(item_name, get_default_item_label(item_name));
}
}
return !sitting_on_sel && is_object_sittable();
@@ -6199,7 +6189,7 @@ class LLPromptShowURL : public view_listener_t
}
else
{
- llinfos << "PromptShowURL invalid parameters! Expecting \"ALERT,URL\"." << llendl;
+ LL_INFOS() << "PromptShowURL invalid parameters! Expecting \"ALERT,URL\"." << LL_ENDL;
}
return true;
}
@@ -6232,7 +6222,7 @@ class LLPromptShowFile : public view_listener_t
}
else
{
- llinfos << "PromptShowFile invalid parameters! Expecting \"ALERT,FILE\"." << llendl;
+ LL_INFOS() << "PromptShowFile invalid parameters! Expecting \"ALERT,FILE\"." << LL_ENDL;
}
return true;
}
@@ -6515,7 +6505,7 @@ void callback_attachment_drop(const LLSD& notification, const LLSD& response)
if (!object)
{
- llwarns << "handle_drop_attachment() - no object to drop" << llendl;
+ LL_WARNS() << "handle_drop_attachment() - no object to drop" << LL_ENDL;
return;
}
@@ -6532,13 +6522,13 @@ void callback_attachment_drop(const LLSD& notification, const LLSD& response)
if (!object)
{
- llwarns << "handle_detach() - no object to detach" << llendl;
+ LL_WARNS() << "handle_detach() - no object to detach" << LL_ENDL;
return;
}
if (object->isAvatar())
{
- llwarns << "Trying to detach avatar from avatar." << llendl;
+ LL_WARNS() << "Trying to detach avatar from avatar." << LL_ENDL;
return;
}
@@ -6563,7 +6553,7 @@ class LLAttachmentDrop : public view_listener_t
}
else
{
- llwarns << "Drop object not found" << llendl;
+ LL_WARNS() << "Drop object not found" << LL_ENDL;
return true;
}
@@ -6637,7 +6627,7 @@ class LLAttachmentDetach : public view_listener_t
LLViewerObject *object = LLSelectMgr::getInstance()->getSelection()->getPrimaryObject();
if (!object)
{
- llwarns << "handle_detach() - no object to detach" << llendl;
+ LL_WARNS() << "handle_detach() - no object to detach" << LL_ENDL;
return true;
}
@@ -6654,13 +6644,13 @@ class LLAttachmentDetach : public view_listener_t
if (!object)
{
- llwarns << "handle_detach() - no object to detach" << llendl;
+ LL_WARNS() << "handle_detach() - no object to detach" << LL_ENDL;
return true;
}
if (object->isAvatar())
{
- llwarns << "Trying to detach avatar from avatar." << llendl;
+ LL_WARNS() << "Trying to detach avatar from avatar." << LL_ENDL;
return true;
}
@@ -6924,14 +6914,14 @@ void queue_actions(LLFloaterScriptQueue* q, const std::string& msg)
}
else
{
- llerrs << "Bad logic." << llendl;
+ LL_ERRS() << "Bad logic." << LL_ENDL;
}
}
else
{
if (!q->start())
{
- llwarns << "Unexpected script compile failure." << llendl;
+ LL_WARNS() << "Unexpected script compile failure." << LL_ENDL;
}
}
}
@@ -6986,7 +6976,7 @@ class LLToolsSelectedScriptAction : public view_listener_t
}
else
{
- llwarns << "Failed to generate LLFloaterScriptQueue with action: " << action << llendl;
+ LL_WARNS() << "Failed to generate LLFloaterScriptQueue with action: " << action << LL_ENDL;
}
return true;
}
@@ -7118,12 +7108,12 @@ void handle_dump_attachments(void*)
!attached_object->mDrawable->isRenderType(0));
LLVector3 pos;
if (visible) pos = attached_object->mDrawable->getPosition();
- llinfos << "ATTACHMENT " << key << ": item_id=" << attached_object->getAttachmentItemID()
+ LL_INFOS() << "ATTACHMENT " << key << ": item_id=" << attached_object->getAttachmentItemID()
<< (attached_object ? " present " : " absent ")
<< (visible ? "visible " : "invisible ")
<< " at " << pos
<< " and " << (visible ? attached_object->getPosition() : LLVector3::zero)
- << llendl;
+ << LL_ENDL;
}
}
}
@@ -7556,7 +7546,7 @@ void handle_dump_avatar_local_textures(void*)
void handle_dump_timers()
{
- LLFastTimer::dumpCurTimes();
+ LLTrace::BlockTimer::dumpCurTimes();
}
void handle_debug_avatar_textures(void*)
@@ -7574,7 +7564,7 @@ void handle_grab_baked_texture(void* data)
if (!isAgentAvatarValid()) return;
const LLUUID& asset_id = gAgentAvatarp->grabBakedTexture(baked_tex_index);
- LL_INFOS("texture") << "Adding baked texture " << asset_id << " to inventory." << llendl;
+ LL_INFOS("texture") << "Adding baked texture " << asset_id << " to inventory." << LL_ENDL;
LLAssetType::EType asset_type = LLAssetType::AT_TEXTURE;
LLInventoryType::EType inv_type = LLInventoryType::IT_TEXTURE;
const LLUUID folder_id = gInventory.findCategoryUUIDForType(LLFolderType::assetTypeToFolderType(asset_type));
@@ -7630,7 +7620,7 @@ void handle_grab_baked_texture(void* data)
}
else
{
- llwarns << "Can't find a folder to put it in" << llendl;
+ LL_WARNS() << "Can't find a folder to put it in" << LL_ENDL;
}
}
@@ -7844,7 +7834,7 @@ void handle_buy_currency_test(void*)
replace["[LANGUAGE]"] = LLUI::getLanguage();
LLStringUtil::format(url, replace);
- llinfos << "buy currency url " << url << llendl;
+ LL_INFOS() << "buy currency url " << url << LL_ENDL;
LLFloaterReg::showInstance("buy_currency_html", LLSD(url));
}
@@ -8279,7 +8269,7 @@ class LLWorldEnvPreset : public view_listener_t
}
else
{
- llwarns << "Unknown item selected" << llendl;
+ LL_WARNS() << "Unknown item selected" << LL_ENDL;
}
return true;
@@ -8312,7 +8302,7 @@ class LLWorldEnableEnvPreset : public view_listener_t
}
else
{
- llwarns << "Unknown item" << llendl;
+ LL_WARNS() << "Unknown item" << LL_ENDL;
}
return false;
diff --git a/indra/newview/llviewermenufile.cpp b/indra/newview/llviewermenufile.cpp
index be78603e2d..2930c130df 100755
--- a/indra/newview/llviewermenufile.cpp
+++ b/indra/newview/llviewermenufile.cpp
@@ -253,7 +253,7 @@ const std::string upload_pick(void* data)
LLFilePicker& picker = LLFilePicker::instance();
if (!picker.getOpenFile(type))
{
- llinfos << "Couldn't import objects from file" << llendl;
+ LL_INFOS() << "Couldn't import objects from file" << LL_ENDL;
return std::string();
}
@@ -327,7 +327,7 @@ const std::string upload_pick(void* data)
std::string error_msg;
if (check_for_invalid_wav_formats(filename,error_msg))
{
- llinfos << error_msg << ": " << filename << llendl;
+ LL_INFOS() << error_msg << ": " << filename << LL_ENDL;
LLSD args;
args["FILE"] = filename;
LLNotificationsUtil::add( error_msg, args );
@@ -455,7 +455,7 @@ class LLFileUploadBulk : public view_listener_t
}
else
{
- llinfos << "Couldn't import objects from file" << llendl;
+ LL_INFOS() << "Couldn't import objects from file" << LL_ENDL;
}
return true;
}
@@ -463,11 +463,11 @@ class LLFileUploadBulk : public view_listener_t
void upload_error(const std::string& error_message, const std::string& label, const std::string& filename, const LLSD& args)
{
- llwarns << error_message << llendl;
+ LL_WARNS() << error_message << LL_ENDL;
LLNotificationsUtil::add(label, args);
if(LLFile::remove(filename) == -1)
{
- lldebugs << "unable to remove temp file" << llendl;
+ LL_DEBUGS() << "unable to remove temp file" << LL_ENDL;
}
LLFilePicker::instance().reset();
}
@@ -542,7 +542,7 @@ class LLFileTakeSnapshotToDisk : public view_listener_t
formatted = new LLImageJPEG(gSavedSettings.getS32("SnapshotQuality"));
break;
default:
- llwarns << "Unknown local snapshot format: " << fmt << llendl;
+ LL_WARNS() << "Unknown local snapshot format: " << fmt << LL_ENDL;
case LLFloaterSnapshot::SNAPSHOT_FORMAT_PNG:
formatted = new LLImagePNG;
break;
@@ -579,8 +579,8 @@ void handle_compress_image(void*)
{
std::string outfile = infile + ".j2c";
- llinfos << "Input: " << infile << llendl;
- llinfos << "Output: " << outfile << llendl;
+ LL_INFOS() << "Input: " << infile << LL_ENDL;
+ LL_INFOS() << "Output: " << outfile << LL_ENDL;
BOOL success;
@@ -588,11 +588,11 @@ void handle_compress_image(void*)
if (success)
{
- llinfos << "Compression complete" << llendl;
+ LL_INFOS() << "Compression complete" << LL_ENDL;
}
else
{
- llinfos << "Compression failed: " << LLImage::getLastError() << llendl;
+ LL_INFOS() << "Compression failed: " << LLImage::getLastError() << LL_ENDL;
}
infile = picker.getNextFile();
@@ -660,7 +660,7 @@ LLUUID upload_new_resource(
asset_type = LLAssetType::AT_SOUND; // tag it as audio
S32 encode_result = 0;
- llinfos << "Attempting to encode wav as an ogg file" << llendl;
+ LL_INFOS() << "Attempting to encode wav as an ogg file" << LL_ENDL;
encode_result = encode_vorbis_file(src_filename, filename);
@@ -711,8 +711,8 @@ LLUUID upload_new_resource(
"%254s %254s\n",
label, value);
- llinfos << "got: " << label << " = " << value
- << llendl;
+ LL_INFOS() << "got: " << label << " = " << value
+ << LL_ENDL;
if (EOF == tokens_read)
{
@@ -765,7 +765,7 @@ LLUUID upload_new_resource(
// read in and throw out most of the header except for the type
if (fread(buf, header_size, 1, in) != 1)
{
- llwarns << "Short read" << llendl;
+ LL_WARNS() << "Short read" << LL_ENDL;
}
memcpy(&type_num, buf + 16, sizeof(S16)); /* Flawfinder: ignore */
asset_type = (LLAssetType::EType)type_num;
@@ -779,7 +779,7 @@ LLUUID upload_new_resource(
{
if (fwrite(buf, 1, readbytes, out) != readbytes)
{
- llwarns << "Short write" << llendl;
+ LL_WARNS() << "Short write" << LL_ENDL;
}
}
fclose(out);
@@ -797,7 +797,7 @@ LLUUID upload_new_resource(
}
else
{
- llinfos << "Couldn't open .lin file " << src_filename << llendl;
+ LL_INFOS() << "Couldn't open .lin file " << src_filename << LL_ENDL;
}
}
else if (exten == "bvh")
@@ -873,13 +873,13 @@ LLUUID upload_new_resource(
}
else
{
- llwarns << error_message << llendl;
+ LL_WARNS() << error_message << LL_ENDL;
LLSD args;
args["ERROR_MESSAGE"] = error_message;
LLNotificationsUtil::add("ErrorMessage", args);
if(LLFile::remove(filename) == -1)
{
- lldebugs << "unable to remove temp file" << llendl;
+ LL_DEBUGS() << "unable to remove temp file" << LL_ENDL;
}
LLFilePicker::instance().reset();
}
@@ -947,7 +947,7 @@ void upload_done_callback(
if(is_balance_sufficient)
{
// Actually add the upload to inventory
- llinfos << "Adding " << uuid << " to inventory." << llendl;
+ LL_INFOS() << "Adding " << uuid << " to inventory." << LL_ENDL;
const LLUUID folder_id = gInventory.findCategoryUUIDForType(dest_loc);
if(folder_id.notNull())
{
@@ -964,7 +964,7 @@ void upload_done_callback(
}
else
{
- llwarns << "Can't find a folder to put it in" << llendl;
+ LL_WARNS() << "Can't find a folder to put it in" << LL_ENDL;
}
}
}
@@ -1096,17 +1096,17 @@ void upload_new_resource(
if( LLAssetType::AT_SOUND == asset_type )
{
- LLViewerStats::getInstance()->incStat(LLViewerStats::ST_UPLOAD_SOUND_COUNT );
+ add(LLStatViewer::UPLOAD_SOUND, 1);
}
else
if( LLAssetType::AT_TEXTURE == asset_type )
{
- LLViewerStats::getInstance()->incStat(LLViewerStats::ST_UPLOAD_TEXTURE_COUNT );
+ add(LLStatViewer::UPLOAD_TEXTURE, 1);
}
else
if( LLAssetType::AT_ANIMATION == asset_type)
{
- LLViewerStats::getInstance()->incStat(LLViewerStats::ST_UPLOAD_ANIM_COUNT );
+ add(LLStatViewer::ANIMATION_UPLOADS, 1);
}
if(LLInventoryType::IT_NONE == inv_type)
@@ -1129,21 +1129,21 @@ void upload_new_resource(
upload_message.append(display_name);
LLUploadDialog::modalUploadDialog(upload_message);
- llinfos << "*** Uploading: " << llendl;
- llinfos << "Type: " << LLAssetType::lookup(asset_type) << llendl;
- llinfos << "UUID: " << uuid << llendl;
- llinfos << "Name: " << name << llendl;
- llinfos << "Desc: " << desc << llendl;
- llinfos << "Expected Upload Cost: " << expected_upload_cost << llendl;
- lldebugs << "Folder: " << gInventory.findCategoryUUIDForType((destination_folder_type == LLFolderType::FT_NONE) ? LLFolderType::assetTypeToFolderType(asset_type) : destination_folder_type) << llendl;
- lldebugs << "Asset Type: " << LLAssetType::lookup(asset_type) << llendl;
+ LL_INFOS() << "*** Uploading: " << LL_ENDL;
+ LL_INFOS() << "Type: " << LLAssetType::lookup(asset_type) << LL_ENDL;
+ LL_INFOS() << "UUID: " << uuid << LL_ENDL;
+ LL_INFOS() << "Name: " << name << LL_ENDL;
+ LL_INFOS() << "Desc: " << desc << LL_ENDL;
+ LL_INFOS() << "Expected Upload Cost: " << expected_upload_cost << LL_ENDL;
+ LL_DEBUGS() << "Folder: " << gInventory.findCategoryUUIDForType((destination_folder_type == LLFolderType::FT_NONE) ? LLFolderType::assetTypeToFolderType(asset_type) : destination_folder_type) << LL_ENDL;
+ LL_DEBUGS() << "Asset Type: " << LLAssetType::lookup(asset_type) << LL_ENDL;
std::string url = gAgent.getRegion()->getCapability(
"NewFileAgentInventory");
if ( !url.empty() )
{
- llinfos << "New Agent Inventory via capability" << llendl;
+ LL_INFOS() << "New Agent Inventory via capability" << LL_ENDL;
LLSD body;
body = generate_new_resource_upload_capability_body(
@@ -1166,7 +1166,7 @@ void upload_new_resource(
}
else
{
- llinfos << "NewAgentInventory capability not found, new agent inventory via asset system." << llendl;
+ LL_INFOS() << "NewAgentInventory capability not found, new agent inventory via asset system." << LL_ENDL;
// check for adequate funds
// TODO: do this check on the sim
if (LLAssetType::AT_SOUND == asset_type ||
@@ -1231,18 +1231,15 @@ void increase_new_upload_stats(LLAssetType::EType asset_type)
{
if ( LLAssetType::AT_SOUND == asset_type )
{
- LLViewerStats::getInstance()->incStat(
- LLViewerStats::ST_UPLOAD_SOUND_COUNT );
+ add(LLStatViewer::UPLOAD_SOUND, 1);
}
else if ( LLAssetType::AT_TEXTURE == asset_type )
{
- LLViewerStats::getInstance()->incStat(
- LLViewerStats::ST_UPLOAD_TEXTURE_COUNT );
+ add(LLStatViewer::UPLOAD_TEXTURE, 1);
}
else if ( LLAssetType::AT_ANIMATION == asset_type )
{
- LLViewerStats::getInstance()->incStat(
- LLViewerStats::ST_UPLOAD_ANIM_COUNT );
+ add(LLStatViewer::ANIMATION_UPLOADS, 1);
}
}
diff --git a/indra/newview/llviewermenufile.h b/indra/newview/llviewermenufile.h
index 3136358b83..3034d00b22 100755
--- a/indra/newview/llviewermenufile.h
+++ b/indra/newview/llviewermenufile.h
@@ -31,6 +31,8 @@
#include "llassetstorage.h"
#include "llinventorytype.h"
#include "llfilepicker.h"
+#include "llthread.h"
+#include <queue>
class LLTransactionID;
diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp
index df5c7d5c2e..65afdddd16 100755
--- a/indra/newview/llviewermessage.cpp
+++ b/indra/newview/llviewermessage.cpp
@@ -151,6 +151,11 @@ LLFrameTimer gThrottleTimer;
const U32 OFFER_THROTTLE_MAX_COUNT=5; //number of items per time period
const F32 OFFER_THROTTLE_TIME=10.f; //time period in seconds
+// Agent Update Flags (U8)
+const U8 AU_FLAGS_NONE = 0x00;
+const U8 AU_FLAGS_HIDETITLE = 0x01;
+const U8 AU_FLAGS_CLIENT_AUTOPILOT = 0x02;
+
//script permissions
const std::string SCRIPT_QUESTIONS[SCRIPT_PERMISSION_EOF] =
{
@@ -372,9 +377,11 @@ void process_layer_data(LLMessageSystem *mesgsys, void **user_data)
{
LLViewerRegion *regionp = LLWorld::getInstance()->getRegion(mesgsys->getSender());
+ LL_DEBUGS_ONCE("SceneLoadTiming") << "Received layer data" << LL_ENDL;
+
if(!regionp)
{
- llwarns << "Invalid region for layer data." << llendl;
+ LL_WARNS() << "Invalid region for layer data." << LL_ENDL;
return;
}
S32 size;
@@ -400,11 +407,11 @@ void process_layer_data(LLMessageSystem *mesgsys, void **user_data)
LLVLData *vl_datap = new LLVLData(regionp, type, datap, size);
if (mesgsys->getReceiveCompressedSize())
{
- gVLManager.addLayerData(vl_datap, mesgsys->getReceiveCompressedSize());
+ gVLManager.addLayerData(vl_datap, (S32Bytes)mesgsys->getReceiveCompressedSize());
}
else
{
- gVLManager.addLayerData(vl_datap, mesgsys->getReceiveSize());
+ gVLManager.addLayerData(vl_datap, (S32Bytes)mesgsys->getReceiveSize());
}
}
@@ -669,7 +676,7 @@ bool join_group_response(const LLSD& notification, const LLSD& response)
S32 max_groups = gMaxAgentGroups;
if(gAgent.isInGroup(group_id)) ++max_groups;
- if(gAgent.mGroups.count() < max_groups)
+ if(gAgent.mGroups.size() < max_groups)
{
accept_invite = true;
}
@@ -1214,7 +1221,7 @@ void open_inventory_offer(const uuid_vec_t& objects, const std::string& from_nam
const LLInventoryObject *obj = gInventory.getObject(obj_id);
if (!obj)
{
- llwarns << "Cannot find object [ itemID:" << obj_id << " ] to open." << llendl;
+ LL_WARNS() << "Cannot find object [ itemID:" << obj_id << " ] to open." << LL_ENDL;
continue;
}
@@ -1490,7 +1497,7 @@ void LLOfferInfo::handleRespond(const LLSD& notification, const LLSD& response)
const std::string name = notification["name"].asString();
if(mRespondFunctions.find(name) == mRespondFunctions.end())
{
- llwarns << "Unexpected notification name : " << name << llendl;
+ LL_WARNS() << "Unexpected notification name : " << name << LL_ENDL;
llassert(!"Unexpected notification name");
return;
}
@@ -2632,7 +2639,7 @@ void process_improved_im(LLMessageSystem *msg, void **user_data)
LLSD args;
args["SUBJECT"] = subj;
args["MESSAGE"] = mes;
- LLNotifications::instance().add(LLNotification::Params("GroupNotice").substitutions(args).payload(payload).time_stamp(timestamp));
+ LLNotifications::instance().add(LLNotification::Params("GroupNotice").substitutions(args).payload(payload).time_stamp(LLDate(timestamp)));
}
// Also send down the old path for now.
@@ -3458,7 +3465,7 @@ protected:
void handleFailure(int status, const std::string& err_msg)
{
- llwarns << "Translation failed for mesg " << m_origMesg << " toLang " << mToLang << " fromLang " << mFromLang << llendl;
+ LL_WARNS() << "Translation failed for mesg " << m_origMesg << " toLang " << mToLang << " fromLang " << mFromLang << LL_ENDL;
std::string msg = LLTrans::getString("TranslationFailed", LLSD().with("[REASON]", err_msg));
LLStringUtil::replaceString(msg, "\n", " "); // we want one-line error messages
@@ -3907,6 +3914,8 @@ void process_teleport_finish(LLMessageSystem* msg, void**)
// Teleport is finished; it can't be cancelled now.
gViewerWindow->setProgressCancelButtonVisible(FALSE);
+ gPipeline.doResetVertexBuffers(true);
+
// Do teleport effect for where you're leaving
// VEFFECT: TeleportStart
LLHUDEffectSpiral *effectp = (LLHUDEffectSpiral *)LLHUDManager::getInstance()->createViewerEffect(LLHUDObject::LL_HUD_EFFECT_POINT, TRUE);
@@ -4240,7 +4249,7 @@ const F32 THRESHOLD_HEAD_ROT_QDOT = 0.9997f; // ~= 2.5 degrees -- if its less th
const F32 MAX_HEAD_ROT_QDOT = 0.99999f; // ~= 0.5 degrees -- if its greater than this then no need to update head_rot
// between these values we delay the updates (but no more than one second)
-static LLFastTimer::DeclareTimer FTM_AGENT_UPDATE_SEND("Send Message");
+static LLTrace::BlockTimerStatHandle FTM_AGENT_UPDATE_SEND("Send Message");
void send_agent_update(BOOL force_send, BOOL send_reliable)
{
@@ -4417,14 +4426,14 @@ void send_agent_update(BOOL force_send, BOOL send_reliable)
update_sec = cur_sec;
//msg_number = 0;
max_update_count = llmax(max_update_count, update_count);
- llinfos << "Sent " << update_count << " AgentUpdate messages per second, max is " << max_update_count << llendl;
+ LL_INFOS() << "Sent " << update_count << " AgentUpdate messages per second, max is " << max_update_count << LL_ENDL;
}
update_sec = cur_sec;
update_count = 0;
}
*/
- LLFastTimer t(FTM_AGENT_UPDATE_SEND);
+ LL_RECORD_BLOCK_TIME(FTM_AGENT_UPDATE_SEND);
// Build the message
msg->newMessageFast(_PREHASH_AgentUpdate);
msg->nextBlockFast(_PREHASH_AgentData);
@@ -4490,18 +4499,18 @@ void send_agent_update(BOOL force_send, BOOL send_reliable)
// *TODO: Remove this dependency, or figure out a better way to handle
// this hack.
-extern U32 gObjectBits;
+extern U32Bits gObjectData;
void process_object_update(LLMessageSystem *mesgsys, void **user_data)
{
// Update the data counters
if (mesgsys->getReceiveCompressedSize())
{
- gObjectBits += mesgsys->getReceiveCompressedSize() * 8;
+ gObjectData += (U32Bytes)mesgsys->getReceiveCompressedSize();
}
else
{
- gObjectBits += mesgsys->getReceiveSize() * 8;
+ gObjectData += (U32Bytes)mesgsys->getReceiveSize();
}
// Update the object...
@@ -4513,11 +4522,11 @@ void process_compressed_object_update(LLMessageSystem *mesgsys, void **user_data
// Update the data counters
if (mesgsys->getReceiveCompressedSize())
{
- gObjectBits += mesgsys->getReceiveCompressedSize() * 8;
+ gObjectData += (U32Bytes)mesgsys->getReceiveCompressedSize();
}
else
{
- gObjectBits += mesgsys->getReceiveSize() * 8;
+ gObjectData += (U32Bytes)mesgsys->getReceiveSize();
}
// Update the object...
@@ -4529,11 +4538,11 @@ void process_cached_object_update(LLMessageSystem *mesgsys, void **user_data)
// Update the data counters
if (mesgsys->getReceiveCompressedSize())
{
- gObjectBits += mesgsys->getReceiveCompressedSize() * 8;
+ gObjectData += (U32Bytes)mesgsys->getReceiveCompressedSize();
}
else
{
- gObjectBits += mesgsys->getReceiveSize() * 8;
+ gObjectData += (U32Bytes)mesgsys->getReceiveSize();
}
// Update the object...
@@ -4545,38 +4554,40 @@ void process_terse_object_update_improved(LLMessageSystem *mesgsys, void **user_
{
if (mesgsys->getReceiveCompressedSize())
{
- gObjectBits += mesgsys->getReceiveCompressedSize() * 8;
+ gObjectData += (U32Bytes)mesgsys->getReceiveCompressedSize();
}
else
{
- gObjectBits += mesgsys->getReceiveSize() * 8;
+ gObjectData += (U32Bytes)mesgsys->getReceiveSize();
}
gObjectList.processCompressedObjectUpdate(mesgsys, user_data, OUT_TERSE_IMPROVED);
}
-static LLFastTimer::DeclareTimer FTM_PROCESS_OBJECTS("Process Kill Objects");
-
+static LLTrace::BlockTimerStatHandle FTM_PROCESS_OBJECTS("Process Kill Objects");
void process_kill_object(LLMessageSystem *mesgsys, void **user_data)
{
- LLFastTimer t(FTM_PROCESS_OBJECTS);
+ LL_RECORD_BLOCK_TIME(FTM_PROCESS_OBJECTS);
LLUUID id;
- U32 local_id;
- S32 i;
- S32 num_objects;
- num_objects = mesgsys->getNumberOfBlocksFast(_PREHASH_ObjectData);
+ U32 ip = mesgsys->getSenderIP();
+ U32 port = mesgsys->getSenderPort();
+ LLViewerRegion* regionp = NULL;
+ {
+ LLHost host(ip, port);
+ regionp = LLWorld::getInstance()->getRegion(host);
+ }
- for (i = 0; i < num_objects; i++)
+ bool delete_object = LLViewerRegion::sVOCacheCullingEnabled;
+ S32 num_objects = mesgsys->getNumberOfBlocksFast(_PREHASH_ObjectData);
+ for (S32 i = 0; i < num_objects; ++i)
{
+ U32 local_id;
mesgsys->getU32Fast(_PREHASH_ObjectData, _PREHASH_ID, local_id, i);
- LLViewerObjectList::getUUIDFromLocal(id,
- local_id,
- gMessageSystem->getSenderIP(),
- gMessageSystem->getSenderPort());
+ LLViewerObjectList::getUUIDFromLocal(id, local_id, ip, port);
if (id == LLUUID::null)
{
LL_DEBUGS("Messaging") << "Unknown kill for local " << local_id << LL_ENDL;
@@ -4587,9 +4598,12 @@ void process_kill_object(LLMessageSystem *mesgsys, void **user_data)
LL_DEBUGS("Messaging") << "Kill message for local " << local_id << LL_ENDL;
}
- // ...don't kill the avatar
- if (!(id == gAgentID))
+ if (id == gAgentID)
{
+ // never kill our avatar
+ continue;
+ }
+
LLViewerObject *objectp = gObjectList.findObject(id);
if (objectp)
{
@@ -4603,6 +4617,10 @@ void process_kill_object(LLMessageSystem *mesgsys, void **user_data)
// Do the kill
gObjectList.killObject(objectp);
}
+
+ if(delete_object)
+ {
+ regionp->killCacheEntry(local_id);
}
// We should remove the object from selection after it is marked dead by gObjectList to make LLToolGrab,
@@ -4820,145 +4838,18 @@ void process_sim_stats(LLMessageSystem *msg, void **user_data)
F32 stat_value;
msg->getU32("Stat", "StatID", stat_id, i);
msg->getF32("Stat", "StatValue", stat_value, i);
- switch (stat_id)
+ LLStatViewer::SimMeasurementSampler* measurementp = LLStatViewer::SimMeasurementSampler::getInstance((ESimStatID)stat_id);
+
+ if (measurementp )
{
- case LL_SIM_STAT_TIME_DILATION:
- LLViewerStats::getInstance()->mSimTimeDilation.addValue(stat_value);
- break;
- case LL_SIM_STAT_FPS:
- LLViewerStats::getInstance()->mSimFPS.addValue(stat_value);
- break;
- case LL_SIM_STAT_PHYSFPS:
- LLViewerStats::getInstance()->mSimPhysicsFPS.addValue(stat_value);
- break;
- case LL_SIM_STAT_AGENTUPS:
- LLViewerStats::getInstance()->mSimAgentUPS.addValue(stat_value);
- break;
- case LL_SIM_STAT_FRAMEMS:
- LLViewerStats::getInstance()->mSimFrameMsec.addValue(stat_value);
- break;
- case LL_SIM_STAT_NETMS:
- LLViewerStats::getInstance()->mSimNetMsec.addValue(stat_value);
- break;
- case LL_SIM_STAT_SIMOTHERMS:
- LLViewerStats::getInstance()->mSimSimOtherMsec.addValue(stat_value);
- break;
- case LL_SIM_STAT_SIMPHYSICSMS:
- LLViewerStats::getInstance()->mSimSimPhysicsMsec.addValue(stat_value);
- break;
- case LL_SIM_STAT_AGENTMS:
- LLViewerStats::getInstance()->mSimAgentMsec.addValue(stat_value);
- break;
- case LL_SIM_STAT_IMAGESMS:
- LLViewerStats::getInstance()->mSimImagesMsec.addValue(stat_value);
- break;
- case LL_SIM_STAT_SCRIPTMS:
- LLViewerStats::getInstance()->mSimScriptMsec.addValue(stat_value);
- break;
- case LL_SIM_STAT_NUMTASKS:
- LLViewerStats::getInstance()->mSimObjects.addValue(stat_value);
- break;
- case LL_SIM_STAT_NUMTASKSACTIVE:
- LLViewerStats::getInstance()->mSimActiveObjects.addValue(stat_value);
- break;
- case LL_SIM_STAT_NUMAGENTMAIN:
- LLViewerStats::getInstance()->mSimMainAgents.addValue(stat_value);
- break;
- case LL_SIM_STAT_NUMAGENTCHILD:
- LLViewerStats::getInstance()->mSimChildAgents.addValue(stat_value);
- break;
- case LL_SIM_STAT_NUMSCRIPTSACTIVE:
- LLViewerStats::getInstance()->mSimActiveScripts.addValue(stat_value);
- break;
- case LL_SIM_STAT_SCRIPT_EPS:
- LLViewerStats::getInstance()->mSimScriptEPS.addValue(stat_value);
- break;
- case LL_SIM_STAT_INPPS:
- LLViewerStats::getInstance()->mSimInPPS.addValue(stat_value);
- break;
- case LL_SIM_STAT_OUTPPS:
- LLViewerStats::getInstance()->mSimOutPPS.addValue(stat_value);
- break;
- case LL_SIM_STAT_PENDING_DOWNLOADS:
- LLViewerStats::getInstance()->mSimPendingDownloads.addValue(stat_value);
- break;
- case LL_SIM_STAT_PENDING_UPLOADS:
- LLViewerStats::getInstance()->mSimPendingUploads.addValue(stat_value);
- break;
- case LL_SIM_STAT_PENDING_LOCAL_UPLOADS:
- LLViewerStats::getInstance()->mSimPendingLocalUploads.addValue(stat_value);
- break;
- case LL_SIM_STAT_TOTAL_UNACKED_BYTES:
- LLViewerStats::getInstance()->mSimTotalUnackedBytes.addValue(stat_value / 1024.f);
- break;
- case LL_SIM_STAT_PHYSICS_PINNED_TASKS:
- LLViewerStats::getInstance()->mPhysicsPinnedTasks.addValue(stat_value);
- break;
- case LL_SIM_STAT_PHYSICS_LOD_TASKS:
- LLViewerStats::getInstance()->mPhysicsLODTasks.addValue(stat_value);
- break;
- case LL_SIM_STAT_SIMPHYSICSSTEPMS:
- LLViewerStats::getInstance()->mSimSimPhysicsStepMsec.addValue(stat_value);
- break;
- case LL_SIM_STAT_SIMPHYSICSSHAPEMS:
- LLViewerStats::getInstance()->mSimSimPhysicsShapeUpdateMsec.addValue(stat_value);
- break;
- case LL_SIM_STAT_SIMPHYSICSOTHERMS:
- LLViewerStats::getInstance()->mSimSimPhysicsOtherMsec.addValue(stat_value);
- break;
- case LL_SIM_STAT_SIMPHYSICSMEMORY:
- LLViewerStats::getInstance()->mPhysicsMemoryAllocated.addValue(stat_value);
- break;
- case LL_SIM_STAT_SIMSPARETIME:
- LLViewerStats::getInstance()->mSimSpareMsec.addValue(stat_value);
- break;
- case LL_SIM_STAT_SIMSLEEPTIME:
- LLViewerStats::getInstance()->mSimSleepMsec.addValue(stat_value);
- break;
- case LL_SIM_STAT_IOPUMPTIME:
- LLViewerStats::getInstance()->mSimPumpIOMsec.addValue(stat_value);
- break;
- case LL_SIM_STAT_PCTSCRIPTSRUN:
- LLViewerStats::getInstance()->mSimPctScriptsRun.addValue(stat_value);
- break;
- case LL_SIM_STAT_SIMAISTEPTIMEMS:
- LLViewerStats::getInstance()->mSimSimAIStepMsec.addValue(stat_value);
- break;
- case LL_SIM_STAT_SKIPPEDAISILSTEPS_PS:
- LLViewerStats::getInstance()->mSimSimSkippedSilhouetteSteps.addValue(stat_value);
- break;
- case LL_SIM_STAT_PCTSTEPPEDCHARACTERS:
- LLViewerStats::getInstance()->mSimSimPctSteppedCharacters.addValue(stat_value);
- break;
- default:
- // Used to be a commented out warning.
- LL_DEBUGS("Messaging") << "Unknown stat id" << stat_id << LL_ENDL;
- break;
+ measurementp->sample(stat_value);
+ }
+ else
+ {
+ LL_WARNS() << "Unknown sim stat identifier: " << stat_id << LL_ENDL;
}
}
- /*
- msg->getF32Fast(_PREHASH_Statistics, _PREHASH_PhysicsTimeDilation, time_dilation);
- LLViewerStats::getInstance()->mSimTDStat.addValue(time_dilation);
-
- // Process information
- // { CpuUsage F32 }
- // { SimMemTotal F32 }
- // { SimMemRSS F32 }
- // { ProcessUptime F32 }
- F32 cpu_usage;
- F32 sim_mem_total;
- F32 sim_mem_rss;
- F32 process_uptime;
- msg->getF32Fast(_PREHASH_Statistics, _PREHASH_CpuUsage, cpu_usage);
- msg->getF32Fast(_PREHASH_Statistics, _PREHASH_SimMemTotal, sim_mem_total);
- msg->getF32Fast(_PREHASH_Statistics, _PREHASH_SimMemRSS, sim_mem_rss);
- msg->getF32Fast(_PREHASH_Statistics, _PREHASH_ProcessUptime, process_uptime);
- LLViewerStats::getInstance()->mSimCPUUsageStat.addValue(cpu_usage);
- LLViewerStats::getInstance()->mSimMemTotalStat.addValue(sim_mem_total);
- LLViewerStats::getInstance()->mSimMemRSSStat.addValue(sim_mem_rss);
- */
-
//
// Various hacks that aren't statistics, but are being handled here.
//
@@ -5522,8 +5413,8 @@ static std::string reason_from_transaction_type(S32 transaction_type,
return std::string();
default:
- llwarns << "Unknown transaction type "
- << transaction_type << llendl;
+ LL_WARNS() << "Unknown transaction type "
+ << transaction_type << LL_ENDL;
return std::string();
}
}
@@ -5899,7 +5790,7 @@ bool attempt_standard_notification(LLMessageSystem* msgsystem)
std::istringstream llsdData(llsdRaw);
if (!LLSDSerialize::deserialize(llsdBlock, llsdData, llsdRaw.length()))
{
- llwarns << "attempt_standard_notification: Attempted to read notification parameter data into LLSD but failed:" << llsdRaw << llendl;
+ LL_WARNS() << "attempt_standard_notification: Attempted to read notification parameter data into LLSD but failed:" << llsdRaw << LL_ENDL;
}
}
@@ -5949,7 +5840,7 @@ bool attempt_standard_notification(LLMessageSystem* msgsystem)
snap_filename += SCREEN_HOME_FILENAME;
gViewerWindow->saveSnapshot(snap_filename, gViewerWindow->getWindowWidthRaw(), gViewerWindow->getWindowHeightRaw(), FALSE, FALSE);
}
-
+
if (notificationID == "RegionRestartMinutes" ||
notificationID == "RegionRestartSeconds")
{
@@ -5997,7 +5888,7 @@ static void process_special_alert_messages(const std::string & message)
// text should be altered in the notifications.xml files.
if ( message == "You died and have been teleported to your home location")
{
- LLViewerStats::getInstance()->incStat(LLViewerStats::ST_KILLED_COUNT);
+ add(LLStatViewer::KILLED, 1);
}
else if( message == "Home position set." )
{
@@ -6109,10 +6000,10 @@ void process_alert_core(const std::string& message, BOOL modal)
LLFloaterRegionRestarting::close();
}
- std::string new_msg =LLNotifications::instance().getGlobalString(text);
- args["MESSAGE"] = new_msg;
- LLNotificationsUtil::add("SystemMessage", args);
- }
+ std::string new_msg =LLNotifications::instance().getGlobalString(text);
+ args["MESSAGE"] = new_msg;
+ LLNotificationsUtil::add("SystemMessage", args);
+ }
else if (modal)
{
LLSD args;
@@ -6726,7 +6617,7 @@ void process_teleport_failed(LLMessageSystem *msg, void**)
std::istringstream llsd_data(llsd_raw);
if (!LLSDSerialize::deserialize(llsd_block, llsd_data, llsd_raw.length()))
{
- llwarns << "process_teleport_failed: Attempted to read alert parameter data into LLSD but failed:" << llsd_raw << llendl;
+ LL_WARNS() << "process_teleport_failed: Attempted to read alert parameter data into LLSD but failed:" << llsd_raw << LL_ENDL;
}
else
{
@@ -6969,7 +6860,7 @@ bool handle_lure_callback(const LLSD& notification, const LLSD& response)
void handle_lure(const LLUUID& invitee)
{
- LLDynamicArray<LLUUID> ids;
+ std::vector<LLUUID> ids;
ids.push_back(invitee);
handle_lure(ids);
}
@@ -6985,7 +6876,7 @@ void handle_lure(const uuid_vec_t& ids)
edit_args["REGION"] = gAgent.getRegion()->getName();
LLSD payload;
- for (LLDynamicArray<LLUUID>::const_iterator it = ids.begin();
+ for (std::vector<LLUUID>::const_iterator it = ids.begin();
it != ids.end();
++it)
{
@@ -7006,7 +6897,7 @@ bool teleport_request_callback(const LLSD& notification, const LLSD& response)
LLUUID from_id = notification["payload"]["from_id"].asUUID();
if(from_id.isNull())
{
- llwarns << "from_id is NULL" << llendl;
+ LL_WARNS() << "from_id is NULL" << LL_ENDL;
return false;
}
@@ -7242,7 +7133,7 @@ void process_script_dialog(LLMessageSystem* msg, void**)
S32 button_count = msg->getNumberOfBlocks("Buttons");
if (button_count > SCRIPT_DIALOG_MAX_BUTTONS)
{
- llwarns << "Too many script dialog buttons - omitting some" << llendl;
+ LL_WARNS() << "Too many script dialog buttons - omitting some" << LL_ENDL;
button_count = SCRIPT_DIALOG_MAX_BUTTONS;
}
@@ -7402,7 +7293,7 @@ void process_initiate_download(LLMessageSystem* msg, void**)
if (!gXferManager->validateFileForRequest(viewer_filename))
{
- llwarns << "SECURITY: Unauthorized download to local file " << viewer_filename << llendl;
+ LL_WARNS() << "SECURITY: Unauthorized download to local file " << viewer_filename << LL_ENDL;
return;
}
gXferManager->requestFile(viewer_filename,
@@ -7432,10 +7323,10 @@ void process_script_teleport_request(LLMessageSystem* msg, void**)
LLFloaterWorldMap* instance = LLFloaterWorldMap::getInstance();
if(instance)
{
- llinfos << "Object named " << object_name
+ LL_INFOS() << "Object named " << object_name
<< " is offering TP to region "
<< sim_name << " position " << pos
- << llendl;
+ << LL_ENDL;
instance->trackURL(sim_name, (S32)pos.mV[VX], (S32)pos.mV[VY], (S32)pos.mV[VZ]);
LLFloaterReg::showInstance("world_map", "center");
@@ -7581,8 +7472,6 @@ void onCovenantLoadComplete(LLVFS *vfs,
}
else
{
- LLViewerStats::getInstance()->incStat( LLViewerStats::ST_DOWNLOAD_FAILED );
-
if( LL_ERR_ASSET_REQUEST_NOT_IN_DATABASE == status ||
LL_ERR_FILE_EMPTY == status)
{
diff --git a/indra/newview/llviewermessage.h b/indra/newview/llviewermessage.h
index 3237f3fbdd..d8f5c71f8d 100755
--- a/indra/newview/llviewermessage.h
+++ b/indra/newview/llviewermessage.h
@@ -33,7 +33,6 @@
#include "lltransactiontypes.h"
#include "lluuid.h"
#include "message.h"
-#include "stdenums.h"
#include "llnotifications.h"
#include "llextendedstatus.h"
diff --git a/indra/newview/llviewernetwork.cpp b/indra/newview/llviewernetwork.cpp
index e7821d4b9e..faa58d423f 100755
--- a/indra/newview/llviewernetwork.cpp
+++ b/indra/newview/llviewernetwork.cpp
@@ -550,7 +550,7 @@ std::string LLGridManager::getUpdateServiceURL()
std::string update_url_base = gSavedSettings.getString("CmdLineUpdateService");;
if ( !update_url_base.empty() )
{
- LL_INFOS2("UpdaterService","GridManager")
+ LL_INFOS("UpdaterService","GridManager")
<< "Update URL base overridden from command line: " << update_url_base
<< LL_ENDL;
}
@@ -560,7 +560,7 @@ std::string LLGridManager::getUpdateServiceURL()
}
else
{
- LL_WARNS2("UpdaterService","GridManager")
+ LL_WARNS("UpdaterService","GridManager")
<< "The grid property '" << GRID_UPDATE_SERVICE_URL
<< "' is not defined for the grid '" << mGrid << "'"
<< LL_ENDL;
diff --git a/indra/newview/llviewerobject.cpp b/indra/newview/llviewerobject.cpp
index e62998db70..db1f9ac11a 100755
--- a/indra/newview/llviewerobject.cpp
+++ b/indra/newview/llviewerobject.cpp
@@ -29,7 +29,6 @@
#include "llviewerobject.h"
#include "llaudioengine.h"
-#include "imageids.h"
#include "indra_constants.h"
#include "llmath.h"
#include "llflexibleobject.h"
@@ -39,6 +38,7 @@
#include "llfloaterreg.h"
#include "llfontgl.h"
#include "llframetimer.h"
+#include "llhudicon.h"
#include "llinventory.h"
#include "llinventorydefines.h"
#include "llmaterialtable.h"
@@ -52,7 +52,6 @@
#include "llxfermanager.h"
#include "message.h"
#include "object_flags.h"
-#include "timing.h"
#include "llaudiosourcevo.h"
#include "llagent.h"
@@ -100,6 +99,7 @@
#include "lltrans.h"
#include "llsdutil.h"
#include "llmediaentry.h"
+#include "llvocache.h"
//#define DEBUG_UPDATE_TYPE
@@ -112,21 +112,33 @@ BOOL LLViewerObject::sMapDebug = TRUE;
LLColor4 LLViewerObject::sEditSelectColor( 1.0f, 1.f, 0.f, 0.3f); // Edit OK
LLColor4 LLViewerObject::sNoEditSelectColor( 1.0f, 0.f, 0.f, 0.3f); // Can't edit
S32 LLViewerObject::sAxisArrowLength(50);
+
+
BOOL LLViewerObject::sPulseEnabled(FALSE);
BOOL LLViewerObject::sUseSharedDrawables(FALSE); // TRUE
// sMaxUpdateInterpolationTime must be greater than sPhaseOutUpdateInterpolationTime
-F64 LLViewerObject::sMaxUpdateInterpolationTime = 3.0; // For motion interpolation: after X seconds with no updates, don't predict object motion
-F64 LLViewerObject::sPhaseOutUpdateInterpolationTime = 2.0; // For motion interpolation: after Y seconds with no updates, taper off motion prediction
+F64Seconds LLViewerObject::sMaxUpdateInterpolationTime(3.0); // For motion interpolation: after X seconds with no updates, don't predict object motion
+F64Seconds LLViewerObject::sPhaseOutUpdateInterpolationTime(2.0); // For motion interpolation: after Y seconds with no updates, taper off motion prediction
+
+std::map<std::string, U32> LLViewerObject::sObjectDataMap;
+
+// The maximum size of an object extra parameters binary (packed) block
+#define MAX_OBJECT_PARAMS_SIZE 1024
+// At 45 Hz collisions seem stable and objects seem
+// to settle down at a reasonable rate.
+// JC 3/18/2003
-static LLFastTimer::DeclareTimer FTM_CREATE_OBJECT("Create Object");
+const F32 PHYSICS_TIMESTEP = 1.f / 45.f;
+
+static LLTrace::BlockTimerStatHandle FTM_CREATE_OBJECT("Create Object");
// static
LLViewerObject *LLViewerObject::createObject(const LLUUID &id, const LLPCode pcode, LLViewerRegion *regionp)
{
LLViewerObject *res = NULL;
- LLFastTimer t1(FTM_CREATE_OBJECT);
+ LL_RECORD_BLOCK_TIME(FTM_CREATE_OBJECT);
switch (pcode)
{
@@ -161,13 +173,13 @@ LLViewerObject *LLViewerObject::createObject(const LLUUID &id, const LLPCode pco
case LL_PCODE_LEGACY_GRASS:
res = new LLVOGrass(id, pcode, regionp); break;
case LL_PCODE_LEGACY_PART_SYS:
-// llwarns << "Creating old part sys!" << llendl;
+// LL_WARNS() << "Creating old part sys!" << LL_ENDL;
// res = new LLVOPart(id, pcode, regionp); break;
res = NULL; break;
case LL_PCODE_LEGACY_TREE:
res = new LLVOTree(id, pcode, regionp); break;
case LL_PCODE_TREE_NEW:
-// llwarns << "Creating new tree!" << llendl;
+// LL_WARNS() << "Creating new tree!" << LL_ENDL;
// res = new LLVOTree(id, pcode, regionp); break;
res = NULL; break;
case LL_VO_SURFACE_PATCH:
@@ -187,14 +199,15 @@ LLViewerObject *LLViewerObject::createObject(const LLUUID &id, const LLPCode pco
case LL_VO_WL_SKY:
res = new LLVOWLSky(id, pcode, regionp); break;
default:
- llwarns << "Unknown object pcode " << (S32)pcode << llendl;
+ LL_WARNS() << "Unknown object pcode " << (S32)pcode << LL_ENDL;
res = NULL; break;
}
return res;
}
LLViewerObject::LLViewerObject(const LLUUID &id, const LLPCode pcode, LLViewerRegion *regionp, BOOL is_global)
-: LLPrimitive(),
+: LLTrace::MemTrackable<LLViewerObject>("LLViewerObject"),
+ LLPrimitive(),
mChildList(),
mID(id),
mLocalID(0),
@@ -340,7 +353,7 @@ void LLViewerObject::markDead()
{
if (!mDead)
{
- //llinfos << "Marking self " << mLocalID << " as dead." << llendl;
+ //LL_INFOS() << "Marking self " << mLocalID << " as dead." << LL_ENDL;
// Root object of this hierarchy unlinks itself.
if (getParent())
@@ -350,6 +363,10 @@ void LLViewerObject::markDead()
// Mark itself as dead
mDead = TRUE;
+ if(mRegionp)
+ {
+ mRegionp->removeFromCreatedList(getLocalID());
+ }
gObjectList.cleanupReferences(this);
LLViewerObject *childp;
@@ -358,7 +375,7 @@ void LLViewerObject::markDead()
childp = mChildList.back();
if (childp->getPCode() != LL_PCODE_LEGACY_AVATAR)
{
- //llinfos << "Marking child " << childp->getLocalID() << " as dead." << llendl;
+ //LL_INFOS() << "Marking child " << childp->getLocalID() << " as dead." << LL_ENDL;
childp->setParent(NULL); // LLViewerObject::markDead 1
childp->markDead();
}
@@ -428,17 +445,17 @@ void LLViewerObject::markDead()
void LLViewerObject::dump() const
{
- llinfos << "Type: " << pCodeToString(mPrimitiveCode) << llendl;
- llinfos << "Drawable: " << (LLDrawable *)mDrawable << llendl;
- llinfos << "Update Age: " << LLFrameTimer::getElapsedSeconds() - mLastMessageUpdateSecs << llendl;
-
- llinfos << "Parent: " << getParent() << llendl;
- llinfos << "ID: " << mID << llendl;
- llinfos << "LocalID: " << mLocalID << llendl;
- llinfos << "PositionRegion: " << getPositionRegion() << llendl;
- llinfos << "PositionAgent: " << getPositionAgent() << llendl;
- llinfos << "PositionGlobal: " << getPositionGlobal() << llendl;
- llinfos << "Velocity: " << getVelocity() << llendl;
+ LL_INFOS() << "Type: " << pCodeToString(mPrimitiveCode) << LL_ENDL;
+ LL_INFOS() << "Drawable: " << (LLDrawable *)mDrawable << LL_ENDL;
+ LL_INFOS() << "Update Age: " << LLFrameTimer::getElapsedSeconds() - mLastMessageUpdateSecs << LL_ENDL;
+
+ LL_INFOS() << "Parent: " << getParent() << LL_ENDL;
+ LL_INFOS() << "ID: " << mID << LL_ENDL;
+ LL_INFOS() << "LocalID: " << mLocalID << LL_ENDL;
+ LL_INFOS() << "PositionRegion: " << getPositionRegion() << LL_ENDL;
+ LL_INFOS() << "PositionAgent: " << getPositionAgent() << LL_ENDL;
+ LL_INFOS() << "PositionGlobal: " << getPositionGlobal() << LL_ENDL;
+ LL_INFOS() << "Velocity: " << getVelocity() << LL_ENDL;
if (mDrawable.notNull() &&
mDrawable->getNumFaces() &&
mDrawable->getFace(0))
@@ -446,31 +463,31 @@ void LLViewerObject::dump() const
LLFacePool *poolp = mDrawable->getFace(0)->getPool();
if (poolp)
{
- llinfos << "Pool: " << poolp << llendl;
- llinfos << "Pool reference count: " << poolp->mReferences.size() << llendl;
+ LL_INFOS() << "Pool: " << poolp << LL_ENDL;
+ LL_INFOS() << "Pool reference count: " << poolp->mReferences.size() << LL_ENDL;
}
}
- //llinfos << "BoxTree Min: " << mDrawable->getBox()->getMin() << llendl;
- //llinfos << "BoxTree Max: " << mDrawable->getBox()->getMin() << llendl;
+ //LL_INFOS() << "BoxTree Min: " << mDrawable->getBox()->getMin() << LL_ENDL;
+ //LL_INFOS() << "BoxTree Max: " << mDrawable->getBox()->getMin() << LL_ENDL;
/*
- llinfos << "Velocity: " << getVelocity() << llendl;
- llinfos << "AnyOwner: " << permAnyOwner() << " YouOwner: " << permYouOwner() << " Edit: " << mPermEdit << llendl;
- llinfos << "UsePhysics: " << flagUsePhysics() << " CanSelect " << mbCanSelect << " UserSelected " << mUserSelected << llendl;
- llinfos << "AppAngle: " << mAppAngle << llendl;
- llinfos << "PixelArea: " << mPixelArea << llendl;
+ LL_INFOS() << "Velocity: " << getVelocity() << LL_ENDL;
+ LL_INFOS() << "AnyOwner: " << permAnyOwner() << " YouOwner: " << permYouOwner() << " Edit: " << mPermEdit << LL_ENDL;
+ LL_INFOS() << "UsePhysics: " << flagUsePhysics() << " CanSelect " << mbCanSelect << " UserSelected " << mUserSelected << LL_ENDL;
+ LL_INFOS() << "AppAngle: " << mAppAngle << LL_ENDL;
+ LL_INFOS() << "PixelArea: " << mPixelArea << LL_ENDL;
char buffer[1000];
char *key;
for (key = mNameValuePairs.getFirstKey(); key; key = mNameValuePairs.getNextKey() )
{
mNameValuePairs[key]->printNameValue(buffer);
- llinfos << buffer << llendl;
+ LL_INFOS() << buffer << LL_ENDL;
}
for (child_list_t::iterator iter = mChildList.begin();
iter != mChildList.end(); iter++)
{
LLViewerObject* child = *iter;
- llinfos << " child " << child->getID() << llendl;
+ LL_INFOS() << " child " << child->getID() << LL_ENDL;
}
*/
}
@@ -481,7 +498,7 @@ void LLViewerObject::printNameValuePairs() const
iter != mNameValuePairs.end(); iter++)
{
LLNameValue* nv = iter->second;
- llinfos << nv->printNameValue() << llendl;
+ LL_INFOS() << nv->printNameValue() << LL_ENDL;
}
}
@@ -490,10 +507,12 @@ void LLViewerObject::initVOClasses()
// Initialized shared class stuff first.
LLVOAvatar::initClass();
LLVOTree::initClass();
- llinfos << "Viewer Object size: " << sizeof(LLViewerObject) << llendl;
+ LL_INFOS() << "Viewer Object size: " << sizeof(LLViewerObject) << LL_ENDL;
LLVOGrass::initClass();
LLVOWater::initClass();
LLVOVolume::initClass();
+
+ initObjectDataMap();
}
void LLViewerObject::cleanupVOClasses()
@@ -503,6 +522,118 @@ void LLViewerObject::cleanupVOClasses()
LLVOTree::cleanupClass();
LLVOAvatar::cleanupClass();
LLVOVolume::cleanupClass();
+
+ sObjectDataMap.clear();
+}
+
+//object data map for compressed && !OUT_TERSE_IMPROVED
+//static
+void LLViewerObject::initObjectDataMap()
+{
+ U32 count = 0;
+
+ sObjectDataMap["ID"] = count; //full id //LLUUID
+ count += sizeof(LLUUID);
+
+ sObjectDataMap["LocalID"] = count; //U32
+ count += sizeof(U32);
+
+ sObjectDataMap["PCode"] = count; //U8
+ count += sizeof(U8);
+
+ sObjectDataMap["State"] = count; //U8
+ count += sizeof(U8);
+
+ sObjectDataMap["CRC"] = count; //U32
+ count += sizeof(U32);
+
+ sObjectDataMap["Material"] = count; //U8
+ count += sizeof(U8);
+
+ sObjectDataMap["ClickAction"] = count; //U8
+ count += sizeof(U8);
+
+ sObjectDataMap["Scale"] = count; //LLVector3
+ count += sizeof(LLVector3);
+
+ sObjectDataMap["Pos"] = count; //LLVector3
+ count += sizeof(LLVector3);
+
+ sObjectDataMap["Rot"] = count; //LLVector3
+ count += sizeof(LLVector3);
+
+ sObjectDataMap["SpecialCode"] = count; //U32
+ count += sizeof(U32);
+
+ sObjectDataMap["Owner"] = count; //LLUUID
+ count += sizeof(LLUUID);
+
+ sObjectDataMap["Omega"] = count; //LLVector3, when SpecialCode & 0x80 is set
+ count += sizeof(LLVector3);
+
+ //ParentID is after Omega if there is Omega, otherwise is after Owner
+ sObjectDataMap["ParentID"] = count;//U32, when SpecialCode & 0x20 is set
+ count += sizeof(U32);
+
+ //-------
+ //The rest items are not included here
+ //-------
+}
+
+//static
+void LLViewerObject::unpackVector3(LLDataPackerBinaryBuffer* dp, LLVector3& value, std::string name)
+{
+ dp->shift(sObjectDataMap[name]);
+ dp->unpackVector3(value, name.c_str());
+ dp->reset();
+}
+
+//static
+void LLViewerObject::unpackUUID(LLDataPackerBinaryBuffer* dp, LLUUID& value, std::string name)
+{
+ dp->shift(sObjectDataMap[name]);
+ dp->unpackUUID(value, name.c_str());
+ dp->reset();
+}
+
+//static
+void LLViewerObject::unpackU32(LLDataPackerBinaryBuffer* dp, U32& value, std::string name)
+{
+ dp->shift(sObjectDataMap[name]);
+ dp->unpackU32(value, name.c_str());
+ dp->reset();
+}
+
+//static
+void LLViewerObject::unpackU8(LLDataPackerBinaryBuffer* dp, U8& value, std::string name)
+{
+ dp->shift(sObjectDataMap[name]);
+ dp->unpackU8(value, name.c_str());
+ dp->reset();
+}
+
+//static
+U32 LLViewerObject::unpackParentID(LLDataPackerBinaryBuffer* dp, U32& parent_id)
+{
+ dp->shift(sObjectDataMap["SpecialCode"]);
+ U32 value;
+ dp->unpackU32(value, "SpecialCode");
+
+ parent_id = 0;
+ if(value & 0x20)
+ {
+ S32 offset = sObjectDataMap["ParentID"];
+ if(!(value & 0x80))
+ {
+ offset -= sizeof(LLVector3);
+ }
+
+ dp->shift(offset);
+ dp->unpackU32(parent_id, "ParentID");
+ }
+ dp->reset();
+
+ return parent_id;
}
// Replaces all name value pairs with data from \n delimited list
@@ -613,7 +744,7 @@ void LLViewerObject::buildReturnablesForChildrenVO( std::vector<PotentialReturna
{
if ( !pChild )
{
- llerrs<<"child viewerobject is NULL "<<llendl;
+ LL_ERRS()<<"child viewerobject is NULL "<<LL_ENDL;
}
constructAndAddReturnable( returnables, pChild, pTargetRegion );
@@ -894,26 +1025,47 @@ U32 LLViewerObject::checkMediaURL(const std::string &media_url)
return retval;
}
+//extract spatial information from object update message
+//return parent_id
+//static
+U32 LLViewerObject::extractSpatialExtents(LLDataPackerBinaryBuffer *dp, LLVector3& pos, LLVector3& scale, LLQuaternion& rot)
+{
+ U32 parent_id = 0;
+ LLViewerObject::unpackParentID(dp, parent_id);
+
+ LLViewerObject::unpackVector3(dp, scale, "Scale");
+ LLViewerObject::unpackVector3(dp, pos, "Pos");
+
+ LLVector3 vec;
+ LLViewerObject::unpackVector3(dp, vec, "Rot");
+ rot.unpackFromVector3(vec);
+
+ return parent_id;
+}
+
U32 LLViewerObject::processUpdateMessage(LLMessageSystem *mesgsys,
void **user_data,
U32 block_num,
const EObjectUpdateType update_type,
LLDataPacker *dp)
{
+ LL_DEBUGS_ONCE("SceneLoadTiming") << "Received viewer object data" << LL_ENDL;
+
U32 retval = 0x0;
// If region is removed from the list it is also deleted.
if (!LLWorld::instance().isRegionListed(mRegionp))
{
- llwarns << "Updating object in an invalid region" << llendl;
+ LL_WARNS() << "Updating object in an invalid region" << LL_ENDL;
return retval;
}
// Coordinates of objects on simulators are region-local.
- U64 region_handle;
- mesgsys->getU64Fast(_PREHASH_RegionData, _PREHASH_RegionHandle, region_handle);
+ U64 region_handle = 0;
+ if(mesgsys != NULL)
{
+ mesgsys->getU64Fast(_PREHASH_RegionData, _PREHASH_RegionHandle, region_handle);
LLViewerRegion* regionp = LLWorld::getInstance()->getRegionFromHandle(region_handle);
if(regionp != mRegionp && regionp && mRegionp)//region cross
{
@@ -926,6 +1078,17 @@ U32 LLViewerObject::processUpdateMessage(LLMessageSystem *mesgsys,
}
else
{
+ if(regionp != mRegionp)
+ {
+ if(mRegionp)
+ {
+ mRegionp->removeFromCreatedList(getLocalID());
+ }
+ if(regionp)
+ {
+ regionp->addToCreatedList(getLocalID());
+ }
+ }
mRegionp = regionp ;
}
}
@@ -935,14 +1098,18 @@ U32 LLViewerObject::processUpdateMessage(LLMessageSystem *mesgsys,
U32 x, y;
from_region_handle(region_handle, &x, &y);
- llerrs << "Object has invalid region " << x << ":" << y << "!" << llendl;
+ LL_ERRS() << "Object has invalid region " << x << ":" << y << "!" << LL_ENDL;
return retval;
}
+ F32 time_dilation = 1.f;
+ if(mesgsys != NULL)
+ {
U16 time_dilation16;
mesgsys->getU16Fast(_PREHASH_RegionData, _PREHASH_TimeDilation, time_dilation16);
- F32 time_dilation = ((F32) time_dilation16) / 65535.f;
+ time_dilation = ((F32) time_dilation16) / 65535.f;
mRegionp->setTimeDilation(time_dilation);
+ }
// this will be used to determine if we've really changed position
// Use getPosition, not getPositionRegion, since this is what we're comparing directly against.
@@ -990,7 +1157,7 @@ U32 LLViewerObject::processUpdateMessage(LLMessageSystem *mesgsys,
case OUT_FULL:
{
#ifdef DEBUG_UPDATE_TYPE
- llinfos << "Full:" << getID() << llendl;
+ LL_INFOS() << "Full:" << getID() << LL_ENDL;
#endif
//clear cost and linkset cost
mCostStale = true;
@@ -1296,7 +1463,7 @@ U32 LLViewerObject::processUpdateMessage(LLMessageSystem *mesgsys,
S32 param_size;
dp.unpackU16(param_type, "param_type");
dp.unpackBinaryData(param_block, param_size, "param_data");
- //llinfos << "Param type: " << param_type << ", Size: " << param_size << llendl;
+ //LL_INFOS() << "Param type: " << param_type << ", Size: " << param_size << LL_ENDL;
LLDataPackerBinaryBuffer dp2(param_block, param_size);
unpackParameterEntry(param_type, &dp2);
}
@@ -1318,7 +1485,7 @@ U32 LLViewerObject::processUpdateMessage(LLMessageSystem *mesgsys,
case OUT_TERSE_IMPROVED:
{
#ifdef DEBUG_UPDATE_TYPE
- llinfos << "TI:" << getID() << llendl;
+ LL_INFOS() << "TI:" << getID() << LL_ENDL;
#endif
length = mesgsys->getSizeFast(_PREHASH_ObjectData, block_num, _PREHASH_ObjectData);
mesgsys->getBinaryDataFast(_PREHASH_ObjectData, _PREHASH_ObjectData, data, length, block_num);
@@ -1495,7 +1662,7 @@ U32 LLViewerObject::processUpdateMessage(LLMessageSystem *mesgsys,
case OUT_TERSE_IMPROVED:
{
#ifdef DEBUG_UPDATE_TYPE
- llinfos << "CompTI:" << getID() << llendl;
+ LL_INFOS() << "CompTI:" << getID() << LL_ENDL;
#endif
U8 value;
dp->unpackU8(value, "agent");
@@ -1541,7 +1708,7 @@ U32 LLViewerObject::processUpdateMessage(LLMessageSystem *mesgsys,
case OUT_FULL_CACHED:
{
#ifdef DEBUG_UPDATE_TYPE
- llinfos << "CompFull:" << getID() << llendl;
+ LL_INFOS() << "CompFull:" << getID() << LL_ENDL;
#endif
mCostStale = true;
@@ -1679,7 +1846,7 @@ U32 LLViewerObject::processUpdateMessage(LLMessageSystem *mesgsys,
S32 param_size;
dp->unpackU16(param_type, "param_type");
dp->unpackBinaryData(param_block, param_size, "param_data");
- //llinfos << "Param type: " << param_type << ", Size: " << param_size << llendl;
+ //LL_INFOS() << "Param type: " << param_type << ", Size: " << param_size << LL_ENDL;
LLDataPackerBinaryBuffer dp2(param_block, param_size);
unpackParameterEntry(param_type, &dp2);
}
@@ -1717,13 +1884,12 @@ U32 LLViewerObject::processUpdateMessage(LLMessageSystem *mesgsys,
// Preload these five flags for every object.
// Finer shades require the object to be selected, and the selection manager
// stores the extended permission info.
+ if(mesgsys != NULL)
+ {
U32 flags;
mesgsys->getU32Fast(_PREHASH_ObjectData, _PREHASH_UpdateFlags, flags, block_num);
- // keep local flags and overwrite remote-controlled flags
- mFlags = (mFlags & FLAGS_LOCAL) | flags;
-
- // ...new objects that should come in selected need to be added to the selected list
- mCreateSelected = ((flags & FLAGS_CREATE_SELECTED) != 0);
+ loadFlags(flags);
+ }
}
break;
@@ -1751,10 +1917,21 @@ U32 LLViewerObject::processUpdateMessage(LLMessageSystem *mesgsys,
{
// No parent now, new parent in message -> attach to that parent if possible
LLUUID parent_uuid;
+
+ if(mesgsys != NULL)
+ {
LLViewerObjectList::getUUIDFromLocal(parent_uuid,
parent_id,
mesgsys->getSenderIP(),
mesgsys->getSenderPort());
+ }
+ else
+ {
+ LLViewerObjectList::getUUIDFromLocal(parent_uuid,
+ parent_id,
+ mRegionp->getHost().getAddress(),
+ mRegionp->getHost().getPort());
+ }
LLViewerObject *sent_parentp = gObjectList.findObject(parent_uuid);
@@ -1764,7 +1941,7 @@ U32 LLViewerObject::processUpdateMessage(LLMessageSystem *mesgsys,
if (sent_parentp && sent_parentp->getParent() == this)
{
// Try to recover if we attempt to attach a parent to its child
- llwarns << "Attempt to attach a parent to it's child: " << this->getID() << " to " << sent_parentp->getID() << llendl;
+ LL_WARNS() << "Attempt to attach a parent to it's child: " << this->getID() << " to " << sent_parentp->getID() << LL_ENDL;
this->removeChild(sent_parentp);
sent_parentp->setDrawableParent(NULL);
}
@@ -1783,7 +1960,7 @@ U32 LLViewerObject::processUpdateMessage(LLMessageSystem *mesgsys,
{
if (mDrawable->isDead() || !mDrawable->getVObj())
{
- llwarns << "Drawable is dead or no VObj!" << llendl;
+ LL_WARNS() << "Drawable is dead or no VObj!" << LL_ENDL;
sent_parentp->addChild(this);
}
else
@@ -1793,9 +1970,9 @@ U32 LLViewerObject::processUpdateMessage(LLMessageSystem *mesgsys,
// Bad, we got a cycle somehow.
// Kill both the parent and the child, and
// set cache misses for both of them.
- llwarns << "Attempting to recover from parenting cycle!" << llendl;
- llwarns << "Killing " << sent_parentp->getID() << " and " << getID() << llendl;
- llwarns << "Adding to cache miss list" << llendl;
+ LL_WARNS() << "Attempting to recover from parenting cycle!" << LL_ENDL;
+ LL_WARNS() << "Killing " << sent_parentp->getID() << " and " << getID() << LL_ENDL;
+ LL_WARNS() << "Adding to cache miss list" << LL_ENDL;
setParent(NULL);
sent_parentp->setParent(NULL);
getRegion()->addCacheMissFull(getLocalID());
@@ -1830,9 +2007,18 @@ U32 LLViewerObject::processUpdateMessage(LLMessageSystem *mesgsys,
//
//parent_id
- U32 ip = mesgsys->getSenderIP();
- U32 port = mesgsys->getSenderPort();
+ U32 ip, port;
+ if(mesgsys != NULL)
+ {
+ ip = mesgsys->getSenderIP();
+ port = mesgsys->getSenderPort();
+ }
+ else
+ {
+ ip = mRegionp->getHost().getAddress();
+ port = mRegionp->getHost().getPort();
+ }
gObjectList.orphanize(this, parent_id, ip, port);
// Hide particles, icon and HUD
@@ -1853,7 +2039,7 @@ U32 LLViewerObject::processUpdateMessage(LLMessageSystem *mesgsys,
//LLViewerObjectList::getUUIDFromLocal(parent_uuid, parent_id, mesgsys->getSenderIP(), mesgsys->getSenderPort() );
//if (parent_uuid != cur_parentp->getID() )
//{
- // llerrs << "Local ID match but UUID mismatch of viewer object" << llendl;
+ // LL_ERRS() << "Local ID match but UUID mismatch of viewer object" << LL_ENDL;
//}
}
else
@@ -1870,10 +2056,21 @@ U32 LLViewerObject::processUpdateMessage(LLMessageSystem *mesgsys,
else
{
LLUUID parent_uuid;
+
+ if(mesgsys != NULL)
+ {
LLViewerObjectList::getUUIDFromLocal(parent_uuid,
parent_id,
gMessageSystem->getSenderIP(),
gMessageSystem->getSenderPort());
+ }
+ else
+ {
+ LLViewerObjectList::getUUIDFromLocal(parent_uuid,
+ parent_id,
+ mRegionp->getHost().getAddress(),
+ mRegionp->getHost().getPort());
+ }
sent_parentp = gObjectList.findObject(parent_uuid);
if (isAvatar())
@@ -1894,8 +2091,18 @@ U32 LLViewerObject::processUpdateMessage(LLMessageSystem *mesgsys,
//
// Switching parents, but we don't know the new parent.
//
- U32 ip = mesgsys->getSenderIP();
- U32 port = mesgsys->getSenderPort();
+ U32 ip, port;
+
+ if(mesgsys != NULL)
+ {
+ ip = mesgsys->getSenderIP();
+ port = mesgsys->getSenderPort();
+ }
+ else
+ {
+ ip = mRegionp->getHost().getAddress();
+ port = mRegionp->getHost().getPort();
+ }
// We're an orphan, flag things appropriately.
gObjectList.orphanize(this, parent_id, ip, port);
@@ -1914,9 +2121,9 @@ U32 LLViewerObject::processUpdateMessage(LLMessageSystem *mesgsys,
// Bad, we got a cycle somehow.
// Kill both the parent and the child, and
// set cache misses for both of them.
- llwarns << "Attempting to recover from parenting cycle!" << llendl;
- llwarns << "Killing " << sent_parentp->getID() << " and " << getID() << llendl;
- llwarns << "Adding to cache miss list" << llendl;
+ LL_WARNS() << "Attempting to recover from parenting cycle!" << LL_ENDL;
+ LL_WARNS() << "Killing " << sent_parentp->getID() << " and " << getID() << LL_ENDL;
+ LL_WARNS() << "Adding to cache miss list" << LL_ENDL;
setParent(NULL);
sent_parentp->setParent(NULL);
getRegion()->addCacheMissFull(getLocalID());
@@ -1948,7 +2155,7 @@ U32 LLViewerObject::processUpdateMessage(LLMessageSystem *mesgsys,
// This is probably an object flying across a region boundary, the
// object probably ISN'T being reparented, but just got an object
// update out of order (child update before parent).
- //llinfos << "Don't reparent object handoffs!" << llendl;
+ //LL_INFOS() << "Don't reparent object handoffs!" << LL_ENDL;
remove_parent = false;
}
}
@@ -1979,18 +2186,18 @@ U32 LLViewerObject::processUpdateMessage(LLMessageSystem *mesgsys,
new_rot.normQuat();
- if (sPingInterpolate)
+ if (sPingInterpolate && mesgsys != NULL)
{
LLCircuitData *cdp = gMessageSystem->mCircuitInfo.findCircuit(mesgsys->getSender());
if (cdp)
{
- F32 ping_delay = 0.5f * time_dilation * ( ((F32)cdp->getPingDelay()) * 0.001f + gFrameDTClamped);
+ F32 ping_delay = 0.5f * time_dilation * ( ((F32)cdp->getPingDelay().valueInUnits<LLUnits::Seconds>()) + gFrameDTClamped);
LLVector3 diff = getVelocity() * ping_delay;
new_pos_parent += diff;
}
else
{
- llwarns << "findCircuit() returned NULL; skipping interpolation" << llendl;
+ LL_WARNS() << "findCircuit() returned NULL; skipping interpolation" << LL_ENDL;
}
}
@@ -2002,6 +2209,8 @@ U32 LLViewerObject::processUpdateMessage(LLMessageSystem *mesgsys,
// If we're going to skip this message, why are we
// doing all the parenting, etc above?
+ if(mesgsys != NULL)
+ {
U32 packet_id = mesgsys->getCurrentRecvPacketID();
if (packet_id < mLatestRecvPacketID &&
mLatestRecvPacketID - packet_id < 65536)
@@ -2009,8 +2218,8 @@ U32 LLViewerObject::processUpdateMessage(LLMessageSystem *mesgsys,
//skip application of this message, it's old
return retval;
}
-
mLatestRecvPacketID = packet_id;
+ }
// Set the change flags for scale
if (new_scale != getScale())
@@ -2042,7 +2251,7 @@ U32 LLViewerObject::processUpdateMessage(LLMessageSystem *mesgsys,
}
else
{
- llwarns << "Can not move the object/avatar to an infinite location!" << llendl ;
+ LL_WARNS() << "Can not move the object/avatar to an infinite location!" << LL_ENDL ;
retval |= INVALID_UPDATE ;
}
@@ -2058,7 +2267,7 @@ U32 LLViewerObject::processUpdateMessage(LLMessageSystem *mesgsys,
// If we're snapping the position by more than 0.5m, update LLViewerStats::mAgentPositionSnaps
if ( asAvatar() && asAvatar()->isSelf() && (mag_sqr > 0.25f) )
{
- LLViewerStats::getInstance()->mAgentPositionSnaps.push( diff.length() );
+ record(LLStatViewer::AGENT_POSITION_SNAP, LLUnit<F64, LLUnits::Meters>(diff.length()));
}
}
@@ -2159,7 +2368,7 @@ U32 LLViewerObject::processUpdateMessage(LLMessageSystem *mesgsys,
// Don't clear invisibility flag on update if still orphaned!
if (mDrawable->isState(LLDrawable::FORCE_INVISIBLE) && !mOrphaned)
{
-// lldebugs << "Clearing force invisible: " << mID << ":" << getPCodeString() << ":" << getPositionAgent() << llendl;
+// LL_DEBUGS() << "Clearing force invisible: " << mID << ":" << getPCodeString() << ":" << getPositionAgent() << LL_ENDL;
mDrawable->clearState(LLDrawable::FORCE_INVISIBLE);
gPipeline.markRebuild( mDrawable, LLDrawable::REBUILD_ALL, TRUE );
}
@@ -2181,12 +2390,26 @@ BOOL LLViewerObject::isActive() const
return TRUE;
}
+//load flags from cache or from message
+void LLViewerObject::loadFlags(U32 flags)
+{
+ if(flags == (U32)(-1))
+ {
+ return; //invalid
+ }
+
+ // keep local flags and overwrite remote-controlled flags
+ mFlags = (mFlags & FLAGS_LOCAL) | flags;
+ // ...new objects that should come in selected need to be added to the selected list
+ mCreateSelected = ((flags & FLAGS_CREATE_SELECTED) != 0);
+ return;
+}
void LLViewerObject::idleUpdate(LLAgent &agent, const F64 &time)
{
- //static LLFastTimer::DeclareTimer ftm("Viewer Object");
- //LLFastTimer t(ftm);
+ //static LLTrace::BlockTimerStatHandle ftm("Viewer Object");
+ //LL_RECORD_BLOCK_TIME(ftm);
if (!mDead)
{
@@ -2194,13 +2417,14 @@ void LLViewerObject::idleUpdate(LLAgent &agent, const F64 &time)
{
// calculate dt from last update
F32 time_dilation = mRegionp ? mRegionp->getTimeDilation() : 1.0f;
- F32 dt = time_dilation * (F32)(time - mLastInterpUpdateSecs);
+ F32 dt_raw = ((F64Seconds)time - mLastInterpUpdateSecs).value();
+ F32 dt = time_dilation * dt_raw;
applyAngularVelocity(dt);
if (isAttachment())
{
- mLastInterpUpdateSecs = time;
+ mLastInterpUpdateSecs = (F64Seconds)time;
return;
}
else
@@ -2214,8 +2438,8 @@ void LLViewerObject::idleUpdate(LLAgent &agent, const F64 &time)
}
-// Move an object due to idle-time viewer side updates by iterpolating motion
-void LLViewerObject::interpolateLinearMotion(const F64 & time, const F32 & dt)
+// Move an object due to idle-time viewer side updates by interpolating motion
+void LLViewerObject::interpolateLinearMotion(const F64SecondsImplicit& time, const F32SecondsImplicit& dt_seconds)
{
// linear motion
// PHYSICS_TIMESTEP is used below to correct for the fact that the velocity in object
@@ -2226,8 +2450,9 @@ void LLViewerObject::interpolateLinearMotion(const F64 & time, const F32 & dt)
// to see if object is selected, instead of explicitly
// zeroing it out
- F64 time_since_last_update = time - mLastMessageUpdateSecs;
- if (time_since_last_update <= 0.0 || dt <= 0.f)
+ F32 dt = dt_seconds;
+ F64Seconds time_since_last_update = time - mLastMessageUpdateSecs;
+ if (time_since_last_update <= (F64Seconds)0.0 || dt <= 0.f)
{
return;
}
@@ -2235,7 +2460,7 @@ void LLViewerObject::interpolateLinearMotion(const F64 & time, const F32 & dt)
LLVector3 accel = getAcceleration();
LLVector3 vel = getVelocity();
- if (sMaxUpdateInterpolationTime <= 0.0)
+ if (sMaxUpdateInterpolationTime <= (F64Seconds)0.0)
{ // Old code path ... unbounded, simple interpolation
if (!(accel.isExactlyZero() && vel.isExactlyZero()))
{
@@ -2257,8 +2482,8 @@ void LLViewerObject::interpolateLinearMotion(const F64 & time, const F32 & dt)
LLVector3 new_v = accel * dt;
if (time_since_last_update > sPhaseOutUpdateInterpolationTime &&
- sPhaseOutUpdateInterpolationTime > 0.0)
- { // Haven't seen a viewer update in a while, check to see if the ciruit is still active
+ sPhaseOutUpdateInterpolationTime > (F64Seconds)0.0)
+ { // Haven't seen a viewer update in a while, check to see if the circuit is still active
if (mRegionp)
{ // The simulator will NOT send updates if the object continues normally on the path
// predicted by the velocity and the acceleration (often gravity) sent to the viewer
@@ -2267,19 +2492,19 @@ void LLViewerObject::interpolateLinearMotion(const F64 & time, const F32 & dt)
if (cdp)
{
// Find out how many seconds since last packet arrived on the circuit
- F64 time_since_last_packet = LLMessageSystem::getMessageTimeSeconds() - cdp->getLastPacketInTime();
+ F64Seconds time_since_last_packet = LLMessageSystem::getMessageTimeSeconds() - cdp->getLastPacketInTime();
if (!cdp->isAlive() || // Circuit is dead or blocked
cdp->isBlocked() || // or doesn't seem to be getting any packets
(time_since_last_packet > sPhaseOutUpdateInterpolationTime))
{
// Start to reduce motion interpolation since we haven't seen a server update in a while
- F64 time_since_last_interpolation = time - mLastInterpUpdateSecs;
+ F64Seconds time_since_last_interpolation = time - mLastInterpUpdateSecs;
F64 phase_out = 1.0;
if (time_since_last_update > sMaxUpdateInterpolationTime)
{ // Past the time limit, so stop the object
phase_out = 0.0;
- //llinfos << "Motion phase out to zero" << llendl;
+ //LL_INFOS() << "Motion phase out to zero" << LL_ENDL;
// Kill angular motion as well. Note - not adding this due to paranoia
// about stopping rotation for llTargetOmega objects and not having it restart
@@ -2289,13 +2514,13 @@ void LLViewerObject::interpolateLinearMotion(const F64 & time, const F32 & dt)
{ // Last update was already phased out a bit
phase_out = (sMaxUpdateInterpolationTime - time_since_last_update) /
(sMaxUpdateInterpolationTime - time_since_last_interpolation);
- //llinfos << "Continuing motion phase out of " << (F32) phase_out << llendl;
+ //LL_INFOS() << "Continuing motion phase out of " << (F32) phase_out << LL_ENDL;
}
else
{ // Phase out from full value
phase_out = (sMaxUpdateInterpolationTime - time_since_last_update) /
(sMaxUpdateInterpolationTime - sPhaseOutUpdateInterpolationTime);
- //llinfos << "Starting motion phase out of " << (F32) phase_out << llendl;
+ //LL_INFOS() << "Starting motion phase out of " << (F32) phase_out << LL_ENDL;
}
phase_out = llclamp(phase_out, 0.0, 1.0);
@@ -2340,8 +2565,8 @@ void LLViewerObject::interpolateLinearMotion(const F64 & time, const F32 & dt)
if (clip_pos_global != new_pos_global)
{ // Was clipped, so this means we hit a edge where there is no region to enter
- //llinfos << "Hit empty region edge, clipped predicted position to " << mRegionp->getPosRegionFromGlobal(clip_pos_global)
- // << " from " << new_pos << llendl;
+ //LL_INFOS() << "Hit empty region edge, clipped predicted position to " << mRegionp->getPosRegionFromGlobal(clip_pos_global)
+ // << " from " << new_pos << LL_ENDL;
new_pos = mRegionp->getPosRegionFromGlobal(clip_pos_global);
// Stop motion and get server update for bouncing on the edge
@@ -2350,7 +2575,7 @@ void LLViewerObject::interpolateLinearMotion(const F64 & time, const F32 & dt)
}
else
{ // Let predicted movement cross into another region
- //llinfos << "Predicting region crossing to " << new_pos << llendl;
+ //LL_INFOS() << "Predicting region crossing to " << new_pos << LL_ENDL;
}
}
@@ -2498,7 +2723,7 @@ void LLViewerObject::saveScript(
* XXXPAM Investigate not making this copy. Seems unecessary, but I'm unsure about the
* interaction with doUpdateInventory() called below.
*/
- lldebugs << "LLViewerObject::saveScript() " << item->getUUID() << " " << item->getAssetUUID() << llendl;
+ LL_DEBUGS() << "LLViewerObject::saveScript() " << item->getUUID() << " " << item->getAssetUUID() << LL_ENDL;
LLPointer<LLViewerInventoryItem> task_item =
new LLViewerInventoryItem(item->getUUID(), mID, item->getPermissions(),
item->getAssetUUID(), item->getType(),
@@ -2529,7 +2754,7 @@ void LLViewerObject::saveScript(
void LLViewerObject::moveInventory(const LLUUID& folder_id,
const LLUUID& item_id)
{
- lldebugs << "LLViewerObject::moveInventory " << item_id << llendl;
+ LL_DEBUGS() << "LLViewerObject::moveInventory " << item_id << LL_ENDL;
LLMessageSystem* msg = gMessageSystem;
msg->newMessageFast(_PREHASH_MoveTaskInventory);
msg->nextBlockFast(_PREHASH_AgentData);
@@ -2646,12 +2871,12 @@ struct LLFilenameAndTask
LLFilenameAndTask()
{
++sCount;
- lldebugs << "Constructing LLFilenameAndTask: " << sCount << llendl;
+ LL_DEBUGS() << "Constructing LLFilenameAndTask: " << sCount << LL_ENDL;
}
~LLFilenameAndTask()
{
--sCount;
- lldebugs << "Destroying LLFilenameAndTask: " << sCount << llendl;
+ LL_DEBUGS() << "Destroying LLFilenameAndTask: " << sCount << LL_ENDL;
}
private:
LLFilenameAndTask(const LLFilenameAndTask& rhs);
@@ -2671,8 +2896,8 @@ void LLViewerObject::processTaskInv(LLMessageSystem* msg, void** user_data)
LLViewerObject* object = gObjectList.findObject(task_id);
if(!object)
{
- llwarns << "LLViewerObject::processTaskInv object "
- << task_id << " does not exist." << llendl;
+ LL_WARNS() << "LLViewerObject::processTaskInv object "
+ << task_id << " does not exist." << LL_ENDL;
return;
}
@@ -2686,7 +2911,7 @@ void LLViewerObject::processTaskInv(LLMessageSystem* msg, void** user_data)
if(ft->mFilename.empty())
{
- lldebugs << "Task has no inventory" << llendl;
+ LL_DEBUGS() << "Task has no inventory" << LL_ENDL;
// mock up some inventory to make a drop target.
if(object->mInventory)
{
@@ -2746,15 +2971,15 @@ void LLViewerObject::processTaskInvFile(void** user_data, S32 error_code, LLExtS
// MAINT-2597 - crash when trying to edit a no-mod object
// Somehow get an contents inventory response, but with an invalid stream (possibly 0 size?)
// Stated repro was specific to no-mod objects so failing without user interaction should be safe.
- llwarns << "Trying to load invalid task inventory file. Ignoring file contents." << llendl;
+ LL_WARNS() << "Trying to load invalid task inventory file. Ignoring file contents." << LL_ENDL;
}
}
else
{
// This Occurs When to requests were made, and the first one
// has already handled it.
- lldebugs << "Problem loading task inventory. Return code: "
- << error_code << llendl;
+ LL_DEBUGS() << "Problem loading task inventory. Return code: "
+ << error_code << LL_ENDL;
}
delete ft;
}
@@ -2795,8 +3020,8 @@ BOOL LLViewerObject::loadTaskInvFile(const std::string& filename)
}
else
{
- llwarns << "Unknown token in inventory file '"
- << keyword << "'" << llendl;
+ LL_WARNS() << "Unknown token in inventory file '"
+ << keyword << "'" << LL_ENDL;
}
}
ifs.close();
@@ -2804,8 +3029,8 @@ BOOL LLViewerObject::loadTaskInvFile(const std::string& filename)
}
else
{
- llwarns << "unable to load task inventory: " << filename_and_local_path
- << llendl;
+ LL_WARNS() << "unable to load task inventory: " << filename_and_local_path
+ << LL_ENDL;
return FALSE;
}
doInventoryCallback();
@@ -2829,7 +3054,7 @@ void LLViewerObject::doInventoryCallback()
}
else
{
- llinfos << "LLViewerObject::doInventoryCallback() deleting bad listener entry." << llendl;
+ LL_INFOS() << "LLViewerObject::doInventoryCallback() deleting bad listener entry." << LL_ENDL;
delete info;
mInventoryCallbacks.erase(curiter);
}
@@ -2977,7 +3202,7 @@ LLInventoryObject* LLViewerObject::getInventoryRoot()
LLViewerInventoryItem* LLViewerObject::getInventoryItemByAsset(const LLUUID& asset_id)
{
if (mInventoryDirty)
- llwarns << "Peforming inventory lookup for object " << mID << " that has dirty inventory!" << llendl;
+ LL_WARNS() << "Peforming inventory lookup for object " << mID << " that has dirty inventory!" << LL_ENDL;
LLViewerInventoryItem* rv = NULL;
if(mInventory)
@@ -3382,7 +3607,7 @@ void LLViewerObject::addNVPair(const std::string& data)
// char splat[MAX_STRING];
// temp->printNameValue(splat);
-// llinfos << "addNVPair " << splat << llendl;
+// LL_INFOS() << "addNVPair " << splat << LL_ENDL;
name_value_map_t::iterator iter = mNameValuePairs.find(nv->mName);
if (iter != mNameValuePairs.end())
@@ -3396,7 +3621,7 @@ void LLViewerObject::addNVPair(const std::string& data)
else
{
delete nv;
-// llinfos << "Trying to write to Read Only NVPair " << temp->mName << " in addNVPair()" << llendl;
+// LL_INFOS() << "Trying to write to Read Only NVPair " << temp->mName << " in addNVPair()" << LL_ENDL;
return;
}
}
@@ -3407,7 +3632,7 @@ BOOL LLViewerObject::removeNVPair(const std::string& name)
{
char* canonical_name = gNVNameTable.addString(name);
- lldebugs << "LLViewerObject::removeNVPair(): " << name << llendl;
+ LL_DEBUGS() << "LLViewerObject::removeNVPair(): " << name << LL_ENDL;
name_value_map_t::iterator iter = mNameValuePairs.find(canonical_name);
if (iter != mNameValuePairs.end())
@@ -3433,7 +3658,7 @@ BOOL LLViewerObject::removeNVPair(const std::string& name)
}
else
{
- lldebugs << "removeNVPair - No region for object" << llendl;
+ LL_DEBUGS() << "removeNVPair - No region for object" << LL_ENDL;
}
}
return FALSE;
@@ -4213,7 +4438,7 @@ S32 LLViewerObject::setTEColor(const U8 te, const LLColor4& color)
const LLTextureEntry *tep = getTE(te);
if (!tep)
{
- llwarns << "No texture entry for te " << (S32)te << ", object " << mID << llendl;
+ LL_WARNS() << "No texture entry for te " << (S32)te << ", object " << mID << LL_ENDL;
}
else if (color != tep->getColor())
{
@@ -4233,7 +4458,7 @@ S32 LLViewerObject::setTEBumpmap(const U8 te, const U8 bump)
const LLTextureEntry *tep = getTE(te);
if (!tep)
{
- llwarns << "No texture entry for te " << (S32)te << ", object " << mID << llendl;
+ LL_WARNS() << "No texture entry for te " << (S32)te << ", object " << mID << LL_ENDL;
}
else if (bump != tep->getBumpmap())
{
@@ -4254,7 +4479,7 @@ S32 LLViewerObject::setTETexGen(const U8 te, const U8 texgen)
const LLTextureEntry *tep = getTE(te);
if (!tep)
{
- llwarns << "No texture entry for te " << (S32)te << ", object " << mID << llendl;
+ LL_WARNS() << "No texture entry for te " << (S32)te << ", object " << mID << LL_ENDL;
}
else if (texgen != tep->getTexGen())
{
@@ -4270,7 +4495,7 @@ S32 LLViewerObject::setTEMediaTexGen(const U8 te, const U8 media)
const LLTextureEntry *tep = getTE(te);
if (!tep)
{
- llwarns << "No texture entry for te " << (S32)te << ", object " << mID << llendl;
+ LL_WARNS() << "No texture entry for te " << (S32)te << ", object " << mID << LL_ENDL;
}
else if (media != tep->getMediaTexGen())
{
@@ -4286,7 +4511,7 @@ S32 LLViewerObject::setTEShiny(const U8 te, const U8 shiny)
const LLTextureEntry *tep = getTE(te);
if (!tep)
{
- llwarns << "No texture entry for te " << (S32)te << ", object " << mID << llendl;
+ LL_WARNS() << "No texture entry for te " << (S32)te << ", object " << mID << LL_ENDL;
}
else if (shiny != tep->getShiny())
{
@@ -4302,7 +4527,7 @@ S32 LLViewerObject::setTEFullbright(const U8 te, const U8 fullbright)
const LLTextureEntry *tep = getTE(te);
if (!tep)
{
- llwarns << "No texture entry for te " << (S32)te << ", object " << mID << llendl;
+ LL_WARNS() << "No texture entry for te " << (S32)te << ", object " << mID << LL_ENDL;
}
else if (fullbright != tep->getFullbright())
{
@@ -4324,7 +4549,7 @@ S32 LLViewerObject::setTEMediaFlags(const U8 te, const U8 media_flags)
const LLTextureEntry *tep = getTE(te);
if (!tep)
{
- llwarns << "No texture entry for te " << (S32)te << ", object " << mID << llendl;
+ LL_WARNS() << "No texture entry for te " << (S32)te << ", object " << mID << LL_ENDL;
}
else if (media_flags != tep->getMediaFlags())
{
@@ -4347,7 +4572,7 @@ S32 LLViewerObject::setTEGlow(const U8 te, const F32 glow)
const LLTextureEntry *tep = getTE(te);
if (!tep)
{
- llwarns << "No texture entry for te " << (S32)te << ", object " << mID << llendl;
+ LL_WARNS() << "No texture entry for te " << (S32)te << ", object " << mID << LL_ENDL;
}
else if (glow != tep->getGlow())
{
@@ -4390,7 +4615,7 @@ S32 LLViewerObject::setTEMaterialParams(const U8 te, const LLMaterialPtr pMateri
const LLTextureEntry *tep = getTE(te);
if (!tep)
{
- llwarns << "No texture entry for te " << (S32)te << ", object " << mID << llendl;
+ LL_WARNS() << "No texture entry for te " << (S32)te << ", object " << mID << LL_ENDL;
return 0;
}
@@ -4509,7 +4734,7 @@ LLViewerTexture *LLViewerObject::getTEImage(const U8 face) const
}
}
- llerrs << llformat("Requested Image from invalid face: %d/%d",face,getNumTEs()) << llendl;
+ LL_ERRS() << llformat("Requested Image from invalid face: %d/%d",face,getNumTEs()) << LL_ENDL;
return NULL;
}
@@ -4531,7 +4756,7 @@ bool LLViewerObject::isImageAlphaBlended(const U8 te) const
case GL_RGB: break;
default:
{
- llwarns << "Unexpected tex format in LLViewerObject::isImageAlphaBlended...returning no alpha." << llendl;
+ LL_WARNS() << "Unexpected tex format in LLViewerObject::isImageAlphaBlended...returning no alpha." << LL_ENDL;
}
break;
}
@@ -4556,7 +4781,7 @@ LLViewerTexture *LLViewerObject::getTENormalMap(const U8 face) const
}
}
- llerrs << llformat("Requested Image from invalid face: %d/%d",face,getNumTEs()) << llendl;
+ LL_ERRS() << llformat("Requested Image from invalid face: %d/%d",face,getNumTEs()) << LL_ENDL;
return NULL;
}
@@ -4578,14 +4803,14 @@ LLViewerTexture *LLViewerObject::getTESpecularMap(const U8 face) const
}
}
- llerrs << llformat("Requested Image from invalid face: %d/%d",face,getNumTEs()) << llendl;
+ LL_ERRS() << llformat("Requested Image from invalid face: %d/%d",face,getNumTEs()) << LL_ENDL;
return NULL;
}
void LLViewerObject::fitFaceTexture(const U8 face)
{
- llinfos << "fitFaceTexture not implemented" << llendl;
+ LL_INFOS() << "fitFaceTexture not implemented" << LL_ENDL;
}
@@ -4834,7 +5059,7 @@ void LLViewerObject::unpackParticleSource(const S32 block_num, const LLUUID& own
// We need to be able to deal with a particle source that hasn't changed, but still got an update!
if (pss)
{
-// llinfos << "Making particle system with owner " << owner_id << llendl;
+// LL_INFOS() << "Making particle system with owner " << owner_id << LL_ENDL;
pss->setOwnerUUID(owner_id);
mPartSourcep = pss;
LLViewerPartSim::getInstance()->addPartSource(pss);
@@ -4881,7 +5106,7 @@ void LLViewerObject::unpackParticleSource(LLDataPacker &dp, const LLUUID& owner_
// We need to be able to deal with a particle source that hasn't changed, but still got an update!
if (pss)
{
-// llinfos << "Making particle system with owner " << owner_id << llendl;
+// LL_INFOS() << "Making particle system with owner " << owner_id << LL_ENDL;
pss->setOwnerUUID(owner_id);
mPartSourcep = pss;
LLViewerPartSim::getInstance()->addPartSource(pss);
@@ -4965,7 +5190,7 @@ void LLViewerObject::setAttachedSound(const LLUUID &audio_uuid, const LLUUID& ow
// At least, this appears to be how the scripts work.
// The attached sound ID is set to NULL to avoid it playing back when the
// object rezzes in on non-looping sounds.
- //llinfos << "Clearing attached sound " << mAudioSourcep->getCurrentData()->getID() << llendl;
+ //LL_INFOS() << "Clearing attached sound " << mAudioSourcep->getCurrentData()->getID() << LL_ENDL;
gAudiop->cleanupAudioSource(mAudioSourcep);
mAudioSourcep = NULL;
}
@@ -4980,7 +5205,7 @@ void LLViewerObject::setAttachedSound(const LLUUID &audio_uuid, const LLUUID& ow
&& mAudioSourcep && mAudioSourcep->isLoop() && mAudioSourcep->getCurrentData()
&& mAudioSourcep->getCurrentData()->getID() == audio_uuid)
{
- //llinfos << "Already playing this sound on a loop, ignoring" << llendl;
+ //LL_INFOS() << "Already playing this sound on a loop, ignoring" << LL_ENDL;
return;
}
@@ -4994,7 +5219,7 @@ void LLViewerObject::setAttachedSound(const LLUUID &audio_uuid, const LLUUID& ow
if (mAudioSourcep && mAudioSourcep->isMuted() &&
mAudioSourcep->getCurrentData() && mAudioSourcep->getCurrentData()->getID() == audio_uuid)
{
- //llinfos << "Already having this sound as muted sound, ignoring" << llendl;
+ //LL_INFOS() << "Already having this sound as muted sound, ignoring" << LL_ENDL;
return;
}
@@ -5017,7 +5242,7 @@ void LLViewerObject::setAttachedSound(const LLUUID &audio_uuid, const LLUUID& ow
// Play this sound if region maturity permits
if( gAgent.canAccessMaturityAtGlobal(this->getPositionGlobal()) )
{
- //llinfos << "Playing attached sound " << audio_uuid << llendl;
+ //LL_INFOS() << "Playing attached sound " << audio_uuid << LL_ENDL;
mAudioSourcep->play(audio_uuid);
}
}
@@ -5100,7 +5325,7 @@ LLViewerObject::ExtraParameter* LLViewerObject::createNewParameterEntry(U16 para
}
default:
{
- llinfos << "Unknown param type." << llendl;
+ LL_INFOS() << "Unknown param type." << LL_ENDL;
break;
}
};
@@ -5238,7 +5463,7 @@ void LLViewerObject::parameterChanged(U16 param_type, LLNetworkData* data, BOOL
}
else
{
- llwarns << "Failed to send object extra parameters: " << param_type << llendl;
+ LL_WARNS() << "Failed to send object extra parameters: " << param_type << LL_ENDL;
}
}
}
@@ -5503,7 +5728,18 @@ void LLViewerObject::setRegion(LLViewerRegion *regionp)
{
if (!regionp)
{
- llwarns << "viewer object set region to NULL" << llendl;
+ LL_WARNS() << "viewer object set region to NULL" << LL_ENDL;
+ }
+ if(regionp != mRegionp)
+ {
+ if(mRegionp)
+ {
+ mRegionp->removeFromCreatedList(getLocalID());
+ }
+ if(regionp)
+ {
+ regionp->addToCreatedList(getLocalID());
+ }
}
mLatestRecvPacketID = 0;
@@ -5525,10 +5761,10 @@ void LLViewerObject::updateRegion(LLViewerRegion *regionp)
// if (regionp)
// {
// F64 now = LLFrameTimer::getElapsedSeconds();
-// llinfos << "Updating to region " << regionp->getName()
+// LL_INFOS() << "Updating to region " << regionp->getName()
// << ", ms since last update message: " << (F32)((now - mLastMessageUpdateSecs) * 1000.0)
// << ", ms since last interpolation: " << (F32)((now - mLastInterpUpdateSecs) * 1000.0)
-// << llendl;
+// << LL_ENDL;
// }
}
diff --git a/indra/newview/llviewerobject.h b/indra/newview/llviewerobject.h
index c34d4493d5..d92c00a6b2 100755
--- 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,33 +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 LLViewerTexture;
+class LLWorld;
typedef enum e_object_update_type
{
@@ -107,7 +103,11 @@ struct PotentialReturnableObject
//============================================================================
-class LLViewerObject : public LLPrimitive, public LLRefCount, public LLGLUpdate
+class LLViewerObject
+: public LLPrimitive,
+ public LLRefCount,
+ public LLGLUpdate,
+ public LLTrace::MemTrackable<LLViewerObject>
{
protected:
~LLViewerObject(); // use unref()
@@ -157,6 +157,7 @@ public:
INVALID_UPDATE = 0x80000000
};
+ static U32 extractSpatialExtents(LLDataPackerBinaryBuffer *dp, LLVector3& pos, LLVector3& scale, LLQuaternion& rot);
virtual U32 processUpdateMessage(LLMessageSystem *mesgsys,
void **user_data,
U32 block_num,
@@ -525,6 +526,7 @@ public:
virtual void updateRegion(LLViewerRegion *regionp);
void updateFlags(BOOL physics_changed = FALSE);
+ void loadFlags(U32 flags); //load flags from cache or from message
BOOL setFlags(U32 flag, BOOL state);
BOOL setFlagsWithoutUpdate(U32 flag, BOOL state);
void setPhysicsShapeType(U8 type);
@@ -555,6 +557,13 @@ public:
friend class LLViewerMediaList;
public:
+ static void unpackVector3(LLDataPackerBinaryBuffer* dp, LLVector3& value, std::string name);
+ static void unpackUUID(LLDataPackerBinaryBuffer* dp, LLUUID& value, std::string name);
+ static void unpackU32(LLDataPackerBinaryBuffer* dp, U32& value, std::string name);
+ static void unpackU8(LLDataPackerBinaryBuffer* dp, U8& value, std::string name);
+ static U32 unpackParentID(LLDataPackerBinaryBuffer* dp, U32& parent_id);
+
+public:
//counter-translation
void resetChildrenPosition(const LLVector3& offset, BOOL simplified = FALSE) ;
//counter-rotation
@@ -575,7 +584,9 @@ private:
U32 checkMediaURL(const std::string &media_url);
// Motion prediction between updates
- void interpolateLinearMotion(const F64 & time, const F32 & dt);
+ void interpolateLinearMotion(const F64SecondsImplicit & time, const F32SecondsImplicit & dt);
+
+ static void initObjectDataMap();
public:
//
@@ -628,6 +639,7 @@ private:
// Grabbed from UPDATE_FLAGS
U32 mFlags;
+ static std::map<std::string, U32> sObjectDataMap;
public:
// Sent to sim in UPDATE_FLAGS, received in ObjectPhysicsProperties
U8 mPhysicsShapeType;
@@ -651,7 +663,7 @@ public:
// TODO: Make all this stuff private. JC
LLPointer<LLHUDText> mText;
- LLPointer<LLHUDIcon> mIcon;
+ LLPointer<class LLHUDIcon> mIcon;
static BOOL sUseSharedDrawables;
@@ -689,8 +701,6 @@ protected:
void deleteParticleSource();
void setParticleSource(const LLPartSysData& particle_parameters, const LLUUID& owner_id);
-public:
-
private:
void setNameValueList(const std::string& list); // clears nv pairs and then individually adds \n separated NV pairs from \0 terminated string
void deleteTEImages(); // correctly deletes list of images
@@ -701,8 +711,8 @@ protected:
child_list_t mChildList;
- F64 mLastInterpUpdateSecs; // Last update for purposes of interpolation
- F64 mLastMessageUpdateSecs; // Last update from a message from the simulator
+ F64Seconds mLastInterpUpdateSecs; // Last update for purposes of interpolation
+ F64Seconds mLastMessageUpdateSecs; // Last update from a message from the simulator
TPACKETID mLatestRecvPacketID; // Latest time stamp on message from simulator
// extra data sent from the sim...currently only used for tree species info
@@ -768,12 +778,13 @@ protected:
static S32 sAxisArrowLength;
+
// These two caches are only correct for non-parented objects right now!
mutable LLVector3 mPositionRegion;
mutable LLVector3 mPositionAgent;
- static void setPhaseOutUpdateInterpolationTime(F32 value) { sPhaseOutUpdateInterpolationTime = (F64) value; }
- static void setMaxUpdateInterpolationTime(F32 value) { sMaxUpdateInterpolationTime = (F64) value; }
+ static void setPhaseOutUpdateInterpolationTime(F32 value) { sPhaseOutUpdateInterpolationTime = (F64Seconds) value; }
+ static void setMaxUpdateInterpolationTime(F32 value) { sMaxUpdateInterpolationTime = (F64Seconds) value; }
static void setVelocityInterpolate(BOOL value) { sVelocityInterpolate = value; }
static void setPingInterpolate(BOOL value) { sPingInterpolate = value; }
@@ -781,8 +792,8 @@ protected:
private:
static S32 sNumObjects;
- static F64 sPhaseOutUpdateInterpolationTime; // For motion interpolation
- static F64 sMaxUpdateInterpolationTime; // For motion interpolation
+ static F64Seconds sPhaseOutUpdateInterpolationTime; // For motion interpolation
+ static F64Seconds sMaxUpdateInterpolationTime; // For motion interpolation
static BOOL sVelocityInterpolate;
static BOOL sPingInterpolate;
diff --git a/indra/newview/llviewerobjectlist.cpp b/indra/newview/llviewerobjectlist.cpp
index f667c2bf33..0e40db8504 100755
--- a/indra/newview/llviewerobjectlist.cpp
+++ b/indra/newview/llviewerobjectlist.cpp
@@ -29,7 +29,6 @@
#include "llviewerobjectlist.h"
#include "message.h"
-#include "timing.h"
#include "llfasttimer.h"
#include "llrender.h"
#include "llwindow.h" // decBusyCount()
@@ -47,6 +46,7 @@
#include "lltooltip.h"
#include "llworld.h"
#include "llstring.h"
+#include "llhudicon.h"
#include "llhudnametag.h"
#include "lldrawable.h"
#include "llflexibleobject.h"
@@ -76,6 +76,7 @@
#include "object_flags.h"
#include "llappviewer.h"
+#include "llvocache.h"
extern F32 gMinObjectDistance;
extern BOOL gAnimateTextures;
@@ -93,12 +94,9 @@ extern LLPipeline gPipeline;
U32 LLViewerObjectList::sSimulatorMachineIndex = 1; // Not zero deliberately, to speed up index check.
std::map<U64, U32> LLViewerObjectList::sIPAndPortToIndex;
std::map<U64, LLUUID> LLViewerObjectList::sIndexAndLocalIDToUUID;
-LLStat LLViewerObjectList::sCacheHitRate("object_cache_hits", 128);
LLViewerObjectList::LLViewerObjectList()
{
- mNumVisCulled = 0;
- mNumSizeCulled = 0;
mCurLazyUpdateIndex = 0;
mCurBin = 0;
mNumDeadObjects = 0;
@@ -172,7 +170,7 @@ BOOL LLViewerObjectList::removeFromLocalIDTable(const LLViewerObject* objectp)
U64 ipport = (((U64)ip) << 32) | (U64)port;
U32 index = sIPAndPortToIndex[ipport];
- // llinfos << "Removing object from table, local ID " << local_id << ", ip " << ip << ":" << port << llendl;
+ // LL_INFOS() << "Removing object from table, local ID " << local_id << ", ip " << ip << ":" << port << LL_ENDL;
U64 indexid = (((U64)index) << 32) | (U64)local_id;
@@ -189,8 +187,8 @@ BOOL LLViewerObjectList::removeFromLocalIDTable(const LLViewerObject* objectp)
return TRUE;
}
// UUIDs did not match - this would zap a valid entry, so don't erase it
- //llinfos << "Tried to erase entry where id in table ("
- // << iter->second << ") did not match object " << object.getID() << llendl;
+ //LL_INFOS() << "Tried to erase entry where id in table ("
+ // << iter->second << ") did not match object " << object.getID() << LL_ENDL;
}
return FALSE ;
@@ -215,8 +213,8 @@ void LLViewerObjectList::setUUIDAndLocal(const LLUUID &id,
sIndexAndLocalIDToUUID[indexid] = id;
- //llinfos << "Adding object to table, full ID " << id
- // << ", local ID " << local_id << ", ip " << ip << ":" << port << llendl;
+ //LL_INFOS() << "Adding object to table, full ID " << id
+ // << ", local ID " << local_id << ", ip " << ip << ":" << port << LL_ENDL;
}
S32 gFullObjectUpdates = 0;
@@ -227,9 +225,15 @@ void LLViewerObjectList::processUpdateCore(LLViewerObject* objectp,
U32 i,
const EObjectUpdateType update_type,
LLDataPacker* dpp,
- BOOL just_created)
+ bool just_created,
+ bool from_cache)
{
- LLMessageSystem* msg = gMessageSystem;
+ LLMessageSystem* msg = NULL;
+
+ if(!from_cache)
+ {
+ msg = gMessageSystem;
+ }
// ignore returned flags
objectp->processUpdateMessage(msg, user_data, i, update_type, dpp);
@@ -253,7 +257,18 @@ void LLViewerObjectList::processUpdateCore(LLViewerObject* objectp,
// RN: this must be called after we have a drawable
// (from gPipeline.addObject)
// so that the drawable parent is set properly
+ if(msg != NULL)
+ {
findOrphans(objectp, msg->getSenderIP(), msg->getSenderPort());
+ }
+ else
+ {
+ LLViewerRegion* regionp = objectp->getRegion();
+ if(regionp != NULL)
+ {
+ findOrphans(objectp, regionp->getHost().getAddress(), regionp->getHost().getPort());
+ }
+ }
// If we're just wandering around, don't create new objects selected.
if (just_created
@@ -262,8 +277,8 @@ void LLViewerObjectList::processUpdateCore(LLViewerObject* objectp,
{
if ( LLToolMgr::getInstance()->getCurrentTool() != LLToolPie::getInstance() )
{
- // llinfos << "DEBUG selecting " << objectp->mID << " "
- // << objectp->mLocalID << llendl;
+ // LL_INFOS() << "DEBUG selecting " << objectp->mID << " "
+ // << objectp->mLocalID << LL_ENDL;
LLSelectMgr::getInstance()->selectObjectAndFamily(objectp);
dialog_refresh_all();
}
@@ -274,14 +289,104 @@ void LLViewerObjectList::processUpdateCore(LLViewerObject* objectp,
}
}
-static LLFastTimer::DeclareTimer FTM_PROCESS_OBJECTS("Process Objects");
+static LLTrace::BlockTimerStatHandle FTM_PROCESS_OBJECTS("Process Objects");
+
+LLViewerObject* LLViewerObjectList::processObjectUpdateFromCache(LLVOCacheEntry* entry, LLViewerRegion* regionp)
+{
+ LLDataPacker *cached_dpp = entry->getDP();
+
+ if (!cached_dpp)
+ {
+ return NULL; //nothing cached.
+ }
+
+ LLViewerObject *objectp;
+ U32 local_id;
+ LLPCode pcode = 0;
+ LLUUID fullid;
+ LLViewerStatsRecorder& recorder = LLViewerStatsRecorder::instance();
+
+ // Cache Hit.
+ record(LLStatViewer::OBJECT_CACHE_HIT_RATE, LLUnits::Ratio::fromValue(1));
+
+ cached_dpp->reset();
+ cached_dpp->unpackUUID(fullid, "ID");
+ cached_dpp->unpackU32(local_id, "LocalID");
+ cached_dpp->unpackU8(pcode, "PCode");
+
+ objectp = findObject(fullid);
+
+ if (objectp)
+ {
+ if(!objectp->isDead() && (objectp->mLocalID != entry->getLocalID() ||
+ objectp->getRegion() != regionp))
+ {
+ removeFromLocalIDTable(objectp);
+ setUUIDAndLocal(fullid, entry->getLocalID(),
+ regionp->getHost().getAddress(),
+ regionp->getHost().getPort());
+
+ if (objectp->mLocalID != entry->getLocalID())
+ { // Update local ID in object with the one sent from the region
+ objectp->mLocalID = entry->getLocalID();
+ }
+
+ if (objectp->getRegion() != regionp)
+ { // Object changed region, so update it
+ objectp->updateRegion(regionp); // for LLVOAvatar
+ }
+ }
+ else
+ {
+ //should fall through if already loaded because may need to update the object.
+ //return objectp; //already loaded.
+ }
+ }
+
+ bool justCreated = false;
+ if (!objectp)
+ {
+ objectp = createObjectFromCache(pcode, regionp, fullid, entry->getLocalID());
+
+ if (!objectp)
+ {
+ LL_INFOS() << "createObject failure for object: " << fullid << LL_ENDL;
+ recorder.objectUpdateFailure(entry->getLocalID(), OUT_FULL_CACHED, 0);
+ return NULL;
+ }
+ justCreated = true;
+ mNumNewObjects++;
+ }
+
+ if (objectp->isDead())
+ {
+ LL_WARNS() << "Dead object " << objectp->mID << " in UUID map 1!" << LL_ENDL;
+ }
+
+ processUpdateCore(objectp, NULL, 0, OUT_FULL_CACHED, cached_dpp, justCreated, true);
+ objectp->loadFlags(entry->getUpdateFlags()); //just in case, reload update flags from cache.
+
+ if(entry->getHitCount() > 0)
+ {
+ objectp->setLastUpdateType(OUT_FULL_CACHED);
+ }
+ else
+ {
+ objectp->setLastUpdateType(OUT_FULL_COMPRESSED); //newly cached
+ objectp->setLastUpdateCached(TRUE);
+ }
+ recorder.log(0.2f);
+ LLVOAvatar::cullAvatarsByPixelArea();
+
+ return objectp;
+}
void LLViewerObjectList::processObjectUpdate(LLMessageSystem *mesgsys,
void **user_data,
const EObjectUpdateType update_type,
- bool cached, bool compressed)
+ bool compressed)
{
- LLFastTimer t(FTM_PROCESS_OBJECTS);
+ LL_RECORD_BLOCK_TIME(FTM_PROCESS_OBJECTS);
LLViewerObject *objectp;
S32 num_objects;
@@ -297,9 +402,9 @@ void LLViewerObjectList::processObjectUpdate(LLMessageSystem *mesgsys,
num_objects = mesgsys->getNumberOfBlocksFast(_PREHASH_ObjectData);
// I don't think this case is ever hit. TODO* Test this.
- if (!cached && !compressed && update_type != OUT_FULL)
+ if (!compressed && update_type != OUT_FULL)
{
- //llinfos << "TEST: !cached && !compressed && update_type != OUT_FULL" << llendl;
+ //LL_INFOS() << "TEST: !cached && !compressed && update_type != OUT_FULL" << LL_ENDL;
gTerseObjectUpdates += num_objects;
/*
S32 size;
@@ -311,7 +416,7 @@ void LLViewerObjectList::processObjectUpdate(LLMessageSystem *mesgsys,
{
size = mesgsys->getReceiveSize();
}
- llinfos << "Received terse " << num_objects << " in " << size << " byte (" << size/num_objects << ")" << llendl;
+ LL_INFOS() << "Received terse " << num_objects << " in " << size << " byte (" << size/num_objects << ")" << LL_ENDL;
*/
}
else
@@ -327,7 +432,7 @@ void LLViewerObjectList::processObjectUpdate(LLMessageSystem *mesgsys,
size = mesgsys->getReceiveSize();
}
- llinfos << "Received " << num_objects << " in " << size << " byte (" << size/num_objects << ")" << llendl;
+ LL_INFOS() << "Received " << num_objects << " in " << size << " byte (" << size/num_objects << ")" << LL_ENDL;
*/
gFullObjectUpdates += num_objects;
}
@@ -339,13 +444,12 @@ void LLViewerObjectList::processObjectUpdate(LLMessageSystem *mesgsys,
if (!regionp)
{
- llwarns << "Object update from unknown region! " << region_handle << llendl;
+ LL_WARNS() << "Object update from unknown region! " << region_handle << LL_ENDL;
return;
}
U8 compressed_dpbuffer[2048];
LLDataPackerBinaryBuffer compressed_dp(compressed_dpbuffer, 2048);
- LLDataPacker *cached_dpp = NULL;
LLViewerStatsRecorder& recorder = LLViewerStatsRecorder::instance();
for (i = 0; i < num_objects; i++)
@@ -354,57 +458,37 @@ void LLViewerObjectList::processObjectUpdate(LLMessageSystem *mesgsys,
LLTimer update_timer;
BOOL justCreated = FALSE;
S32 msg_size = 0;
+ bool update_cache = false; //update object cache if it is a full-update or terse update
- if (cached)
- {
- U32 id;
- U32 crc;
- mesgsys->getU32Fast(_PREHASH_ObjectData, _PREHASH_ID, id, i);
- mesgsys->getU32Fast(_PREHASH_ObjectData, _PREHASH_CRC, crc, i);
- msg_size += sizeof(U32) * 2;
-
- // Lookup data packer and add this id to cache miss lists if necessary.
- U8 cache_miss_type = LLViewerRegion::CACHE_MISS_TYPE_NONE;
- cached_dpp = regionp->getDP(id, crc, cache_miss_type);
- if (cached_dpp)
- {
- // Cache Hit.
- cached_dpp->reset();
- cached_dpp->unpackUUID(fullid, "ID");
- cached_dpp->unpackU32(local_id, "LocalID");
- cached_dpp->unpackU8(pcode, "PCode");
- }
- else
- {
- // Cache Miss.
- recorder.cacheMissEvent(id, update_type, cache_miss_type, msg_size);
-
- continue; // no data packer, skip this object
- }
- }
- else if (compressed)
+ if (compressed)
{
S32 uncompressed_length = 2048;
compressed_dp.reset();
- U32 flags = 0;
- if (update_type != OUT_TERSE_IMPROVED) // OUT_FULL_COMPRESSED only?
- {
- mesgsys->getU32Fast(_PREHASH_ObjectData, _PREHASH_UpdateFlags, flags, i);
- }
-
uncompressed_length = mesgsys->getSizeFast(_PREHASH_ObjectData, i, _PREHASH_Data);
mesgsys->getBinaryDataFast(_PREHASH_ObjectData, _PREHASH_Data, compressed_dpbuffer, 0, i);
compressed_dp.assignBuffer(compressed_dpbuffer, uncompressed_length);
if (update_type != OUT_TERSE_IMPROVED) // OUT_FULL_COMPRESSED only?
{
- compressed_dp.unpackUUID(fullid, "ID");
- compressed_dp.unpackU32(local_id, "LocalID");
- compressed_dp.unpackU8(pcode, "PCode");
+ U32 flags = 0;
+ mesgsys->getU32Fast(_PREHASH_ObjectData, _PREHASH_UpdateFlags, flags, i);
+
+ if(flags & FLAGS_TEMPORARY_ON_REZ)
+ {
+ compressed_dp.unpackUUID(fullid, "ID");
+ compressed_dp.unpackU32(local_id, "LocalID");
+ compressed_dp.unpackU8(pcode, "PCode");
+ }
+ else //send to object cache
+ {
+ regionp->cacheFullUpdate(compressed_dp, flags);
+ continue;
}
- else
+ }
+ else //OUT_TERSE_IMPROVED
{
+ update_cache = true;
compressed_dp.unpackU32(local_id, "LocalID");
getUUIDFromLocal(fullid,
local_id,
@@ -412,7 +496,7 @@ void LLViewerObjectList::processObjectUpdate(LLMessageSystem *mesgsys,
gMessageSystem->getSenderPort());
if (fullid.isNull())
{
- // llwarns << "update for unknown localid " << local_id << " host " << gMessageSystem->getSender() << ":" << gMessageSystem->getSenderPort() << llendl;
+ // LL_WARNS() << "update for unknown localid " << local_id << " host " << gMessageSystem->getSender() << ":" << gMessageSystem->getSenderPort() << LL_ENDL;
mNumUnknownUpdates++;
}
}
@@ -428,20 +512,26 @@ void LLViewerObjectList::processObjectUpdate(LLMessageSystem *mesgsys,
gMessageSystem->getSenderPort());
if (fullid.isNull())
{
- // llwarns << "update for unknown localid " << local_id << " host " << gMessageSystem->getSender() << llendl;
+ // LL_WARNS() << "update for unknown localid " << local_id << " host " << gMessageSystem->getSender() << LL_ENDL;
mNumUnknownUpdates++;
}
}
else // OUT_FULL only?
{
+ update_cache = true;
mesgsys->getUUIDFast(_PREHASH_ObjectData, _PREHASH_FullID, fullid, i);
mesgsys->getU32Fast(_PREHASH_ObjectData, _PREHASH_ID, local_id, i);
msg_size += sizeof(LLUUID);
msg_size += sizeof(U32);
- // llinfos << "Full Update, obj " << local_id << ", global ID" << fullid << "from " << mesgsys->getSender() << llendl;
+ // LL_INFOS() << "Full Update, obj " << local_id << ", global ID" << fullid << "from " << mesgsys->getSender() << LL_ENDL;
}
objectp = findObject(fullid);
+ if(update_cache)
+ {
+ objectp = regionp->updateCacheEntry(local_id, objectp, update_type);
+ }
+
// This looks like it will break if the local_id of the object doesn't change
// upon boundary crossing, but we check for region id matching later...
// Reset object local id and region pointer if things have changed
@@ -451,13 +541,13 @@ void LLViewerObjectList::processObjectUpdate(LLMessageSystem *mesgsys,
{
//if (objectp->getRegion())
//{
- // llinfos << "Local ID change: Removing object from table, local ID " << objectp->mLocalID
+ // LL_INFOS() << "Local ID change: Removing object from table, local ID " << objectp->mLocalID
// << ", id from message " << local_id << ", from "
// << LLHost(objectp->getRegion()->getHost().getAddress(), objectp->getRegion()->getHost().getPort())
// << ", full id " << fullid
// << ", objects id " << objectp->getID()
// << ", regionp " << (U32) regionp << ", object region " << (U32) objectp->getRegion()
- // << llendl;
+ // << LL_ENDL;
//}
removeFromLocalIDTable(objectp);
setUUIDAndLocal(fullid,
@@ -482,19 +572,16 @@ void LLViewerObjectList::processObjectUpdate(LLMessageSystem *mesgsys,
{
if (update_type == OUT_TERSE_IMPROVED)
{
- // llinfos << "terse update for an unknown object (compressed):" << fullid << llendl;
+ // LL_INFOS() << "terse update for an unknown object (compressed):" << fullid << LL_ENDL;
recorder.objectUpdateFailure(local_id, update_type, msg_size);
continue;
}
}
- else if (cached) // Cache hit only?
- {
- }
else
{
if (update_type != OUT_FULL)
{
- //llinfos << "terse update for an unknown object:" << fullid << llendl;
+ //LL_INFOS() << "terse update for an unknown object:" << fullid << LL_ENDL;
recorder.objectUpdateFailure(local_id, update_type, msg_size);
continue;
}
@@ -507,7 +594,7 @@ void LLViewerObjectList::processObjectUpdate(LLMessageSystem *mesgsys,
if (mDeadObjects.find(fullid) != mDeadObjects.end())
{
mNumDeadObjectUpdates++;
- //llinfos << "update for a dead object:" << fullid << llendl;
+ //LL_INFOS() << "update for a dead object:" << fullid << LL_ENDL;
recorder.objectUpdateFailure(local_id, update_type, msg_size);
continue;
}
@@ -516,23 +603,21 @@ void LLViewerObjectList::processObjectUpdate(LLMessageSystem *mesgsys,
objectp = createObject(pcode, regionp, fullid, local_id, gMessageSystem->getSender());
if (!objectp)
{
- llinfos << "createObject failure for object: " << fullid << llendl;
+ LL_INFOS() << "createObject failure for object: " << fullid << LL_ENDL;
recorder.objectUpdateFailure(local_id, update_type, msg_size);
continue;
}
+
justCreated = TRUE;
mNumNewObjects++;
- sCacheHitRate.addValue(cached ? 100.f : 0.f);
-
}
-
if (objectp->isDead())
{
- llwarns << "Dead object " << objectp->mID << " in UUID map 1!" << llendl;
+ LL_WARNS() << "Dead object " << objectp->mID << " in UUID map 1!" << LL_ENDL;
}
- bool bCached = false;
+ //bool bCached = false;
if (compressed)
{
if (update_type != OUT_TERSE_IMPROVED) // OUT_FULL_COMPRESSED only?
@@ -540,17 +625,21 @@ void LLViewerObjectList::processObjectUpdate(LLMessageSystem *mesgsys,
objectp->mLocalID = local_id;
}
processUpdateCore(objectp, user_data, i, update_type, &compressed_dp, justCreated);
+
+#if 0
if (update_type != OUT_TERSE_IMPROVED) // OUT_FULL_COMPRESSED only?
{
+ U32 flags = 0;
+ mesgsys->getU32Fast(_PREHASH_ObjectData, _PREHASH_UpdateFlags, flags, i);
+
+ if(!(flags & FLAGS_TEMPORARY_ON_REZ))
+ {
bCached = true;
- LLViewerRegion::eCacheUpdateResult result = objectp->mRegionp->cacheFullUpdate(objectp, compressed_dp);
+ LLViewerRegion::eCacheUpdateResult result = objectp->mRegionp->cacheFullUpdate(objectp, compressed_dp, flags);
recorder.cacheFullUpdate(local_id, update_type, result, objectp, msg_size);
}
}
- else if (cached) // Cache hit only?
- {
- objectp->mLocalID = local_id;
- processUpdateCore(objectp, user_data, i, update_type, cached_dpp, justCreated);
+#endif
}
else
{
@@ -561,8 +650,7 @@ void LLViewerObjectList::processObjectUpdate(LLMessageSystem *mesgsys,
processUpdateCore(objectp, user_data, i, update_type, NULL, justCreated);
}
recorder.objectUpdateEvent(local_id, update_type, objectp, msg_size);
- objectp->setLastUpdateType(update_type);
- objectp->setLastUpdateCached(bCached);
+ objectp->setLastUpdateType(update_type);
}
recorder.log(0.2f);
@@ -574,14 +662,52 @@ void LLViewerObjectList::processCompressedObjectUpdate(LLMessageSystem *mesgsys,
void **user_data,
const EObjectUpdateType update_type)
{
- processObjectUpdate(mesgsys, user_data, update_type, false, true);
+ processObjectUpdate(mesgsys, user_data, update_type, true);
}
void LLViewerObjectList::processCachedObjectUpdate(LLMessageSystem *mesgsys,
void **user_data,
const EObjectUpdateType update_type)
{
- processObjectUpdate(mesgsys, user_data, update_type, true, false);
+ //processObjectUpdate(mesgsys, user_data, update_type, true, false);
+
+ S32 num_objects = mesgsys->getNumberOfBlocksFast(_PREHASH_ObjectData);
+ gFullObjectUpdates += num_objects;
+
+ U64 region_handle;
+ mesgsys->getU64Fast(_PREHASH_RegionData, _PREHASH_RegionHandle, region_handle);
+ LLViewerRegion *regionp = LLWorld::getInstance()->getRegionFromHandle(region_handle);
+ if (!regionp)
+ {
+ LL_WARNS() << "Object update from unknown region! " << region_handle << LL_ENDL;
+ return;
+ }
+
+ LLViewerStatsRecorder& recorder = LLViewerStatsRecorder::instance();
+
+ for (S32 i = 0; i < num_objects; i++)
+ {
+ S32 msg_size = 0;
+ U32 id;
+ U32 crc;
+ U32 flags;
+ mesgsys->getU32Fast(_PREHASH_ObjectData, _PREHASH_ID, id, i);
+ mesgsys->getU32Fast(_PREHASH_ObjectData, _PREHASH_CRC, crc, i);
+ mesgsys->getU32Fast(_PREHASH_ObjectData, _PREHASH_UpdateFlags, flags, i);
+ msg_size += sizeof(U32) * 2;
+
+ // Lookup data packer and add this id to cache miss lists if necessary.
+ U8 cache_miss_type = LLViewerRegion::CACHE_MISS_TYPE_NONE;
+ if(!regionp->probeCache(id, crc, flags, cache_miss_type))
+ {
+ // Cache Miss.
+ recorder.cacheMissEvent(id, update_type, cache_miss_type, msg_size);
+
+ continue; // no data packer, skip this object
+ }
+ }
+
+ return;
}
void LLViewerObjectList::dirtyAllObjectInventory()
@@ -692,10 +818,10 @@ public:
void errorWithContent(U32 statusNum, const std::string& reason, const LLSD& content)
{
- llwarns
+ LL_WARNS()
<< "Transport error requesting object cost "
<< "[status: " << statusNum << "]: "
- << content << llendl;
+ << content << LL_ENDL;
// TODO*: Error message to user
// For now just clear the request from the pending list
@@ -708,11 +834,11 @@ public:
{
// Improper response or the request had an error,
// show an error to the user?
- llwarns
+ LL_WARNS()
<< "Application level error when fetching object "
<< "cost. Message: " << content["error"]["message"].asString()
<< ", identifier: " << content["error"]["identifier"].asString()
- << llendl;
+ << LL_ENDL;
// TODO*: Adaptively adjust request size if the
// service says we've requested too many and retry
@@ -781,10 +907,10 @@ public:
void errorWithContent(U32 statusNum, const std::string& reason, const LLSD& content)
{
- llwarns
+ LL_WARNS()
<< "Transport error requesting object physics flags "
<< "[status: " << statusNum << "]: "
- << content << llendl;
+ << content << LL_ENDL;
// TODO*: Error message to user
// For now just clear the request from the pending list
@@ -797,11 +923,11 @@ public:
{
// Improper response or the request had an error,
// show an error to the user?
- llwarns
+ LL_WARNS()
<< "Application level error when fetching object "
<< "physics flags. Message: " << content["error"]["message"].asString()
<< ", identifier: " << content["error"]["identifier"].asString()
- << llendl;
+ << LL_ENDL;
// TODO*: Adaptively adjust request size if the
// service says we've requested too many and retry
@@ -852,6 +978,8 @@ private:
LLSD mObjectIDs;
};
+static LLTrace::BlockTimerStatHandle FTM_IDLE_COPY("Idle Copy");
+
void LLViewerObjectList::update(LLAgent &agent)
{
// Update globals
@@ -864,7 +992,7 @@ void LLViewerObjectList::update(LLAgent &agent)
phase_out_time < 0.0 ||
phase_out_time > interp_time)
{
- llwarns << "Invalid values for InterpolationTime or InterpolationPhaseOut, resetting to defaults" << llendl;
+ LL_WARNS() << "Invalid values for InterpolationTime or InterpolationPhaseOut, resetting to defaults" << LL_ENDL;
interp_time = 3.0f;
phase_out_time = 1.0f;
}
@@ -875,14 +1003,14 @@ void LLViewerObjectList::update(LLAgent &agent)
// update global timer
F32 last_time = gFrameTimeSeconds;
- U64 time = totalTime(); // this will become the new gFrameTime when the update is done
+ U64Microseconds time = totalTime(); // this will become the new gFrameTime when the update is done
// Time _can_ go backwards, for example if the user changes the system clock.
// It doesn't cause any fatal problems (just some oddness with stats), so we shouldn't assert here.
// llassert(time > gFrameTime);
- F64 time_diff = U64_to_F64(time - gFrameTime)/(F64)SEC_TO_MICROSEC;
+ F64Seconds time_diff = time - gFrameTime;
gFrameTime = time;
- F64 time_since_start = U64_to_F64(gFrameTime - gStartTime)/(F64)SEC_TO_MICROSEC;
- gFrameTimeSeconds = (F32)time_since_start;
+ F64Seconds time_since_start = gFrameTime - gStartTime;
+ gFrameTimeSeconds = time_since_start;
gFrameIntervalSeconds = gFrameTimeSeconds - last_time;
if (gFrameIntervalSeconds < 0.f)
@@ -902,10 +1030,8 @@ void LLViewerObjectList::update(LLAgent &agent)
U32 idle_count = 0;
- static LLFastTimer::DeclareTimer idle_copy("Idle Copy");
-
{
- LLFastTimer t(idle_copy);
+ LL_RECORD_BLOCK_TIME(FTM_IDLE_COPY);
for (std::vector<LLPointer<LLViewerObject> >::iterator active_iter = mActiveObjects.begin();
active_iter != mActiveObjects.end(); active_iter++)
@@ -926,7 +1052,7 @@ void LLViewerObjectList::update(LLAgent &agent)
else
{ // There shouldn't be any NULL pointers in the list, but they have caused
// crashes before. This may be idleUpdate() messing with the list.
- llwarns << "LLViewerObjectList::update has a NULL objectp" << llendl;
+ LL_WARNS() << "LLViewerObjectList::update has a NULL objectp" << LL_ENDL;
}
}
}
@@ -971,9 +1097,6 @@ void LLViewerObjectList::update(LLAgent &agent)
fetchObjectCosts();
fetchPhysicsFlags();
- mNumSizeCulled = 0;
- mNumVisCulled = 0;
-
// update max computed render cost
LLVOVolume::updateRenderComplexity();
@@ -987,7 +1110,7 @@ void LLViewerObjectList::update(LLAgent &agent)
/*
// Debugging code for viewing orphans, and orphaned parents
LLUUID id;
- for (i = 0; i < mOrphanParents.count(); i++)
+ for (i = 0; i < mOrphanParents.size(); i++)
{
id = sIndexAndLocalIDToUUID[mOrphanParents[i]];
LLViewerObject *objectp = findObject(id);
@@ -1004,7 +1127,7 @@ void LLViewerObjectList::update(LLAgent &agent)
}
LLColor4 text_color;
- for (i = 0; i < mOrphanChildren.count(); i++)
+ for (i = 0; i < mOrphanChildren.size(); i++)
{
OrphanInfo oi = mOrphanChildren[i];
LLViewerObject *objectp = findObject(oi.mChildInfo);
@@ -1033,10 +1156,8 @@ void LLViewerObjectList::update(LLAgent &agent)
}
*/
- LLViewerStats::getInstance()->mNumObjectsStat.addValue((S32) mObjects.size());
- LLViewerStats::getInstance()->mNumActiveObjectsStat.addValue(idle_count);
- LLViewerStats::getInstance()->mNumSizeCulledStat.addValue(mNumSizeCulled);
- LLViewerStats::getInstance()->mNumVisCulledStat.addValue(mNumVisCulled);
+ sample(LLStatViewer::NUM_OBJECTS, mObjects.size());
+ sample(LLStatViewer::NUM_ACTIVE_OBJECTS, idle_count);
}
void LLViewerObjectList::fetchObjectCosts()
@@ -1169,7 +1290,7 @@ void LLViewerObjectList::cleanupReferences(LLViewerObject *objectp)
{
if (mDeadObjects.find(objectp->mID) != mDeadObjects.end())
{
- llinfos << "Object " << objectp->mID << " already on dead list!" << llendl;
+ LL_INFOS() << "Object " << objectp->mID << " already on dead list!" << LL_ENDL;
}
else
{
@@ -1183,16 +1304,16 @@ void LLViewerObjectList::cleanupReferences(LLViewerObject *objectp)
//if (objectp->getRegion())
//{
- // llinfos << "cleanupReferences removing object from table, local ID " << objectp->mLocalID << ", ip "
+ // LL_INFOS() << "cleanupReferences removing object from table, local ID " << objectp->mLocalID << ", ip "
// << objectp->getRegion()->getHost().getAddress() << ":"
- // << objectp->getRegion()->getHost().getPort() << llendl;
+ // << objectp->getRegion()->getHost().getPort() << LL_ENDL;
//}
removeFromLocalIDTable(objectp);
if (objectp->onActiveList())
{
- //llinfos << "Removing " << objectp->mID << " " << objectp->getPCodeString() << " from active list in cleanupReferences." << llendl;
+ //LL_INFOS() << "Removing " << objectp->mID << " " << objectp->getPCodeString() << " from active list in cleanupReferences." << LL_ENDL;
objectp->setOnActiveList(FALSE);
removeFromActiveList(objectp);
}
@@ -1209,11 +1330,11 @@ void LLViewerObjectList::cleanupReferences(LLViewerObject *objectp)
mNumDeadObjects++;
}
-static LLFastTimer::DeclareTimer FTM_REMOVE_DRAWABLE("Remove Drawable");
+static LLTrace::BlockTimerStatHandle FTM_REMOVE_DRAWABLE("Remove Drawable");
void LLViewerObjectList::removeDrawable(LLDrawable* drawablep)
{
- LLFastTimer t(FTM_REMOVE_DRAWABLE);
+ LL_RECORD_BLOCK_TIME(FTM_REMOVE_DRAWABLE);
if (!drawablep)
{
@@ -1249,16 +1370,7 @@ BOOL LLViewerObjectList::killObject(LLViewerObject *objectp)
if (objectp)
{
- if (objectp->isDead())
- {
- // This object is already dead. Don't need to do more.
- return TRUE;
- }
- else
- {
- objectp->markDead();
- }
-
+ objectp->markDead(); // does the right thing if object already dead
return TRUE;
}
@@ -1301,19 +1413,19 @@ void LLViewerObjectList::killAllObjects()
if(!mObjects.empty())
{
- llwarns << "LLViewerObjectList::killAllObjects still has entries in mObjects: " << mObjects.size() << llendl;
+ LL_WARNS() << "LLViewerObjectList::killAllObjects still has entries in mObjects: " << mObjects.size() << LL_ENDL;
mObjects.clear();
}
if (!mActiveObjects.empty())
{
- llwarns << "Some objects still on active object list!" << llendl;
+ LL_WARNS() << "Some objects still on active object list!" << LL_ENDL;
mActiveObjects.clear();
}
if (!mMapObjects.empty())
{
- llwarns << "Some objects still on map object list!" << llendl;
+ LL_WARNS() << "Some objects still on map object list!" << LL_ENDL;
mMapObjects.clear();
}
}
@@ -1404,7 +1516,7 @@ void LLViewerObjectList::updateActive(LLViewerObject *objectp)
{
if (active)
{
- //llinfos << "Adding " << objectp->mID << " " << objectp->getPCodeString() << " to active list." << llendl;
+ //LL_INFOS() << "Adding " << objectp->mID << " " << objectp->getPCodeString() << " to active list." << LL_ENDL;
S32 idx = objectp->getListIndex();
if (idx <= -1)
{
@@ -1420,13 +1532,13 @@ void LLViewerObjectList::updateActive(LLViewerObject *objectp)
if (idx >= mActiveObjects.size() ||
mActiveObjects[idx] != objectp)
{
- llwarns << "Invalid object list index detected!" << llendl;
+ LL_WARNS() << "Invalid object list index detected!" << LL_ENDL;
}
}
}
else
{
- //llinfos << "Removing " << objectp->mID << " " << objectp->getPCodeString() << " from active list." << llendl;
+ //LL_INFOS() << "Removing " << objectp->mID << " " << objectp->getPCodeString() << " from active list." << LL_ENDL;
removeFromActiveList(objectp);
objectp->setOnActiveList(FALSE);
}
@@ -1464,7 +1576,7 @@ void LLViewerObjectList::updateObjectCost(const LLUUID& object_id, F32 object_co
void LLViewerObjectList::onObjectCostFetchFailure(const LLUUID& object_id)
{
- //llwarns << "Failed to fetch object cost for object: " << object_id << llendl;
+ //LL_WARNS() << "Failed to fetch object cost for object: " << object_id << LL_ENDL;
mPendingObjectCost.erase(object_id);
}
@@ -1503,13 +1615,13 @@ void LLViewerObjectList::updatePhysicsProperties(const LLUUID& object_id,
void LLViewerObjectList::onPhysicsFlagsFetchFailure(const LLUUID& object_id)
{
- //llwarns << "Failed to fetch physics flags for object: " << object_id << llendl;
+ //LL_WARNS() << "Failed to fetch physics flags for object: " << object_id << LL_ENDL;
mPendingPhysicsFlags.erase(object_id);
}
-static LLFastTimer::DeclareTimer FTM_SHIFT_OBJECTS("Shift Objects");
-static LLFastTimer::DeclareTimer FTM_PIPELINE_SHIFT("Pipeline Shift");
-static LLFastTimer::DeclareTimer FTM_REGION_SHIFT("Region Shift");
+static LLTrace::BlockTimerStatHandle FTM_SHIFT_OBJECTS("Shift Objects");
+static LLTrace::BlockTimerStatHandle FTM_PIPELINE_SHIFT("Pipeline Shift");
+static LLTrace::BlockTimerStatHandle FTM_REGION_SHIFT("Region Shift");
void LLViewerObjectList::shiftObjects(const LLVector3 &offset)
{
@@ -1522,7 +1634,7 @@ void LLViewerObjectList::shiftObjects(const LLVector3 &offset)
return;
}
- LLFastTimer t(FTM_SHIFT_OBJECTS);
+ LL_RECORD_BLOCK_TIME(FTM_SHIFT_OBJECTS);
LLViewerObject *objectp;
for (vobj_list_t::iterator iter = mObjects.begin(); iter != mObjects.end(); ++iter)
@@ -1541,12 +1653,12 @@ void LLViewerObjectList::shiftObjects(const LLVector3 &offset)
}
{
- LLFastTimer t(FTM_PIPELINE_SHIFT);
+ LL_RECORD_BLOCK_TIME(FTM_PIPELINE_SHIFT);
gPipeline.shiftObjects(offset);
}
{
- LLFastTimer t(FTM_REGION_SHIFT);
+ LL_RECORD_BLOCK_TIME(FTM_REGION_SHIFT);
LLWorld::getInstance()->shiftRegions(offset);
}
}
@@ -1606,7 +1718,7 @@ void LLViewerObjectList::clearAllMapObjectsInRegion(LLViewerRegion* regionp)
if(dead_object_list.size() > 0)
{
- llwarns << "There are " << dead_object_list.size() << " dead objects on the map!" << llendl ;
+ LL_WARNS() << "There are " << dead_object_list.size() << " dead objects on the map!" << LL_ENDL ;
for(std::set<LLViewerObject*>::iterator iter = dead_object_list.begin(); iter != dead_object_list.end(); ++iter)
{
@@ -1615,7 +1727,7 @@ void LLViewerObjectList::clearAllMapObjectsInRegion(LLViewerRegion* regionp)
}
if(region_object_list.size() > 0)
{
- llwarns << "There are " << region_object_list.size() << " objects not removed from the deleted region!" << llendl ;
+ LL_WARNS() << "There are " << region_object_list.size() << " objects not removed from the deleted region!" << LL_ENDL ;
for(std::set<LLViewerObject*>::iterator iter = region_object_list.begin(); iter != region_object_list.end(); ++iter)
{
@@ -1881,7 +1993,7 @@ LLViewerObject *LLViewerObjectList::createObjectViewer(const LLPCode pcode, LLVi
LLViewerObject *objectp = LLViewerObject::createObject(fullid, pcode, regionp);
if (!objectp)
{
-// llwarns << "Couldn't create object of type " << LLPrimitive::pCodeToString(pcode) << llendl;
+// LL_WARNS() << "Couldn't create object of type " << LLPrimitive::pCodeToString(pcode) << LL_ENDL;
return NULL;
}
@@ -1894,6 +2006,29 @@ LLViewerObject *LLViewerObjectList::createObjectViewer(const LLPCode pcode, LLVi
return objectp;
}
+LLViewerObject *LLViewerObjectList::createObjectFromCache(const LLPCode pcode, LLViewerRegion *regionp, const LLUUID &uuid, const U32 local_id)
+{
+ llassert_always(uuid.notNull());
+
+ LLViewerObject *objectp = LLViewerObject::createObject(uuid, pcode, regionp);
+ if (!objectp)
+ {
+// LL_WARNS() << "Couldn't create object of type " << LLPrimitive::pCodeToString(pcode) << " id:" << fullid << LL_ENDL;
+ return NULL;
+ }
+
+ objectp->mLocalID = local_id;
+ mUUIDObjectMap[uuid] = objectp;
+ setUUIDAndLocal(uuid,
+ local_id,
+ regionp->getHost().getAddress(),
+ regionp->getHost().getPort());
+ mObjects.push_back(objectp);
+
+ updateActive(objectp);
+
+ return objectp;
+}
LLViewerObject *LLViewerObjectList::createObject(const LLPCode pcode, LLViewerRegion *regionp,
const LLUUID &uuid, const U32 local_id, const LLHost &sender)
@@ -1912,9 +2047,13 @@ LLViewerObject *LLViewerObjectList::createObject(const LLPCode pcode, LLViewerRe
LLViewerObject *objectp = LLViewerObject::createObject(fullid, pcode, regionp);
if (!objectp)
{
-// llwarns << "Couldn't create object of type " << LLPrimitive::pCodeToString(pcode) << " id:" << fullid << llendl;
+// LL_WARNS() << "Couldn't create object of type " << LLPrimitive::pCodeToString(pcode) << " id:" << fullid << LL_ENDL;
return NULL;
}
+ if(regionp)
+ {
+ regionp->addToCreatedList(local_id);
+ }
mUUIDObjectMap[fullid] = objectp;
setUUIDAndLocal(fullid,
@@ -1961,9 +2100,7 @@ S32 LLViewerObjectList::findReferences(LLDrawable *drawablep) const
void LLViewerObjectList::orphanize(LLViewerObject *childp, U32 parent_id, U32 ip, U32 port)
{
-#ifdef ORPHAN_SPAM
- llinfos << "Orphaning object " << childp->getID() << " with parent " << parent_id << llendl;
-#endif
+ LL_DEBUGS("ORPHANS") << "Orphaning object " << childp->getID() << " with parent " << parent_id << LL_ENDL;
// We're an orphan, flag things appropriately.
childp->mOrphaned = TRUE;
@@ -1979,7 +2116,7 @@ void LLViewerObjectList::orphanize(LLViewerObject *childp, U32 parent_id, U32 ip
// object probably ISN'T being reparented, but just got an object
// update out of order (child update before parent).
make_invisible = false;
- //llinfos << "Don't make object handoffs invisible!" << llendl;
+ //LL_INFOS() << "Don't make object handoffs invisible!" << LL_ENDL;
}
}
@@ -2011,11 +2148,17 @@ void LLViewerObjectList::findOrphans(LLViewerObject* objectp, U32 ip, U32 port)
{
if (objectp->isDead())
{
- llwarns << "Trying to find orphans for dead obj " << objectp->mID
- << ":" << objectp->getPCodeString() << llendl;
+ LL_WARNS() << "Trying to find orphans for dead obj " << objectp->mID
+ << ":" << objectp->getPCodeString() << LL_ENDL;
return;
}
+ //search object cache to get orphans
+ if(objectp->getRegion())
+ {
+ objectp->getRegion()->findOrphans(objectp->getLocalID());
+ }
+
// See if we are a parent of an orphan.
// Note: This code is fairly inefficient but it should happen very rarely.
// It can be sped up if this is somehow a performance issue...
@@ -2046,16 +2189,16 @@ void LLViewerObjectList::findOrphans(LLViewerObject* objectp, U32 ip, U32 port)
{
if (childp == objectp)
{
- llwarns << objectp->mID << " has self as parent, skipping!"
- << llendl;
+ LL_WARNS() << objectp->mID << " has self as parent, skipping!"
+ << LL_ENDL;
continue;
}
+ LL_DEBUGS("ORPHANS") << "Reunited parent " << objectp->mID
+ << " with child " << childp->mID << LL_ENDL;
+ LL_DEBUGS("ORPHANS") << "Glob: " << objectp->getPositionGlobal() << LL_ENDL;
+ LL_DEBUGS("ORPHANS") << "Agent: " << objectp->getPositionAgent() << LL_ENDL;
#ifdef ORPHAN_SPAM
- llinfos << "Reunited parent " << objectp->mID
- << " with child " << childp->mID << llendl;
- llinfos << "Glob: " << objectp->getPositionGlobal() << llendl;
- llinfos << "Agent: " << objectp->getPositionAgent() << llendl;
addDebugBeacon(objectp->getPositionAgent(),"");
#endif
gPipeline.markMoved(objectp->mDrawable);
@@ -2080,7 +2223,7 @@ void LLViewerObjectList::findOrphans(LLViewerObject* objectp, U32 ip, U32 port)
}
else
{
- llinfos << "Missing orphan child, removing from list" << llendl;
+ LL_INFOS() << "Missing orphan child, removing from list" << LL_ENDL;
iter = mOrphanChildren.erase(iter);
}
@@ -2143,3 +2286,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 98b50fa789..594317cd9f 100755
--- a/indra/newview/llviewerobjectlist.h
+++ b/indra/newview/llviewerobjectlist.h
@@ -31,8 +31,8 @@
#include <set>
// common includes
-#include "llstat.h"
#include "llstring.h"
+#include "lltrace.h"
// project includes
#include "llviewerobject.h"
@@ -40,6 +40,7 @@
class LLCamera;
class LLNetMap;
class LLDebugBeacon;
+class LLVOCacheEntry;
const U32 CLOSE_BIN_SIZE = 10;
const U32 NUM_BINS = 128;
@@ -65,6 +66,7 @@ public:
inline LLViewerObject *findObject(const LLUUID &id);
LLViewerObject *createObjectViewer(const LLPCode pcode, LLViewerRegion *regionp); // Create a viewer-side object
+ LLViewerObject *createObjectFromCache(const LLPCode pcode, LLViewerRegion *regionp, const LLUUID &uuid, const U32 local_id);
LLViewerObject *createObject(const LLPCode pcode, LLViewerRegion *regionp,
const LLUUID &uuid, const U32 local_id, const LLHost &sender);
@@ -78,8 +80,10 @@ public:
void cleanDeadObjects(const BOOL use_timer = TRUE); // Clean up the dead object list.
// Simulator and viewer side object updates...
- void processUpdateCore(LLViewerObject* objectp, void** data, U32 block, const EObjectUpdateType update_type, LLDataPacker* dpp, BOOL justCreated);
- void processObjectUpdate(LLMessageSystem *mesgsys, void **user_data, EObjectUpdateType update_type, bool cached=false, bool compressed=false);
+ void processUpdateCore(LLViewerObject* objectp, void** data, U32 block, const EObjectUpdateType update_type,
+ LLDataPacker* dpp, bool justCreated, bool from_cache = false);
+ LLViewerObject* processObjectUpdateFromCache(LLVOCacheEntry* entry, LLViewerRegion* regionp);
+ void processObjectUpdate(LLMessageSystem *mesgsys, void **user_data, EObjectUpdateType update_type, bool compressed=false);
void processCompressedObjectUpdate(LLMessageSystem *mesgsys, void **user_data, EObjectUpdateType update_type);
void processCachedObjectUpdate(LLMessageSystem *mesgsys, void **user_data, EObjectUpdateType update_type);
void updateApparentAngles(LLAgent &agent);
@@ -166,8 +170,6 @@ public:
// Statistics data (see also LLViewerStats)
S32 mNumNewObjects;
- S32 mNumSizeCulled;
- S32 mNumVisCulled;
// if we paused in the last frame
// used to discount stats from this frame
@@ -194,8 +196,6 @@ protected:
std::vector<OrphanInfo> mOrphanChildren; // UUID's of orphaned objects
S32 mNumOrphans;
- static LLStat sCacheHitRate;
-
typedef std::vector<LLPointer<LLViewerObject> > vobj_list_t;
vobj_list_t mObjects;
@@ -233,20 +233,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;
};
@@ -278,7 +272,7 @@ inline LLViewerObject *LLViewerObjectList::getObject(const S32 index)
objectp = mObjects[index];
if (objectp->isDead())
{
- //llwarns << "Dead object " << objectp->mID << " in getObject" << llendl;
+ //LL_WARNS() << "Dead object " << objectp->mID << " in getObject" << LL_ENDL;
return NULL;
}
return objectp;
diff --git a/indra/newview/llvieweroctree.cpp b/indra/newview/llvieweroctree.cpp
new file mode 100644
index 0000000000..03c3f0fc08
--- /dev/null
+++ b/indra/newview/llvieweroctree.cpp
@@ -0,0 +1,1560 @@
+/**
+ * @file llvieweroctree.cpp
+ * @brief LLViewerOctreeGroup class implementation and supporting functions
+ *
+ * $LicenseInfo:firstyear=2003&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2010, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
+ * $/LicenseInfo$
+ */
+
+#include "llviewerprecompiledheaders.h"
+#include "llvieweroctree.h"
+#include "llviewerregion.h"
+#include "pipeline.h"
+#include "llviewercontrol.h"
+#include "llappviewer.h"
+#include "llglslshader.h"
+#include "llviewershadermgr.h"
+
+//-----------------------------------------------------------------------------------
+//static variables definitions
+//-----------------------------------------------------------------------------------
+U32 LLViewerOctreeEntryData::sCurVisible = 10; //reserve the low numbers for special use.
+BOOL LLViewerOctreeDebug::sInDebug = FALSE;
+
+static LLTrace::CountStatHandle<S32> sOcclusionQueries("occlusion_queries", "Number of occlusion queries executed"),
+ sNumObjectsOccluded("occluded_objects", "Count of objects being occluded by a query"),
+ sNumObjectsUnoccluded("unoccluded_objects", "Count of objects being unoccluded by a query");
+
+//-----------------------------------------------------------------------------------
+//some global functions definitions
+//-----------------------------------------------------------------------------------
+typedef enum
+{
+ b000 = 0x00,
+ b001 = 0x01,
+ b010 = 0x02,
+ b011 = 0x03,
+ b100 = 0x04,
+ b101 = 0x05,
+ b110 = 0x06,
+ b111 = 0x07,
+} eLoveTheBits;
+
+//contact Runitai Linden for a copy of the SL object used to write this table
+//basically, you give the table a bitmask of the look-at vector to a node and it
+//gives you a triangle fan index array
+static U16 sOcclusionIndices[] =
+{
+ //000
+ b111, b110, b010, b011, b001, b101, b100, b110,
+ //001
+ b011, b010, b000, b001, b101, b111, b110, b010,
+ //010
+ b101, b100, b110, b111, b011, b001, b000, b100,
+ //011
+ b001, b000, b100, b101, b111, b011, b010, b000,
+ //100
+ b110, b000, b010, b011, b111, b101, b100, b000,
+ //101
+ b010, b100, b000, b001, b011, b111, b110, b100,
+ //110
+ b100, b010, b110, b111, b101, b001, b000, b010,
+ //111
+ b000, b110, b100, b101, b001, b011, b010, b110,
+};
+
+U32 get_box_fan_indices(LLCamera* camera, const LLVector4a& center)
+{
+ LLVector4a origin;
+ origin.load3(camera->getOrigin().mV);
+
+ S32 cypher = center.greaterThan(origin).getGatheredBits() & 0x7;
+
+ return cypher*8;
+}
+
+U8* get_box_fan_indices_ptr(LLCamera* camera, const LLVector4a& center)
+{
+ LLVector4a origin;
+ origin.load3(camera->getOrigin().mV);
+
+ S32 cypher = center.greaterThan(origin).getGatheredBits() & 0x7;
+
+ return (U8*) (sOcclusionIndices+cypher*8);
+}
+
+//create a vertex buffer for efficiently rendering cubes
+LLVertexBuffer* ll_create_cube_vb(U32 type_mask, U32 usage)
+{
+ LLVertexBuffer* ret = new LLVertexBuffer(type_mask, usage);
+
+ ret->allocateBuffer(8, 64, true);
+
+ LLStrider<LLVector3> pos;
+ LLStrider<U16> idx;
+
+ ret->getVertexStrider(pos);
+ ret->getIndexStrider(idx);
+
+ pos[0] = LLVector3(-1,-1,-1);
+ pos[1] = LLVector3(-1,-1, 1);
+ pos[2] = LLVector3(-1, 1,-1);
+ pos[3] = LLVector3(-1, 1, 1);
+ pos[4] = LLVector3( 1,-1,-1);
+ pos[5] = LLVector3( 1,-1, 1);
+ pos[6] = LLVector3( 1, 1,-1);
+ pos[7] = LLVector3( 1, 1, 1);
+
+ for (U32 i = 0; i < 64; i++)
+ {
+ idx[i] = sOcclusionIndices[i];
+ }
+
+ ret->flush();
+
+ return ret;
+}
+
+
+#define LL_TRACK_PENDING_OCCLUSION_QUERIES 0
+
+const F32 SG_OCCLUSION_FUDGE = 0.25f;
+#define SG_DISCARD_TOLERANCE 0.01f
+
+
+S32 AABBSphereIntersect(const LLVector3& min, const LLVector3& max, const LLVector3 &origin, const F32 &rad)
+{
+ return AABBSphereIntersectR2(min, max, origin, rad*rad);
+}
+
+S32 AABBSphereIntersectR2(const LLVector3& min, const LLVector3& max, const LLVector3 &origin, const F32 &r)
+{
+ F32 d = 0.f;
+ F32 t;
+
+ if ((min-origin).magVecSquared() < r &&
+ (max-origin).magVecSquared() < r)
+ {
+ return 2;
+ }
+
+ for (U32 i = 0; i < 3; i++)
+ {
+ if (origin.mV[i] < min.mV[i])
+ {
+ t = min.mV[i] - origin.mV[i];
+ d += t*t;
+ }
+ else if (origin.mV[i] > max.mV[i])
+ {
+ t = origin.mV[i] - max.mV[i];
+ d += t*t;
+ }
+
+ if (d > r)
+ {
+ return 0;
+ }
+ }
+
+ return 1;
+}
+
+
+S32 AABBSphereIntersect(const LLVector4a& min, const LLVector4a& max, const LLVector3 &origin, const F32 &rad)
+{
+ return AABBSphereIntersectR2(min, max, origin, rad*rad);
+}
+
+S32 AABBSphereIntersectR2(const LLVector4a& min, const LLVector4a& max, const LLVector3 &origin, const F32 &r)
+{
+ F32 d = 0.f;
+ F32 t;
+
+ LLVector4a origina;
+ origina.load3(origin.mV);
+
+ LLVector4a v;
+ v.setSub(min, origina);
+
+ if (v.dot3(v) < r)
+ {
+ v.setSub(max, origina);
+ if (v.dot3(v) < r)
+ {
+ return 2;
+ }
+ }
+
+
+ for (U32 i = 0; i < 3; i++)
+ {
+ if (origin.mV[i] < min[i])
+ {
+ t = min[i] - origin.mV[i];
+ d += t*t;
+ }
+ else if (origin.mV[i] > max[i])
+ {
+ t = origin.mV[i] - max[i];
+ d += t*t;
+ }
+
+ if (d > r)
+ {
+ return 0;
+ }
+ }
+
+ return 1;
+}
+
+//-----------------------------------------------------------------------------------
+//class LLViewerOctreeEntry definitions
+//-----------------------------------------------------------------------------------
+LLViewerOctreeEntry::LLViewerOctreeEntry()
+: LLTrace::MemTrackable<LLViewerOctreeEntry, 16>("LLViewerOctreeEntry"),
+ mGroup(NULL),
+ mBinRadius(0.f),
+ mBinIndex(-1),
+ mVisible(0)
+{
+ mPositionGroup.clear();
+ mExtents[0].clear();
+ mExtents[1].clear();
+
+ for(S32 i = 0; i < NUM_DATA_TYPE; i++)
+ {
+ mData[i] = NULL;
+ }
+}
+
+LLViewerOctreeEntry::~LLViewerOctreeEntry()
+{
+ llassert(!mGroup);
+}
+
+void LLViewerOctreeEntry::addData(LLViewerOctreeEntryData* data)
+{
+ //llassert(mData[data->getDataType()] == NULL);
+ llassert(data != NULL);
+
+ mData[data->getDataType()] = data;
+}
+
+void LLViewerOctreeEntry::removeData(LLViewerOctreeEntryData* data)
+{
+ //llassert(data->getDataType() != LLVOCACHEENTRY); //can not remove VOCache entry
+
+ if(!mData[data->getDataType()])
+ {
+ return;
+ }
+ if(mData[data->getDataType()] != data)
+ {
+ return;
+ }
+
+ mData[data->getDataType()] = NULL;
+
+ if(mGroup != NULL && !mData[LLDRAWABLE])
+ {
+ LLViewerOctreeGroup* group = mGroup;
+ mGroup = NULL;
+ group->removeFromGroup(data);
+
+ llassert(mBinIndex == -1);
+ }
+}
+
+//called by group handleDestruction() ONLY when group is destroyed by octree.
+void LLViewerOctreeEntry::nullGroup()
+{
+ mGroup = NULL;
+}
+
+void LLViewerOctreeEntry::setGroup(LLViewerOctreeGroup* group)
+{
+ if(mGroup == group)
+ {
+ return;
+ }
+
+ if(mGroup)
+ {
+ LLViewerOctreeGroup* old_group = mGroup;
+ mGroup = NULL;
+ old_group->removeFromGroup(this);
+
+ llassert(mBinIndex == -1);
+ }
+
+ mGroup = group;
+}
+
+//-----------------------------------------------------------------------------------
+//class LLViewerOctreeEntryData definitions
+//-----------------------------------------------------------------------------------
+LLViewerOctreeEntryData::~LLViewerOctreeEntryData()
+{
+ if(mEntry)
+ {
+ mEntry->removeData(this);
+ }
+}
+
+LLViewerOctreeEntryData::LLViewerOctreeEntryData(LLViewerOctreeEntry::eEntryDataType_t data_type)
+ : mDataType(data_type),
+ mEntry(NULL)
+{
+}
+
+//virtual
+void LLViewerOctreeEntryData::setOctreeEntry(LLViewerOctreeEntry* entry)
+{
+ llassert_always(mEntry.isNull());
+
+ if(mEntry.notNull())
+ {
+ return;
+ }
+
+ if(!entry)
+ {
+ mEntry = new LLViewerOctreeEntry();
+ }
+ else
+ {
+ mEntry = entry;
+ }
+ mEntry->addData(this);
+}
+
+void LLViewerOctreeEntryData::removeOctreeEntry()
+{
+ if(mEntry)
+ {
+ mEntry->removeData(this);
+ mEntry = NULL;
+ }
+}
+
+void LLViewerOctreeEntryData::setSpatialExtents(const LLVector3& min, const LLVector3& max)
+{
+ mEntry->mExtents[0].load3(min.mV);
+ mEntry->mExtents[1].load3(max.mV);
+}
+
+void LLViewerOctreeEntryData::setSpatialExtents(const LLVector4a& min, const LLVector4a& max)
+{
+ mEntry->mExtents[0] = min;
+ mEntry->mExtents[1] = max;
+}
+
+void LLViewerOctreeEntryData::setPositionGroup(const LLVector4a& pos)
+{
+ mEntry->mPositionGroup = pos;
+}
+
+const LLVector4a* LLViewerOctreeEntryData::getSpatialExtents() const
+{
+ return mEntry->getSpatialExtents();
+}
+
+//virtual
+void LLViewerOctreeEntryData::setGroup(LLViewerOctreeGroup* group)
+{
+ mEntry->setGroup(group);
+}
+
+void LLViewerOctreeEntryData::shift(const LLVector4a &shift_vector)
+{
+ mEntry->mExtents[0].add(shift_vector);
+ mEntry->mExtents[1].add(shift_vector);
+ mEntry->mPositionGroup.add(shift_vector);
+}
+
+LLViewerOctreeGroup* LLViewerOctreeEntryData::getGroup()const
+{
+ return mEntry.notNull() ? mEntry->mGroup : NULL;
+}
+
+const LLVector4a& LLViewerOctreeEntryData::getPositionGroup() const
+{
+ return mEntry->getPositionGroup();
+}
+
+//virtual
+bool LLViewerOctreeEntryData::isVisible() const
+{
+ if(mEntry)
+ {
+ return mEntry->mVisible == sCurVisible;
+ }
+ return false;
+}
+
+//virtual
+bool LLViewerOctreeEntryData::isRecentlyVisible() const
+{
+ if(!mEntry)
+ {
+ return false;
+ }
+
+ if(isVisible())
+ {
+ return true;
+ }
+ if(getGroup() && getGroup()->isRecentlyVisible())
+ {
+ setVisible();
+ return true;
+ }
+
+ return false;
+}
+
+void LLViewerOctreeEntryData::setVisible() const
+{
+ if(mEntry)
+ {
+ mEntry->mVisible = sCurVisible;
+ }
+}
+
+void LLViewerOctreeEntryData::resetVisible() const
+{
+ if(mEntry)
+ {
+ mEntry->mVisible = 0;
+ }
+}
+//-----------------------------------------------------------------------------------
+//class LLViewerOctreeGroup definitions
+//-----------------------------------------------------------------------------------
+
+LLViewerOctreeGroup::~LLViewerOctreeGroup()
+{
+ //empty here
+}
+
+LLViewerOctreeGroup::LLViewerOctreeGroup(OctreeNode* node)
+: LLTrace::MemTrackable<LLViewerOctreeGroup, 16>("LLViewerOctreeGroup"),
+ mOctreeNode(node),
+ mAnyVisible(0),
+ mState(CLEAN)
+{
+ LLVector4a tmp;
+ tmp.splat(0.f);
+ mExtents[0] = mExtents[1] = mObjectBounds[0] = mObjectBounds[0] = mObjectBounds[1] =
+ mObjectExtents[0] = mObjectExtents[1] = tmp;
+
+ mBounds[0] = node->getCenter();
+ mBounds[1] = node->getSize();
+
+ mOctreeNode->addListener(this);
+}
+
+bool LLViewerOctreeGroup::hasElement(LLViewerOctreeEntryData* data)
+{
+ if(!data->getEntry())
+ {
+ return false;
+ }
+ return std::find(getDataBegin(), getDataEnd(), data->getEntry()) != getDataEnd();
+}
+
+bool LLViewerOctreeGroup::removeFromGroup(LLViewerOctreeEntryData* data)
+{
+ return removeFromGroup(data->getEntry());
+}
+
+bool LLViewerOctreeGroup::removeFromGroup(LLViewerOctreeEntry* entry)
+{
+ llassert(entry != NULL);
+ llassert(!entry->getGroup());
+
+ if(isDead()) //group is about to be destroyed, not need to double delete the entry.
+ {
+ entry->setBinIndex(-1);
+ return true;
+ }
+
+ unbound();
+ setState(OBJECT_DIRTY);
+
+ if (mOctreeNode)
+ {
+ if (!mOctreeNode->remove(entry)) //this could cause *this* pointer to be destroyed, so no more function calls after this.
+ {
+ OCT_ERRS << "Could not remove LLVOCacheEntry from LLVOCacheOctreeGroup" << LL_ENDL;
+ return false;
+ }
+ }
+
+ return true;
+}
+
+//virtual
+void LLViewerOctreeGroup::unbound()
+{
+ if (isDirty())
+ {
+ return;
+ }
+
+ setState(DIRTY);
+
+ //all the parent nodes need to rebound this child
+ if (mOctreeNode)
+ {
+ OctreeNode* parent = (OctreeNode*) mOctreeNode->getParent();
+ while (parent != NULL)
+ {
+ LLViewerOctreeGroup* group = (LLViewerOctreeGroup*) parent->getListener(0);
+ if (!group || group->isDirty())
+ {
+ return;
+ }
+
+ group->setState(DIRTY);
+ parent = (OctreeNode*) parent->getParent();
+ }
+ }
+}
+
+//virtual
+void LLViewerOctreeGroup::rebound()
+{
+ if (!isDirty())
+ {
+ return;
+ }
+
+ if (mOctreeNode->getChildCount() == 1 && mOctreeNode->getElementCount() == 0)
+ {
+ LLViewerOctreeGroup* group = (LLViewerOctreeGroup*) mOctreeNode->getChild(0)->getListener(0);
+ group->rebound();
+
+ //copy single child's bounding box
+ mBounds[0] = group->mBounds[0];
+ mBounds[1] = group->mBounds[1];
+ mExtents[0] = group->mExtents[0];
+ mExtents[1] = group->mExtents[1];
+
+ group->setState(SKIP_FRUSTUM_CHECK);
+ }
+ else if (mOctreeNode->isLeaf())
+ { //copy object bounding box if this is a leaf
+ boundObjects(TRUE, mExtents[0], mExtents[1]);
+ mBounds[0] = mObjectBounds[0];
+ mBounds[1] = mObjectBounds[1];
+ }
+ else
+ {
+ LLVector4a& newMin = mExtents[0];
+ LLVector4a& newMax = mExtents[1];
+ LLViewerOctreeGroup* group = (LLViewerOctreeGroup*) mOctreeNode->getChild(0)->getListener(0);
+ group->clearState(SKIP_FRUSTUM_CHECK);
+ group->rebound();
+ //initialize to first child
+ newMin = group->mExtents[0];
+ newMax = group->mExtents[1];
+
+ //first, rebound children
+ for (U32 i = 1; i < mOctreeNode->getChildCount(); i++)
+ {
+ group = (LLViewerOctreeGroup*) mOctreeNode->getChild(i)->getListener(0);
+ group->clearState(SKIP_FRUSTUM_CHECK);
+ group->rebound();
+ const LLVector4a& max = group->mExtents[1];
+ const LLVector4a& min = group->mExtents[0];
+
+ newMax.setMax(newMax, max);
+ newMin.setMin(newMin, min);
+ }
+
+ boundObjects(FALSE, newMin, newMax);
+
+ mBounds[0].setAdd(newMin, newMax);
+ mBounds[0].mul(0.5f);
+ mBounds[1].setSub(newMax, newMin);
+ mBounds[1].mul(0.5f);
+ }
+
+ clearState(DIRTY);
+
+ return;
+}
+
+//virtual
+void LLViewerOctreeGroup::handleInsertion(const TreeNode* node, LLViewerOctreeEntry* obj)
+{
+ obj->setGroup(this);
+ unbound();
+ setState(OBJECT_DIRTY);
+}
+
+//virtual
+void LLViewerOctreeGroup::handleRemoval(const TreeNode* node, LLViewerOctreeEntry* obj)
+{
+ unbound();
+ setState(OBJECT_DIRTY);
+
+ obj->setGroup(NULL); //this could cause *this* pointer to be destroyed. So no more function calls after this.
+}
+
+//virtual
+void LLViewerOctreeGroup::handleDestruction(const TreeNode* node)
+{
+ for (OctreeNode::element_iter i = mOctreeNode->getDataBegin(); i != mOctreeNode->getDataEnd(); ++i)
+ {
+ LLViewerOctreeEntry* obj = *i;
+ if (obj && obj->getGroup() == this)
+ {
+ obj->nullGroup();
+ //obj->setGroup(NULL);
+ }
+ }
+ mOctreeNode = NULL;
+}
+
+//virtual
+void LLViewerOctreeGroup::handleStateChange(const TreeNode* node)
+{
+ //drop bounding box upon state change
+ if (mOctreeNode != node)
+ {
+ mOctreeNode = (OctreeNode*) node;
+ }
+ unbound();
+}
+
+//virtual
+void LLViewerOctreeGroup::handleChildAddition(const OctreeNode* parent, OctreeNode* child)
+{
+ if (child->getListenerCount() == 0)
+ {
+ new LLViewerOctreeGroup(child);
+ }
+ else
+ {
+ OCT_ERRS << "LLViewerOctreeGroup redundancy detected." << LL_ENDL;
+ }
+
+ unbound();
+
+ ((LLViewerOctreeGroup*)child->getListener(0))->unbound();
+}
+
+//virtual
+void LLViewerOctreeGroup::handleChildRemoval(const OctreeNode* parent, const OctreeNode* child)
+{
+ unbound();
+}
+
+LLViewerOctreeGroup* LLViewerOctreeGroup::getParent()
+{
+ if (isDead())
+ {
+ return NULL;
+ }
+
+ if(!mOctreeNode)
+ {
+ return NULL;
+ }
+
+ OctreeNode* parent = mOctreeNode->getOctParent();
+
+ if (parent)
+ {
+ return (LLViewerOctreeGroup*) parent->getListener(0);
+ }
+
+ return NULL;
+}
+
+//virtual
+bool LLViewerOctreeGroup::boundObjects(BOOL empty, LLVector4a& minOut, LLVector4a& maxOut)
+{
+ const OctreeNode* node = mOctreeNode;
+
+ if (node->isEmpty())
+ { //don't do anything if there are no objects
+ if (empty && mOctreeNode->getParent())
+ { //only root is allowed to be empty
+ OCT_ERRS << "Empty leaf found in octree." << LL_ENDL;
+ }
+ return false;
+ }
+
+ LLVector4a& newMin = mObjectExtents[0];
+ LLVector4a& newMax = mObjectExtents[1];
+
+ if (hasState(OBJECT_DIRTY))
+ { //calculate new bounding box
+ clearState(OBJECT_DIRTY);
+
+ //initialize bounding box to first element
+ OctreeNode::const_element_iter i = node->getDataBegin();
+ LLViewerOctreeEntry* entry = *i;
+ const LLVector4a* minMax = entry->getSpatialExtents();
+
+ newMin = minMax[0];
+ newMax = minMax[1];
+
+ for (++i; i != node->getDataEnd(); ++i)
+ {
+ entry = *i;
+ minMax = entry->getSpatialExtents();
+
+ update_min_max(newMin, newMax, minMax[0]);
+ update_min_max(newMin, newMax, minMax[1]);
+ }
+
+ mObjectBounds[0].setAdd(newMin, newMax);
+ mObjectBounds[0].mul(0.5f);
+ mObjectBounds[1].setSub(newMax, newMin);
+ mObjectBounds[1].mul(0.5f);
+ }
+
+ if (empty)
+ {
+ minOut = newMin;
+ maxOut = newMax;
+ }
+ else
+ {
+ minOut.setMin(minOut, newMin);
+ maxOut.setMax(maxOut, newMax);
+ }
+
+ return TRUE;
+}
+
+//virtual
+BOOL LLViewerOctreeGroup::isVisible() const
+{
+ return mVisible[LLViewerCamera::sCurCameraID] >= LLViewerOctreeEntryData::getCurrentFrame() ? TRUE : FALSE;
+}
+
+//virtual
+BOOL LLViewerOctreeGroup::isRecentlyVisible() const
+{
+ return FALSE;
+}
+
+void LLViewerOctreeGroup::setVisible()
+{
+ mVisible[LLViewerCamera::sCurCameraID] = LLViewerOctreeEntryData::getCurrentFrame();
+
+ if(LLViewerCamera::sCurCameraID < LLViewerCamera::CAMERA_WATER0)
+ {
+ mAnyVisible = LLViewerOctreeEntryData::getCurrentFrame();
+ }
+}
+
+void LLViewerOctreeGroup::checkStates()
+{
+#if LL_OCTREE_PARANOIA_CHECK
+ //LLOctreeStateCheck checker;
+ //checker.traverse(mOctreeNode);
+#endif
+}
+
+//-------------------------------------------------------------------------------------------
+//occulsion culling functions and classes
+//-------------------------------------------------------------------------------------------
+std::set<U32> LLOcclusionCullingGroup::sPendingQueries;
+class LLOcclusionQueryPool : public LLGLNamePool
+{
+public:
+ LLOcclusionQueryPool()
+ {
+ }
+
+protected:
+
+ virtual GLuint allocateName()
+ {
+ GLuint ret = 0;
+
+ glGenQueriesARB(1, &ret);
+
+ return ret;
+ }
+
+ virtual void releaseName(GLuint name)
+ {
+#if LL_TRACK_PENDING_OCCLUSION_QUERIES
+ LLOcclusionCullingGroup::sPendingQueries.erase(name);
+#endif
+ glDeleteQueriesARB(1, &name);
+ }
+};
+
+static LLOcclusionQueryPool sQueryPool;
+U32 LLOcclusionCullingGroup::getNewOcclusionQueryObjectName()
+{
+ return sQueryPool.allocate();
+}
+
+void LLOcclusionCullingGroup::releaseOcclusionQueryObjectName(GLuint name)
+{
+ sQueryPool.release(name);
+}
+
+//=====================================
+// Occlusion State Set/Clear
+//=====================================
+class LLSpatialSetOcclusionState : public OctreeTraveler
+{
+public:
+ U32 mState;
+ LLSpatialSetOcclusionState(U32 state) : mState(state) { }
+ virtual void visit(const OctreeNode* branch)
+ {
+ LLOcclusionCullingGroup* group = (LLOcclusionCullingGroup*)branch->getListener(0);
+ if(group)
+ {
+ group->setOcclusionState(mState);
+ }
+ }
+};
+
+class LLSpatialSetOcclusionStateDiff : public LLSpatialSetOcclusionState
+{
+public:
+ LLSpatialSetOcclusionStateDiff(U32 state) : LLSpatialSetOcclusionState(state) { }
+
+ virtual void traverse(const OctreeNode* n)
+ {
+ LLOcclusionCullingGroup* group = (LLOcclusionCullingGroup*) n->getListener(0);
+
+ if (group && !group->isOcclusionState(mState))
+ {
+ OctreeTraveler::traverse(n);
+ }
+ }
+};
+
+
+LLOcclusionCullingGroup::LLOcclusionCullingGroup(OctreeNode* node, LLViewerOctreePartition* part) :
+ LLViewerOctreeGroup(node),
+ mSpatialPartition(part)
+{
+ part->mLODSeed = (part->mLODSeed+1)%part->mLODPeriod;
+ mLODHash = part->mLODSeed;
+
+ OctreeNode* oct_parent = node->getOctParent();
+ LLOcclusionCullingGroup* parent = oct_parent ? (LLOcclusionCullingGroup*) oct_parent->getListener(0) : NULL;
+
+ for (U32 i = 0; i < LLViewerCamera::NUM_CAMERAS; i++)
+ {
+ mOcclusionQuery[i] = 0;
+ mOcclusionIssued[i] = 0;
+ mOcclusionState[i] = parent ? SG_STATE_INHERIT_MASK & parent->mOcclusionState[i] : 0;
+ mVisible[i] = 0;
+ }
+}
+
+LLOcclusionCullingGroup::~LLOcclusionCullingGroup()
+{
+ releaseOcclusionQueryObjectNames();
+}
+
+BOOL LLOcclusionCullingGroup::needsUpdate()
+{
+ return (LLDrawable::getCurrentFrame() % mSpatialPartition->mLODPeriod == mLODHash) ? TRUE : FALSE;
+}
+
+BOOL LLOcclusionCullingGroup::isRecentlyVisible() const
+{
+ const S32 MIN_VIS_FRAME_RANGE = 2;
+ return (LLDrawable::getCurrentFrame() - mVisible[LLViewerCamera::sCurCameraID]) < MIN_VIS_FRAME_RANGE ;
+}
+
+BOOL LLOcclusionCullingGroup::isAnyRecentlyVisible() const
+{
+ const S32 MIN_VIS_FRAME_RANGE = 2;
+ return (LLDrawable::getCurrentFrame() - mAnyVisible) < MIN_VIS_FRAME_RANGE ;
+}
+
+//virtual
+void LLOcclusionCullingGroup::handleChildAddition(const OctreeNode* parent, OctreeNode* child)
+{
+ if (child->getListenerCount() == 0)
+ {
+ new LLOcclusionCullingGroup(child, mSpatialPartition);
+ }
+ else
+ {
+ OCT_ERRS << "LLOcclusionCullingGroup redundancy detected." << LL_ENDL;
+ }
+
+ unbound();
+
+ ((LLViewerOctreeGroup*)child->getListener(0))->unbound();
+}
+
+void LLOcclusionCullingGroup::releaseOcclusionQueryObjectNames()
+{
+ if (gGLManager.mHasOcclusionQuery)
+ {
+ for (U32 i = 0; i < LLViewerCamera::NUM_CAMERAS; ++i)
+ {
+ if (mOcclusionQuery[i])
+ {
+ releaseOcclusionQueryObjectName(mOcclusionQuery[i]);
+ mOcclusionQuery[i] = 0;
+ }
+ }
+ }
+}
+
+void LLOcclusionCullingGroup::setOcclusionState(U32 state, S32 mode)
+{
+ if (mode > STATE_MODE_SINGLE)
+ {
+ if (mode == STATE_MODE_DIFF)
+ {
+ LLSpatialSetOcclusionStateDiff setter(state);
+ setter.traverse(mOctreeNode);
+ }
+ else if (mode == STATE_MODE_BRANCH)
+ {
+ LLSpatialSetOcclusionState setter(state);
+ setter.traverse(mOctreeNode);
+ }
+ else
+ {
+ for (U32 i = 0; i < LLViewerCamera::NUM_CAMERAS; i++)
+ {
+ mOcclusionState[i] |= state;
+
+ if ((state & DISCARD_QUERY) && mOcclusionQuery[i])
+ {
+ releaseOcclusionQueryObjectName(mOcclusionQuery[i]);
+ mOcclusionQuery[i] = 0;
+ }
+ }
+ }
+ }
+ else
+ {
+ if (state & OCCLUDED)
+ {
+ add(sNumObjectsOccluded, 1);
+ }
+ mOcclusionState[LLViewerCamera::sCurCameraID] |= state;
+ if ((state & DISCARD_QUERY) && mOcclusionQuery[LLViewerCamera::sCurCameraID])
+ {
+ releaseOcclusionQueryObjectName(mOcclusionQuery[LLViewerCamera::sCurCameraID]);
+ mOcclusionQuery[LLViewerCamera::sCurCameraID] = 0;
+ }
+ }
+}
+
+class LLSpatialClearOcclusionState : public OctreeTraveler
+{
+public:
+ U32 mState;
+
+ LLSpatialClearOcclusionState(U32 state) : mState(state) { }
+ virtual void visit(const OctreeNode* branch)
+ {
+ LLOcclusionCullingGroup* group = (LLOcclusionCullingGroup*)branch->getListener(0);
+ if(group)
+ {
+ group->clearOcclusionState(mState);
+ }
+ }
+};
+
+class LLSpatialClearOcclusionStateDiff : public LLSpatialClearOcclusionState
+{
+public:
+ LLSpatialClearOcclusionStateDiff(U32 state) : LLSpatialClearOcclusionState(state) { }
+
+ virtual void traverse(const OctreeNode* n)
+ {
+ LLOcclusionCullingGroup* group = (LLOcclusionCullingGroup*) n->getListener(0);
+
+ if (group && group->isOcclusionState(mState))
+ {
+ OctreeTraveler::traverse(n);
+ }
+ }
+};
+
+void LLOcclusionCullingGroup::clearOcclusionState(U32 state, S32 mode)
+{
+ if (mode > STATE_MODE_SINGLE)
+ {
+ if (mode == STATE_MODE_DIFF)
+ {
+ LLSpatialClearOcclusionStateDiff clearer(state);
+ clearer.traverse(mOctreeNode);
+ }
+ else if (mode == STATE_MODE_BRANCH)
+ {
+ LLSpatialClearOcclusionState clearer(state);
+ clearer.traverse(mOctreeNode);
+ }
+ else
+ {
+ for (U32 i = 0; i < LLViewerCamera::NUM_CAMERAS; i++)
+ {
+ mOcclusionState[i] &= ~state;
+ }
+ }
+ }
+ else
+ {
+ if (state & OCCLUDED)
+ {
+ add(sNumObjectsUnoccluded, 1);
+ }
+ mOcclusionState[LLViewerCamera::sCurCameraID] &= ~state;
+ }
+}
+
+static LLTrace::BlockTimerStatHandle FTM_OCCLUSION_READBACK("Readback Occlusion");
+static LLTrace::BlockTimerStatHandle FTM_OCCLUSION_WAIT("Occlusion Wait");
+
+BOOL LLOcclusionCullingGroup::earlyFail(LLCamera* camera, const LLVector4a* bounds)
+{
+ if (camera->getOrigin().isExactlyZero())
+ {
+ return FALSE;
+ }
+
+ const F32 vel = SG_OCCLUSION_FUDGE*2.f;
+ LLVector4a fudge;
+ fudge.splat(vel);
+
+ const LLVector4a& c = bounds[0];
+ LLVector4a r;
+ r.setAdd(bounds[1], fudge);
+
+ /*if (r.magVecSquared() > 1024.0*1024.0)
+ {
+ return TRUE;
+ }*/
+
+ LLVector4a e;
+ e.load3(camera->getOrigin().mV);
+
+ LLVector4a min;
+ min.setSub(c,r);
+ LLVector4a max;
+ max.setAdd(c,r);
+
+ S32 lt = e.lessThan(min).getGatheredBits() & 0x7;
+ if (lt)
+ {
+ return FALSE;
+ }
+
+ S32 gt = e.greaterThan(max).getGatheredBits() & 0x7;
+ if (gt)
+ {
+ return FALSE;
+ }
+
+ return TRUE;
+}
+
+U32 LLOcclusionCullingGroup::getLastOcclusionIssuedTime()
+{
+ return mOcclusionIssued[LLViewerCamera::sCurCameraID];
+}
+
+void LLOcclusionCullingGroup::checkOcclusion()
+{
+ if (LLPipeline::sUseOcclusion > 1)
+ {
+ LL_RECORD_BLOCK_TIME(FTM_OCCLUSION_READBACK);
+ LLOcclusionCullingGroup* parent = (LLOcclusionCullingGroup*)getParent();
+ if (parent && parent->isOcclusionState(LLOcclusionCullingGroup::OCCLUDED))
+ { //if the parent has been marked as occluded, the child is implicitly occluded
+ clearOcclusionState(QUERY_PENDING | DISCARD_QUERY);
+ }
+ else if (isOcclusionState(QUERY_PENDING))
+ { //otherwise, if a query is pending, read it back
+
+ GLuint available = 0;
+ if (mOcclusionQuery[LLViewerCamera::sCurCameraID])
+ {
+ glGetQueryObjectuivARB(mOcclusionQuery[LLViewerCamera::sCurCameraID], GL_QUERY_RESULT_AVAILABLE_ARB, &available);
+
+ static LLCachedControl<bool> wait_for_query(gSavedSettings, "RenderSynchronousOcclusion", true);
+
+ if (wait_for_query && mOcclusionIssued[LLViewerCamera::sCurCameraID] < gFrameCount)
+ { //query was issued last frame, wait until it's available
+ S32 max_loop = 1024;
+ LL_RECORD_BLOCK_TIME(FTM_OCCLUSION_WAIT);
+ while (!available && max_loop-- > 0)
+ {
+ //do some usefu work while we wait
+ F32 max_time = llmin(gFrameIntervalSeconds.value()*10.f, 1.f);
+ LLAppViewer::instance()->updateTextureThreads(max_time);
+
+ glGetQueryObjectuivARB(mOcclusionQuery[LLViewerCamera::sCurCameraID], GL_QUERY_RESULT_AVAILABLE_ARB, &available);
+ }
+ }
+ }
+ else
+ {
+ available = 1;
+ }
+
+ if (available)
+ { //result is available, read it back, otherwise wait until next frame
+ GLuint res = 1;
+ if (!isOcclusionState(DISCARD_QUERY) && mOcclusionQuery[LLViewerCamera::sCurCameraID])
+ {
+ glGetQueryObjectuivARB(mOcclusionQuery[LLViewerCamera::sCurCameraID], GL_QUERY_RESULT_ARB, &res);
+#if LL_TRACK_PENDING_OCCLUSION_QUERIES
+ sPendingQueries.erase(mOcclusionQuery[LLViewerCamera::sCurCameraID]);
+#endif
+ }
+ else if (mOcclusionQuery[LLViewerCamera::sCurCameraID])
+ { //delete the query to avoid holding onto hundreds of pending queries
+ releaseOcclusionQueryObjectName(mOcclusionQuery[LLViewerCamera::sCurCameraID]);
+ mOcclusionQuery[LLViewerCamera::sCurCameraID] = 0;
+ }
+
+ if (isOcclusionState(DISCARD_QUERY))
+ {
+ res = 2;
+ }
+
+ if (res > 0)
+ {
+ assert_states_valid(this);
+ clearOcclusionState(LLOcclusionCullingGroup::OCCLUDED, LLOcclusionCullingGroup::STATE_MODE_DIFF);
+ assert_states_valid(this);
+ }
+ else
+ {
+ assert_states_valid(this);
+
+ setOcclusionState(LLOcclusionCullingGroup::OCCLUDED, LLOcclusionCullingGroup::STATE_MODE_DIFF);
+
+ assert_states_valid(this);
+ }
+
+ clearOcclusionState(QUERY_PENDING | DISCARD_QUERY);
+ }
+ }
+ else if (mSpatialPartition->isOcclusionEnabled() && isOcclusionState(LLOcclusionCullingGroup::OCCLUDED))
+ { //check occlusion has been issued for occluded node that has not had a query issued
+ assert_states_valid(this);
+ clearOcclusionState(LLOcclusionCullingGroup::OCCLUDED, LLOcclusionCullingGroup::STATE_MODE_DIFF);
+ assert_states_valid(this);
+ }
+ }
+}
+
+static LLTrace::BlockTimerStatHandle FTM_PUSH_OCCLUSION_VERTS("Push Occlusion");
+static LLTrace::BlockTimerStatHandle FTM_SET_OCCLUSION_STATE("Occlusion State");
+static LLTrace::BlockTimerStatHandle FTM_OCCLUSION_EARLY_FAIL("Occlusion Early Fail");
+static LLTrace::BlockTimerStatHandle FTM_OCCLUSION_ALLOCATE("Allocate");
+static LLTrace::BlockTimerStatHandle FTM_OCCLUSION_BUILD("Build");
+static LLTrace::BlockTimerStatHandle FTM_OCCLUSION_BEGIN_QUERY("Begin Query");
+static LLTrace::BlockTimerStatHandle FTM_OCCLUSION_END_QUERY("End Query");
+static LLTrace::BlockTimerStatHandle FTM_OCCLUSION_SET_BUFFER("Set Buffer");
+static LLTrace::BlockTimerStatHandle FTM_OCCLUSION_DRAW_WATER("Draw Water");
+static LLTrace::BlockTimerStatHandle FTM_OCCLUSION_DRAW("Draw");
+
+void LLOcclusionCullingGroup::doOcclusion(LLCamera* camera, const LLVector4a* shift)
+{
+ if (mSpatialPartition->isOcclusionEnabled() && LLPipeline::sUseOcclusion > 1)
+ {
+ //move mBounds to the agent space if necessary
+ LLVector4a bounds[2];
+ bounds[0] = mBounds[0];
+ bounds[1] = mBounds[1];
+ if(shift != NULL)
+ {
+ bounds[0].add(*shift);
+ }
+
+ // Don't cull hole/edge water, unless we have the GL_ARB_depth_clamp extension
+ if (earlyFail(camera, bounds))
+ {
+ LL_RECORD_BLOCK_TIME(FTM_OCCLUSION_EARLY_FAIL);
+ setOcclusionState(LLOcclusionCullingGroup::DISCARD_QUERY);
+ assert_states_valid(this);
+ clearOcclusionState(LLOcclusionCullingGroup::OCCLUDED, LLOcclusionCullingGroup::STATE_MODE_DIFF);
+ assert_states_valid(this);
+ }
+ else
+ {
+ if (!isOcclusionState(QUERY_PENDING) || isOcclusionState(DISCARD_QUERY))
+ {
+ { //no query pending, or previous query to be discarded
+ LL_RECORD_BLOCK_TIME(FTM_RENDER_OCCLUSION);
+
+ if (!mOcclusionQuery[LLViewerCamera::sCurCameraID])
+ {
+ LL_RECORD_BLOCK_TIME(FTM_OCCLUSION_ALLOCATE);
+ mOcclusionQuery[LLViewerCamera::sCurCameraID] = getNewOcclusionQueryObjectName();
+ }
+
+ // Depth clamp all water to avoid it being culled as a result of being
+ // behind the far clip plane, and in the case of edge water to avoid
+ // it being culled while still visible.
+ bool const use_depth_clamp = gGLManager.mHasDepthClamp &&
+ (mSpatialPartition->mDrawableType == LLDrawPool::POOL_WATER ||
+ mSpatialPartition->mDrawableType == LLDrawPool::POOL_VOIDWATER);
+
+ LLGLEnable clamp(use_depth_clamp ? GL_DEPTH_CLAMP : 0);
+
+#if !LL_DARWIN
+ U32 mode = gGLManager.mHasOcclusionQuery2 ? GL_ANY_SAMPLES_PASSED : GL_SAMPLES_PASSED_ARB;
+#else
+ U32 mode = GL_SAMPLES_PASSED_ARB;
+#endif
+
+#if LL_TRACK_PENDING_OCCLUSION_QUERIES
+ sPendingQueries.insert(mOcclusionQuery[LLViewerCamera::sCurCameraID]);
+#endif
+ add(sOcclusionQueries, 1);
+
+ {
+ LL_RECORD_BLOCK_TIME(FTM_PUSH_OCCLUSION_VERTS);
+
+ //store which frame this query was issued on
+ mOcclusionIssued[LLViewerCamera::sCurCameraID] = gFrameCount;
+
+ {
+ LL_RECORD_BLOCK_TIME(FTM_OCCLUSION_BEGIN_QUERY);
+ glBeginQueryARB(mode, mOcclusionQuery[LLViewerCamera::sCurCameraID]);
+ }
+
+ LLGLSLShader* shader = LLGLSLShader::sCurBoundShaderPtr;
+ llassert(shader);
+
+ shader->uniform3fv(LLShaderMgr::BOX_CENTER, 1, bounds[0].getF32ptr());
+ shader->uniform3f(LLShaderMgr::BOX_SIZE, bounds[1][0]+SG_OCCLUSION_FUDGE,
+ bounds[1][1]+SG_OCCLUSION_FUDGE,
+ bounds[1][2]+SG_OCCLUSION_FUDGE);
+
+ if (!use_depth_clamp && mSpatialPartition->mDrawableType == LLDrawPool::POOL_VOIDWATER)
+ {
+ LL_RECORD_BLOCK_TIME(FTM_OCCLUSION_DRAW_WATER);
+
+ LLGLSquashToFarClip squash(glh_get_current_projection(), 1);
+ if (camera->getOrigin().isExactlyZero())
+ { //origin is invalid, draw entire box
+ gPipeline.mCubeVB->drawRange(LLRender::TRIANGLE_FAN, 0, 7, 8, 0);
+ gPipeline.mCubeVB->drawRange(LLRender::TRIANGLE_FAN, 0, 7, 8, b111*8);
+ }
+ else
+ {
+ gPipeline.mCubeVB->drawRange(LLRender::TRIANGLE_FAN, 0, 7, 8, get_box_fan_indices(camera, bounds[0]));
+ }
+ }
+ else
+ {
+ LL_RECORD_BLOCK_TIME(FTM_OCCLUSION_DRAW);
+ if (camera->getOrigin().isExactlyZero())
+ { //origin is invalid, draw entire box
+ gPipeline.mCubeVB->drawRange(LLRender::TRIANGLE_FAN, 0, 7, 8, 0);
+ gPipeline.mCubeVB->drawRange(LLRender::TRIANGLE_FAN, 0, 7, 8, b111*8);
+ }
+ else
+ {
+ gPipeline.mCubeVB->drawRange(LLRender::TRIANGLE_FAN, 0, 7, 8, get_box_fan_indices(camera, bounds[0]));
+ }
+ }
+
+
+ {
+ LL_RECORD_BLOCK_TIME(FTM_OCCLUSION_END_QUERY);
+ glEndQueryARB(mode);
+ }
+ }
+ }
+
+ {
+ LL_RECORD_BLOCK_TIME(FTM_SET_OCCLUSION_STATE);
+ setOcclusionState(LLOcclusionCullingGroup::QUERY_PENDING);
+ clearOcclusionState(LLOcclusionCullingGroup::DISCARD_QUERY);
+ }
+ }
+ }
+ }
+}
+//-------------------------------------------------------------------------------------------
+//end of occulsion culling functions and classes
+//-------------------------------------------------------------------------------------------
+
+//-----------------------------------------------------------------------------------
+//class LLViewerOctreePartition definitions
+//-----------------------------------------------------------------------------------
+LLViewerOctreePartition::LLViewerOctreePartition() :
+ mRegionp(NULL),
+ mOcclusionEnabled(TRUE),
+ mDrawableType(0),
+ mLODSeed(0),
+ mLODPeriod(1)
+{
+ LLVector4a center, size;
+ center.splat(0.f);
+ size.splat(1.f);
+
+ mOctree = new OctreeRoot(center,size, NULL);
+}
+
+LLViewerOctreePartition::~LLViewerOctreePartition()
+{
+ delete mOctree;
+ mOctree = NULL;
+}
+
+BOOL LLViewerOctreePartition::isOcclusionEnabled()
+{
+ return mOcclusionEnabled || LLPipeline::sUseOcclusion > 2;
+}
+
+//-----------------------------------------------------------------------------------
+//class LLViewerOctreeCull definitions
+//-----------------------------------------------------------------------------------
+
+//virtual
+bool LLViewerOctreeCull::earlyFail(LLViewerOctreeGroup* group)
+{
+ return false;
+}
+
+//virtual
+void LLViewerOctreeCull::traverse(const OctreeNode* n)
+{
+ LLViewerOctreeGroup* group = (LLViewerOctreeGroup*) n->getListener(0);
+
+ if (earlyFail(group))
+ {
+ return;
+ }
+
+ if (mRes == 2 ||
+ (mRes && group->hasState(LLViewerOctreeGroup::SKIP_FRUSTUM_CHECK)))
+ { //fully in, just add everything
+ OctreeTraveler::traverse(n);
+ }
+ else
+ {
+ mRes = frustumCheck(group);
+
+ if (mRes)
+ { //at least partially in, run on down
+ OctreeTraveler::traverse(n);
+ }
+
+ mRes = 0;
+ }
+}
+
+//------------------------------------------
+//agent space group culling
+S32 LLViewerOctreeCull::AABBInFrustumNoFarClipGroupBounds(const LLViewerOctreeGroup* group)
+{
+ return mCamera->AABBInFrustumNoFarClip(group->mBounds[0], group->mBounds[1]);
+}
+
+S32 LLViewerOctreeCull::AABBSphereIntersectGroupExtents(const LLViewerOctreeGroup* group)
+{
+ return AABBSphereIntersect(group->mExtents[0], group->mExtents[1], mCamera->getOrigin(), mCamera->mFrustumCornerDist);
+}
+
+S32 LLViewerOctreeCull::AABBInFrustumGroupBounds(const LLViewerOctreeGroup* group)
+{
+ return mCamera->AABBInFrustum(group->mBounds[0], group->mBounds[1]);
+}
+//------------------------------------------
+
+//------------------------------------------
+//agent space object set culling
+S32 LLViewerOctreeCull::AABBInFrustumNoFarClipObjectBounds(const LLViewerOctreeGroup* group)
+{
+ return mCamera->AABBInFrustumNoFarClip(group->mObjectBounds[0], group->mObjectBounds[1]);
+}
+
+S32 LLViewerOctreeCull::AABBSphereIntersectObjectExtents(const LLViewerOctreeGroup* group)
+{
+ return AABBSphereIntersect(group->mObjectExtents[0], group->mObjectExtents[1], mCamera->getOrigin(), mCamera->mFrustumCornerDist);
+}
+
+S32 LLViewerOctreeCull::AABBInFrustumObjectBounds(const LLViewerOctreeGroup* group)
+{
+ return mCamera->AABBInFrustum(group->mObjectBounds[0], group->mObjectBounds[1]);
+}
+//------------------------------------------
+
+//------------------------------------------
+//local regional space group culling
+S32 LLViewerOctreeCull::AABBInRegionFrustumNoFarClipGroupBounds(const LLViewerOctreeGroup* group)
+{
+ return mCamera->AABBInRegionFrustumNoFarClip(group->mBounds[0], group->mBounds[1]);
+}
+
+S32 LLViewerOctreeCull::AABBInRegionFrustumGroupBounds(const LLViewerOctreeGroup* group)
+{
+ return mCamera->AABBInRegionFrustum(group->mBounds[0], group->mBounds[1]);
+}
+
+S32 LLViewerOctreeCull::AABBRegionSphereIntersectGroupExtents(const LLViewerOctreeGroup* group, const LLVector3& shift)
+{
+ return AABBSphereIntersect(group->mExtents[0], group->mExtents[1], mCamera->getOrigin() - shift, mCamera->mFrustumCornerDist);
+}
+//------------------------------------------
+
+//------------------------------------------
+//local regional space object culling
+S32 LLViewerOctreeCull::AABBInRegionFrustumObjectBounds(const LLViewerOctreeGroup* group)
+{
+ return mCamera->AABBInRegionFrustum(group->mObjectBounds[0], group->mObjectBounds[1]);
+}
+
+S32 LLViewerOctreeCull::AABBInRegionFrustumNoFarClipObjectBounds(const LLViewerOctreeGroup* group)
+{
+ return mCamera->AABBInRegionFrustumNoFarClip(group->mObjectBounds[0], group->mObjectBounds[1]);
+}
+
+S32 LLViewerOctreeCull::AABBRegionSphereIntersectObjectExtents(const LLViewerOctreeGroup* group, const LLVector3& shift)
+{
+ return AABBSphereIntersect(group->mObjectExtents[0], group->mObjectExtents[1], mCamera->getOrigin() - shift, mCamera->mFrustumCornerDist);
+}
+//------------------------------------------
+//check if the objects projection large enough
+
+bool LLViewerOctreeCull::checkProjectionArea(const LLVector4a& center, const LLVector4a& size, const LLVector3& shift, F32 pixel_threshold, F32 near_radius)
+{
+ LLVector3 local_orig = mCamera->getOrigin() - shift;
+ LLVector4a origin;
+ origin.load3(local_orig.mV);
+
+ LLVector4a lookAt;
+ lookAt.setSub(center, origin);
+ F32 distance = lookAt.getLength3().getF32();
+ if(distance <= near_radius)
+ {
+ return true; //always load close-by objects
+ }
+
+ // treat object as if it were near_radius meters closer than it actually was.
+ // this allows us to get some temporal coherence on visibility...objects that can be reached quickly will tend to be visible
+ distance -= near_radius;
+
+ F32 squared_rad = size.dot3(size).getF32();
+ return squared_rad / distance > pixel_threshold;
+}
+
+//virtual
+bool LLViewerOctreeCull::checkObjects(const OctreeNode* branch, const LLViewerOctreeGroup* group)
+{
+ if (branch->getElementCount() == 0) //no elements
+ {
+ return false;
+ }
+ else if (branch->getChildCount() == 0) //leaf state, already checked tightest bounding box
+ {
+ return true;
+ }
+ else if (mRes == 1 && !frustumCheckObjects(group)) //no objects in frustum
+ {
+ return false;
+ }
+
+ return true;
+}
+
+//virtual
+void LLViewerOctreeCull::preprocess(LLViewerOctreeGroup* group)
+{
+}
+
+//virtual
+void LLViewerOctreeCull::processGroup(LLViewerOctreeGroup* group)
+{
+}
+
+//virtual
+void LLViewerOctreeCull::visit(const OctreeNode* branch)
+{
+ LLViewerOctreeGroup* group = (LLViewerOctreeGroup*) branch->getListener(0);
+
+ preprocess(group);
+
+ if (checkObjects(branch, group))
+ {
+ processGroup(group);
+ }
+}
+
+//--------------------------------------------------------------
+//class LLViewerOctreeDebug
+//virtual
+void LLViewerOctreeDebug::visit(const OctreeNode* branch)
+{
+#if 0
+ LL_INFOS() << "Node: " << (U32)branch << " # Elements: " << branch->getElementCount() << " # Children: " << branch->getChildCount() << LL_ENDL;
+ for (U32 i = 0; i < branch->getChildCount(); i++)
+ {
+ LL_INFOS() << "Child " << i << " : " << (U32)branch->getChild(i) << LL_ENDL;
+ }
+#endif
+ LLViewerOctreeGroup* group = (LLViewerOctreeGroup*) branch->getListener(0);
+ processGroup(group);
+}
+
+//virtual
+void LLViewerOctreeDebug::processGroup(LLViewerOctreeGroup* group)
+{
+#if 0
+ const LLVector4a* vec4 = group->getBounds();
+ LLVector3 vec[2];
+ vec[0].set(vec4[0].getF32ptr());
+ vec[1].set(vec4[1].getF32ptr());
+ LL_INFOS() << "Bounds: " << vec[0] << " : " << vec[1] << LL_ENDL;
+
+ vec4 = group->getExtents();
+ vec[0].set(vec4[0].getF32ptr());
+ vec[1].set(vec4[1].getF32ptr());
+ LL_INFOS() << "Extents: " << vec[0] << " : " << vec[1] << LL_ENDL;
+
+ vec4 = group->getObjectBounds();
+ vec[0].set(vec4[0].getF32ptr());
+ vec[1].set(vec4[1].getF32ptr());
+ LL_INFOS() << "ObjectBounds: " << vec[0] << " : " << vec[1] << LL_ENDL;
+
+ vec4 = group->getObjectExtents();
+ vec[0].set(vec4[0].getF32ptr());
+ vec[1].set(vec4[1].getF32ptr());
+ LL_INFOS() << "ObjectExtents: " << vec[0] << " : " << vec[1] << LL_ENDL;
+#endif
+}
+//--------------------------------------------------------------
diff --git a/indra/newview/llvieweroctree.h b/indra/newview/llvieweroctree.h
new file mode 100644
index 0000000000..219ec7e8da
--- /dev/null
+++ b/indra/newview/llvieweroctree.h
@@ -0,0 +1,420 @@
+/**
+ * @file llvieweroctree.h
+ * @brief LLViewerObjectOctree.cpp header file, defining all supporting classes.
+ *
+ * $LicenseInfo:firstyear=2002&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2010, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
+ * $/LicenseInfo$
+ */
+
+#ifndef LL_VIEWEROCTREE_H
+#define LL_VIEWEROCTREE_H
+
+#include <vector>
+#include <map>
+
+#include "v2math.h"
+#include "v3math.h"
+#include "v4math.h"
+#include "m4math.h"
+#include "llvector4a.h"
+#include "llquaternion.h"
+#include "lloctree.h"
+#include "llviewercamera.h"
+
+class LLViewerRegion;
+class LLViewerOctreeEntryData;
+class LLViewerOctreeGroup;
+class LLViewerOctreeEntry;
+class LLViewerOctreePartition;
+
+typedef LLOctreeListener<LLViewerOctreeEntry> OctreeListener;
+typedef LLTreeNode<LLViewerOctreeEntry> TreeNode;
+typedef LLOctreeNode<LLViewerOctreeEntry> OctreeNode;
+typedef LLOctreeRoot<LLViewerOctreeEntry> OctreeRoot;
+typedef LLOctreeTraveler<LLViewerOctreeEntry> OctreeTraveler;
+
+#if LL_OCTREE_PARANOIA_CHECK
+#define assert_octree_valid(x) x->validate()
+#define assert_states_valid(x) ((LLViewerOctreeGroup*) x->mSpatialPartition->mOctree->getListener(0))->checkStates()
+#else
+#define assert_octree_valid(x)
+#define assert_states_valid(x)
+#endif
+
+// get index buffer for binary encoded axis vertex buffer given a box at center being viewed by given camera
+U32 get_box_fan_indices(LLCamera* camera, const LLVector4a& center);
+U8* get_box_fan_indices_ptr(LLCamera* camera, const LLVector4a& center);
+
+S32 AABBSphereIntersect(const LLVector4a& min, const LLVector4a& max, const LLVector3 &origin, const F32 &rad);
+S32 AABBSphereIntersectR2(const LLVector4a& min, const LLVector4a& max, const LLVector3 &origin, const F32 &radius_squared);
+
+S32 AABBSphereIntersect(const LLVector3& min, const LLVector3& max, const LLVector3 &origin, const F32 &rad);
+S32 AABBSphereIntersectR2(const LLVector3& min, const LLVector3& max, const LLVector3 &origin, const F32 &radius_squared);
+
+//defines data needed for octree of an entry
+//LL_ALIGN_PREFIX(16)
+class LLViewerOctreeEntry : public LLRefCount, public LLTrace::MemTrackable<LLViewerOctreeEntry, 16>
+{
+ friend class LLViewerOctreeEntryData;
+
+public:
+ typedef enum
+ {
+ LLDRAWABLE = 0,
+ LLVOCACHEENTRY,
+ NUM_DATA_TYPE
+ }eEntryDataType_t;
+
+protected:
+ virtual ~LLViewerOctreeEntry();
+
+public:
+ LLViewerOctreeEntry();
+
+ void nullGroup(); //called by group handleDestruction() only
+ void setGroup(LLViewerOctreeGroup* group);
+ void removeData(LLViewerOctreeEntryData* data);
+
+ LLViewerOctreeEntryData* getDrawable() const {return mData[LLDRAWABLE];}
+ bool hasDrawable() const {return mData[LLDRAWABLE] != NULL;}
+ LLViewerOctreeEntryData* getVOCacheEntry() const {return mData[LLVOCACHEENTRY];}
+ bool hasVOCacheEntry() const {return mData[LLVOCACHEENTRY] != NULL;}
+
+ const LLVector4a* getSpatialExtents() const {return mExtents;}
+ const LLVector4a& getPositionGroup() const {return mPositionGroup;}
+ LLViewerOctreeGroup* getGroup()const {return mGroup;}
+
+ F32 getBinRadius() const {return mBinRadius;}
+ S32 getBinIndex() const {return mBinIndex; }
+ void setBinIndex(S32 index) const {mBinIndex = index; }
+
+private:
+ void addData(LLViewerOctreeEntryData* data);
+
+private:
+ LLViewerOctreeEntryData* mData[NUM_DATA_TYPE]; //do not use LLPointer here.
+ LLViewerOctreeGroup* mGroup;
+
+ //aligned members
+ LL_ALIGN_16(LLVector4a mExtents[2]);
+ LL_ALIGN_16(LLVector4a mPositionGroup);
+ F32 mBinRadius;
+ mutable S32 mBinIndex;
+ mutable U32 mVisible;
+
+} ;//LL_ALIGN_POSTFIX(16);
+
+//defines an abstract class for entry data
+//LL_ALIGN_PREFIX(16)
+class LLViewerOctreeEntryData : public LLRefCount
+{
+protected:
+ virtual ~LLViewerOctreeEntryData();
+
+public:
+ LLViewerOctreeEntryData(const LLViewerOctreeEntryData& rhs)
+ {
+ *this = rhs;
+ }
+ LLViewerOctreeEntryData(LLViewerOctreeEntry::eEntryDataType_t data_type);
+
+ LLViewerOctreeEntry::eEntryDataType_t getDataType() const {return mDataType;}
+ LLViewerOctreeEntry* getEntry() {return mEntry;}
+
+ virtual void setOctreeEntry(LLViewerOctreeEntry* entry);
+ void removeOctreeEntry();
+
+ F32 getBinRadius() const {return mEntry->getBinRadius();}
+ const LLVector4a* getSpatialExtents() const;
+ LLViewerOctreeGroup* getGroup()const;
+ const LLVector4a& getPositionGroup() const;
+
+ void setBinRadius(F32 rad) {mEntry->mBinRadius = rad;}
+ void setSpatialExtents(const LLVector3& min, const LLVector3& max);
+ void setSpatialExtents(const LLVector4a& min, const LLVector4a& max);
+ void setPositionGroup(const LLVector4a& pos);
+
+ virtual void setGroup(LLViewerOctreeGroup* group);
+ void shift(const LLVector4a &shift_vector);
+
+ U32 getVisible() const {return mEntry ? mEntry->mVisible : 0;}
+ void setVisible() const;
+ void resetVisible() const;
+ virtual bool isVisible() const;
+ virtual bool isRecentlyVisible() const;
+
+ static S32 getCurrentFrame() { return sCurVisible; }
+
+protected:
+ LLVector4a& getGroupPosition() {return mEntry->mPositionGroup;}
+ void initVisible(U32 visible) {mEntry->mVisible = visible;}
+
+ static void incrementVisible() {sCurVisible++;}
+protected:
+ LLPointer<LLViewerOctreeEntry> mEntry;
+ LLViewerOctreeEntry::eEntryDataType_t mDataType;
+ static U32 sCurVisible; // Counter for what value of mVisible means currently visible
+};//LL_ALIGN_POSTFIX(16);
+
+
+//defines an octree group for an octree node, which contains multiple entries.
+//LL_ALIGN_PREFIX(16)
+class LLViewerOctreeGroup
+: public LLOctreeListener<LLViewerOctreeEntry>, public LLTrace::MemTrackable<LLViewerOctreeGroup, 16>
+{
+ friend class LLViewerOctreeCull;
+protected:
+ virtual ~LLViewerOctreeGroup();
+
+public:
+ enum
+ {
+ CLEAN = 0x00000000,
+ DIRTY = 0x00000001,
+ OBJECT_DIRTY = 0x00000002,
+ SKIP_FRUSTUM_CHECK = 0x00000004,
+ DEAD = 0x00000008,
+ INVALID_STATE = 0x00000010,
+ };
+
+public:
+ typedef LLOctreeNode<LLViewerOctreeEntry>::element_iter element_iter;
+ typedef LLOctreeNode<LLViewerOctreeEntry>::element_list element_list;
+
+ LLViewerOctreeGroup(OctreeNode* node);
+ LLViewerOctreeGroup(const LLViewerOctreeGroup& rhs)
+ : LLTrace::MemTrackable<LLViewerOctreeGroup, 16>("LLViewerOctreeGroup")
+ {
+ *this = rhs;
+ }
+
+ bool removeFromGroup(LLViewerOctreeEntryData* data);
+ bool removeFromGroup(LLViewerOctreeEntry* entry);
+
+ virtual void unbound();
+ virtual void rebound();
+
+ BOOL isDead() { return hasState(DEAD); }
+
+ void setVisible();
+ BOOL isVisible() const;
+ virtual BOOL isRecentlyVisible() const;
+ S32 getVisible(LLViewerCamera::eCameraID id) const {return mVisible[id];}
+ S32 getAnyVisible() const {return mAnyVisible;}
+ bool isEmpty() const { return mOctreeNode->isEmpty(); }
+
+ U32 getState() {return mState; }
+ bool isDirty() const {return mState & DIRTY;}
+ bool hasState(U32 state) const {return mState & state;}
+ void setState(U32 state) {mState |= state;}
+ void clearState(U32 state) {mState &= ~state;}
+
+ //LISTENER FUNCTIONS
+ virtual void handleInsertion(const TreeNode* node, LLViewerOctreeEntry* obj);
+ virtual void handleRemoval(const TreeNode* node, LLViewerOctreeEntry* obj);
+ virtual void handleDestruction(const TreeNode* node);
+ virtual void handleStateChange(const TreeNode* node);
+ virtual void handleChildAddition(const OctreeNode* parent, OctreeNode* child);
+ virtual void handleChildRemoval(const OctreeNode* parent, const OctreeNode* child);
+
+ OctreeNode* getOctreeNode() {return mOctreeNode;}
+ LLViewerOctreeGroup* getParent();
+
+ const LLVector4a* getBounds() const {return mBounds;}
+ const LLVector4a* getExtents() const {return mExtents;}
+ const LLVector4a* getObjectBounds() const {return mObjectBounds;}
+ const LLVector4a* getObjectExtents() const {return mObjectExtents;}
+
+ //octree wrappers to make code more readable
+ element_list& getData() { return mOctreeNode->getData(); }
+ element_iter getDataBegin() { return mOctreeNode->getDataBegin(); }
+ element_iter getDataEnd() { return mOctreeNode->getDataEnd(); }
+ U32 getElementCount() const { return mOctreeNode->getElementCount(); }
+ bool hasElement(LLViewerOctreeEntryData* data);
+
+protected:
+ void checkStates();
+private:
+ virtual bool boundObjects(BOOL empty, LLVector4a& minOut, LLVector4a& maxOut);
+
+protected:
+ U32 mState;
+ OctreeNode* mOctreeNode;
+
+ LL_ALIGN_16(LLVector4a mBounds[2]); // bounding box (center, size) of this node and all its children (tight fit to objects)
+ LL_ALIGN_16(LLVector4a mObjectBounds[2]); // bounding box (center, size) of objects in this node
+ LL_ALIGN_16(LLVector4a mExtents[2]); // extents (min, max) of this node and all its children
+ LL_ALIGN_16(LLVector4a mObjectExtents[2]); // extents (min, max) of objects in this node
+
+ S32 mAnyVisible; //latest visible to any camera
+ S32 mVisible[LLViewerCamera::NUM_CAMERAS];
+
+};//LL_ALIGN_POSTFIX(16);
+
+//octree group which has capability to support occlusion culling
+//LL_ALIGN_PREFIX(16)
+class LLOcclusionCullingGroup : public LLViewerOctreeGroup
+{
+public:
+ typedef enum
+ {
+ OCCLUDED = 0x00010000,
+ QUERY_PENDING = 0x00020000,
+ ACTIVE_OCCLUSION = 0x00040000,
+ DISCARD_QUERY = 0x00080000,
+ EARLY_FAIL = 0x00100000,
+ } eOcclusionState;
+
+ typedef enum
+ {
+ STATE_MODE_SINGLE = 0, //set one node
+ STATE_MODE_BRANCH, //set entire branch
+ STATE_MODE_DIFF, //set entire branch as long as current state is different
+ STATE_MODE_ALL_CAMERAS, //used for occlusion state, set state for all cameras
+ } eSetStateMode;
+
+protected:
+ virtual ~LLOcclusionCullingGroup();
+
+public:
+ LLOcclusionCullingGroup(OctreeNode* node, LLViewerOctreePartition* part);
+ LLOcclusionCullingGroup(const LLOcclusionCullingGroup& rhs) : LLViewerOctreeGroup(rhs)
+ {
+ *this = rhs;
+ }
+
+ void setOcclusionState(U32 state, S32 mode = STATE_MODE_SINGLE);
+ void clearOcclusionState(U32 state, S32 mode = STATE_MODE_SINGLE);
+ void checkOcclusion(); //read back last occlusion query (if any)
+ void doOcclusion(LLCamera* camera, const LLVector4a* shift = NULL); //issue occlusion query
+ BOOL isOcclusionState(U32 state) const { return mOcclusionState[LLViewerCamera::sCurCameraID] & state ? TRUE : FALSE; }
+ U32 getOcclusionState() const { return mOcclusionState[LLViewerCamera::sCurCameraID];}
+
+ BOOL needsUpdate();
+ U32 getLastOcclusionIssuedTime();
+
+ //virtual
+ void handleChildAddition(const OctreeNode* parent, OctreeNode* child);
+
+ //virtual
+ BOOL isRecentlyVisible() const;
+ LLViewerOctreePartition* getSpatialPartition()const {return mSpatialPartition;}
+ BOOL isAnyRecentlyVisible() const;
+
+ static U32 getNewOcclusionQueryObjectName();
+ static void releaseOcclusionQueryObjectName(U32 name);
+
+protected:
+ void releaseOcclusionQueryObjectNames();
+
+private:
+ BOOL earlyFail(LLCamera* camera, const LLVector4a* bounds);
+
+protected:
+ U32 mOcclusionState[LLViewerCamera::NUM_CAMERAS];
+ U32 mOcclusionIssued[LLViewerCamera::NUM_CAMERAS];
+
+ S32 mLODHash;
+
+ LLViewerOctreePartition* mSpatialPartition;
+ U32 mOcclusionQuery[LLViewerCamera::NUM_CAMERAS];
+
+public:
+ static std::set<U32> sPendingQueries;
+};//LL_ALIGN_POSTFIX(16);
+
+class LLViewerOctreePartition
+{
+public:
+ LLViewerOctreePartition();
+ virtual ~LLViewerOctreePartition();
+
+ // Cull on arbitrary frustum
+ virtual S32 cull(LLCamera &camera, bool do_occlusion) = 0;
+ BOOL isOcclusionEnabled();
+
+public:
+ U32 mPartitionType;
+ U32 mDrawableType;
+ OctreeNode* mOctree;
+ LLViewerRegion* mRegionp; // the region this partition belongs to.
+ BOOL mOcclusionEnabled; // if TRUE, occlusion culling is performed
+ U32 mLODSeed;
+ U32 mLODPeriod; //number of frames between LOD updates for a given spatial group (staggered by mLODSeed)
+};
+
+class LLViewerOctreeCull : public OctreeTraveler
+{
+public:
+ LLViewerOctreeCull(LLCamera* camera)
+ : mCamera(camera), mRes(0) { }
+
+ virtual void traverse(const OctreeNode* n);
+
+protected:
+ virtual bool earlyFail(LLViewerOctreeGroup* group);
+
+ //agent space group cull
+ S32 AABBInFrustumNoFarClipGroupBounds(const LLViewerOctreeGroup* group);
+ S32 AABBSphereIntersectGroupExtents(const LLViewerOctreeGroup* group);
+ S32 AABBInFrustumGroupBounds(const LLViewerOctreeGroup* group);
+
+ //agent space object set cull
+ S32 AABBInFrustumNoFarClipObjectBounds(const LLViewerOctreeGroup* group);
+ S32 AABBSphereIntersectObjectExtents(const LLViewerOctreeGroup* group);
+ S32 AABBInFrustumObjectBounds(const LLViewerOctreeGroup* group);
+
+ //local region space group cull
+ S32 AABBInRegionFrustumNoFarClipGroupBounds(const LLViewerOctreeGroup* group);
+ S32 AABBInRegionFrustumGroupBounds(const LLViewerOctreeGroup* group);
+ S32 AABBRegionSphereIntersectGroupExtents(const LLViewerOctreeGroup* group, const LLVector3& shift);
+
+ //local region space object set cull
+ S32 AABBInRegionFrustumNoFarClipObjectBounds(const LLViewerOctreeGroup* group);
+ S32 AABBInRegionFrustumObjectBounds(const LLViewerOctreeGroup* group);
+ S32 AABBRegionSphereIntersectObjectExtents(const LLViewerOctreeGroup* group, const LLVector3& shift);
+
+ virtual S32 frustumCheck(const LLViewerOctreeGroup* group) = 0;
+ virtual S32 frustumCheckObjects(const LLViewerOctreeGroup* group) = 0;
+
+ bool checkProjectionArea(const LLVector4a& center, const LLVector4a& size, const LLVector3& shift, F32 pixel_threshold, F32 near_radius);
+ virtual bool checkObjects(const OctreeNode* branch, const LLViewerOctreeGroup* group);
+ virtual void preprocess(LLViewerOctreeGroup* group);
+ virtual void processGroup(LLViewerOctreeGroup* group);
+ virtual void visit(const OctreeNode* branch);
+
+protected:
+ LLCamera *mCamera;
+ S32 mRes;
+};
+
+//scan the octree, output the info of each node for debug use.
+class LLViewerOctreeDebug : public OctreeTraveler
+{
+public:
+ virtual void processGroup(LLViewerOctreeGroup* group);
+ virtual void visit(const OctreeNode* branch);
+
+public:
+ static BOOL sInDebug;
+};
+
+#endif
diff --git a/indra/newview/llviewerparcelmedia.cpp b/indra/newview/llviewerparcelmedia.cpp
index 386b2fd400..b55154f889 100755
--- a/indra/newview/llviewerparcelmedia.cpp
+++ b/indra/newview/llviewerparcelmedia.cpp
@@ -159,7 +159,7 @@ void LLViewerParcelMedia::update(LLParcel* parcel)
// static
void LLViewerParcelMedia::play(LLParcel* parcel)
{
- lldebugs << "LLViewerParcelMedia::play" << llendl;
+ LL_DEBUGS() << "LLViewerParcelMedia::play" << LL_ENDL;
if (!parcel) return;
@@ -471,7 +471,7 @@ void LLViewerParcelMedia::sendMediaNavigateMessage(const std::string& url)
}
else
{
- llwarns << "can't get ParcelNavigateMedia capability" << llendl;
+ LL_WARNS() << "can't get ParcelNavigateMedia capability" << LL_ENDL;
}
}
diff --git a/indra/newview/llviewerparcelmgr.cpp b/indra/newview/llviewerparcelmgr.cpp
index e361fad9de..cdb08f4707 100755
--- a/indra/newview/llviewerparcelmgr.cpp
+++ b/indra/newview/llviewerparcelmgr.cpp
@@ -36,7 +36,6 @@
#include "llnotifications.h"
#include "llnotificationsutil.h"
#include "llparcel.h"
-#include "llsecondlifeurls.h"
#include "message.h"
#include "llfloaterreg.h"
@@ -198,22 +197,22 @@ LLViewerParcelMgr::~LLViewerParcelMgr()
void LLViewerParcelMgr::dump()
{
- llinfos << "Parcel Manager Dump" << llendl;
- llinfos << "mSelected " << S32(mSelected) << llendl;
- llinfos << "Selected parcel: " << llendl;
- llinfos << mWestSouth << " to " << mEastNorth << llendl;
+ LL_INFOS() << "Parcel Manager Dump" << LL_ENDL;
+ LL_INFOS() << "mSelected " << S32(mSelected) << LL_ENDL;
+ LL_INFOS() << "Selected parcel: " << LL_ENDL;
+ LL_INFOS() << mWestSouth << " to " << mEastNorth << LL_ENDL;
mCurrentParcel->dump();
- llinfos << "banning " << mCurrentParcel->mBanList.size() << llendl;
+ LL_INFOS() << "banning " << mCurrentParcel->mBanList.size() << LL_ENDL;
access_map_const_iterator cit = mCurrentParcel->mBanList.begin();
access_map_const_iterator end = mCurrentParcel->mBanList.end();
for ( ; cit != end; ++cit)
{
- llinfos << "ban id " << (*cit).first << llendl;
+ LL_INFOS() << "ban id " << (*cit).first << LL_ENDL;
}
- llinfos << "Hover parcel:" << llendl;
+ LL_INFOS() << "Hover parcel:" << LL_ENDL;
mHoverParcel->dump();
- llinfos << "Agent parcel:" << llendl;
+ LL_INFOS() << "Agent parcel:" << LL_ENDL;
mAgentParcel->dump();
}
@@ -591,13 +590,13 @@ void LLViewerParcelMgr::deselectLand()
void LLViewerParcelMgr::addObserver(LLParcelObserver* observer)
{
- mObservers.put(observer);
+ mObservers.push_back(observer);
}
void LLViewerParcelMgr::removeObserver(LLParcelObserver* observer)
{
- mObservers.removeObj(observer);
+ vector_replace_with_last(mObservers, observer);
}
@@ -606,16 +605,16 @@ void LLViewerParcelMgr::removeObserver(LLParcelObserver* observer)
// from the list.
void LLViewerParcelMgr::notifyObservers()
{
- LLDynamicArray<LLParcelObserver*> observers;
- S32 count = mObservers.count();
+ std::vector<LLParcelObserver*> observers;
+ S32 count = mObservers.size();
S32 i;
for(i = 0; i < count; ++i)
{
- observers.put(mObservers.get(i));
+ observers.push_back(mObservers.at(i));
}
for(i = 0; i < count; ++i)
{
- observers.get(i)->changed();
+ observers.at(i)->changed();
}
}
@@ -948,7 +947,7 @@ void LLViewerParcelMgr::sendParcelGodForceOwner(const LLUUID& owner_id)
return;
}
- llinfos << "Claiming " << mWestSouth << " to " << mEastNorth << llendl;
+ LL_INFOS() << "Claiming " << mWestSouth << " to " << mEastNorth << LL_ENDL;
// BUG: Only works for the region containing mWestSouthBottom
LLVector3d east_north_region_check( mEastNorth );
@@ -971,7 +970,7 @@ void LLViewerParcelMgr::sendParcelGodForceOwner(const LLUUID& owner_id)
return;
}
- llinfos << "Region " << region->getOriginGlobal() << llendl;
+ LL_INFOS() << "Region " << region->getOriginGlobal() << LL_ENDL;
LLSD payload;
payload["owner_id"] = owner_id;
@@ -1111,8 +1110,8 @@ LLViewerParcelMgr::ParcelBuyInfo* LLViewerParcelMgr::setupParcelBuy(
if (is_claim)
{
- llinfos << "Claiming " << mWestSouth << " to " << mEastNorth << llendl;
- llinfos << "Region " << region->getOriginGlobal() << llendl;
+ LL_INFOS() << "Claiming " << mWestSouth << " to " << mEastNorth << LL_ENDL;
+ LL_INFOS() << "Region " << region->getOriginGlobal() << LL_ENDL;
// BUG: Only works for the region containing mWestSouthBottom
LLVector3d east_north_region_check( mEastNorth );
@@ -1282,7 +1281,7 @@ void LLViewerParcelMgr::sendParcelPropertiesUpdate(LLParcel* parcel, bool use_ag
LLViewerRegion *region = use_agent_region ? gAgent.getRegion() : LLWorld::getInstance()->getRegionFromPosGlobal( mWestSouth );
if (!region) return;
- //llinfos << "found region: " << region->getName() << llendl;
+ //LL_INFOS() << "found region: " << region->getName() << LL_ENDL;
LLSD body;
std::string url = region->getCapability("ParcelPropertiesUpdate");
@@ -1292,8 +1291,8 @@ void LLViewerParcelMgr::sendParcelPropertiesUpdate(LLParcel* parcel, bool use_ag
U32 message_flags = 0x01;
body["flags"] = ll_sd_from_U32(message_flags);
parcel->packMessage(body);
- llinfos << "Sending parcel properties update via capability to: "
- << url << llendl;
+ LL_INFOS() << "Sending parcel properties update via capability to: "
+ << url << LL_ENDL;
LLHTTPClient::post(url, body, new LLHTTPClient::Responder());
}
else
@@ -1387,7 +1386,7 @@ void LLViewerParcelMgr::processParcelOverlay(LLMessageSystem *msg, void **user)
if (packed_overlay_size <= 0)
{
- llwarns << "Overlay size " << packed_overlay_size << llendl;
+ LL_WARNS() << "Overlay size " << packed_overlay_size << LL_ENDL;
return;
}
@@ -1395,8 +1394,8 @@ void LLViewerParcelMgr::processParcelOverlay(LLMessageSystem *msg, void **user)
S32 expected_size = parcels_per_edge * parcels_per_edge / PARCEL_OVERLAY_CHUNKS;
if (packed_overlay_size != expected_size)
{
- llwarns << "Got parcel overlay size " << packed_overlay_size
- << " expecting " << expected_size << llendl;
+ LL_WARNS() << "Got parcel overlay size " << packed_overlay_size
+ << " expecting " << expected_size << LL_ENDL;
return;
}
@@ -1462,7 +1461,7 @@ void LLViewerParcelMgr::processParcelProperties(LLMessageSystem *msg, void **use
if (request_result == PARCEL_RESULT_NO_DATA)
{
// no valid parcel data
- llinfos << "no valid parcel data" << llendl;
+ LL_INFOS() << "no valid parcel data" << LL_ENDL;
return;
}
@@ -1494,9 +1493,9 @@ void LLViewerParcelMgr::processParcelProperties(LLMessageSystem *msg, void **use
}
else
{
- llinfos << "out of order agent parcel sequence id " << sequence_id
+ LL_INFOS() << "out of order agent parcel sequence id " << sequence_id
<< " last good " << parcel_mgr.mAgentParcelSequenceID
- << llendl;
+ << LL_ENDL;
return;
}
@@ -1745,7 +1744,7 @@ void LLViewerParcelMgr::processParcelProperties(LLMessageSystem *msg, void **use
}
else
{
- llinfos << "Stopping parcel music (invalid audio stream URL)" << llendl;
+ LL_INFOS() << "Stopping parcel music (invalid audio stream URL)" << LL_ENDL;
// clears the URL
// null value causes fade out
LLViewerAudio::getInstance()->startInternetStreamWithAutoFade(LLStringUtil::null);
@@ -1753,7 +1752,7 @@ void LLViewerParcelMgr::processParcelProperties(LLMessageSystem *msg, void **use
}
else if (!gAudiop->getInternetStreamURL().empty())
{
- llinfos << "Stopping parcel music (parcel stream URL is empty)" << llendl;
+ LL_INFOS() << "Stopping parcel music (parcel stream URL is empty)" << LL_ENDL;
// null value causes fade out
LLViewerAudio::getInstance()->startInternetStreamWithAutoFade(LLStringUtil::null);
}
@@ -1781,7 +1780,7 @@ void LLViewerParcelMgr::optionally_start_music(const std::string& music_url)
gSavedSettings.getBOOL(LLViewerMedia::AUTO_PLAY_MEDIA_SETTING) &&
gSavedSettings.getBOOL("MediaTentativeAutoPlay")))
{
- llinfos << "Starting parcel music " << music_url << llendl;
+ LL_INFOS() << "Starting parcel music " << music_url << LL_ENDL;
LLViewerAudio::getInstance()->startInternetStreamWithAutoFade(music_url);
}
else
@@ -1810,7 +1809,7 @@ void LLViewerParcelMgr::processParcelAccessListReply(LLMessageSystem *msg, void
if (parcel_id != parcel->getLocalID())
{
LL_WARNS_ONCE("") << "processParcelAccessListReply for parcel " << parcel_id
- << " which isn't the selected parcel " << parcel->getLocalID()<< llendl;
+ << " which isn't the selected parcel " << parcel->getLocalID()<< LL_ENDL;
return;
}
diff --git a/indra/newview/llviewerparcelmgr.h b/indra/newview/llviewerparcelmgr.h
index 9da49bb3f3..58d398e141 100755
--- a/indra/newview/llviewerparcelmgr.h
+++ b/indra/newview/llviewerparcelmgr.h
@@ -28,7 +28,6 @@
#define LL_LLVIEWERPARCELMGR_H
#include "v3dmath.h"
-#include "lldarray.h"
#include "llframetimer.h"
#include "llsingleton.h"
#include "llparcelselection.h"
@@ -333,7 +332,7 @@ private:
LLVector3d mHoverWestSouth;
LLVector3d mHoverEastNorth;
- LLDynamicArray<LLParcelObserver*> mObservers;
+ std::vector<LLParcelObserver*> mObservers;
BOOL mTeleportInProgress;
teleport_finished_signal_t mTeleportFinishedSignal;
diff --git a/indra/newview/llviewerparceloverlay.cpp b/indra/newview/llviewerparceloverlay.cpp
index a1c12c5cd6..4fd423b6f4 100755
--- a/indra/newview/llviewerparceloverlay.cpp
+++ b/indra/newview/llviewerparceloverlay.cpp
@@ -432,9 +432,12 @@ void LLViewerParcelOverlay::updatePropertyLines()
const LLColor4U auction_coloru = LLUIColorTable::instance().getColor("PropertyColorAuction").get();
// Build into dynamic arrays, then copy into static arrays.
- LLDynamicArray<LLVector3, 256> new_vertex_array;
- LLDynamicArray<LLColor4U, 256> new_color_array;
- LLDynamicArray<LLVector2, 256> new_coord_array;
+ std::vector<LLVector3> new_vertex_array;
+ new_vertex_array.reserve(256);
+ std::vector<LLColor4U> new_color_array;
+ new_color_array.reserve(256);
+ std::vector<LLVector2> new_coord_array;
+ new_coord_array.reserve(256);
U8 overlay = 0;
BOOL add_edge = FALSE;
@@ -599,7 +602,7 @@ void LLViewerParcelOverlay::updatePropertyLines()
// Now copy into static arrays for faster rendering.
// Attempt to recycle old arrays if possible to avoid memory
// shuffling.
- S32 new_vertex_count = new_vertex_array.count();
+ S32 new_vertex_count = new_vertex_array.size();
if (!(mVertexArray && mColorArray && new_vertex_count == mVertexCount))
{
@@ -623,7 +626,7 @@ void LLViewerParcelOverlay::updatePropertyLines()
F32* vertex = mVertexArray;
for (i = 0; i < mVertexCount; i++)
{
- const LLVector3& point = new_vertex_array.get(i);
+ const LLVector3& point = new_vertex_array.at(i);
*vertex = point.mV[VX];
vertex++;
*vertex = point.mV[VY];
@@ -635,7 +638,7 @@ void LLViewerParcelOverlay::updatePropertyLines()
U8* colorp = mColorArray;
for (i = 0; i < mVertexCount; i++)
{
- const LLColor4U& color = new_color_array.get(i);
+ const LLColor4U& color = new_color_array.at(i);
*colorp = color.mV[VRED];
colorp++;
*colorp = color.mV[VGREEN];
@@ -652,9 +655,9 @@ void LLViewerParcelOverlay::updatePropertyLines()
void LLViewerParcelOverlay::addPropertyLine(
- LLDynamicArray<LLVector3, 256>& vertex_array,
- LLDynamicArray<LLColor4U, 256>& color_array,
- LLDynamicArray<LLVector2, 256>& coord_array,
+ std::vector<LLVector3>& vertex_array,
+ std::vector<LLColor4U>& color_array,
+ std::vector<LLVector2>& coord_array,
const F32 start_x, const F32 start_y,
const U32 edge,
const LLColor4U& color)
@@ -662,6 +665,10 @@ void LLViewerParcelOverlay::addPropertyLine(
LLColor4U underwater( color );
underwater.mV[VALPHA] /= 2;
+ vertex_array.reserve(16);
+ color_array.reserve(16);
+ coord_array.reserve(16);
+
LLSurface& land = mRegion->getLand();
F32 dx;
@@ -702,7 +709,7 @@ void LLViewerParcelOverlay::addPropertyLine(
break;
default:
- llerrs << "Invalid edge in addPropertyLine" << llendl;
+ LL_ERRS() << "Invalid edge in addPropertyLine" << LL_ENDL;
return;
}
@@ -716,11 +723,11 @@ void LLViewerParcelOverlay::addPropertyLine(
// First part, only one vertex
outside_z = land.resolveHeightRegion( outside_x, outside_y );
- if (outside_z > 20.f) color_array.put( color );
- else color_array.put( underwater );
+ if (outside_z > 20.f) color_array.push_back( color );
+ else color_array.push_back( underwater );
- vertex_array.put( LLVector3(outside_x, outside_y, outside_z) );
- coord_array.put( LLVector2(outside_x - start_x, 0.f) );
+ vertex_array.push_back( LLVector3(outside_x, outside_y, outside_z) );
+ coord_array.push_back( LLVector2(outside_x - start_x, 0.f) );
inside_x += dx * LINE_WIDTH;
inside_y += dy * LINE_WIDTH;
@@ -732,17 +739,17 @@ void LLViewerParcelOverlay::addPropertyLine(
inside_z = land.resolveHeightRegion( inside_x, inside_y );
outside_z = land.resolveHeightRegion( outside_x, outside_y );
- if (inside_z > 20.f) color_array.put( color );
- else color_array.put( underwater );
+ if (inside_z > 20.f) color_array.push_back( color );
+ else color_array.push_back( underwater );
- if (outside_z > 20.f) color_array.put( color );
- else color_array.put( underwater );
+ if (outside_z > 20.f) color_array.push_back( color );
+ else color_array.push_back( underwater );
- vertex_array.put( LLVector3(inside_x, inside_y, inside_z) );
- vertex_array.put( LLVector3(outside_x, outside_y, outside_z) );
+ vertex_array.push_back( LLVector3(inside_x, inside_y, inside_z) );
+ vertex_array.push_back( LLVector3(outside_x, outside_y, outside_z) );
- coord_array.put( LLVector2(outside_x - start_x, 1.f) );
- coord_array.put( LLVector2(outside_x - start_x, 0.f) );
+ coord_array.push_back( LLVector2(outside_x - start_x, 1.f) );
+ coord_array.push_back( LLVector2(outside_x - start_x, 0.f) );
inside_x += dx * (dx - LINE_WIDTH);
inside_y += dy * (dy - LINE_WIDTH);
@@ -758,17 +765,17 @@ void LLViewerParcelOverlay::addPropertyLine(
inside_z = land.resolveHeightRegion( inside_x, inside_y );
outside_z = land.resolveHeightRegion( outside_x, outside_y );
- if (inside_z > 20.f) color_array.put( color );
- else color_array.put( underwater );
+ if (inside_z > 20.f) color_array.push_back( color );
+ else color_array.push_back( underwater );
- if (outside_z > 20.f) color_array.put( color );
- else color_array.put( underwater );
+ if (outside_z > 20.f) color_array.push_back( color );
+ else color_array.push_back( underwater );
- vertex_array.put( LLVector3(inside_x, inside_y, inside_z) );
- vertex_array.put( LLVector3(outside_x, outside_y, outside_z) );
+ vertex_array.push_back( LLVector3(inside_x, inside_y, inside_z) );
+ vertex_array.push_back( LLVector3(outside_x, outside_y, outside_z) );
- coord_array.put( LLVector2(outside_x - start_x, 1.f) );
- coord_array.put( LLVector2(outside_x - start_x, 0.f) );
+ coord_array.push_back( LLVector2(outside_x - start_x, 1.f) );
+ coord_array.push_back( LLVector2(outside_x - start_x, 0.f) );
inside_x += dx;
inside_y += dy;
@@ -787,17 +794,17 @@ void LLViewerParcelOverlay::addPropertyLine(
inside_z = land.resolveHeightRegion( inside_x, inside_y );
outside_z = land.resolveHeightRegion( outside_x, outside_y );
- if (inside_z > 20.f) color_array.put( color );
- else color_array.put( underwater );
+ if (inside_z > 20.f) color_array.push_back( color );
+ else color_array.push_back( underwater );
- if (outside_z > 20.f) color_array.put( color );
- else color_array.put( underwater );
+ if (outside_z > 20.f) color_array.push_back( color );
+ else color_array.push_back( underwater );
- vertex_array.put( LLVector3(inside_x, inside_y, inside_z) );
- vertex_array.put( LLVector3(outside_x, outside_y, outside_z) );
+ vertex_array.push_back( LLVector3(inside_x, inside_y, inside_z) );
+ vertex_array.push_back( LLVector3(outside_x, outside_y, outside_z) );
- coord_array.put( LLVector2(outside_x - start_x, 1.f) );
- coord_array.put( LLVector2(outside_x - start_x, 0.f) );
+ coord_array.push_back( LLVector2(outside_x - start_x, 1.f) );
+ coord_array.push_back( LLVector2(outside_x - start_x, 0.f) );
inside_x += dx * LINE_WIDTH;
inside_y += dy * LINE_WIDTH;
@@ -808,11 +815,11 @@ void LLViewerParcelOverlay::addPropertyLine(
// Last edge is not drawn to the edge
outside_z = land.resolveHeightRegion( outside_x, outside_y );
- if (outside_z > 20.f) color_array.put( color );
- else color_array.put( underwater );
+ if (outside_z > 20.f) color_array.push_back( color );
+ else color_array.push_back( underwater );
- vertex_array.put( LLVector3(outside_x, outside_y, outside_z) );
- coord_array.put( LLVector2(outside_x - start_x, 0.f) );
+ vertex_array.push_back( LLVector3(outside_x, outside_y, outside_z) );
+ coord_array.push_back( LLVector2(outside_x - start_x, 0.f) );
}
diff --git a/indra/newview/llviewerparceloverlay.h b/indra/newview/llviewerparceloverlay.h
index 7445d5bf1d..14a2af5354 100755
--- a/indra/newview/llviewerparceloverlay.h
+++ b/indra/newview/llviewerparceloverlay.h
@@ -31,7 +31,6 @@
// One of these structures per region.
#include "llbbox.h"
-#include "lldarray.h"
#include "llframetimer.h"
#include "lluuid.h"
#include "llviewertexture.h"
@@ -88,9 +87,9 @@ private:
U8 ownership(S32 row, S32 col) const
{ return 0x7 & mOwnership[row * mParcelGridsPerEdge + col]; }
- void addPropertyLine(LLDynamicArray<LLVector3, 256>& vertex_array,
- LLDynamicArray<LLColor4U, 256>& color_array,
- LLDynamicArray<LLVector2, 256>& coord_array,
+ void addPropertyLine(std::vector<LLVector3>& vertex_array,
+ std::vector<LLColor4U>& color_array,
+ std::vector<LLVector2>& coord_array,
const F32 start_x, const F32 start_y,
const U32 edge,
const LLColor4U& color);
diff --git a/indra/newview/llviewerpartsim.cpp b/indra/newview/llviewerpartsim.cpp
index 163c90019f..76418ad6a6 100755
--- a/indra/newview/llviewerpartsim.cpp
+++ b/indra/newview/llviewerpartsim.cpp
@@ -144,7 +144,7 @@ LLViewerPartGroup::LLViewerPartGroup(const LLVector3 &center_agent, const F32 bo
if (!mRegionp)
{
- //llwarns << "No region at position, using agent region!" << llendl;
+ //LL_WARNS() << "No region at position, using agent region!" << LL_ENDL;
mRegionp = gAgent.getRegion();
}
mCenterAgent = center_agent;
@@ -174,8 +174,8 @@ LLViewerPartGroup::LLViewerPartGroup(const LLVector3 &center_agent, const F32 bo
if (group != NULL)
{
- LLVector3 center(group->mOctreeNode->getCenter().getF32ptr());
- LLVector3 size(group->mOctreeNode->getSize().getF32ptr());
+ LLVector3 center(group->getOctreeNode()->getCenter().getF32ptr());
+ LLVector3 size(group->getOctreeNode()->getSize().getF32ptr());
size += LLVector3(0.01f, 0.01f, 0.01f);
mMinObjPos = center - size;
mMaxObjPos = center + size;
@@ -477,12 +477,12 @@ void LLViewerPartSim::checkParticleCount(U32 size)
{
if(LLViewerPartSim::sParticleCount2 != LLViewerPartSim::sParticleCount)
{
- llerrs << "sParticleCount: " << LLViewerPartSim::sParticleCount << " ; sParticleCount2: " << LLViewerPartSim::sParticleCount2 << llendl ;
+ LL_ERRS() << "sParticleCount: " << LLViewerPartSim::sParticleCount << " ; sParticleCount2: " << LLViewerPartSim::sParticleCount2 << LL_ENDL ;
}
if(size > (U32)LLViewerPartSim::sParticleCount2)
{
- llerrs << "curren particle size: " << LLViewerPartSim::sParticleCount2 << " array size: " << size << llendl ;
+ LL_ERRS() << "curren particle size: " << LLViewerPartSim::sParticleCount2 << " array size: " << size << LL_ENDL ;
}
}
@@ -493,6 +493,20 @@ LLViewerPartSim::LLViewerPartSim()
mID = ++id_seed;
}
+//enable/disable particle system
+void LLViewerPartSim::enable(bool enabled)
+{
+ if(!enabled && sMaxParticleCount > 0)
+ {
+ sMaxParticleCount = 0; //disable
+ }
+ else if(enabled && sMaxParticleCount < 1)
+ {
+ sMaxParticleCount = llmin(gSavedSettings.getS32("RenderMaxPartCount"), LL_MAX_PARTICLE_COUNT);
+ }
+
+ return;
+}
void LLViewerPartSim::destroyClass()
{
@@ -563,8 +577,8 @@ LLViewerPartGroup *LLViewerPartSim::put(LLViewerPart* part)
if (part->mPosAgent.magVecSquared() > MAX_MAG || !part->mPosAgent.isFinite())
{
#if 0 && !LL_RELEASE_FOR_DOWNLOAD
- llwarns << "LLViewerPartSim::put Part out of range!" << llendl;
- llwarns << part->mPosAgent << llendl;
+ LL_WARNS() << "LLViewerPartSim::put Part out of range!" << LL_ENDL;
+ LL_WARNS() << part->mPosAgent << LL_ENDL;
#endif
}
else
@@ -593,9 +607,9 @@ LLViewerPartGroup *LLViewerPartSim::put(LLViewerPart* part)
!(part->mFlags & LLPartData::LL_PART_FOLLOW_VELOCITY_MASK));
if (!groupp->addPart(part))
{
- llwarns << "LLViewerPartSim::put - Particle didn't go into its box!" << llendl;
- llinfos << groupp->getCenterAgent() << llendl;
- llinfos << part->mPosAgent << llendl;
+ LL_WARNS() << "LLViewerPartSim::put - Particle didn't go into its box!" << LL_ENDL;
+ LL_INFOS() << groupp->getCenterAgent() << LL_ENDL;
+ LL_INFOS() << part->mPosAgent << LL_ENDL;
mViewerPartGroups.pop_back() ;
delete groupp;
groupp = NULL ;
@@ -643,7 +657,7 @@ void LLViewerPartSim::shift(const LLVector3 &offset)
}
}
-static LLFastTimer::DeclareTimer FTM_SIMULATE_PARTICLES("Simulate Particles");
+static LLTrace::BlockTimerStatHandle FTM_SIMULATE_PARTICLES("Simulate Particles");
void LLViewerPartSim::updateSimulation()
{
@@ -659,7 +673,7 @@ void LLViewerPartSim::updateSimulation()
return;
}
- LLFastTimer ftm(FTM_SIMULATE_PARTICLES);
+ LL_RECORD_BLOCK_TIME(FTM_SIMULATE_PARTICLES);
// Start at a random particle system so the same
// particle system doesn't always get first pick at the
@@ -780,7 +794,7 @@ void LLViewerPartSim::updateSimulation()
updatePartBurstRate() ;
- //llinfos << "Particles: " << sParticleCount << " Adaptive Rate: " << sParticleAdaptiveRate << llendl;
+ //LL_INFOS() << "Particles: " << sParticleCount << " Adaptive Rate: " << sParticleAdaptiveRate << LL_ENDL;
}
void LLViewerPartSim::updatePartBurstRate()
@@ -818,7 +832,7 @@ void LLViewerPartSim::addPartSource(LLPointer<LLViewerPartSource> sourcep)
{
if (!sourcep)
{
- llwarns << "Null part source!" << llendl;
+ LL_WARNS() << "Null part source!" << LL_ENDL;
return;
}
sourcep->setStart() ;
diff --git a/indra/newview/llviewerpartsim.h b/indra/newview/llviewerpartsim.h
index 2daa07ed8c..40e8e1d45d 100755
--- 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
@@ -145,6 +143,8 @@ public:
typedef std::vector<LLViewerPartGroup *> group_list_t;
typedef std::vector<LLPointer<LLViewerPartSource> > source_list_t;
+ void enable(bool enabled);
+
void shift(const LLVector3 &offset);
void updateSimulation();
diff --git a/indra/newview/llviewerpartsource.cpp b/indra/newview/llviewerpartsource.cpp
index b6bbd6140d..a7fd2e0fe4 100755
--- a/indra/newview/llviewerpartsource.cpp
+++ b/indra/newview/llviewerpartsource.cpp
@@ -69,7 +69,7 @@ void LLViewerPartSource::updatePart(LLViewerPart &part, const F32 dt)
void LLViewerPartSource::update(const F32 dt)
{
- llerrs << "Creating default part source!" << llendl;
+ LL_ERRS() << "Creating default part source!" << LL_ENDL;
}
LLUUID LLViewerPartSource::getImageUUID() const
@@ -396,7 +396,7 @@ void LLViewerPartSourceScript::update(const F32 dt)
{
part->mPosAgent = mPosAgent;
part->mVelocity.setVec(0.f, 0.f, 0.f);
- //llwarns << "Unknown source pattern " << (S32)mPartSysData.mPattern << llendl;
+ //LL_WARNS() << "Unknown source pattern " << (S32)mPartSysData.mPattern << LL_ENDL;
}
if (part->mFlags & LLPartData::LL_PART_FOLLOW_SRC_MASK || // SVC-193, VWR-717
diff --git a/indra/newview/llviewerprecompiledheaders.h b/indra/newview/llviewerprecompiledheaders.h
index a565005f30..999d9092bd 100755
--- a/indra/newview/llviewerprecompiledheaders.h
+++ b/indra/newview/llviewerprecompiledheaders.h
@@ -51,12 +51,8 @@
#endif
// 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"
@@ -65,11 +61,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"
@@ -79,12 +71,8 @@
#include "llstrider.h"
#include "llstring.h"
#include "llsys.h"
-#include "llthread.h"
#include "lltimer.h"
-#include "lluuidhashmap.h"
-#include "stdenums.h"
#include "stdtypes.h"
-#include "timing.h"
#include "u64.h"
// Library includes from llmath project
diff --git a/indra/newview/llviewerregion.cpp b/indra/newview/llviewerregion.cpp
index a271690349..1932f4e8ce 100755
--- a/indra/newview/llviewerregion.cpp
+++ b/indra/newview/llviewerregion.cpp
@@ -71,6 +71,10 @@
#include "stringize.h"
#include "llviewercontrol.h"
#include "llsdserialize.h"
+#include "llvieweroctree.h"
+#include "llviewerdisplay.h"
+#include "llviewerwindow.h"
+#include "llprogressview.h"
#ifdef LL_WINDOWS
#pragma warning(disable:4355)
@@ -85,6 +89,11 @@ const S32 MAX_SEED_CAP_ATTEMPTS_BEFORE_LOGIN = 3;
const F32 CAP_REQUEST_TIMEOUT = 18;
// Even though we gave up on login, keep trying for caps after we are logged in:
const S32 MAX_CAP_REQUEST_ATTEMPTS = 30;
+const U32 DEFAULT_MAX_REGION_WIDE_PRIM_COUNT = 15000;
+
+BOOL LLViewerRegion::sVOCacheCullingEnabled = FALSE;
+S32 LLViewerRegion::sLastCameraUpdated = 0;
+S32 LLViewerRegion::sNewObjectCreationThrottle = -1;
typedef std::map<std::string, std::string> CapabilityMap;
@@ -98,6 +107,10 @@ public:
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
@@ -109,8 +122,7 @@ public:
// construction time.
mCapabilityListener(host.getString(), gMessageSystem, *region,
gAgent.getID(), gAgent.getSessionID())
- {
- }
+ {}
void buildCapabilityNames(LLSD& capabilityNames);
@@ -134,7 +146,15 @@ public:
// Misc
LLVLComposition *mCompositionp; // Composition layer for the surface
- LLVOCacheEntry::vocache_entry_map_t mCacheMap;
+ LLVOCacheEntry::vocache_entry_map_t mCacheMap; //all cached entries
+ LLVOCacheEntry::vocache_entry_set_t mActiveSet; //all active entries;
+ LLVOCacheEntry::vocache_entry_set_t mWaitingSet; //entries waiting for LLDrawable to be generated.
+ std::set< LLPointer<LLViewerOctreeGroup> > mVisibleGroups; //visible groupa
+ LLVOCachePartition* mVOCachePartition;
+ LLVOCacheEntry::vocache_entry_set_t mVisibleEntries; //must-be-created visible entries wait for objects creation.
+ LLVOCacheEntry::vocache_entry_priority_list_t mWaitingList; //transient list storing sorted visible entries waiting for object creation.
+ std::set<U32> mNonCacheableCreatedList; //list of local ids of all non-cacheable objects
+
// time?
// LRU info?
@@ -159,7 +179,10 @@ public:
LLCapabilityListener mCapabilityListener;
//spatial partitions for objects in this region
- std::vector<LLSpatialPartition*> mObjectPartition;
+ std::vector<LLViewerOctreePartition*> mObjectPartition;
+
+ LLVector3 mLastCameraOrigin;
+ U32 mLastCameraUpdate;
};
// support for secondlife:///app/region/{REGION} SLapps
@@ -213,7 +236,7 @@ public:
void errorWithContent(U32 statusNum, const std::string& reason, const LLSD& content)
{
- LL_WARNS2("AppInit", "Capabilities") << "[status:" << statusNum << ":] " << content << LL_ENDL;
+ LL_WARNS("AppInit", "Capabilities") << "[status:" << statusNum << ":] " << content << LL_ENDL;
LLViewerRegion *regionp = LLWorld::getInstance()->getRegionFromHandle(mRegionHandle);
if (regionp)
{
@@ -226,12 +249,12 @@ public:
LLViewerRegion *regionp = LLWorld::getInstance()->getRegionFromHandle(mRegionHandle);
if(!regionp) //region was removed
{
- LL_WARNS2("AppInit", "Capabilities") << "Received results for region that no longer exists!" << LL_ENDL;
+ LL_WARNS("AppInit", "Capabilities") << "Received results for region that no longer exists!" << LL_ENDL;
return ;
}
if( mID != regionp->getHttpResponderID() ) // region is no longer referring to this responder
{
- LL_WARNS2("AppInit", "Capabilities") << "Received results for a stale http responder!" << LL_ENDL;
+ LL_WARNS("AppInit", "Capabilities") << "Received results for a stale http responder!" << LL_ENDL;
regionp->failedSeedCapability();
return ;
}
@@ -241,8 +264,7 @@ public:
{
regionp->setCapability(iter->first, iter->second);
- LL_DEBUGS2("AppInit", "Capabilities") << "got capability for "
- << iter->first << LL_ENDL;
+ LL_DEBUGS("AppInit", "Capabilities") << "got capability for " << iter->first << LL_ENDL;
/* HACK we're waiting for the ServerReleaseNotes */
if (iter->first == "ServerReleaseNotes" && regionp->getReleaseNotesRequested())
@@ -282,8 +304,8 @@ public:
void errorWithContent(U32 statusNum, const std::string& reason, const LLSD& content)
{
- llwarns << "BaseCapabilitiesCompleteTracker error [status:"
- << statusNum << "]: " << content << llendl;
+ LL_WARNS() << "BaseCapabilitiesCompleteTracker error [status:"
+ << statusNum << "]: " << content << LL_ENDL;
}
void result(const LLSD& content)
@@ -297,22 +319,22 @@ public:
for(iter = content.beginMap(); iter != content.endMap(); ++iter)
{
regionp->setCapabilityDebug(iter->first, iter->second);
- //llinfos<<"BaseCapabilitiesCompleteTracker New Caps "<<iter->first<<" "<< iter->second<<llendl;
+ //LL_INFOS()<<"BaseCapabilitiesCompleteTracker New Caps "<<iter->first<<" "<< iter->second<<LL_ENDL;
}
if ( regionp->getRegionImpl()->mCapabilities.size() != regionp->getRegionImpl()->mSecondCapabilitiesTracker.size() )
{
- llinfos << "BaseCapabilitiesCompleteTracker " << "sim " << regionp->getName()
+ LL_INFOS() << "BaseCapabilitiesCompleteTracker " << "sim " << regionp->getName()
<< " sent duplicate seed caps that differs in size - most likely content. "
<< (S32) regionp->getRegionImpl()->mCapabilities.size() << " vs " << regionp->getRegionImpl()->mSecondCapabilitiesTracker.size()
- << llendl;
+ << LL_ENDL;
//todo#add cap debug versus original check?
/*
CapabilityMap::const_iterator iter = regionp->getRegionImpl()->mCapabilities.begin();
while (iter!=regionp->getRegionImpl()->mCapabilities.end() )
{
- llinfos << "BaseCapabilitiesCompleteTracker Original " << iter->first << " " << iter->second<<llendl;
+ LL_INFOS() << "BaseCapabilitiesCompleteTracker Original " << iter->first << " " << iter->second<<LL_ENDL;
++iter;
}
*/
@@ -357,7 +379,13 @@ LLViewerRegion::LLViewerRegion(const U64 &handle,
mCacheLoaded(FALSE),
mCacheDirty(FALSE),
mReleaseNotesRequested(FALSE),
- mCapabilitiesReceived(false)
+ mCapabilitiesReceived(false),
+ mBitsReceived(0.f),
+ mPacketsReceived(0.f),
+ mDead(FALSE),
+ mLastVisitedEntry(NULL),
+ mInvisibilityCheckHistory(-1),
+ mPaused(FALSE)
{
mWidth = region_width_meters;
mImpl->mOriginGlobal = from_region_handle(handle);
@@ -389,17 +417,19 @@ LLViewerRegion::LLViewerRegion(const U64 &handle,
//create object partitions
//MUST MATCH declaration of eObjectPartitions
- mImpl->mObjectPartition.push_back(new LLHUDPartition()); //PARTITION_HUD
- mImpl->mObjectPartition.push_back(new LLTerrainPartition()); //PARTITION_TERRAIN
- mImpl->mObjectPartition.push_back(new LLVoidWaterPartition()); //PARTITION_VOIDWATER
- mImpl->mObjectPartition.push_back(new LLWaterPartition()); //PARTITION_WATER
- mImpl->mObjectPartition.push_back(new LLTreePartition()); //PARTITION_TREE
- mImpl->mObjectPartition.push_back(new LLParticlePartition()); //PARTITION_PARTICLE
- mImpl->mObjectPartition.push_back(new LLGrassPartition()); //PARTITION_GRASS
- mImpl->mObjectPartition.push_back(new LLVolumePartition()); //PARTITION_VOLUME
- mImpl->mObjectPartition.push_back(new LLBridgePartition()); //PARTITION_BRIDGE
- mImpl->mObjectPartition.push_back(new LLHUDParticlePartition());//PARTITION_HUD_PARTICLE
- mImpl->mObjectPartition.push_back(NULL); //PARTITION_NONE
+ mImpl->mObjectPartition.push_back(new LLHUDPartition(this)); //PARTITION_HUD
+ mImpl->mObjectPartition.push_back(new LLTerrainPartition(this)); //PARTITION_TERRAIN
+ mImpl->mObjectPartition.push_back(new LLVoidWaterPartition(this)); //PARTITION_VOIDWATER
+ mImpl->mObjectPartition.push_back(new LLWaterPartition(this)); //PARTITION_WATER
+ mImpl->mObjectPartition.push_back(new LLTreePartition(this)); //PARTITION_TREE
+ mImpl->mObjectPartition.push_back(new LLParticlePartition(this)); //PARTITION_PARTICLE
+ mImpl->mObjectPartition.push_back(new LLGrassPartition(this)); //PARTITION_GRASS
+ mImpl->mObjectPartition.push_back(new LLVolumePartition(this)); //PARTITION_VOLUME
+ mImpl->mObjectPartition.push_back(new LLBridgePartition(this)); //PARTITION_BRIDGE
+ mImpl->mObjectPartition.push_back(new LLHUDParticlePartition(this));//PARTITION_HUD_PARTICLE
+ mImpl->mObjectPartition.push_back(new LLVOCachePartition(this)); //PARTITION_VO_CACHE
+ mImpl->mObjectPartition.push_back(NULL); //PARTITION_NONE
+ mImpl->mVOCachePartition = getVOCachePartition();
mRenderInfoRequestTimer.resetWithExpiry(0.f); // Set timer to be expired
setCapabilitiesReceivedCallback(boost::bind(&LLAvatarRenderInfoAccountant::expireRenderInfoReportTimer, _1));
@@ -410,19 +440,25 @@ void LLViewerRegion::initStats()
{
mImpl->mLastNetUpdate.reset();
mPacketsIn = 0;
- mBitsIn = 0;
- mLastBitsIn = 0;
+ mBitsIn = (U32Bits)0;
+ mLastBitsIn = (U32Bits)0;
mLastPacketsIn = 0;
mPacketsOut = 0;
mLastPacketsOut = 0;
mPacketsLost = 0;
mLastPacketsLost = 0;
- mPingDelay = 0;
+ mPingDelay = (U32Seconds)0;
mAlive = false; // can become false if circuit disconnects
}
LLViewerRegion::~LLViewerRegion()
{
+ mDead = TRUE;
+ mImpl->mActiveSet.clear();
+ mImpl->mVisibleEntries.clear();
+ mImpl->mVisibleGroups.clear();
+ mImpl->mWaitingSet.clear();
+
gVLManager.cleanupData(this);
// Can't do this on destruction, because the neighbor pointers might be invalid.
// This should be reference counted...
@@ -437,10 +473,10 @@ LLViewerRegion::~LLViewerRegion()
delete mImpl->mEventPoll;
LLHTTPSender::clearSender(mImpl->mHost);
- saveObjectCache();
-
std::for_each(mImpl->mObjectPartition.begin(), mImpl->mObjectPartition.end(), DeletePointer());
+ saveObjectCache();
+
delete mImpl;
mImpl = NULL;
}
@@ -481,9 +517,13 @@ 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())
+ {
+ mCacheDirty = TRUE;
+ }
}
}
@@ -500,16 +540,15 @@ void LLViewerRegion::saveObjectCache()
return;
}
- if(LLVOCache::hasInstance())
+ if(LLVOCache::instanceExists())
{
- LLVOCache::getInstance()->writeToCache(mHandle, mImpl->mCacheID, mImpl->mCacheMap, mCacheDirty) ;
+ 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.
+
+ LLVOCache::getInstance()->writeToCache(mHandle, mImpl->mCacheID, mImpl->mCacheMap, mCacheDirty, removal_enabled) ;
mCacheDirty = FALSE;
}
- for(LLVOCacheEntry::vocache_entry_map_t::iterator iter = mImpl->mCacheMap.begin(); iter != mImpl->mCacheMap.end(); ++iter)
- {
- delete iter->second;
- }
mImpl->mCacheMap.clear();
}
@@ -741,7 +780,7 @@ void LLViewerRegion::processRegionInfo(LLMessageSystem* msg, void**)
{
// send it to 'observers'
// *TODO: switch the floaters to using LLRegionInfoModel
- llinfos << "Processing region info" << llendl;
+ LL_INFOS() << "Processing region info" << LL_ENDL;
LLRegionInfoModel::instance().update(msg);
LLFloaterGodTools::processRegionInfo(msg);
LLFloaterRegionInfo::processRegionInfo(msg);
@@ -775,10 +814,459 @@ void LLViewerRegion::dirtyHeights()
}
}
-BOOL LLViewerRegion::idleUpdate(F32 max_update_time)
+//physically delete the cache entry
+void LLViewerRegion::killCacheEntry(LLVOCacheEntry* entry, bool for_rendering)
+{
+ if(!entry || !entry->isValid())
+ {
+ return;
+ }
+
+ if(for_rendering && !entry->isState(LLVOCacheEntry::ACTIVE))
+ {
+ addNewObject(entry); //force to add to rendering pipeline
+ }
+
+ //remove from active list and waiting list
+ if(entry->isState(LLVOCacheEntry::ACTIVE))
+ {
+ mImpl->mActiveSet.erase(entry);
+ }
+ else
+ {
+ if(entry->isState(LLVOCacheEntry::WAITING))
+ {
+ mImpl->mWaitingSet.erase(entry);
+ }
+
+ //remove from mVOCachePartition
+ removeFromVOCacheTree(entry);
+ }
+
+ //remove from the forced visible list
+ mImpl->mVisibleEntries.erase(entry);
+
+ //disconnect from parent if it is a child
+ if(entry->getParentID() > 0)
+ {
+ LLVOCacheEntry* parent = getCacheEntry(entry->getParentID());
+ if(parent)
+ {
+ parent->removeChild(entry);
+ }
+ }
+ else if(entry->getNumOfChildren() > 0)//remove children from cache if has any
+ {
+ LLVOCacheEntry* child = entry->getChild();
+ while(child != NULL)
+ {
+ killCacheEntry(child, for_rendering);
+ child = entry->getChild();
+ }
+ }
+
+ //will remove it from the object cache, real deletion
+ entry->setState(LLVOCacheEntry::INACTIVE);
+ entry->removeOctreeEntry();
+ entry->setValid(FALSE);
+}
+
+//physically delete the cache entry
+void LLViewerRegion::killCacheEntry(U32 local_id)
+{
+ killCacheEntry(getCacheEntry(local_id));
+}
+
+U32 LLViewerRegion::getNumOfActiveCachedObjects() const
+{
+ return mImpl->mActiveSet.size();
+}
+
+void LLViewerRegion::addActiveCacheEntry(LLVOCacheEntry* entry)
+{
+ if(!entry || mDead)
+ {
+ return;
+ }
+ if(entry->isState(LLVOCacheEntry::ACTIVE))
+ {
+ return; //already inserted.
+ }
+
+ if(entry->isState(LLVOCacheEntry::WAITING))
+ {
+ mImpl->mWaitingSet.erase(entry);
+ }
+
+ entry->setState(LLVOCacheEntry::ACTIVE);
+ entry->setVisible();
+
+ llassert(entry->getEntry()->hasDrawable());
+ mImpl->mActiveSet.insert(entry);
+}
+
+void LLViewerRegion::removeActiveCacheEntry(LLVOCacheEntry* entry, LLDrawable* drawablep)
+{
+ if(mDead || !entry || !entry->isValid())
+ {
+ return;
+ }
+ if(!entry->isState(LLVOCacheEntry::ACTIVE))
+ {
+ return; //not an active entry.
+ }
+
+ //shift to the local regional space from agent space
+ if(drawablep != NULL && drawablep->getVObj().notNull())
+ {
+ const LLVector3& pos = drawablep->getVObj()->getPositionRegion();
+ LLVector4a shift;
+ shift.load3(pos.mV);
+ shift.sub(entry->getPositionGroup());
+ entry->shift(shift);
+ }
+
+ if(entry->getParentID() > 0) //is a child
+ {
+ LLVOCacheEntry* parent = getCacheEntry(entry->getParentID());
+ if(parent)
+ {
+ parent->addChild(entry);
+ }
+ else //parent not in cache.
+ {
+ //this happens only when parent is not cacheable.
+ mOrphanMap[entry->getParentID()].push_back(entry->getLocalID());
+ }
+ }
+ else //insert to vo cache tree.
+ {
+ entry->updateParentBoundingInfo();
+ entry->saveBoundingSphere();
+ addToVOCacheTree(entry);
+ }
+
+ mImpl->mVisibleEntries.erase(entry);
+ mImpl->mActiveSet.erase(entry);
+ mImpl->mWaitingSet.erase(entry);
+ entry->setState(LLVOCacheEntry::INACTIVE);
+}
+
+bool LLViewerRegion::addVisibleGroup(LLViewerOctreeGroup* group)
+{
+ if(mDead || group->isEmpty())
+ {
+ return false;
+ }
+
+ mImpl->mVisibleGroups.insert(group);
+
+ return true;
+}
+
+U32 LLViewerRegion::getNumOfVisibleGroups() const
+{
+ return mImpl ? mImpl->mVisibleGroups.size() : 0;
+}
+
+void LLViewerRegion::addToVOCacheTree(LLVOCacheEntry* entry)
+{
+ if(!sVOCacheCullingEnabled)
+ {
+ return;
+ }
+
+ if(mDead || !entry || !entry->getEntry() || !entry->isValid())
+ {
+ return;
+ }
+ if(entry->getParentID() > 0)
+ {
+ return; //no child prim in cache octree.
+ }
+
+ if(entry->hasState(LLVOCacheEntry::IN_VO_TREE))
+ {
+ return; //already in the tree.
+ }
+
+ llassert_always(!entry->getGroup()); //not in octree.
+ llassert(!entry->getEntry()->hasDrawable()); //not have drawables
+
+ if(mImpl->mVOCachePartition->addEntry(entry->getEntry()))
+ {
+ entry->setState(LLVOCacheEntry::IN_VO_TREE);
+ }
+}
+
+void LLViewerRegion::removeFromVOCacheTree(LLVOCacheEntry* entry)
+{
+ if(mDead || !entry || !entry->getEntry())
+ {
+ return;
+ }
+
+ if(!entry->hasState(LLVOCacheEntry::IN_VO_TREE))
+ {
+ return; //not in the tree.
+ }
+ entry->clearState(LLVOCacheEntry::IN_VO_TREE);
+
+ mImpl->mVOCachePartition->removeEntry(entry->getEntry());
+}
+
+//add child objects as visible entries
+void LLViewerRegion::addVisibleChildCacheEntry(LLVOCacheEntry* parent, LLVOCacheEntry* child)
+{
+ if(mDead)
+ {
+ return;
+ }
+
+ if(parent && (!parent->isValid() || !parent->isState(LLVOCacheEntry::ACTIVE)))
+ {
+ return; //parent must be valid and in rendering pipeline
+ }
+
+ if(child && (!child->getEntry() || !child->isValid() || !child->isState(LLVOCacheEntry::INACTIVE)))
+ {
+ return; //child must be valid and not in the rendering pipeline
+ }
+
+ if(child)
+ {
+ child->setState(LLVOCacheEntry::IN_QUEUE);
+ mImpl->mVisibleEntries.insert(child);
+ }
+ else if(parent && parent->getNumOfChildren() > 0) //add all children
+ {
+ child = parent->getChild();
+ while(child != NULL)
+ {
+ addVisibleChildCacheEntry(NULL, child);
+ child = parent->getChild();
+ }
+ }
+}
+
+void LLViewerRegion::updateVisibleEntries(F32 max_time)
+{
+ if(mDead)
+ {
+ return;
+ }
+
+ if(mImpl->mVisibleGroups.empty() && mImpl->mVisibleEntries.empty())
+ {
+ return;
+ }
+
+ if(!sNewObjectCreationThrottle)
+ {
+ return;
+ }
+
+ const F32 LARGE_SCENE_CONTRIBUTION = 1000.f; //a large number to force to load the object.
+ const LLVector3 camera_origin = LLViewerCamera::getInstance()->getOrigin();
+ const U32 cur_frame = LLViewerOctreeEntryData::getCurrentFrame();
+ bool needs_update = ((cur_frame - mImpl->mLastCameraUpdate) > 5) && ((camera_origin - mImpl->mLastCameraOrigin).lengthSquared() > 10.f);
+ U32 last_update = mImpl->mLastCameraUpdate;
+ LLVector4a local_origin;
+ local_origin.load3((camera_origin - getOriginAgent()).mV);
+
+ //process visible entries
+ for(LLVOCacheEntry::vocache_entry_set_t::iterator iter = mImpl->mVisibleEntries.begin(); iter != mImpl->mVisibleEntries.end();)
+ {
+ LLVOCacheEntry* vo_entry = *iter;
+
+ if(vo_entry->isValid() && vo_entry->getState() < LLVOCacheEntry::WAITING)
+ {
+ //set a large number to force to load this object.
+ vo_entry->setSceneContribution(LARGE_SCENE_CONTRIBUTION);
+
+ mImpl->mWaitingList.insert(vo_entry);
+ ++iter;
+ }
+ else
+ {
+ LLVOCacheEntry::vocache_entry_set_t::iterator next_iter = iter;
+ ++next_iter;
+ mImpl->mVisibleEntries.erase(iter);
+ iter = next_iter;
+ }
+ }
+
+ //
+ //process visible groups
+ //
+ //object projected area threshold
+ F32 projection_threshold = LLVOCacheEntry::getSquaredPixelThreshold(mImpl->mVOCachePartition->isFrontCull());
+ F32 dist_threshold = mImpl->mVOCachePartition->isFrontCull() ? gAgentCamera.mDrawDistance : LLVOCacheEntry::sRearFarRadius;
+
+ std::set< LLPointer<LLViewerOctreeGroup> >::iterator group_iter = mImpl->mVisibleGroups.begin();
+ for(; group_iter != mImpl->mVisibleGroups.end(); ++group_iter)
+ {
+ LLPointer<LLViewerOctreeGroup> group = *group_iter;
+ if(group->getNumRefs() < 3 || //group to be deleted
+ !group->getOctreeNode() || group->isEmpty()) //group empty
+{
+ continue;
+ }
+
+ for (LLViewerOctreeGroup::element_iter i = group->getDataBegin(); i != group->getDataEnd(); ++i)
+ {
+ if((*i)->hasVOCacheEntry())
+ {
+ LLVOCacheEntry* vo_entry = (LLVOCacheEntry*)(*i)->getVOCacheEntry();
+
+ if(vo_entry->getParentID() > 0) //is a child
+ {
+ //child visibility depends on its parent.
+ continue;
+ }
+ if(!vo_entry->isValid())
+ {
+ continue; //skip invalid entry.
+ }
+
+ vo_entry->calcSceneContribution(local_origin, needs_update, last_update, dist_threshold);
+ if(vo_entry->getSceneContribution() > projection_threshold)
+ {
+ mImpl->mWaitingList.insert(vo_entry);
+ }
+ }
+ }
+ }
+
+ if(needs_update)
+ {
+ mImpl->mLastCameraOrigin = camera_origin;
+ mImpl->mLastCameraUpdate = cur_frame;
+ }
+
+ return;
+}
+
+void LLViewerRegion::createVisibleObjects(F32 max_time)
{
- // did_update returns TRUE if we did at least one significant update
- BOOL did_update = mImpl->mLandp->idleUpdate(max_update_time);
+ if(mDead)
+ {
+ return;
+ }
+ if(mImpl->mWaitingList.empty())
+ {
+ mImpl->mVOCachePartition->setCullHistory(FALSE);
+ return;
+ }
+
+ S32 throttle = sNewObjectCreationThrottle;
+ BOOL has_new_obj = FALSE;
+ LLTimer update_timer;
+ for(LLVOCacheEntry::vocache_entry_priority_list_t::iterator iter = mImpl->mWaitingList.begin();
+ iter != mImpl->mWaitingList.end(); ++iter)
+ {
+ LLVOCacheEntry* vo_entry = *iter;
+
+ if(vo_entry->getState() < LLVOCacheEntry::WAITING)
+ {
+ addNewObject(vo_entry);
+ has_new_obj = TRUE;
+ if(throttle > 0 && !(--throttle) && update_timer.getElapsedTimeF32() > max_time)
+ {
+ break;
+ }
+ }
+ }
+
+ mImpl->mVOCachePartition->setCullHistory(has_new_obj);
+
+ return;
+}
+
+void LLViewerRegion::clearCachedVisibleObjects()
+{
+ mImpl->mWaitingList.clear();
+ mImpl->mVisibleGroups.clear();
+
+ //reset all occluders
+ mImpl->mVOCachePartition->resetOccluders();
+ mPaused = TRUE;
+
+ //clean visible entries
+ for(LLVOCacheEntry::vocache_entry_set_t::iterator iter = mImpl->mVisibleEntries.begin(); iter != mImpl->mVisibleEntries.end();)
+ {
+ LLVOCacheEntry* entry = *iter;
+ LLVOCacheEntry* parent = getCacheEntry(entry->getParentID());
+
+ if(!entry->getParentID() || parent) //no child or parent is cache-able
+ {
+ if(parent) //has a cache-able parent
+ {
+ parent->addChild(entry);
+ }
+
+ LLVOCacheEntry::vocache_entry_set_t::iterator next_iter = iter;
+ ++next_iter;
+ mImpl->mVisibleEntries.erase(iter);
+ iter = next_iter;
+ }
+ else //parent is not cache-able, leave it.
+ {
+ ++iter;
+ }
+ }
+
+ //remove all visible entries.
+ mLastVisitedEntry = NULL;
+ std::vector<LLDrawable*> delete_list;
+ for(LLVOCacheEntry::vocache_entry_set_t::iterator iter = mImpl->mActiveSet.begin();
+ iter != mImpl->mActiveSet.end(); ++iter)
+ {
+ LLDrawable* drawablep = (LLDrawable*)(*iter)->getEntry()->getDrawable();
+
+ if(drawablep && !drawablep->getParent())
+ {
+ delete_list.push_back(drawablep);
+ }
+ }
+
+ if(!delete_list.empty())
+ {
+ for(S32 i = 0; i < delete_list.size(); i++)
+ {
+ gObjectList.killObject(delete_list[i]->getVObj());
+ }
+ delete_list.clear();
+ }
+
+ return;
+}
+
+//perform some necessary but very light updates.
+//to replace the function idleUpdate(...) in case there is no enough time.
+void LLViewerRegion::lightIdleUpdate()
+{
+ if(!sVOCacheCullingEnabled)
+ {
+ return;
+ }
+ if(mImpl->mCacheMap.empty())
+ {
+ return;
+ }
+
+ //reset all occluders
+ mImpl->mVOCachePartition->resetOccluders();
+}
+
+void LLViewerRegion::idleUpdate(F32 max_update_time)
+{
+ LLTimer update_timer;
+ F32 max_time;
+
+ mLastUpdate = LLViewerOctreeEntryData::getCurrentFrame();
+
+ mImpl->mLandp->idleUpdate(max_update_time);
if (mParcelOverlay)
{
@@ -786,9 +1274,276 @@ BOOL LLViewerRegion::idleUpdate(F32 max_update_time)
mParcelOverlay->idleUpdate();
}
- return did_update;
+ if(!sVOCacheCullingEnabled)
+ {
+ return;
+ }
+ if(mImpl->mCacheMap.empty())
+ {
+ return;
+ }
+ if(mPaused)
+ {
+ mPaused = FALSE; //unpause.
+ }
+
+ LLViewerCamera::eCameraID old_camera_id = LLViewerCamera::sCurCameraID;
+ LLViewerCamera::sCurCameraID = LLViewerCamera::CAMERA_WORLD;
+
+ //reset all occluders
+ mImpl->mVOCachePartition->resetOccluders();
+
+ max_time = max_update_time - update_timer.getElapsedTimeF32();
+
+ //kill invisible objects
+ killInvisibleObjects(max_time * 0.4f);
+ max_time = max_update_time - update_timer.getElapsedTimeF32();
+
+ updateVisibleEntries(max_time);
+ max_time = max_update_time - update_timer.getElapsedTimeF32();
+
+ createVisibleObjects(max_time);
+
+ mImpl->mWaitingList.clear();
+ mImpl->mVisibleGroups.clear();
+
+ LLViewerCamera::sCurCameraID = old_camera_id;
+ return;
}
+//update the throttling number for new object creation
+void LLViewerRegion::calcNewObjectCreationThrottle()
+{
+ static LLCachedControl<S32> new_object_creation_throttle(gSavedSettings,"NewObjectCreationThrottle");
+ static LLCachedControl<F32> throttle_delay_time(gSavedSettings,"NewObjectCreationThrottleDelayTime");
+ static LLFrameTimer timer;
+
+ //
+ //sNewObjectCreationThrottle =
+ //-2: throttle is disabled because either the screen is showing progress view, or immediate after the screen is not black
+ //-1: throttle is disabled by the debug setting
+ //0: no new object creation is allowed
+ //>0: valid throttling number
+ //
+
+ if(gViewerWindow->getProgressView()->getVisible() && throttle_delay_time > 0.f)
+ {
+ sNewObjectCreationThrottle = -2; //cancel the throttling
+ timer.reset();
+ }
+ else if(sNewObjectCreationThrottle < -1) //just recoved from the login/teleport screen
+ {
+ if(timer.getElapsedTimeF32() > throttle_delay_time) //wait for throttle_delay_time to reset the throttle
+ {
+ sNewObjectCreationThrottle = new_object_creation_throttle; //reset
+ if(sNewObjectCreationThrottle < -1)
+ {
+ sNewObjectCreationThrottle = -1;
+ }
+ }
+ }
+
+ //update some LLVOCacheEntry debug setting factors.
+ LLVOCacheEntry::updateDebugSettings();
+}
+
+BOOL LLViewerRegion::isViewerCameraStatic()
+{
+ return sLastCameraUpdated < LLViewerOctreeEntryData::getCurrentFrame();
+}
+
+void LLViewerRegion::killInvisibleObjects(F32 max_time)
+{
+ if(!sVOCacheCullingEnabled)
+ {
+ return;
+ }
+ if(mImpl->mActiveSet.empty())
+ {
+ return;
+ }
+ if(sNewObjectCreationThrottle < 0)
+ {
+ return;
+ }
+
+ LLTimer update_timer;
+ LLVector4a camera_origin;
+ camera_origin.load3(LLViewerCamera::getInstance()->getOrigin().mV);
+ LLVector4a local_origin;
+ local_origin.load3((LLViewerCamera::getInstance()->getOrigin() - getOriginAgent()).mV);
+ F32 back_threshold = LLVOCacheEntry::sRearFarRadius;
+
+ size_t max_update = 64;
+ if(!mInvisibilityCheckHistory && isViewerCameraStatic())
+ {
+ //history is clean, reduce number of checking
+ max_update /= 2;
+ }
+
+ std::vector<LLDrawable*> delete_list;
+ S32 update_counter = llmin(max_update, mImpl->mActiveSet.size());
+ LLVOCacheEntry::vocache_entry_set_t::iterator iter = mImpl->mActiveSet.upper_bound(mLastVisitedEntry);
+
+ for(; update_counter > 0; --update_counter, ++iter)
+ {
+ if(iter == mImpl->mActiveSet.end())
+ {
+ iter = mImpl->mActiveSet.begin();
+ }
+ if((*iter)->getParentID() > 0)
+ {
+ continue; //skip child objects, they are removed with their parent.
+ }
+
+ LLVOCacheEntry* vo_entry = *iter;
+ if(!vo_entry->isAnyVisible(camera_origin, local_origin, back_threshold) && vo_entry->mLastCameraUpdated < sLastCameraUpdated)
+ {
+ killObject(vo_entry, delete_list);
+ }
+
+ if(max_time < update_timer.getElapsedTimeF32()) //time out
+ {
+ break;
+ }
+ }
+
+ if(iter == mImpl->mActiveSet.end())
+ {
+ mLastVisitedEntry = NULL;
+ }
+ else
+ {
+ mLastVisitedEntry = *iter;
+ }
+
+ mInvisibilityCheckHistory <<= 1;
+ if(!delete_list.empty())
+ {
+ mInvisibilityCheckHistory |= 1;
+ S32 count = delete_list.size();
+ for(S32 i = 0; i < count; i++)
+ {
+ gObjectList.killObject(delete_list[i]->getVObj());
+ }
+ delete_list.clear();
+ }
+
+ return;
+}
+
+void LLViewerRegion::killObject(LLVOCacheEntry* entry, std::vector<LLDrawable*>& delete_list)
+{
+ //kill the object.
+ LLDrawable* drawablep = (LLDrawable*)entry->getEntry()->getDrawable();
+ llassert(drawablep);
+ llassert(drawablep->getRegion() == this);
+
+ if(drawablep && !drawablep->getParent())
+ {
+ LLViewerObject::const_child_list_t& child_list = drawablep->getVObj()->getChildren();
+ for (LLViewerObject::child_list_t::const_iterator iter = child_list.begin();
+ iter != child_list.end(); iter++)
+ {
+ LLViewerObject* child = *iter;
+ if(child->mDrawable)
+ {
+ if(!child->mDrawable->getEntry() || !child->mDrawable->getEntry()->hasVOCacheEntry())
+ {
+ //do not remove parent if any of its children non-cacheable
+ //especially for the case that an avatar sits on a cache-able object
+ ((LLViewerOctreeEntryData*)drawablep)->setVisible();
+ return;
+ }
+
+ LLOcclusionCullingGroup* group = (LLOcclusionCullingGroup*)child->mDrawable->getGroup();
+ if(group && group->isAnyRecentlyVisible())
+ {
+ //set the parent visible if any of its children visible.
+ ((LLViewerOctreeEntryData*)drawablep)->setVisible();
+ return;
+ }
+ }
+ }
+ delete_list.push_back(drawablep);
+ }
+}
+
+LLViewerObject* LLViewerRegion::addNewObject(LLVOCacheEntry* entry)
+{
+ if(!entry || !entry->getEntry())
+ {
+ if(entry)
+ {
+ mImpl->mVisibleEntries.erase(entry);
+ entry->setState(LLVOCacheEntry::INACTIVE);
+ }
+ return NULL;
+ }
+
+ LLViewerObject* obj = NULL;
+ if(!entry->getEntry()->hasDrawable()) //not added to the rendering pipeline yet
+ {
+ //add the object
+ obj = gObjectList.processObjectUpdateFromCache(entry, this);
+ if(obj)
+ {
+ if(!entry->isState(LLVOCacheEntry::ACTIVE))
+ {
+ mImpl->mWaitingSet.insert(entry);
+ entry->setState(LLVOCacheEntry::WAITING);
+ }
+ }
+ }
+ else
+ {
+ LLViewerRegion* old_regionp = ((LLDrawable*)entry->getEntry()->getDrawable())->getRegion();
+ if(old_regionp != this)
+ {
+ //this object exists in two regions at the same time;
+ //this case can be safely ignored here because
+ //server should soon send update message to remove one region for this object.
+
+ LL_WARNS() << "Entry: " << entry->getLocalID() << " exists in two regions at the same time." << LL_ENDL;
+ return NULL;
+ }
+
+ LL_WARNS() << "Entry: " << entry->getLocalID() << " in rendering pipeline but not set to be active." << LL_ENDL;
+
+ //should not hit here any more, but does not hurt either, just put it back to active list
+ addActiveCacheEntry(entry);
+ }
+ return obj;
+}
+
+//update object cache if the object receives a full-update or terse update
+//update_type == EObjectUpdateType::OUT_TERSE_IMPROVED or EObjectUpdateType::OUT_FULL
+LLViewerObject* LLViewerRegion::updateCacheEntry(U32 local_id, LLViewerObject* objectp, U32 update_type)
+{
+ if(objectp && update_type != (U32)OUT_TERSE_IMPROVED)
+ {
+ return objectp; //no need to access cache
+ }
+
+ LLVOCacheEntry* entry = getCacheEntry(local_id);
+ if (!entry)
+ {
+ return objectp; //not in the cache, do nothing.
+ }
+ if(!objectp) //object not created
+ {
+ //create a new object from cache.
+ objectp = addNewObject(entry);
+ }
+
+ //remove from cache if terse update
+ if(update_type == (U32)OUT_TERSE_IMPROVED)
+ {
+ killCacheEntry(entry, true);
+ }
+
+ return objectp;
+}
// As above, but forcibly do the update.
void LLViewerRegion::forceUpdate()
@@ -966,9 +1721,8 @@ void LLViewerRegion::updateNetStats()
mPacketsLost = cdp->getPacketsLost();
mPingDelay = cdp->getPingDelay();
- mBitStat.addValue(mBitsIn - mLastBitsIn);
- mPacketsStat.addValue(mPacketsIn - mLastPacketsIn);
- mPacketsLostStat.addValue(mPacketsLost);
+ mBitsReceived += mBitsIn - mLastBitsIn;
+ mPacketsReceived += mPacketsIn - mLastPacketsIn;
}
@@ -977,7 +1731,7 @@ U32 LLViewerRegion::getPacketsLost() const
LLCircuitData *cdp = gMessageSystem->mCircuitInfo.findCircuit(mImpl->mHost);
if (!cdp)
{
- llinfos << "LLViewerRegion::getPacketsLost couldn't find circuit for " << mImpl->mHost << llendl;
+ LL_INFOS() << "LLViewerRegion::getPacketsLost couldn't find circuit for " << mImpl->mHost << LL_ENDL;
return 0;
}
else
@@ -1090,14 +1844,14 @@ public:
S32 target_index = input["body"]["Index"][0]["Prey"].asInteger();
S32 you_index = input["body"]["Index"][0]["You" ].asInteger();
- LLDynamicArray<U32>* avatar_locs = &region->mMapAvatars;
- LLDynamicArray<LLUUID>* avatar_ids = &region->mMapAvatarIDs;
- avatar_locs->reset();
- avatar_ids->reset();
+ std::vector<U32>* avatar_locs = &region->mMapAvatars;
+ std::vector<LLUUID>* avatar_ids = &region->mMapAvatarIDs;
+ avatar_locs->clear();
+ avatar_ids->clear();
- //llinfos << "coarse locations agent[0] " << input["body"]["AgentData"][0]["AgentID"].asUUID() << llendl;
- //llinfos << "my agent id = " << gAgent.getID() << llendl;
- //llinfos << ll_pretty_print_sd(input) << llendl;
+ //LL_INFOS() << "coarse locations agent[0] " << input["body"]["AgentData"][0]["AgentID"].asUUID() << LL_ENDL;
+ //LL_INFOS() << "my agent id = " << gAgent.getID() << LL_ENDL;
+ //LL_INFOS() << ll_pretty_print_sd(input) << LL_ENDL;
LLSD
locs = input["body"]["Location"],
@@ -1133,13 +1887,13 @@ public:
pos |= y;
pos <<= 8;
pos |= z;
- avatar_locs->put(pos);
- //llinfos << "next pos: " << x << "," << y << "," << z << ": " << pos << llendl;
+ avatar_locs->push_back(pos);
+ //LL_INFOS() << "next pos: " << x << "," << y << "," << z << ": " << pos << LL_ENDL;
if(has_agent_data) // for backwards compatibility with old message format
{
LLUUID agent_id(agents_it->get("AgentID").asUUID());
- //llinfos << "next agent: " << agent_id.asString() << llendl;
- avatar_ids->put(agent_id);
+ //LL_INFOS() << "next agent: " << agent_id.asString() << LL_ENDL;
+ avatar_ids->push_back(agent_id);
}
}
if (has_agent_data)
@@ -1159,9 +1913,9 @@ LLHTTPRegistration<CoarseLocationUpdate>
// the deprecated coarse location handler
void LLViewerRegion::updateCoarseLocations(LLMessageSystem* msg)
{
- //llinfos << "CoarseLocationUpdate" << llendl;
- mMapAvatars.reset();
- mMapAvatarIDs.reset(); // only matters in a rare case but it's good to be safe.
+ //LL_INFOS() << "CoarseLocationUpdate" << LL_ENDL;
+ mMapAvatars.clear();
+ mMapAvatarIDs.clear(); // only matters in a rare case but it's good to be safe.
U8 x_pos = 0;
U8 y_pos = 0;
@@ -1187,9 +1941,9 @@ void LLViewerRegion::updateCoarseLocations(LLMessageSystem* msg)
msg->getUUIDFast(_PREHASH_AgentData, _PREHASH_AgentID, agent_id, i);
}
- //llinfos << " object X: " << (S32)x_pos << " Y: " << (S32)y_pos
+ //LL_INFOS() << " object X: " << (S32)x_pos << " Y: " << (S32)y_pos
// << " Z: " << (S32)(z_pos * 4)
- // << llendl;
+ // << LL_ENDL;
// treat the target specially for the map
if(i == target_index)
@@ -1210,10 +1964,10 @@ void LLViewerRegion::updateCoarseLocations(LLMessageSystem* msg)
pos |= y_pos;
pos <<= 8;
pos |= z_pos;
- mMapAvatars.put(pos);
+ mMapAvatars.push_back(pos);
if(has_agent_data)
{
- mMapAvatarIDs.put(agent_id);
+ mMapAvatarIDs.push_back(agent_id);
}
}
}
@@ -1240,59 +1994,322 @@ void LLViewerRegion::setSimulatorFeatures(const LLSD& sim_features)
std::stringstream str;
LLSDSerialize::toPrettyXML(sim_features, str);
- llinfos << str.str() << llendl;
+ LL_INFOS() << str.str() << LL_ENDL;
mSimulatorFeatures = sim_features;
}
-LLViewerRegion::eCacheUpdateResult LLViewerRegion::cacheFullUpdate(LLViewerObject* objectp, LLDataPackerBinaryBuffer &dp)
+//this is called when the parent is not cacheable.
+//move all orphan children out of cache and insert to rendering octree.
+void LLViewerRegion::findOrphans(U32 parent_id)
{
- U32 local_id = objectp->getLocalID();
- U32 crc = objectp->getCRC();
+ orphan_list_t::iterator iter = mOrphanMap.find(parent_id);
+ if(iter != mOrphanMap.end())
+ {
+ std::vector<U32>* children = &mOrphanMap[parent_id];
+ for(S32 i = 0; i < children->size(); i++)
+ {
+ //parent is visible, so is the child.
+ addVisibleChildCacheEntry(NULL, getCacheEntry((*children)[i]));
+ }
+ children->clear();
+ mOrphanMap.erase(parent_id);
+ }
+}
- LLVOCacheEntry* entry = get_if_there(mImpl->mCacheMap, local_id, (LLVOCacheEntry*)NULL);
+void LLViewerRegion::decodeBoundingInfo(LLVOCacheEntry* entry)
+{
+ if(!sVOCacheCullingEnabled)
+ {
+ gObjectList.processObjectUpdateFromCache(entry, this);
+ return;
+ }
+ if(!entry || !entry->isValid())
+ {
+ return;
+ }
+
+ if(!entry->getEntry())
+ {
+ entry->setOctreeEntry(NULL);
+ }
+
+ if(entry->getEntry()->hasDrawable()) //already in the rendering pipeline
+ {
+ LLViewerRegion* old_regionp = ((LLDrawable*)entry->getEntry()->getDrawable())->getRegion();
+ if(old_regionp != this && old_regionp)
+{
+ LLViewerObject* obj = ((LLDrawable*)entry->getEntry()->getDrawable())->getVObj();
+ if(obj)
+ {
+ //remove from old region
+ old_regionp->killCacheEntry(obj->getLocalID());
+
+ //change region
+ obj->setRegion(this);
+ }
+ }
+
+ addActiveCacheEntry(entry);
+
+ //set parent id
+ U32 parent_id = 0;
+ LLViewerObject::unpackParentID(entry->getDP(), parent_id);
+ if(parent_id != entry->getParentID())
+ {
+ entry->setParentID(parent_id);
+ }
+
+ //update the object
+ gObjectList.processObjectUpdateFromCache(entry, this);
+ return; //done
+ }
+
+ //must not be active.
+ llassert_always(!entry->isState(LLVOCacheEntry::ACTIVE));
+ removeFromVOCacheTree(entry); //remove from cache octree if it is in.
+
+ LLVector3 pos;
+ LLVector3 scale;
+ LLQuaternion rot;
+
+ //decode spatial info and parent info
+ U32 parent_id = LLViewerObject::extractSpatialExtents(entry->getDP(), pos, scale, rot);
+
+ U32 old_parent_id = entry->getParentID();
+ bool same_old_parent = false;
+ if(parent_id != old_parent_id) //parent changed.
+ {
+ if(old_parent_id > 0) //has an old parent, disconnect it
+ {
+ LLVOCacheEntry* old_parent = getCacheEntry(old_parent_id);
+ if(old_parent)
+ {
+ old_parent->removeChild(entry);
+ if(!old_parent->isState(LLVOCacheEntry::INACTIVE))
+ {
+ mImpl->mVisibleEntries.erase(entry);
+ entry->setState(LLVOCacheEntry::INACTIVE);
+ }
+ }
+ }
+ entry->setParentID(parent_id);
+ }
+ else
+ {
+ same_old_parent = true;
+ }
+
+ if(parent_id > 0) //has a new parent
+ {
+ //1, find the parent in cache
+ LLVOCacheEntry* parent = getCacheEntry(parent_id);
+
+ //2, parent is not in the cache, put into the orphan list.
+ if(!parent)
+ {
+ if(!same_old_parent)
+ {
+ //check if parent is non-cacheable and already created
+ if(isNonCacheableObjectCreated(parent_id))
+ {
+ //parent is visible, so is the child.
+ addVisibleChildCacheEntry(NULL, entry);
+ }
+ else
+ {
+ entry->setBoundingInfo(pos, scale);
+ mOrphanMap[parent_id].push_back(entry->getLocalID());
+ }
+ }
+ else
+ {
+ entry->setBoundingInfo(pos, scale);
+ }
+ }
+ else //parent in cache.
+ {
+ if(!parent->isState(LLVOCacheEntry::INACTIVE))
+ {
+ //parent is visible, so is the child.
+ addVisibleChildCacheEntry(parent, entry);
+ }
+ else
+ {
+ entry->setBoundingInfo(pos, scale);
+ parent->addChild(entry);
+
+ if(parent->getGroup()) //re-insert parent to vo-cache tree because its bounding info changed.
+ {
+ removeFromVOCacheTree(parent);
+ addToVOCacheTree(parent);
+ }
+ }
+ }
+
+ return;
+ }
+
+ //
+ //no parent
+ //
+ entry->setBoundingInfo(pos, scale);
+
+ if(!parent_id) //a potential parent
+ {
+ //find all children and update their bounding info
+ orphan_list_t::iterator iter = mOrphanMap.find(entry->getLocalID());
+ if(iter != mOrphanMap.end())
+ {
+ std::vector<U32>* orphans = &mOrphanMap[entry->getLocalID()];
+ S32 size = orphans->size();
+ for(S32 i = 0; i < size; i++)
+ {
+ LLVOCacheEntry* child = getCacheEntry((*orphans)[i]);
+ if(child)
+ {
+ entry->addChild(child);
+ }
+ }
+ orphans->clear();
+ mOrphanMap.erase(entry->getLocalID());
+ }
+ }
+
+ if(!entry->getGroup() && entry->isState(LLVOCacheEntry::INACTIVE))
+ {
+ addToVOCacheTree(entry);
+ }
+ return ;
+}
+
+LLViewerRegion::eCacheUpdateResult LLViewerRegion::cacheFullUpdate(LLDataPackerBinaryBuffer &dp, U32 flags)
+{
+ eCacheUpdateResult result;
+ U32 crc;
+ U32 local_id;
+
+ LLViewerObject::unpackU32(&dp, local_id, "LocalID");
+ LLViewerObject::unpackU32(&dp, crc, "CRC");
+
+ LLVOCacheEntry* entry = getCacheEntry(local_id, false);
if (entry)
{
+ entry->setValid();
+
// we've seen this object before
if (entry->getCRC() == crc)
{
// Record a hit
entry->recordDupe();
- return CACHE_UPDATE_DUPE;
+ result = CACHE_UPDATE_DUPE;
}
+ else //CRC changed
+ {
+ // Update the cache entry
+ entry->updateEntry(crc, dp);
+
+ decodeBoundingInfo(entry);
- // Update the cache entry
- mImpl->mCacheMap.erase(local_id);
- delete entry;
+ result = CACHE_UPDATE_CHANGED;
+ }
+ }
+ else
+ {
+ // we haven't seen this object before
+ // Create new entry and add to map
+ result = CACHE_UPDATE_ADDED;
entry = new LLVOCacheEntry(local_id, crc, dp);
+ record(LLStatViewer::OBJECT_CACHE_HIT_RATE, LLUnits::Ratio::fromValue(0));
+
mImpl->mCacheMap[local_id] = entry;
- return CACHE_UPDATE_CHANGED;
+
+ decodeBoundingInfo(entry);
+ }
+ entry->setUpdateFlags(flags);
+
+ return result;
+ }
+
+LLViewerRegion::eCacheUpdateResult LLViewerRegion::cacheFullUpdate(LLViewerObject* objectp, LLDataPackerBinaryBuffer &dp, U32 flags)
+{
+ eCacheUpdateResult result = cacheFullUpdate(dp, flags);
+
+ return result;
+}
+
+LLVOCacheEntry* LLViewerRegion::getCacheEntryForOctree(U32 local_id)
+{
+ if(!sVOCacheCullingEnabled)
+ {
+ return NULL;
+ }
+
+ LLVOCacheEntry* entry = getCacheEntry(local_id);
+ removeFromVOCacheTree(entry);
+
+ return entry;
+}
+
+LLVOCacheEntry* LLViewerRegion::getCacheEntry(U32 local_id, bool valid)
+{
+ LLVOCacheEntry::vocache_entry_map_t::iterator iter = mImpl->mCacheMap.find(local_id);
+ if(iter != mImpl->mCacheMap.end())
+ {
+ if(!valid || iter->second->isValid())
+ {
+ return iter->second;
+ }
+ }
+ return NULL;
}
- // we haven't seen this object before
+void LLViewerRegion::addCacheMiss(U32 id, LLViewerRegion::eCacheMissType miss_type)
+{
+#if 0
+ mCacheMissList.insert(CacheMissItem(id, miss_type));
+#else
+ mCacheMissList.push_back(CacheMissItem(id, miss_type));
+#endif
+}
- // Create new entry and add to map
- eCacheUpdateResult result = CACHE_UPDATE_ADDED;
- if (mImpl->mCacheMap.size() > MAX_OBJECT_CACHE_ENTRIES)
+//check if a non-cacheable object is already created.
+bool LLViewerRegion::isNonCacheableObjectCreated(U32 local_id)
+{
+ if(mImpl && local_id > 0 && mImpl->mNonCacheableCreatedList.find(local_id) != mImpl->mNonCacheableCreatedList.end())
{
- delete mImpl->mCacheMap.begin()->second ;
- mImpl->mCacheMap.erase(mImpl->mCacheMap.begin());
- result = CACHE_UPDATE_REPLACED;
+ return true;
+ }
+ return false;
+}
+void LLViewerRegion::removeFromCreatedList(U32 local_id)
+{
+ if(mImpl && local_id > 0)
+ {
+ std::set<U32>::iterator iter = mImpl->mNonCacheableCreatedList.find(local_id);
+ if(iter != mImpl->mNonCacheableCreatedList.end())
+ {
+ mImpl->mNonCacheableCreatedList.erase(iter);
+ }
+ }
}
- entry = new LLVOCacheEntry(local_id, crc, dp);
- mImpl->mCacheMap[local_id] = entry;
- return result;
+void LLViewerRegion::addToCreatedList(U32 local_id)
+{
+ if(mImpl && local_id > 0)
+ {
+ mImpl->mNonCacheableCreatedList.insert(local_id);
+ }
}
// Get data packer for this object, if we have cached data
// AND the CRC matches. JC
-LLDataPacker *LLViewerRegion::getDP(U32 local_id, U32 crc, U8 &cache_miss_type)
+bool LLViewerRegion::probeCache(U32 local_id, U32 crc, U32 flags, U8 &cache_miss_type)
{
//llassert(mCacheLoaded); This assert failes often, changing to early-out -- davep, 2010/10/18
- LLVOCacheEntry* entry = get_if_there(mImpl->mCacheMap, local_id, (LLVOCacheEntry*)NULL);
+ LLVOCacheEntry* entry = getCacheEntry(local_id, false);
if (entry)
{
@@ -1302,44 +2319,57 @@ LLDataPacker *LLViewerRegion::getDP(U32 local_id, U32 crc, U8 &cache_miss_type)
// Record a hit
entry->recordHit();
cache_miss_type = CACHE_MISS_TYPE_NONE;
- return entry->getDP(crc);
+ entry->setUpdateFlags(flags);
+
+ if(entry->isState(LLVOCacheEntry::ACTIVE))
+ {
+ ((LLDrawable*)entry->getEntry()->getDrawable())->getVObj()->loadFlags(flags);
+ return true;
+ }
+
+ if(entry->isValid())
+ {
+ return true; //already probed
+ }
+
+ entry->setValid();
+ decodeBoundingInfo(entry);
+ return true;
}
else
{
- // llinfos << "CRC miss for " << local_id << llendl;
- cache_miss_type = CACHE_MISS_TYPE_CRC;
- mCacheMissCRC.put(local_id);
+ // LL_INFOS() << "CRC miss for " << local_id << LL_ENDL;
+
+ addCacheMiss(local_id, CACHE_MISS_TYPE_CRC);
}
}
else
{
- // llinfos << "Cache miss for " << local_id << llendl;
- cache_miss_type = CACHE_MISS_TYPE_FULL;
- mCacheMissFull.put(local_id);
+ // LL_INFOS() << "Cache miss for " << local_id << LL_ENDL;
+ addCacheMiss(local_id, CACHE_MISS_TYPE_FULL);
}
- return NULL;
+ return false;
}
void LLViewerRegion::addCacheMissFull(const U32 local_id)
{
- mCacheMissFull.put(local_id);
+ addCacheMiss(local_id, CACHE_MISS_TYPE_FULL);
}
void LLViewerRegion::requestCacheMisses()
{
- S32 full_count = mCacheMissFull.count();
- S32 crc_count = mCacheMissCRC.count();
- if (full_count == 0 && crc_count == 0) return;
+ if (!mCacheMissList.size())
+ {
+ return;
+ }
LLMessageSystem* msg = gMessageSystem;
BOOL start_new_message = TRUE;
S32 blocks = 0;
- S32 i;
- // Send full cache miss updates. For these, we KNOW we don't
- // have a viewer object.
- for (i = 0; i < full_count; i++)
+ //send requests for all cache-missed objects
+ for (CacheMissItem::cache_miss_list_t::iterator iter = mCacheMissList.begin(); iter != mCacheMissList.end(); ++iter)
{
if (start_new_message)
{
@@ -1351,34 +2381,8 @@ void LLViewerRegion::requestCacheMisses()
}
msg->nextBlockFast(_PREHASH_ObjectData);
- msg->addU8Fast(_PREHASH_CacheMissType, CACHE_MISS_TYPE_FULL);
- msg->addU32Fast(_PREHASH_ID, mCacheMissFull[i]);
- blocks++;
-
- if (blocks >= 255)
- {
- sendReliableMessage();
- start_new_message = TRUE;
- blocks = 0;
- }
- }
-
- // Send CRC miss updates. For these, we _might_ have a viewer object,
- // but probably not.
- for (i = 0; i < crc_count; i++)
- {
- if (start_new_message)
- {
- msg->newMessageFast(_PREHASH_RequestMultipleObjects);
- msg->nextBlockFast(_PREHASH_AgentData);
- msg->addUUIDFast(_PREHASH_AgentID, gAgent.getID());
- msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID());
- start_new_message = FALSE;
- }
-
- msg->nextBlockFast(_PREHASH_ObjectData);
- msg->addU8Fast(_PREHASH_CacheMissType, CACHE_MISS_TYPE_CRC);
- msg->addU32Fast(_PREHASH_ID, mCacheMissCRC[i]);
+ msg->addU8Fast(_PREHASH_CacheMissType, (*iter).mType);
+ msg->addU32Fast(_PREHASH_ID, (*iter).mID);
blocks++;
if (blocks >= 255)
@@ -1394,13 +2398,13 @@ void LLViewerRegion::requestCacheMisses()
{
sendReliableMessage();
}
- mCacheMissFull.reset();
- mCacheMissCRC.reset();
mCacheDirty = TRUE ;
- // llinfos << "KILLDEBUG Sent cache miss full " << full_count << " crc " << crc_count << llendl;
- LLViewerStatsRecorder::instance().requestCacheMissesEvent(full_count + crc_count);
+ // LL_INFOS() << "KILLDEBUG Sent cache miss full " << full_count << " crc " << crc_count << LL_ENDL;
+ LLViewerStatsRecorder::instance().requestCacheMissesEvent(mCacheMissList.size());
LLViewerStatsRecorder::instance().log(0.2f);
+
+ mCacheMissList.clear();
}
void LLViewerRegion::dumpCache()
@@ -1431,14 +2435,14 @@ void LLViewerRegion::dumpCache()
change_bin[changes]++;
}
- llinfos << "Count " << mImpl->mCacheMap.size() << llendl;
+ LL_INFOS() << "Count " << mImpl->mCacheMap.size() << LL_ENDL;
for (i = 0; i < BINS; i++)
{
- llinfos << "Hits " << i << " " << hit_bin[i] << llendl;
+ LL_INFOS() << "Hits " << i << " " << hit_bin[i] << LL_ENDL;
}
for (i = 0; i < BINS; i++)
{
- llinfos << "Changes " << i << " " << change_bin[i] << llendl;
+ LL_INFOS() << "Changes " << i << " " << change_bin[i] << LL_ENDL;
}
}
@@ -1578,8 +2582,20 @@ void LLViewerRegion::unpackRegionHandshake()
msg->addUUID("AgentID", gAgent.getID());
msg->addUUID("SessionID", gAgent.getSessionID());
msg->nextBlock("RegionInfo");
- msg->addU32("Flags", 0x0 );
+
+ U32 flags = 0;
+ if(sVOCacheCullingEnabled)
+ {
+ flags |= 0x00000001; //set the bit 0 to be 1 to ask sim to send all cacheable objects.
+ }
+ if(mImpl->mCacheMap.empty())
+ {
+ flags |= 0x00000002; //set the bit 1 to be 1 to tell sim the cache file is empty, no need to send cache probes.
+ }
+ msg->addU32("Flags", flags );
msg->sendReliable(host);
+
+ mRegionTimer.reset(); //reset region timer.
}
void LLViewerRegionImpl::buildCapabilityNames(LLSD& capabilityNames)
@@ -1670,7 +2686,7 @@ void LLViewerRegion::setSeedCapability(const std::string& url)
{
if (getCapability("Seed") == url)
{
- // llwarns << "Ignoring duplicate seed capability" << llendl;
+ //LL_WARNS() << "Ignoring duplicate seed capability" << LL_ENDL;
//Instead of just returning we build up a second set of seed caps and compare them
//to the "original" seed cap received and determine why there is problem!
LLSD capabilityNames = LLSD::emptyArray();
@@ -1689,7 +2705,7 @@ void LLViewerRegion::setSeedCapability(const std::string& url)
LLSD capabilityNames = LLSD::emptyArray();
mImpl->buildCapabilityNames(capabilityNames);
- llinfos << "posting to seed " << url << llendl;
+ LL_INFOS() << "posting to seed " << url << LL_ENDL;
S32 id = ++mImpl->mHttpResponderID;
LLHTTPClient::post(url, capabilityNames,
@@ -1709,7 +2725,7 @@ void LLViewerRegion::failedSeedCapability()
std::string url = getCapability("Seed");
if ( url.empty() )
{
- LL_WARNS2("AppInit", "Capabilities") << "Failed to get seed capabilities, and can not determine url for retries!" << LL_ENDL;
+ LL_WARNS("AppInit", "Capabilities") << "Failed to get seed capabilities, and can not determine url for retries!" << LL_ENDL;
return;
}
// After a few attempts, continue login. We will keep trying once in-world:
@@ -1724,8 +2740,8 @@ void LLViewerRegion::failedSeedCapability()
LLSD capabilityNames = LLSD::emptyArray();
mImpl->buildCapabilityNames(capabilityNames);
- llinfos << "posting to seed " << url << " (retry "
- << mImpl->mSeedCapAttempts << ")" << llendl;
+ LL_INFOS() << "posting to seed " << url << " (retry "
+ << mImpl->mSeedCapAttempts << ")" << LL_ENDL;
S32 id = ++mImpl->mHttpResponderID;
LLHTTPClient::post(url, capabilityNames,
@@ -1735,7 +2751,7 @@ void LLViewerRegion::failedSeedCapability()
else
{
// *TODO: Give a user pop-up about this error?
- LL_WARNS2("AppInit", "Capabilities") << "Failed to get seed capabilities from '" << url << "' after " << mImpl->mSeedCapAttempts << " attempts. Giving up!" << LL_ENDL;
+ LL_WARNS("AppInit", "Capabilities") << "Failed to get seed capabilities from '" << url << "' after " << mImpl->mSeedCapAttempts << " attempts. Giving up!" << LL_ENDL;
}
}
@@ -1751,7 +2767,7 @@ public:
void errorWithContent(U32 statusNum, const std::string& reason, const LLSD& content)
{
- LL_WARNS2("AppInit", "SimulatorFeatures") << "[status:" << statusNum << "]: " << content << LL_ENDL;
+ LL_WARNS("AppInit", "SimulatorFeatures") << "[status:" << statusNum << "]: " << content << LL_ENDL;
retry();
}
@@ -1760,7 +2776,7 @@ public:
LLViewerRegion *regionp = LLWorld::getInstance()->getRegionFromHandle(mRegionHandle);
if(!regionp) //region is removed or responder is not created.
{
- LL_WARNS2("AppInit", "SimulatorFeatures") << "Received results for region that no longer exists!" << LL_ENDL;
+ LL_WARNS("AppInit", "SimulatorFeatures") << "Received results for region that no longer exists!" << LL_ENDL;
return ;
}
@@ -1773,7 +2789,7 @@ private:
if (mAttempt < mMaxAttempts)
{
mAttempt++;
- LL_WARNS2("AppInit", "SimulatorFeatures") << "Re-trying '" << mRetryURL << "'. Retry #" << mAttempt << LL_ENDL;
+ LL_WARNS("AppInit", "SimulatorFeatures") << "Re-trying '" << mRetryURL << "'. Retry #" << mAttempt << LL_ENDL;
LLHTTPClient::get(mRetryURL, new SimulatorFeaturesReceived(*this), LLSD(), CAP_REQUEST_TIMEOUT);
}
}
@@ -1826,7 +2842,7 @@ std::string LLViewerRegion::getCapability(const std::string& name) const
{
if (!capabilitiesReceived() && (name!=std::string("Seed")) && (name!=std::string("ObjectMedia")))
{
- llwarns << "getCapability called before caps received" << llendl;
+ LL_WARNS() << "getCapability called before caps received" << LL_ENDL;
}
CapabilityMap::const_iterator iter = mImpl->mCapabilities.find(name);
@@ -1871,17 +2887,26 @@ void LLViewerRegion::logActiveCapabilities() const
{
if (!iter->second.empty())
{
- llinfos << iter->first << " URL is " << iter->second << llendl;
+ LL_INFOS() << iter->first << " URL is " << iter->second << LL_ENDL;
}
}
- llinfos << "Dumped " << count << " entries." << llendl;
+ LL_INFOS() << "Dumped " << count << " entries." << LL_ENDL;
}
LLSpatialPartition* LLViewerRegion::getSpatialPartition(U32 type)
{
- if (type < mImpl->mObjectPartition.size())
+ if (type < mImpl->mObjectPartition.size() && type < PARTITION_VO_CACHE)
+ {
+ return (LLSpatialPartition*)mImpl->mObjectPartition[type];
+ }
+ return NULL;
+}
+
+LLVOCachePartition* LLViewerRegion::getVOCachePartition()
+{
+ if(PARTITION_VO_CACHE < mImpl->mObjectPartition.size())
{
- return mImpl->mObjectPartition[type];
+ return (LLVOCachePartition*)mImpl->mObjectPartition[PARTITION_VO_CACHE];
}
return NULL;
}
diff --git a/indra/newview/llviewerregion.h b/indra/newview/llviewerregion.h
index 8f8bfa23c1..7f6a8186a5 100755
--- a/indra/newview/llviewerregion.h
+++ b/indra/newview/llviewerregion.h
@@ -32,9 +32,7 @@
#include <string>
#include <boost/signals2.hpp>
-#include "lldarray.h"
#include "llwind.h"
-#include "llstat.h"
#include "v3dmath.h"
#include "llstring.h"
#include "llregionflags.h"
@@ -67,8 +65,11 @@ class LLDataPacker;
class LLDataPackerBinaryBuffer;
class LLHost;
class LLBBox;
-
+class LLSpatialGroup;
+class LLDrawable;
class LLViewerRegionImpl;
+class LLViewerOctreeGroup;
+class LLVOCachePartition;
class LLViewerRegion: public LLCapabilityProvider // implements this interface
{
@@ -86,6 +87,7 @@ public:
PARTITION_VOLUME,
PARTITION_BRIDGE,
PARTITION_HUD_PARTICLE,
+ PARTITION_VO_CACHE,
PARTITION_NONE,
NUM_PARTITIONS
} eObjectPartitions;
@@ -219,11 +221,21 @@ public:
// can process the message.
static void processRegionInfo(LLMessageSystem* msg, void**);
+ //check if the viewer camera is static
+ static BOOL isViewerCameraStatic();
+ static void calcNewObjectCreationThrottle();
+
void setCacheID(const LLUUID& id);
F32 getWidth() const { return mWidth; }
- BOOL idleUpdate(F32 max_update_time);
+ void idleUpdate(F32 max_update_time);
+ void lightIdleUpdate();
+ bool addVisibleGroup(LLViewerOctreeGroup* group);
+ void addVisibleChildCacheEntry(LLVOCacheEntry* parent, LLVOCacheEntry* child);
+ void addActiveCacheEntry(LLVOCacheEntry* entry);
+ void removeActiveCacheEntry(LLVOCacheEntry* entry, LLDrawable* drawablep);
+ void killCacheEntry(U32 local_id); //physically delete the cache entry
// Like idleUpdate, but forces everything to complete regardless of
// how long it takes.
@@ -316,11 +328,17 @@ public:
} eCacheUpdateResult;
// handle a full update message
- eCacheUpdateResult cacheFullUpdate(LLViewerObject* objectp, LLDataPackerBinaryBuffer &dp);
- LLDataPacker *getDP(U32 local_id, U32 crc, U8 &cache_miss_type);
+ eCacheUpdateResult cacheFullUpdate(LLDataPackerBinaryBuffer &dp, U32 flags);
+ eCacheUpdateResult cacheFullUpdate(LLViewerObject* objectp, LLDataPackerBinaryBuffer &dp, U32 flags);
+ LLVOCacheEntry* getCacheEntryForOctree(U32 local_id);
+ LLVOCacheEntry* getCacheEntry(U32 local_id, bool valid = true);
+ bool probeCache(U32 local_id, U32 crc, U32 flags, U8 &cache_miss_type);
void requestCacheMisses();
void addCacheMissFull(const U32 local_id);
-
+ //update object cache if the object receives a full-update or terse update
+ LLViewerObject* updateCacheEntry(U32 local_id, LLViewerObject* objectp, U32 update_type);
+ void findOrphans(U32 parent_id);
+ void clearCachedVisibleObjects();
void dumpCache();
void unpackRegionHandshake();
@@ -333,7 +351,10 @@ public:
virtual std::string getDescription() const;
std::string getHttpUrl() const { return mHttpUrl ;}
+ U32 getNumOfVisibleGroups() const;
+ U32 getNumOfActiveCachedObjects() const;
LLSpatialPartition* getSpatialPartition(U32 type);
+ LLVOCachePartition* getVOCachePartition();
bool objectIsReturnable(const LLVector3& pos, const std::vector<LLBBox>& boxes) const;
bool childrenObjectReturnable( const std::vector<LLBBox>& boxes ) const;
@@ -343,12 +364,35 @@ public:
void getNeighboringRegionsStatus( std::vector<S32>& regions );
const LLViewerRegionImpl * getRegionImpl() const { return mImpl; }
LLViewerRegionImpl * getRegionImplNC() { return mImpl; }
-
+
// implements the materials capability throttle
bool materialsCapThrottled() const { return !mMaterialsCapThrottleTimer.hasExpired(); }
void resetMaterialsCapThrottle();
U32 getMaxMaterialsPerTransaction() const;
+
+ void removeFromCreatedList(U32 local_id);
+ void addToCreatedList(U32 local_id);
+
+ BOOL isPaused() const {return mPaused;}
+ S32 getLastUpdate() const {return mLastUpdate;}
+
+ static BOOL isNewObjectCreationThrottleDisabled() {return sNewObjectCreationThrottle < 0;}
+
+private:
+ void addToVOCacheTree(LLVOCacheEntry* entry);
+ LLViewerObject* addNewObject(LLVOCacheEntry* entry);
+ void killObject(LLVOCacheEntry* entry, std::vector<LLDrawable*>& delete_list);
+ void removeFromVOCacheTree(LLVOCacheEntry* entry);
+ void killCacheEntry(LLVOCacheEntry* entry, bool for_rendering = false); //physically delete the cache entry
+ void killInvisibleObjects(F32 max_time);
+ void createVisibleObjects(F32 max_time);
+ void updateVisibleEntries(F32 max_time); //update visible entries
+
+ void addCacheMiss(U32 id, LLViewerRegion::eCacheMissType miss_type);
+ void decodeBoundingInfo(LLVOCacheEntry* entry);
+ bool isNonCacheableObjectCreated(U32 local_id);
+
public:
struct CompareDistance
{
@@ -368,9 +412,8 @@ public:
LLWind mWind;
LLViewerParcelOverlay *mParcelOverlay;
- LLStat mBitStat;
- LLStat mPacketsStat;
- LLStat mPacketsLostStat;
+ F32Bits mBitsReceived;
+ F32 mPacketsReceived;
LLMatrix4 mRenderMatrix;
@@ -379,17 +422,47 @@ public:
// messaging system in which the previous message only sends and parses the
// positions stored in the first array so they're maintained separately until
// we stop supporting the old CoarseLocationUpdate message.
- LLDynamicArray<U32> mMapAvatars;
- LLDynamicArray<LLUUID> mMapAvatarIDs;
+ std::vector<U32> mMapAvatars;
+ std::vector<LLUUID> mMapAvatarIDs;
+
+ static BOOL sVOCacheCullingEnabled; //vo cache culling enabled or not.
+ static S32 sLastCameraUpdated;
LLFrameTimer & getRenderInfoRequestTimer() { return mRenderInfoRequestTimer; };
+ struct CompareRegionByLastUpdate
+ {
+ bool operator()(const LLViewerRegion* const& lhs, const LLViewerRegion* const& rhs)
+ {
+ S32 lpa = lhs->getLastUpdate();
+ S32 rpa = rhs->getLastUpdate();
+
+ //small mLastUpdate first
+ if(lpa < rpa)
+ {
+ return true;
+ }
+ else if(lpa > rpa)
+ {
+ return false;
+ }
+ else
+ {
+ return lhs < rhs;
+ }
+ }
+ };
+ typedef std::set<LLViewerRegion*, CompareRegionByLastUpdate> region_priority_list_t;
+
private:
+ static S32 sNewObjectCreationThrottle;
LLViewerRegionImpl * mImpl;
+ LLFrameTimer mRegionTimer;
F32 mWidth; // Width of region on a side (meters)
U64 mHandle;
F32 mTimeDilation; // time dilation of physics simulation on simulator
+ S32 mLastUpdate; //last time called idleUpdate()
// simulator name
std::string mName;
@@ -399,14 +472,14 @@ private:
BOOL mIsEstateManager;
U32 mPacketsIn;
- U32 mBitsIn;
- U32 mLastBitsIn;
+ U32Bits mBitsIn,
+ mLastBitsIn;
U32 mLastPacketsIn;
U32 mPacketsOut;
U32 mLastPacketsOut;
S32 mPacketsLost;
S32 mLastPacketsLost;
- U32 mPingDelay;
+ U32Milliseconds mPingDelay;
F32 mDeltaTime; // Time since last measurement of lastPackets, Bits, etc
U64 mRegionFlags; // includes damage flags
@@ -417,6 +490,9 @@ private:
F32 mCameraDistanceSquared; // updated once per frame
U8 mCentralBakeVersion;
+ LLVOCacheEntry* mLastVisitedEntry;
+ U32 mInvisibilityCheckHistory;
+
// Information for Homestead / CR-53
S32 mClassID;
S32 mCPURatio;
@@ -431,16 +507,28 @@ private:
// a structure of size 2^14 = 16,000
BOOL mCacheLoaded;
BOOL mCacheDirty;
+ BOOL mAlive; // can become false if circuit disconnects
+ BOOL mCapabilitiesReceived;
+ BOOL mReleaseNotesRequested;
+ BOOL mDead; //if true, this region is in the process of deleting.
+ BOOL mPaused; //pause processing the objects in the region
- LLDynamicArray<U32> mCacheMissFull;
- LLDynamicArray<U32> mCacheMissCRC;
+ typedef std::map<U32, std::vector<U32> > orphan_list_t;
+ orphan_list_t mOrphanMap;
- bool mAlive; // can become false if circuit disconnects
- bool mCapabilitiesReceived;
- caps_received_signal_t mCapabilitiesReceivedSignal;
+ class CacheMissItem
+ {
+ public:
+ CacheMissItem(U32 id, LLViewerRegion::eCacheMissType miss_type) : mID(id), mType(miss_type){}
- BOOL mReleaseNotesRequested;
+ U32 mID; //local object id
+ LLViewerRegion::eCacheMissType mType; //cache miss type
+
+ typedef std::list<CacheMissItem> cache_miss_list_t;
+ };
+ CacheMissItem::cache_miss_list_t mCacheMissList;
+ caps_received_signal_t mCapabilitiesReceivedSignal;
LLSD mSimulatorFeatures;
// the materials capability throttle
diff --git a/indra/newview/llviewershadermgr.cpp b/indra/newview/llviewershadermgr.cpp
index e88b22b461..9d2a4a50e1 100755
--- a/indra/newview/llviewershadermgr.cpp
+++ b/indra/newview/llviewershadermgr.cpp
@@ -52,6 +52,7 @@ static LLStaticHashedString sTexture0("texture0");
static LLStaticHashedString sTexture1("texture1");
static LLStaticHashedString sTex0("tex0");
static LLStaticHashedString sTex1("tex1");
+static LLStaticHashedString sDitherTex("dither_tex");
static LLStaticHashedString sGlowMap("glowMap");
static LLStaticHashedString sScreenMap("screenMap");
@@ -81,6 +82,8 @@ LLGLSLShader gGlowCombineProgram;
LLGLSLShader gSplatTextureRectProgram;
LLGLSLShader gGlowCombineFXAAProgram;
LLGLSLShader gTwoTextureAddProgram;
+LLGLSLShader gTwoTextureCompareProgram;
+LLGLSLShader gOneTextureFilterProgram;
LLGLSLShader gOneTextureNoColorProgram;
LLGLSLShader gDebugProgram;
LLGLSLShader gClipProgram;
@@ -437,7 +440,7 @@ void LLViewerShaderMgr::setShaders()
// Shaders
LL_INFOS("ShaderLoading") << "\n~~~~~~~~~~~~~~~~~~\n Loading Shaders:\n~~~~~~~~~~~~~~~~~~" << LL_ENDL;
- LL_INFOS("ShaderLoading") << llformat("Using GLSL %d.%d", gGLManager.mGLSLVersionMajor, gGLManager.mGLSLVersionMinor) << llendl;
+ LL_INFOS("ShaderLoading") << llformat("Using GLSL %d.%d", gGLManager.mGLSLVersionMajor, gGLManager.mGLSLVersionMinor) << LL_ENDL;
for (S32 i = 0; i < SHADER_COUNT; i++)
{
@@ -693,6 +696,8 @@ void LLViewerShaderMgr::unloadShaders()
gSplatTextureRectProgram.unload();
gGlowCombineFXAAProgram.unload();
gTwoTextureAddProgram.unload();
+ gTwoTextureCompareProgram.unload();
+ gOneTextureFilterProgram.unload();
gOneTextureNoColorProgram.unload();
gSolidColorProgram.unload();
@@ -854,7 +859,7 @@ BOOL LLViewerShaderMgr::loadBasicShaders()
shaders.push_back( make_pair( "objects/indexedTextureV.glsl", 1 ) );
}
shaders.push_back( make_pair( "objects/nonindexedTextureV.glsl", 1 ) );
-
+
boost::unordered_map<std::string, std::string> attribs;
// We no longer have to bind the shaders to global glhandles, they are automatically added to a map now.
@@ -909,7 +914,7 @@ BOOL LLViewerShaderMgr::loadBasicShaders()
index_channels.push_back(ch); shaders.push_back( make_pair( "lighting/lightFullbrightShinyF.glsl", mVertexShaderLevel[SHADER_LIGHTING] ) );
index_channels.push_back(ch); shaders.push_back( make_pair( "lighting/lightShinyWaterF.glsl", mVertexShaderLevel[SHADER_LIGHTING] ) );
index_channels.push_back(ch); shaders.push_back( make_pair( "lighting/lightFullbrightShinyWaterF.glsl", mVertexShaderLevel[SHADER_LIGHTING] ) );
-
+
for (U32 i = 0; i < shaders.size(); i++)
{
// Note usage of GL_FRAGMENT_SHADER_ARB
@@ -1264,7 +1269,7 @@ BOOL LLViewerShaderMgr::loadShadersDeferred()
gDeferredBumpProgram.mShaderLevel = mVertexShaderLevel[SHADER_DEFERRED];
success = gDeferredBumpProgram.createShader(NULL, NULL);
}
-
+
gDeferredMaterialProgram[1].mFeatures.hasLighting = false;
gDeferredMaterialProgram[5].mFeatures.hasLighting = false;
gDeferredMaterialProgram[9].mFeatures.hasLighting = false;
@@ -1869,7 +1874,7 @@ BOOL LLViewerShaderMgr::loadShadersDeferred()
gDeferredAvatarAlphaProgram.mFeatures.calculatesLighting = true;
gDeferredAvatarAlphaProgram.mFeatures.hasLighting = true;
}
-
+
if (success)
{
gDeferredPostGammaCorrectProgram.mName = "Deferred Gamma Correction Post Process";
@@ -3110,6 +3115,40 @@ BOOL LLViewerShaderMgr::loadShadersInterface()
}
}
+#ifdef LL_WINDOWS
+ if (success)
+ {
+ gTwoTextureCompareProgram.mName = "Two Texture Compare Shader";
+ gTwoTextureCompareProgram.mShaderFiles.clear();
+ gTwoTextureCompareProgram.mShaderFiles.push_back(make_pair("interface/twotexturecompareV.glsl", GL_VERTEX_SHADER_ARB));
+ gTwoTextureCompareProgram.mShaderFiles.push_back(make_pair("interface/twotexturecompareF.glsl", GL_FRAGMENT_SHADER_ARB));
+ gTwoTextureCompareProgram.mShaderLevel = mVertexShaderLevel[SHADER_INTERFACE];
+ success = gTwoTextureCompareProgram.createShader(NULL, NULL);
+ if (success)
+ {
+ gTwoTextureCompareProgram.bind();
+ gTwoTextureCompareProgram.uniform1i(sTex0, 0);
+ gTwoTextureCompareProgram.uniform1i(sTex1, 1);
+ gTwoTextureCompareProgram.uniform1i(sDitherTex, 2);
+ }
+ }
+
+ if (success)
+ {
+ gOneTextureFilterProgram.mName = "One Texture Filter Shader";
+ gOneTextureFilterProgram.mShaderFiles.clear();
+ gOneTextureFilterProgram.mShaderFiles.push_back(make_pair("interface/onetexturefilterV.glsl", GL_VERTEX_SHADER_ARB));
+ gOneTextureFilterProgram.mShaderFiles.push_back(make_pair("interface/onetexturefilterF.glsl", GL_FRAGMENT_SHADER_ARB));
+ gOneTextureFilterProgram.mShaderLevel = mVertexShaderLevel[SHADER_INTERFACE];
+ success = gOneTextureFilterProgram.createShader(NULL, NULL);
+ if (success)
+ {
+ gOneTextureFilterProgram.bind();
+ gOneTextureFilterProgram.uniform1i(sTex0, 0);
+ }
+ }
+#endif
+
if (success)
{
gOneTextureNoColorProgram.mName = "One Texture No Color Shader";
diff --git a/indra/newview/llviewershadermgr.h b/indra/newview/llviewershadermgr.h
index 53569ca7ab..42147fdd29 100755
--- a/indra/newview/llviewershadermgr.h
+++ b/indra/newview/llviewershadermgr.h
@@ -187,6 +187,10 @@ extern LLGLSLShader gBenchmarkProgram;
//output tex0[tc0] + tex1[tc1]
extern LLGLSLShader gTwoTextureAddProgram;
+//output tex0[tc0] - tex1[tc1]
+extern LLGLSLShader gTwoTextureCompareProgram;
+//discard some fragments based on user-set color tolerance
+extern LLGLSLShader gOneTextureFilterProgram;
extern LLGLSLShader gOneTextureNoColorProgram;
diff --git a/indra/newview/llviewerstats.cpp b/indra/newview/llviewerstats.cpp
index 35bba4184e..d5ae2d1030 100755
--- a/indra/newview/llviewerstats.cpp
+++ b/indra/newview/llviewerstats.cpp
@@ -61,363 +61,251 @@
#include "llviewernetwork.h"
#include "llmeshrepository.h" //for LLMeshRepository::sBytesReceived
-
-class StatAttributes
+namespace LLStatViewer
{
-public:
- StatAttributes(const char* name,
- const BOOL enabled,
- const BOOL is_timer)
- : mName(name),
- mEnabled(enabled),
- mIsTimer(is_timer)
- {
- }
+
+LLTrace::CountStatHandle<> FPS("FPS", "Frames rendered"),
+ PACKETS_IN("Packets In", "Packets received"),
+ PACKETS_LOST("packetsloststat", "Packets lost"),
+ PACKETS_OUT("packetsoutstat", "Packets sent"),
+ TEXTURE_PACKETS("texturepacketsstat", "Texture data packets received"),
+ CHAT_COUNT("chatcount", "Chat messages sent"),
+ IM_COUNT("imcount", "IMs sent"),
+ OBJECT_CREATE("objectcreate", "Number of objects created"),
+ OBJECT_REZ("objectrez", "Object rez count"),
+ LOGIN_TIMEOUTS("logintimeouts", "Number of login attempts that timed out"),
+ LSL_SAVES("lslsaves", "Number of times user has saved a script"),
+ ANIMATION_UPLOADS("animationuploads", "Animations uploaded"),
+ FLY("fly", "Fly count"),
+ TELEPORT("teleport", "Teleport count"),
+ DELETE_OBJECT("deleteobject", "Objects deleted"),
+ SNAPSHOT("snapshot", "Snapshots taken"),
+ UPLOAD_SOUND("uploadsound", "Sounds uploaded"),
+ UPLOAD_TEXTURE("uploadtexture", "Textures uploaded"),
+ EDIT_TEXTURE("edittexture", "Changes to textures on objects"),
+ KILLED("killed", "Number of times killed"),
+ FRAMETIME_DOUBLED("frametimedoubled", "Ratio of frames 2x longer than previous"),
+ TEX_BAKES("texbakes", "Number of times avatar textures have been baked"),
+ TEX_REBAKES("texrebakes", "Number of times avatar textures have been forced to rebake"),
+ NUM_NEW_OBJECTS("numnewobjectsstat", "Number of objects in scene that were not previously in cache");
+
+LLTrace::CountStatHandle<LLUnit<F64, LLUnits::Kilotriangles> >
+ TRIANGLES_DRAWN("trianglesdrawnstat");
+
+LLTrace::EventStatHandle<LLUnit<F64, LLUnits::Kilotriangles> >
+ TRIANGLES_DRAWN_PER_FRAME("trianglesdrawnperframestat");
+
+LLTrace::CountStatHandle<F64Kilobytes >
+ ACTIVE_MESSAGE_DATA_RECEIVED("activemessagedatareceived", "Message system data received on all active regions"),
+ LAYERS_NETWORK_DATA_RECEIVED("layersdatareceived", "Network data received for layer data (terrain)"),
+ OBJECT_NETWORK_DATA_RECEIVED("objectdatareceived", "Network data received for objects"),
+ ASSET_UDP_DATA_RECEIVED("assetudpdatareceived", "Network data received for assets (animations, sounds) over UDP message system"),
+ TEXTURE_NETWORK_DATA_RECEIVED("texturedatareceived", "Network data received for textures"),
+ MESSAGE_SYSTEM_DATA_IN("messagedatain", "Incoming message system network data"),
+ MESSAGE_SYSTEM_DATA_OUT("messagedataout", "Outgoing message system network data");
+
+LLTrace::CountStatHandle<F64Seconds >
+ SIM_20_FPS_TIME("sim20fpstime", "Seconds with sim FPS below 20"),
+ SIM_PHYSICS_20_FPS_TIME("simphysics20fpstime", "Seconds with physics FPS below 20"),
+ LOSS_5_PERCENT_TIME("loss5percenttime", "Seconds with packet loss > 5%");
+
+SimMeasurement<> SIM_TIME_DILATION("simtimedilation", "Simulator time scale", LL_SIM_STAT_TIME_DILATION),
+ SIM_FPS("simfps", "Simulator framerate", LL_SIM_STAT_FPS),
+ SIM_PHYSICS_FPS("simphysicsfps", "Simulator physics framerate", LL_SIM_STAT_PHYSFPS),
+ SIM_AGENT_UPS("simagentups", "", LL_SIM_STAT_AGENTUPS),
+ SIM_SCRIPT_EPS("simscripteps", "", LL_SIM_STAT_SCRIPT_EPS),
+ SIM_SKIPPED_SILHOUETTE("simsimskippedsilhouettesteps", "", LL_SIM_STAT_SKIPPEDAISILSTEPS_PS),
+ SIM_MAIN_AGENTS("simmainagents", "Number of avatars in current region", LL_SIM_STAT_NUMAGENTMAIN),
+ SIM_CHILD_AGENTS("simchildagents", "Number of avatars in neighboring regions", LL_SIM_STAT_NUMAGENTCHILD),
+ SIM_OBJECTS("simobjects", "", LL_SIM_STAT_NUMTASKS),
+ SIM_ACTIVE_OBJECTS("simactiveobjects", "Number of scripted and/or mocing objects", LL_SIM_STAT_NUMTASKSACTIVE),
+ SIM_ACTIVE_SCRIPTS("simactivescripts", "Number of scripted objects", LL_SIM_STAT_NUMSCRIPTSACTIVE),
+ SIM_IN_PACKETS_PER_SEC("siminpps", "", LL_SIM_STAT_INPPS),
+ SIM_OUT_PACKETS_PER_SEC("simoutpps", "", LL_SIM_STAT_OUTPPS),
+ SIM_PENDING_DOWNLOADS("simpendingdownloads", "", LL_SIM_STAT_PENDING_DOWNLOADS),
+ SIM_PENDING_UPLOADS("simpendinguploads", "", LL_SIM_STAT_PENDING_UPLOADS),
+ SIM_PENDING_LOCAL_UPLOADS("simpendinglocaluploads", "", LL_SIM_STAT_PENDING_LOCAL_UPLOADS),
+ SIM_PHYSICS_PINNED_TASKS("physicspinnedtasks", "", LL_SIM_STAT_PHYSICS_PINNED_TASKS),
+ SIM_PHYSICS_LOD_TASKS("physicslodtasks", "", LL_SIM_STAT_PHYSICS_LOD_TASKS);
+
+SimMeasurement<LLUnit<F64, LLUnits::Percent> >
+ SIM_PERCENTAGE_SCRIPTS_RUN("simpctscriptsrun", "", LL_SIM_STAT_PCTSCRIPTSRUN),
+ SIM_SKIPPED_CHARACTERS_PERCENTAGE("simsimpctsteppedcharacters", "", LL_SIM_STAT_PCTSTEPPEDCHARACTERS);
+
+LLTrace::SampleStatHandle<> FPS_SAMPLE("fpssample"),
+ NUM_IMAGES("numimagesstat"),
+ NUM_RAW_IMAGES("numrawimagesstat"),
+ NUM_OBJECTS("numobjectsstat"),
+ NUM_ACTIVE_OBJECTS("numactiveobjectsstat"),
+ ENABLE_VBO("enablevbo", "Vertex Buffers Enabled"),
+ LIGHTING_DETAIL("lightingdetail", "Lighting Detail"),
+ VISIBLE_AVATARS("visibleavatars", "Visible Avatars"),
+ SHADER_OBJECTS("shaderobjects", "Object Shaders"),
+ DRAW_DISTANCE("drawdistance", "Draw Distance"),
+ PENDING_VFS_OPERATIONS("vfspendingoperations"),
+ WINDOW_WIDTH("windowwidth", "Window width"),
+ WINDOW_HEIGHT("windowheight", "Window height");
+
+LLTrace::SampleStatHandle<LLUnit<F32, LLUnits::Percent> >
+ PACKETS_LOST_PERCENT("packetslostpercentstat");
+
+static LLTrace::SampleStatHandle<bool>
+ CHAT_BUBBLES("chatbubbles", "Chat Bubbles Enabled");
+
+LLTrace::SampleStatHandle<F64Megabytes > GL_TEX_MEM("gltexmemstat"),
+ GL_BOUND_MEM("glboundmemstat"),
+ RAW_MEM("rawmemstat"),
+ FORMATTED_MEM("formattedmemstat");
+LLTrace::SampleStatHandle<F64Kilobytes > DELTA_BANDWIDTH("deltabandwidth", "Increase/Decrease in bandwidth based on packet loss"),
+ MAX_BANDWIDTH("maxbandwidth", "Max bandwidth setting");
+
- std::string mName;
- BOOL mEnabled;
- BOOL mIsTimer;
-};
+SimMeasurement<F64Milliseconds > SIM_FRAME_TIME("simframemsec", "", LL_SIM_STAT_FRAMEMS),
+ SIM_NET_TIME("simnetmsec", "", LL_SIM_STAT_NETMS),
+ SIM_OTHER_TIME("simsimothermsec", "", LL_SIM_STAT_SIMOTHERMS),
+ SIM_PHYSICS_TIME("simsimphysicsmsec", "", LL_SIM_STAT_SIMPHYSICSMS),
+ SIM_PHYSICS_STEP_TIME("simsimphysicsstepmsec", "", LL_SIM_STAT_SIMPHYSICSSTEPMS),
+ SIM_PHYSICS_SHAPE_UPDATE_TIME("simsimphysicsshapeupdatemsec", "", LL_SIM_STAT_SIMPHYSICSSHAPEMS),
+ SIM_PHYSICS_OTHER_TIME("simsimphysicsothermsec", "", LL_SIM_STAT_SIMPHYSICSOTHERMS),
+ SIM_AI_TIME("simsimaistepmsec", "", LL_SIM_STAT_SIMAISTEPTIMEMS),
+ SIM_AGENTS_TIME("simagentmsec", "", LL_SIM_STAT_AGENTMS),
+ SIM_IMAGES_TIME("simimagesmsec", "", LL_SIM_STAT_IMAGESMS),
+ SIM_SCRIPTS_TIME("simscriptmsec", "", LL_SIM_STAT_SCRIPTMS),
+ SIM_SPARE_TIME("simsparemsec", "", LL_SIM_STAT_SIMSPARETIME),
+ SIM_SLEEP_TIME("simsleepmsec", "", LL_SIM_STAT_SIMSLEEPTIME),
+ SIM_PUMP_IO_TIME("simpumpiomsec", "", LL_SIM_STAT_IOPUMPTIME);
+
+SimMeasurement<F64Kilobytes > SIM_UNACKED_BYTES("simtotalunackedbytes", "", LL_SIM_STAT_TOTAL_UNACKED_BYTES);
+SimMeasurement<F64Megabytes > SIM_PHYSICS_MEM("physicsmemoryallocated", "", LL_SIM_STAT_SIMPHYSICSMEMORY);
-const StatAttributes STAT_INFO[LLViewerStats::ST_COUNT] =
-{
- // ST_VERSION
- StatAttributes("Version", TRUE, FALSE),
- // ST_AVATAR_EDIT_SECONDS
- StatAttributes("Seconds in Edit Appearence", FALSE, TRUE),
- // ST_TOOLBOX_SECONDS
- StatAttributes("Seconds using Toolbox", FALSE, TRUE),
- // ST_CHAT_COUNT
- StatAttributes("Chat messages sent", FALSE, FALSE),
- // ST_IM_COUNT
- StatAttributes("IMs sent", FALSE, FALSE),
- // ST_FULLSCREEN_BOOL
- StatAttributes("Fullscreen mode", FALSE, FALSE),
- // ST_RELEASE_COUNT
- StatAttributes("Object release count", FALSE, FALSE),
- // ST_CREATE_COUNT
- StatAttributes("Object create count", FALSE, FALSE),
- // ST_REZ_COUNT
- StatAttributes("Object rez count", FALSE, FALSE),
- // ST_FPS_10_SECONDS
- StatAttributes("Seconds below 10 FPS", FALSE, TRUE),
- // ST_FPS_2_SECONDS
- StatAttributes("Seconds below 2 FPS", FALSE, TRUE),
- // ST_MOUSELOOK_SECONDS
- StatAttributes("Seconds in Mouselook", FALSE, TRUE),
- // ST_FLY_COUNT
- StatAttributes("Fly count", FALSE, FALSE),
- // ST_TELEPORT_COUNT
- StatAttributes("Teleport count", FALSE, FALSE),
- // ST_OBJECT_DELETE_COUNT
- StatAttributes("Objects deleted", FALSE, FALSE),
- // ST_SNAPSHOT_COUNT
- StatAttributes("Snapshots taken", FALSE, FALSE),
- // ST_UPLOAD_SOUND_COUNT
- StatAttributes("Sounds uploaded", FALSE, FALSE),
- // ST_UPLOAD_TEXTURE_COUNT
- StatAttributes("Textures uploaded", FALSE, FALSE),
- // ST_EDIT_TEXTURE_COUNT
- StatAttributes("Changes to textures on objects", FALSE, FALSE),
- // ST_KILLED_COUNT
- StatAttributes("Number of times killed", FALSE, FALSE),
- // ST_FRAMETIME_JITTER
- StatAttributes("Average delta between sucessive frame times", FALSE, FALSE),
- // ST_FRAMETIME_SLEW
- StatAttributes("Average delta between frame time and mean", FALSE, FALSE),
- // ST_INVENTORY_TOO_LONG
- StatAttributes("Inventory took too long to load", FALSE, FALSE),
- // ST_WEARABLES_TOO_LONG
- StatAttributes("Wearables took too long to load", FALSE, FALSE),
- // ST_LOGIN_SECONDS
- StatAttributes("Time between LoginRequest and LoginReply", FALSE, FALSE),
- // ST_LOGIN_TIMEOUT_COUNT
- StatAttributes("Number of login attempts that timed out", FALSE, FALSE),
- // ST_HAS_BAD_TIMER
- StatAttributes("Known bad timer if != 0.0", FALSE, FALSE),
- // ST_DOWNLOAD_FAILED
- StatAttributes("Number of times LLAssetStorage::getAssetData() has failed", FALSE, FALSE),
- // ST_LSL_SAVE_COUNT
- StatAttributes("Number of times user has saved a script", FALSE, FALSE),
- // ST_UPLOAD_ANIM_COUNT
- StatAttributes("Animations uploaded", FALSE, FALSE),
- // ST_FPS_8_SECONDS
- StatAttributes("Seconds below 8 FPS", FALSE, TRUE),
- // ST_SIM_FPS_20_SECONDS
- StatAttributes("Seconds with sim FPS below 20", FALSE, TRUE),
- // ST_PHYS_FPS_20_SECONDS
- StatAttributes("Seconds with physics FPS below 20", FALSE, TRUE),
- // ST_LOSS_05_SECONDS
- StatAttributes("Seconds with packet loss > 5%", FALSE, TRUE),
- // ST_FPS_DROP_50_RATIO
- StatAttributes("Ratio of frames 2x longer than previous", FALSE, FALSE),
- // ST_ENABLE_VBO
- StatAttributes("Vertex Buffers Enabled", TRUE, FALSE),
- // ST_DELTA_BANDWIDTH
- StatAttributes("Increase/Decrease in bandwidth based on packet loss", FALSE, FALSE),
- // ST_MAX_BANDWIDTH
- StatAttributes("Max bandwidth setting", FALSE, FALSE),
- // ST_LIGHTING_DETAIL
- StatAttributes("Lighting Detail", FALSE, FALSE),
- // ST_VISIBLE_AVATARS
- StatAttributes("Visible Avatars", FALSE, FALSE),
- // ST_SHADER_OJECTS
- StatAttributes("Object Shaders", FALSE, FALSE),
- // ST_SHADER_ENVIRONMENT
- StatAttributes("Environment Shaders", FALSE, FALSE),
- // ST_VISIBLE_DRAW_DIST
- StatAttributes("Draw Distance", FALSE, FALSE),
- // ST_VISIBLE_CHAT_BUBBLES
- StatAttributes("Chat Bubbles Enabled", FALSE, FALSE),
- // ST_SHADER_AVATAR
- StatAttributes("Avatar Shaders", FALSE, FALSE),
- // ST_FRAME_SECS
- StatAttributes("FRAME_SECS", FALSE, FALSE),
- // ST_UPDATE_SECS
- StatAttributes("UPDATE_SECS", FALSE, FALSE),
- // ST_NETWORK_SECS
- StatAttributes("NETWORK_SECS", FALSE, FALSE),
- // ST_IMAGE_SECS
- StatAttributes("IMAGE_SECS", FALSE, FALSE),
- // ST_REBUILD_SECS
- StatAttributes("REBUILD_SECS", FALSE, FALSE),
- // ST_RENDER_SECS
- StatAttributes("RENDER_SECS", FALSE, FALSE),
- // ST_CROSSING_AVG
- StatAttributes("CROSSING_AVG", FALSE, FALSE),
- // ST_CROSSING_MAX
- StatAttributes("CROSSING_MAX", FALSE, FALSE),
- // ST_LIBXUL_WIDGET_USED
- StatAttributes("LibXUL Widget used", FALSE, FALSE), // Unused
- // ST_WINDOW_WIDTH
- StatAttributes("Window width", FALSE, FALSE),
- // ST_WINDOW_HEIGHT
- StatAttributes("Window height", FALSE, FALSE),
- // ST_TEX_BAKES
- StatAttributes("Texture Bakes", FALSE, FALSE),
- // ST_TEX_REBAKES
- StatAttributes("Texture Rebakes", FALSE, FALSE)
+LLTrace::SampleStatHandle<F64Milliseconds > FRAMETIME_JITTER("frametimejitter", "Average delta between successive frame times"),
+ FRAMETIME_SLEW("frametimeslew", "Average delta between frame time and mean"),
+ SIM_PING("simpingstat");
-};
+LLTrace::EventStatHandle<LLUnit<F64, LLUnits::Meters> > AGENT_POSITION_SNAP("agentpositionsnap", "agent position corrections");
-LLViewerStats::LLViewerStats() :
- mKBitStat("kbitstat"),
- mLayersKBitStat("layerskbitstat"),
- mObjectKBitStat("objectkbitstat"),
- mAssetKBitStat("assetkbitstat"),
- mTextureKBitStat("texturekbitstat"),
- mVFSPendingOperations("vfspendingoperations"),
- mObjectsDrawnStat("objectsdrawnstat"),
- mObjectsCulledStat("objectsculledstat"),
- mObjectsTestedStat("objectstestedstat"),
- mObjectsComparedStat("objectscomparedstat"),
- mObjectsOccludedStat("objectsoccludedstat"),
- mFPSStat("fpsstat"),
- mPacketsInStat("packetsinstat"),
- mPacketsLostStat("packetsloststat"),
- mPacketsOutStat("packetsoutstat"),
- mPacketsLostPercentStat("packetslostpercentstat", 64),
- mTexturePacketsStat("texturepacketsstat"),
- mActualInKBitStat("actualinkbitstat"),
- mActualOutKBitStat("actualoutkbitstat"),
- mTrianglesDrawnStat("trianglesdrawnstat"),
- mSimTimeDilation("simtimedilation"),
- mSimFPS("simfps"),
- mSimPhysicsFPS("simphysicsfps"),
- mSimAgentUPS("simagentups"),
- mSimScriptEPS("simscripteps"),
- mSimFrameMsec("simframemsec"),
- mSimNetMsec("simnetmsec"),
- mSimSimOtherMsec("simsimothermsec"),
- mSimSimPhysicsMsec("simsimphysicsmsec"),
- mSimSimPhysicsStepMsec("simsimphysicsstepmsec"),
- mSimSimPhysicsShapeUpdateMsec("simsimphysicsshapeupdatemsec"),
- mSimSimPhysicsOtherMsec("simsimphysicsothermsec"),
- mSimSimAIStepMsec("simsimaistepmsec"),
- mSimSimSkippedSilhouetteSteps("simsimskippedsilhouettesteps"),
- mSimSimPctSteppedCharacters("simsimpctsteppedcharacters"),
- mSimAgentMsec("simagentmsec"),
- mSimImagesMsec("simimagesmsec"),
- mSimScriptMsec("simscriptmsec"),
- mSimSpareMsec("simsparemsec"),
- mSimSleepMsec("simsleepmsec"),
- mSimPumpIOMsec("simpumpiomsec"),
- mSimMainAgents("simmainagents"),
- mSimChildAgents("simchildagents"),
- mSimObjects("simobjects"),
- mSimActiveObjects("simactiveobjects"),
- mSimActiveScripts("simactivescripts"),
- mSimPctScriptsRun("simpctscriptsrun"),
- mSimInPPS("siminpps"),
- mSimOutPPS("simoutpps"),
- mSimPendingDownloads("simpendingdownloads"),
- mSimPendingUploads("simpendinguploads"),
- mSimPendingLocalUploads("simpendinglocaluploads"),
- mSimTotalUnackedBytes("simtotalunackedbytes"),
- mPhysicsPinnedTasks("physicspinnedtasks"),
- mPhysicsLODTasks("physicslodtasks"),
- mPhysicsMemoryAllocated("physicsmemoryallocated"),
- mSimPingStat("simpingstat"),
- mNumImagesStat("numimagesstat", 32, TRUE),
- mNumRawImagesStat("numrawimagesstat", 32, TRUE),
- mGLTexMemStat("gltexmemstat", 32, TRUE),
- mGLBoundMemStat("glboundmemstat", 32, TRUE),
- mRawMemStat("rawmemstat", 32, TRUE),
- mFormattedMemStat("formattedmemstat", 32, TRUE),
- mNumObjectsStat("numobjectsstat"),
- mNumActiveObjectsStat("numactiveobjectsstat"),
- mNumNewObjectsStat("numnewobjectsstat"),
- mNumSizeCulledStat("numsizeculledstat"),
- mNumVisCulledStat("numvisculledstat"),
- mLastTimeDiff(0.0)
-{
- for (S32 i = 0; i < ST_COUNT; i++)
- {
- mStats[i] = 0.0;
- }
+LLTrace::EventStatHandle<> LOADING_WEARABLES_LONG_DELAY("loadingwearableslongdelay", "Wearables took too long to load");
- if (LLTimer::knownBadTimer())
- {
- mStats[ST_HAS_BAD_TIMER] = 1.0;
- }
+LLTrace::EventStatHandle<F64Milliseconds > REGION_CROSSING_TIME("regioncrossingtime", "CROSSING_AVG"),
+ FRAME_STACKTIME("framestacktime", "FRAME_SECS"),
+ UPDATE_STACKTIME("updatestacktime", "UPDATE_SECS"),
+ NETWORK_STACKTIME("networkstacktime", "NETWORK_SECS"),
+ IMAGE_STACKTIME("imagestacktime", "IMAGE_SECS"),
+ REBUILD_STACKTIME("rebuildstacktime", "REBUILD_SECS"),
+ RENDER_STACKTIME("renderstacktime", "RENDER_SECS");
- mAgentPositionSnaps.reset();
-}
+LLTrace::EventStatHandle<F64Seconds > AVATAR_EDIT_TIME("avataredittime", "Seconds in Edit Appearance"),
+ TOOLBOX_TIME("toolboxtime", "Seconds using Toolbox"),
+ MOUSELOOK_TIME("mouselooktime", "Seconds in Mouselook"),
+ FPS_10_TIME("fps10time", "Seconds below 10 FPS"),
+ FPS_8_TIME("fps8time", "Seconds below 8 FPS"),
+ FPS_2_TIME("fps2time", "Seconds below 2 FPS");
-LLViewerStats::~LLViewerStats()
-{
-}
+LLTrace::EventStatHandle<LLUnit<F32, LLUnits::Percent> > OBJECT_CACHE_HIT_RATE("object_cache_hits");
-void LLViewerStats::resetStats()
-{
- LLViewerStats& stats = LLViewerStats::instance();
- stats.mKBitStat.reset();
- stats.mLayersKBitStat.reset();
- stats.mObjectKBitStat.reset();
- stats.mTextureKBitStat.reset();
- stats.mVFSPendingOperations.reset();
- stats.mAssetKBitStat.reset();
- stats.mPacketsInStat.reset();
- stats.mPacketsLostStat.reset();
- stats.mPacketsOutStat.reset();
- stats.mFPSStat.reset();
- stats.mTexturePacketsStat.reset();
- stats.mAgentPositionSnaps.reset();
}
-
-F64 LLViewerStats::getStat(EStatType type) const
+LLViewerStats::LLViewerStats()
+: mLastTimeDiff(0.0)
{
- return mStats[type];
+ getRecording().start();
}
-F64 LLViewerStats::setStat(EStatType type, F64 value)
-{
- mStats[type] = value;
- return mStats[type];
-}
+LLViewerStats::~LLViewerStats()
+{}
-F64 LLViewerStats::incStat(EStatType type, F64 value)
+void LLViewerStats::resetStats()
{
- mStats[type] += value;
- return mStats[type];
+ getRecording().reset();
}
-void LLViewerStats::updateFrameStats(const F64 time_diff)
+void LLViewerStats::updateFrameStats(const F64Seconds time_diff)
{
- if (mPacketsLostPercentStat.getCurrent() > 5.0)
+ if (getRecording().getLastValue(LLStatViewer::PACKETS_LOST_PERCENT) > F32Percent(5.0))
{
- incStat(ST_LOSS_05_SECONDS, time_diff);
+ add(LLStatViewer::LOSS_5_PERCENT_TIME, time_diff);
}
- if (mSimFPS.getCurrent() < 20.f && mSimFPS.getCurrent() > 0.f)
+ F32 sim_fps = getRecording().getLastValue(LLStatViewer::SIM_FPS);
+ if (0.f < sim_fps && sim_fps < 20.f)
{
- incStat(ST_SIM_FPS_20_SECONDS, time_diff);
+ add(LLStatViewer::SIM_20_FPS_TIME, time_diff);
}
- if (mSimPhysicsFPS.getCurrent() < 20.f && mSimPhysicsFPS.getCurrent() > 0.f)
+ F32 sim_physics_fps = getRecording().getLastValue(LLStatViewer::SIM_PHYSICS_FPS);
+
+ if (0.f < sim_physics_fps && sim_physics_fps < 20.f)
{
- incStat(ST_PHYS_FPS_20_SECONDS, time_diff);
+ add(LLStatViewer::SIM_PHYSICS_20_FPS_TIME, time_diff);
}
- if (time_diff >= 0.5)
+ if (time_diff >= (F64Seconds)0.5)
{
- incStat(ST_FPS_2_SECONDS, time_diff);
+ record(LLStatViewer::FPS_2_TIME, time_diff);
}
- if (time_diff >= 0.125)
+ if (time_diff >= (F64Seconds)0.125)
{
- incStat(ST_FPS_8_SECONDS, time_diff);
+ record(LLStatViewer::FPS_8_TIME, time_diff);
}
- if (time_diff >= 0.1)
+ if (time_diff >= (F64Seconds)0.1)
{
- incStat(ST_FPS_10_SECONDS, time_diff);
+ record(LLStatViewer::FPS_10_TIME, time_diff);
}
- if (gFrameCount && mLastTimeDiff > 0.0)
+ if (gFrameCount && mLastTimeDiff > (F64Seconds)0.0)
{
// new "stutter" meter
- setStat(ST_FPS_DROP_50_RATIO,
- (getStat(ST_FPS_DROP_50_RATIO) * (F64)(gFrameCount - 1) +
- (time_diff >= 2.0 * mLastTimeDiff ? 1.0 : 0.0)) / gFrameCount);
-
+ add(LLStatViewer::FRAMETIME_DOUBLED, time_diff >= 2.0 * mLastTimeDiff ? 1 : 0);
// old stats that were never really used
- setStat(ST_FRAMETIME_JITTER,
- (getStat(ST_FRAMETIME_JITTER) * (gFrameCount - 1) +
- fabs(mLastTimeDiff - time_diff) / mLastTimeDiff) / gFrameCount);
+ sample(LLStatViewer::FRAMETIME_JITTER, F64Milliseconds (mLastTimeDiff - time_diff));
- F32 average_frametime = gRenderStartTime.getElapsedTimeF32() / (F32)gFrameCount;
- setStat(ST_FRAMETIME_SLEW,
- (getStat(ST_FRAMETIME_SLEW) * (gFrameCount - 1) +
- fabs(average_frametime - time_diff) / average_frametime) / gFrameCount);
+ F32Seconds average_frametime = gRenderStartTime.getElapsedTimeF32() / (F32)gFrameCount;
+ sample(LLStatViewer::FRAMETIME_SLEW, F64Milliseconds (average_frametime - time_diff));
F32 max_bandwidth = gViewerThrottle.getMaxBandwidth();
F32 delta_bandwidth = gViewerThrottle.getCurrentBandwidth() - max_bandwidth;
- setStat(ST_DELTA_BANDWIDTH, delta_bandwidth / 1024.f);
-
- setStat(ST_MAX_BANDWIDTH, max_bandwidth / 1024.f);
-
+ sample(LLStatViewer::DELTA_BANDWIDTH, F64Bits(delta_bandwidth));
+ sample(LLStatViewer::MAX_BANDWIDTH, F64Bits(max_bandwidth));
}
mLastTimeDiff = time_diff;
-
}
-void LLViewerStats::addToMessage(LLSD &body) const
+void LLViewerStats::addToMessage(LLSD &body)
{
LLSD &misc = body["misc"];
- for (S32 i = 0; i < ST_COUNT; i++)
- {
- if (STAT_INFO[i].mEnabled)
- {
- // TODO: send timer value so dataserver can normalize
- misc[STAT_INFO[i].mName] = mStats[i];
- llinfos << "STAT: " << STAT_INFO[i].mName << ": " << mStats[i]
- << llendl;
- }
- }
+ misc["Version"] = TRUE;
+ //TODO RN: get last value, not mean
+ misc["Vertex Buffers Enabled"] = getRecording().getMean(LLStatViewer::ENABLE_VBO);
- body["AgentPositionSnaps"] = mAgentPositionSnaps.getData();
- llinfos << "STAT: AgentPositionSnaps: Mean = " << mAgentPositionSnaps.getMean() << "; StdDev = " << mAgentPositionSnaps.getStdDev()
- << "; Count = " << mAgentPositionSnaps.getCount() << llendl;
+ body["AgentPositionSnaps"] = getRecording().getSum(LLStatViewer::AGENT_POSITION_SNAP).value(); //mAgentPositionSnaps.asLLSD();
+ LL_INFOS() << "STAT: AgentPositionSnaps: Mean = " << getRecording().getMean(LLStatViewer::AGENT_POSITION_SNAP).value() << "; StdDev = " << getRecording().getStandardDeviation(LLStatViewer::AGENT_POSITION_SNAP).value()
+ << "; Count = " << getRecording().getSampleCount(LLStatViewer::AGENT_POSITION_SNAP) << LL_ENDL;
}
// *NOTE:Mani The following methods used to exist in viewer.cpp
// Moving them here, but not merging them into LLViewerStats yet.
-U32 gTotalLandIn = 0, gTotalLandOut = 0;
-U32 gTotalWaterIn = 0, gTotalWaterOut = 0;
-
-F32 gAveLandCompression = 0.f, gAveWaterCompression = 0.f;
-F32 gBestLandCompression = 1.f, gBestWaterCompression = 1.f;
-F32 gWorstLandCompression = 0.f, gWorstWaterCompression = 0.f;
-
-
-
-U32 gTotalWorldBytes = 0, gTotalObjectBytes = 0, gTotalTextureBytes = 0, gSimPingCount = 0;
-U32 gObjectBits = 0;
-F32 gAvgSimPing = 0.f;
-U32 gTotalTextureBytesPerBoostLevel[LLViewerTexture::MAX_GL_IMAGE_CATEGORY] = {0};
+U32 gTotalLandIn = 0,
+ gTotalLandOut = 0,
+ gTotalWaterIn = 0,
+ gTotalWaterOut = 0;
+
+F32 gAveLandCompression = 0.f,
+ gAveWaterCompression = 0.f,
+ gBestLandCompression = 1.f,
+ gBestWaterCompression = 1.f,
+ gWorstLandCompression = 0.f,
+ gWorstWaterCompression = 0.f;
+
+U32Bytes gTotalWorldData,
+ gTotalObjectData,
+ gTotalTextureData;
+U32 gSimPingCount = 0;
+U32Bits gObjectData;
+F32Milliseconds gAvgSimPing(0.f);
+U32Bytes gTotalTextureBytesPerBoostLevel[LLViewerTexture::MAX_GL_IMAGE_CATEGORY] = {U32Bytes(0)};
extern U32 gVisCompared;
extern U32 gVisTested;
@@ -426,59 +314,70 @@ LLFrameTimer gTextureTimer;
void update_statistics()
{
- gTotalWorldBytes += gVLManager.getTotalBytes();
- gTotalObjectBytes += gObjectBits / 8;
-
- LLViewerStats& stats = LLViewerStats::instance();
+ gTotalWorldData += gVLManager.getTotalBytes();
+ gTotalObjectData += gObjectData;
// make sure we have a valid time delta for this frame
if (gFrameIntervalSeconds > 0.f)
{
if (gAgentCamera.getCameraMode() == CAMERA_MODE_MOUSELOOK)
{
- LLViewerStats::getInstance()->incStat(LLViewerStats::ST_MOUSELOOK_SECONDS, gFrameIntervalSeconds);
+ record(LLStatViewer::MOUSELOOK_TIME, gFrameIntervalSeconds);
}
else if (gAgentCamera.getCameraMode() == CAMERA_MODE_CUSTOMIZE_AVATAR)
{
- LLViewerStats::getInstance()->incStat(LLViewerStats::ST_AVATAR_EDIT_SECONDS, gFrameIntervalSeconds);
+ record(LLStatViewer::AVATAR_EDIT_TIME, gFrameIntervalSeconds);
}
else if (LLFloaterReg::instanceVisible("build"))
{
- LLViewerStats::getInstance()->incStat(LLViewerStats::ST_TOOLBOX_SECONDS, gFrameIntervalSeconds);
+ record(LLStatViewer::TOOLBOX_TIME, gFrameIntervalSeconds);
}
}
- stats.setStat(LLViewerStats::ST_ENABLE_VBO, (F64)gSavedSettings.getBOOL("RenderVBOEnable"));
- stats.setStat(LLViewerStats::ST_LIGHTING_DETAIL, (F64)gPipeline.getLightingDetail());
- stats.setStat(LLViewerStats::ST_DRAW_DIST, (F64)gSavedSettings.getF32("RenderFarClip"));
- stats.setStat(LLViewerStats::ST_CHAT_BUBBLES, (F64)gSavedSettings.getBOOL("UseChatBubbles"));
-
- stats.setStat(LLViewerStats::ST_FRAME_SECS, gDebugView->mFastTimerView->getTime("Frame"));
- F64 idle_secs = gDebugView->mFastTimerView->getTime("Idle");
- F64 network_secs = gDebugView->mFastTimerView->getTime("Network");
- stats.setStat(LLViewerStats::ST_UPDATE_SECS, idle_secs - network_secs);
- stats.setStat(LLViewerStats::ST_NETWORK_SECS, network_secs);
- stats.setStat(LLViewerStats::ST_IMAGE_SECS, gDebugView->mFastTimerView->getTime("Update Images"));
- stats.setStat(LLViewerStats::ST_REBUILD_SECS, gDebugView->mFastTimerView->getTime("Sort Draw State"));
- stats.setStat(LLViewerStats::ST_RENDER_SECS, gDebugView->mFastTimerView->getTime("Geometry"));
+
+ LLTrace::Recording& last_frame_recording = LLTrace::get_frame_recording().getLastRecording();
+
+ record(LLStatViewer::TRIANGLES_DRAWN_PER_FRAME, last_frame_recording.getSum(LLStatViewer::TRIANGLES_DRAWN));
+
+ sample(LLStatViewer::ENABLE_VBO, (F64)gSavedSettings.getBOOL("RenderVBOEnable"));
+ sample(LLStatViewer::LIGHTING_DETAIL, (F64)gPipeline.getLightingDetail());
+ sample(LLStatViewer::DRAW_DISTANCE, (F64)gSavedSettings.getF32("RenderFarClip"));
+ sample(LLStatViewer::CHAT_BUBBLES, gSavedSettings.getBOOL("UseChatBubbles"));
+
+ typedef LLTrace::StatType<LLTrace::TimeBlockAccumulator>::instance_tracker_t stat_type_t;
+
+ F64Seconds idle_secs = last_frame_recording.getSum(*stat_type_t::getInstance("Idle"));
+ F64Seconds network_secs = last_frame_recording.getSum(*stat_type_t::getInstance("Network"));
+
+ record(LLStatViewer::FRAME_STACKTIME, last_frame_recording.getSum(*stat_type_t::getInstance("Frame")));
+ record(LLStatViewer::UPDATE_STACKTIME, idle_secs - network_secs);
+ record(LLStatViewer::NETWORK_STACKTIME, network_secs);
+ record(LLStatViewer::IMAGE_STACKTIME, last_frame_recording.getSum(*stat_type_t::getInstance("Update Images")));
+ record(LLStatViewer::REBUILD_STACKTIME, last_frame_recording.getSum(*stat_type_t::getInstance("Sort Draw State")));
+ record(LLStatViewer::RENDER_STACKTIME, last_frame_recording.getSum(*stat_type_t::getInstance("Render Geometry")));
LLCircuitData *cdp = gMessageSystem->mCircuitInfo.findCircuit(gAgent.getRegion()->getHost());
if (cdp)
{
- stats.mSimPingStat.addValue(cdp->getPingDelay());
- gAvgSimPing = ((gAvgSimPing * (F32)gSimPingCount) + (F32)(cdp->getPingDelay())) / ((F32)gSimPingCount + 1);
+ sample(LLStatViewer::SIM_PING, F64Milliseconds (cdp->getPingDelay()));
+ gAvgSimPing = ((gAvgSimPing * gSimPingCount) + cdp->getPingDelay()) / (gSimPingCount + 1);
gSimPingCount++;
}
else
{
- stats.mSimPingStat.addValue(10000);
+ sample(LLStatViewer::SIM_PING, U32Seconds(10));
+ }
+
+ if (LLViewerStats::instance().getRecording().getSum(LLStatViewer::FPS))
+ {
+ sample(LLStatViewer::FPS_SAMPLE, LLTrace::get_frame_recording().getPeriodMeanPerSec(LLStatViewer::FPS));
}
+ add(LLStatViewer::FPS, 1);
- stats.mFPSStat.addValue(1);
- F32 layer_bits = (F32)(gVLManager.getLandBits() + gVLManager.getWindBits() + gVLManager.getCloudBits());
- stats.mLayersKBitStat.addValue(layer_bits/1024.f);
- stats.mObjectKBitStat.addValue(gObjectBits/1024.f);
- stats.mVFSPendingOperations.addValue(LLVFile::getVFSThread()->getPending());
- stats.mAssetKBitStat.addValue(gTransferManager.getTransferBitsIn(LLTCT_ASSET)/1024.f);
+ F64Bits layer_bits = gVLManager.getLandBits() + gVLManager.getWindBits() + gVLManager.getCloudBits();
+ add(LLStatViewer::LAYERS_NETWORK_DATA_RECEIVED, layer_bits);
+ add(LLStatViewer::OBJECT_NETWORK_DATA_RECEIVED, gObjectData);
+ sample(LLStatViewer::PENDING_VFS_OPERATIONS, LLVFile::getVFSThread()->getPending());
+ add(LLStatViewer::ASSET_UDP_DATA_RECEIVED, F64Bits(gTransferManager.getTransferBitsIn(LLTCT_ASSET)));
gTransferManager.resetTransferBitsIn(LLTCT_ASSET);
if (LLAppViewer::getTextureFetch()->getNumRequests() == 0)
@@ -490,23 +389,13 @@ void update_statistics()
gTextureTimer.unpause();
}
- {
- static F32 visible_avatar_frames = 0.f;
- static F32 avg_visible_avatars = 0;
- F32 visible_avatars = (F32)LLVOAvatar::sNumVisibleAvatars;
- if (visible_avatars > 0.f)
- {
- visible_avatar_frames = 1.f;
- avg_visible_avatars = (avg_visible_avatars * (F32)(visible_avatar_frames - 1.f) + visible_avatars) / visible_avatar_frames;
- }
- stats.setStat(LLViewerStats::ST_VISIBLE_AVATARS, (F64)avg_visible_avatars);
- }
+ sample(LLStatViewer::VISIBLE_AVATARS, LLVOAvatar::sNumVisibleAvatars);
LLWorld::getInstance()->updateNetStats();
LLWorld::getInstance()->requestCacheMisses();
// Reset all of these values.
gVLManager.resetBitCounts();
- gObjectBits = 0;
+ gObjectData = (U32Bytes)0;
// gDecodedBits = 0;
// Only update texture stats periodically so that they are less noisy
@@ -515,11 +404,7 @@ void update_statistics()
static LLFrameTimer texture_stats_timer;
if (texture_stats_timer.getElapsedTimeF32() >= texture_stats_freq)
{
- stats.mTextureKBitStat.addValue(LLViewerTextureList::sTextureBits/1024.f);
- stats.mTexturePacketsStat.addValue(LLViewerTextureList::sTexturePackets);
- gTotalTextureBytes += LLViewerTextureList::sTextureBits / 8;
- LLViewerTextureList::sTextureBits = 0;
- LLViewerTextureList::sTexturePackets = 0;
+ gTotalTextureData = LLViewerStats::instance().getRecording().getSum(LLStatViewer::TEXTURE_NETWORK_DATA_RECEIVED);
texture_stats_timer.reset();
}
}
@@ -532,13 +417,13 @@ public:
void error(U32 statusNum, const std::string& reason)
{
- llinfos << "ViewerStatsResponder::error " << statusNum << " "
- << reason << llendl;
+ LL_INFOS() << "ViewerStatsResponder::error " << statusNum << " "
+ << reason << LL_ENDL;
}
void result(const LLSD& content)
{
- llinfos << "ViewerStatsResponder::result" << llendl;
+ LL_INFOS() << "ViewerStatsResponder::result" << LL_ENDL;
}
};
@@ -568,10 +453,12 @@ void send_stats()
std::string url = gAgent.getRegion()->getCapability("ViewerStats");
if (url.empty()) {
- llwarns << "Could not get ViewerStats capability" << llendl;
+ LL_WARNS() << "Could not get ViewerStats capability" << LL_ENDL;
return;
}
+ LLViewerStats::instance().getRecording().pause();
+
body["session_id"] = gAgentSessionID;
LLSD &agent = body["agent"];
@@ -609,14 +496,14 @@ void send_stats()
gSimFrames = (F32) gFrameCount;
agent["agents_in_view"] = LLVOAvatar::sNumVisibleAvatars;
- agent["ping"] = gAvgSimPing;
+ agent["ping"] = gAvgSimPing.value();
agent["meters_traveled"] = gAgent.getDistanceTraveled();
agent["regions_visited"] = gAgent.getRegionsVisited();
agent["mem_use"] = LLMemory::getCurrentRSS() / 1024.0;
LLSD &system = body["system"];
- system["ram"] = (S32) gSysMemory.getPhysicalMemoryKB();
+ system["ram"] = (S32) gSysMemory.getPhysicalMemoryKB().value();
system["os"] = LLAppViewer::instance()->getOSInfo().getOSStringSimple();
system["cpu"] = gSysCPU.getCPUString();
unsigned char MACAddress[MAC_ADDRESS_BYTES];
@@ -668,9 +555,9 @@ void send_stats()
LLSD &download = body["downloads"];
- download["world_kbytes"] = gTotalWorldBytes / 1024.0;
- download["object_kbytes"] = gTotalObjectBytes / 1024.0;
- download["texture_kbytes"] = gTotalTextureBytes / 1024.0;
+ download["world_kbytes"] = F64Kilobytes(gTotalWorldData).value();
+ download["object_kbytes"] = F64Kilobytes(gTotalObjectData).value();
+ download["texture_kbytes"] = F64Kilobytes(gTotalTextureData).value();
download["mesh_kbytes"] = LLMeshRepository::sBytesReceived/1024.0;
LLSD &in = body["stats"]["net"]["in"];
@@ -711,7 +598,7 @@ void send_stats()
S32 window_height = gViewerWindow->getWindowHeightRaw();
S32 window_size = (window_width * window_height) / 1024;
misc["string_1"] = llformat("%d", window_size);
- misc["string_2"] = llformat("Texture Time: %.2f, Total Time: %.2f", gTextureTimer.getElapsedTimeF32(), gFrameTimeSeconds);
+ misc["string_2"] = llformat("Texture Time: %.2f, Total Time: %.2f", gTextureTimer.getElapsedTimeF32(), gFrameTimeSeconds.value());
// misc["int_1"] = LLSD::Integer(gSavedSettings.getU32("RenderQualityPerformance")); // Steve: 1.21
// misc["int_2"] = LLSD::Integer(gFrameStalls); // Steve: 1.21
@@ -721,8 +608,8 @@ void send_stats()
F32 grey_time = LLVOAvatar::sGreyTime * 1000.f / gFrameTimeSeconds;
misc["int_2"] = LLSD::Integer(grey_time); // Steve: 1.22
- llinfos << "Misc Stats: int_1: " << misc["int_1"] << " int_2: " << misc["int_2"] << llendl;
- llinfos << "Misc Stats: string_1: " << misc["string_1"] << " string_2: " << misc["string_2"] << llendl;
+ LL_INFOS() << "Misc Stats: int_1: " << misc["int_1"] << " int_2: " << misc["int_2"] << LL_ENDL;
+ LL_INFOS() << "Misc Stats: string_1: " << misc["string_1"] << " string_2: " << misc["string_2"] << LL_ENDL;
body["DisplayNamesEnabled"] = gSavedSettings.getBOOL("UseDisplayNames");
body["DisplayNamesShowUsername"] = gSavedSettings.getBOOL("NameTagShowUsernames");
@@ -731,6 +618,8 @@ void send_stats()
LLViewerStats::getInstance()->addToMessage(body);
LLHTTPClient::post(url, body, new ViewerStatsResponder());
+
+ LLViewerStats::instance().getRecording().resume();
}
LLFrameTimer& LLViewerStats::PhaseMap::getPhaseTimer(const std::string& phase_name)
@@ -748,7 +637,7 @@ LLFrameTimer& LLViewerStats::PhaseMap::getPhaseTimer(const std::string& phase_na
void LLViewerStats::PhaseMap::startPhase(const std::string& phase_name)
{
LLFrameTimer& timer = getPhaseTimer(phase_name);
- lldebugs << "startPhase " << phase_name << llendl;
+ LL_DEBUGS() << "startPhase " << phase_name << LL_ENDL;
timer.unpause();
}
@@ -763,19 +652,19 @@ void LLViewerStats::PhaseMap::stopAllPhases()
// Going from started to paused state - record stats.
recordPhaseStat(phase_name,iter->second.getElapsedTimeF32());
}
- lldebugs << "stopPhase (all) " << phase_name << llendl;
+ LL_DEBUGS() << "stopPhase (all) " << phase_name << LL_ENDL;
iter->second.pause();
}
}
void LLViewerStats::PhaseMap::clearPhases()
{
- lldebugs << "clearPhases" << llendl;
+ LL_DEBUGS() << "clearPhases" << LL_ENDL;
mPhaseMap.clear();
}
-LLSD LLViewerStats::PhaseMap::dumpPhases()
+LLSD LLViewerStats::PhaseMap::asLLSD()
{
LLSD result;
for (phase_map_t::iterator iter = mPhaseMap.begin(); iter != mPhaseMap.end(); ++iter)
diff --git a/indra/newview/llviewerstats.h b/indra/newview/llviewerstats.h
index 6b2461be41..0d959ed034 100755
--- a/indra/newview/llviewerstats.h
+++ b/indra/newview/llviewerstats.h
@@ -1,5 +1,5 @@
/**
- * @file llviewerstats.h
+ * @file llviewerim_peningtats.h
* @brief LLViewerStats class header file
*
* $LicenseInfo:firstyear=2002&license=viewerlgpl$
@@ -27,171 +27,236 @@
#ifndef LL_LLVIEWERSTATS_H
#define LL_LLVIEWERSTATS_H
-#include "llstat.h"
#include "lltextureinfo.h"
+#include "lltracerecording.h"
+#include "lltrace.h"
+
+
+enum ESimStatID
+{
+ LL_SIM_STAT_TIME_DILATION = 0,
+ LL_SIM_STAT_FPS = 1,
+ LL_SIM_STAT_PHYSFPS = 2,
+ LL_SIM_STAT_AGENTUPS = 3,
+ LL_SIM_STAT_FRAMEMS = 4,
+ LL_SIM_STAT_NETMS = 5,
+ LL_SIM_STAT_SIMOTHERMS = 6,
+ LL_SIM_STAT_SIMPHYSICSMS = 7,
+ LL_SIM_STAT_AGENTMS = 8,
+ LL_SIM_STAT_IMAGESMS = 9,
+ LL_SIM_STAT_SCRIPTMS = 10,
+ LL_SIM_STAT_NUMTASKS = 11,
+ LL_SIM_STAT_NUMTASKSACTIVE = 12,
+ LL_SIM_STAT_NUMAGENTMAIN = 13,
+ LL_SIM_STAT_NUMAGENTCHILD = 14,
+ LL_SIM_STAT_NUMSCRIPTSACTIVE = 15,
+ LL_SIM_STAT_LSLIPS = 16,
+ LL_SIM_STAT_INPPS = 17,
+ LL_SIM_STAT_OUTPPS = 18,
+ LL_SIM_STAT_PENDING_DOWNLOADS = 19,
+ LL_SIM_STAT_PENDING_UPLOADS = 20,
+ LL_SIM_STAT_VIRTUAL_SIZE_KB = 21,
+ LL_SIM_STAT_RESIDENT_SIZE_KB = 22,
+ LL_SIM_STAT_PENDING_LOCAL_UPLOADS = 23,
+ LL_SIM_STAT_TOTAL_UNACKED_BYTES = 24,
+ LL_SIM_STAT_PHYSICS_PINNED_TASKS = 25,
+ LL_SIM_STAT_PHYSICS_LOD_TASKS = 26,
+ LL_SIM_STAT_SIMPHYSICSSTEPMS = 27,
+ LL_SIM_STAT_SIMPHYSICSSHAPEMS = 28,
+ LL_SIM_STAT_SIMPHYSICSOTHERMS = 29,
+ LL_SIM_STAT_SIMPHYSICSMEMORY = 30,
+ LL_SIM_STAT_SCRIPT_EPS = 31,
+ LL_SIM_STAT_SIMSPARETIME = 32,
+ LL_SIM_STAT_SIMSLEEPTIME = 33,
+ LL_SIM_STAT_IOPUMPTIME = 34,
+ LL_SIM_STAT_PCTSCRIPTSRUN = 35,
+ LL_SIM_STAT_REGION_IDLE = 36, // dataserver only
+ LL_SIM_STAT_REGION_IDLE_POSSIBLE = 37, // dataserver only
+ LL_SIM_STAT_SIMAISTEPTIMEMS = 38,
+ LL_SIM_STAT_SKIPPEDAISILSTEPS_PS = 39,
+ LL_SIM_STAT_PCTSTEPPEDCHARACTERS = 40
+};
+
+namespace LLStatViewer
+{
+
+struct SimMeasurementSampler : public LLInstanceTracker<SimMeasurementSampler, ESimStatID>
+{
+ SimMeasurementSampler(ESimStatID id)
+ : LLInstanceTracker<SimMeasurementSampler, ESimStatID>(id)
+ {}
+ virtual ~SimMeasurementSampler() {}
+
+ virtual void sample(F64 value) = 0;
+};
+
+template<typename T = F64>
+struct SimMeasurement : public LLTrace::SampleStatHandle<T>, public SimMeasurementSampler
+{
+ typedef SimMeasurement<T> self_t;
+
+ SimMeasurement(const char* name, const char* description, ESimStatID stat_id)
+ : LLTrace::SampleStatHandle<T>(name, description),
+ SimMeasurementSampler(stat_id)
+ {}
+
+ using SimMeasurementSampler::getInstance;
+
+ //friend void sample(self_t& measurement, T value)
+ //{
+ // LLTrace::sample(static_cast<LLTrace::SampleStatHandle<T>& >(measurement), value);
+ //}
+
+ /*virtual*/ void sample(F64 value)
+ {
+ LLTrace::sample(static_cast<LLTrace::SampleStatHandle<T>& >(*this), value);
+ //LLStatViewer::sample(*this, value);
+ }
+
+};
+
+extern LLTrace::CountStatHandle<> FPS,
+ PACKETS_IN,
+ PACKETS_LOST,
+ PACKETS_OUT,
+ TEXTURE_PACKETS,
+ CHAT_COUNT,
+ IM_COUNT,
+ OBJECT_CREATE,
+ OBJECT_REZ,
+ LOGIN_TIMEOUTS,
+ LSL_SAVES,
+ ANIMATION_UPLOADS,
+ FLY,
+ TELEPORT,
+ DELETE_OBJECT,
+ SNAPSHOT,
+ UPLOAD_SOUND,
+ UPLOAD_TEXTURE,
+ EDIT_TEXTURE,
+ KILLED,
+ FRAMETIME_DOUBLED,
+ TEX_BAKES,
+ TEX_REBAKES,
+ NUM_NEW_OBJECTS;
+
+extern LLTrace::CountStatHandle<LLUnit<F64, LLUnits::Kilotriangles> > TRIANGLES_DRAWN;
+
+extern LLTrace::CountStatHandle<F64Kilobytes > ACTIVE_MESSAGE_DATA_RECEIVED,
+ LAYERS_NETWORK_DATA_RECEIVED,
+ OBJECT_NETWORK_DATA_RECEIVED,
+ ASSET_UDP_DATA_RECEIVED,
+ TEXTURE_NETWORK_DATA_RECEIVED,
+ MESSAGE_SYSTEM_DATA_IN,
+ MESSAGE_SYSTEM_DATA_OUT;
+
+extern LLTrace::CountStatHandle<F64Seconds > SIM_20_FPS_TIME,
+ SIM_PHYSICS_20_FPS_TIME,
+ LOSS_5_PERCENT_TIME;
+
+extern SimMeasurement<> SIM_TIME_DILATION,
+ SIM_FPS,
+ SIM_PHYSICS_FPS,
+ SIM_AGENT_UPS,
+ SIM_SCRIPT_EPS,
+ SIM_SKIPPED_SILHOUETTE,
+ SIM_MAIN_AGENTS,
+ SIM_CHILD_AGENTS,
+ SIM_OBJECTS,
+ SIM_ACTIVE_OBJECTS,
+ SIM_ACTIVE_SCRIPTS,
+ SIM_IN_PACKETS_PER_SEC,
+ SIM_OUT_PACKETS_PER_SEC,
+ SIM_PENDING_DOWNLOADS,
+ SIM_PENDING_UPLOADS,
+ SIM_PENDING_LOCAL_UPLOADS,
+ SIM_PHYSICS_PINNED_TASKS,
+ SIM_PHYSICS_LOD_TASKS;
+
+extern SimMeasurement<LLUnit<F64, LLUnits::Percent> > SIM_PERCENTAGE_SCRIPTS_RUN,
+ SIM_SKIPPED_CHARACTERS_PERCENTAGE;
+
+extern LLTrace::SampleStatHandle<> FPS_SAMPLE,
+ NUM_IMAGES,
+ NUM_RAW_IMAGES,
+ NUM_OBJECTS,
+ NUM_ACTIVE_OBJECTS,
+ ENABLE_VBO,
+ LIGHTING_DETAIL,
+ VISIBLE_AVATARS,
+ SHADER_OBJECTS,
+ DRAW_DISTANCE,
+ PENDING_VFS_OPERATIONS,
+ WINDOW_WIDTH,
+ WINDOW_HEIGHT;
+
+extern LLTrace::SampleStatHandle<LLUnit<F32, LLUnits::Percent> > PACKETS_LOST_PERCENT;
+
+extern LLTrace::SampleStatHandle<F64Megabytes > GL_TEX_MEM,
+ GL_BOUND_MEM,
+ RAW_MEM,
+ FORMATTED_MEM;
+extern LLTrace::SampleStatHandle<F64Kilobytes > DELTA_BANDWIDTH,
+ MAX_BANDWIDTH;
+extern SimMeasurement<F64Milliseconds > SIM_FRAME_TIME,
+ SIM_NET_TIME,
+ SIM_OTHER_TIME,
+ SIM_PHYSICS_TIME,
+ SIM_PHYSICS_STEP_TIME,
+ SIM_PHYSICS_SHAPE_UPDATE_TIME,
+ SIM_PHYSICS_OTHER_TIME,
+ SIM_AI_TIME,
+ SIM_AGENTS_TIME,
+ SIM_IMAGES_TIME,
+ SIM_SCRIPTS_TIME,
+ SIM_SPARE_TIME,
+ SIM_SLEEP_TIME,
+ SIM_PUMP_IO_TIME;
+
+extern SimMeasurement<F64Kilobytes > SIM_UNACKED_BYTES;
+extern SimMeasurement<F64Megabytes > SIM_PHYSICS_MEM;
+
+
+extern LLTrace::SampleStatHandle<F64Milliseconds > FRAMETIME_JITTER,
+ FRAMETIME_SLEW,
+ SIM_PING;
+
+extern LLTrace::EventStatHandle<LLUnit<F64, LLUnits::Meters> > AGENT_POSITION_SNAP;
+
+extern LLTrace::EventStatHandle<> LOADING_WEARABLES_LONG_DELAY;
+
+extern LLTrace::EventStatHandle<F64Milliseconds > REGION_CROSSING_TIME,
+ FRAME_STACKTIME,
+ UPDATE_STACKTIME,
+ NETWORK_STACKTIME,
+ IMAGE_STACKTIME,
+ REBUILD_STACKTIME,
+ RENDER_STACKTIME;
+
+extern LLTrace::EventStatHandle<F64Seconds > AVATAR_EDIT_TIME,
+ TOOLBOX_TIME,
+ MOUSELOOK_TIME,
+ FPS_10_TIME,
+ FPS_8_TIME,
+ FPS_2_TIME;
+
+extern LLTrace::EventStatHandle<LLUnit<F32, LLUnits::Percent> > OBJECT_CACHE_HIT_RATE;
+
+}
class LLViewerStats : public LLSingleton<LLViewerStats>
{
public:
- LLStat mKBitStat,
- mLayersKBitStat,
- mObjectKBitStat,
- mAssetKBitStat,
- mTextureKBitStat,
- mVFSPendingOperations,
- mObjectsDrawnStat,
- mObjectsCulledStat,
- mObjectsTestedStat,
- mObjectsComparedStat,
- mObjectsOccludedStat,
- mFPSStat,
- mPacketsInStat,
- mPacketsLostStat,
- mPacketsOutStat,
- mPacketsLostPercentStat,
- mTexturePacketsStat,
- mActualInKBitStat, // From the packet ring (when faking a bad connection)
- mActualOutKBitStat, // From the packet ring (when faking a bad connection)
- mTrianglesDrawnStat;
-
- // Simulator stats
- LLStat mSimTimeDilation,
-
- mSimFPS,
- mSimPhysicsFPS,
- mSimAgentUPS,
- mSimScriptEPS,
-
- mSimFrameMsec,
- mSimNetMsec,
- mSimSimOtherMsec,
- mSimSimPhysicsMsec,
-
- mSimSimPhysicsStepMsec,
- mSimSimPhysicsShapeUpdateMsec,
- mSimSimPhysicsOtherMsec,
- mSimSimAIStepMsec,
- mSimSimSkippedSilhouetteSteps,
- mSimSimPctSteppedCharacters,
-
- mSimAgentMsec,
- mSimImagesMsec,
- mSimScriptMsec,
- mSimSpareMsec,
- mSimSleepMsec,
- mSimPumpIOMsec,
-
- mSimMainAgents,
- mSimChildAgents,
- mSimObjects,
- mSimActiveObjects,
- mSimActiveScripts,
- mSimPctScriptsRun,
-
- mSimInPPS,
- mSimOutPPS,
- mSimPendingDownloads,
- mSimPendingUploads,
- mSimPendingLocalUploads,
- mSimTotalUnackedBytes,
-
- mPhysicsPinnedTasks,
- mPhysicsLODTasks,
- mPhysicsMemoryAllocated,
-
- mSimPingStat,
-
- mNumImagesStat,
- mNumRawImagesStat,
- mGLTexMemStat,
- mGLBoundMemStat,
- mRawMemStat,
- mFormattedMemStat,
-
- mNumObjectsStat,
- mNumActiveObjectsStat,
- mNumNewObjectsStat,
- mNumSizeCulledStat,
- mNumVisCulledStat;
-
void resetStats();
+
public:
- // If you change this, please also add a corresponding text label in llviewerstats.cpp
- enum EStatType
- {
- ST_VERSION = 0,
- ST_AVATAR_EDIT_SECONDS = 1,
- ST_TOOLBOX_SECONDS = 2,
- ST_CHAT_COUNT = 3,
- ST_IM_COUNT = 4,
- ST_FULLSCREEN_BOOL = 5,
- ST_RELEASE_COUNT= 6,
- ST_CREATE_COUNT = 7,
- ST_REZ_COUNT = 8,
- ST_FPS_10_SECONDS = 9,
- ST_FPS_2_SECONDS = 10,
- ST_MOUSELOOK_SECONDS = 11,
- ST_FLY_COUNT = 12,
- ST_TELEPORT_COUNT = 13,
- ST_OBJECT_DELETE_COUNT = 14,
- ST_SNAPSHOT_COUNT = 15,
- ST_UPLOAD_SOUND_COUNT = 16,
- ST_UPLOAD_TEXTURE_COUNT = 17,
- ST_EDIT_TEXTURE_COUNT = 18,
- ST_KILLED_COUNT = 19,
- ST_FRAMETIME_JITTER = 20,
- ST_FRAMETIME_SLEW = 21,
- ST_INVENTORY_TOO_LONG = 22,
- ST_WEARABLES_TOO_LONG = 23,
- ST_LOGIN_SECONDS = 24,
- ST_LOGIN_TIMEOUT_COUNT = 25,
- ST_HAS_BAD_TIMER = 26,
- ST_DOWNLOAD_FAILED = 27,
- ST_LSL_SAVE_COUNT = 28,
- ST_UPLOAD_ANIM_COUNT = 29,
- ST_FPS_8_SECONDS = 30,
- ST_SIM_FPS_20_SECONDS = 31,
- ST_PHYS_FPS_20_SECONDS = 32,
- ST_LOSS_05_SECONDS = 33,
- ST_FPS_DROP_50_RATIO = 34,
- ST_ENABLE_VBO = 35,
- ST_DELTA_BANDWIDTH = 36,
- ST_MAX_BANDWIDTH = 37,
- ST_LIGHTING_DETAIL = 38,
- ST_VISIBLE_AVATARS = 39,
- ST_SHADER_OBJECTS = 40,
- ST_SHADER_ENVIRONMENT = 41,
- ST_DRAW_DIST = 42,
- ST_CHAT_BUBBLES = 43,
- ST_SHADER_AVATAR = 44,
- ST_FRAME_SECS = 45,
- ST_UPDATE_SECS = 46,
- ST_NETWORK_SECS = 47,
- ST_IMAGE_SECS = 48,
- ST_REBUILD_SECS = 49,
- ST_RENDER_SECS = 50,
- ST_CROSSING_AVG = 51,
- ST_CROSSING_MAX = 52,
- ST_LIBXUL_WIDGET_USED = 53, // Unused
- ST_WINDOW_WIDTH = 54,
- ST_WINDOW_HEIGHT = 55,
- ST_TEX_BAKES = 56,
- ST_TEX_REBAKES = 57,
-
- ST_COUNT = 58
- };
LLViewerStats();
~LLViewerStats();
- // all return latest value of given stat
- F64 getStat(EStatType type) const;
- F64 setStat(EStatType type, F64 value); // set the stat to value
- F64 incStat(EStatType type, F64 value = 1.f); // add value to the stat
-
- void updateFrameStats(const F64 time_diff);
+ void updateFrameStats(const F64Seconds time_diff);
- void addToMessage(LLSD &body) const;
+ void addToMessage(LLSD &body);
struct StatsAccumulator
{
@@ -263,7 +328,7 @@ public:
mCountOfNextUpdatesToIgnore = 0;
}
- inline LLSD getData() const
+ inline LLSD asLLSD() const
{
LLSD data;
data["mean"] = getMean();
@@ -275,8 +340,6 @@ public:
}
};
- StatsAccumulator mAgentPositionSnaps;
-
// Phase tracking (originally put in for avatar rezzing), tracking
// progress of active/completed phases for activities like outfit changing.
typedef std::map<std::string,LLFrameTimer> phase_map_t;
@@ -294,18 +357,20 @@ public:
void stopPhase(const std::string& phase_name);
void stopAllPhases();
void clearPhases();
- LLSD dumpPhases();
+ LLSD asLLSD();
static StatsAccumulator& getPhaseStats(const std::string& phase_name);
static void recordPhaseStat(const std::string& phase_name, F32 value);
phase_map_t::iterator begin() { return mPhaseMap.begin(); }
phase_map_t::iterator end() { return mPhaseMap.end(); }
};
+ LLTrace::Recording& getRecording() { return mRecording; }
+ const LLTrace::Recording& getRecording() const { return mRecording; }
private:
- F64 mStats[ST_COUNT];
+ LLTrace::Recording mRecording;
- F64 mLastTimeDiff; // used for time stat updates
+ F64Seconds mLastTimeDiff; // used for time stat updates
};
static const F32 SEND_STATS_PERIOD = 300.0f;
@@ -315,7 +380,7 @@ void update_statistics();
void send_stats();
extern LLFrameTimer gTextureTimer;
-extern U32 gTotalTextureBytes;
-extern U32 gTotalObjectBytes;
-extern U32 gTotalTextureBytesPerBoostLevel[] ;
+extern U32Bytes gTotalTextureData;
+extern U32Bytes gTotalObjectData;
+extern U32Bytes gTotalTextureBytesPerBoostLevel[] ;
#endif // LL_LLVIEWERSTATS_H
diff --git a/indra/newview/llviewerstatsrecorder.cpp b/indra/newview/llviewerstatsrecorder.cpp
index 2b3e293229..b5ccf4ffa0 100755
--- a/indra/newview/llviewerstatsrecorder.cpp
+++ b/indra/newview/llviewerstatsrecorder.cpp
@@ -49,7 +49,7 @@ LLViewerStatsRecorder::LLViewerStatsRecorder() :
{
if (NULL != sInstance)
{
- llerrs << "Attempted to create multiple instances of LLViewerStatsRecorder!" << llendl;
+ LL_ERRS() << "Attempted to create multiple instances of LLViewerStatsRecorder!" << LL_ENDL;
}
sInstance = this;
clearStats();
@@ -132,7 +132,7 @@ void LLViewerStatsRecorder::recordObjectUpdateEvent(U32 local_id, const EObjectU
mObjectCacheHitSize += msg_size;
break;
default:
- llwarns << "Unknown update_type" << llendl;
+ LL_WARNS() << "Unknown update_type" << LL_ENDL;
break;
};
}
@@ -154,7 +154,7 @@ void LLViewerStatsRecorder::recordCacheFullUpdate(U32 local_id, const EObjectUpd
mObjectCacheUpdateReplacements++;
break;
default:
- llwarns << "Unknown update_result type" << llendl;
+ LL_WARNS() << "Unknown update_result type" << LL_ENDL;
break;
};
}
@@ -173,7 +173,7 @@ void LLViewerStatsRecorder::writeToLog( F32 interval )
if ( delta_time < interval || total_objects == 0) return;
mLastSnapshotTime = LLTimer::getTotalSeconds();
- lldebugs << "ILX: "
+ LL_DEBUGS() << "ILX: "
<< mObjectCacheHitCount << " hits, "
<< mObjectCacheMissFullCount << " full misses, "
<< mObjectCacheMissCrcCount << " crc misses, "
@@ -186,7 +186,7 @@ void LLViewerStatsRecorder::writeToLog( F32 interval )
<< mObjectCacheUpdateAdds << " cache update adds, "
<< mObjectCacheUpdateReplacements << " cache update replacements, "
<< mObjectUpdateFailures << " update failures"
- << llendl;
+ << LL_ENDL;
if (mObjectCacheFile == NULL)
{
@@ -220,12 +220,12 @@ void LLViewerStatsRecorder::writeToLog( F32 interval )
data_size = data_msg.str().size();
if (fwrite(data_msg.str().c_str(), 1, data_size, mObjectCacheFile ) != data_size)
{
- llwarns << "failed to write full headers to " << STATS_FILE_NAME << llendl;
+ LL_WARNS() << "failed to write full headers to " << STATS_FILE_NAME << LL_ENDL;
}
}
else
{
- llwarns << "Couldn't open " << STATS_FILE_NAME << " for logging." << llendl;
+ //LL_WARNS() << "Couldn't open " << STATS_FILE_NAME << " for logging." << LL_ENDL;
return;
}
}
@@ -257,7 +257,7 @@ void LLViewerStatsRecorder::writeToLog( F32 interval )
data_size = data_msg.str().size();
if ( data_size != fwrite(data_msg.str().c_str(), 1, data_size, mObjectCacheFile ))
{
- llwarns << "Unable to write complete column data to " << STATS_FILE_NAME << llendl;
+ LL_WARNS() << "Unable to write complete column data to " << STATS_FILE_NAME << LL_ENDL;
}
clearStats();
diff --git a/indra/newview/llviewertexlayer.cpp b/indra/newview/llviewertexlayer.cpp
index 777e1f9c76..62e8da81ec 100755
--- a/indra/newview/llviewertexlayer.cpp
+++ b/indra/newview/llviewertexlayer.cpp
@@ -118,7 +118,7 @@ void LLViewerTexLayerSetBuffer::destroyGLTexture()
// static
void LLViewerTexLayerSetBuffer::dumpTotalByteCount()
{
- llinfos << "Composite System GL Buffers: " << (LLViewerTexLayerSetBuffer::sGLByteCount/1024) << "KB" << llendl;
+ LL_INFOS() << "Composite System GL Buffers: " << (LLViewerTexLayerSetBuffer::sGLByteCount/1024) << "KB" << LL_ENDL;
}
void LLViewerTexLayerSetBuffer::requestUpdate()
@@ -231,7 +231,7 @@ void LLViewerTexLayerSetBuffer::midRenderTexLayerSet(BOOL success)
{
if (!success)
{
- llinfos << "Failed attempt to bake " << mTexLayerSet->getBodyRegionName() << llendl;
+ LL_INFOS() << "Failed attempt to bake " << mTexLayerSet->getBodyRegionName() << LL_ENDL;
mUploadPending = FALSE;
}
else
@@ -363,8 +363,8 @@ BOOL LLViewerTexLayerSetBuffer::requestUpdateImmediate()
void LLViewerTexLayerSetBuffer::doUpload()
{
LLViewerTexLayerSet* layer_set = getViewerTexLayerSet();
- LL_DEBUGS("Avatar") << "Uploading baked " << layer_set->getBodyRegionName() << llendl;
- LLViewerStats::getInstance()->incStat(LLViewerStats::ST_TEX_BAKES);
+ LL_DEBUGS("Avatar") << "Uploading baked " << layer_set->getBodyRegionName() << LL_ENDL;
+ add(LLStatViewer::TEX_BAKES, 1);
// Don't need caches since we're baked now. (note: we won't *really* be baked
// until this image is sent to the server and the Avatar Appearance message is received.)
@@ -449,7 +449,7 @@ void LLViewerTexLayerSetBuffer::doUpload()
LLSD body = LLSD::emptyMap();
// The responder will call LLViewerTexLayerSetBuffer::onTextureUploadComplete()
LLHTTPClient::post(url, body, new LLSendTexLayerResponder(body, mUploadID, LLAssetType::AT_TEXTURE, baked_upload_data));
- llinfos << "Baked texture upload via capability of " << mUploadID << " to " << url << llendl;
+ LL_INFOS() << "Baked texture upload via capability of " << mUploadID << " to " << url << LL_ENDL;
}
else
{
@@ -460,7 +460,7 @@ void LLViewerTexLayerSetBuffer::doUpload()
TRUE, // temp_file
TRUE, // is_priority
TRUE); // store_local
- llinfos << "Baked texture upload via Asset Store." << llendl;
+ LL_INFOS() << "Baked texture upload via Asset Store." << LL_ENDL;
}
if (highest_lod)
@@ -497,7 +497,7 @@ void LLViewerTexLayerSetBuffer::doUpload()
mUploadPending = FALSE;
LLVFile file(gVFS, asset_id, LLAssetType::AT_TEXTURE, LLVFile::WRITE);
file.remove();
- llinfos << "Unable to create baked upload file (reason: corrupted)." << llendl;
+ LL_INFOS() << "Unable to create baked upload file (reason: corrupted)." << LL_ENDL;
}
}
}
@@ -505,7 +505,7 @@ void LLViewerTexLayerSetBuffer::doUpload()
{
// The VFS write file operation failed.
mUploadPending = FALSE;
- llinfos << "Unable to create baked upload file (reason: failed to write file)" << llendl;
+ LL_INFOS() << "Unable to create baked upload file (reason: failed to write file)" << LL_ENDL;
}
delete [] baked_color_data;
@@ -587,14 +587,14 @@ void LLViewerTexLayerSetBuffer::onTextureUploadComplete(const LLUUID& uuid,
LLAvatarAppearanceDefines::ETextureIndex baked_te = gAgentAvatarp->getBakedTE(layerset_buffer->getViewerTexLayerSet());
// Update baked texture info with the new UUID
U64 now = LLFrameTimer::getTotalTime(); // Record starting time
- llinfos << "Baked" << resolution << "texture upload for " << name << " took " << (S32)((now - baked_upload_data->mStartTime) / 1000) << " ms" << llendl;
+ LL_INFOS() << "Baked" << resolution << "texture upload for " << name << " took " << (S32)((now - baked_upload_data->mStartTime) / 1000) << " ms" << LL_ENDL;
gAgentAvatarp->setNewBakedTexture(baked_te, uuid);
}
else
{
++failures;
S32 max_attempts = baked_upload_data->mIsHighestRes ? BAKE_UPLOAD_ATTEMPTS : 1; // only retry final bakes
- llwarns << "Baked" << resolution << "texture upload for " << name << " failed (attempt " << failures << "/" << max_attempts << ")" << llendl;
+ LL_WARNS() << "Baked" << resolution << "texture upload for " << name << " failed (attempt " << failures << "/" << max_attempts << ")" << LL_ENDL;
if (failures < max_attempts)
{
layerset_buffer->mUploadFailCount = failures;
@@ -605,7 +605,7 @@ void LLViewerTexLayerSetBuffer::onTextureUploadComplete(const LLUUID& uuid,
}
else
{
- llinfos << "Received baked texture out of date, ignored." << llendl;
+ LL_INFOS() << "Received baked texture out of date, ignored." << LL_ENDL;
}
gAgentAvatarp->dirtyMesh();
@@ -617,7 +617,7 @@ void LLViewerTexLayerSetBuffer::onTextureUploadComplete(const LLUUID& uuid,
// and rebake it at some point in the future (after login?)),
// or this response to upload is out of date, in which case a
// current response should be on the way or already processed.
- llwarns << "Baked upload failed" << llendl;
+ LL_WARNS() << "Baked upload failed" << LL_ENDL;
}
delete baked_upload_data;
@@ -694,7 +694,7 @@ void LLViewerTexLayerSet::createComposite()
// Composite other avatars at reduced resolution
if( !mAvatarAppearance->isSelf() )
{
- llerrs << "composites should not be created for non-self avatars!" << llendl;
+ LL_ERRS() << "composites should not be created for non-self avatars!" << LL_ENDL;
}
mComposite = new LLViewerTexLayerSetBuffer( this, width, height );
}
diff --git a/indra/newview/llviewertexteditor.cpp b/indra/newview/llviewertexteditor.cpp
index e51f7b2c71..69f9bbdff8 100755
--- a/indra/newview/llviewertexteditor.cpp
+++ b/indra/newview/llviewertexteditor.cpp
@@ -100,7 +100,7 @@ public:
if (item_ptr.isNull())
{
// check to prevent a crash. See EXT-8459.
- llwarns << "Passed handle contains a dead inventory item. Most likely notecard has been closed and embedded item was destroyed." << llendl;
+ LL_WARNS() << "Passed handle contains a dead inventory item. Most likely notecard has been closed and embedded item was destroyed." << LL_ENDL;
}
else
{
@@ -143,7 +143,7 @@ public:
LLInventoryItem* item = gInventory.getItem(inv_item);
if(!item)
{
- llwarns << "Item add reported, but not found in inventory!: " << inv_item << llendl;
+ LL_WARNS() << "Item add reported, but not found in inventory!: " << inv_item << LL_ENDL;
}
else
{
@@ -438,7 +438,7 @@ llwchar LLEmbeddedItems::getEmbeddedCharFromIndex(S32 index)
{
if (index >= (S32)mEmbeddedIndexedChars.size())
{
- llwarns << "No item for embedded char " << index << " using LL_UNKNOWN_CHAR" << llendl;
+ LL_WARNS() << "No item for embedded char " << index << " using LL_UNKNOWN_CHAR" << LL_ENDL;
return LL_UNKNOWN_CHAR;
}
return mEmbeddedIndexedChars[index];
@@ -494,7 +494,7 @@ S32 LLEmbeddedItems::getIndexFromEmbeddedChar(llwchar wch)
}
else
{
- llwarns << "Embedded char " << wch << " not found, using 0" << llendl;
+ LL_WARNS() << "Embedded char " << wch << " not found, using 0" << LL_ENDL;
return 0;
}
}
@@ -689,9 +689,9 @@ void LLViewerTextEditor::makePristine()
LLTextEditor::makePristine();
}
-void LLViewerTextEditor::handleVisibilityChange( BOOL new_visibility )
+void LLViewerTextEditor::onVisibilityChange( BOOL new_visibility )
{
- LLUICtrl::handleVisibilityChange(new_visibility);
+ LLUICtrl::onVisibilityChange(new_visibility);
}
BOOL LLViewerTextEditor::handleMouseDown(S32 x, S32 y, MASK mask)
@@ -925,7 +925,7 @@ BOOL LLViewerTextEditor::handleDragAndDrop(S32 x, S32 y, MASK mask,
}
handled = TRUE;
- lldebugst(LLERR_USER_INPUT) << "dragAndDrop handled by LLViewerTextEditor " << getName() << llendl;
+ LL_DEBUGS("UserInput") << "dragAndDrop handled by LLViewerTextEditor " << getName() << LL_ENDL;
return handled;
}
diff --git a/indra/newview/llviewertexteditor.h b/indra/newview/llviewertexteditor.h
index 33b78a5964..477119d4f2 100755
--- a/indra/newview/llviewertexteditor.h
+++ b/indra/newview/llviewertexteditor.h
@@ -47,7 +47,7 @@ public:
virtual void makePristine();
- /*virtual*/ void handleVisibilityChange( BOOL new_visibility );
+ /*virtual*/ void onVisibilityChange( BOOL new_visibility );
// mousehandler overrides
virtual BOOL handleMouseDown(S32 x, S32 y, MASK mask);
diff --git a/indra/newview/llviewertexture.cpp b/indra/newview/llviewertexture.cpp
index 3da6d33d72..3be82a5531 100755
--- a/indra/newview/llviewertexture.cpp
+++ b/indra/newview/llviewertexture.cpp
@@ -29,7 +29,6 @@
#include "llviewertexture.h"
// Library includes
-#include "imageids.h"
#include "llmath.h"
#include "llerror.h"
#include "llgl.h"
@@ -63,6 +62,11 @@
#include "lltexturecache.h"
///////////////////////////////////////////////////////////////////////////////
+// extern
+const S32Megabytes gMinVideoRam(32);
+const S32Megabytes gMaxVideoRam(512);
+
+
// statics
LLPointer<LLViewerTexture> LLViewerTexture::sNullImagep = NULL;
LLPointer<LLViewerTexture> LLViewerTexture::sBlackImagep = NULL;
@@ -72,8 +76,8 @@ LLPointer<LLViewerFetchedTexture> LLViewerFetchedTexture::sWhiteImagep = NULL;
LLPointer<LLViewerFetchedTexture> LLViewerFetchedTexture::sDefaultImagep = NULL;
LLPointer<LLViewerFetchedTexture> LLViewerFetchedTexture::sSmokeImagep = NULL;
LLPointer<LLViewerFetchedTexture> LLViewerFetchedTexture::sFlatNormalImagep = NULL;
-LLViewerMediaTexture::media_map_t LLViewerMediaTexture::sMediaMap ;
-LLTexturePipelineTester* LLViewerTextureManager::sTesterp = NULL ;
+LLViewerMediaTexture::media_map_t LLViewerMediaTexture::sMediaMap;
+LLTexturePipelineTester* LLViewerTextureManager::sTesterp = NULL;
const std::string sTesterName("TextureTester");
S32 LLViewerTexture::sImageCount = 0;
@@ -82,21 +86,21 @@ S32 LLViewerTexture::sAuxCount = 0;
LLFrameTimer LLViewerTexture::sEvaluationTimer;
F32 LLViewerTexture::sDesiredDiscardBias = 0.f;
F32 LLViewerTexture::sDesiredDiscardScale = 1.1f;
-S32 LLViewerTexture::sBoundTextureMemoryInBytes = 0;
-S32 LLViewerTexture::sTotalTextureMemoryInBytes = 0;
-S32 LLViewerTexture::sMaxBoundTextureMemInMegaBytes = 0;
-S32 LLViewerTexture::sMaxTotalTextureMemInMegaBytes = 0;
-S32 LLViewerTexture::sMaxDesiredTextureMemInBytes = 0 ;
-S8 LLViewerTexture::sCameraMovingDiscardBias = 0 ;
-F32 LLViewerTexture::sCameraMovingBias = 0.0f ;
-S32 LLViewerTexture::sMaxSculptRez = 128 ; //max sculpt image size
-const S32 MAX_CACHED_RAW_IMAGE_AREA = 64 * 64 ;
-const S32 MAX_CACHED_RAW_SCULPT_IMAGE_AREA = LLViewerTexture::sMaxSculptRez * LLViewerTexture::sMaxSculptRez ;
-const S32 MAX_CACHED_RAW_TERRAIN_IMAGE_AREA = 128 * 128 ;
-S32 LLViewerTexture::sMinLargeImageSize = 65536 ; //256 * 256.
-S32 LLViewerTexture::sMaxSmallImageSize = MAX_CACHED_RAW_IMAGE_AREA ;
-BOOL LLViewerTexture::sFreezeImageScalingDown = FALSE ;
-F32 LLViewerTexture::sCurrentTime = 0.0f ;
+S32Bytes LLViewerTexture::sBoundTextureMemory;
+S32Bytes LLViewerTexture::sTotalTextureMemory;
+S32Megabytes LLViewerTexture::sMaxBoundTextureMem;
+S32Megabytes LLViewerTexture::sMaxTotalTextureMem;
+S32Bytes LLViewerTexture::sMaxDesiredTextureMem;
+S8 LLViewerTexture::sCameraMovingDiscardBias = 0;
+F32 LLViewerTexture::sCameraMovingBias = 0.0f;
+S32 LLViewerTexture::sMaxSculptRez = 128; //max sculpt image size
+const S32 MAX_CACHED_RAW_IMAGE_AREA = 64 * 64;
+const S32 MAX_CACHED_RAW_SCULPT_IMAGE_AREA = LLViewerTexture::sMaxSculptRez * LLViewerTexture::sMaxSculptRez;
+const S32 MAX_CACHED_RAW_TERRAIN_IMAGE_AREA = 128 * 128;
+S32 LLViewerTexture::sMinLargeImageSize = 65536; //256 * 256.
+S32 LLViewerTexture::sMaxSmallImageSize = MAX_CACHED_RAW_IMAGE_AREA;
+BOOL LLViewerTexture::sFreezeImageScalingDown = FALSE;
+F32 LLViewerTexture::sCurrentTime = 0.0f;
F32 LLViewerTexture::sTexelPixelRatio = 1.0f;
LLViewerTexture::EDebugTexels LLViewerTexture::sDebugTexelsMode = LLViewerTexture::DEBUG_TEXELS_OFF;
@@ -138,7 +142,7 @@ void LLLoadedCallbackEntry::removeTexture(LLViewerFetchedTexture* tex)
{
if(mSourceCallbackList)
{
- mSourceCallbackList->erase(tex->getID()) ;
+ mSourceCallbackList->erase(tex->getID());
}
}
@@ -151,33 +155,33 @@ void LLLoadedCallbackEntry::cleanUpCallbackList(LLLoadedCallbackEntry::source_ca
for(LLLoadedCallbackEntry::source_callback_list_t::iterator iter = callback_list->begin();
iter != callback_list->end(); ++iter)
{
- LLViewerFetchedTexture* tex = gTextureList.findImage(*iter) ;
+ LLViewerFetchedTexture* tex = gTextureList.findImage(*iter);
if(tex)
{
- tex->deleteCallbackEntry(callback_list) ;
+ tex->deleteCallbackEntry(callback_list);
}
}
- callback_list->clear() ;
+ callback_list->clear();
}
}
LLViewerMediaTexture* LLViewerTextureManager::createMediaTexture(const LLUUID &media_id, BOOL usemipmaps, LLImageGL* gl_image)
{
- return new LLViewerMediaTexture(media_id, usemipmaps, gl_image) ;
+ return new LLViewerMediaTexture(media_id, usemipmaps, gl_image);
}
LLViewerTexture* LLViewerTextureManager::findTexture(const LLUUID& id)
{
- LLViewerTexture* tex ;
+ LLViewerTexture* tex;
//search fetched texture list
- tex = gTextureList.findImage(id) ;
+ tex = gTextureList.findImage(id);
//search media texture list
if(!tex)
{
- tex = LLViewerTextureManager::findMediaTexture(id) ;
+ tex = LLViewerTextureManager::findMediaTexture(id);
}
- return tex ;
+ return tex;
}
LLViewerFetchedTexture* LLViewerTextureManager::findFetchedTexture(const LLUUID& id)
@@ -187,78 +191,78 @@ LLViewerFetchedTexture* LLViewerTextureManager::findFetchedTexture(const LLUUID
LLViewerMediaTexture* LLViewerTextureManager::findMediaTexture(const LLUUID &media_id)
{
- return LLViewerMediaTexture::findMediaTexture(media_id) ;
+ return LLViewerMediaTexture::findMediaTexture(media_id);
}
LLViewerMediaTexture* LLViewerTextureManager::getMediaTexture(const LLUUID& id, BOOL usemipmaps, LLImageGL* gl_image)
{
- LLViewerMediaTexture* tex = LLViewerMediaTexture::findMediaTexture(id) ;
+ LLViewerMediaTexture* tex = LLViewerMediaTexture::findMediaTexture(id);
if(!tex)
{
- tex = LLViewerTextureManager::createMediaTexture(id, usemipmaps, gl_image) ;
+ tex = LLViewerTextureManager::createMediaTexture(id, usemipmaps, gl_image);
}
- tex->initVirtualSize() ;
+ tex->initVirtualSize();
- return tex ;
+ return tex;
}
LLViewerFetchedTexture* LLViewerTextureManager::staticCastToFetchedTexture(LLTexture* tex, BOOL report_error)
{
if(!tex)
{
- return NULL ;
+ return NULL;
}
- S8 type = tex->getType() ;
+ S8 type = tex->getType();
if(type == LLViewerTexture::FETCHED_TEXTURE || type == LLViewerTexture::LOD_TEXTURE)
{
- return static_cast<LLViewerFetchedTexture*>(tex) ;
+ return static_cast<LLViewerFetchedTexture*>(tex);
}
if(report_error)
{
- llerrs << "not a fetched texture type: " << type << llendl ;
+ LL_ERRS() << "not a fetched texture type: " << type << LL_ENDL;
}
- return NULL ;
+ return NULL;
}
LLPointer<LLViewerTexture> LLViewerTextureManager::getLocalTexture(BOOL usemipmaps, BOOL generate_gl_tex)
{
- LLPointer<LLViewerTexture> tex = new LLViewerTexture(usemipmaps) ;
+ LLPointer<LLViewerTexture> tex = new LLViewerTexture(usemipmaps);
if(generate_gl_tex)
{
- tex->generateGLTexture() ;
- tex->setCategory(LLGLTexture::LOCAL) ;
+ tex->generateGLTexture();
+ tex->setCategory(LLGLTexture::LOCAL);
}
- return tex ;
+ return tex;
}
LLPointer<LLViewerTexture> LLViewerTextureManager::getLocalTexture(const LLUUID& id, BOOL usemipmaps, BOOL generate_gl_tex)
{
- LLPointer<LLViewerTexture> tex = new LLViewerTexture(id, usemipmaps) ;
+ LLPointer<LLViewerTexture> tex = new LLViewerTexture(id, usemipmaps);
if(generate_gl_tex)
{
- tex->generateGLTexture() ;
- tex->setCategory(LLGLTexture::LOCAL) ;
+ tex->generateGLTexture();
+ tex->setCategory(LLGLTexture::LOCAL);
}
- return tex ;
+ return tex;
}
LLPointer<LLViewerTexture> LLViewerTextureManager::getLocalTexture(const LLImageRaw* raw, BOOL usemipmaps)
{
- LLPointer<LLViewerTexture> tex = new LLViewerTexture(raw, usemipmaps) ;
- tex->setCategory(LLGLTexture::LOCAL) ;
- return tex ;
+ LLPointer<LLViewerTexture> tex = new LLViewerTexture(raw, usemipmaps);
+ tex->setCategory(LLGLTexture::LOCAL);
+ return tex;
}
LLPointer<LLViewerTexture> LLViewerTextureManager::getLocalTexture(const U32 width, const U32 height, const U8 components, BOOL usemipmaps, BOOL generate_gl_tex)
{
- LLPointer<LLViewerTexture> tex = new LLViewerTexture(width, height, components, usemipmaps) ;
+ LLPointer<LLViewerTexture> tex = new LLViewerTexture(width, height, components, usemipmaps);
if(generate_gl_tex)
{
- tex->generateGLTexture() ;
- tex->setCategory(LLGLTexture::LOCAL) ;
+ tex->generateGLTexture();
+ tex->setCategory(LLGLTexture::LOCAL);
}
- return tex ;
+ return tex;
}
LLViewerFetchedTexture* LLViewerTextureManager::getFetchedTexture(
@@ -271,11 +275,11 @@ LLViewerFetchedTexture* LLViewerTextureManager::getFetchedTexture(
LLGLenum primary_format,
LLHost request_from_host)
{
- return gTextureList.getImage(image_id, f_type, usemipmaps, boost_priority, texture_type, internal_format, primary_format, request_from_host) ;
+ return gTextureList.getImage(image_id, f_type, usemipmaps, boost_priority, texture_type, internal_format, primary_format, request_from_host);
}
LLViewerFetchedTexture* LLViewerTextureManager::getFetchedTextureFromFile(
- const std::string& filename,
+ const std::string& filename,
FTType f_type,
BOOL usemipmaps,
LLViewerTexture::EBoostLevel boost_priority,
@@ -284,11 +288,11 @@ LLViewerFetchedTexture* LLViewerTextureManager::getFetchedTextureFromFile(
LLGLenum primary_format,
const LLUUID& force_id)
{
- return gTextureList.getImageFromFile(filename, f_type, usemipmaps, boost_priority, texture_type, internal_format, primary_format, force_id) ;
+ return gTextureList.getImageFromFile(filename, f_type, usemipmaps, boost_priority, texture_type, internal_format, primary_format, force_id);
}
//static
-LLViewerFetchedTexture* LLViewerTextureManager::getFetchedTextureFromUrl(const std::string& url,
+LLViewerFetchedTexture* LLViewerTextureManager::getFetchedTextureFromUrl(const std::string& url,
FTType f_type,
BOOL usemipmaps,
LLViewerTexture::EBoostLevel boost_priority,
@@ -298,12 +302,12 @@ LLViewerFetchedTexture* LLViewerTextureManager::getFetchedTextureFromUrl(const s
const LLUUID& force_id
)
{
- return gTextureList.getImageFromUrl(url, f_type, usemipmaps, boost_priority, texture_type, internal_format, primary_format, force_id) ;
+ return gTextureList.getImageFromUrl(url, f_type, usemipmaps, boost_priority, texture_type, internal_format, primary_format, force_id);
}
LLViewerFetchedTexture* LLViewerTextureManager::getFetchedTextureFromHost(const LLUUID& image_id, FTType f_type, LLHost host)
{
- return gTextureList.getImageFromHost(image_id, f_type, host) ;
+ return gTextureList.getImageFromHost(image_id, f_type, host);
}
// Create a bridge to the viewer texture manager.
@@ -331,15 +335,15 @@ void LLViewerTextureManager::init()
{
LLPointer<LLImageRaw> raw = new LLImageRaw(1,1,3);
raw->clear(0x77, 0x77, 0x77, 0xFF);
- LLViewerTexture::sNullImagep = LLViewerTextureManager::getLocalTexture(raw.get(), TRUE) ;
+ LLViewerTexture::sNullImagep = LLViewerTextureManager::getLocalTexture(raw.get(), TRUE);
}
const S32 dim = 128;
LLPointer<LLImageRaw> image_raw = new LLImageRaw(dim,dim,3);
U8* data = image_raw->getData();
- memset(data, 0, dim * dim * 3) ;
- LLViewerTexture::sBlackImagep = LLViewerTextureManager::getLocalTexture(image_raw.get(), TRUE) ;
+ memset(data, 0, dim * dim * 3);
+ LLViewerTexture::sBlackImagep = LLViewerTextureManager::getLocalTexture(image_raw.get(), TRUE);
#if 1
LLPointer<LLViewerFetchedTexture> imagep = LLViewerTextureManager::getFetchedTexture(IMG_DEFAULT);
@@ -368,16 +372,16 @@ void LLViewerTextureManager::init()
}
imagep->createGLTexture(0, image_raw);
//cache the raw image
- imagep->setCachedRawImage(0, image_raw) ;
+ imagep->setCachedRawImage(0, image_raw);
image_raw = NULL;
#else
LLViewerFetchedTexture::sDefaultImagep = LLViewerTextureManager::getFetchedTexture(IMG_DEFAULT, TRUE, LLGLTexture::BOOST_UI);
#endif
LLViewerFetchedTexture::sDefaultImagep->dontDiscard();
- LLViewerFetchedTexture::sDefaultImagep->setCategory(LLGLTexture::OTHER) ;
+ LLViewerFetchedTexture::sDefaultImagep->setCategory(LLGLTexture::OTHER);
LLViewerFetchedTexture::sSmokeImagep = LLViewerTextureManager::getFetchedTexture(IMG_SMOKE, FTT_DEFAULT, TRUE, LLGLTexture::BOOST_UI);
- LLViewerFetchedTexture::sSmokeImagep->setNoDelete() ;
+ LLViewerFetchedTexture::sSmokeImagep->setNoDelete();
image_raw = new LLImageRaw(32,32,3);
data = image_raw->getData();
@@ -394,14 +398,14 @@ void LLViewerTextureManager::init()
LLViewerTexture::sCheckerBoardImagep = LLViewerTextureManager::getLocalTexture(image_raw.get(), TRUE);
- LLViewerTexture::initClass() ;
-
+ LLViewerTexture::initClass();
+
// Create a texture manager bridge.
gTextureManagerBridgep = new LLViewerTextureManagerBridge;
if (LLMetricPerformanceTesterBasic::isMetricLogRequested(sTesterName) && !LLMetricPerformanceTesterBasic::getTester(sTesterName))
{
- sTesterp = new LLTexturePipelineTester() ;
+ sTesterp = new LLTexturePipelineTester();
if (!sTesterp->isValid())
{
delete sTesterp;
@@ -415,7 +419,7 @@ void LLViewerTextureManager::cleanup()
stop_glerror();
delete gTextureManagerBridgep;
- LLImageGL::sDefaultGLTexture = NULL ;
+ LLImageGL::sDefaultGLTexture = NULL;
LLViewerTexture::sNullImagep = NULL;
LLViewerTexture::sBlackImagep = NULL;
LLViewerTexture::sCheckerBoardImagep = NULL;
@@ -427,7 +431,7 @@ void LLViewerTextureManager::cleanup()
LLViewerFetchedTexture::sFlatNormalImagep = NULL;
- LLViewerMediaTexture::cleanUpClass() ;
+ LLViewerMediaTexture::cleanUpClass();
}
//----------------------------------------------------------------------------------------------
@@ -437,7 +441,7 @@ void LLViewerTextureManager::cleanup()
// static
void LLViewerTexture::initClass()
{
- LLImageGL::sDefaultGLTexture = LLViewerFetchedTexture::sDefaultImagep->getGLTexture() ;
+ LLImageGL::sDefaultGLTexture = LLViewerFetchedTexture::sDefaultImagep->getGLTexture();
if(gSavedSettings.getBOOL("TextureFetchDebuggerEnabled"))
{
@@ -453,42 +457,42 @@ const S32 min_non_tex_system_mem = (128<<20); // 128 MB
F32 texmem_lower_bound_scale = 0.85f;
F32 texmem_middle_bound_scale = 0.925f;
-static LLFastTimer::DeclareTimer FTM_TEXTURE_MEMORY_CHECK("Memory Check");
+static LLTrace::BlockTimerStatHandle FTM_TEXTURE_MEMORY_CHECK("Memory Check");
//static
bool LLViewerTexture::isMemoryForTextureLow()
{
- const F32 WAIT_TIME = 1.0f ; //second
- static LLFrameTimer timer ;
+ const F32 WAIT_TIME = 1.0f; //second
+ static LLFrameTimer timer;
if(timer.getElapsedTimeF32() < WAIT_TIME) //call this once per second.
{
return false;
}
- timer.reset() ;
+ timer.reset();
- LLFastTimer t(FTM_TEXTURE_MEMORY_CHECK);
+ LL_RECORD_BLOCK_TIME(FTM_TEXTURE_MEMORY_CHECK);
- const S32 MIN_FREE_TEXTURE_MEMORY = 5 ; //MB
- const S32 MIN_FREE_MAIN_MEMORy = 100 ; //MB
+ const S32Megabytes MIN_FREE_TEXTURE_MEMORY(5); //MB
+ const S32Megabytes MIN_FREE_MAIN_MEMORY(100); //MB
- bool low_mem = false ;
+ bool low_mem = false;
if (gGLManager.mHasATIMemInfo)
{
S32 meminfo[4];
glGetIntegerv(GL_TEXTURE_FREE_MEMORY_ATI, meminfo);
- if(meminfo[0] / 1024 < MIN_FREE_TEXTURE_MEMORY)
+ if((S32Megabytes)meminfo[0] < MIN_FREE_TEXTURE_MEMORY)
{
- low_mem = true ;
+ low_mem = true;
}
if(!low_mem) //check main memory, only works for windows.
{
- LLMemory::updateMemoryInfo() ;
- if(LLMemory::getAvailableMemKB() / 1024 < MIN_FREE_MAIN_MEMORy)
+ LLMemory::updateMemoryInfo();
+ if(LLMemory::getAvailableMemKB() < MIN_FREE_TEXTURE_MEMORY)
{
- low_mem = true ;
+ low_mem = true;
}
}
}
@@ -500,45 +504,45 @@ bool LLViewerTexture::isMemoryForTextureLow()
if(free_memory / 1024 < MIN_FREE_TEXTURE_MEMORY)
{
- low_mem = true ;
+ low_mem = true;
}
}
#endif
- return low_mem ;
+ return low_mem;
}
-static LLFastTimer::DeclareTimer FTM_TEXTURE_UPDATE_MEDIA("Media");
-static LLFastTimer::DeclareTimer FTM_TEXTURE_UPDATE_TEST("Test");
+static LLTrace::BlockTimerStatHandle FTM_TEXTURE_UPDATE_MEDIA("Media");
+static LLTrace::BlockTimerStatHandle FTM_TEXTURE_UPDATE_TEST("Test");
//static
void LLViewerTexture::updateClass(const F32 velocity, const F32 angular_velocity)
{
- sCurrentTime = gFrameTimeSeconds ;
+ sCurrentTime = gFrameTimeSeconds;
LLTexturePipelineTester* tester = (LLTexturePipelineTester*)LLMetricPerformanceTesterBasic::getTester(sTesterName);
if (tester)
{
- LLFastTimer t(FTM_TEXTURE_UPDATE_TEST);
- tester->update() ;
+ LL_RECORD_BLOCK_TIME(FTM_TEXTURE_UPDATE_TEST);
+ tester->update();
}
{
- LLFastTimer t(FTM_TEXTURE_UPDATE_MEDIA);
- LLViewerMediaTexture::updateClass() ;
+ LL_RECORD_BLOCK_TIME(FTM_TEXTURE_UPDATE_MEDIA);
+ LLViewerMediaTexture::updateClass();
}
- sBoundTextureMemoryInBytes = LLImageGL::sBoundTextureMemoryInBytes;//in bytes
- sTotalTextureMemoryInBytes = LLImageGL::sGlobalTextureMemoryInBytes;//in bytes
- sMaxBoundTextureMemInMegaBytes = gTextureList.getMaxResidentTexMem();//in MB
- sMaxTotalTextureMemInMegaBytes = gTextureList.getMaxTotalTextureMem() ;//in MB
- sMaxDesiredTextureMemInBytes = MEGA_BYTES_TO_BYTES(sMaxTotalTextureMemInMegaBytes) ; //in Bytes, by default and when total used texture memory is small.
+ sBoundTextureMemory = LLImageGL::sBoundTextureMemory;
+ sTotalTextureMemory = LLImageGL::sGlobalTextureMemory;
+ sMaxBoundTextureMem = gTextureList.getMaxResidentTexMem();
+ sMaxTotalTextureMem = gTextureList.getMaxTotalTextureMem();
+ sMaxDesiredTextureMem = sMaxTotalTextureMem; //in Bytes, by default and when total used texture memory is small.
- if (BYTES_TO_MEGA_BYTES(sBoundTextureMemoryInBytes) >= sMaxBoundTextureMemInMegaBytes ||
- BYTES_TO_MEGA_BYTES(sTotalTextureMemoryInBytes) >= sMaxTotalTextureMemInMegaBytes)
+ if (sBoundTextureMemory >= sMaxBoundTextureMem ||
+ sTotalTextureMemory >= sMaxTotalTextureMem)
{
- //when texture memory overflows, lower down the threashold to release the textures more aggressively.
- sMaxDesiredTextureMemInBytes = llmin((S32)(sMaxDesiredTextureMemInBytes * 0.75f) , MEGA_BYTES_TO_BYTES(MAX_VIDEO_RAM_IN_MEGA_BYTES)) ;//512 MB
+ //when texture memory overflows, lower down the threshold to release the textures more aggressively.
+ sMaxDesiredTextureMem = llmin(sMaxDesiredTextureMem * 0.75f, F32Bytes(gMaxVideoRam));
// If we are using more texture memory than we should,
// scale up the desired discard level
@@ -554,8 +558,8 @@ void LLViewerTexture::updateClass(const F32 velocity, const F32 angular_velocity
sEvaluationTimer.reset();
}
else if (sDesiredDiscardBias > 0.0f &&
- BYTES_TO_MEGA_BYTES(sBoundTextureMemoryInBytes) < sMaxBoundTextureMemInMegaBytes * texmem_lower_bound_scale &&
- BYTES_TO_MEGA_BYTES(sTotalTextureMemoryInBytes) < sMaxTotalTextureMemInMegaBytes * texmem_lower_bound_scale)
+ sBoundTextureMemory < sMaxBoundTextureMem * texmem_lower_bound_scale &&
+ sTotalTextureMemory < sMaxTotalTextureMem * texmem_lower_bound_scale)
{
// If we are using less texture memory than we should,
// scale down the desired discard level
@@ -566,14 +570,14 @@ void LLViewerTexture::updateClass(const F32 velocity, const F32 angular_velocity
}
}
sDesiredDiscardBias = llclamp(sDesiredDiscardBias, desired_discard_bias_min, desired_discard_bias_max);
-
- F32 camera_moving_speed = LLViewerCamera::getInstance()->getAverageSpeed() ;
+
+ F32 camera_moving_speed = LLViewerCamera::getInstance()->getAverageSpeed();
F32 camera_angular_speed = LLViewerCamera::getInstance()->getAverageAngularSpeed();
sCameraMovingBias = llmax(0.2f * camera_moving_speed, 2.0f * camera_angular_speed - 1);
sCameraMovingDiscardBias = (S8)(sCameraMovingBias);
- LLViewerTexture::sFreezeImageScalingDown = (BYTES_TO_MEGA_BYTES(sBoundTextureMemoryInBytes) < 0.75f * sMaxBoundTextureMemInMegaBytes * texmem_middle_bound_scale) &&
- (BYTES_TO_MEGA_BYTES(sTotalTextureMemoryInBytes) < 0.75f * sMaxTotalTextureMemInMegaBytes * texmem_middle_bound_scale) ;
+ LLViewerTexture::sFreezeImageScalingDown = (sBoundTextureMemory < 0.75f * sMaxBoundTextureMem * texmem_middle_bound_scale) &&
+ (sTotalTextureMemory < 0.75f * sMaxTotalTextureMem * texmem_middle_bound_scale);
}
//end of static functions
@@ -618,7 +622,7 @@ LLViewerTexture::LLViewerTexture(const LLImageRaw* raw, BOOL usemipmaps) :
LLViewerTexture::~LLViewerTexture()
{
- // LL_DEBUGS("Avatar") << mID << llendl;
+ // LL_DEBUGS("Avatar") << mID << LL_ENDL;
cleanup();
sImageCount--;
}
@@ -629,31 +633,31 @@ void LLViewerTexture::init(bool firstinit)
mSelectedTime = 0.f;
mMaxVirtualSize = 0.f;
mMaxVirtualSizeResetInterval = 1;
- mMaxVirtualSizeResetCounter = mMaxVirtualSizeResetInterval ;
- mAdditionalDecodePriority = 0.f ;
- mParcelMedia = NULL ;
+ mMaxVirtualSizeResetCounter = mMaxVirtualSizeResetInterval;
+ mAdditionalDecodePriority = 0.f;
+ mParcelMedia = NULL;
mNumVolumes = 0;
- mFaceList[LLRender::DIFFUSE_MAP].clear() ;
- mFaceList[LLRender::NORMAL_MAP].clear() ;
- mFaceList[LLRender::SPECULAR_MAP].clear() ;
+ mFaceList[LLRender::DIFFUSE_MAP].clear();
+ mFaceList[LLRender::NORMAL_MAP].clear();
+ mFaceList[LLRender::SPECULAR_MAP].clear();
mNumFaces[LLRender::DIFFUSE_MAP] =
mNumFaces[LLRender::NORMAL_MAP] =
- mNumFaces[LLRender::SPECULAR_MAP] = 0 ;
+ mNumFaces[LLRender::SPECULAR_MAP] = 0;
mVolumeList.clear();
}
//virtual
S8 LLViewerTexture::getType() const
{
- return LLViewerTexture::LOCAL_TEXTURE ;
+ return LLViewerTexture::LOCAL_TEXTURE;
}
void LLViewerTexture::cleanup()
{
- mFaceList[LLRender::DIFFUSE_MAP].clear() ;
- mFaceList[LLRender::NORMAL_MAP].clear() ;
- mFaceList[LLRender::SPECULAR_MAP].clear() ;
+ mFaceList[LLRender::DIFFUSE_MAP].clear();
+ mFaceList[LLRender::NORMAL_MAP].clear();
+ mFaceList[LLRender::SPECULAR_MAP].clear();
mVolumeList.clear();
}
@@ -662,20 +666,20 @@ void LLViewerTexture::dump()
{
LLGLTexture::dump();
- llinfos << "LLViewerTexture"
+ LL_INFOS() << "LLViewerTexture"
<< " mID " << mID
- << llendl;
+ << LL_ENDL;
}
void LLViewerTexture::setBoostLevel(S32 level)
{
if(mBoostLevel != level)
{
- mBoostLevel = level ;
+ mBoostLevel = level;
if(mBoostLevel != LLViewerTexture::BOOST_NONE &&
mBoostLevel != LLViewerTexture::BOOST_SELECTED)
{
- setNoDelete() ;
+ setNoDelete();
}
}
@@ -683,6 +687,30 @@ void LLViewerTexture::setBoostLevel(S32 level)
{
mSelectedTime = gFrameTimeSeconds;
}
+
+}
+
+bool LLViewerTexture::isActiveFetching()
+{
+ return false;
+}
+
+bool LLViewerTexture::bindDebugImage(const S32 stage)
+{
+ if (stage < 0) return false;
+
+ bool res = true;
+ if (LLViewerTexture::sCheckerBoardImagep.notNull() && (this != LLViewerTexture::sCheckerBoardImagep.get()))
+ {
+ res = gGL.getTexUnit(stage)->bind(LLViewerTexture::sCheckerBoardImagep);
+ }
+
+ if(!res)
+ {
+ return bindDefaultImage(stage);
+ }
+
+ return res;
}
bool LLViewerTexture::bindDefaultImage(S32 stage)
@@ -701,17 +729,17 @@ bool LLViewerTexture::bindDefaultImage(S32 stage)
}
if (!res)
{
- llwarns << "LLViewerTexture::bindDefaultImage failed." << llendl;
+ LL_WARNS() << "LLViewerTexture::bindDefaultImage failed." << LL_ENDL;
}
stop_glerror();
//check if there is cached raw image and switch to it if possible
- switchToCachedImage() ;
+ switchToCachedImage();
LLTexturePipelineTester* tester = (LLTexturePipelineTester*)LLMetricPerformanceTesterBasic::getTester(sTesterName);
if (tester)
{
- tester->updateGrayTextureBinding() ;
+ tester->updateGrayTextureBinding();
}
return res;
}
@@ -731,17 +759,17 @@ void LLViewerTexture::addTextureStats(F32 virtual_size, BOOL needs_gltexture) co
{
if(needs_gltexture)
{
- mNeedsGLTexture = TRUE ;
+ mNeedsGLTexture = TRUE;
}
virtual_size *= sTexelPixelRatio;
if(!mMaxVirtualSizeResetCounter)
{
//flag to reset the values because the old values are used.
- resetMaxVirtualSizeResetCounter() ;
+ resetMaxVirtualSizeResetCounter();
mMaxVirtualSize = virtual_size;
- mAdditionalDecodePriority = 0.f ;
- mNeedsGLTexture = needs_gltexture ;
+ mAdditionalDecodePriority = 0.f;
+ mNeedsGLTexture = needs_gltexture;
}
else if (virtual_size > mMaxVirtualSize)
{
@@ -751,15 +779,15 @@ void LLViewerTexture::addTextureStats(F32 virtual_size, BOOL needs_gltexture) co
void LLViewerTexture::resetTextureStats()
{
- mMaxVirtualSize = 0.0f ;
- mAdditionalDecodePriority = 0.f ;
- mMaxVirtualSizeResetCounter = 0 ;
+ mMaxVirtualSize = 0.0f;
+ mAdditionalDecodePriority = 0.f;
+ mMaxVirtualSizeResetCounter = 0;
}
//virtual
F32 LLViewerTexture::getMaxVirtualSize()
{
- return mMaxVirtualSize ;
+ return mMaxVirtualSize;
}
//virtual
@@ -775,12 +803,12 @@ void LLViewerTexture::addFace(U32 ch, LLFace* facep)
if(mNumFaces[ch] >= mFaceList[ch].size())
{
- mFaceList[ch].resize(2 * mNumFaces[ch] + 1) ;
+ mFaceList[ch].resize(2 * mNumFaces[ch] + 1);
}
- mFaceList[ch][mNumFaces[ch]] = facep ;
- facep->setIndexInTex(ch, mNumFaces[ch]) ;
- mNumFaces[ch]++ ;
- mLastFaceListUpdateTimer.reset() ;
+ mFaceList[ch][mNumFaces[ch]] = facep;
+ facep->setIndexInTex(ch, mNumFaces[ch]);
+ mNumFaces[ch]++;
+ mLastFaceListUpdateTimer.reset();
}
//virtual
@@ -790,18 +818,18 @@ void LLViewerTexture::removeFace(U32 ch, LLFace* facep)
if(mNumFaces[ch] > 1)
{
- S32 index = facep->getIndexInTex(ch) ;
+ S32 index = facep->getIndexInTex(ch);
llassert(index < mFaceList[ch].size());
llassert(index < mNumFaces[ch]);
- mFaceList[ch][index] = mFaceList[ch][--mNumFaces[ch]] ;
- mFaceList[ch][index]->setIndexInTex(ch, index) ;
+ mFaceList[ch][index] = mFaceList[ch][--mNumFaces[ch]];
+ mFaceList[ch][index]->setIndexInTex(ch, index);
}
else
{
- mFaceList[ch].clear() ;
- mNumFaces[ch] = 0 ;
+ mFaceList[ch].clear();
+ mNumFaces[ch] = 0;
}
- mLastFaceListUpdateTimer.reset() ;
+ mLastFaceListUpdateTimer.reset();
}
S32 LLViewerTexture::getTotalNumFaces() const
@@ -828,12 +856,12 @@ void LLViewerTexture::addVolume(LLVOVolume* volumep)
{
if( mNumVolumes >= mVolumeList.size())
{
- mVolumeList.resize(2 * mNumVolumes + 1) ;
+ mVolumeList.resize(2 * mNumVolumes + 1);
}
- mVolumeList[mNumVolumes] = volumep ;
- volumep->setIndexInTex(mNumVolumes) ;
- mNumVolumes++ ;
- mLastVolumeListUpdateTimer.reset() ;
+ mVolumeList[mNumVolumes] = volumep;
+ volumep->setIndexInTex(mNumVolumes);
+ mNumVolumes++;
+ mLastVolumeListUpdateTimer.reset();
}
//virtual
@@ -841,29 +869,29 @@ void LLViewerTexture::removeVolume(LLVOVolume* volumep)
{
if(mNumVolumes > 1)
{
- S32 index = volumep->getIndexInTex() ;
+ S32 index = volumep->getIndexInTex();
llassert(index < mVolumeList.size());
llassert(index < mNumVolumes);
- mVolumeList[index] = mVolumeList[--mNumVolumes] ;
- mVolumeList[index]->setIndexInTex(index) ;
+ mVolumeList[index] = mVolumeList[--mNumVolumes];
+ mVolumeList[index]->setIndexInTex(index);
}
else
{
- mVolumeList.clear() ;
- mNumVolumes = 0 ;
+ mVolumeList.clear();
+ mNumVolumes = 0;
}
- mLastVolumeListUpdateTimer.reset() ;
+ mLastVolumeListUpdateTimer.reset();
}
S32 LLViewerTexture::getNumVolumes() const
{
- return mNumVolumes ;
+ return mNumVolumes;
}
void LLViewerTexture::reorganizeFaceList()
{
static const F32 MAX_WAIT_TIME = 20.f; // seconds
- static const U32 MAX_EXTRA_BUFFER_SIZE = 4 ;
+ static const U32 MAX_EXTRA_BUFFER_SIZE = 4;
if(mLastFaceListUpdateTimer.getElapsedTimeF32() < MAX_WAIT_TIME)
{
@@ -873,32 +901,32 @@ void LLViewerTexture::reorganizeFaceList()
for (U32 i = 0; i < LLRender::NUM_TEXTURE_CHANNELS; ++i)
{
if(mNumFaces[i] + MAX_EXTRA_BUFFER_SIZE > mFaceList[i].size())
- {
- return ;
- }
-
+ {
+ return;
+ }
+
mFaceList[i].erase(mFaceList[i].begin() + mNumFaces[i], mFaceList[i].end());
}
- mLastFaceListUpdateTimer.reset() ;
+ mLastFaceListUpdateTimer.reset();
}
void LLViewerTexture::reorganizeVolumeList()
{
static const F32 MAX_WAIT_TIME = 20.f; // seconds
- static const U32 MAX_EXTRA_BUFFER_SIZE = 4 ;
+ static const U32 MAX_EXTRA_BUFFER_SIZE = 4;
if(mNumVolumes + MAX_EXTRA_BUFFER_SIZE > mVolumeList.size())
{
- return ;
+ return;
}
if(mLastVolumeListUpdateTimer.getElapsedTimeF32() < MAX_WAIT_TIME)
{
- return ;
+ return;
}
- mLastVolumeListUpdateTimer.reset() ;
+ mLastVolumeListUpdateTimer.reset();
mVolumeList.erase(mVolumeList.begin() + mNumVolumes, mVolumeList.end());
}
@@ -916,7 +944,7 @@ void LLViewerTexture::setCachedRawImage(S32 discard_level, LLImageRaw* imageraw)
BOOL LLViewerTexture::isLargeImage()
{
- return (S32)mTexelsPerImage > LLViewerTexture::sMinLargeImageSize ;
+ return (S32)mTexelsPerImage > LLViewerTexture::sMinLargeImageSize;
}
//virtual
@@ -925,7 +953,7 @@ void LLViewerTexture::updateBindStatsForTester()
LLTexturePipelineTester* tester = (LLTexturePipelineTester*)LLMetricPerformanceTesterBasic::getTester(sTesterName);
if (tester)
{
- tester->updateTextureBindingStats(this) ;
+ tester->updateTextureBindingStats(this);
}
}
@@ -941,19 +969,19 @@ LLViewerFetchedTexture::LLViewerFetchedTexture(const LLUUID& id, FTType f_type,
: LLViewerTexture(id, usemipmaps),
mTargetHost(host)
{
- init(TRUE) ;
+ init(TRUE);
mFTType = f_type;
if (mFTType == FTT_HOST_BAKE)
{
mCanUseHTTP = false;
}
- generateGLTexture() ;
+ generateGLTexture();
}
LLViewerFetchedTexture::LLViewerFetchedTexture(const LLImageRaw* raw, FTType f_type, BOOL usemipmaps)
: LLViewerTexture(raw, usemipmaps)
{
- init(TRUE) ;
+ init(TRUE);
mFTType = f_type;
}
@@ -961,9 +989,9 @@ LLViewerFetchedTexture::LLViewerFetchedTexture(const std::string& url, FTType f_
: LLViewerTexture(id, usemipmaps),
mUrl(url)
{
- init(TRUE) ;
+ init(TRUE);
mFTType = f_type;
- generateGLTexture() ;
+ generateGLTexture();
}
void LLViewerFetchedTexture::init(bool firstinit)
@@ -974,7 +1002,7 @@ void LLViewerFetchedTexture::init(bool firstinit)
mRequestedDiscardLevel = -1;
mRequestedDownloadPriority = 0.f;
mFullyLoaded = FALSE;
- mCanUseHTTP = true ;
+ mCanUseHTTP = true;
mDesiredDiscardLevel = MAX_DISCARD_LEVEL + 1;
mMinDesiredDiscardLevel = MAX_DISCARD_LEVEL + 1;
@@ -982,7 +1010,7 @@ void LLViewerFetchedTexture::init(bool firstinit)
mKnownDrawWidth = 0;
mKnownDrawHeight = 0;
- mKnownDrawSizeChanged = FALSE ;
+ mKnownDrawSizeChanged = FALSE;
if (firstinit)
{
@@ -995,7 +1023,7 @@ void LLViewerFetchedTexture::init(bool firstinit)
mIsMissingAsset = FALSE;
mLoadedCallbackDesiredDiscardLevel = S8_MAX;
- mPauseLoadedCallBacks = FALSE ;
+ mPauseLoadedCallBacks = FALSE;
mNeedsCreateTexture = FALSE;
@@ -1010,21 +1038,21 @@ void LLViewerFetchedTexture::init(bool firstinit)
mDownloadProgress = 0.f;
mFetchDeltaTime = 999999.f;
mRequestDeltaTime = 0.f;
- mForSculpt = FALSE ;
- mIsFetched = FALSE ;
+ mForSculpt = FALSE;
+ mIsFetched = FALSE;
mInFastCacheList = FALSE;
- mCachedRawImage = NULL ;
- mCachedRawDiscardLevel = -1 ;
- mCachedRawImageReady = FALSE ;
-
- mSavedRawImage = NULL ;
- mForceToSaveRawImage = FALSE ;
- mSaveRawImage = FALSE ;
- mSavedRawDiscardLevel = -1 ;
- mDesiredSavedRawDiscardLevel = -1 ;
- mLastReferencedSavedRawImageTime = 0.0f ;
- mKeptSavedRawImageTime = 0.f ;
+ mCachedRawImage = NULL;
+ mCachedRawDiscardLevel = -1;
+ mCachedRawImageReady = FALSE;
+
+ mSavedRawImage = NULL;
+ mForceToSaveRawImage = FALSE;
+ mSaveRawImage = FALSE;
+ mSavedRawDiscardLevel = -1;
+ mDesiredSavedRawDiscardLevel = -1;
+ mLastReferencedSavedRawImageTime = 0.0f;
+ mKeptSavedRawImageTime = 0.f;
mLastCallBackActiveTime = 0.f;
mInDebug = FALSE;
@@ -1047,7 +1075,7 @@ LLViewerFetchedTexture::~LLViewerFetchedTexture()
//virtual
S8 LLViewerFetchedTexture::getType() const
{
- return LLViewerTexture::FETCHED_TEXTURE ;
+ return LLViewerTexture::FETCHED_TEXTURE;
}
FTType LLViewerFetchedTexture::getFTType() const
@@ -1064,7 +1092,7 @@ void LLViewerFetchedTexture::cleanup()
// We never finished loading the image. Indicate failure.
// Note: this allows mLoadedCallbackUserData to be cleaned up.
entryp->mCallback( FALSE, this, NULL, NULL, 0, TRUE, entryp->mUserData );
- entryp->removeTexture(this) ;
+ entryp->removeTexture(this);
delete entryp;
}
mLoadedCallbackList.clear();
@@ -1072,10 +1100,10 @@ void LLViewerFetchedTexture::cleanup()
// Clean up image data
destroyRawImage();
- mCachedRawImage = NULL ;
- mCachedRawDiscardLevel = -1 ;
- mCachedRawImageReady = FALSE ;
- mSavedRawImage = NULL ;
+ mCachedRawImage = NULL;
+ mCachedRawDiscardLevel = -1;
+ mCachedRawImageReady = FALSE;
+ mSavedRawImage = NULL;
mSavedRawDiscardLevel = -1;
}
@@ -1088,7 +1116,7 @@ void LLViewerFetchedTexture::loadFromFastCache()
}
mInFastCacheList = FALSE;
- mRawImage = LLAppViewer::getTextureCache()->readFromFastCache(getID(), mRawDiscardLevel) ;
+ mRawImage = LLAppViewer::getTextureCache()->readFromFastCache(getID(), mRawDiscardLevel);
if(mRawImage.notNull())
{
mFullWidth = mRawImage->getWidth() << mRawDiscardLevel;
@@ -1099,58 +1127,58 @@ void LLViewerFetchedTexture::loadFromFastCache()
{
//discard all oversized textures.
destroyRawImage();
- llwarns << "oversized, setting as missing" << llendl;
+ LL_WARNS() << "oversized, setting as missing" << LL_ENDL;
setIsMissingAsset();
- mRawDiscardLevel = INVALID_DISCARD_LEVEL ;
+ mRawDiscardLevel = INVALID_DISCARD_LEVEL;
}
else
{
mRequestedDiscardLevel = mDesiredDiscardLevel + 1;
mIsRawImageValid = TRUE;
- addToCreateTexture() ;
+ addToCreateTexture();
}
}
}
void LLViewerFetchedTexture::setForSculpt()
{
- static const S32 MAX_INTERVAL = 8 ; //frames
+ static const S32 MAX_INTERVAL = 8; //frames
- mForSculpt = TRUE ;
+ mForSculpt = TRUE;
if(isForSculptOnly() && hasGLTexture() && !getBoundRecently())
{
- destroyGLTexture() ; //sculpt image does not need gl texture.
+ destroyGLTexture(); //sculpt image does not need gl texture.
mTextureState = ACTIVE;
}
- checkCachedRawSculptImage() ;
- setMaxVirtualSizeResetInterval(MAX_INTERVAL) ;
+ checkCachedRawSculptImage();
+ setMaxVirtualSizeResetInterval(MAX_INTERVAL);
}
BOOL LLViewerFetchedTexture::isForSculptOnly() const
{
- return mForSculpt && !mNeedsGLTexture ;
+ return mForSculpt && !mNeedsGLTexture;
}
BOOL LLViewerFetchedTexture::isDeleted()
{
- return mTextureState == DELETED ;
+ return mTextureState == DELETED;
}
BOOL LLViewerFetchedTexture::isInactive()
{
- return mTextureState == INACTIVE ;
+ return mTextureState == INACTIVE;
}
BOOL LLViewerFetchedTexture::isDeletionCandidate()
{
- return mTextureState == DELETION_CANDIDATE ;
+ return mTextureState == DELETION_CANDIDATE;
}
void LLViewerFetchedTexture::setDeletionCandidate()
{
if(mGLTexturep.notNull() && mGLTexturep->getTexName() && (mTextureState == INACTIVE))
{
- mTextureState = DELETION_CANDIDATE ;
+ mTextureState = DELETION_CANDIDATE;
}
}
@@ -1159,7 +1187,7 @@ void LLViewerFetchedTexture::setInactive()
{
if(mTextureState == ACTIVE && mGLTexturep.notNull() && mGLTexturep->getTexName() && !mGLTexturep->getBoundRecently())
{
- mTextureState = INACTIVE ;
+ mTextureState = INACTIVE;
}
}
@@ -1176,84 +1204,84 @@ void LLViewerFetchedTexture::dump()
{
LLViewerTexture::dump();
- llinfos << "Dump : " << mID
+ LL_INFOS() << "Dump : " << mID
<< ", mIsMissingAsset = " << (S32)mIsMissingAsset
<< ", mFullWidth = " << (S32)mFullWidth
<< ", mFullHeight = " << (S32)mFullHeight
<< ", mOrigWidth = " << (S32)mOrigWidth
<< ", mOrigHeight = " << (S32)mOrigHeight
- << llendl;
- llinfos << " : "
+ << LL_ENDL;
+ LL_INFOS() << " : "
<< " mFullyLoaded = " << (S32)mFullyLoaded
<< ", mFetchState = " << (S32)mFetchState
<< ", mFetchPriority = " << (S32)mFetchPriority
<< ", mDownloadProgress = " << (F32)mDownloadProgress
- << llendl;
- llinfos << " : "
+ << LL_ENDL;
+ LL_INFOS() << " : "
<< " mHasFetcher = " << (S32)mHasFetcher
<< ", mIsFetching = " << (S32)mIsFetching
<< ", mIsFetched = " << (S32)mIsFetched
<< ", mBoostLevel = " << (S32)mBoostLevel
- << llendl;
+ << LL_ENDL;
}
///////////////////////////////////////////////////////////////////////////////
// ONLY called from LLViewerFetchedTextureList
void LLViewerFetchedTexture::destroyTexture()
{
- if(LLImageGL::sGlobalTextureMemoryInBytes < sMaxDesiredTextureMemInBytes * 0.95f)//not ready to release unused memory.
+ if(LLImageGL::sGlobalTextureMemory < sMaxDesiredTextureMem * 0.95f)//not ready to release unused memory.
{
return ;
}
if (mNeedsCreateTexture)//return if in the process of generating a new texture.
{
- return ;
+ return;
}
-
- //LL_DEBUGS("Avatar") << mID << llendl;
- destroyGLTexture() ;
- mFullyLoaded = FALSE ;
+
+ //LL_DEBUGS("Avatar") << mID << LL_ENDL;
+ destroyGLTexture();
+ mFullyLoaded = FALSE;
}
void LLViewerFetchedTexture::addToCreateTexture()
{
- bool force_update = false ;
+ bool force_update = false;
if (getComponents() != mRawImage->getComponents())
{
// We've changed the number of components, so we need to move any
// objects using this pool to a different pool.
mComponents = mRawImage->getComponents();
- mGLTexturep->setComponents(mComponents) ;
- force_update = true ;
+ mGLTexturep->setComponents(mComponents);
+ force_update = true;
for (U32 j = 0; j < LLRender::NUM_TEXTURE_CHANNELS; ++j)
{
llassert(mNumFaces[j] <= mFaceList[j].size());
- for(U32 i = 0 ; i < mNumFaces[j]; i++)
- {
- mFaceList[j][i]->dirtyTexture() ;
+ for(U32 i = 0; i < mNumFaces[j]; i++)
+ {
+ mFaceList[j][i]->dirtyTexture();
}
}
//discard the cached raw image and the saved raw image
- mCachedRawImageReady = FALSE ;
- mCachedRawDiscardLevel = -1 ;
- mCachedRawImage = NULL ;
- mSavedRawDiscardLevel = -1 ;
- mSavedRawImage = NULL ;
+ mCachedRawImageReady = FALSE;
+ mCachedRawDiscardLevel = -1;
+ mCachedRawImage = NULL;
+ mSavedRawDiscardLevel = -1;
+ mSavedRawImage = NULL;
}
if(isForSculptOnly())
{
//just update some variables, not to create a real GL texture.
- createGLTexture(mRawDiscardLevel, mRawImage, 0, FALSE) ;
- mNeedsCreateTexture = FALSE ;
+ createGLTexture(mRawDiscardLevel, mRawImage, 0, FALSE);
+ mNeedsCreateTexture = FALSE;
destroyRawImage();
}
else if(!force_update && getDiscardLevel() > -1 && getDiscardLevel() <= mRawDiscardLevel)
{
- mNeedsCreateTexture = FALSE ;
+ mNeedsCreateTexture = FALSE;
destroyRawImage();
}
else
@@ -1273,11 +1301,11 @@ void LLViewerFetchedTexture::addToCreateTexture()
//scale it down to size >= LLViewerTexture::sMinLargeImageSize
if(w * h > LLViewerTexture::sMinLargeImageSize)
{
- S32 d_level = llmin(mRequestedDiscardLevel, (S32)mDesiredDiscardLevel) - mRawDiscardLevel ;
+ S32 d_level = llmin(mRequestedDiscardLevel, (S32)mDesiredDiscardLevel) - mRawDiscardLevel;
if(d_level > 0)
{
- S32 i = 0 ;
+ S32 i = 0;
while((d_level > 0) && ((w >> i) * (h >> i) > LLViewerTexture::sMinLargeImageSize))
{
i++;
@@ -1285,12 +1313,12 @@ void LLViewerFetchedTexture::addToCreateTexture()
}
if(i > 0)
{
- mRawDiscardLevel += i ;
+ mRawDiscardLevel += i;
if(mRawDiscardLevel >= getDiscardLevel() && getDiscardLevel() > 0)
{
- mNeedsCreateTexture = FALSE ;
+ mNeedsCreateTexture = FALSE;
destroyRawImage();
- return ;
+ return;
}
{
@@ -1306,7 +1334,7 @@ void LLViewerFetchedTexture::addToCreateTexture()
mNeedsCreateTexture = TRUE;
gTextureList.mCreateTextureList.insert(this);
}
- return ;
+ return;
}
// ONLY called from LLViewerTextureList
@@ -1320,12 +1348,12 @@ BOOL LLViewerFetchedTexture::createTexture(S32 usename/*= 0*/)
mNeedsCreateTexture = FALSE;
if (mRawImage.isNull())
{
- llerrs << "LLViewerTexture trying to create texture with no Raw Image" << llendl;
+ LL_ERRS() << "LLViewerTexture trying to create texture with no Raw Image" << LL_ENDL;
}
-// llinfos << llformat("IMAGE Creating (%d) [%d x %d] Bytes: %d ",
+// LL_INFOS() << llformat("IMAGE Creating (%d) [%d x %d] Bytes: %d ",
// mRawDiscardLevel,
// mRawImage->getWidth(), mRawImage->getHeight(),mRawImage->getDataSize())
-// << mID.getString() << llendl;
+// << mID.getString() << LL_ENDL;
BOOL res = TRUE;
// store original size only for locally-sourced images
@@ -1360,14 +1388,14 @@ BOOL LLViewerFetchedTexture::createTexture(S32 usename/*= 0*/)
U32 raw_height = mRawImage->getHeight() << mRawDiscardLevel;
if( raw_width > MAX_IMAGE_SIZE || raw_height > MAX_IMAGE_SIZE )
{
- llinfos << "Width or height is greater than " << MAX_IMAGE_SIZE << ": (" << raw_width << "," << raw_height << ")" << llendl;
+ LL_INFOS() << "Width or height is greater than " << MAX_IMAGE_SIZE << ": (" << raw_width << "," << raw_height << ")" << LL_ENDL;
size_okay = false;
}
if (!LLImageGL::checkSize(mRawImage->getWidth(), mRawImage->getHeight()))
{
// A non power-of-two image was uploaded (through a non standard client)
- llinfos << "Non power of two width or height: (" << mRawImage->getWidth() << "," << mRawImage->getHeight() << ")" << llendl;
+ LL_INFOS() << "Non power of two width or height: (" << mRawImage->getWidth() << "," << mRawImage->getHeight() << ")" << LL_ENDL;
size_okay = false;
}
@@ -1376,15 +1404,15 @@ BOOL LLViewerFetchedTexture::createTexture(S32 usename/*= 0*/)
// An inappropriately-sized image was uploaded (through a non standard client)
// We treat these images as missing assets which causes them to
// be renderd as 'missing image' and to stop requesting data
- llwarns << "!size_ok, setting as missing" << llendl;
+ LL_WARNS() << "!size_ok, setting as missing" << LL_ENDL;
setIsMissingAsset();
destroyRawImage();
return FALSE;
}
- res = mGLTexturep->createGLTexture(mRawDiscardLevel, mRawImage, usename, TRUE, mBoostLevel);
+ res = mGLTexturep->createGLTexture(mRawDiscardLevel, mRawImage, usename, TRUE, mBoostLevel);
- setActive() ;
+ setActive();
if (!needsToSaveRawImage())
{
@@ -1400,11 +1428,11 @@ void LLViewerFetchedTexture::setKnownDrawSize(S32 width, S32 height)
{
if(mKnownDrawWidth < width || mKnownDrawHeight < height)
{
- mKnownDrawWidth = llmax(mKnownDrawWidth, width) ;
- mKnownDrawHeight = llmax(mKnownDrawHeight, height) ;
+ mKnownDrawWidth = llmax(mKnownDrawWidth, width);
+ mKnownDrawHeight = llmax(mKnownDrawHeight, height);
- mKnownDrawSizeChanged = TRUE ;
- mFullyLoaded = FALSE ;
+ mKnownDrawSizeChanged = TRUE;
+ mFullyLoaded = FALSE;
}
addTextureStats((F32)(mKnownDrawWidth * mKnownDrawHeight));
}
@@ -1416,13 +1444,13 @@ void LLViewerFetchedTexture::processTextureStats()
{
if(mDesiredDiscardLevel > mMinDesiredDiscardLevel)//need to load more
{
- mDesiredDiscardLevel = llmin(mDesiredDiscardLevel, mMinDesiredDiscardLevel) ;
- mFullyLoaded = FALSE ;
+ mDesiredDiscardLevel = llmin(mDesiredDiscardLevel, mMinDesiredDiscardLevel);
+ mFullyLoaded = FALSE;
}
}
else
{
- updateVirtualSize() ;
+ updateVirtualSize();
static LLCachedControl<bool> textures_fullres(gSavedSettings,"TextureLoadFullRes", false);
@@ -1432,7 +1460,7 @@ void LLViewerFetchedTexture::processTextureStats()
}
else if(!mFullWidth || !mFullHeight)
{
- mDesiredDiscardLevel = llmin(getMaxDiscardLevel(), (S32)mLoadedCallbackDesiredDiscardLevel) ;
+ mDesiredDiscardLevel = llmin(getMaxDiscardLevel(), (S32)mLoadedCallbackDesiredDiscardLevel);
}
else
{
@@ -1450,36 +1478,36 @@ void LLViewerFetchedTexture::processTextureStats()
else if(mKnownDrawSizeChanged)//known draw size is set
{
mDesiredDiscardLevel = (S8)llmin(log((F32)mFullWidth / mKnownDrawWidth) / log_2,
- log((F32)mFullHeight / mKnownDrawHeight) / log_2) ;
- mDesiredDiscardLevel = llclamp(mDesiredDiscardLevel, (S8)0, (S8)getMaxDiscardLevel()) ;
- mDesiredDiscardLevel = llmin(mDesiredDiscardLevel, mMinDesiredDiscardLevel) ;
+ log((F32)mFullHeight / mKnownDrawHeight) / log_2);
+ mDesiredDiscardLevel = llclamp(mDesiredDiscardLevel, (S8)0, (S8)getMaxDiscardLevel());
+ mDesiredDiscardLevel = llmin(mDesiredDiscardLevel, mMinDesiredDiscardLevel);
}
- mKnownDrawSizeChanged = FALSE ;
+ mKnownDrawSizeChanged = FALSE;
if(getDiscardLevel() >= 0 && (getDiscardLevel() <= mDesiredDiscardLevel))
{
- mFullyLoaded = TRUE ;
+ mFullyLoaded = TRUE;
}
}
}
if(mForceToSaveRawImage && mDesiredSavedRawDiscardLevel >= 0) //force to refetch the texture.
{
- mDesiredDiscardLevel = llmin(mDesiredDiscardLevel, (S8)mDesiredSavedRawDiscardLevel) ;
+ mDesiredDiscardLevel = llmin(mDesiredDiscardLevel, (S8)mDesiredSavedRawDiscardLevel);
if(getDiscardLevel() < 0 || getDiscardLevel() > mDesiredDiscardLevel)
{
- mFullyLoaded = FALSE ;
+ mFullyLoaded = FALSE;
}
}
}
-const F32 MAX_PRIORITY_PIXEL = 999.f ; //pixel area
-const F32 PRIORITY_BOOST_LEVEL_FACTOR = 1000.f ; //boost level
-const F32 PRIORITY_DELTA_DISCARD_LEVEL_FACTOR = 100000.f ; //delta discard
-const S32 MAX_DELTA_DISCARD_LEVEL_FOR_PRIORITY = 4 ;
-const F32 PRIORITY_ADDITIONAL_FACTOR = 1000000.f ; //additional
-const S32 MAX_ADDITIONAL_LEVEL_FOR_PRIORITY = 8 ;
-const F32 PRIORITY_BOOST_HIGH_FACTOR = 10000000.f ;//boost high
+const F32 MAX_PRIORITY_PIXEL = 999.f; //pixel area
+const F32 PRIORITY_BOOST_LEVEL_FACTOR = 1000.f; //boost level
+const F32 PRIORITY_DELTA_DISCARD_LEVEL_FACTOR = 100000.f; //delta discard
+const S32 MAX_DELTA_DISCARD_LEVEL_FOR_PRIORITY = 4;
+const F32 PRIORITY_ADDITIONAL_FACTOR = 1000000.f; //additional
+const S32 MAX_ADDITIONAL_LEVEL_FOR_PRIORITY = 8;
+const F32 PRIORITY_BOOST_HIGH_FACTOR = 10000000.f;//boost high
F32 LLViewerFetchedTexture::calcDecodePriority()
{
#ifndef LL_RELEASE_FOR_DOWNLOAD
@@ -1495,7 +1523,7 @@ F32 LLViewerFetchedTexture::calcDecodePriority()
}
if(mFullyLoaded && !mForceToSaveRawImage)//already loaded for static texture
{
- return -1.0f ; //alreay fetched
+ return -1.0f; //alreay fetched
}
S32 cur_discard = getCurrentDiscardLevelForFetching();
@@ -1510,7 +1538,7 @@ F32 LLViewerFetchedTexture::calcDecodePriority()
}
else if(mDesiredDiscardLevel >= cur_discard && cur_discard > -1)
{
- priority = -2.0f ;
+ priority = -2.0f;
}
else if(mCachedRawDiscardLevel > -1 && mDesiredDiscardLevel >= mCachedRawDiscardLevel)
{
@@ -1547,7 +1575,7 @@ F32 LLViewerFetchedTexture::calcDecodePriority()
S32 ddiscard = MAX_DISCARD_LEVEL - (S32)desired;
ddiscard = llclamp(ddiscard, 0, MAX_DELTA_DISCARD_LEVEL_FOR_PRIORITY);
priority = (ddiscard + 1) * PRIORITY_DELTA_DISCARD_LEVEL_FACTOR;
- setAdditionalDecodePriority(0.1f) ;//boost the textures without any data so far.
+ setAdditionalDecodePriority(0.1f);//boost the textures without any data so far.
}
else if ((mMinDiscardLevel > 0) && (cur_discard <= mMinDiscardLevel))
{
@@ -1582,13 +1610,13 @@ F32 LLViewerFetchedTexture::calcDecodePriority()
// [10,000,000] + [1,000,000-9,000,000] + [100,000-500,000] + [1-20,000] + [0-999]
if (priority > 0.0f)
{
- bool large_enough = mCachedRawImageReady && ((S32)mTexelsPerImage > sMinLargeImageSize) ;
+ bool large_enough = mCachedRawImageReady && ((S32)mTexelsPerImage > sMinLargeImageSize);
if(large_enough)
{
//Note:
//to give small, low-priority textures some chance to be fetched,
//cut the priority in half if the texture size is larger than 256 * 256 and has a 64*64 ready.
- priority *= 0.5f ;
+ priority *= 0.5f;
}
pixel_priority = llclamp(pixel_priority, 0.0f, MAX_PRIORITY_PIXEL);
@@ -1607,7 +1635,7 @@ F32 LLViewerFetchedTexture::calcDecodePriority()
//Note:
//to give small, low-priority textures some chance to be fetched,
//if high priority texture has a 64*64 ready, lower its fetching priority.
- setAdditionalDecodePriority(0.5f) ;
+ setAdditionalDecodePriority(0.5f);
}
else
{
@@ -1624,7 +1652,7 @@ F32 LLViewerFetchedTexture::calcDecodePriority()
//Note:
//to give small, low-priority textures some chance to be fetched,
//cut the additional priority to a quarter if the texture size is larger than 256 * 256 and has a 64*64 ready.
- additional *= 0.25f ;
+ additional *= 0.25f;
}
priority += additional;
}
@@ -1639,9 +1667,9 @@ F32 LLViewerFetchedTexture::maxDecodePriority()
PRIORITY_ADDITIONAL_FACTOR * (MAX_ADDITIONAL_LEVEL_FOR_PRIORITY + 1) + //additional (view dependent factors)
PRIORITY_DELTA_DISCARD_LEVEL_FACTOR * (MAX_DELTA_DISCARD_LEVEL_FOR_PRIORITY + 1) + //delta discard
PRIORITY_BOOST_LEVEL_FACTOR * (BOOST_MAX_LEVEL - 1) + //boost level
- MAX_PRIORITY_PIXEL + 1.0f ; //pixel area.
+ MAX_PRIORITY_PIXEL + 1.0f; //pixel area.
- return max_priority ;
+ return max_priority;
}
//============================================================================
@@ -1652,7 +1680,7 @@ void LLViewerFetchedTexture::setDecodePriority(F32 priority)
if(mDecodePriority < F_ALMOST_ZERO)
{
- mStopFetchingTimer.reset() ;
+ mStopFetchingTimer.reset();
}
}
@@ -1669,35 +1697,35 @@ void LLViewerFetchedTexture::updateVirtualSize()
{
if(!mMaxVirtualSizeResetCounter)
{
- addTextureStats(0.f, FALSE) ;//reset
+ addTextureStats(0.f, FALSE);//reset
}
for (U32 ch = 0; ch < LLRender::NUM_TEXTURE_CHANNELS; ++ch)
- {
+ {
llassert(mNumFaces[ch] <= mFaceList[ch].size());
- for(U32 i = 0 ; i < mNumFaces[ch]; i++)
+ for(U32 i = 0; i < mNumFaces[ch]; i++)
{
- LLFace* facep = mFaceList[ch][i] ;
- if( facep )
+ LLFace* facep = mFaceList[ch][i];
+ if( facep )
+ {
+ LLDrawable* drawable = facep->getDrawable();
+ if (drawable)
{
- LLDrawable* drawable = facep->getDrawable();
- if (drawable)
+ if(drawable->isRecentlyVisible())
{
- if(drawable->isRecentlyVisible())
+ if (getBoostLevel() == LLViewerTexture::BOOST_NONE &&
+ drawable->getVObj() && drawable->getVObj()->isSelected())
{
- if (getBoostLevel() == LLViewerTexture::BOOST_NONE &&
- drawable->getVObj() && drawable->getVObj()->isSelected())
- {
- setBoostLevel(LLViewerTexture::BOOST_SELECTED);
- }
- addTextureStats(facep->getVirtualSize()) ;
- setAdditionalDecodePriority(facep->getImportanceToCamera()) ;
+ setBoostLevel(LLViewerTexture::BOOST_SELECTED);
}
+ addTextureStats(facep->getVirtualSize());
+ setAdditionalDecodePriority(facep->getImportanceToCamera());
}
}
}
}
+ }
//reset whether or not a face was selected after 10 seconds
const F32 SELECTION_RESET_TIME = 10.f;
@@ -1711,26 +1739,26 @@ void LLViewerFetchedTexture::updateVirtualSize()
{
mMaxVirtualSizeResetCounter--;
}
- reorganizeFaceList() ;
+ reorganizeFaceList();
reorganizeVolumeList();
}
S32 LLViewerFetchedTexture::getCurrentDiscardLevelForFetching()
{
- S32 current_discard = getDiscardLevel() ;
+ S32 current_discard = getDiscardLevel();
if(mForceToSaveRawImage)
{
if(mSavedRawDiscardLevel < 0 || current_discard < 0)
{
- current_discard = -1 ;
+ current_discard = -1;
}
else
{
- current_discard = llmax(current_discard, mSavedRawDiscardLevel) ;
+ current_discard = llmax(current_discard, mSavedRawDiscardLevel);
}
}
- return current_discard ;
+ return current_discard;
}
bool LLViewerFetchedTexture::setDebugFetching(S32 debug_level)
@@ -1747,6 +1775,13 @@ bool LLViewerFetchedTexture::setDebugFetching(S32 debug_level)
return true;
}
+bool LLViewerFetchedTexture::isActiveFetching()
+{
+ static LLCachedControl<bool> monitor_enabled(gSavedSettings,"DebugShowTextureInfo");
+
+ return mFetchState > 7 && mFetchState < 10 && monitor_enabled; //in state of WAIT_HTTP_REQ or DECODE_IMAGE.
+}
+
bool LLViewerFetchedTexture::updateFetch()
{
static LLCachedControl<bool> textures_decode_disabled(gSavedSettings,"TextureDecodeDisabled", false);
@@ -1754,7 +1789,7 @@ bool LLViewerFetchedTexture::updateFetch()
static LLCachedControl<S32> sCameraMotionBoost(gSavedSettings,"TextureCameraMotionBoost", 3);
if(textures_decode_disabled)
{
- return false ;
+ return false;
}
mFetchState = 0;
@@ -1789,7 +1824,7 @@ bool LLViewerFetchedTexture::updateFetch()
return false;
}
- S32 current_discard = getCurrentDiscardLevelForFetching() ;
+ S32 current_discard = getCurrentDiscardLevelForFetching();
S32 desired_discard = getDesiredDiscardLevel();
F32 decode_priority = getDecodePriority();
decode_priority = llclamp(decode_priority, 0.0f, maxDecodePriority());
@@ -1807,7 +1842,7 @@ bool LLViewerFetchedTexture::updateFetch()
if (finished)
{
mIsFetching = FALSE;
- mLastPacketTimer.reset() ;
+ mLastPacketTimer.reset();
}
else
{
@@ -1821,8 +1856,8 @@ bool LLViewerFetchedTexture::updateFetch()
LLTexturePipelineTester* tester = (LLTexturePipelineTester*)LLMetricPerformanceTesterBasic::getTester(sTesterName);
if (tester)
{
- mIsFetched = TRUE ;
- tester->updateTextureLoadingStats(this, mRawImage, LLAppViewer::getTextureFetch()->isFromLocalCache(mID)) ;
+ mIsFetched = TRUE;
+ tester->updateTextureLoadingStats(this, mRawImage, LLAppViewer::getTextureFetch()->isFromLocalCache(mID));
}
mRawDiscardLevel = fetch_discard;
if ((mRawImage->getDataSize() > 0 && mRawDiscardLevel >= 0) &&
@@ -1836,19 +1871,19 @@ bool LLViewerFetchedTexture::updateFetch()
{
//discard all oversized textures.
destroyRawImage();
- llwarns << "oversize, setting as missing" << llendl;
+ LL_WARNS() << "oversize, setting as missing" << LL_ENDL;
setIsMissingAsset();
- mRawDiscardLevel = INVALID_DISCARD_LEVEL ;
- mIsFetching = FALSE ;
+ mRawDiscardLevel = INVALID_DISCARD_LEVEL;
+ mIsFetching = FALSE;
mLastPacketTimer.reset();
}
else
{
mIsRawImageValid = TRUE;
- addToCreateTexture() ;
+ addToCreateTexture();
}
- return TRUE ;
+ return TRUE;
}
else
{
@@ -1866,16 +1901,16 @@ bool LLViewerFetchedTexture::updateFetch()
// We finished but received no data
if (current_discard < 0)
{
- llwarns << "!mIsFetching, setting as missing, decode_priority " << decode_priority
+ LL_WARNS() << "!mIsFetching, setting as missing, decode_priority " << decode_priority
<< " mRawDiscardLevel " << mRawDiscardLevel
<< " current_discard " << current_discard
- << llendl;
+ << LL_ENDL;
setIsMissingAsset();
desired_discard = -1;
}
else
{
- //llwarns << mID << ": Setting min discard to " << current_discard << llendl;
+ //LL_WARNS() << mID << ": Setting min discard to " << current_discard << LL_ENDL;
mMinDiscardLevel = current_discard;
desired_discard = current_discard;
}
@@ -1893,13 +1928,13 @@ bool LLViewerFetchedTexture::updateFetch()
// // Useful debugging code for undesired deprioritization of textures.
// if (decode_priority <= 0.0f && desired_discard >= 0 && desired_discard < current_discard)
// {
-// llinfos << "Calling updateRequestPriority() with decode_priority = 0.0f" << llendl;
+// LL_INFOS() << "Calling updateRequestPriority() with decode_priority = 0.0f" << LL_ENDL;
// calcDecodePriority();
// }
- static const F32 MAX_HOLD_TIME = 5.0f ; //seconds to wait before canceling fecthing if decode_priority is 0.f.
+ static const F32 MAX_HOLD_TIME = 5.0f; //seconds to wait before canceling fecthing if decode_priority is 0.f.
if(decode_priority > 0.0f || mStopFetchingTimer.getElapsedTimeF32() > MAX_HOLD_TIME)
{
- mStopFetchingTimer.reset() ;
+ mStopFetchingTimer.reset();
LLAppViewer::getTextureFetch()->updateRequestPriority(mID, decode_priority);
}
}
@@ -1925,7 +1960,7 @@ bool LLViewerFetchedTexture::updateFetch()
else if(mCachedRawImage.notNull() && (current_discard < 0 || current_discard > mCachedRawDiscardLevel))
{
make_request = false;
- switchToCachedImage() ; //use the cached raw data first
+ switchToCachedImage(); //use the cached raw data first
}
//else if (!isJustBound() && mCachedRawImageReady)
//{
@@ -1937,7 +1972,7 @@ bool LLViewerFetchedTexture::updateFetch()
// Load the texture progressively: we try not to rush to the desired discard too fast.
// If the camera is not moving, we do not tweak the discard level notch by notch but go to the desired discard with larger boosted steps
// This mitigates the "textures stay blurry" problem when loading while not killing the texture memory while moving around
- S32 delta_level = (mBoostLevel > LLGLTexture::BOOST_NONE) ? 2 : 1 ;
+ S32 delta_level = (mBoostLevel > LLGLTexture::BOOST_NONE) ? 2 : 1;
if (current_discard < 0)
{
desired_discard = llmax(desired_discard, getMaxDiscardLevel() - delta_level);
@@ -2008,7 +2043,7 @@ bool LLViewerFetchedTexture::updateFetch()
const F32 FETCH_IDLE_TIME = 5.f;
if (mLastPacketTimer.getElapsedTimeF32() > FETCH_IDLE_TIME)
{
- LL_DEBUGS("Texture") << "exceeded idle time " << FETCH_IDLE_TIME << ", deleting request: " << getID() << llendl;
+ LL_DEBUGS("Texture") << "exceeded idle time " << FETCH_IDLE_TIME << ", deleting request: " << getID() << LL_ENDL;
LLAppViewer::getTextureFetch()->deleteRequest(getID(), true);
mHasFetcher = FALSE;
}
@@ -2023,7 +2058,7 @@ void LLViewerFetchedTexture::clearFetchedResults()
{
if(mNeedsCreateTexture || mIsFetching)
{
- return ;
+ return;
}
cleanup();
@@ -2040,7 +2075,7 @@ void LLViewerFetchedTexture::forceToDeleteRequest()
if (mHasFetcher)
{
mHasFetcher = FALSE;
- mIsFetching = FALSE ;
+ mIsFetching = FALSE;
}
resetTextureStats();
@@ -2052,14 +2087,14 @@ void LLViewerFetchedTexture::setIsMissingAsset()
{
if (mUrl.empty())
{
- llwarns << mID << ": Marking image as missing" << llendl;
+ LL_WARNS() << mID << ": Marking image as missing" << LL_ENDL;
}
else
{
// This may or may not be an error - it is normal to have no
// map tile on an empty region, but bad if we're failing on a
// server bake texture.
- llwarns << mUrl << ": Marking image as missing" << llendl;
+ LL_WARNS() << mUrl << ": Marking image as missing" << LL_ENDL;
}
if (mHasFetcher)
{
@@ -2088,19 +2123,19 @@ void LLViewerFetchedTexture::setLoadedCallback( loaded_callback_func loaded_call
}
else
{
- mLoadedCallbackDesiredDiscardLevel = llmin(mLoadedCallbackDesiredDiscardLevel, (S8)discard_level) ;
+ mLoadedCallbackDesiredDiscardLevel = llmin(mLoadedCallbackDesiredDiscardLevel, (S8)discard_level);
}
if(mPauseLoadedCallBacks)
{
if(!pause)
{
- unpauseLoadedCallbacks(src_callback_list) ;
+ unpauseLoadedCallbacks(src_callback_list);
}
}
else if(pause)
{
- pauseLoadedCallbacks(src_callback_list) ;
+ pauseLoadedCallbacks(src_callback_list);
}
LLLoadedCallbackEntry* entryp = new LLLoadedCallbackEntry(loaded_callback, discard_level, keep_imageraw, userdata, src_callback_list, this, pause);
@@ -2109,21 +2144,21 @@ void LLViewerFetchedTexture::setLoadedCallback( loaded_callback_func loaded_call
mNeedsAux |= needs_aux;
if(keep_imageraw)
{
- mSaveRawImage = TRUE ;
+ mSaveRawImage = TRUE;
}
if (mNeedsAux && mAuxRawImage.isNull() && getDiscardLevel() >= 0)
{
// We need aux data, but we've already loaded the image, and it didn't have any
- llwarns << "No aux data available for callback for image:" << getID() << llendl;
+ LL_WARNS() << "No aux data available for callback for image:" << getID() << LL_ENDL;
}
- mLastCallBackActiveTime = sCurrentTime ;
+ mLastCallBackActiveTime = sCurrentTime;
}
void LLViewerFetchedTexture::clearCallbackEntryList()
{
if(mLoadedCallbackList.empty())
{
- return ;
+ return;
}
for(callback_list_t::iterator iter = mLoadedCallbackList.begin();
@@ -2134,29 +2169,29 @@ void LLViewerFetchedTexture::clearCallbackEntryList()
// We never finished loading the image. Indicate failure.
// Note: this allows mLoadedCallbackUserData to be cleaned up.
entryp->mCallback(FALSE, this, NULL, NULL, 0, TRUE, entryp->mUserData);
- iter = mLoadedCallbackList.erase(iter) ;
+ iter = mLoadedCallbackList.erase(iter);
delete entryp;
}
gTextureList.mCallbackList.erase(this);
- mLoadedCallbackDesiredDiscardLevel = S8_MAX ;
+ mLoadedCallbackDesiredDiscardLevel = S8_MAX;
if(needsToSaveRawImage())
{
- destroySavedRawImage() ;
+ destroySavedRawImage();
}
- return ;
+ return;
}
void LLViewerFetchedTexture::deleteCallbackEntry(const LLLoadedCallbackEntry::source_callback_list_t* callback_list)
{
if(mLoadedCallbackList.empty() || !callback_list)
{
- return ;
+ return;
}
- S32 desired_discard = S8_MAX ;
- S32 desired_raw_discard = INVALID_DISCARD_LEVEL ;
+ S32 desired_discard = S8_MAX;
+ S32 desired_raw_discard = INVALID_DISCARD_LEVEL;
for(callback_list_t::iterator iter = mLoadedCallbackList.begin();
iter != mLoadedCallbackList.end(); )
{
@@ -2166,17 +2201,17 @@ void LLViewerFetchedTexture::deleteCallbackEntry(const LLLoadedCallbackEntry::so
// We never finished loading the image. Indicate failure.
// Note: this allows mLoadedCallbackUserData to be cleaned up.
entryp->mCallback(FALSE, this, NULL, NULL, 0, TRUE, entryp->mUserData);
- iter = mLoadedCallbackList.erase(iter) ;
+ iter = mLoadedCallbackList.erase(iter);
delete entryp;
}
else
{
++iter;
- desired_discard = llmin(desired_discard, entryp->mDesiredDiscard) ;
+ desired_discard = llmin(desired_discard, entryp->mDesiredDiscard);
if(entryp->mNeedsImageRaw)
{
- desired_raw_discard = llmin(desired_raw_discard, entryp->mDesiredDiscard) ;
+ desired_raw_discard = llmin(desired_raw_discard, entryp->mDesiredDiscard);
}
}
}
@@ -2189,18 +2224,18 @@ void LLViewerFetchedTexture::deleteCallbackEntry(const LLLoadedCallbackEntry::so
if(needsToSaveRawImage())
{
- destroySavedRawImage() ;
+ destroySavedRawImage();
}
}
else if(needsToSaveRawImage() && mBoostLevel != LLGLTexture::BOOST_PREVIEW)
{
if(desired_raw_discard != INVALID_DISCARD_LEVEL)
{
- mDesiredSavedRawDiscardLevel = desired_raw_discard ;
+ mDesiredSavedRawDiscardLevel = desired_raw_discard;
}
else
{
- destroySavedRawImage() ;
+ destroySavedRawImage();
}
}
}
@@ -2209,29 +2244,29 @@ void LLViewerFetchedTexture::unpauseLoadedCallbacks(const LLLoadedCallbackEntry:
{
if(!callback_list)
{
- mPauseLoadedCallBacks = FALSE ;
- return ;
+ mPauseLoadedCallBacks = FALSE;
+ return;
}
- BOOL need_raw = FALSE ;
+ BOOL need_raw = FALSE;
for(callback_list_t::iterator iter = mLoadedCallbackList.begin();
iter != mLoadedCallbackList.end(); )
{
LLLoadedCallbackEntry *entryp = *iter++;
if(entryp->mSourceCallbackList == callback_list)
{
- entryp->mPaused = FALSE ;
+ entryp->mPaused = FALSE;
if(entryp->mNeedsImageRaw)
{
- need_raw = TRUE ;
+ need_raw = TRUE;
}
}
}
- mPauseLoadedCallBacks = FALSE ;
- mLastCallBackActiveTime = sCurrentTime ;
+ mPauseLoadedCallBacks = FALSE;
+ mLastCallBackActiveTime = sCurrentTime;
if(need_raw)
{
- mSaveRawImage = TRUE ;
+ mSaveRawImage = TRUE;
}
}
@@ -2239,10 +2274,10 @@ void LLViewerFetchedTexture::pauseLoadedCallbacks(const LLLoadedCallbackEntry::s
{
if(!callback_list)
{
- return ;
+ return;
}
- bool paused = true ;
+ bool paused = true;
for(callback_list_t::iterator iter = mLoadedCallbackList.begin();
iter != mLoadedCallbackList.end(); )
@@ -2250,25 +2285,25 @@ void LLViewerFetchedTexture::pauseLoadedCallbacks(const LLLoadedCallbackEntry::s
LLLoadedCallbackEntry *entryp = *iter++;
if(entryp->mSourceCallbackList == callback_list)
{
- entryp->mPaused = TRUE ;
+ entryp->mPaused = TRUE;
}
else if(!entryp->mPaused)
{
- paused = false ;
+ paused = false;
}
}
if(paused)
{
- mPauseLoadedCallBacks = TRUE ;//when set, loaded callback is paused.
+ mPauseLoadedCallBacks = TRUE;//when set, loaded callback is paused.
resetTextureStats();
- mSaveRawImage = FALSE ;
+ mSaveRawImage = FALSE;
}
}
bool LLViewerFetchedTexture::doLoadedCallbacks()
{
- static const F32 MAX_INACTIVE_TIME = 900.f ; //seconds
+ static const F32 MAX_INACTIVE_TIME = 900.f; //seconds
if (mNeedsCreateTexture)
{
@@ -2281,8 +2316,8 @@ bool LLViewerFetchedTexture::doLoadedCallbacks()
}
if(sCurrentTime - mLastCallBackActiveTime > MAX_INACTIVE_TIME && !mIsFetching)
{
- clearCallbackEntryList() ; //remove all callbacks.
- return false ;
+ clearCallbackEntryList(); //remove all callbacks.
+ return false;
}
bool res = false;
@@ -2302,7 +2337,7 @@ bool LLViewerFetchedTexture::doLoadedCallbacks()
// Remove ourself from the global list of textures with callbacks
gTextureList.mCallbackList.erase(this);
- return false ;
+ return false;
}
S32 gl_discard = getDiscardLevel();
@@ -2409,7 +2444,7 @@ bool LLViewerFetchedTexture::doLoadedCallbacks()
if (run_raw_callbacks && mIsRawImageValid && (mRawDiscardLevel <= getMaxDiscardLevel()))
{
// Do callbacks which require raw image data.
- //llinfos << "doLoadedCallbacks raw for " << getID() << llendl;
+ //LL_INFOS() << "doLoadedCallbacks raw for " << getID() << LL_ENDL;
// Call each party interested in the raw data.
for(callback_list_t::iterator iter = mLoadedCallbackList.begin();
@@ -2423,15 +2458,15 @@ bool LLViewerFetchedTexture::doLoadedCallbacks()
// to satisfy the interested party, then this is the last time that
// we're going to call them.
- mLastCallBackActiveTime = sCurrentTime ;
+ mLastCallBackActiveTime = sCurrentTime;
//llassert_always(mRawImage.notNull());
if(mNeedsAux && mAuxRawImage.isNull())
{
- llwarns << "Raw Image with no Aux Data for callback" << llendl;
+ LL_WARNS() << "Raw Image with no Aux Data for callback" << LL_ENDL;
}
BOOL final = mRawDiscardLevel <= entryp->mDesiredDiscard ? TRUE : FALSE;
- //llinfos << "Running callback for " << getID() << llendl;
- //llinfos << mRawImage->getWidth() << "x" << mRawImage->getHeight() << llendl;
+ //LL_INFOS() << "Running callback for " << getID() << LL_ENDL;
+ //LL_INFOS() << mRawImage->getWidth() << "x" << mRawImage->getHeight() << LL_ENDL;
entryp->mLastUsedDiscard = mRawDiscardLevel;
entryp->mCallback(TRUE, this, mRawImage, mAuxRawImage, mRawDiscardLevel, final, entryp->mUserData);
if (final)
@@ -2449,7 +2484,7 @@ bool LLViewerFetchedTexture::doLoadedCallbacks()
//
if (run_gl_callbacks && (gl_discard <= getMaxDiscardLevel()))
{
- //llinfos << "doLoadedCallbacks GL for " << getID() << llendl;
+ //LL_INFOS() << "doLoadedCallbacks GL for " << getID() << LL_ENDL;
// Call the callbacks interested in GL data.
for(callback_list_t::iterator iter = mLoadedCallbackList.begin();
@@ -2459,7 +2494,7 @@ bool LLViewerFetchedTexture::doLoadedCallbacks()
LLLoadedCallbackEntry *entryp = *curiter;
if (!entryp->mNeedsImageRaw && (entryp->mLastUsedDiscard > gl_discard))
{
- mLastCallBackActiveTime = sCurrentTime ;
+ mLastCallBackActiveTime = sCurrentTime;
BOOL final = gl_discard <= entryp->mDesiredDiscard ? TRUE : FALSE;
entryp->mLastUsedDiscard = gl_discard;
entryp->mCallback(TRUE, this, NULL, NULL, gl_discard, final, entryp->mUserData);
@@ -2493,66 +2528,66 @@ void LLViewerFetchedTexture::forceImmediateUpdate()
//only immediately update a deleted texture which is now being re-used.
if(!isDeleted())
{
- return ;
+ return;
}
//if already called forceImmediateUpdate()
if(mInImageList && mDecodePriority == LLViewerFetchedTexture::maxDecodePriority())
{
- return ;
+ return;
}
- gTextureList.forceImmediateUpdate(this) ;
- return ;
+ gTextureList.forceImmediateUpdate(this);
+ return;
}
LLImageRaw* LLViewerFetchedTexture::reloadRawImage(S8 discard_level)
{
- llassert_always(mGLTexturep.notNull()) ;
+ llassert_always(mGLTexturep.notNull());
llassert_always(discard_level >= 0);
llassert_always(mComponents > 0);
if (mRawImage.notNull())
{
//mRawImage is in use by somebody else, do not delete it.
- return NULL ;
+ return NULL;
}
if(mSavedRawDiscardLevel >= 0 && mSavedRawDiscardLevel <= discard_level)
{
if(mSavedRawDiscardLevel != discard_level)
{
- mRawImage = new LLImageRaw(getWidth(discard_level), getHeight(discard_level), getComponents()) ;
- mRawImage->copy(getSavedRawImage()) ;
+ mRawImage = new LLImageRaw(getWidth(discard_level), getHeight(discard_level), getComponents());
+ mRawImage->copy(getSavedRawImage());
}
else
{
- mRawImage = getSavedRawImage() ;
+ mRawImage = getSavedRawImage();
}
- mRawDiscardLevel = discard_level ;
+ mRawDiscardLevel = discard_level;
}
else
{
//force to fetch raw image again if cached raw image is not good enough.
if(mCachedRawDiscardLevel > discard_level)
{
- mRawImage = mCachedRawImage ;
+ mRawImage = mCachedRawImage;
mRawDiscardLevel = mCachedRawDiscardLevel;
}
else //cached raw image is good enough, copy it.
{
if(mCachedRawDiscardLevel != discard_level)
{
- mRawImage = new LLImageRaw(getWidth(discard_level), getHeight(discard_level), getComponents()) ;
- mRawImage->copy(mCachedRawImage) ;
+ mRawImage = new LLImageRaw(getWidth(discard_level), getHeight(discard_level), getComponents());
+ mRawImage->copy(mCachedRawImage);
}
else
{
- mRawImage = mCachedRawImage ;
+ mRawImage = mCachedRawImage;
}
- mRawDiscardLevel = discard_level ;
+ mRawDiscardLevel = discard_level;
}
}
- mIsRawImageValid = TRUE ;
+ mIsRawImageValid = TRUE;
sRawCount++;
return mRawImage;
@@ -2560,7 +2595,7 @@ LLImageRaw* LLViewerFetchedTexture::reloadRawImage(S8 discard_level)
bool LLViewerFetchedTexture::needsToSaveRawImage()
{
- return mForceToSaveRawImage || mSaveRawImage ;
+ return mForceToSaveRawImage || mSaveRawImage;
}
void LLViewerFetchedTexture::destroyRawImage()
@@ -2579,9 +2614,9 @@ void LLViewerFetchedTexture::destroyRawImage()
{
if(needsToSaveRawImage())
{
- saveRawImage() ;
+ saveRawImage();
}
- setCachedRawImage() ;
+ setCachedRawImage();
}
mRawImage = NULL;
@@ -2597,19 +2632,19 @@ void LLViewerFetchedTexture::switchToCachedImage()
{
if(mCachedRawImage.notNull())
{
- mRawImage = mCachedRawImage ;
+ mRawImage = mCachedRawImage;
if (getComponents() != mRawImage->getComponents())
{
// We've changed the number of components, so we need to move any
// objects using this pool to a different pool.
mComponents = mRawImage->getComponents();
- mGLTexturep->setComponents(mComponents) ;
+ mGLTexturep->setComponents(mComponents);
gTextureList.dirtyImage(this);
}
mIsRawImageValid = TRUE;
- mRawDiscardLevel = mCachedRawDiscardLevel ;
+ mRawDiscardLevel = mCachedRawDiscardLevel;
gTextureList.mCreateTextureList.insert(this);
mNeedsCreateTexture = TRUE;
}
@@ -2621,9 +2656,9 @@ void LLViewerFetchedTexture::setCachedRawImage(S32 discard_level, LLImageRaw* im
{
if(imageraw != mRawImage.get())
{
- mCachedRawImage = imageraw ;
- mCachedRawDiscardLevel = discard_level ;
- mCachedRawImageReady = TRUE ;
+ mCachedRawImage = imageraw;
+ mCachedRawDiscardLevel = discard_level;
+ mCachedRawImageReady = TRUE;
}
}
@@ -2631,49 +2666,49 @@ void LLViewerFetchedTexture::setCachedRawImage()
{
if(mRawImage == mCachedRawImage)
{
- return ;
+ return;
}
if(!mIsRawImageValid)
{
- return ;
+ return;
}
if(mCachedRawImageReady)
{
- return ;
+ return;
}
if(mCachedRawDiscardLevel < 0 || mCachedRawDiscardLevel > mRawDiscardLevel)
{
- S32 i = 0 ;
- S32 w = mRawImage->getWidth() ;
- S32 h = mRawImage->getHeight() ;
+ S32 i = 0;
+ S32 w = mRawImage->getWidth();
+ S32 h = mRawImage->getHeight();
- S32 max_size = MAX_CACHED_RAW_IMAGE_AREA ;
+ S32 max_size = MAX_CACHED_RAW_IMAGE_AREA;
if(LLGLTexture::BOOST_TERRAIN == mBoostLevel)
{
- max_size = MAX_CACHED_RAW_TERRAIN_IMAGE_AREA ;
+ max_size = MAX_CACHED_RAW_TERRAIN_IMAGE_AREA;
}
if(mForSculpt)
{
- max_size = MAX_CACHED_RAW_SCULPT_IMAGE_AREA ;
- mCachedRawImageReady = !mRawDiscardLevel ;
+ max_size = MAX_CACHED_RAW_SCULPT_IMAGE_AREA;
+ mCachedRawImageReady = !mRawDiscardLevel;
}
else
{
- mCachedRawImageReady = (!mRawDiscardLevel || ((w * h) >= max_size)) ;
+ mCachedRawImageReady = (!mRawDiscardLevel || ((w * h) >= max_size));
}
while(((w >> i) * (h >> i)) > max_size)
{
- ++i ;
+ ++i;
}
if(i)
{
if(!(w >> i) || !(h >> i))
{
- --i ;
+ --i;
}
{
@@ -2682,9 +2717,9 @@ void LLViewerFetchedTexture::setCachedRawImage()
mRawImage->scale(w >> i, h >> i) ;
}
}
- mCachedRawImage = mRawImage ;
- mRawDiscardLevel += i ;
- mCachedRawDiscardLevel = mRawDiscardLevel ;
+ mCachedRawImage = mRawImage;
+ mRawDiscardLevel += i;
+ mCachedRawDiscardLevel = mRawDiscardLevel;
}
}
@@ -2694,11 +2729,11 @@ void LLViewerFetchedTexture::checkCachedRawSculptImage()
{
if(getDiscardLevel() != 0)
{
- mCachedRawImageReady = FALSE ;
+ mCachedRawImageReady = FALSE;
}
else if(isForSculptOnly())
{
- resetTextureStats() ; //do not update this image any more.
+ resetTextureStats(); //do not update this image any more.
}
}
}
@@ -2707,45 +2742,45 @@ void LLViewerFetchedTexture::saveRawImage()
{
if(mRawImage.isNull() || mRawImage == mSavedRawImage || (mSavedRawDiscardLevel >= 0 && mSavedRawDiscardLevel <= mRawDiscardLevel))
{
- return ;
+ return;
}
- mSavedRawDiscardLevel = mRawDiscardLevel ;
- mSavedRawImage = new LLImageRaw(mRawImage->getData(), mRawImage->getWidth(), mRawImage->getHeight(), mRawImage->getComponents()) ;
+ mSavedRawDiscardLevel = mRawDiscardLevel;
+ mSavedRawImage = new LLImageRaw(mRawImage->getData(), mRawImage->getWidth(), mRawImage->getHeight(), mRawImage->getComponents());
if(mForceToSaveRawImage && mSavedRawDiscardLevel <= mDesiredSavedRawDiscardLevel)
{
- mForceToSaveRawImage = FALSE ;
+ mForceToSaveRawImage = FALSE;
}
- mLastReferencedSavedRawImageTime = sCurrentTime ;
+ mLastReferencedSavedRawImageTime = sCurrentTime;
}
void LLViewerFetchedTexture::forceToSaveRawImage(S32 desired_discard, F32 kept_time)
{
- mKeptSavedRawImageTime = kept_time ;
- mLastReferencedSavedRawImageTime = sCurrentTime ;
+ mKeptSavedRawImageTime = kept_time;
+ mLastReferencedSavedRawImageTime = sCurrentTime;
if(mSavedRawDiscardLevel > -1 && mSavedRawDiscardLevel <= desired_discard)
{
- return ; //raw imge is ready.
+ return; //raw imge is ready.
}
if(!mForceToSaveRawImage || mDesiredSavedRawDiscardLevel < 0 || mDesiredSavedRawDiscardLevel > desired_discard)
{
- mForceToSaveRawImage = TRUE ;
- mDesiredSavedRawDiscardLevel = desired_discard ;
+ mForceToSaveRawImage = TRUE;
+ mDesiredSavedRawDiscardLevel = desired_discard;
//copy from the cached raw image if exists.
if(mCachedRawImage.notNull() && mRawImage.isNull() )
{
- mRawImage = mCachedRawImage ;
- mRawDiscardLevel = mCachedRawDiscardLevel ;
+ mRawImage = mCachedRawImage;
+ mRawDiscardLevel = mCachedRawDiscardLevel;
- saveRawImage() ;
+ saveRawImage();
- mRawImage = NULL ;
- mRawDiscardLevel = INVALID_DISCARD_LEVEL ;
+ mRawImage = NULL;
+ mRawDiscardLevel = INVALID_DISCARD_LEVEL;
}
}
}
@@ -2753,38 +2788,38 @@ void LLViewerFetchedTexture::destroySavedRawImage()
{
if(mLastReferencedSavedRawImageTime < mKeptSavedRawImageTime)
{
- return ; //keep the saved raw image.
+ return; //keep the saved raw image.
}
- mForceToSaveRawImage = FALSE ;
- mSaveRawImage = FALSE ;
+ mForceToSaveRawImage = FALSE;
+ mSaveRawImage = FALSE;
- clearCallbackEntryList() ;
+ clearCallbackEntryList();
- mSavedRawImage = NULL ;
- mForceToSaveRawImage = FALSE ;
- mSaveRawImage = FALSE ;
- mSavedRawDiscardLevel = -1 ;
- mDesiredSavedRawDiscardLevel = -1 ;
- mLastReferencedSavedRawImageTime = 0.0f ;
- mKeptSavedRawImageTime = 0.f ;
+ mSavedRawImage = NULL;
+ mForceToSaveRawImage = FALSE;
+ mSaveRawImage = FALSE;
+ mSavedRawDiscardLevel = -1;
+ mDesiredSavedRawDiscardLevel = -1;
+ mLastReferencedSavedRawImageTime = 0.0f;
+ mKeptSavedRawImageTime = 0.f;
}
LLImageRaw* LLViewerFetchedTexture::getSavedRawImage()
{
- mLastReferencedSavedRawImageTime = sCurrentTime ;
+ mLastReferencedSavedRawImageTime = sCurrentTime;
- return mSavedRawImage ;
+ return mSavedRawImage;
}
BOOL LLViewerFetchedTexture::hasSavedRawImage() const
{
- return mSavedRawImage.notNull() ;
+ return mSavedRawImage.notNull();
}
F32 LLViewerFetchedTexture::getElapsedLastReferencedSavedRawImageTime() const
{
- return sCurrentTime - mLastReferencedSavedRawImageTime ;
+ return sCurrentTime - mLastReferencedSavedRawImageTime;
}
//----------------------------------------------------------------------------------------------
@@ -2797,13 +2832,13 @@ F32 LLViewerFetchedTexture::getElapsedLastReferencedSavedRawImageTime() const
LLViewerLODTexture::LLViewerLODTexture(const LLUUID& id, FTType f_type, const LLHost& host, BOOL usemipmaps)
: LLViewerFetchedTexture(id, f_type, host, usemipmaps)
{
- init(TRUE) ;
+ init(TRUE);
}
LLViewerLODTexture::LLViewerLODTexture(const std::string& url, FTType f_type, const LLUUID& id, BOOL usemipmaps)
: LLViewerFetchedTexture(url, f_type, id, usemipmaps)
{
- init(TRUE) ;
+ init(TRUE);
}
void LLViewerLODTexture::init(bool firstinit)
@@ -2816,19 +2851,19 @@ void LLViewerLODTexture::init(bool firstinit)
//virtual
S8 LLViewerLODTexture::getType() const
{
- return LLViewerTexture::LOD_TEXTURE ;
+ return LLViewerTexture::LOD_TEXTURE;
}
BOOL LLViewerLODTexture::isUpdateFrozen()
{
- return LLViewerTexture::sFreezeImageScalingDown && !getDiscardLevel() ;
+ return LLViewerTexture::sFreezeImageScalingDown && !getDiscardLevel();
}
// This is gauranteed to get called periodically for every texture
//virtual
void LLViewerLODTexture::processTextureStats()
{
- updateVirtualSize() ;
+ updateVirtualSize();
static LLCachedControl<bool> textures_fullres(gSavedSettings,"TextureLoadFullRes", false);
@@ -2850,7 +2885,7 @@ void LLViewerLODTexture::processTextureStats()
}
else if (!mFullWidth || !mFullHeight)
{
- mDesiredDiscardLevel = getMaxDiscardLevel() ;
+ mDesiredDiscardLevel = getMaxDiscardLevel();
}
else
{
@@ -2876,7 +2911,7 @@ void LLViewerLODTexture::processTextureStats()
if(isLargeImage() && !isJustBound() && mAdditionalDecodePriority < 0.3f)
{
//if is a big image and not being used recently, nor close to the view point, do not load hi-res data.
- mMaxVirtualSize = llmin(mMaxVirtualSize, (F32)LLViewerTexture::sMinLargeImageSize) ;
+ mMaxVirtualSize = llmin(mMaxVirtualSize, (F32)LLViewerTexture::sMinLargeImageSize);
}
if ((mCalculatedDiscardLevel >= 0.f) &&
@@ -2897,7 +2932,7 @@ void LLViewerLODTexture::processTextureStats()
{
discard_level += sDesiredDiscardBias;
discard_level *= sDesiredDiscardScale; // scale
- discard_level += sCameraMovingDiscardBias ;
+ discard_level += sCameraMovingDiscardBias;
}
discard_level = floorf(discard_level);
@@ -2924,19 +2959,19 @@ void LLViewerLODTexture::processTextureStats()
if(desired_discard_bias_max <= sDesiredDiscardBias && !mForceToSaveRawImage)
{
//needs to release texture memory urgently
- scaleDown() ;
+ scaleDown();
}
// Limit the amount of GL memory bound each frame
- else if ( BYTES_TO_MEGA_BYTES(sBoundTextureMemoryInBytes) > sMaxBoundTextureMemInMegaBytes * texmem_middle_bound_scale &&
+ else if ( sBoundTextureMemory > sMaxBoundTextureMem * texmem_middle_bound_scale &&
(!getBoundRecently() || mDesiredDiscardLevel >= mCachedRawDiscardLevel))
{
- scaleDown() ;
+ scaleDown();
}
// Only allow GL to have 2x the video card memory
- else if ( BYTES_TO_MEGA_BYTES(sTotalTextureMemoryInBytes) > sMaxTotalTextureMemInMegaBytes*texmem_middle_bound_scale &&
+ else if ( sTotalTextureMemory > sMaxTotalTextureMem * texmem_middle_bound_scale &&
(!getBoundRecently() || mDesiredDiscardLevel >= mCachedRawDiscardLevel))
{
- scaleDown() ;
+ scaleDown();
}
}
@@ -2944,13 +2979,13 @@ void LLViewerLODTexture::processTextureStats()
if(mForceToSaveRawImage && mDesiredSavedRawDiscardLevel >= 0)
{
- mDesiredDiscardLevel = llmin(mDesiredDiscardLevel, (S8)mDesiredSavedRawDiscardLevel) ;
+ mDesiredDiscardLevel = llmin(mDesiredDiscardLevel, (S8)mDesiredSavedRawDiscardLevel);
}
else if(LLPipeline::sMemAllocationThrottled)//release memory of large textures by decrease their resolutions.
{
if(scaleDown())
{
- mDesiredDiscardLevel = mCachedRawDiscardLevel ;
+ mDesiredDiscardLevel = mCachedRawDiscardLevel;
}
}
}
@@ -2959,17 +2994,17 @@ bool LLViewerLODTexture::scaleDown()
{
if(hasGLTexture() && mCachedRawDiscardLevel > getDiscardLevel())
{
- switchToCachedImage() ;
+ switchToCachedImage();
LLTexturePipelineTester* tester = (LLTexturePipelineTester*)LLMetricPerformanceTesterBasic::getTester(sTesterName);
if (tester)
{
- tester->setStablizingTime() ;
+ tester->setStablizingTime();
}
- return true ;
+ return true;
}
- return false ;
+ return false;
}
//----------------------------------------------------------------------------------------------
//end of LLViewerLODTexture
@@ -2981,14 +3016,14 @@ bool LLViewerLODTexture::scaleDown()
//static
void LLViewerMediaTexture::updateClass()
{
- static const F32 MAX_INACTIVE_TIME = 30.f ;
+ static const F32 MAX_INACTIVE_TIME = 30.f;
#if 0
//force to play media.
- gSavedSettings.setBOOL("AudioStreamingMedia", true) ;
+ gSavedSettings.setBOOL("AudioStreamingMedia", true);
#endif
- for(media_map_t::iterator iter = sMediaMap.begin() ; iter != sMediaMap.end(); )
+ for(media_map_t::iterator iter = sMediaMap.begin(); iter != sMediaMap.end(); )
{
LLViewerMediaTexture* mediap = iter->second;
@@ -2999,29 +3034,29 @@ void LLViewerMediaTexture::updateClass()
//
if(mediap->getLastReferencedTimer()->getElapsedTimeF32() > MAX_INACTIVE_TIME)
{
- media_map_t::iterator cur = iter++ ;
- sMediaMap.erase(cur) ;
- continue ;
+ media_map_t::iterator cur = iter++;
+ sMediaMap.erase(cur);
+ continue;
}
}
- ++iter ;
+ ++iter;
}
}
//static
void LLViewerMediaTexture::removeMediaImplFromTexture(const LLUUID& media_id)
{
- LLViewerMediaTexture* media_tex = findMediaTexture(media_id) ;
+ LLViewerMediaTexture* media_tex = findMediaTexture(media_id);
if(media_tex)
{
- media_tex->invalidateMediaImpl() ;
+ media_tex->invalidateMediaImpl();
}
}
//static
void LLViewerMediaTexture::cleanUpClass()
{
- sMediaMap.clear() ;
+ sMediaMap.clear();
}
//static
@@ -3033,9 +3068,9 @@ LLViewerMediaTexture* LLViewerMediaTexture::findMediaTexture(const LLUUID& media
return NULL;
}
- LLViewerMediaTexture* media_tex = iter->second ;
- media_tex->setMediaImpl() ;
- media_tex->getLastReferencedTimer()->reset() ;
+ LLViewerMediaTexture* media_tex = iter->second;
+ media_tex->setMediaImpl();
+ media_tex->getLastReferencedTimer()->reset();
return media_tex;
}
@@ -3047,48 +3082,48 @@ LLViewerMediaTexture::LLViewerMediaTexture(const LLUUID& id, BOOL usemipmaps, LL
{
sMediaMap.insert(std::make_pair(id, this));
- mGLTexturep = gl_image ;
+ mGLTexturep = gl_image;
if(mGLTexturep.isNull())
{
- generateGLTexture() ;
+ generateGLTexture();
}
mGLTexturep->setAllowCompression(false);
- mGLTexturep->setNeedsAlphaAndPickMask(FALSE) ;
+ mGLTexturep->setNeedsAlphaAndPickMask(FALSE);
- mIsPlaying = FALSE ;
+ mIsPlaying = FALSE;
- setMediaImpl() ;
+ setMediaImpl();
- setCategory(LLGLTexture::MEDIA) ;
+ setCategory(LLGLTexture::MEDIA);
- LLViewerTexture* tex = gTextureList.findImage(mID) ;
+ LLViewerTexture* tex = gTextureList.findImage(mID);
if(tex) //this media is a parcel media for tex.
{
- tex->setParcelMedia(this) ;
+ tex->setParcelMedia(this);
}
}
//virtual
LLViewerMediaTexture::~LLViewerMediaTexture()
{
- LLViewerTexture* tex = gTextureList.findImage(mID) ;
+ LLViewerTexture* tex = gTextureList.findImage(mID);
if(tex) //this media is a parcel media for tex.
{
- tex->setParcelMedia(NULL) ;
+ tex->setParcelMedia(NULL);
}
}
void LLViewerMediaTexture::reinit(BOOL usemipmaps /* = TRUE */)
{
- llassert(mGLTexturep.notNull()) ;
+ llassert(mGLTexturep.notNull());
- mUseMipMaps = usemipmaps ;
- getLastReferencedTimer()->reset() ;
- mGLTexturep->setUseMipMaps(mUseMipMaps) ;
- mGLTexturep->setNeedsAlphaAndPickMask(FALSE) ;
+ mUseMipMaps = usemipmaps;
+ getLastReferencedTimer()->reset();
+ mGLTexturep->setUseMipMaps(mUseMipMaps);
+ mGLTexturep->setNeedsAlphaAndPickMask(FALSE);
}
void LLViewerMediaTexture::setUseMipMaps(BOOL mipmap)
@@ -3097,26 +3132,26 @@ void LLViewerMediaTexture::setUseMipMaps(BOOL mipmap)
if(mGLTexturep.notNull())
{
- mGLTexturep->setUseMipMaps(mipmap) ;
+ mGLTexturep->setUseMipMaps(mipmap);
}
}
//virtual
S8 LLViewerMediaTexture::getType() const
{
- return LLViewerTexture::MEDIA_TEXTURE ;
+ return LLViewerTexture::MEDIA_TEXTURE;
}
void LLViewerMediaTexture::invalidateMediaImpl()
{
- mMediaImplp = NULL ;
+ mMediaImplp = NULL;
}
void LLViewerMediaTexture::setMediaImpl()
{
if(!mMediaImplp)
{
- mMediaImplp = LLViewerMedia::getMediaImplFromTextureID(mID) ;
+ mMediaImplp = LLViewerMedia::getMediaImplFromTextureID(mID);
}
}
@@ -3125,71 +3160,71 @@ void LLViewerMediaTexture::setMediaImpl()
// because it does not check the face validity after the current frame.
BOOL LLViewerMediaTexture::findFaces()
{
- mMediaFaceList.clear() ;
+ mMediaFaceList.clear();
- BOOL ret = TRUE ;
+ BOOL ret = TRUE;
- LLViewerTexture* tex = gTextureList.findImage(mID) ;
+ LLViewerTexture* tex = gTextureList.findImage(mID);
if(tex) //this media is a parcel media for tex.
{
for (U32 ch = 0; ch < LLRender::NUM_TEXTURE_CHANNELS; ++ch)
{
- const ll_face_list_t* face_list = tex->getFaceList(ch) ;
- U32 end = tex->getNumFaces(ch) ;
- for(U32 i = 0 ; i < end ; i++)
- {
- mMediaFaceList.push_back((*face_list)[i]) ;
- }
+ const ll_face_list_t* face_list = tex->getFaceList(ch);
+ U32 end = tex->getNumFaces(ch);
+ for(U32 i = 0; i < end; i++)
+ {
+ mMediaFaceList.push_back((*face_list)[i]);
}
}
+ }
if(!mMediaImplp)
{
- return TRUE ;
+ return TRUE;
}
//for media on a face.
- const std::list< LLVOVolume* >* obj_list = mMediaImplp->getObjectList() ;
- std::list< LLVOVolume* >::const_iterator iter = obj_list->begin() ;
+ const std::list< LLVOVolume* >* obj_list = mMediaImplp->getObjectList();
+ std::list< LLVOVolume* >::const_iterator iter = obj_list->begin();
for(; iter != obj_list->end(); ++iter)
{
- LLVOVolume* obj = *iter ;
+ LLVOVolume* obj = *iter;
if(obj->mDrawable.isNull())
{
- ret = FALSE ;
- continue ;
+ ret = FALSE;
+ continue;
}
- S32 face_id = -1 ;
- S32 num_faces = obj->mDrawable->getNumFaces() ;
+ S32 face_id = -1;
+ S32 num_faces = obj->mDrawable->getNumFaces();
while((face_id = obj->getFaceIndexWithMediaImpl(mMediaImplp, face_id)) > -1 && face_id < num_faces)
{
- LLFace* facep = obj->mDrawable->getFace(face_id) ;
+ LLFace* facep = obj->mDrawable->getFace(face_id);
if(facep)
{
- mMediaFaceList.push_back(facep) ;
+ mMediaFaceList.push_back(facep);
}
else
{
- ret = FALSE ;
+ ret = FALSE;
}
}
}
- return ret ;
+ return ret;
}
void LLViewerMediaTexture::initVirtualSize()
{
if(mIsPlaying)
{
- return ;
+ return;
}
- findFaces() ;
+ findFaces();
for(std::list< LLFace* >::iterator iter = mMediaFaceList.begin(); iter!= mMediaFaceList.end(); ++iter)
{
- addTextureStats((*iter)->getVirtualSize()) ;
+ addTextureStats((*iter)->getVirtualSize());
}
}
@@ -3197,77 +3232,77 @@ void LLViewerMediaTexture::addMediaToFace(LLFace* facep)
{
if(facep)
{
- facep->setHasMedia(true) ;
+ facep->setHasMedia(true);
}
if(!mIsPlaying)
{
- return ; //no need to add the face because the media is not in playing.
+ return; //no need to add the face because the media is not in playing.
}
- switchTexture(LLRender::DIFFUSE_MAP, facep) ;
+ switchTexture(LLRender::DIFFUSE_MAP, facep);
}
void LLViewerMediaTexture::removeMediaFromFace(LLFace* facep)
{
if(!facep)
{
- return ;
+ return;
}
- facep->setHasMedia(false) ;
+ facep->setHasMedia(false);
if(!mIsPlaying)
{
- return ; //no need to remove the face because the media is not in playing.
+ return; //no need to remove the face because the media is not in playing.
}
- mIsPlaying = FALSE ; //set to remove the media from the face.
- switchTexture(LLRender::DIFFUSE_MAP, facep) ;
- mIsPlaying = TRUE ; //set the flag back.
+ mIsPlaying = FALSE; //set to remove the media from the face.
+ switchTexture(LLRender::DIFFUSE_MAP, facep);
+ mIsPlaying = TRUE; //set the flag back.
if(getTotalNumFaces() < 1) //no face referencing to this media
{
- stopPlaying() ;
+ stopPlaying();
}
}
//virtual
void LLViewerMediaTexture::addFace(U32 ch, LLFace* facep)
{
- LLViewerTexture::addFace(ch, facep) ;
+ LLViewerTexture::addFace(ch, facep);
- const LLTextureEntry* te = facep->getTextureEntry() ;
+ const LLTextureEntry* te = facep->getTextureEntry();
if(te && te->getID().notNull())
{
- LLViewerTexture* tex = gTextureList.findImage(te->getID()) ;
+ LLViewerTexture* tex = gTextureList.findImage(te->getID());
if(tex)
{
- mTextureList.push_back(tex) ;//increase the reference number by one for tex to avoid deleting it.
- return ;
+ mTextureList.push_back(tex);//increase the reference number by one for tex to avoid deleting it.
+ return;
}
}
//check if it is a parcel media
if(facep->getTexture() && facep->getTexture() != this && facep->getTexture()->getID() == mID)
{
- mTextureList.push_back(facep->getTexture()) ; //a parcel media.
- return ;
+ mTextureList.push_back(facep->getTexture()); //a parcel media.
+ return;
}
if(te && te->getID().notNull()) //should have a texture
{
- llerrs << "The face does not have a valid texture before media texture." << llendl ;
+ LL_ERRS() << "The face does not have a valid texture before media texture." << LL_ENDL;
}
}
//virtual
void LLViewerMediaTexture::removeFace(U32 ch, LLFace* facep)
{
- LLViewerTexture::removeFace(ch, facep) ;
+ LLViewerTexture::removeFace(ch, facep);
- const LLTextureEntry* te = facep->getTextureEntry() ;
+ const LLTextureEntry* te = facep->getTextureEntry();
if(te && te->getID().notNull())
{
- LLViewerTexture* tex = gTextureList.findImage(te->getID()) ;
+ LLViewerTexture* tex = gTextureList.findImage(te->getID());
if(tex)
{
for(std::list< LLPointer<LLViewerTexture> >::iterator iter = mTextureList.begin();
@@ -3275,8 +3310,8 @@ void LLViewerMediaTexture::removeFace(U32 ch, LLFace* facep)
{
if(*iter == tex)
{
- mTextureList.erase(iter) ; //decrease the reference number for tex by one.
- return ;
+ mTextureList.erase(iter); //decrease the reference number for tex by one.
+ return;
}
}
@@ -3284,13 +3319,13 @@ void LLViewerMediaTexture::removeFace(U32 ch, LLFace* facep)
for (U32 ch = 0; ch < 3; ++ch)
{
- //
- //we have some trouble here: the texture of the face is changed.
- //we need to find the former texture, and remove it from the list to avoid memory leaking.
+ //
+ //we have some trouble here: the texture of the face is changed.
+ //we need to find the former texture, and remove it from the list to avoid memory leaking.
llassert(mNumFaces[ch] <= mFaceList[ch].size());
- for(U32 j = 0 ; j < mNumFaces[ch] ; j++)
+ for(U32 j = 0; j < mNumFaces[ch]; j++)
{
te_list.push_back(mFaceList[ch][j]->getTextureEntry());//all textures are in use.
}
@@ -3298,8 +3333,8 @@ void LLViewerMediaTexture::removeFace(U32 ch, LLFace* facep)
if (te_list.empty())
{
- mTextureList.clear() ;
- return ;
+ mTextureList.clear();
+ return;
}
S32 end = te_list.size();
@@ -3309,18 +3344,18 @@ void LLViewerMediaTexture::removeFace(U32 ch, LLFace* facep)
{
S32 i = 0;
- for(i = 0 ; i < end ; i++)
+ for(i = 0; i < end; i++)
{
if(te_list[i] && te_list[i]->getID() == (*iter)->getID())//the texture is in use.
{
- te_list[i] = NULL ;
- break ;
+ te_list[i] = NULL;
+ break;
}
}
if(i == end) //no hit for this texture, remove it.
{
- mTextureList.erase(iter) ; //decrease the reference number for tex by one.
- return ;
+ mTextureList.erase(iter); //decrease the reference number for tex by one.
+ return;
}
}
}
@@ -3332,14 +3367,14 @@ void LLViewerMediaTexture::removeFace(U32 ch, LLFace* facep)
{
if((*iter)->getID() == mID)
{
- mTextureList.erase(iter) ; //decrease the reference number for tex by one.
- return ;
+ mTextureList.erase(iter); //decrease the reference number for tex by one.
+ return;
}
}
if(te && te->getID().notNull()) //should have a texture
{
- llerrs << "mTextureList texture reference number is corrupted." << llendl ;
+ LL_ERRS() << "mTextureList texture reference number is corrupted." << LL_ENDL;
}
}
@@ -3348,9 +3383,9 @@ void LLViewerMediaTexture::stopPlaying()
// Don't stop the media impl playing here -- this breaks non-inworld media (login screen, search, and media browser).
// if(mMediaImplp)
// {
-// mMediaImplp->stop() ;
+// mMediaImplp->stop();
// }
- mIsPlaying = FALSE ;
+ mIsPlaying = FALSE;
}
void LLViewerMediaTexture::switchTexture(U32 ch, LLFace* facep)
@@ -3363,29 +3398,29 @@ void LLViewerMediaTexture::switchTexture(U32 ch, LLFace* facep)
{
if(mID == facep->getTexture()->getID()) //this is a parcel media
{
- return ; //let the prim media win.
+ return; //let the prim media win.
}
}
if(mIsPlaying) //old textures switch to the media texture
{
- facep->switchTexture(ch, this) ;
+ facep->switchTexture(ch, this);
}
else //switch to old textures.
{
- const LLTextureEntry* te = facep->getTextureEntry() ;
+ const LLTextureEntry* te = facep->getTextureEntry();
if(te)
{
- LLViewerTexture* tex = te->getID().notNull() ? gTextureList.findImage(te->getID()) : NULL ;
+ LLViewerTexture* tex = te->getID().notNull() ? gTextureList.findImage(te->getID()) : NULL;
if(!tex && te->getID() != mID)//try parcel media.
{
- tex = gTextureList.findImage(mID) ;
+ tex = gTextureList.findImage(mID);
}
if(!tex)
{
- tex = LLViewerFetchedTexture::sDefaultImagep ;
+ tex = LLViewerFetchedTexture::sDefaultImagep;
}
- facep->switchTexture(ch, tex) ;
+ facep->switchTexture(ch, tex);
}
}
}
@@ -3395,36 +3430,36 @@ void LLViewerMediaTexture::setPlaying(BOOL playing)
{
if(!mMediaImplp)
{
- return ;
+ return;
}
if(!playing && !mIsPlaying)
{
- return ; //media is already off
+ return; //media is already off
}
if(playing == mIsPlaying && !mMediaImplp->isUpdated())
{
- return ; //nothing has changed since last time.
+ return; //nothing has changed since last time.
}
- mIsPlaying = playing ;
+ mIsPlaying = playing;
if(mIsPlaying) //is about to play this media
{
if(findFaces())
{
//about to update all faces.
- mMediaImplp->setUpdated(FALSE) ;
+ mMediaImplp->setUpdated(FALSE);
}
if(mMediaFaceList.empty())//no face pointing to this media
{
- stopPlaying() ;
- return ;
+ stopPlaying();
+ return;
}
for(std::list< LLFace* >::iterator iter = mMediaFaceList.begin(); iter!= mMediaFaceList.end(); ++iter)
{
- switchTexture(LLRender::DIFFUSE_MAP, *iter) ;
+ switchTexture(LLRender::DIFFUSE_MAP, *iter);
}
}
else //stop playing this media
@@ -3432,12 +3467,12 @@ void LLViewerMediaTexture::setPlaying(BOOL playing)
U32 ch = LLRender::DIFFUSE_MAP;
llassert(mNumFaces[ch] <= mFaceList[ch].size());
- for(U32 i = mNumFaces[ch] ; i ; i--)
+ for(U32 i = mNumFaces[ch]; i; i--)
{
- switchTexture(ch, mFaceList[ch][i - 1]) ; //current face could be removed in this function.
+ switchTexture(ch, mFaceList[ch][i - 1]); //current face could be removed in this function.
}
}
- return ;
+ return;
}
//virtual
@@ -3445,13 +3480,13 @@ F32 LLViewerMediaTexture::getMaxVirtualSize()
{
if(LLFrameTimer::getFrameCount() == mUpdateVirtualSizeTime)
{
- return mMaxVirtualSize ;
+ return mMaxVirtualSize;
}
- mUpdateVirtualSizeTime = LLFrameTimer::getFrameCount() ;
+ mUpdateVirtualSizeTime = LLFrameTimer::getFrameCount();
if(!mMaxVirtualSizeResetCounter)
{
- addTextureStats(0.f, FALSE) ;//reset
+ addTextureStats(0.f, FALSE);//reset
}
if(mIsPlaying) //media is playing
@@ -3459,28 +3494,28 @@ F32 LLViewerMediaTexture::getMaxVirtualSize()
for (U32 ch = 0; ch < LLRender::NUM_TEXTURE_CHANNELS; ++ch)
{
llassert(mNumFaces[ch] <= mFaceList[ch].size());
- for(U32 i = 0 ; i < mNumFaces[ch] ; i++)
+ for(U32 i = 0; i < mNumFaces[ch]; i++)
{
- LLFace* facep = mFaceList[ch][i] ;
- if(facep->getDrawable()->isRecentlyVisible())
- {
- addTextureStats(facep->getVirtualSize()) ;
- }
- }
- }
+ LLFace* facep = mFaceList[ch][i];
+ if(facep->getDrawable()->isRecentlyVisible())
+ {
+ addTextureStats(facep->getVirtualSize());
+ }
+ }
+ }
}
else //media is not in playing
{
- findFaces() ;
+ findFaces();
if(!mMediaFaceList.empty())
{
for(std::list< LLFace* >::iterator iter = mMediaFaceList.begin(); iter!= mMediaFaceList.end(); ++iter)
{
- LLFace* facep = *iter ;
+ LLFace* facep = *iter;
if(facep->getDrawable()->isRecentlyVisible())
{
- addTextureStats(facep->getVirtualSize()) ;
+ addTextureStats(facep->getVirtualSize());
}
}
}
@@ -3490,10 +3525,10 @@ F32 LLViewerMediaTexture::getMaxVirtualSize()
{
mMaxVirtualSizeResetCounter--;
}
- reorganizeFaceList() ;
+ reorganizeFaceList();
reorganizeVolumeList();
- return mMaxVirtualSize ;
+ return mMaxVirtualSize;
}
//----------------------------------------------------------------------------------------------
//end of LLViewerMediaTexture
@@ -3504,27 +3539,27 @@ F32 LLViewerMediaTexture::getMaxVirtualSize()
//----------------------------------------------------------------------------------------------
LLTexturePipelineTester::LLTexturePipelineTester() : LLMetricPerformanceTesterWithSession(sTesterName)
{
- addMetric("TotalBytesLoaded") ;
- addMetric("TotalBytesLoadedFromCache") ;
- addMetric("TotalBytesLoadedForLargeImage") ;
- addMetric("TotalBytesLoadedForSculpties") ;
- addMetric("StartFetchingTime") ;
- addMetric("TotalGrayTime") ;
- addMetric("TotalStablizingTime") ;
- addMetric("StartTimeLoadingSculpties") ;
- addMetric("EndTimeLoadingSculpties") ;
-
- addMetric("Time") ;
- addMetric("TotalBytesBound") ;
- addMetric("TotalBytesBoundForLargeImage") ;
- addMetric("PercentageBytesBound") ;
+ addMetric("TotalBytesLoaded");
+ addMetric("TotalBytesLoadedFromCache");
+ addMetric("TotalBytesLoadedForLargeImage");
+ addMetric("TotalBytesLoadedForSculpties");
+ addMetric("StartFetchingTime");
+ addMetric("TotalGrayTime");
+ addMetric("TotalStablizingTime");
+ addMetric("StartTimeLoadingSculpties");
+ addMetric("EndTimeLoadingSculpties");
+
+ addMetric("Time");
+ addMetric("TotalBytesBound");
+ addMetric("TotalBytesBoundForLargeImage");
+ addMetric("PercentageBytesBound");
- mTotalBytesLoaded = 0 ;
- mTotalBytesLoadedFromCache = 0 ;
- mTotalBytesLoadedForLargeImage = 0 ;
- mTotalBytesLoadedForSculpties = 0 ;
+ mTotalBytesLoaded = (S32Bytes)0;
+ mTotalBytesLoadedFromCache = (S32Bytes)0;
+ mTotalBytesLoadedForLargeImage = (S32Bytes)0;
+ mTotalBytesLoadedForSculpties = (S32Bytes)0;
- reset() ;
+ reset();
}
LLTexturePipelineTester::~LLTexturePipelineTester()
@@ -3534,222 +3569,222 @@ LLTexturePipelineTester::~LLTexturePipelineTester()
void LLTexturePipelineTester::update()
{
- mLastTotalBytesUsed = mTotalBytesUsed ;
- mLastTotalBytesUsedForLargeImage = mTotalBytesUsedForLargeImage ;
- mTotalBytesUsed = 0 ;
- mTotalBytesUsedForLargeImage = 0 ;
+ mLastTotalBytesUsed = mTotalBytesUsed;
+ mLastTotalBytesUsedForLargeImage = mTotalBytesUsedForLargeImage;
+ mTotalBytesUsed = (S32Bytes)0;
+ mTotalBytesUsedForLargeImage = (S32Bytes)0;
if(LLAppViewer::getTextureFetch()->getNumRequests() > 0) //fetching list is not empty
{
if(mPause)
{
//start a new fetching session
- reset() ;
- mStartFetchingTime = LLImageGL::sLastFrameTime ;
- mPause = FALSE ;
+ reset();
+ mStartFetchingTime = LLImageGL::sLastFrameTime;
+ mPause = FALSE;
}
//update total gray time
if(mUsingDefaultTexture)
{
- mUsingDefaultTexture = FALSE ;
- mTotalGrayTime = LLImageGL::sLastFrameTime - mStartFetchingTime ;
+ mUsingDefaultTexture = FALSE;
+ mTotalGrayTime = LLImageGL::sLastFrameTime - mStartFetchingTime;
}
//update the stablizing timer.
- updateStablizingTime() ;
+ updateStablizingTime();
- outputTestResults() ;
+ outputTestResults();
}
else if(!mPause)
{
//stop the current fetching session
- mPause = TRUE ;
- outputTestResults() ;
- reset() ;
+ mPause = TRUE;
+ outputTestResults();
+ reset();
}
}
void LLTexturePipelineTester::reset()
{
- mPause = TRUE ;
+ mPause = TRUE;
- mUsingDefaultTexture = FALSE ;
- mStartStablizingTime = 0.0f ;
- mEndStablizingTime = 0.0f ;
+ mUsingDefaultTexture = FALSE;
+ mStartStablizingTime = 0.0f;
+ mEndStablizingTime = 0.0f;
- mTotalBytesUsed = 0 ;
- mTotalBytesUsedForLargeImage = 0 ;
- mLastTotalBytesUsed = 0 ;
- mLastTotalBytesUsedForLargeImage = 0 ;
+ mTotalBytesUsed = (S32Bytes)0;
+ mTotalBytesUsedForLargeImage = (S32Bytes)0;
+ mLastTotalBytesUsed = (S32Bytes)0;
+ mLastTotalBytesUsedForLargeImage = (S32Bytes)0;
- mStartFetchingTime = 0.0f ;
+ mStartFetchingTime = 0.0f;
- mTotalGrayTime = 0.0f ;
- mTotalStablizingTime = 0.0f ;
+ mTotalGrayTime = 0.0f;
+ mTotalStablizingTime = 0.0f;
- mStartTimeLoadingSculpties = 1.0f ;
- mEndTimeLoadingSculpties = 0.0f ;
+ mStartTimeLoadingSculpties = 1.0f;
+ mEndTimeLoadingSculpties = 0.0f;
}
//virtual
void LLTexturePipelineTester::outputTestRecord(LLSD *sd)
{
std::string currentLabel = getCurrentLabelName();
- (*sd)[currentLabel]["TotalBytesLoaded"] = (LLSD::Integer)mTotalBytesLoaded ;
- (*sd)[currentLabel]["TotalBytesLoadedFromCache"] = (LLSD::Integer)mTotalBytesLoadedFromCache ;
- (*sd)[currentLabel]["TotalBytesLoadedForLargeImage"] = (LLSD::Integer)mTotalBytesLoadedForLargeImage ;
- (*sd)[currentLabel]["TotalBytesLoadedForSculpties"] = (LLSD::Integer)mTotalBytesLoadedForSculpties ;
+ (*sd)[currentLabel]["TotalBytesLoaded"] = (LLSD::Integer)mTotalBytesLoaded.value();
+ (*sd)[currentLabel]["TotalBytesLoadedFromCache"] = (LLSD::Integer)mTotalBytesLoadedFromCache.value();
+ (*sd)[currentLabel]["TotalBytesLoadedForLargeImage"] = (LLSD::Integer)mTotalBytesLoadedForLargeImage.value();
+ (*sd)[currentLabel]["TotalBytesLoadedForSculpties"] = (LLSD::Integer)mTotalBytesLoadedForSculpties.value();
- (*sd)[currentLabel]["StartFetchingTime"] = (LLSD::Real)mStartFetchingTime ;
- (*sd)[currentLabel]["TotalGrayTime"] = (LLSD::Real)mTotalGrayTime ;
- (*sd)[currentLabel]["TotalStablizingTime"] = (LLSD::Real)mTotalStablizingTime ;
+ (*sd)[currentLabel]["StartFetchingTime"] = (LLSD::Real)mStartFetchingTime;
+ (*sd)[currentLabel]["TotalGrayTime"] = (LLSD::Real)mTotalGrayTime;
+ (*sd)[currentLabel]["TotalStablizingTime"] = (LLSD::Real)mTotalStablizingTime;
- (*sd)[currentLabel]["StartTimeLoadingSculpties"] = (LLSD::Real)mStartTimeLoadingSculpties ;
- (*sd)[currentLabel]["EndTimeLoadingSculpties"] = (LLSD::Real)mEndTimeLoadingSculpties ;
+ (*sd)[currentLabel]["StartTimeLoadingSculpties"] = (LLSD::Real)mStartTimeLoadingSculpties;
+ (*sd)[currentLabel]["EndTimeLoadingSculpties"] = (LLSD::Real)mEndTimeLoadingSculpties;
- (*sd)[currentLabel]["Time"] = LLImageGL::sLastFrameTime ;
- (*sd)[currentLabel]["TotalBytesBound"] = (LLSD::Integer)mLastTotalBytesUsed ;
- (*sd)[currentLabel]["TotalBytesBoundForLargeImage"] = (LLSD::Integer)mLastTotalBytesUsedForLargeImage ;
- (*sd)[currentLabel]["PercentageBytesBound"] = (LLSD::Real)(100.f * mLastTotalBytesUsed / mTotalBytesLoaded) ;
+ (*sd)[currentLabel]["Time"] = LLImageGL::sLastFrameTime;
+ (*sd)[currentLabel]["TotalBytesBound"] = (LLSD::Integer)mLastTotalBytesUsed.value();
+ (*sd)[currentLabel]["TotalBytesBoundForLargeImage"] = (LLSD::Integer)mLastTotalBytesUsedForLargeImage.value();
+ (*sd)[currentLabel]["PercentageBytesBound"] = (LLSD::Real)(100.f * mLastTotalBytesUsed / mTotalBytesLoaded);
}
void LLTexturePipelineTester::updateTextureBindingStats(const LLViewerTexture* imagep)
{
- U32 mem_size = (U32)imagep->getTextureMemory() ;
- mTotalBytesUsed += mem_size ;
+ U32Bytes mem_size = imagep->getTextureMemory();
+ mTotalBytesUsed += mem_size;
- if(MIN_LARGE_IMAGE_AREA <= (U32)(mem_size / (U32)imagep->getComponents()))
+ if(MIN_LARGE_IMAGE_AREA <= (U32)(mem_size.value() / (U32)imagep->getComponents()))
{
- mTotalBytesUsedForLargeImage += mem_size ;
+ mTotalBytesUsedForLargeImage += mem_size;
}
}
void LLTexturePipelineTester::updateTextureLoadingStats(const LLViewerFetchedTexture* imagep, const LLImageRaw* raw_imagep, BOOL from_cache)
{
- U32 data_size = (U32)raw_imagep->getDataSize() ;
- mTotalBytesLoaded += data_size ;
+ U32Bytes data_size = (U32Bytes)raw_imagep->getDataSize();
+ mTotalBytesLoaded += data_size;
if(from_cache)
{
- mTotalBytesLoadedFromCache += data_size ;
+ mTotalBytesLoadedFromCache += data_size;
}
- if(MIN_LARGE_IMAGE_AREA <= (U32)(data_size / (U32)raw_imagep->getComponents()))
+ if(MIN_LARGE_IMAGE_AREA <= (U32)(data_size.value() / (U32)raw_imagep->getComponents()))
{
- mTotalBytesLoadedForLargeImage += data_size ;
+ mTotalBytesLoadedForLargeImage += data_size;
}
if(imagep->forSculpt())
{
- mTotalBytesLoadedForSculpties += data_size ;
+ mTotalBytesLoadedForSculpties += data_size;
if(mStartTimeLoadingSculpties > mEndTimeLoadingSculpties)
{
- mStartTimeLoadingSculpties = LLImageGL::sLastFrameTime ;
+ mStartTimeLoadingSculpties = LLImageGL::sLastFrameTime;
}
- mEndTimeLoadingSculpties = LLImageGL::sLastFrameTime ;
+ mEndTimeLoadingSculpties = LLImageGL::sLastFrameTime;
}
}
void LLTexturePipelineTester::updateGrayTextureBinding()
{
- mUsingDefaultTexture = TRUE ;
+ mUsingDefaultTexture = TRUE;
}
void LLTexturePipelineTester::setStablizingTime()
{
if(mStartStablizingTime <= mStartFetchingTime)
{
- mStartStablizingTime = LLImageGL::sLastFrameTime ;
+ mStartStablizingTime = LLImageGL::sLastFrameTime;
}
- mEndStablizingTime = LLImageGL::sLastFrameTime ;
+ mEndStablizingTime = LLImageGL::sLastFrameTime;
}
void LLTexturePipelineTester::updateStablizingTime()
{
if(mStartStablizingTime > mStartFetchingTime)
{
- F32 t = mEndStablizingTime - mStartStablizingTime ;
+ F32 t = mEndStablizingTime - mStartStablizingTime;
if(t > F_ALMOST_ZERO && (t - mTotalStablizingTime) < F_ALMOST_ZERO)
{
//already stablized
- mTotalStablizingTime = LLImageGL::sLastFrameTime - mStartStablizingTime ;
+ mTotalStablizingTime = LLImageGL::sLastFrameTime - mStartStablizingTime;
//cancel the timer
- mStartStablizingTime = 0.f ;
- mEndStablizingTime = 0.f ;
+ mStartStablizingTime = 0.f;
+ mEndStablizingTime = 0.f;
}
else
{
- mTotalStablizingTime = t ;
+ mTotalStablizingTime = t;
}
}
- mTotalStablizingTime = 0.f ;
+ mTotalStablizingTime = 0.f;
}
//virtual
void LLTexturePipelineTester::compareTestSessions(std::ofstream* os)
{
- LLTexturePipelineTester::LLTextureTestSession* base_sessionp = dynamic_cast<LLTexturePipelineTester::LLTextureTestSession*>(mBaseSessionp) ;
- LLTexturePipelineTester::LLTextureTestSession* current_sessionp = dynamic_cast<LLTexturePipelineTester::LLTextureTestSession*>(mCurrentSessionp) ;
+ LLTexturePipelineTester::LLTextureTestSession* base_sessionp = dynamic_cast<LLTexturePipelineTester::LLTextureTestSession*>(mBaseSessionp);
+ LLTexturePipelineTester::LLTextureTestSession* current_sessionp = dynamic_cast<LLTexturePipelineTester::LLTextureTestSession*>(mCurrentSessionp);
if(!base_sessionp || !current_sessionp)
{
- llerrs << "type of test session does not match!" << llendl ;
+ LL_ERRS() << "type of test session does not match!" << LL_ENDL;
}
//compare and output the comparison
- *os << llformat("%s\n", getTesterName().c_str()) ;
- *os << llformat("AggregateResults\n") ;
+ *os << llformat("%s\n", getTesterName().c_str());
+ *os << llformat("AggregateResults\n");
- compareTestResults(os, "TotalFetchingTime", base_sessionp->mTotalFetchingTime, current_sessionp->mTotalFetchingTime) ;
- compareTestResults(os, "TotalGrayTime", base_sessionp->mTotalGrayTime, current_sessionp->mTotalGrayTime) ;
+ compareTestResults(os, "TotalFetchingTime", base_sessionp->mTotalFetchingTime, current_sessionp->mTotalFetchingTime);
+ compareTestResults(os, "TotalGrayTime", base_sessionp->mTotalGrayTime, current_sessionp->mTotalGrayTime);
compareTestResults(os, "TotalStablizingTime", base_sessionp->mTotalStablizingTime, current_sessionp->mTotalStablizingTime);
- compareTestResults(os, "StartTimeLoadingSculpties", base_sessionp->mStartTimeLoadingSculpties, current_sessionp->mStartTimeLoadingSculpties) ;
- compareTestResults(os, "TotalTimeLoadingSculpties", base_sessionp->mTotalTimeLoadingSculpties, current_sessionp->mTotalTimeLoadingSculpties) ;
+ compareTestResults(os, "StartTimeLoadingSculpties", base_sessionp->mStartTimeLoadingSculpties, current_sessionp->mStartTimeLoadingSculpties);
+ compareTestResults(os, "TotalTimeLoadingSculpties", base_sessionp->mTotalTimeLoadingSculpties, current_sessionp->mTotalTimeLoadingSculpties);
- compareTestResults(os, "TotalBytesLoaded", base_sessionp->mTotalBytesLoaded, current_sessionp->mTotalBytesLoaded) ;
- compareTestResults(os, "TotalBytesLoadedFromCache", base_sessionp->mTotalBytesLoadedFromCache, current_sessionp->mTotalBytesLoadedFromCache) ;
- compareTestResults(os, "TotalBytesLoadedForLargeImage", base_sessionp->mTotalBytesLoadedForLargeImage, current_sessionp->mTotalBytesLoadedForLargeImage) ;
- compareTestResults(os, "TotalBytesLoadedForSculpties", base_sessionp->mTotalBytesLoadedForSculpties, current_sessionp->mTotalBytesLoadedForSculpties) ;
+ compareTestResults(os, "TotalBytesLoaded", base_sessionp->mTotalBytesLoaded, current_sessionp->mTotalBytesLoaded);
+ compareTestResults(os, "TotalBytesLoadedFromCache", base_sessionp->mTotalBytesLoadedFromCache, current_sessionp->mTotalBytesLoadedFromCache);
+ compareTestResults(os, "TotalBytesLoadedForLargeImage", base_sessionp->mTotalBytesLoadedForLargeImage, current_sessionp->mTotalBytesLoadedForLargeImage);
+ compareTestResults(os, "TotalBytesLoadedForSculpties", base_sessionp->mTotalBytesLoadedForSculpties, current_sessionp->mTotalBytesLoadedForSculpties);
- *os << llformat("InstantResults\n") ;
- S32 size = llmin(base_sessionp->mInstantPerformanceListCounter, current_sessionp->mInstantPerformanceListCounter) ;
- for(S32 i = 0 ; i < size ; i++)
+ *os << llformat("InstantResults\n");
+ S32 size = llmin(base_sessionp->mInstantPerformanceListCounter, current_sessionp->mInstantPerformanceListCounter);
+ for(S32 i = 0; i < size; i++)
{
- *os << llformat("Time(B-T)-%.4f-%.4f\n", base_sessionp->mInstantPerformanceList[i].mTime, current_sessionp->mInstantPerformanceList[i].mTime) ;
+ *os << llformat("Time(B-T)-%.4f-%.4f\n", base_sessionp->mInstantPerformanceList[i].mTime, current_sessionp->mInstantPerformanceList[i].mTime);
compareTestResults(os, "AverageBytesUsedPerSecond", base_sessionp->mInstantPerformanceList[i].mAverageBytesUsedPerSecond,
- current_sessionp->mInstantPerformanceList[i].mAverageBytesUsedPerSecond) ;
+ current_sessionp->mInstantPerformanceList[i].mAverageBytesUsedPerSecond);
compareTestResults(os, "AverageBytesUsedForLargeImagePerSecond", base_sessionp->mInstantPerformanceList[i].mAverageBytesUsedForLargeImagePerSecond,
- current_sessionp->mInstantPerformanceList[i].mAverageBytesUsedForLargeImagePerSecond) ;
+ current_sessionp->mInstantPerformanceList[i].mAverageBytesUsedForLargeImagePerSecond);
compareTestResults(os, "AveragePercentageBytesUsedPerSecond", base_sessionp->mInstantPerformanceList[i].mAveragePercentageBytesUsedPerSecond,
- current_sessionp->mInstantPerformanceList[i].mAveragePercentageBytesUsedPerSecond) ;
+ current_sessionp->mInstantPerformanceList[i].mAveragePercentageBytesUsedPerSecond);
}
if(size < base_sessionp->mInstantPerformanceListCounter)
{
- for(S32 i = size ; i < base_sessionp->mInstantPerformanceListCounter ; i++)
+ for(S32 i = size; i < base_sessionp->mInstantPerformanceListCounter; i++)
{
- *os << llformat("Time(B-T)-%.4f- \n", base_sessionp->mInstantPerformanceList[i].mTime) ;
+ *os << llformat("Time(B-T)-%.4f- \n", base_sessionp->mInstantPerformanceList[i].mTime);
- *os << llformat(", AverageBytesUsedPerSecond, %d, N/A \n", base_sessionp->mInstantPerformanceList[i].mAverageBytesUsedPerSecond) ;
- *os << llformat(", AverageBytesUsedForLargeImagePerSecond, %d, N/A \n", base_sessionp->mInstantPerformanceList[i].mAverageBytesUsedForLargeImagePerSecond) ;
- *os << llformat(", AveragePercentageBytesUsedPerSecond, %.4f, N/A \n", base_sessionp->mInstantPerformanceList[i].mAveragePercentageBytesUsedPerSecond) ;
+ *os << llformat(", AverageBytesUsedPerSecond, %d, N/A \n", base_sessionp->mInstantPerformanceList[i].mAverageBytesUsedPerSecond);
+ *os << llformat(", AverageBytesUsedForLargeImagePerSecond, %d, N/A \n", base_sessionp->mInstantPerformanceList[i].mAverageBytesUsedForLargeImagePerSecond);
+ *os << llformat(", AveragePercentageBytesUsedPerSecond, %.4f, N/A \n", base_sessionp->mInstantPerformanceList[i].mAveragePercentageBytesUsedPerSecond);
}
}
else if(size < current_sessionp->mInstantPerformanceListCounter)
{
- for(S32 i = size ; i < current_sessionp->mInstantPerformanceListCounter ; i++)
+ for(S32 i = size; i < current_sessionp->mInstantPerformanceListCounter; i++)
{
- *os << llformat("Time(B-T)- -%.4f\n", current_sessionp->mInstantPerformanceList[i].mTime) ;
+ *os << llformat("Time(B-T)- -%.4f\n", current_sessionp->mInstantPerformanceList[i].mTime);
- *os << llformat(", AverageBytesUsedPerSecond, N/A, %d\n", current_sessionp->mInstantPerformanceList[i].mAverageBytesUsedPerSecond) ;
- *os << llformat(", AverageBytesUsedForLargeImagePerSecond, N/A, %d\n", current_sessionp->mInstantPerformanceList[i].mAverageBytesUsedForLargeImagePerSecond) ;
- *os << llformat(", AveragePercentageBytesUsedPerSecond, N/A, %.4f\n", current_sessionp->mInstantPerformanceList[i].mAveragePercentageBytesUsedPerSecond) ;
+ *os << llformat(", AverageBytesUsedPerSecond, N/A, %d\n", current_sessionp->mInstantPerformanceList[i].mAverageBytesUsedPerSecond);
+ *os << llformat(", AverageBytesUsedForLargeImagePerSecond, N/A, %d\n", current_sessionp->mInstantPerformanceList[i].mAverageBytesUsedForLargeImagePerSecond);
+ *os << llformat(", AveragePercentageBytesUsedPerSecond, N/A, %.4f\n", current_sessionp->mInstantPerformanceList[i].mAveragePercentageBytesUsedPerSecond);
}
}
}
@@ -3757,144 +3792,144 @@ void LLTexturePipelineTester::compareTestSessions(std::ofstream* os)
//virtual
LLMetricPerformanceTesterWithSession::LLTestSession* LLTexturePipelineTester::loadTestSession(LLSD* log)
{
- LLTexturePipelineTester::LLTextureTestSession* sessionp = new LLTexturePipelineTester::LLTextureTestSession() ;
+ LLTexturePipelineTester::LLTextureTestSession* sessionp = new LLTexturePipelineTester::LLTextureTestSession();
if(!sessionp)
{
- return NULL ;
+ return NULL;
}
- F32 total_fetching_time = 0.f ;
- F32 total_gray_time = 0.f ;
- F32 total_stablizing_time = 0.f ;
- F32 total_loading_sculpties_time = 0.f ;
-
- F32 start_fetching_time = -1.f ;
- F32 start_fetching_sculpties_time = 0.f ;
-
- F32 last_time = 0.0f ;
- S32 frame_count = 0 ;
-
- sessionp->mInstantPerformanceListCounter = 0 ;
- sessionp->mInstantPerformanceList.resize(128) ;
- sessionp->mInstantPerformanceList[sessionp->mInstantPerformanceListCounter].mAverageBytesUsedPerSecond = 0 ;
- sessionp->mInstantPerformanceList[sessionp->mInstantPerformanceListCounter].mAverageBytesUsedForLargeImagePerSecond = 0 ;
- sessionp->mInstantPerformanceList[sessionp->mInstantPerformanceListCounter].mAveragePercentageBytesUsedPerSecond = 0.f ;
- sessionp->mInstantPerformanceList[sessionp->mInstantPerformanceListCounter].mTime = 0.f ;
+ F32 total_fetching_time = 0.f;
+ F32 total_gray_time = 0.f;
+ F32 total_stablizing_time = 0.f;
+ F32 total_loading_sculpties_time = 0.f;
+
+ F32 start_fetching_time = -1.f;
+ F32 start_fetching_sculpties_time = 0.f;
+
+ F32 last_time = 0.0f;
+ S32 frame_count = 0;
+
+ sessionp->mInstantPerformanceListCounter = 0;
+ sessionp->mInstantPerformanceList.resize(128);
+ sessionp->mInstantPerformanceList[sessionp->mInstantPerformanceListCounter].mAverageBytesUsedPerSecond = 0;
+ sessionp->mInstantPerformanceList[sessionp->mInstantPerformanceListCounter].mAverageBytesUsedForLargeImagePerSecond = 0;
+ sessionp->mInstantPerformanceList[sessionp->mInstantPerformanceListCounter].mAveragePercentageBytesUsedPerSecond = 0.f;
+ sessionp->mInstantPerformanceList[sessionp->mInstantPerformanceListCounter].mTime = 0.f;
//load a session
std::string currentLabel = getCurrentLabelName();
- BOOL in_log = (*log).has(currentLabel) ;
+ BOOL in_log = (*log).has(currentLabel);
while (in_log)
{
- LLSD::String label = currentLabel ;
+ LLSD::String label = currentLabel;
if(sessionp->mInstantPerformanceListCounter >= (S32)sessionp->mInstantPerformanceList.size())
{
- sessionp->mInstantPerformanceList.resize(sessionp->mInstantPerformanceListCounter + 128) ;
+ sessionp->mInstantPerformanceList.resize(sessionp->mInstantPerformanceListCounter + 128);
}
//time
- F32 start_time = (*log)[label]["StartFetchingTime"].asReal() ;
- F32 cur_time = (*log)[label]["Time"].asReal() ;
+ F32 start_time = (*log)[label]["StartFetchingTime"].asReal();
+ F32 cur_time = (*log)[label]["Time"].asReal();
if(start_time - start_fetching_time > F_ALMOST_ZERO) //fetching has paused for a while
{
- sessionp->mTotalFetchingTime += total_fetching_time ;
- sessionp->mTotalGrayTime += total_gray_time ;
- sessionp->mTotalStablizingTime += total_stablizing_time ;
+ sessionp->mTotalFetchingTime += total_fetching_time;
+ sessionp->mTotalGrayTime += total_gray_time;
+ sessionp->mTotalStablizingTime += total_stablizing_time;
- sessionp->mStartTimeLoadingSculpties = start_fetching_sculpties_time ;
- sessionp->mTotalTimeLoadingSculpties += total_loading_sculpties_time ;
+ sessionp->mStartTimeLoadingSculpties = start_fetching_sculpties_time;
+ sessionp->mTotalTimeLoadingSculpties += total_loading_sculpties_time;
- start_fetching_time = start_time ;
- total_fetching_time = 0.0f ;
- total_gray_time = 0.f ;
- total_stablizing_time = 0.f ;
- total_loading_sculpties_time = 0.f ;
+ start_fetching_time = start_time;
+ total_fetching_time = 0.0f;
+ total_gray_time = 0.f;
+ total_stablizing_time = 0.f;
+ total_loading_sculpties_time = 0.f;
}
else
{
- total_fetching_time = cur_time - start_time ;
- total_gray_time = (*log)[label]["TotalGrayTime"].asReal() ;
- total_stablizing_time = (*log)[label]["TotalStablizingTime"].asReal() ;
+ total_fetching_time = cur_time - start_time;
+ total_gray_time = (*log)[label]["TotalGrayTime"].asReal();
+ total_stablizing_time = (*log)[label]["TotalStablizingTime"].asReal();
- total_loading_sculpties_time = (*log)[label]["EndTimeLoadingSculpties"].asReal() - (*log)[label]["StartTimeLoadingSculpties"].asReal() ;
+ total_loading_sculpties_time = (*log)[label]["EndTimeLoadingSculpties"].asReal() - (*log)[label]["StartTimeLoadingSculpties"].asReal();
if(start_fetching_sculpties_time < 0.f && total_loading_sculpties_time > 0.f)
{
- start_fetching_sculpties_time = (*log)[label]["StartTimeLoadingSculpties"].asReal() ;
+ start_fetching_sculpties_time = (*log)[label]["StartTimeLoadingSculpties"].asReal();
}
}
//total loaded bytes
- sessionp->mTotalBytesLoaded = (*log)[label]["TotalBytesLoaded"].asInteger() ;
- sessionp->mTotalBytesLoadedFromCache = (*log)[label]["TotalBytesLoadedFromCache"].asInteger() ;
- sessionp->mTotalBytesLoadedForLargeImage = (*log)[label]["TotalBytesLoadedForLargeImage"].asInteger() ;
- sessionp->mTotalBytesLoadedForSculpties = (*log)[label]["TotalBytesLoadedForSculpties"].asInteger() ;
+ sessionp->mTotalBytesLoaded = (*log)[label]["TotalBytesLoaded"].asInteger();
+ sessionp->mTotalBytesLoadedFromCache = (*log)[label]["TotalBytesLoadedFromCache"].asInteger();
+ sessionp->mTotalBytesLoadedForLargeImage = (*log)[label]["TotalBytesLoadedForLargeImage"].asInteger();
+ sessionp->mTotalBytesLoadedForSculpties = (*log)[label]["TotalBytesLoadedForSculpties"].asInteger();
//instant metrics
sessionp->mInstantPerformanceList[sessionp->mInstantPerformanceListCounter].mAverageBytesUsedPerSecond +=
- (*log)[label]["TotalBytesBound"].asInteger() ;
+ (*log)[label]["TotalBytesBound"].asInteger();
sessionp->mInstantPerformanceList[sessionp->mInstantPerformanceListCounter].mAverageBytesUsedForLargeImagePerSecond +=
- (*log)[label]["TotalBytesBoundForLargeImage"].asInteger() ;
+ (*log)[label]["TotalBytesBoundForLargeImage"].asInteger();
sessionp->mInstantPerformanceList[sessionp->mInstantPerformanceListCounter].mAveragePercentageBytesUsedPerSecond +=
- (*log)[label]["PercentageBytesBound"].asReal() ;
- frame_count++ ;
+ (*log)[label]["PercentageBytesBound"].asReal();
+ frame_count++;
if(cur_time - last_time >= 1.0f)
{
- sessionp->mInstantPerformanceList[sessionp->mInstantPerformanceListCounter].mAverageBytesUsedPerSecond /= frame_count ;
- sessionp->mInstantPerformanceList[sessionp->mInstantPerformanceListCounter].mAverageBytesUsedForLargeImagePerSecond /= frame_count ;
- sessionp->mInstantPerformanceList[sessionp->mInstantPerformanceListCounter].mAveragePercentageBytesUsedPerSecond /= frame_count ;
- sessionp->mInstantPerformanceList[sessionp->mInstantPerformanceListCounter].mTime = last_time ;
+ sessionp->mInstantPerformanceList[sessionp->mInstantPerformanceListCounter].mAverageBytesUsedPerSecond /= frame_count;
+ sessionp->mInstantPerformanceList[sessionp->mInstantPerformanceListCounter].mAverageBytesUsedForLargeImagePerSecond /= frame_count;
+ sessionp->mInstantPerformanceList[sessionp->mInstantPerformanceListCounter].mAveragePercentageBytesUsedPerSecond /= frame_count;
+ sessionp->mInstantPerformanceList[sessionp->mInstantPerformanceListCounter].mTime = last_time;
- frame_count = 0 ;
- last_time = cur_time ;
- sessionp->mInstantPerformanceListCounter++ ;
- sessionp->mInstantPerformanceList[sessionp->mInstantPerformanceListCounter].mAverageBytesUsedPerSecond = 0 ;
- sessionp->mInstantPerformanceList[sessionp->mInstantPerformanceListCounter].mAverageBytesUsedForLargeImagePerSecond = 0 ;
- sessionp->mInstantPerformanceList[sessionp->mInstantPerformanceListCounter].mAveragePercentageBytesUsedPerSecond = 0.f ;
- sessionp->mInstantPerformanceList[sessionp->mInstantPerformanceListCounter].mTime = 0.f ;
+ frame_count = 0;
+ last_time = cur_time;
+ sessionp->mInstantPerformanceListCounter++;
+ sessionp->mInstantPerformanceList[sessionp->mInstantPerformanceListCounter].mAverageBytesUsedPerSecond = 0;
+ sessionp->mInstantPerformanceList[sessionp->mInstantPerformanceListCounter].mAverageBytesUsedForLargeImagePerSecond = 0;
+ sessionp->mInstantPerformanceList[sessionp->mInstantPerformanceListCounter].mAveragePercentageBytesUsedPerSecond = 0.f;
+ sessionp->mInstantPerformanceList[sessionp->mInstantPerformanceListCounter].mTime = 0.f;
}
// Next label
- incrementCurrentCount() ;
+ incrementCurrentCount();
currentLabel = getCurrentLabelName();
- in_log = (*log).has(currentLabel) ;
+ in_log = (*log).has(currentLabel);
}
- sessionp->mTotalFetchingTime += total_fetching_time ;
- sessionp->mTotalGrayTime += total_gray_time ;
- sessionp->mTotalStablizingTime += total_stablizing_time ;
+ sessionp->mTotalFetchingTime += total_fetching_time;
+ sessionp->mTotalGrayTime += total_gray_time;
+ sessionp->mTotalStablizingTime += total_stablizing_time;
if(sessionp->mStartTimeLoadingSculpties < 0.f)
{
- sessionp->mStartTimeLoadingSculpties = start_fetching_sculpties_time ;
+ sessionp->mStartTimeLoadingSculpties = start_fetching_sculpties_time;
}
- sessionp->mTotalTimeLoadingSculpties += total_loading_sculpties_time ;
+ sessionp->mTotalTimeLoadingSculpties += total_loading_sculpties_time;
return sessionp;
}
LLTexturePipelineTester::LLTextureTestSession::LLTextureTestSession()
{
- reset() ;
+ reset();
}
LLTexturePipelineTester::LLTextureTestSession::~LLTextureTestSession()
{
}
void LLTexturePipelineTester::LLTextureTestSession::reset()
{
- mTotalFetchingTime = 0.0f ;
+ mTotalFetchingTime = 0.0f;
- mTotalGrayTime = 0.0f ;
- mTotalStablizingTime = 0.0f ;
+ mTotalGrayTime = 0.0f;
+ mTotalStablizingTime = 0.0f;
- mStartTimeLoadingSculpties = 0.0f ;
- mTotalTimeLoadingSculpties = 0.0f ;
+ mStartTimeLoadingSculpties = 0.0f;
+ mTotalTimeLoadingSculpties = 0.0f;
- mTotalBytesLoaded = 0 ;
- mTotalBytesLoadedFromCache = 0 ;
- mTotalBytesLoadedForLargeImage = 0 ;
- mTotalBytesLoadedForSculpties = 0 ;
+ mTotalBytesLoaded = 0;
+ mTotalBytesLoadedFromCache = 0;
+ mTotalBytesLoadedForLargeImage = 0;
+ mTotalBytesLoadedForSculpties = 0;
- mInstantPerformanceListCounter = 0 ;
+ mInstantPerformanceListCounter = 0;
}
//----------------------------------------------------------------------------------------------
//end of LLTexturePipelineTester
diff --git a/indra/newview/llviewertexture.h b/indra/newview/llviewertexture.h
index 10101a4b9b..b12b988513 100755
--- a/indra/newview/llviewertexture.h
+++ b/indra/newview/llviewertexture.h
@@ -34,13 +34,12 @@
#include "llgltypes.h"
#include "llrender.h"
#include "llmetricperformancetester.h"
-#include "llface.h"
#include <map>
#include <list>
-#define MIN_VIDEO_RAM_IN_MEGA_BYTES 32
-#define MAX_VIDEO_RAM_IN_MEGA_BYTES 512 // 512MB max for performance reasons.
+extern const S32Megabytes gMinVideoRam;
+extern const S32Megabytes gMaxVideoRam;
class LLImageGL ;
class LLImageRaw;
@@ -101,8 +100,7 @@ public:
INVALID_TEXTURE_TYPE
};
-
- typedef std::vector<LLFace*> ll_face_list_t;
+ typedef std::vector<class LLFace*> ll_face_list_t;
typedef std::vector<LLVOVolume*> ll_volume_list_t;
@@ -121,10 +119,12 @@ public:
virtual S8 getType() const;
virtual BOOL isMissingAsset()const ;
- virtual void dump(); // debug info to llinfos
+ virtual void dump(); // debug info to LL_INFOS()
/*virtual*/ bool bindDefaultImage(const S32 stage = 0) ;
+ /*virtual*/ bool bindDebugImage(const S32 stage = 0) ;
/*virtual*/ void forceImmediateUpdate() ;
+ /*virtual*/ bool isActiveFetching();
/*virtual*/ const LLUUID& getID() const { return mID; }
void setBoostLevel(S32 level);
@@ -205,11 +205,11 @@ public:
static LLFrameTimer sEvaluationTimer;
static F32 sDesiredDiscardBias;
static F32 sDesiredDiscardScale;
- static S32 sBoundTextureMemoryInBytes;
- static S32 sTotalTextureMemoryInBytes;
- static S32 sMaxBoundTextureMemInMegaBytes;
- static S32 sMaxTotalTextureMemInMegaBytes;
- static S32 sMaxDesiredTextureMemInBytes ;
+ static S32Bytes sBoundTextureMemory;
+ static S32Bytes sTotalTextureMemory;
+ static S32Megabytes sMaxBoundTextureMem;
+ static S32Megabytes sMaxTotalTextureMem;
+ static S32Bytes sMaxDesiredTextureMem ;
static S8 sCameraMovingDiscardBias;
static F32 sCameraMovingBias;
static S32 sMaxSculptRez ;
@@ -217,7 +217,7 @@ public:
static S32 sMaxSmallImageSize ;
static BOOL sFreezeImageScalingDown ;//do not scale down image res if set.
static F32 sCurrentTime ;
-
+
enum EDebugTexels
{
DEBUG_TEXELS_OFF,
@@ -397,12 +397,15 @@ public:
void loadFromFastCache();
void setInFastCacheList(bool in_list) { mInFastCacheList = in_list; }
bool isInFastCacheList() { return mInFastCacheList; }
+
+ /*virtual*/bool isActiveFetching(); //is actively in fetching by the fetching pipeline.
+
protected:
/*virtual*/ void switchToCachedImage();
S32 getCurrentDiscardLevelForFetching() ;
private:
- void init(bool firstinit) ;
+ void init(bool firstinit) ;
void cleanup() ;
void saveRawImage() ;
@@ -444,7 +447,7 @@ protected:
S8 mHasFetcher; // We've made a fecth request
S8 mIsFetching; // Fetch request is active
bool mCanUseHTTP ; //This texture can be fetched through http if true.
-
+
FTType mFTType; // What category of image is this - map tile, server bake, etc?
mutable S8 mIsMissingAsset; // True if we know that there is no image asset with this image id in the database.
@@ -687,18 +690,18 @@ private:
private:
BOOL mUsingDefaultTexture; //if set, some textures are still gray.
- U32 mTotalBytesUsed ; //total bytes of textures bound/used for the current frame.
- U32 mTotalBytesUsedForLargeImage ; //total bytes of textures bound/used for the current frame for images larger than 256 * 256.
- U32 mLastTotalBytesUsed ; //total bytes of textures bound/used for the previous frame.
- U32 mLastTotalBytesUsedForLargeImage ; //total bytes of textures bound/used for the previous frame for images larger than 256 * 256.
+ U32Bytes mTotalBytesUsed ; //total bytes of textures bound/used for the current frame.
+ U32Bytes mTotalBytesUsedForLargeImage ; //total bytes of textures bound/used for the current frame for images larger than 256 * 256.
+ U32Bytes mLastTotalBytesUsed ; //total bytes of textures bound/used for the previous frame.
+ U32Bytes mLastTotalBytesUsedForLargeImage ; //total bytes of textures bound/used for the previous frame for images larger than 256 * 256.
//
//data size
//
- U32 mTotalBytesLoaded ; //total bytes fetched by texture pipeline
- U32 mTotalBytesLoadedFromCache ; //total bytes fetched by texture pipeline from local cache
- U32 mTotalBytesLoadedForLargeImage ; //total bytes fetched by texture pipeline for images larger than 256 * 256.
- U32 mTotalBytesLoadedForSculpties ; //total bytes fetched by texture pipeline for sculpties
+ U32Bytes mTotalBytesLoaded ; //total bytes fetched by texture pipeline
+ U32Bytes mTotalBytesLoadedFromCache ; //total bytes fetched by texture pipeline from local cache
+ U32Bytes mTotalBytesLoadedForLargeImage ; //total bytes fetched by texture pipeline for images larger than 256 * 256.
+ U32Bytes mTotalBytesLoadedForSculpties ; //total bytes fetched by texture pipeline for sculpties
//
//time
diff --git a/indra/newview/llviewertexturelist.cpp b/indra/newview/llviewertexturelist.cpp
index 783d1f2202..b98726900f 100755
--- a/indra/newview/llviewertexturelist.cpp
+++ b/indra/newview/llviewertexturelist.cpp
@@ -30,7 +30,6 @@
#include "llviewertexturelist.h"
-#include "imageids.h"
#include "llgl.h" // fot gathering stats from GL
#include "llimagegl.h"
#include "llimagebmp.h"
@@ -58,24 +57,19 @@
#include "pipeline.h"
#include "llappviewer.h"
#include "llxuiparser.h"
+#include "lltracerecording.h"
#include "llviewerdisplay.h"
-
+#include "llviewerwindow.h"
+#include "llprogressview.h"
////////////////////////////////////////////////////////////////////////////
void (*LLViewerTextureList::sUUIDCallback)(void **, const LLUUID&) = NULL;
-U32 LLViewerTextureList::sTextureBits = 0;
-U32 LLViewerTextureList::sTexturePackets = 0;
S32 LLViewerTextureList::sNumImages = 0;
-LLStat LLViewerTextureList::sNumImagesStat("Num Images", 32, TRUE);
-LLStat LLViewerTextureList::sNumRawImagesStat("Num Raw Images", 32, TRUE);
-LLStat LLViewerTextureList::sGLTexMemStat("GL Texture Mem", 32, TRUE);
-LLStat LLViewerTextureList::sGLBoundMemStat("GL Bound Mem", 32, TRUE);
-LLStat LLViewerTextureList::sRawMemStat("Raw Image Mem", 32, TRUE);
-LLStat LLViewerTextureList::sFormattedMemStat("Formatted Image Mem", 32, TRUE);
LLViewerTextureList gTextureList;
-static LLFastTimer::DeclareTimer FTM_PROCESS_IMAGES("Process Images");
+static LLTrace::BlockTimerStatHandle FTM_PROCESS_IMAGES("Process Images");
+
///////////////////////////////////////////////////////////////////////////////
@@ -93,11 +87,11 @@ void LLViewerTextureList::init()
mInitialized = TRUE ;
sNumImages = 0;
mUpdateStats = TRUE;
- mMaxResidentTexMemInMegaBytes = 0;
- mMaxTotalTextureMemInMegaBytes = 0 ;
+ mMaxResidentTexMemInMegaBytes = (U32Bytes)0;
+ mMaxTotalTextureMemInMegaBytes = (U32Bytes)0;
// Update how much texture RAM we're allowed to use.
- updateMaxResidentTexMem(0); // 0 = use current
+ updateMaxResidentTexMem(S32Megabytes(0)); // 0 = use current
doPreloadImages();
}
@@ -292,18 +286,18 @@ void LLViewerTextureList::shutdown()
void LLViewerTextureList::dump()
{
- llinfos << "LLViewerTextureList::dump()" << llendl;
+ LL_INFOS() << "LLViewerTextureList::dump()" << LL_ENDL;
for (image_priority_list_t::iterator it = mImageList.begin(); it != mImageList.end(); ++it)
{
LLViewerFetchedTexture* image = *it;
- llinfos << "priority " << image->getDecodePriority()
+ LL_INFOS() << "priority " << image->getDecodePriority()
<< " boost " << image->getBoostLevel()
<< " size " << image->getWidth() << "x" << image->getHeight()
<< " discard " << image->getDiscardLevel()
<< " desired " << image->getDesiredDiscardLevel()
<< " http://asset.siva.lindenlab.com/" << image->getID() << ".texture"
- << llendl;
+ << LL_ENDL;
}
}
@@ -327,7 +321,7 @@ void LLViewerTextureList::restoreGL()
///////////////////////////////////////////////////////////////////////////////
-LLViewerFetchedTexture* LLViewerTextureList::getImageFromFile(const std::string& filename,
+LLViewerFetchedTexture* LLViewerTextureList::getImageFromFile(const std::string& filename,
FTType f_type,
BOOL usemipmaps,
LLViewerTexture::EBoostLevel boost_priority,
@@ -344,7 +338,7 @@ LLViewerFetchedTexture* LLViewerTextureList::getImageFromFile(const std::string&
std::string full_path = gDirUtilp->findSkinnedFilename("textures", filename);
if (full_path.empty())
{
- llwarns << "Failed to find local image file: " << filename << llendl;
+ LL_WARNS() << "Failed to find local image file: " << filename << LL_ENDL;
return LLViewerTextureManager::getFetchedTexture(IMG_DEFAULT, FTT_DEFAULT, TRUE, LLGLTexture::BOOST_UI);
}
@@ -379,13 +373,13 @@ LLViewerFetchedTexture* LLViewerTextureList::getImageFromUrl(const std::string&
}
LLPointer<LLViewerFetchedTexture> imagep = findImage(new_id);
-
+
if (!imagep.isNull())
{
LLViewerFetchedTexture *texture = imagep.get();
if (texture->getUrl().empty())
{
- llwarns << "Requested texture " << new_id << " already exists but does not have a URL" << llendl;
+ LL_WARNS() << "Requested texture " << new_id << " already exists but does not have a URL" << LL_ENDL;
}
else if (texture->getUrl() != url)
{
@@ -393,7 +387,7 @@ LLViewerFetchedTexture* LLViewerTextureList::getImageFromUrl(const std::string&
// e.g. could be two avatars wearing the same outfit.
LL_DEBUGS("Avatar") << "Requested texture " << new_id
<< " already exists with a different url, requested: " << url
- << " current: " << texture->getUrl() << llendl;
+ << " current: " << texture->getUrl() << LL_ENDL;
}
}
@@ -408,7 +402,7 @@ LLViewerFetchedTexture* LLViewerTextureList::getImageFromUrl(const std::string&
imagep = new LLViewerLODTexture(url, f_type, new_id, usemipmaps);
break ;
default:
- llerrs << "Invalid texture type " << texture_type << llendl ;
+ LL_ERRS() << "Invalid texture type " << texture_type << LL_ENDL ;
}
if (internal_format && primary_format)
@@ -435,7 +429,7 @@ LLViewerFetchedTexture* LLViewerTextureList::getImageFromUrl(const std::string&
}
-LLViewerFetchedTexture* LLViewerTextureList::getImage(const LLUUID &image_id,
+LLViewerFetchedTexture* LLViewerTextureList::getImage(const LLUUID &image_id,
FTType f_type,
BOOL usemipmaps,
LLViewerTexture::EBoostLevel boost_priority,
@@ -465,20 +459,20 @@ LLViewerFetchedTexture* LLViewerTextureList::getImage(const LLUUID &image_id,
if (request_from_host.isOk() &&
!texture->getTargetHost().isOk())
{
- llwarns << "Requested texture " << image_id << " already exists but does not have a host" << llendl;
+ LL_WARNS() << "Requested texture " << image_id << " already exists but does not have a host" << LL_ENDL;
}
else if (request_from_host.isOk() &&
texture->getTargetHost().isOk() &&
request_from_host != texture->getTargetHost())
{
- llwarns << "Requested texture " << image_id << " already exists with a different target host, requested: "
- << request_from_host << " current: " << texture->getTargetHost() << llendl;
+ LL_WARNS() << "Requested texture " << image_id << " already exists with a different target host, requested: "
+ << request_from_host << " current: " << texture->getTargetHost() << LL_ENDL;
}
if (f_type != FTT_DEFAULT && imagep->getFTType() != f_type)
{
- llwarns << "FTType mismatch: requested " << f_type << " image has " << imagep->getFTType() << llendl;
+ LL_WARNS() << "FTType mismatch: requested " << f_type << " image has " << imagep->getFTType() << LL_ENDL;
}
-
+
}
if (imagep.isNull())
{
@@ -491,7 +485,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,
+LLViewerFetchedTexture* LLViewerTextureList::createImage(const LLUUID &image_id,
FTType f_type,
BOOL usemipmaps,
LLViewerTexture::EBoostLevel boost_priority,
@@ -512,7 +506,7 @@ LLViewerFetchedTexture* LLViewerTextureList::createImage(const LLUUID &image_id,
imagep = new LLViewerLODTexture(image_id, f_type, request_from_host, usemipmaps);
break ;
default:
- llerrs << "Invalid texture type " << texture_type << llendl ;
+ LL_ERRS() << "Invalid texture type " << texture_type << LL_ENDL ;
}
if (internal_format && primary_format)
@@ -562,13 +556,13 @@ void LLViewerTextureList::addImageToList(LLViewerFetchedTexture *image)
llassert(image);
if (image->isInImageList())
{ // Flag is already set?
- llwarns << "LLViewerTextureList::addImageToList - image " << image->getID() << " already in list" << llendl;
+ LL_WARNS() << "LLViewerTextureList::addImageToList - image " << image->getID() << " already in list" << LL_ENDL;
}
else
{
if((mImageList.insert(image)).second != true)
{
- llwarns << "Error happens when insert image " << image->getID() << " into mImageList!" << llendl ;
+ LL_WARNS() << "Error happens when insert image " << image->getID() << " into mImageList!" << LL_ENDL ;
}
image->setInImageList(TRUE) ;
}
@@ -586,36 +580,36 @@ void LLViewerTextureList::removeImageFromList(LLViewerFetchedTexture *image)
count = mImageList.erase(image) ;
if(count != 1)
{
- llinfos << "Image " << image->getID()
+ LL_INFOS() << "Image " << image->getID()
<< " had mInImageList set but mImageList.erase() returned " << count
- << llendl;
+ << LL_ENDL;
}
}
else
{ // Something is wrong, image is expected in list or callers should check first
- llinfos << "Calling removeImageFromList() for " << image->getID()
+ LL_INFOS() << "Calling removeImageFromList() for " << image->getID()
<< " but doesn't have mInImageList set"
<< " ref count is " << image->getNumRefs()
- << llendl;
+ << LL_ENDL;
uuid_map_t::iterator iter = mUUIDMap.find(image->getID());
if(iter == mUUIDMap.end())
{
- llinfos << "Image " << image->getID() << " is also not in mUUIDMap!" << llendl ;
+ LL_INFOS() << "Image " << image->getID() << " is also not in mUUIDMap!" << LL_ENDL ;
}
else if (iter->second != image)
{
- llinfos << "Image " << image->getID() << " was in mUUIDMap but with different pointer" << llendl ;
+ LL_INFOS() << "Image " << image->getID() << " was in mUUIDMap but with different pointer" << LL_ENDL ;
}
else
{
- llinfos << "Image " << image->getID() << " was in mUUIDMap with same pointer" << llendl ;
+ LL_INFOS() << "Image " << image->getID() << " was in mUUIDMap with same pointer" << LL_ENDL ;
}
count = mImageList.erase(image) ;
if(count != 0)
{ // it was in the list already?
- llwarns << "Image " << image->getID()
+ LL_WARNS() << "Image " << image->getID()
<< " had mInImageList false but mImageList.erase() returned " << count
- << llendl;
+ << LL_ENDL;
}
}
@@ -634,7 +628,7 @@ void LLViewerTextureList::addImage(LLViewerFetchedTexture *new_image)
LLViewerFetchedTexture *image = findImage(image_id);
if (image)
{
- llinfos << "Image with ID " << image_id << " already in list" << llendl;
+ LL_INFOS() << "Image with ID " << image_id << " already in list" << LL_ENDL;
}
sNumImages++;
@@ -669,16 +663,18 @@ void LLViewerTextureList::dirtyImage(LLViewerFetchedTexture *image)
}
////////////////////////////////////////////////////////////////////////////
-static LLFastTimer::DeclareTimer FTM_IMAGE_MARK_DIRTY("Dirty Images");
-static LLFastTimer::DeclareTimer FTM_IMAGE_UPDATE_PRIORITIES("Prioritize");
-static LLFastTimer::DeclareTimer FTM_IMAGE_CALLBACKS("Callbacks");
-static LLFastTimer::DeclareTimer FTM_IMAGE_FETCH("Fetch");
-static LLFastTimer::DeclareTimer FTM_FAST_CACHE_IMAGE_FETCH("Fast Cache Fetch");
-static LLFastTimer::DeclareTimer FTM_IMAGE_CREATE("Create");
-static LLFastTimer::DeclareTimer FTM_IMAGE_STATS("Stats");
+static LLTrace::BlockTimerStatHandle FTM_IMAGE_MARK_DIRTY("Dirty Images");
+static LLTrace::BlockTimerStatHandle FTM_IMAGE_UPDATE_PRIORITIES("Prioritize");
+static LLTrace::BlockTimerStatHandle FTM_IMAGE_CALLBACKS("Callbacks");
+static LLTrace::BlockTimerStatHandle FTM_IMAGE_FETCH("Fetch");
+static LLTrace::BlockTimerStatHandle FTM_FAST_CACHE_IMAGE_FETCH("Fast Cache Fetch");
+static LLTrace::BlockTimerStatHandle FTM_IMAGE_CREATE("Create");
+static LLTrace::BlockTimerStatHandle FTM_IMAGE_STATS("Stats");
+static LLTrace::BlockTimerStatHandle FTM_UPDATE_TEXTURES("Update Textures");
void LLViewerTextureList::updateImages(F32 max_time)
{
+ LL_RECORD_BLOCK_TIME(FTM_UPDATE_TEXTURES);
static BOOL cleared = FALSE;
if(gTeleportDisplay)
{
@@ -692,48 +688,51 @@ void LLViewerTextureList::updateImages(F32 max_time)
}
cleared = FALSE;
- LLAppViewer::getTextureFetch()->setTextureBandwidth(LLViewerStats::getInstance()->mTextureKBitStat.getMeanPerSec());
+ LLAppViewer::getTextureFetch()->setTextureBandwidth(LLTrace::get_frame_recording().getPeriodMeanPerSec(LLStatViewer::TEXTURE_NETWORK_DATA_RECEIVED).value());
- LLViewerStats::getInstance()->mNumImagesStat.addValue(sNumImages);
- LLViewerStats::getInstance()->mNumRawImagesStat.addValue(LLImageRaw::sRawImageCount);
- LLViewerStats::getInstance()->mGLTexMemStat.addValue((F32)BYTES_TO_MEGA_BYTES(LLImageGL::sGlobalTextureMemoryInBytes));
- LLViewerStats::getInstance()->mGLBoundMemStat.addValue((F32)BYTES_TO_MEGA_BYTES(LLImageGL::sBoundTextureMemoryInBytes));
- LLViewerStats::getInstance()->mRawMemStat.addValue((F32)BYTES_TO_MEGA_BYTES(LLImageRaw::sGlobalRawMemory));
- LLViewerStats::getInstance()->mFormattedMemStat.addValue((F32)BYTES_TO_MEGA_BYTES(LLImageFormatted::sGlobalFormattedMemory));
+ {
+ using namespace LLStatViewer;
+ sample(NUM_IMAGES, sNumImages);
+ sample(NUM_RAW_IMAGES, LLImageRaw::sRawImageCount);
+ sample(GL_TEX_MEM, LLImageGL::sGlobalTextureMemory);
+ sample(GL_BOUND_MEM, LLImageGL::sBoundTextureMemory);
+ sample(RAW_MEM, F64Bytes(LLImageRaw::sGlobalRawMemory));
+ sample(FORMATTED_MEM, F64Bytes(LLImageFormatted::sGlobalFormattedMemory));
+ }
{
//loading from fast cache
- LLFastTimer t(FTM_FAST_CACHE_IMAGE_FETCH);
+ LL_RECORD_BLOCK_TIME(FTM_FAST_CACHE_IMAGE_FETCH);
max_time -= updateImagesLoadingFastCache(max_time);
}
{
- LLFastTimer t(FTM_IMAGE_UPDATE_PRIORITIES);
+ LL_RECORD_BLOCK_TIME(FTM_IMAGE_UPDATE_PRIORITIES);
updateImagesDecodePriorities();
}
F32 total_max_time = max_time;
{
- LLFastTimer t(FTM_IMAGE_FETCH);
+ LL_RECORD_BLOCK_TIME(FTM_IMAGE_FETCH);
max_time -= updateImagesFetchTextures(max_time);
}
{
- LLFastTimer t(FTM_IMAGE_CREATE);
+ LL_RECORD_BLOCK_TIME(FTM_IMAGE_CREATE);
max_time = llmax(max_time, total_max_time*.50f); // at least 50% of max_time
max_time -= updateImagesCreateTextures(max_time);
}
if (!mDirtyTextureList.empty())
{
- LLFastTimer t(FTM_IMAGE_MARK_DIRTY);
+ LL_RECORD_BLOCK_TIME(FTM_IMAGE_MARK_DIRTY);
gPipeline.dirtyPoolObjectTextures(mDirtyTextureList);
mDirtyTextureList.clear();
}
{
- LLFastTimer t(FTM_IMAGE_CALLBACKS);
+ LL_RECORD_BLOCK_TIME(FTM_IMAGE_CALLBACKS);
bool didone = false;
for (image_list_t::iterator iter = mCallbackList.begin();
iter != mCallbackList.end(); )
@@ -754,7 +753,7 @@ void LLViewerTextureList::updateImages(F32 max_time)
}
{
- LLFastTimer t(FTM_IMAGE_STATS);
+ LL_RECORD_BLOCK_TIME(FTM_IMAGE_STATS);
updateImagesUpdateStats();
}
}
@@ -780,8 +779,15 @@ void LLViewerTextureList::updateImagesDecodePriorities()
{
// Update the decode priority for N images each frame
{
+ F32 lazy_flush_timeout = 30.f; // stop decoding
+ F32 max_inactive_time = 20.f; // actually delete
+ S32 min_refs = 3; // 1 for mImageList, 1 for mUUIDMap, 1 for local reference
+
+ //reset imagep->getLastReferencedTimer() when screen is showing the progress view to avoid removing pre-fetched textures too soon.
+ bool reset_timer = gViewerWindow->getProgressView()->getVisible();
+
static const S32 MAX_PRIO_UPDATES = gSavedSettings.getS32("TextureFetchUpdatePriorities"); // default: 32
- const size_t max_update_count = llmin((S32) (MAX_PRIO_UPDATES*MAX_PRIO_UPDATES*gFrameIntervalSeconds) + 1, MAX_PRIO_UPDATES);
+ const size_t max_update_count = llmin((S32) (MAX_PRIO_UPDATES*MAX_PRIO_UPDATES*gFrameIntervalSeconds.value()) + 1, MAX_PRIO_UPDATES);
S32 update_counter = llmin(max_update_count, mUUIDMap.size());
uuid_map_t::iterator iter = mUUIDMap.upper_bound(mLastUpdateUUID);
while ((update_counter-- > 0) && !mUUIDMap.empty())
@@ -803,14 +809,14 @@ void LLViewerTextureList::updateImagesDecodePriorities()
//
// Flush formatted images using a lazy flush
//
- const F32 LAZY_FLUSH_TIMEOUT = 30.f; // stop decoding
- const F32 MAX_INACTIVE_TIME = 20.f; // actually delete
- S32 min_refs = 3; // 1 for mImageList, 1 for mUUIDMap, 1 for local reference
-
S32 num_refs = imagep->getNumRefs();
if (num_refs == min_refs)
{
- if (imagep->getLastReferencedTimer()->getElapsedTimeF32() > LAZY_FLUSH_TIMEOUT)
+ if(reset_timer)
+ {
+ imagep->getLastReferencedTimer()->reset();
+ }
+ else if (imagep->getLastReferencedTimer()->getElapsedTimeF32() > lazy_flush_timeout)
{
// Remove the unused image from the image list
deleteImage(imagep);
@@ -822,7 +828,7 @@ void LLViewerTextureList::updateImagesDecodePriorities()
{
if(imagep->hasSavedRawImage())
{
- if(imagep->getElapsedLastReferencedSavedRawImageTime() > MAX_INACTIVE_TIME)
+ if(imagep->getElapsedLastReferencedSavedRawImageTime() > max_inactive_time)
{
imagep->destroySavedRawImage() ;
}
@@ -839,7 +845,11 @@ void LLViewerTextureList::updateImagesDecodePriorities()
}
else if(imagep->isInactive())
{
- if (imagep->getLastReferencedTimer()->getElapsedTimeF32() > MAX_INACTIVE_TIME)
+ if(reset_timer)
+ {
+ imagep->getLastReferencedTimer()->reset();
+ }
+ else if (imagep->getLastReferencedTimer()->getElapsedTimeF32() > max_inactive_time)
{
imagep->setDeletionCandidate() ;
}
@@ -917,11 +927,11 @@ void LLViewerTextureList::setDebugFetching(LLViewerFetchedTexture* tex, S32 debu
if (type_from_host == LLImageBase::TYPE_NORMAL
&& type_from_boost == LLImageBase::TYPE_AVATAR_BAKE)
{
- llwarns << "TAT: get_image_type() type_from_host doesn't match type_from_boost"
+ LL_WARNS() << "TAT: get_image_type() type_from_host doesn't match type_from_boost"
<< " host " << target_host
<< " boost " << imagep->getBoostLevel()
<< " imageid " << imagep->getID()
- << llendl;
+ << LL_ENDL;
imagep->dump();
}
return type_from_host;
@@ -1015,11 +1025,11 @@ F32 LLViewerTextureList::updateImagesFetchTextures(F32 max_time)
static const F32 MIN_PRIORITY_THRESHOLD = gSavedSettings.getF32("TextureFetchUpdatePriorityThreshold"); // default: 0.0
static const bool SKIP_LOW_PRIO = gSavedSettings.getBOOL("TextureFetchUpdateSkipLowPriority"); // default: false
- size_t max_priority_count = llmin((S32) (MAX_HIGH_PRIO_COUNT*MAX_HIGH_PRIO_COUNT*gFrameIntervalSeconds)+1, MAX_HIGH_PRIO_COUNT);
+ size_t max_priority_count = llmin((S32) (MAX_HIGH_PRIO_COUNT*MAX_HIGH_PRIO_COUNT*gFrameIntervalSeconds.value())+1, MAX_HIGH_PRIO_COUNT);
max_priority_count = llmin(max_priority_count, mImageList.size());
size_t total_update_count = mUUIDMap.size();
- size_t max_update_count = llmin((S32) (MAX_UPDATE_COUNT*MAX_UPDATE_COUNT*gFrameIntervalSeconds)+1, MAX_UPDATE_COUNT);
+ size_t max_update_count = llmin((S32) (MAX_UPDATE_COUNT*MAX_UPDATE_COUNT*gFrameIntervalSeconds.value())+1, MAX_UPDATE_COUNT);
max_update_count = llmin(max_update_count, total_update_count);
// MAX_HIGH_PRIO_COUNT high priority entries
@@ -1195,13 +1205,13 @@ BOOL LLViewerTextureList::createUploadFile(const std::string& filename,
if (compressedImage.isNull())
{
image->setLastError("Couldn't convert the image to jpeg2000.");
- llinfos << "Couldn't convert to j2c, file : " << filename << llendl;
+ LL_INFOS() << "Couldn't convert to j2c, file : " << filename << LL_ENDL;
return FALSE;
}
if (!compressedImage->save(out_filename))
{
image->setLastError("Couldn't create the jpeg2000 image for upload.");
- llinfos << "Couldn't create output file : " << out_filename << llendl;
+ LL_INFOS() << "Couldn't create output file : " << out_filename << LL_ENDL;
return FALSE;
}
// Test to see if the encode and save worked
@@ -1209,7 +1219,7 @@ BOOL LLViewerTextureList::createUploadFile(const std::string& filename,
if (!integrity_test->loadAndValidate( out_filename ))
{
image->setLastError("The created jpeg2000 image is corrupt.");
- llinfos << "Image file : " << out_filename << " is corrupt" << llendl;
+ LL_INFOS() << "Image file : " << out_filename << " is corrupt" << LL_ENDL;
return FALSE;
}
return TRUE;
@@ -1234,13 +1244,13 @@ LLPointer<LLImageJ2C> LLViewerTextureList::convertToUploadFile(LLPointer<LLImage
// Read the blocks and precincts size settings
S32 block_size = gSavedSettings.getS32("Jpeg2000BlocksSize");
S32 precinct_size = gSavedSettings.getS32("Jpeg2000PrecinctsSize");
- llinfos << "Advanced JPEG2000 Compression: precinct = " << precinct_size << ", block = " << block_size << llendl;
+ LL_INFOS() << "Advanced JPEG2000 Compression: precinct = " << precinct_size << ", block = " << block_size << LL_ENDL;
compressedImage->initEncode(*raw_image, block_size, precinct_size, 0);
}
if (!compressedImage->encode(raw_image, 0.0f))
{
- llinfos << "convertToUploadFile : encode returns with error!!" << llendl;
+ LL_INFOS() << "convertToUploadFile : encode returns with error!!" << LL_ENDL;
// Clear up the pointer so we don't leak that one
compressedImage = NULL;
}
@@ -1252,28 +1262,28 @@ const S32 MIN_VIDEO_RAM = 32;
const S32 MAX_VIDEO_RAM = 512; // 512MB max for performance reasons.
// Returns min setting for TextureMemory (in MB)
-S32 LLViewerTextureList::getMinVideoRamSetting()
+S32Megabytes LLViewerTextureList::getMinVideoRamSetting()
{
- S32 system_ram = (S32)BYTES_TO_MEGA_BYTES(gSysMemory.getPhysicalMemoryClamped());
+ S32Megabytes system_ram = gSysMemory.getPhysicalMemoryClamped();
//min texture mem sets to 64M if total physical mem is more than 1.5GB
- return (system_ram > 1500) ? 64 : MIN_VIDEO_RAM_IN_MEGA_BYTES ;
+ return (system_ram > S32Megabytes(1500)) ? S32Megabytes(64) : gMinVideoRam ;
}
//static
// Returns max setting for TextureMemory (in MB)
-S32 LLViewerTextureList::getMaxVideoRamSetting(bool get_recommended, float mem_multiplier)
+S32Megabytes LLViewerTextureList::getMaxVideoRamSetting(bool get_recommended, float mem_multiplier)
{
- S32 max_texmem;
+ S32Megabytes max_texmem;
if (gGLManager.mVRAM != 0)
{
// Treat any card with < 32 MB (shudder) as having 32 MB
// - it's going to be swapping constantly regardless
- S32 max_vram = gGLManager.mVRAM;
+ S32Megabytes max_vram(gGLManager.mVRAM);
if(gGLManager.mIsATI)
{
//shrink the availabe vram for ATI cards because some of them do not handel texture swapping well.
- max_vram = (S32)(max_vram * 0.75f);
+ max_vram = max_vram * 0.75f;
}
max_vram = llmax(max_vram, getMinVideoRamSetting());
@@ -1285,48 +1295,48 @@ S32 LLViewerTextureList::getMaxVideoRamSetting(bool get_recommended, float mem_m
{
if (!get_recommended)
{
- max_texmem = 512;
+ max_texmem = (S32Megabytes)512;
}
else if (gSavedSettings.getBOOL("NoHardwareProbe")) //did not do hardware detection at startup
{
- max_texmem = 512;
+ max_texmem = (S32Megabytes)512;
}
else
{
- max_texmem = 128;
+ max_texmem = (S32Megabytes)128;
}
- llwarns << "VRAM amount not detected, defaulting to " << max_texmem << " MB" << llendl;
+ LL_WARNS() << "VRAM amount not detected, defaulting to " << max_texmem << " MB" << LL_ENDL;
}
- S32 system_ram = (S32)BYTES_TO_MEGA_BYTES(gSysMemory.getPhysicalMemoryClamped()); // In MB
- //llinfos << "*** DETECTED " << system_ram << " MB of system memory." << llendl;
+ S32Megabytes system_ram = gSysMemory.getPhysicalMemoryClamped(); // In MB
+ //LL_INFOS() << "*** DETECTED " << system_ram << " MB of system memory." << LL_ENDL;
if (get_recommended)
- max_texmem = llmin(max_texmem, (S32)(system_ram/2));
+ max_texmem = llmin(max_texmem, system_ram/2);
else
- max_texmem = llmin(max_texmem, (S32)(system_ram));
-
+ max_texmem = llmin(max_texmem, system_ram);
+
// limit the texture memory to a multiple of the default if we've found some cards to behave poorly otherwise
- max_texmem = llmin(max_texmem, (S32) (mem_multiplier * (F32) max_texmem));
+ max_texmem = llmin(max_texmem, (S32Megabytes) (mem_multiplier * max_texmem));
- max_texmem = llclamp(max_texmem, getMinVideoRamSetting(), MAX_VIDEO_RAM_IN_MEGA_BYTES);
+ max_texmem = llclamp(max_texmem, getMinVideoRamSetting(), gMaxVideoRam);
return max_texmem;
}
-const S32 VIDEO_CARD_FRAMEBUFFER_MEM = 12; // MB
-const S32 MIN_MEM_FOR_NON_TEXTURE = 512 ; //MB
-void LLViewerTextureList::updateMaxResidentTexMem(S32 mem)
+const S32Megabytes VIDEO_CARD_FRAMEBUFFER_MEM(12);
+const S32Megabytes MIN_MEM_FOR_NON_TEXTURE(512);
+void LLViewerTextureList::updateMaxResidentTexMem(S32Megabytes mem)
{
// Initialize the image pipeline VRAM settings
- S32 cur_mem = gSavedSettings.getS32("TextureMemory");
+ S32Megabytes cur_mem(gSavedSettings.getS32("TextureMemory"));
F32 mem_multiplier = gSavedSettings.getF32("RenderTextureMemoryMultiple");
- S32 default_mem = getMaxVideoRamSetting(true, mem_multiplier); // recommended default
- if (mem == 0)
+ S32Megabytes default_mem = getMaxVideoRamSetting(true, mem_multiplier); // recommended default
+ if (mem == (S32Bytes)0)
{
- mem = cur_mem > 0 ? cur_mem : default_mem;
+ mem = cur_mem > (S32Bytes)0 ? cur_mem : default_mem;
}
- else if (mem < 0)
+ else if (mem < (S32Bytes)0)
{
mem = default_mem;
}
@@ -1334,38 +1344,38 @@ void LLViewerTextureList::updateMaxResidentTexMem(S32 mem)
mem = llclamp(mem, getMinVideoRamSetting(), getMaxVideoRamSetting(false, mem_multiplier));
if (mem != cur_mem)
{
- gSavedSettings.setS32("TextureMemory", mem);
+ gSavedSettings.setS32("TextureMemory", mem.value());
return; //listener will re-enter this function
}
// TODO: set available resident texture mem based on use by other subsystems
// currently max(12MB, VRAM/4) assumed...
- S32 vb_mem = mem;
- S32 fb_mem = llmax(VIDEO_CARD_FRAMEBUFFER_MEM, vb_mem/4);
+ S32Megabytes vb_mem = mem;
+ S32Megabytes fb_mem = llmax(VIDEO_CARD_FRAMEBUFFER_MEM, vb_mem/4);
mMaxResidentTexMemInMegaBytes = (vb_mem - fb_mem) ; //in MB
mMaxTotalTextureMemInMegaBytes = mMaxResidentTexMemInMegaBytes * 2;
- if (mMaxResidentTexMemInMegaBytes > 640)
+ if (mMaxResidentTexMemInMegaBytes > (S32Megabytes)640)
{
- mMaxTotalTextureMemInMegaBytes -= (mMaxResidentTexMemInMegaBytes >> 2);
+ mMaxTotalTextureMemInMegaBytes -= (mMaxResidentTexMemInMegaBytes / 4);
}
//system mem
- S32 system_ram = (S32)BYTES_TO_MEGA_BYTES(gSysMemory.getPhysicalMemoryClamped()); // In MB
+ S32Megabytes system_ram = gSysMemory.getPhysicalMemoryClamped();
//minimum memory reserved for non-texture use.
//if system_raw >= 1GB, reserve at least 512MB for non-texture use;
//otherwise reserve half of the system_ram for non-texture use.
- S32 min_non_texture_mem = llmin(system_ram / 2, MIN_MEM_FOR_NON_TEXTURE) ;
+ S32Megabytes min_non_texture_mem = llmin(system_ram / 2, MIN_MEM_FOR_NON_TEXTURE) ;
if (mMaxTotalTextureMemInMegaBytes > system_ram - min_non_texture_mem)
{
mMaxTotalTextureMemInMegaBytes = system_ram - min_non_texture_mem ;
}
- llinfos << "Total Video Memory set to: " << vb_mem << " MB" << llendl;
- llinfos << "Available Texture Memory set to: " << (vb_mem - fb_mem) << " MB" << llendl;
+ LL_INFOS() << "Total Video Memory set to: " << vb_mem << " MB" << LL_ENDL;
+ LL_INFOS() << "Available Texture Memory set to: " << (vb_mem - fb_mem) << " MB" << LL_ENDL;
}
///////////////////////////////////////////////////////////////////////////////
@@ -1375,7 +1385,7 @@ void LLViewerTextureList::receiveImageHeader(LLMessageSystem *msg, void **user_d
{
static LLCachedControl<bool> log_texture_traffic(gSavedSettings,"LogTextureNetworkTraffic", false) ;
- LLFastTimer t(FTM_PROCESS_IMAGES);
+ LL_RECORD_BLOCK_TIME(FTM_PROCESS_IMAGES);
// Receive image header, copy into image object and decompresses
// if this is a one-packet image.
@@ -1385,17 +1395,17 @@ void LLViewerTextureList::receiveImageHeader(LLMessageSystem *msg, void **user_d
char ip_string[256];
u32_to_ip_string(msg->getSenderIP(),ip_string);
- U32 received_size ;
+ U32Bytes received_size ;
if (msg->getReceiveCompressedSize())
{
- received_size = msg->getReceiveCompressedSize() ;
+ received_size = (U32Bytes)msg->getReceiveCompressedSize() ;
}
else
{
- received_size = msg->getReceiveSize() ;
+ received_size = (U32Bytes)msg->getReceiveSize() ;
}
- gTextureList.sTextureBits += received_size * 8;
- gTextureList.sTexturePackets++;
+ add(LLStatViewer::TEXTURE_NETWORK_DATA_RECEIVED, received_size);
+ add(LLStatViewer::TEXTURE_PACKETS, 1);
U8 codec;
U16 packets;
@@ -1414,8 +1424,8 @@ void LLViewerTextureList::receiveImageHeader(LLMessageSystem *msg, void **user_d
{
// msg->getSizeFast() is probably trying to tell us there
// was an error.
- llerrs << "image header chunk size was negative: "
- << data_size << llendl;
+ LL_ERRS() << "image header chunk size was negative: "
+ << data_size << LL_ENDL;
return;
}
@@ -1447,7 +1457,7 @@ void LLViewerTextureList::receiveImagePacket(LLMessageSystem *msg, void **user_d
{
static LLCachedControl<bool> log_texture_traffic(gSavedSettings,"LogTextureNetworkTraffic", false) ;
- LLFastTimer t(FTM_PROCESS_IMAGES);
+ LL_RECORD_BLOCK_TIME(FTM_PROCESS_IMAGES);
// Receives image packet, copy into image object,
// checks if all packets received, decompresses if so.
@@ -1458,17 +1468,18 @@ void LLViewerTextureList::receiveImagePacket(LLMessageSystem *msg, void **user_d
char ip_string[256];
u32_to_ip_string(msg->getSenderIP(),ip_string);
- U32 received_size ;
+ U32Bytes received_size ;
if (msg->getReceiveCompressedSize())
{
- received_size = msg->getReceiveCompressedSize() ;
+ received_size = (U32Bytes)msg->getReceiveCompressedSize() ;
}
else
{
- received_size = msg->getReceiveSize() ;
+ received_size = (U32Bytes)msg->getReceiveSize() ;
}
- gTextureList.sTextureBits += received_size * 8;
- gTextureList.sTexturePackets++;
+
+ add(LLStatViewer::TEXTURE_NETWORK_DATA_RECEIVED, F64Bytes(received_size));
+ add(LLStatViewer::TEXTURE_PACKETS, 1);
//llprintline("Start decode, image header...");
msg->getUUIDFast(_PREHASH_ImageID, _PREHASH_ID, id);
@@ -1483,13 +1494,13 @@ void LLViewerTextureList::receiveImagePacket(LLMessageSystem *msg, void **user_d
{
// msg->getSizeFast() is probably trying to tell us there
// was an error.
- llerrs << "image data chunk size was negative: "
- << data_size << llendl;
+ LL_ERRS() << "image data chunk size was negative: "
+ << data_size << LL_ENDL;
return;
}
if (data_size > MTUBYTES)
{
- llerrs << "image data chunk too large: " << data_size << " bytes" << llendl;
+ LL_ERRS() << "image data chunk too large: " << data_size << " bytes" << LL_ENDL;
return;
}
U8 *data = new U8[data_size];
@@ -1519,35 +1530,18 @@ void LLViewerTextureList::receiveImagePacket(LLMessageSystem *msg, void **user_d
// static
void LLViewerTextureList::processImageNotInDatabase(LLMessageSystem *msg,void **user_data)
{
- LLFastTimer t(FTM_PROCESS_IMAGES);
+ LL_RECORD_BLOCK_TIME(FTM_PROCESS_IMAGES);
LLUUID image_id;
msg->getUUIDFast(_PREHASH_ImageID, _PREHASH_ID, image_id);
LLViewerFetchedTexture* image = gTextureList.findImage( image_id );
if( image )
{
- llwarns << "not in db" << llendl;
+ LL_WARNS() << "not in db" << LL_ENDL;
image->setIsMissingAsset();
}
}
-///////////////////////////////////////////////////////////////////////////////
-
-//static
-const U32 SIXTEEN_MEG = 0x1000000;
-S32 LLViewerTextureList::calcMaxTextureRAM()
-{
- // Decide the maximum amount of RAM we should allow the user to allocate to texture cache
- LLMemoryInfo memory_info;
- U32 available_memory = memory_info.getPhysicalMemoryClamped();
-
- clamp_rescale((F32)available_memory,
- (F32)(SIXTEEN_MEG * 16),
- (F32)U32_MAX,
- (F32)(SIXTEEN_MEG * 4),
- (F32)(U32_MAX >> 1));
- return available_memory;
-}
///////////////////////////////////////////////////////////////////////////////
@@ -1594,28 +1588,31 @@ LLUIImagePtr LLUIImageList::getUIImage(const std::string& image_name, S32 priori
}
LLUIImagePtr LLUIImageList::loadUIImageByName(const std::string& name, const std::string& filename,
- BOOL use_mips, const LLRect& scale_rect, const LLRect& clip_rect, LLViewerTexture::EBoostLevel boost_priority )
+ BOOL use_mips, const LLRect& scale_rect, const LLRect& clip_rect, LLViewerTexture::EBoostLevel boost_priority,
+ LLUIImage::EScaleStyle scale_style)
{
if (boost_priority == LLGLTexture::BOOST_NONE)
{
boost_priority = LLGLTexture::BOOST_UI;
}
LLViewerFetchedTexture* imagep = LLViewerTextureManager::getFetchedTextureFromFile(filename, FTT_LOCAL_FILE, MIPMAP_NO, boost_priority);
- return loadUIImage(imagep, name, use_mips, scale_rect, clip_rect);
+ return loadUIImage(imagep, name, use_mips, scale_rect, clip_rect, scale_style);
}
LLUIImagePtr LLUIImageList::loadUIImageByID(const LLUUID& id,
- BOOL use_mips, const LLRect& scale_rect, const LLRect& clip_rect, LLViewerTexture::EBoostLevel boost_priority)
+ BOOL use_mips, const LLRect& scale_rect, const LLRect& clip_rect, LLViewerTexture::EBoostLevel boost_priority,
+ LLUIImage::EScaleStyle scale_style)
{
if (boost_priority == LLGLTexture::BOOST_NONE)
{
boost_priority = LLGLTexture::BOOST_UI;
}
LLViewerFetchedTexture* imagep = LLViewerTextureManager::getFetchedTexture(id, FTT_DEFAULT, MIPMAP_NO, boost_priority);
- return loadUIImage(imagep, id.asString(), use_mips, scale_rect, clip_rect);
+ return loadUIImage(imagep, id.asString(), use_mips, scale_rect, clip_rect, scale_style);
}
-LLUIImagePtr LLUIImageList::loadUIImage(LLViewerFetchedTexture* imagep, const std::string& name, BOOL use_mips, const LLRect& scale_rect, const LLRect& clip_rect)
+LLUIImagePtr LLUIImageList::loadUIImage(LLViewerFetchedTexture* imagep, const std::string& name, BOOL use_mips, const LLRect& scale_rect, const LLRect& clip_rect,
+ LLUIImage::EScaleStyle scale_style)
{
if (!imagep) return NULL;
@@ -1628,6 +1625,8 @@ LLUIImagePtr LLUIImageList::loadUIImage(LLViewerFetchedTexture* imagep, const st
imagep->setNoDelete();
LLUIImagePtr new_imagep = new LLUIImage(name, imagep);
+ new_imagep->setScaleStyle(scale_style);
+
mUIImages.insert(std::make_pair(name, new_imagep));
mUITextureList.push_back(imagep);
@@ -1646,17 +1645,17 @@ LLUIImagePtr LLUIImageList::loadUIImage(LLViewerFetchedTexture* imagep, const st
return new_imagep;
}
-LLUIImagePtr LLUIImageList::preloadUIImage(const std::string& name, const std::string& filename, BOOL use_mips, const LLRect& scale_rect, const LLRect& clip_rect)
+LLUIImagePtr LLUIImageList::preloadUIImage(const std::string& name, const std::string& filename, BOOL use_mips, const LLRect& scale_rect, const LLRect& clip_rect, LLUIImage::EScaleStyle scale_style)
{
// look for existing image
uuid_ui_image_map_t::iterator found_it = mUIImages.find(name);
if (found_it != mUIImages.end())
{
// image already loaded!
- llerrs << "UI Image " << name << " already loaded." << llendl;
+ LL_ERRS() << "UI Image " << name << " already loaded." << LL_ENDL;
}
- return loadUIImageByName(name, filename, use_mips, scale_rect, clip_rect);
+ return loadUIImageByName(name, filename, use_mips, scale_rect, clip_rect, LLGLTexture::BOOST_UI, scale_style);
}
//static
@@ -1716,14 +1715,28 @@ void LLUIImageList::onUIImageLoaded( BOOL success, LLViewerFetchedTexture *src_v
}
}
+namespace LLInitParam
+{
+ template<>
+ struct TypeValues<LLUIImage::EScaleStyle> : public TypeValuesHelper<LLUIImage::EScaleStyle>
+ {
+ static void declareValues()
+ {
+ declare("scale_inner", LLUIImage::SCALE_INNER);
+ declare("scale_outer", LLUIImage::SCALE_OUTER);
+ }
+ };
+}
+
struct UIImageDeclaration : public LLInitParam::Block<UIImageDeclaration>
{
- Mandatory<std::string> name;
- Optional<std::string> file_name;
- Optional<bool> preload;
- Optional<LLRect> scale;
- Optional<LLRect> clip;
- Optional<bool> use_mips;
+ Mandatory<std::string> name;
+ Optional<std::string> file_name;
+ Optional<bool> preload;
+ Optional<LLRect> scale;
+ Optional<LLRect> clip;
+ Optional<bool> use_mips;
+ Optional<LLUIImage::EScaleStyle> scale_type;
UIImageDeclaration()
: name("name"),
@@ -1731,7 +1744,8 @@ struct UIImageDeclaration : public LLInitParam::Block<UIImageDeclaration>
preload("preload", false),
scale("scale"),
clip("clip"),
- use_mips("use_mips", false)
+ use_mips("use_mips", false),
+ scale_type("scale_type", LLUIImage::SCALE_INNER)
{}
};
@@ -1756,7 +1770,7 @@ bool LLUIImageList::initFromFile()
std::vector<std::string>::const_iterator pi(textures_paths.begin()), pend(textures_paths.end());
if (pi == pend)
{
- llwarns << "No textures.xml found in skins directories" << llendl;
+ LL_WARNS() << "No textures.xml found in skins directories" << LL_ENDL;
return false;
}
@@ -1764,12 +1778,12 @@ bool LLUIImageList::initFromFile()
LLXMLNodePtr root;
if (!LLXMLNode::parseFile(*pi, root, NULL))
{
- llwarns << "Unable to parse UI image list file " << *pi << llendl;
+ LL_WARNS() << "Unable to parse UI image list file " << *pi << LL_ENDL;
return false;
}
if (!root->hasAttribute("version"))
{
- llwarns << "No valid version number in UI image list file " << *pi << llendl;
+ LL_WARNS() << "No valid version number in UI image list file " << *pi << LL_ENDL;
return false;
}
@@ -1819,7 +1833,7 @@ bool LLUIImageList::initFromFile()
{
continue;
}
- preloadUIImage(image.name, file_name, image.use_mips, image.scale, image.clip);
+ preloadUIImage(image.name, file_name, image.use_mips, image.scale, image.clip, image.scale_type);
}
if (cur_pass == PASS_DECODE_NOW && !gSavedSettings.getBOOL("NoPreload"))
diff --git a/indra/newview/llviewertexturelist.h b/indra/newview/llviewertexturelist.h
index 26dc6dcbe2..2f84d0947a 100755
--- a/indra/newview/llviewertexturelist.h
+++ b/indra/newview/llviewertexturelist.h
@@ -1,5 +1,5 @@
/**
- * @file llviewertexturelist.h
+ * @file llviewertexturelinumimagest.h
* @brief Object for managing the list of images within a region
*
* $LicenseInfo:firstyear=2000&license=viewerlgpl$
@@ -30,11 +30,11 @@
#include "lluuid.h"
//#include "message.h"
#include "llgl.h"
-#include "llstat.h"
#include "llviewertexture.h"
#include "llui.h"
#include <list>
#include <set>
+#include "lluiimage.h"
const U32 LL_IMAGE_REZ_LOSSLESS_CUTOFF = 128;
@@ -71,7 +71,6 @@ public:
static BOOL createUploadFile(const std::string& filename, const std::string& out_filename, const U8 codec);
static LLPointer<LLImageJ2C> convertToUploadFile(LLPointer<LLImageRaw> raw_image);
static void processImageNotInDatabase( LLMessageSystem *msg, void **user_data );
- static S32 calcMaxTextureRAM();
static void receiveImageHeader(LLMessageSystem *msg, void **user_data);
static void receiveImagePacket(LLMessageSystem *msg, void **user_data);
@@ -101,11 +100,11 @@ public:
void setUpdateStats(BOOL b) { mUpdateStats = b; }
- S32 getMaxResidentTexMem() const { return mMaxResidentTexMemInMegaBytes; }
- S32 getMaxTotalTextureMem() const { return mMaxTotalTextureMemInMegaBytes;}
+ S32Megabytes getMaxResidentTexMem() const { return mMaxResidentTexMemInMegaBytes; }
+ S32Megabytes getMaxTotalTextureMem() const { return mMaxTotalTextureMemInMegaBytes;}
S32 getNumImages() { return mImageList.size(); }
- void updateMaxResidentTexMem(S32 mem);
+ void updateMaxResidentTexMem(S32Megabytes mem);
void doPreloadImages();
void doPrefetchImages();
@@ -113,8 +112,8 @@ public:
void clearFetchingRequests();
void setDebugFetching(LLViewerFetchedTexture* tex, S32 debug_level);
- static S32 getMinVideoRamSetting();
- static S32 getMaxVideoRamSetting(bool get_recommended, float mem_multiplier);
+ static S32Megabytes getMinVideoRamSetting();
+ static S32Megabytes getMaxVideoRamSetting(bool get_recommended, float mem_multiplier);
private:
void updateImagesDecodePriorities();
@@ -200,21 +199,10 @@ private:
BOOL mInitialized ;
BOOL mUpdateStats;
- S32 mMaxResidentTexMemInMegaBytes;
- S32 mMaxTotalTextureMemInMegaBytes;
+ S32Megabytes mMaxResidentTexMemInMegaBytes;
+ S32Megabytes mMaxTotalTextureMemInMegaBytes;
LLFrameTimer mForceDecodeTimer;
-public:
- static U32 sTextureBits;
- static U32 sTexturePackets;
-
- static LLStat sNumImagesStat;
- static LLStat sNumRawImagesStat;
- static LLStat sGLTexMemStat;
- static LLStat sGLBoundMemStat;
- static LLStat sRawMemStat;
- static LLStat sFormattedMemStat;
-
private:
static S32 sNumImages;
static void (*sUUIDCallback)(void**, const LLUUID &);
@@ -230,20 +218,22 @@ public:
bool initFromFile();
- LLPointer<LLUIImage> preloadUIImage(const std::string& name, const std::string& filename, BOOL use_mips, const LLRect& scale_rect, const LLRect& clip_rect);
+ LLPointer<LLUIImage> preloadUIImage(const std::string& name, const std::string& filename, BOOL use_mips, const LLRect& scale_rect, const LLRect& clip_rect, LLUIImage::EScaleStyle stype);
static void onUIImageLoaded( BOOL success, LLViewerFetchedTexture *src_vi, LLImageRaw* src, LLImageRaw* src_aux, S32 discard_level, BOOL final, void* userdata );
private:
LLPointer<LLUIImage> loadUIImageByName(const std::string& name, const std::string& filename,
BOOL use_mips = FALSE, const LLRect& scale_rect = LLRect::null,
const LLRect& clip_rect = LLRect::null,
- LLViewerTexture::EBoostLevel boost_priority = LLGLTexture::BOOST_UI);
+ LLViewerTexture::EBoostLevel boost_priority = LLGLTexture::BOOST_UI,
+ LLUIImage::EScaleStyle = LLUIImage::SCALE_INNER);
LLPointer<LLUIImage> loadUIImageByID(const LLUUID& id,
BOOL use_mips = FALSE, const LLRect& scale_rect = LLRect::null,
const LLRect& clip_rect = LLRect::null,
- LLViewerTexture::EBoostLevel boost_priority = LLGLTexture::BOOST_UI);
+ LLViewerTexture::EBoostLevel boost_priority = LLGLTexture::BOOST_UI,
+ LLUIImage::EScaleStyle = LLUIImage::SCALE_INNER);
- LLPointer<LLUIImage> loadUIImage(LLViewerFetchedTexture* imagep, const std::string& name, BOOL use_mips = FALSE, const LLRect& scale_rect = LLRect::null, const LLRect& clip_rect = LLRect::null);
+ LLPointer<LLUIImage> loadUIImage(LLViewerFetchedTexture* imagep, const std::string& name, BOOL use_mips = FALSE, const LLRect& scale_rect = LLRect::null, const LLRect& clip_rect = LLRect::null, LLUIImage::EScaleStyle = LLUIImage::SCALE_INNER);
struct LLUIImageLoadData
diff --git a/indra/newview/llviewerthrottle.cpp b/indra/newview/llviewerthrottle.cpp
index 5147272122..22de7e150b 100755
--- a/indra/newview/llviewerthrottle.cpp
+++ b/indra/newview/llviewerthrottle.cpp
@@ -48,8 +48,8 @@ const F32 MIN_FRACTIONAL = 0.2f;
const F32 MIN_BANDWIDTH = 50.f;
const F32 MAX_BANDWIDTH = 3000.f;
const F32 STEP_FRACTIONAL = 0.1f;
-const F32 TIGHTEN_THROTTLE_THRESHOLD = 3.0f; // packet loss % per s
-const F32 EASE_THROTTLE_THRESHOLD = 0.5f; // packet loss % per s
+const LLUnit<F32, LLUnits::Percent> TIGHTEN_THROTTLE_THRESHOLD(3.0f); // packet loss % per s
+const LLUnit<F32, LLUnits::Percent> EASE_THROTTLE_THRESHOLD(0.5f); // packet loss % per s
const F32 DYNAMIC_UPDATE_DURATION = 5.0f; // seconds
LLViewerThrottle gViewerThrottle;
@@ -146,7 +146,7 @@ LLViewerThrottleGroup LLViewerThrottleGroup::operator-(const LLViewerThrottleGro
void LLViewerThrottleGroup::sendToSim() const
{
- llinfos << "Sending throttle settings, total BW " << mThrottleTotal << llendl;
+ LL_INFOS() << "Sending throttle settings, total BW " << mThrottleTotal << LL_ENDL;
LLMessageSystem* msg = gMessageSystem;
msg->newMessageFast(_PREHASH_AgentThrottle);
@@ -304,7 +304,8 @@ void LLViewerThrottle::updateDynamicThrottle()
}
mUpdateTimer.reset();
- if (LLViewerStats::getInstance()->mPacketsLostPercentStat.getMean() > TIGHTEN_THROTTLE_THRESHOLD)
+ LLUnit<F32, LLUnits::Percent> mean_packets_lost = LLViewerStats::instance().getRecording().getMean(LLStatViewer::PACKETS_LOST_PERCENT);
+ if (mean_packets_lost > TIGHTEN_THROTTLE_THRESHOLD)
{
if (mThrottleFrac <= MIN_FRACTIONAL || mCurrentBandwidth / 1024.0f <= MIN_BANDWIDTH)
{
@@ -315,9 +316,9 @@ void LLViewerThrottle::updateDynamicThrottle()
mCurrentBandwidth = mMaxBandwidth * mThrottleFrac;
mCurrent = getThrottleGroup(mCurrentBandwidth / 1024.0f);
mCurrent.sendToSim();
- llinfos << "Tightening network throttle to " << mCurrentBandwidth << llendl;
+ LL_INFOS() << "Tightening network throttle to " << mCurrentBandwidth << LL_ENDL;
}
- else if (LLViewerStats::getInstance()->mPacketsLostPercentStat.getMean() <= EASE_THROTTLE_THRESHOLD)
+ else if (mean_packets_lost <= EASE_THROTTLE_THRESHOLD)
{
if (mThrottleFrac >= MAX_FRACTIONAL || mCurrentBandwidth / 1024.0f >= MAX_BANDWIDTH)
{
@@ -328,6 +329,6 @@ void LLViewerThrottle::updateDynamicThrottle()
mCurrentBandwidth = mMaxBandwidth * mThrottleFrac;
mCurrent = getThrottleGroup(mCurrentBandwidth/1024.0f);
mCurrent.sendToSim();
- llinfos << "Easing network throttle to " << mCurrentBandwidth << llendl;
+ LL_INFOS() << "Easing network throttle to " << mCurrentBandwidth << LL_ENDL;
}
}
diff --git a/indra/newview/llviewerwearable.cpp b/indra/newview/llviewerwearable.cpp
index e8425dc76a..a544cc81da 100644
--- a/indra/newview/llviewerwearable.cpp
+++ b/indra/newview/llviewerwearable.cpp
@@ -30,6 +30,7 @@
#include "llagentcamera.h"
#include "llagentwearables.h"
#include "llfloatersidepanelcontainer.h"
+#include "lllocaltextureobject.h"
#include "llnotificationsutil.h"
#include "llsidepanelappearance.h"
#include "lltextureentry.h"
@@ -103,7 +104,7 @@ LLWearable::EImportResult LLViewerWearable::importStream( std::istream& input_st
{
// Shouldn't really log the asset id for security reasons, but
// we need it in this case.
- llwarns << "Bad Wearable asset header: " << mAssetID << llendl;
+ LL_WARNS() << "Bad Wearable asset header: " << mAssetID << LL_ENDL;
//gVFS->dumpMap();
return result;
}
@@ -143,7 +144,7 @@ BOOL LLViewerWearable::isOldVersion() const
if( LLWearable::sCurrentDefinitionVersion < mDefinitionVersion )
{
- llwarns << "Wearable asset has newer version (" << mDefinitionVersion << ") than XML (" << LLWearable::sCurrentDefinitionVersion << ")" << llendl;
+ LL_WARNS() << "Wearable asset has newer version (" << mDefinitionVersion << ") than XML (" << LLWearable::sCurrentDefinitionVersion << ")" << LL_ENDL;
llassert(0);
}
@@ -536,8 +537,8 @@ struct LLWearableSaveData
void LLViewerWearable::saveNewAsset() const
{
-// llinfos << "LLViewerWearable::saveNewAsset() type: " << getTypeName() << llendl;
- //llinfos << *this << llendl;
+// LL_INFOS() << "LLViewerWearable::saveNewAsset() type: " << getTypeName() << LL_ENDL;
+ //LL_INFOS() << *this << LL_ENDL;
const std::string filename = asset_id_to_filename(mAssetID);
LLFILE* fp = LLFile::fopen(filename, "wb"); /* Flawfinder: ignore */
@@ -554,7 +555,7 @@ void LLViewerWearable::saveNewAsset() const
if(!successful_save)
{
std::string buffer = llformat("Unable to save '%s' to wearable file.", mName.c_str());
- llwarns << buffer << llendl;
+ LL_WARNS() << buffer << LL_ENDL;
LLSD args;
args["NAME"] = mName;
@@ -569,7 +570,7 @@ void LLViewerWearable::saveNewAsset() const
std::string url = gAgent.getRegion()->getCapability("NewAgentInventory");
if (!url.empty())
{
- llinfos << "Update Agent Inventory via capability" << llendl;
+ LL_INFOS() << "Update Agent Inventory via capability" << LL_ENDL;
LLSD body;
body["folder_id"] = gInventory.findCategoryUUIDForType(LLFolderType::assetToFolderType(getAssetType()));
body["asset_type"] = LLAssetType::lookup(getAssetType());
@@ -598,12 +599,12 @@ void LLViewerWearable::onSaveNewAssetComplete(const LLUUID& new_asset_id, void*
if(0 == status)
{
// Success
- llinfos << "Saved wearable " << type_name << llendl;
+ LL_INFOS() << "Saved wearable " << type_name << LL_ENDL;
}
else
{
std::string buffer = llformat("Unable to save %s to central asset store.", type_name.c_str());
- llwarns << buffer << " Status: " << status << llendl;
+ LL_WARNS() << buffer << " Status: " << status << LL_ENDL;
LLSD args;
args["NAME"] = type_name;
LLNotificationsUtil::add("CannotSaveToAssetStore", args);
diff --git a/indra/newview/llviewerwearable.h b/indra/newview/llviewerwearable.h
index 65566f23a5..8f49e3c4e2 100644
--- a/indra/newview/llviewerwearable.h
+++ b/indra/newview/llviewerwearable.h
@@ -29,6 +29,7 @@
#include "llwearable.h"
#include "llavatarappearancedefines.h"
+#include "llextendedstatus.h"
class LLVOAvatar;
diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp
index 3193a2955b..aa75bae712 100755
--- a/indra/newview/llviewerwindow.cpp
+++ b/indra/newview/llviewerwindow.cpp
@@ -40,6 +40,7 @@
#include "llagentcamera.h"
#include "llcommunicationchannel.h"
#include "llfloaterreg.h"
+#include "llhudicon.h"
#include "llmeshrepository.h"
#include "llnotificationhandler.h"
#include "llpanellogin.h"
@@ -75,13 +76,11 @@
#include "message.h"
#include "object_flags.h"
#include "lltimer.h"
-#include "timing.h"
#include "llviewermenu.h"
#include "lltooltip.h"
#include "llmediaentry.h"
#include "llurldispatcher.h"
#include "raytrace.h"
-#include "llstat.h"
// newview includes
#include "llagent.h"
@@ -218,6 +217,7 @@
// Globals
//
void render_ui(F32 zoom_factor = 1.f, int subfield = 0);
+void swap();
extern BOOL gDebugClicks;
extern BOOL gDisplaySwapBuffers;
@@ -238,7 +238,7 @@ LLVector4a gDebugRaycastParticleIntersection;
LLVector2 gDebugRaycastTexCoord;
LLVector4a gDebugRaycastNormal;
LLVector4a gDebugRaycastTangent;
-S32 gDebugRaycastFaceHit;
+S32 gDebugRaycastFaceHit;
LLVector4a gDebugRaycastStart;
LLVector4a gDebugRaycastEnd;
@@ -258,6 +258,9 @@ std::string LLViewerWindow::sSnapshotDir;
std::string LLViewerWindow::sMovieBaseName;
+LLTrace::SampleStatHandle<> LLViewerWindow::sMouseVelocityStat("Mouse Velocity");
+
+
class RecordToChatConsole : public LLError::Recorder, public LLSingleton<RecordToChatConsole>
{
public:
@@ -287,6 +290,8 @@ public:
// LLDebugText
//
+static LLTrace::BlockTimerStatHandle FTM_DISPLAY_DEBUG_TEXT("Display Debug Text");
+
class LLDebugText
{
private:
@@ -463,6 +468,8 @@ public:
if (gSavedSettings.getBOOL("DebugShowRenderInfo"))
{
+ LLTrace::Recording& last_frame_recording = LLTrace::get_frame_recording().getLastRecording();
+
if (gPipeline.getUseVertexShaders() == 0)
{
addText(xpos, ypos, "Shaders Disabled");
@@ -568,7 +575,7 @@ public:
addText(xpos, ypos, llformat("%d Unique Textures", LLImageGL::sUniqueCount));
ypos += y_inc;
- addText(xpos, ypos, llformat("%d Render Calls", gPipeline.mBatchCount));
+ addText(xpos, ypos, llformat("%d Render Calls", last_frame_recording.getSampleCount(LLPipeline::sStatBatchSize)));
ypos += y_inc;
addText(xpos, ypos, llformat("%d/%d Objects Active", gObjectList.getNumActiveObjects(), gObjectList.getNumObjects()));
@@ -583,14 +590,9 @@ public:
gPipeline.mTextureMatrixOps = 0;
gPipeline.mMatrixOpCount = 0;
- if (gPipeline.mBatchCount > 0)
+ if (last_frame_recording.getSampleCount(LLPipeline::sStatBatchSize) > 0)
{
- addText(xpos, ypos, llformat("Batch min/max/mean: %d/%d/%d", gPipeline.mMinBatchSize, gPipeline.mMaxBatchSize,
- gPipeline.mTrianglesDrawn/gPipeline.mBatchCount));
-
- gPipeline.mMinBatchSize = gPipeline.mMaxBatchSize;
- gPipeline.mMaxBatchSize = 0;
- gPipeline.mBatchCount = 0;
+ addText(xpos, ypos, llformat("Batch min/max/mean: %d/%d/%d", last_frame_recording.getMin(LLPipeline::sStatBatchSize), last_frame_recording.getMax(LLPipeline::sStatBatchSize), last_frame_recording.getMean(LLPipeline::sStatBatchSize)));
}
ypos += y_inc;
@@ -602,9 +604,9 @@ public:
ypos += y_inc;
- if (!LLSpatialGroup::sPendingQueries.empty())
+ if (!LLOcclusionCullingGroup::sPendingQueries.empty())
{
- addText(xpos,ypos, llformat("%d Queries pending", LLSpatialGroup::sPendingQueries.size()));
+ addText(xpos,ypos, llformat("%d Queries pending", LLOcclusionCullingGroup::sPendingQueries.size()));
ypos += y_inc;
}
@@ -778,9 +780,9 @@ public:
U32 old_y = ypos ;
for(S32 i = LLViewerTexture::BOOST_NONE; i < LLViewerTexture::MAX_GL_IMAGE_CATEGORY; i++)
{
- if(gTotalTextureBytesPerBoostLevel[i] > 0)
+ if(gTotalTextureBytesPerBoostLevel[i] > (S32Bytes)0)
{
- addText(xpos, ypos, llformat("Boost_Level %d: %.3f MB", i, (F32)gTotalTextureBytesPerBoostLevel[i] / (1024 * 1024)));
+ addText(xpos, ypos, llformat("Boost_Level %d: %.3f MB", i, F32Megabytes(gTotalTextureBytesPerBoostLevel[i]).value()));
ypos += y_inc;
}
}
@@ -839,6 +841,7 @@ public:
void draw()
{
+ LL_RECORD_BLOCK_TIME(FTM_DISPLAY_DEBUG_TEXT);
for (line_list_t::iterator iter = mLineList.begin();
iter != mLineList.end(); ++iter)
{
@@ -928,7 +931,7 @@ BOOL LLViewerWindow::handleAnyMouseClick(LLWindow *window, LLCoordGL pos, MASK
if (gDebugClicks)
{
- llinfos << "ViewerWindow " << buttonname << " mouse " << buttonstatestr << " at " << x << "," << y << llendl;
+ LL_INFOS() << "ViewerWindow " << buttonname << " mouse " << buttonstatestr << " at " << x << "," << y << LL_ENDL;
}
// Make sure we get a corresponding mouseup event, even if the mouse leaves the window
@@ -954,13 +957,13 @@ BOOL LLViewerWindow::handleAnyMouseClick(LLWindow *window, LLCoordGL pos, MASK
mouse_captor->screenPointToLocal( x, y, &local_x, &local_y );
if (LLView::sDebugMouseHandling)
{
- llinfos << buttonname << " Mouse " << buttonstatestr << " handled by captor " << mouse_captor->getName() << llendl;
+ LL_INFOS() << buttonname << " Mouse " << buttonstatestr << " handled by captor " << mouse_captor->getName() << LL_ENDL;
}
BOOL r = mouse_captor->handleAnyMouseClick(local_x, local_y, mask, clicktype, down);
if (r) {
- lldebugs << "LLViewerWindow::handleAnyMouseClick viewer with mousecaptor calling updatemouseeventinfo - local_x|global x "<< local_x << " " << x << "local/global y " << local_y << " " << y << llendl;
+ LL_DEBUGS() << "LLViewerWindow::handleAnyMouseClick viewer with mousecaptor calling updatemouseeventinfo - local_x|global x "<< local_x << " " << x << "local/global y " << local_y << " " << y << LL_ENDL;
LLViewerEventRecorder::instance().setMouseGlobalCoords(x,y);
LLViewerEventRecorder::instance().logMouseEvent(std::string(buttonstatestr),std::string(buttonname));
@@ -980,7 +983,7 @@ BOOL LLViewerWindow::handleAnyMouseClick(LLWindow *window, LLCoordGL pos, MASK
if (r)
{
- lldebugs << "LLViewerWindow::handleAnyMouseClick calling updatemouseeventinfo - global x "<< " " << x << "global y " << y << "buttonstate: " << buttonstatestr << " buttonname " << buttonname << llendl;
+ LL_DEBUGS() << "LLViewerWindow::handleAnyMouseClick calling updatemouseeventinfo - global x "<< " " << x << "global y " << y << "buttonstate: " << buttonstatestr << " buttonname " << buttonname << LL_ENDL;
LLViewerEventRecorder::instance().setMouseGlobalCoords(x,y);
@@ -996,12 +999,12 @@ BOOL LLViewerWindow::handleAnyMouseClick(LLWindow *window, LLCoordGL pos, MASK
if (LLView::sDebugMouseHandling)
{
- llinfos << buttonname << " Mouse " << buttonstatestr << " " << LLViewerEventRecorder::instance().get_xui() << llendl;
+ LL_INFOS() << buttonname << " Mouse " << buttonstatestr << " " << LLViewerEventRecorder::instance().get_xui() << LL_ENDL;
}
return TRUE;
} else if (LLView::sDebugMouseHandling)
{
- llinfos << buttonname << " Mouse " << buttonstatestr << " not handled by view" << llendl;
+ LL_INFOS() << buttonname << " Mouse " << buttonstatestr << " not handled by view" << LL_ENDL;
}
}
@@ -1127,7 +1130,7 @@ LLWindowCallbacks::DragNDropResult LLViewerWindow::handleDragNDrop( LLWindow *wi
S32 object_face = pick_info.mObjectFace;
std::string url = data;
- lldebugs << "Object: picked at " << pos.mX << ", " << pos.mY << " - face = " << object_face << " - URL = " << url << llendl;
+ LL_DEBUGS() << "Object: picked at " << pos.mX << ", " << pos.mY << " - face = " << object_face << " - URL = " << url << LL_ENDL;
LLVOVolume *obj = dynamic_cast<LLVOVolume*>(static_cast<LLViewerObject*>(pick_info.getObject()));
@@ -1460,10 +1463,11 @@ BOOL LLViewerWindow::handlePaint(LLWindow *window, S32 x, S32 y, S32 width, S
FillRect(hdc, &wnd_rect, CreateSolidBrush(RGB(255, 255, 255)));
std::string temp_str;
+ LLTrace::Recording& recording = LLViewerStats::instance().getRecording();
temp_str = llformat( "FPS %3.1f Phy FPS %2.1f Time Dil %1.3f", /* Flawfinder: ignore */
- LLViewerStats::getInstance()->mFPSStat.getMeanPerSec(),
- LLViewerStats::getInstance()->mSimPhysicsFPS.getPrev(0),
- LLViewerStats::getInstance()->mSimTimeDilation.getPrev(0));
+ recording.getPerSec(LLStatViewer::FPS), //mFPSStat.getMeanPerSec(),
+ recording.getLastValue(LLStatViewer::SIM_PHYSICS_FPS),
+ recording.getLastValue(LLStatViewer::SIM_TIME_DILATION));
S32 len = temp_str.length();
TextOutA(hdc, 0, 0, temp_str.c_str(), len);
@@ -1598,8 +1602,7 @@ LLViewerWindow::LLViewerWindow(const Params& p)
mResDirty(false),
mStatesDirty(false),
mCurrResolutionIndex(0),
- mProgressView(NULL),
- mMouseVelocityStat(new LLStat("Mouse Velocity"))
+ mProgressView(NULL)
{
// gKeyboard is still NULL, so it doesn't do LLWindowListener any good to
// pass its value right now. Instead, pass it a nullary function that
@@ -1617,7 +1620,7 @@ LLViewerWindow::LLViewerWindow(const Params& p)
LLNotifications::instance().setIgnoreAllNotifications(ignore);
if (ignore)
{
- llinfos << "NOTE: ALL NOTIFICATIONS THAT OCCUR WILL GET ADDED TO IGNORE LIST FOR LATER RUNS." << llendl;
+ LL_INFOS() << "NOTE: ALL NOTIFICATIONS THAT OCCUR WILL GET ADDED TO IGNORE LIST FOR LATER RUNS." << LL_ENDL;
}
// Default to application directory.
@@ -1655,14 +1658,14 @@ LLViewerWindow::LLViewerWindow(const Params& p)
{
LLSplashScreen::update(LLTrans::getString("StartupRequireDriverUpdate"));
- LL_WARNS("Window") << "Failed to create window, to be shutting Down, be sure your graphics driver is updated." << llendl ;
+ LL_WARNS("Window") << "Failed to create window, to be shutting Down, be sure your graphics driver is updated." << LL_ENDL ;
ms_sleep(5000) ; //wait for 5 seconds.
LLSplashScreen::update(LLTrans::getString("ShuttingDown"));
#if LL_LINUX || LL_SOLARIS
- llwarns << "Unable to create window, be sure screen is set at 32-bit color and your graphics driver is configured correctly. See README-linux.txt or README-solaris.txt for further information."
- << llendl;
+ LL_WARNS() << "Unable to create window, be sure screen is set at 32-bit color and your graphics driver is configured correctly. See README-linux.txt or README-solaris.txt for further information."
+ << LL_ENDL;
#else
LL_WARNS("Window") << "Unable to create window, be sure screen is set at 32-bit color in Control Panels->Display->Settings"
<< LL_ENDL;
@@ -1682,7 +1685,7 @@ LLViewerWindow::LLViewerWindow(const Params& p)
if(p.fullscreen && ( scr.mX!=p.width || scr.mY!=p.height))
{
- llwarns << "Fullscreen has forced us in to a different resolution now using "<<scr.mX<<" x "<<scr.mY<<llendl;
+ LL_WARNS() << "Fullscreen has forced us in to a different resolution now using "<<scr.mX<<" x "<<scr.mY<<LL_ENDL;
gSavedSettings.setS32("FullScreenWidth",scr.mX);
gSavedSettings.setS32("FullScreenHeight",scr.mY);
}
@@ -2041,27 +2044,27 @@ void LLViewerWindow::shutdownViews()
// clean up warning logger
LLError::removeRecorder(RecordToChatConsole::getInstance());
- llinfos << "Warning logger is cleaned." << llendl ;
+ LL_INFOS() << "Warning logger is cleaned." << LL_ENDL ;
delete mDebugText;
mDebugText = NULL;
- llinfos << "DebugText deleted." << llendl ;
+ LL_INFOS() << "DebugText deleted." << LL_ENDL ;
// Cleanup global views
if (gMorphView)
{
gMorphView->setVisible(FALSE);
}
- llinfos << "Global views cleaned." << llendl ;
+ LL_INFOS() << "Global views cleaned." << LL_ENDL ;
LLNotificationsUI::LLToast::cleanupToasts();
- llinfos << "Leftover toast cleaned up." << llendl;
+ LL_INFOS() << "Leftover toast cleaned up." << LL_ENDL;
// DEV-40930: Clear sModalStack. Otherwise, any LLModalDialog left open
// will crump with LL_ERRS.
LLModalDialog::shutdownModals();
- llinfos << "LLModalDialog shut down." << llendl;
+ LL_INFOS() << "LLModalDialog shut down." << LL_ENDL;
// destroy the nav bar, not currently part of gViewerWindow
// *TODO: Make LLNavigationBar part of gViewerWindow
@@ -2069,17 +2072,17 @@ void LLViewerWindow::shutdownViews()
{
delete LLNavigationBar::getInstance();
}
- llinfos << "LLNavigationBar destroyed." << llendl ;
+ LL_INFOS() << "LLNavigationBar destroyed." << LL_ENDL ;
// destroy menus after instantiating navbar above, as it needs
// access to gMenuHolder
cleanup_menus();
- llinfos << "menus destroyed." << llendl ;
+ LL_INFOS() << "menus destroyed." << LL_ENDL ;
// Delete all child views.
delete mRootView;
mRootView = NULL;
- llinfos << "RootView deleted." << llendl ;
+ LL_INFOS() << "RootView deleted." << LL_ENDL ;
LLMenuOptionPathfindingRebakeNavmesh::getInstance()->quit();
@@ -2107,12 +2110,12 @@ void LLViewerWindow::shutdownGL()
gSky.cleanup();
stop_glerror();
- llinfos << "Cleaning up pipeline" << llendl;
+ LL_INFOS() << "Cleaning up pipeline" << LL_ENDL;
gPipeline.cleanup();
stop_glerror();
//MUST clean up pipeline before cleaning up wearables
- llinfos << "Cleaning up wearables" << llendl;
+ LL_INFOS() << "Cleaning up wearables" << LL_ENDL;
LLWearableList::instance().cleanup() ;
gTextureList.shutdown();
@@ -2126,12 +2129,12 @@ void LLViewerWindow::shutdownGL()
LLViewerTextureManager::cleanup() ;
LLImageGL::cleanupClass() ;
- llinfos << "All textures and llimagegl images are destroyed!" << llendl ;
+ LL_INFOS() << "All textures and llimagegl images are destroyed!" << LL_ENDL ;
- llinfos << "Cleaning up select manager" << llendl;
+ LL_INFOS() << "Cleaning up select manager" << LL_ENDL;
LLSelectMgr::getInstance()->cleanup();
- llinfos << "Stopping GL during shutdown" << llendl;
+ LL_INFOS() << "Stopping GL during shutdown" << LL_ENDL;
stopGL(FALSE);
stop_glerror();
@@ -2139,19 +2142,17 @@ void LLViewerWindow::shutdownGL()
LLVertexBuffer::cleanupClass();
- llinfos << "LLVertexBuffer cleaned." << llendl ;
+ LL_INFOS() << "LLVertexBuffer cleaned." << LL_ENDL ;
}
// shutdownViews() and shutdownGL() need to be called first
LLViewerWindow::~LLViewerWindow()
{
- llinfos << "Destroying Window" << llendl;
+ LL_INFOS() << "Destroying Window" << LL_ENDL;
destroyWindow();
delete mDebugText;
mDebugText = NULL;
-
- delete mMouseVelocityStat;
}
@@ -2262,8 +2263,8 @@ void LLViewerWindow::reshape(S32 width, S32 height)
}
}
- LLViewerStats::getInstance()->setStat(LLViewerStats::ST_WINDOW_WIDTH, (F64)width);
- LLViewerStats::getInstance()->setStat(LLViewerStats::ST_WINDOW_HEIGHT, (F64)height);
+ sample(LLStatViewer::WINDOW_WIDTH, width);
+ sample(LLStatViewer::WINDOW_HEIGHT, height);
LLLayoutStack::updateClass();
}
@@ -2538,7 +2539,7 @@ BOOL LLViewerWindow::handleKey(KEY key, MASK mask)
||(gLoginMenuBarView && gLoginMenuBarView->handleKey(key, mask, TRUE))
||(gMenuHolder && gMenuHolder->handleKey(key, mask, TRUE)))
{
- lldebugs << "LLviewerWindow::handleKey handle nav keys for nav" << llendl;
+ LL_DEBUGS() << "LLviewerWindow::handleKey handle nav keys for nav" << LL_ENDL;
LLViewerEventRecorder::instance().logKeyEvent(key,mask);
return TRUE;
}
@@ -2571,7 +2572,7 @@ BOOL LLViewerWindow::handleKey(KEY key, MASK mask)
// if nothing has focus, go to first or last UI element as appropriate
if (key == KEY_TAB && (mask & MASK_CONTROL || gFocusMgr.getKeyboardFocus() == NULL))
{
- llwarns << "LLviewerWindow::handleKey give floaters first chance at tab key " << llendl;
+ LL_WARNS() << "LLviewerWindow::handleKey give floaters first chance at tab key " << LL_ENDL;
if (gMenuHolder) gMenuHolder->hideMenus();
// if CTRL-tabbing (and not just TAB with no focus), go into window cycle mode
@@ -2633,17 +2634,17 @@ BOOL LLViewerWindow::handleKey(KEY key, MASK mask)
if (keyboard_focus->handleKey(key, mask, FALSE))
{
- lldebugs << "LLviewerWindow::handleKey - in 'traverse up' - no loops seen... just called keyboard_focus->handleKey an it returned true" << llendl;
+ LL_DEBUGS() << "LLviewerWindow::handleKey - in 'traverse up' - no loops seen... just called keyboard_focus->handleKey an it returned true" << LL_ENDL;
LLViewerEventRecorder::instance().logKeyEvent(key,mask);
return TRUE;
} else {
- lldebugs << "LLviewerWindow::handleKey - in 'traverse up' - no loops seen... just called keyboard_focus->handleKey an it returned FALSE" << llendl;
+ LL_DEBUGS() << "LLviewerWindow::handleKey - in 'traverse up' - no loops seen... just called keyboard_focus->handleKey an it returned FALSE" << LL_ENDL;
}
}
if( LLToolMgr::getInstance()->getCurrentTool()->handleKey(key, mask) )
{
- lldebugs << "LLviewerWindow::handleKey toolbar handling?" << llendl;
+ LL_DEBUGS() << "LLviewerWindow::handleKey toolbar handling?" << LL_ENDL;
LLViewerEventRecorder::instance().logKeyEvent(key,mask);
return TRUE;
}
@@ -2651,7 +2652,7 @@ BOOL LLViewerWindow::handleKey(KEY key, MASK mask)
// Try for a new-format gesture
if (LLGestureMgr::instance().triggerGesture(key, mask))
{
- lldebugs << "LLviewerWindow::handleKey new gesture feature" << llendl;
+ LL_DEBUGS() << "LLviewerWindow::handleKey new gesture feature" << LL_ENDL;
LLViewerEventRecorder::instance().logKeyEvent(key,mask);
return TRUE;
}
@@ -2660,7 +2661,7 @@ BOOL LLViewerWindow::handleKey(KEY key, MASK mask)
// don't pass it down to the menus.
if (gGestureList.trigger(key, mask))
{
- lldebugs << "LLviewerWindow::handleKey check gesture trigger" << llendl;
+ LL_DEBUGS() << "LLviewerWindow::handleKey check gesture trigger" << LL_ENDL;
LLViewerEventRecorder::instance().logKeyEvent(key,mask);
return TRUE;
}
@@ -2753,7 +2754,7 @@ void LLViewerWindow::handleScrollWheel(S32 clicks)
mouse_captor->handleScrollWheel(local_x, local_y, clicks);
if (LLView::sDebugMouseHandling)
{
- llinfos << "Scroll Wheel handled by captor " << mouse_captor->getName() << llendl;
+ LL_INFOS() << "Scroll Wheel handled by captor " << mouse_captor->getName() << LL_ENDL;
}
return;
}
@@ -2771,13 +2772,13 @@ void LLViewerWindow::handleScrollWheel(S32 clicks)
{
if (LLView::sDebugMouseHandling)
{
- llinfos << "Scroll Wheel" << LLView::sMouseHandlerMessage << llendl;
+ LL_INFOS() << "Scroll Wheel" << LLView::sMouseHandlerMessage << LL_ENDL;
}
return;
}
else if (LLView::sDebugMouseHandling)
{
- llinfos << "Scroll Wheel not handled by view" << llendl;
+ LL_INFOS() << "Scroll Wheel not handled by view" << LL_ENDL;
}
// Zoom the camera in and out behavior
@@ -2866,12 +2867,13 @@ void append_xui_tooltip(LLView* viewp, LLToolTip::Params& params)
}
}
+static LLTrace::BlockTimerStatHandle ftm("Update UI");
+
// Update UI based on stored mouse position from mouse-move
// event processing.
void LLViewerWindow::updateUI()
{
- static LLFastTimer::DeclareTimer ftm("Update UI");
- LLFastTimer t(ftm);
+ LL_RECORD_BLOCK_TIME(ftm);
static std::string last_handle_msg;
@@ -3092,12 +3094,12 @@ void LLViewerWindow::updateUI()
handled = mouse_captor->handleHover(local_x, local_y, mask);
if (LLView::sDebugMouseHandling)
{
- llinfos << "Hover handled by captor " << mouse_captor->getName() << llendl;
+ LL_INFOS() << "Hover handled by captor " << mouse_captor->getName() << LL_ENDL;
}
if( !handled )
{
- lldebugst(LLERR_USER_INPUT) << "hover not handled by mouse captor" << llendl;
+ LL_DEBUGS("UserInput") << "hover not handled by mouse captor" << LL_ENDL;
}
}
else
@@ -3118,7 +3120,7 @@ void LLViewerWindow::updateUI()
if (LLView::sDebugMouseHandling && LLView::sMouseHandlerMessage != last_handle_msg)
{
last_handle_msg = LLView::sMouseHandlerMessage;
- llinfos << "Hover" << LLView::sMouseHandlerMessage << llendl;
+ LL_INFOS() << "Hover" << LLView::sMouseHandlerMessage << LL_ENDL;
}
handled = TRUE;
}
@@ -3127,7 +3129,7 @@ void LLViewerWindow::updateUI()
if (last_handle_msg != LLStringUtil::null)
{
last_handle_msg.clear();
- llinfos << "Hover not handled by view" << llendl;
+ LL_INFOS() << "Hover not handled by view" << LL_ENDL;
}
}
}
@@ -3338,8 +3340,8 @@ void LLViewerWindow::updateMouseDelta()
static F32 fdy = 0.f;
F32 amount = 16.f;
- fdx = fdx + ((F32) dx - fdx) * llmin(gFrameIntervalSeconds*amount,1.f);
- fdy = fdy + ((F32) dy - fdy) * llmin(gFrameIntervalSeconds*amount,1.f);
+ fdx = fdx + ((F32) dx - fdx) * llmin(gFrameIntervalSeconds.value()*amount,1.f);
+ fdy = fdy + ((F32) dy - fdy) * llmin(gFrameIntervalSeconds.value()*amount,1.f);
mCurrentMouseDelta.set(llround(fdx), llround(fdy));
mouse_vel.setVec(fdx,fdy);
@@ -3350,7 +3352,7 @@ void LLViewerWindow::updateMouseDelta()
mouse_vel.setVec((F32) dx, (F32) dy);
}
- mMouseVelocityStat->addValue(mouse_vel.magVec());
+ sample(sMouseVelocityStat, mouse_vel.magVec());
}
void LLViewerWindow::updateKeyboardFocus()
@@ -3441,10 +3443,10 @@ void LLViewerWindow::updateKeyboardFocus()
}
}
-static LLFastTimer::DeclareTimer FTM_UPDATE_WORLD_VIEW("Update World View");
+static LLTrace::BlockTimerStatHandle FTM_UPDATE_WORLD_VIEW("Update World View");
void LLViewerWindow::updateWorldViewRect(bool use_full_window)
{
- LLFastTimer ft(FTM_UPDATE_WORLD_VIEW);
+ LL_RECORD_BLOCK_TIME(FTM_UPDATE_WORLD_VIEW);
// start off using whole window to render world
LLRect new_world_rect = mWindowRectRaw;
@@ -3717,11 +3719,11 @@ BOOL LLViewerWindow::clickPointOnSurfaceGlobal(const S32 x, const S32 y, LLViewe
if (!intersect)
{
point_global = clickPointInWorldGlobal(x, y, objectp);
- llinfos << "approx intersection at " << (objectp->getPositionGlobal() - point_global) << llendl;
+ LL_INFOS() << "approx intersection at " << (objectp->getPositionGlobal() - point_global) << LL_ENDL;
}
else
{
- llinfos << "good intersection at " << (objectp->getPositionGlobal() - point_global) << llendl;
+ LL_INFOS() << "good intersection at " << (objectp->getPositionGlobal() - point_global) << LL_ENDL;
}
return intersect;
@@ -3941,7 +3943,7 @@ LLViewerObject* LLViewerWindow::cursorIntersect(S32 mouse_x, S32 mouse_y, F32 de
}
}
}
-
+
return found;
}
@@ -4089,13 +4091,13 @@ BOOL LLViewerWindow::mousePointOnLandGlobal(const S32 x, const S32 y, LLVector3d
S32 grids_per_edge = (S32) regionp->getLand().mGridsPerEdge;
if ((i >= grids_per_edge) || (j >= grids_per_edge))
{
- //llinfos << "LLViewerWindow::mousePointOnLand probe_point is out of region" << llendl;
+ //LL_INFOS() << "LLViewerWindow::mousePointOnLand probe_point is out of region" << LL_ENDL;
continue;
}
land_z = regionp->getLand().resolveHeightRegion(probe_point_region);
- //llinfos << "mousePointOnLand initial z " << land_z << llendl;
+ //LL_INFOS() << "mousePointOnLand initial z " << land_z << LL_ENDL;
if (probe_point_region.mV[VZ] < land_z)
{
@@ -4136,7 +4138,7 @@ BOOL LLViewerWindow::mousePointOnLandGlobal(const S32 x, const S32 y, LLVector3d
j = (S32) (local_probe_point.mV[VY]/regionp->getLand().getMetersPerGrid());
if ((i >= regionp->getLand().mGridsPerEdge) || (j >= regionp->getLand().mGridsPerEdge))
{
- // llinfos << "LLViewerWindow::mousePointOnLand probe_point is out of region" << llendl;
+ // LL_INFOS() << "LLViewerWindow::mousePointOnLand probe_point is out of region" << LL_ENDL;
continue;
}
land_z = regionp->getLand().mSurfaceZ[ i + j * (regionp->getLand().mGridsPerEdge) ];
@@ -4144,7 +4146,7 @@ BOOL LLViewerWindow::mousePointOnLandGlobal(const S32 x, const S32 y, LLVector3d
land_z = regionp->getLand().resolveHeightRegion(probe_point_region);
- //llinfos << "mousePointOnLand refine z " << land_z << llendl;
+ //LL_INFOS() << "mousePointOnLand refine z " << land_z << LL_ENDL;
if (probe_point_region.mV[VZ] < land_z)
{
@@ -4164,7 +4166,7 @@ BOOL LLViewerWindow::saveImageNumbered(LLImageFormatted *image, bool force_picke
{
if (!image)
{
- llwarns << "No image to save" << llendl;
+ LL_WARNS() << "No image to save" << LL_ENDL;
return FALSE;
}
@@ -4224,7 +4226,7 @@ BOOL LLViewerWindow::saveImageNumbered(LLImageFormatted *image, bool force_picke
}
while( -1 != err ); // search until the file is not found (i.e., stat() gives an error).
- llinfos << "Saving snapshot to " << filepath << llendl;
+ LL_INFOS() << "Saving snapshot to " << filepath << LL_ENDL;
return image->save(filepath);
}
@@ -4247,7 +4249,7 @@ void LLViewerWindow::movieSize(S32 new_width, S32 new_height)
BOOL LLViewerWindow::saveSnapshot( const std::string& filepath, S32 image_width, S32 image_height, BOOL show_ui, BOOL do_rebuild, ESnapshotType type)
{
- llinfos << "Saving snapshot to: " << filepath << llendl;
+ LL_INFOS() << "Saving snapshot to: " << filepath << LL_ENDL;
LLPointer<LLImageRaw> raw = new LLImageRaw;
BOOL success = rawSnapshot(raw, image_width, image_height, TRUE, FALSE, show_ui, do_rebuild);
@@ -4262,12 +4264,12 @@ BOOL LLViewerWindow::saveSnapshot( const std::string& filepath, S32 image_width,
}
else
{
- llwarns << "Unable to encode bmp snapshot" << llendl;
+ LL_WARNS() << "Unable to encode bmp snapshot" << LL_ENDL;
}
}
else
{
- llwarns << "Unable to capture raw snapshot" << llendl;
+ LL_WARNS() << "Unable to capture raw snapshot" << LL_ENDL;
}
return success;
@@ -4308,7 +4310,7 @@ BOOL LLViewerWindow::rawSnapshot(LLImageRaw *raw, S32 image_width, S32 image_hei
{
if(!LLMemory::tryToAlloc(NULL, image_width * image_height * 3))
{
- llwarns << "No enough memory to take the snapshot with size (w : h): " << image_width << " : " << image_height << llendl ;
+ LL_WARNS() << "No enough memory to take the snapshot with size (w : h): " << image_width << " : " << image_height << LL_ENDL ;
return FALSE ; //there is no enough memory for taking this snapshot.
}
}
@@ -4405,7 +4407,7 @@ BOOL LLViewerWindow::rawSnapshot(LLImageRaw *raw, S32 image_width, S32 image_hei
if (show_ui && scale_factor > 1.f)
{
// Note: we should never get there...
- llwarns << "over scaling UI not supported." << llendl;
+ LL_WARNS() << "over scaling UI not supported." << LL_ENDL;
}
S32 buffer_x_offset = llfloor(((window_width - snapshot_width) * scale_factor) / 2.f);
@@ -4437,7 +4439,7 @@ BOOL LLViewerWindow::rawSnapshot(LLImageRaw *raw, S32 image_width, S32 image_hei
if (high_res && show_ui)
{
// Note: we should never get there...
- llwarns << "High res UI snapshot not supported. " << llendl;
+ LL_WARNS() << "High res UI snapshot not supported. " << LL_ENDL;
/*send_agent_pause();
//rescale fonts
initFonts(scale_factor);
@@ -4482,6 +4484,7 @@ BOOL LLViewerWindow::rawSnapshot(LLImageRaw *raw, S32 image_width, S32 image_hei
// Required for showing the GUI in snapshots and performing bloom composite overlay
// Call even if show_ui is FALSE
render_ui(scale_factor, subfield);
+ swap();
}
for (U32 out_y = 0; out_y < read_height ; out_y++)
@@ -4803,10 +4806,10 @@ LLProgressView *LLViewerWindow::getProgressView() const
void LLViewerWindow::dumpState()
{
- llinfos << "LLViewerWindow Active " << S32(mActive) << llendl;
- llinfos << "mWindow visible " << S32(mWindow->getVisible())
+ LL_INFOS() << "LLViewerWindow Active " << S32(mActive) << LL_ENDL;
+ LL_INFOS() << "mWindow visible " << S32(mWindow->getVisible())
<< " minimized " << S32(mWindow->getMinimized())
- << llendl;
+ << LL_ENDL;
}
void LLViewerWindow::stopGL(BOOL save_state)
@@ -4817,7 +4820,7 @@ void LLViewerWindow::stopGL(BOOL save_state)
//especially be careful to put anything behind gTextureList.destroyGL(save_state);
if (!gGLManager.mIsDisabled)
{
- llinfos << "Shutting down GL..." << llendl;
+ LL_INFOS() << "Shutting down GL..." << LL_ENDL;
// Pause texture decode threads (will get unpaused during main loop)
LLAppViewer::getTextureCache()->pause();
@@ -4862,7 +4865,7 @@ void LLViewerWindow::stopGL(BOOL save_state)
gGLManager.mIsDisabled = TRUE;
stop_glerror();
- llinfos << "Remaining allocated texture memory: " << LLImageGL::sGlobalTextureMemoryInBytes << " bytes" << llendl;
+ LL_INFOS() << "Remaining allocated texture memory: " << LLImageGL::sGlobalTextureMemory.value() << " bytes" << LL_ENDL;
}
}
@@ -4874,7 +4877,7 @@ void LLViewerWindow::restoreGL(const std::string& progress_message)
//especially, be careful to put something before gTextureList.restoreGL();
if (gGLManager.mIsDisabled)
{
- llinfos << "Restoring GL..." << llendl;
+ LL_INFOS() << "Restoring GL..." << LL_ENDL;
gGLManager.mIsDisabled = FALSE;
initGLDefaults();
@@ -4911,10 +4914,10 @@ void LLViewerWindow::restoreGL(const std::string& progress_message)
setShowProgress(TRUE);
setProgressString(progress_message);
}
- llinfos << "...Restoring GL done" << llendl;
+ LL_INFOS() << "...Restoring GL done" << LL_ENDL;
if(!LLAppViewer::instance()->restoreErrorTrap())
{
- llwarns << " Someone took over my signal/exception handler (post restoreGL)!" << llendl;
+ LL_WARNS() << " Someone took over my signal/exception handler (post restoreGL)!" << LL_ENDL;
}
}
@@ -4940,11 +4943,11 @@ void LLViewerWindow::requestResolutionUpdate()
mResDirty = true;
}
-static LLFastTimer::DeclareTimer FTM_WINDOW_CHECK_SETTINGS("Window Settings");
+static LLTrace::BlockTimerStatHandle FTM_WINDOW_CHECK_SETTINGS("Window Settings");
void LLViewerWindow::checkSettings()
{
- LLFastTimer t(FTM_WINDOW_CHECK_SETTINGS);
+ LL_RECORD_BLOCK_TIME(FTM_WINDOW_CHECK_SETTINGS);
if (mStatesDirty)
{
gGL.refreshState();
@@ -4962,7 +4965,7 @@ void LLViewerWindow::checkSettings()
void LLViewerWindow::restartDisplay(BOOL show_progress_bar)
{
- llinfos << "Restaring GL" << llendl;
+ LL_INFOS() << "Restaring GL" << LL_ENDL;
stopGL();
if (show_progress_bar)
{
@@ -5005,7 +5008,7 @@ BOOL LLViewerWindow::changeDisplaySettings(LLCoordScreen size, BOOL disable_vsyn
LLFocusableElement* keyboard_focus = gFocusMgr.getKeyboardFocus();
send_agent_pause();
- llinfos << "Stopping GL during changeDisplaySettings" << llendl;
+ LL_INFOS() << "Stopping GL during changeDisplaySettings" << LL_ENDL;
stopGL();
mIgnoreActivate = TRUE;
LLCoordScreen old_size;
@@ -5031,7 +5034,7 @@ BOOL LLViewerWindow::changeDisplaySettings(LLCoordScreen size, BOOL disable_vsyn
}
send_agent_resume();
- llinfos << "Restoring GL during resolution change" << llendl;
+ LL_INFOS() << "Restoring GL during resolution change" << LL_ENDL;
if (show_progress_bar)
{
restoreGL(LLTrans::getString("ProgressChangingResolution"));
@@ -5097,7 +5100,7 @@ void LLViewerWindow::calcDisplayScale()
if (display_scale != mDisplayScale)
{
- llinfos << "Setting display scale to " << display_scale << llendl;
+ LL_INFOS() << "Setting display scale to " << display_scale << LL_ENDL;
mDisplayScale = display_scale;
// Init default fonts
@@ -5400,7 +5403,7 @@ void LLPickInfo::getSurfaceInfo()
tangent.clear();
normal.clear();
intersection.clear();
-
+
LLViewerObject* objectp = getObject();
if (objectp)
@@ -5421,7 +5424,7 @@ void LLPickInfo::getSurfaceInfo()
if (facep)
{
mUVCoords = facep->surfaceToTexture(mSTCoords, intersection, normal);
- }
+ }
}
mIntersection.set(intersection.getF32ptr());
diff --git a/indra/newview/llviewerwindow.h b/indra/newview/llviewerwindow.h
index c16b80b214..5d2df2dfd7 100755
--- a/indra/newview/llviewerwindow.h
+++ b/indra/newview/llviewerwindow.h
@@ -45,12 +45,12 @@
#include "llnotifications.h"
#include "llhandle.h"
#include "llinitparam.h"
+#include "lltrace.h"
#include <boost/function.hpp>
#include <boost/signals2.hpp>
#include <boost/scoped_ptr.hpp>
-class LLStat;
class LLView;
class LLViewerObject;
class LLUUID;
@@ -257,7 +257,7 @@ public:
S32 getCurrentMouseDX() const { return mCurrentMouseDelta.mX; }
S32 getCurrentMouseDY() const { return mCurrentMouseDelta.mY; }
LLCoordGL getCurrentMouseDelta() const { return mCurrentMouseDelta; }
- LLStat* getMouseVelocityStat() { return mMouseVelocityStat; }
+ static LLTrace::SampleStatHandle<>* getMouseVelocityStat() { return &sMouseVelocityStat; }
BOOL getLeftMouseDown() const { return mLeftMouseDown; }
BOOL getMiddleMouseDown() const { return mMiddleMouseDown; }
BOOL getRightMouseDown() const { return mRightMouseDown; }
@@ -438,7 +438,6 @@ private:
LLCoordGL mCurrentMousePoint; // last mouse position in GL coords
LLCoordGL mLastMousePoint; // Mouse point at last frame.
LLCoordGL mCurrentMouseDelta; //amount mouse moved this frame
- LLStat* mMouseVelocityStat;
BOOL mLeftMouseDown;
BOOL mMiddleMouseDown;
BOOL mRightMouseDown;
@@ -493,6 +492,8 @@ private:
// Object temporarily hovered over while dragging
LLPointer<LLViewerObject> mDragHoveredObject;
+
+ static LLTrace::SampleStatHandle<> sMouseVelocityStat;
};
//
diff --git a/indra/newview/llvlcomposition.cpp b/indra/newview/llvlcomposition.cpp
index 94760e3c83..4e9400872a 100755
--- a/indra/newview/llvlcomposition.cpp
+++ b/indra/newview/llvlcomposition.cpp
@@ -28,7 +28,6 @@
#include "llvlcomposition.h"
-#include "imageids.h"
#include "llerror.h"
#include "v3math.h"
#include "llsurface.h"
@@ -288,7 +287,7 @@ BOOL LLVLComposition::generateTexture(const F32 x, const F32 y,
{
mDetailTextures[i]->destroyRawImage() ;
}
- lldebugs << "cached raw data for terrain detail texture is not ready yet: " << mDetailTextures[i]->getID() << llendl;
+ LL_DEBUGS() << "cached raw data for terrain detail texture is not ready yet: " << mDetailTextures[i]->getID() << LL_ENDL;
return FALSE;
}
@@ -324,12 +323,12 @@ BOOL LLVLComposition::generateTexture(const F32 x, const F32 y,
if (x_end > mWidth)
{
- llwarns << "x end > width" << llendl;
+ LL_WARNS() << "x end > width" << LL_ENDL;
x_end = mWidth;
}
if (y_end > mWidth)
{
- llwarns << "y end > width" << llendl;
+ LL_WARNS() << "y end > width" << LL_ENDL;
y_end = mWidth;
}
@@ -359,7 +358,7 @@ BOOL LLVLComposition::generateTexture(const F32 x, const F32 y,
if (tex_comps != st_comps)
{
- llwarns << "Base texture comps != input texture comps" << llendl;
+ LL_WARNS() << "Base texture comps != input texture comps" << LL_ENDL;
return FALSE;
}
@@ -417,8 +416,8 @@ BOOL LLVLComposition::generateTexture(const F32 x, const F32 y,
if (st_offset >= st_data_size[tex0] || st_offset >= st_data_size[tex1])
{
// SJB: This shouldn't be happening, but does... Rounding error?
- //llwarns << "offset 0 [" << tex0 << "] =" << st_offset << " >= size=" << st_data_size[tex0] << llendl;
- //llwarns << "offset 1 [" << tex1 << "] =" << st_offset << " >= size=" << st_data_size[tex1] << llendl;
+ //LL_WARNS() << "offset 0 [" << tex0 << "] =" << st_offset << " >= size=" << st_data_size[tex0] << LL_ENDL;
+ //LL_WARNS() << "offset 1 [" << tex1 << "] =" << st_offset << " >= size=" << st_data_size[tex1] << LL_ENDL;
}
else
{
diff --git a/indra/newview/llvlmanager.cpp b/indra/newview/llvlmanager.cpp
index d8de979f56..895ceed880 100755
--- a/indra/newview/llvlmanager.cpp
+++ b/indra/newview/llvlmanager.cpp
@@ -29,45 +29,49 @@
#include "llvlmanager.h"
#include "indra_constants.h"
-#include "bitpack.h"
#include "patch_code.h"
#include "patch_dct.h"
#include "llviewerregion.h"
#include "llframetimer.h"
#include "llsurface.h"
+#include "llbitpack.h"
+
+const char LAND_LAYER_CODE = 'L';
+const char WIND_LAYER_CODE = '7';
+const char CLOUD_LAYER_CODE = '8';
LLVLManager gVLManager;
LLVLManager::~LLVLManager()
{
S32 i;
- for (i = 0; i < mPacketData.count(); i++)
+ for (i = 0; i < mPacketData.size(); i++)
{
delete mPacketData[i];
}
- mPacketData.reset();
+ mPacketData.clear();
}
-void LLVLManager::addLayerData(LLVLData *vl_datap, const S32 mesg_size)
+void LLVLManager::addLayerData(LLVLData *vl_datap, const S32Bytes mesg_size)
{
if (LAND_LAYER_CODE == vl_datap->mType)
{
- mLandBits += mesg_size * 8;
+ mLandBits += mesg_size;
}
else if (WIND_LAYER_CODE == vl_datap->mType)
{
- mWindBits += mesg_size * 8;
+ mWindBits += mesg_size;
}
else if (CLOUD_LAYER_CODE == vl_datap->mType)
{
- mCloudBits += mesg_size * 8;
+ mCloudBits += mesg_size;
}
else
{
- llerrs << "Unknown layer type!" << (S32)vl_datap->mType << llendl;
+ LL_ERRS() << "Unknown layer type!" << (S32)vl_datap->mType << LL_ENDL;
}
- mPacketData.put(vl_datap);
+ mPacketData.push_back(vl_datap);
}
void LLVLManager::unpackData(const S32 num_packets)
@@ -75,7 +79,7 @@ void LLVLManager::unpackData(const S32 num_packets)
static LLFrameTimer decode_timer;
S32 i;
- for (i = 0; i < mPacketData.count(); i++)
+ for (i = 0; i < mPacketData.size(); i++)
{
LLVLData *datap = mPacketData[i];
@@ -98,35 +102,35 @@ void LLVLManager::unpackData(const S32 num_packets)
}
}
- for (i = 0; i < mPacketData.count(); i++)
+ for (i = 0; i < mPacketData.size(); i++)
{
delete mPacketData[i];
}
- mPacketData.reset();
+ mPacketData.clear();
}
void LLVLManager::resetBitCounts()
{
- mLandBits = mWindBits = mCloudBits = 0;
+ mLandBits = mWindBits = mCloudBits = (S32Bits)0;
}
-S32 LLVLManager::getLandBits() const
+U32Bits LLVLManager::getLandBits() const
{
return mLandBits;
}
-S32 LLVLManager::getWindBits() const
+U32Bits LLVLManager::getWindBits() const
{
return mWindBits;
}
-S32 LLVLManager::getCloudBits() const
+U32Bits LLVLManager::getCloudBits() const
{
return mCloudBits;
}
-S32 LLVLManager::getTotalBytes() const
+S32Bytes LLVLManager::getTotalBytes() const
{
return mLandBits + mWindBits + mCloudBits;
}
@@ -134,12 +138,12 @@ S32 LLVLManager::getTotalBytes() const
void LLVLManager::cleanupData(LLViewerRegion *regionp)
{
S32 cur = 0;
- while (cur < mPacketData.count())
+ while (cur < mPacketData.size())
{
if (mPacketData[cur]->mRegionp == regionp)
{
delete mPacketData[cur];
- mPacketData.remove(cur);
+ mPacketData.erase(mPacketData.begin() + cur);
}
else
{
diff --git a/indra/newview/llvlmanager.h b/indra/newview/llvlmanager.h
index 74b4823a5c..5e7fadc522 100755
--- a/indra/newview/llvlmanager.h
+++ b/indra/newview/llvlmanager.h
@@ -30,7 +30,6 @@
// This class manages the data coming in for viewer layers from the network.
#include "stdtypes.h"
-#include "lldarray.h"
class LLVLData;
class LLViewerRegion;
@@ -40,25 +39,25 @@ class LLVLManager
public:
~LLVLManager();
- void addLayerData(LLVLData *vl_datap, const S32 mesg_size);
+ void addLayerData(LLVLData *vl_datap, const S32Bytes mesg_size);
void unpackData(const S32 num_packets = 10);
- S32 getTotalBytes() const;
+ S32Bytes getTotalBytes() const;
- S32 getLandBits() const;
- S32 getWindBits() const;
- S32 getCloudBits() const;
+ U32Bits getLandBits() const;
+ U32Bits getWindBits() const;
+ U32Bits getCloudBits() const;
void resetBitCounts();
void cleanupData(LLViewerRegion *regionp);
protected:
- LLDynamicArray<LLVLData *> mPacketData;
- U32 mLandBits;
- U32 mWindBits;
- U32 mCloudBits;
+ std::vector<LLVLData *> mPacketData;
+ U32Bits mLandBits;
+ U32Bits mWindBits;
+ U32Bits mCloudBits;
};
class LLVLData
diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp
index c47b6d2335..04f64a4997 100755
--- a/indra/newview/llvoavatar.cpp
+++ b/indra/newview/llvoavatar.cpp
@@ -51,7 +51,6 @@
#include "llpolyskeletaldistortion.h"
#include "lleditingmotion.h"
#include "llemote.h"
-//#include "llfirstuse.h"
#include "llfloatertools.h"
#include "llheadrotmotion.h"
#include "llhudeffecttrail.h"
@@ -68,6 +67,7 @@
#include "llmutelist.h"
#include "llmoveview.h"
#include "llnotificationsutil.h"
+#include "llphysicsshapebuilderutil.h"
#include "llquantize.h"
#include "llrand.h"
#include "llregionhandle.h"
@@ -82,6 +82,7 @@
#include "llviewermenu.h"
#include "llviewerobjectlist.h"
#include "llviewerparcelmgr.h"
+#include "llviewerregion.h"
#include "llviewershadermgr.h"
#include "llviewerstats.h"
#include "llviewerwearable.h"
@@ -101,6 +102,7 @@
#include "lldebugmessagebox.h"
#include "llsdutil.h"
+#include "llscenemonitor.h"
#include "llsdserialize.h"
extern F32 SPEED_ADJUST_MAX;
@@ -116,16 +118,16 @@ using namespace LLAvatarAppearanceDefines;
//-----------------------------------------------------------------------------
// Global constants
//-----------------------------------------------------------------------------
-const LLUUID ANIM_AGENT_BODY_NOISE = LLUUID("9aa8b0a6-0c6f-9518-c7c3-4f41f2c001ad"); //"body_noise"
-const LLUUID ANIM_AGENT_BREATHE_ROT = LLUUID("4c5a103e-b830-2f1c-16bc-224aa0ad5bc8"); //"breathe_rot"
-const LLUUID ANIM_AGENT_EDITING = LLUUID("2a8eba1d-a7f8-5596-d44a-b4977bf8c8bb"); //"editing"
-const LLUUID ANIM_AGENT_EYE = LLUUID("5c780ea8-1cd1-c463-a128-48c023f6fbea"); //"eye"
-const LLUUID ANIM_AGENT_FLY_ADJUST = LLUUID("db95561f-f1b0-9f9a-7224-b12f71af126e"); //"fly_adjust"
-const LLUUID ANIM_AGENT_HAND_MOTION = LLUUID("ce986325-0ba7-6e6e-cc24-b17c4b795578"); //"hand_motion"
-const LLUUID ANIM_AGENT_HEAD_ROT = LLUUID("e6e8d1dd-e643-fff7-b238-c6b4b056a68d"); //"head_rot"
-const LLUUID ANIM_AGENT_PELVIS_FIX = LLUUID("0c5dd2a2-514d-8893-d44d-05beffad208b"); //"pelvis_fix"
-const LLUUID ANIM_AGENT_TARGET = LLUUID("0e4896cb-fba4-926c-f355-8720189d5b55"); //"target"
-const LLUUID ANIM_AGENT_WALK_ADJUST = LLUUID("829bc85b-02fc-ec41-be2e-74cc6dd7215d"); //"walk_adjust"
+const LLUUID ANIM_AGENT_BODY_NOISE = LLUUID("9aa8b0a6-0c6f-9518-c7c3-4f41f2c001ad"); //"body_noise"
+const LLUUID ANIM_AGENT_BREATHE_ROT = LLUUID("4c5a103e-b830-2f1c-16bc-224aa0ad5bc8"); //"breathe_rot"
+const LLUUID ANIM_AGENT_EDITING = LLUUID("2a8eba1d-a7f8-5596-d44a-b4977bf8c8bb"); //"editing"
+const LLUUID ANIM_AGENT_EYE = LLUUID("5c780ea8-1cd1-c463-a128-48c023f6fbea"); //"eye"
+const LLUUID ANIM_AGENT_FLY_ADJUST = LLUUID("db95561f-f1b0-9f9a-7224-b12f71af126e"); //"fly_adjust"
+const LLUUID ANIM_AGENT_HAND_MOTION = LLUUID("ce986325-0ba7-6e6e-cc24-b17c4b795578"); //"hand_motion"
+const LLUUID ANIM_AGENT_HEAD_ROT = LLUUID("e6e8d1dd-e643-fff7-b238-c6b4b056a68d"); //"head_rot"
+const LLUUID ANIM_AGENT_PELVIS_FIX = LLUUID("0c5dd2a2-514d-8893-d44d-05beffad208b"); //"pelvis_fix"
+const LLUUID ANIM_AGENT_TARGET = LLUUID("0e4896cb-fba4-926c-f355-8720189d5b55"); //"target"
+const LLUUID ANIM_AGENT_WALK_ADJUST = LLUUID("829bc85b-02fc-ec41-be2e-74cc6dd7215d"); //"walk_adjust"
const LLUUID ANIM_AGENT_PHYSICS_MOTION = LLUUID("7360e029-3cb8-ebc4-863e-212df440d987"); //"physics_motion"
@@ -253,7 +255,7 @@ struct LLAppearanceMessageContents
};
struct LLVOAvatarChildJoint : public LLInitParam::ChoiceBlock<LLVOAvatarChildJoint>
-{
+ {
Alternative<Lazy<struct LLVOAvatarBoneInfo, IS_A_BLOCK> > bone;
Alternative<LLVOAvatarCollisionVolumeInfo> collision_volume;
@@ -721,7 +723,7 @@ LLVOAvatar::LLVOAvatar(const LLUUID& id,
const BOOL needsSendToSim = false; // currently, this HUD effect doesn't need to pack and unpack data to do its job
mVoiceVisualizer = ( LLVoiceVisualizer *)LLHUDManager::getInstance()->createViewerEffect( LLHUDObject::LL_HUD_EFFECT_VOICE_VISUALIZER, needsSendToSim );
- lldebugs << "LLVOAvatar Constructor (0x" << this << ") id:" << mID << llendl;
+ LL_DEBUGS() << "LLVOAvatar Constructor (0x" << this << ") id:" << mID << LL_ENDL;
mPelvisp = NULL;
@@ -774,6 +776,11 @@ LLVOAvatar::LLVOAvatar(const LLUUID& id,
mPelvisFixup = 0.0f;
mLastPelvisFixup = 0.0f;
+ if(LLSceneMonitor::getInstance()->isEnabled())
+ {
+ LLSceneMonitor::getInstance()->freezeAvatar((LLCharacter*)this);
+ }
+
mCachedVisualMute = !isSelf();
mCachedVisualMuteUpdateTime = LLFrameTimer::getTotalSeconds() + 5.0;
mVisuallyMuteSetting = VISUAL_MUTE_NOT_SET;
@@ -796,7 +803,7 @@ void LLVOAvatar::debugAvatarRezTime(std::string notification_name, std::string c
<< "RuthTimer " << (U32)mRuthDebugTimer.getElapsedTimeF32()
<< " Notification " << notification_name
<< " : " << comment
- << llendl;
+ << LL_ENDL;
if (gSavedSettings.getBOOL("DebugAvatarRezTime"))
{
@@ -813,18 +820,18 @@ void LLVOAvatar::debugAvatarRezTime(std::string notification_name, std::string c
//------------------------------------------------------------------------
LLVOAvatar::~LLVOAvatar()
{
- if (!mFullyLoaded)
- {
+ if (!mFullyLoaded)
+ {
debugAvatarRezTime("AvatarRezLeftCloudNotification","left after ruth seconds as cloud");
- }
- else
- {
+ }
+ else
+ {
debugAvatarRezTime("AvatarRezLeftNotification","left sometime after declouding");
- }
+ }
logPendingPhases();
-
- lldebugs << "LLVOAvatar Destructor (0x" << this << ") id:" << mID << llendl;
+
+ LL_DEBUGS() << "LLVOAvatar Destructor (0x" << this << ") id:" << mID << LL_ENDL;
std::for_each(mAttachmentPoints.begin(), mAttachmentPoints.end(), DeletePairedPointer());
mAttachmentPoints.clear();
@@ -836,7 +843,7 @@ LLVOAvatar::~LLVOAvatar()
getPhases().clearPhases();
- lldebugs << "LLVOAvatar Destructor end" << llendl;
+ LL_DEBUGS() << "LLVOAvatar Destructor end" << LL_ENDL;
}
void LLVOAvatar::markDead()
@@ -1000,54 +1007,54 @@ void LLVOAvatar::dumpBakedStatus()
iter != LLCharacter::sInstances.end(); ++iter)
{
LLVOAvatar* inst = (LLVOAvatar*) *iter;
- llinfos << "Avatar ";
+ LL_INFOS() << "Avatar ";
LLNameValue* firstname = inst->getNVPair("FirstName");
LLNameValue* lastname = inst->getNVPair("LastName");
if( firstname )
{
- llcont << firstname->getString();
+ LL_CONT << firstname->getString();
}
if( lastname )
{
- llcont << " " << lastname->getString();
+ LL_CONT << " " << lastname->getString();
}
- llcont << " " << inst->mID;
+ LL_CONT << " " << inst->mID;
if( inst->isDead() )
{
- llcont << " DEAD ("<< inst->getNumRefs() << " refs)";
+ LL_CONT << " DEAD ("<< inst->getNumRefs() << " refs)";
}
if( inst->isSelf() )
{
- llcont << " (self)";
+ LL_CONT << " (self)";
}
F64 dist_to_camera = (inst->getPositionGlobal() - camera_pos_global).length();
- llcont << " " << dist_to_camera << "m ";
+ LL_CONT << " " << dist_to_camera << "m ";
- llcont << " " << inst->mPixelArea << " pixels";
+ LL_CONT << " " << inst->mPixelArea << " pixels";
if( inst->isVisible() )
{
- llcont << " (visible)";
+ LL_CONT << " (visible)";
}
else
{
- llcont << " (not visible)";
+ LL_CONT << " (not visible)";
}
if( inst->isFullyBaked() )
{
- llcont << " Baked";
+ LL_CONT << " Baked";
}
else
{
- llcont << " Unbaked (";
+ LL_CONT << " Unbaked (";
for (LLAvatarAppearanceDictionary::BakedTextures::const_iterator iter = LLAvatarAppearanceDictionary::getInstance()->getBakedTextures().begin();
iter != LLAvatarAppearanceDictionary::getInstance()->getBakedTextures().end();
@@ -1057,16 +1064,16 @@ void LLVOAvatar::dumpBakedStatus()
const ETextureIndex index = baked_dict->mTextureIndex;
if (!inst->isTextureDefined(index))
{
- llcont << " " << LLAvatarAppearanceDictionary::getInstance()->getTexture(index)->mName;
+ LL_CONT << " " << LLAvatarAppearanceDictionary::getInstance()->getTexture(index)->mName;
}
}
- llcont << " ) " << inst->getUnbakedPixelAreaRank();
+ LL_CONT << " ) " << inst->getUnbakedPixelAreaRank();
if( inst->isCulled() )
{
- llcont << " culled";
+ LL_CONT << " culled";
}
}
- llcont << llendl;
+ LL_CONT << LL_ENDL;
}
}
@@ -1107,7 +1114,7 @@ void LLVOAvatar::deleteCachedImages(bool clearAll)
{
if (LLViewerTexLayerSet::sHasCaches)
{
- lldebugs << "Deleting layer set caches" << llendl;
+ LL_DEBUGS() << "Deleting layer set caches" << LL_ENDL;
for (std::vector<LLCharacter*>::iterator iter = LLCharacter::sInstances.begin();
iter != LLCharacter::sInstances.end(); ++iter)
{
@@ -1207,7 +1214,7 @@ void LLVOAvatar::initInstance(void)
registerMotion( ANIM_AGENT_TARGET, LLTargetingMotion::create );
registerMotion( ANIM_AGENT_WALK_ADJUST, LLWalkAdjustMotion::create );
}
-
+
LLAvatarAppearance::initInstance();
// preload specific motions here
@@ -1318,7 +1325,7 @@ void LLVOAvatar::getSpatialExtents(LLVector4a& newMin, LLVector4a& newMax)
for (polymesh_map_t::iterator i = mPolyMeshes.begin(); i != mPolyMeshes.end(); ++i)
{
LLPolyMesh* mesh = i->second;
- for (S32 joint_num = 0; joint_num < mesh->mJointRenderData.count(); joint_num++)
+ for (S32 joint_num = 0; joint_num < mesh->mJointRenderData.size(); joint_num++)
{
LLVector4a trans;
trans.load3( mesh->mJointRenderData[joint_num]->mWorldMatrix->getTranslation().mV);
@@ -1646,7 +1653,7 @@ LLViewerObject* LLVOAvatar::lineSegmentIntersectRiggedAttachments(const LLVector
return hit;
}
-
+
LLVOAvatar* LLVOAvatar::asAvatar()
{
return this;
@@ -1700,14 +1707,14 @@ void LLVOAvatar::buildCharacter()
// If we don't have the Ooh morph, use the Kiss morph
if (!mOohMorph)
{
- llwarns << "Missing 'Ooh' morph for lipsync, using fallback." << llendl;
+ LL_WARNS() << "Missing 'Ooh' morph for lipsync, using fallback." << LL_ENDL;
mOohMorph = getVisualParam( "Express_Kiss" );
}
// If we don't have the Aah morph, use the Open Mouth morph
if (!mAahMorph)
{
- llwarns << "Missing 'Aah' morph for lipsync, using fallback." << llendl;
+ LL_WARNS() << "Missing 'Aah' morph for lipsync, using fallback." << LL_ENDL;
mAahMorph = getVisualParam( "Express_Open_Mouth" );
}
@@ -1735,7 +1742,7 @@ void LLVOAvatar::releaseMeshData()
return;
}
- //llinfos << "Releasing" << llendl;
+ LL_DEBUGS() << "Releasing mesh data" << LL_ENDL;
// cleanup mesh data
for (avatar_joint_list_t::iterator iter = mMeshLOD.begin();
@@ -1785,7 +1792,7 @@ void LLVOAvatar::restoreMeshData()
{
llassert(!isSelf());
- //llinfos << "Restoring" << llendl;
+ //LL_INFOS() << "Restoring" << LL_ENDL;
mMeshValid = TRUE;
updateJointLODs();
@@ -1896,7 +1903,7 @@ void LLVOAvatar::updateMeshData()
// the case of more than one avatar in the pool (thus > 0 instead of >= 0)
if (facep->getGeomIndex() > 0)
{
- llerrs << "non-zero geom index: " << facep->getGeomIndex() << " in LLVOAvatar::restoreMeshData" << llendl;
+ LL_ERRS() << "non-zero geom index: " << facep->getGeomIndex() << " in LLVOAvatar::restoreMeshData" << LL_ENDL;
}
for(S32 k = j ; k < part_index ; k++)
@@ -1962,8 +1969,8 @@ U32 LLVOAvatar::processUpdateMessage(LLMessageSystem *mesgsys,
}
}
- //llinfos << getRotation() << llendl;
- //llinfos << getPosition() << llendl;
+ //LL_INFOS() << getRotation() << LL_ENDL;
+ //LL_INFOS() << getPosition() << LL_ENDL;
return retval;
}
@@ -1981,22 +1988,22 @@ LLViewerFetchedTexture *LLVOAvatar::getBakedTextureImage(const U8 te, const LLUU
}
if (!result)
- {
+{
const std::string url = getImageURL(te,uuid);
if (!url.empty())
- {
- LL_DEBUGS("Avatar") << avString() << "from URL " << url << llendl;
+ {
+ LL_DEBUGS("Avatar") << avString() << "from URL " << url << LL_ENDL;
result = LLViewerTextureManager::getFetchedTextureFromUrl(
url, FTT_SERVER_BAKE, TRUE, LLGLTexture::BOOST_NONE, LLViewerTexture::LOD_TEXTURE, 0, 0, uuid);
- }
- else
- {
- LL_DEBUGS("Avatar") << avString() << "from host " << uuid << llendl;
+ }
+ else
+ {
+ LL_DEBUGS("Avatar") << avString() << "from host " << uuid << LL_ENDL;
LLHost host = getObjectHost();
result = LLViewerTextureManager::getFetchedTexture(
uuid, FTT_HOST_BAKE, TRUE, LLGLTexture::BOOST_NONE, LLViewerTexture::LOD_TEXTURE, 0, 0, host);
- }
}
+}
return result;
}
@@ -2014,15 +2021,15 @@ S32 LLVOAvatar::setTETexture(const U8 te, const LLUUID& uuid)
return setTETextureCore(te, image);
}
-static LLFastTimer::DeclareTimer FTM_AVATAR_UPDATE("Avatar Update");
-static LLFastTimer::DeclareTimer FTM_JOINT_UPDATE("Update Joints");
+static LLTrace::BlockTimerStatHandle FTM_AVATAR_UPDATE("Avatar Update");
+static LLTrace::BlockTimerStatHandle FTM_JOINT_UPDATE("Update Joints");
//------------------------------------------------------------------------
// LLVOAvatar::dumpAnimationState()
//------------------------------------------------------------------------
void LLVOAvatar::dumpAnimationState()
{
- llinfos << "==============================================" << llendl;
+ LL_INFOS() << "==============================================" << LL_ENDL;
for (LLVOAvatar::AnimIterator it = mSignaledAnimations.begin(); it != mSignaledAnimations.end(); ++it)
{
LLUUID id = it->first;
@@ -2031,7 +2038,7 @@ void LLVOAvatar::dumpAnimationState()
{
playtag = "*";
}
- llinfos << gAnimLibrary.animationName(id) << playtag << llendl;
+ LL_INFOS() << gAnimLibrary.animationName(id) << playtag << LL_ENDL;
}
for (LLVOAvatar::AnimIterator it = mPlayingAnimations.begin(); it != mPlayingAnimations.end(); ++it)
{
@@ -2039,7 +2046,7 @@ void LLVOAvatar::dumpAnimationState()
bool is_signaled = mSignaledAnimations.find(id) != mSignaledAnimations.end();
if (!is_signaled)
{
- llinfos << gAnimLibrary.animationName(id) << "!S" << llendl;
+ LL_INFOS() << gAnimLibrary.animationName(id) << "!S" << LL_ENDL;
}
}
}
@@ -2049,11 +2056,11 @@ void LLVOAvatar::dumpAnimationState()
//------------------------------------------------------------------------
void LLVOAvatar::idleUpdate(LLAgent &agent, const F64 &time)
{
- LLFastTimer t(FTM_AVATAR_UPDATE);
+ LL_RECORD_BLOCK_TIME(FTM_AVATAR_UPDATE);
if (isDead())
{
- llinfos << "Warning! Idle on dead avatar" << llendl;
+ LL_INFOS() << "Warning! Idle on dead avatar" << LL_ENDL;
return;
}
@@ -2071,7 +2078,7 @@ void LLVOAvatar::idleUpdate(LLAgent &agent, const F64 &time)
// force asynchronous drawable update
if(mDrawable.notNull())
{
- LLFastTimer t(FTM_JOINT_UPDATE);
+ LL_RECORD_BLOCK_TIME(FTM_JOINT_UPDATE);
if (mIsSitting && getParent())
{
@@ -2184,7 +2191,7 @@ void LLVOAvatar::idleUpdateVoiceVisualizer(bool voice_enabled)
if ( mCurrentGesticulationLevel == 0 ) { gestureString = "/voicelevel1"; }
else if ( mCurrentGesticulationLevel == 1 ) { gestureString = "/voicelevel2"; }
else if ( mCurrentGesticulationLevel == 2 ) { gestureString = "/voicelevel3"; }
- else { llinfos << "oops - CurrentGesticulationLevel can be only 0, 1, or 2" << llendl; }
+ else { LL_INFOS() << "oops - CurrentGesticulationLevel can be only 0, 1, or 2" << LL_ENDL; }
// this is the call that Karl S. created for triggering gestures from within the code.
LLGestureMgr::instance().triggerAndReviseString( gestureString );
@@ -2254,13 +2261,13 @@ void LLVOAvatar::idleUpdateVoiceVisualizer(bool voice_enabled)
}//if ( voiceEnabled )
}
-static LLFastTimer::DeclareTimer FTM_ATTACHMENT_UPDATE("Update Attachments");
+static LLTrace::BlockTimerStatHandle FTM_ATTACHMENT_UPDATE("Update Attachments");
void LLVOAvatar::idleUpdateMisc(bool detailed_update)
{
if (LLVOAvatar::sJointDebug)
{
- llinfos << getFullname() << ": joint touches: " << LLJoint::sNumTouches << " updates: " << LLJoint::sNumUpdates << llendl;
+ LL_INFOS() << getFullname() << ": joint touches: " << LLJoint::sNumTouches << " updates: " << LLJoint::sNumUpdates << LL_ENDL;
}
LLJoint::sNumUpdates = 0;
@@ -2271,7 +2278,7 @@ void LLVOAvatar::idleUpdateMisc(bool detailed_update)
// update attachments positions
if (detailed_update || !sUseImpostors)
{
- LLFastTimer t(FTM_ATTACHMENT_UPDATE);
+ LL_RECORD_BLOCK_TIME(FTM_ATTACHMENT_UPDATE);
for (attachment_map_t::iterator iter = mAttachmentPoints.begin();
iter != mAttachmentPoints.end();
++iter)
@@ -2550,7 +2557,7 @@ void LLVOAvatar::idleUpdateWindEffect()
LLVector3 velocity = getVelocity();
F32 speed = velocity.length();
//RN: velocity varies too much frame to frame for this to work
- mRippleAccel.clearVec();//lerp(mRippleAccel, (velocity - mLastVel) * time_delta, LLCriticalDamp::getInterpolant(0.02f));
+ mRippleAccel.clearVec();//lerp(mRippleAccel, (velocity - mLastVel) * time_delta, LLSmoothInterpolation::getInterpolant(0.02f));
mLastVel = velocity;
LLVector4 wind;
wind.setVec(getRegion()->mWind.getVelocityNoisy(getPositionAgent(), 4.f) - velocity);
@@ -2573,11 +2580,11 @@ void LLVOAvatar::idleUpdateWindEffect()
F32 interp;
if (wind.mV[VW] > mWindVec.mV[VW])
{
- interp = LLCriticalDamp::getInterpolant(0.2f);
+ interp = LLSmoothInterpolation::getInterpolant(0.2f);
}
else
{
- interp = LLCriticalDamp::getInterpolant(0.4f);
+ interp = LLSmoothInterpolation::getInterpolant(0.4f);
}
mWindVec = lerp(mWindVec, wind, interp);
@@ -3003,7 +3010,7 @@ void LLVOAvatar::idleUpdateNameTagPosition(const LLVector3& root_pos_last)
mTargetRootToHeadOffset = head_offset;
}
- mCurRootToHeadOffset = lerp(mCurRootToHeadOffset, mTargetRootToHeadOffset, LLCriticalDamp::getInterpolant(0.2f));
+ mCurRootToHeadOffset = lerp(mCurRootToHeadOffset, mTargetRootToHeadOffset, LLSmoothInterpolation::getInterpolant(0.2f));
LLVector3 name_position = mRoot->getLastWorldPosition() + (mCurRootToHeadOffset * root_rot);
name_position += (local_camera_up * root_rot) - (projected_vec(local_camera_at * root_rot, camera_to_av));
@@ -3324,7 +3331,7 @@ BOOL LLVOAvatar::updateCharacter(LLAgent &agent)
removeAnimationData("Walk Speed");
}
mMotionController.setTimeStep(time_step);
-// llinfos << "Setting timestep to " << time_quantum * pixel_area_scale << llendl;
+// LL_INFOS() << "Setting timestep to " << time_quantum * pixel_area_scale << LL_ENDL;
}
if (getParent() && !mIsSitting)
@@ -3544,7 +3551,7 @@ BOOL LLVOAvatar::updateCharacter(LLAgent &agent)
// Set the root rotation, but do so incrementally so that it
// lags in time by some fixed amount.
- //F32 u = LLCriticalDamp::getInterpolant(PELVIS_LAG);
+ //F32 u = LLSmoothInterpolation::getInterpolant(PELVIS_LAG);
F32 pelvis_lag_time = 0.f;
if (self_in_mouselook)
{
@@ -3790,42 +3797,42 @@ void LLVOAvatar::updateVisibility()
}
else
{
- llinfos << "Avatar " << this << " updating visiblity" << llendl;
+ LL_INFOS() << "Avatar " << this << " updating visiblity" << LL_ENDL;
}
if (visible)
{
- llinfos << "Visible" << llendl;
+ LL_INFOS() << "Visible" << LL_ENDL;
}
else
{
- llinfos << "Not visible" << llendl;
+ LL_INFOS() << "Not visible" << LL_ENDL;
}
/*if (avatar_in_frustum)
{
- llinfos << "Avatar in frustum" << llendl;
+ LL_INFOS() << "Avatar in frustum" << LL_ENDL;
}
else
{
- llinfos << "Avatar not in frustum" << llendl;
+ LL_INFOS() << "Avatar not in frustum" << LL_ENDL;
}*/
/*if (LLViewerCamera::getInstance()->sphereInFrustum(sel_pos_agent, 2.0f))
{
- llinfos << "Sel pos visible" << llendl;
+ LL_INFOS() << "Sel pos visible" << LL_ENDL;
}
if (LLViewerCamera::getInstance()->sphereInFrustum(wrist_right_pos_agent, 0.2f))
{
- llinfos << "Wrist pos visible" << llendl;
+ LL_INFOS() << "Wrist pos visible" << LL_ENDL;
}
if (LLViewerCamera::getInstance()->sphereInFrustum(getPositionAgent(), getMaxScale()*2.f))
{
- llinfos << "Agent visible" << llendl;
+ LL_INFOS() << "Agent visible" << LL_ENDL;
}*/
- llinfos << "PA: " << getPositionAgent() << llendl;
- /*llinfos << "SPA: " << sel_pos_agent << llendl;
- llinfos << "WPA: " << wrist_right_pos_agent << llendl;*/
+ LL_INFOS() << "PA: " << getPositionAgent() << LL_ENDL;
+ /*LL_INFOS() << "SPA: " << sel_pos_agent << LL_ENDL;
+ LL_INFOS() << "WPA: " << wrist_right_pos_agent << LL_ENDL;*/
for (attachment_map_t::iterator iter = mAttachmentPoints.begin();
iter != mAttachmentPoints.end();
++iter)
@@ -3840,11 +3847,11 @@ void LLVOAvatar::updateVisibility()
{
if(attached_object->mDrawable->isVisible())
{
- llinfos << attachment->getName() << " visible" << llendl;
+ LL_INFOS() << attachment->getName() << " visible" << LL_ENDL;
}
else
{
- llinfos << attachment->getName() << " not visible at " << mDrawable->getWorldPosition() << " and radius " << mDrawable->getRadius() << llendl;
+ LL_INFOS() << attachment->getName() << " not visible at " << mDrawable->getWorldPosition() << " and radius " << mDrawable->getRadius() << LL_ENDL;
}
}
}
@@ -3888,7 +3895,7 @@ bool LLVOAvatar::shouldAlphaMask()
//-----------------------------------------------------------------------------
// renderSkinned()
//-----------------------------------------------------------------------------
-U32 LLVOAvatar::renderSkinned(EAvatarRenderPass pass)
+U32 LLVOAvatar::renderSkinned()
{
U32 num_indices = 0;
@@ -3984,19 +3991,19 @@ U32 LLVOAvatar::renderSkinned(EAvatarRenderPass pass)
}
else
{
- llinfos << "Avatar " << this << " in render" << llendl;
+ LL_INFOS() << "Avatar " << this << " in render" << LL_ENDL;
}
if (!mIsBuilt)
{
- llinfos << "Not built!" << llendl;
+ LL_INFOS() << "Not built!" << LL_ENDL;
}
else if (!gAgent.needsRenderAvatar())
{
- llinfos << "Doesn't need avatar render!" << llendl;
+ LL_INFOS() << "Doesn't need avatar render!" << LL_ENDL;
}
else
{
- llinfos << "Rendering!" << llendl;
+ LL_INFOS() << "Rendering!" << LL_ENDL;
}
}
@@ -4049,12 +4056,6 @@ U32 LLVOAvatar::renderSkinned(EAvatarRenderPass pass)
//--------------------------------------------------------------------
// render all geometry attached to the skeleton
//--------------------------------------------------------------------
- static LLStat render_stat;
-
- LLViewerJointMesh::sRenderPass = pass;
-
- if (pass == AVATAR_RENDER_PASS_SINGLE)
- {
bool should_alpha_mask = shouldAlphaMask();
LLGLState test(GL_ALPHA_TEST, should_alpha_mask);
@@ -4113,13 +4114,6 @@ U32 LLVOAvatar::renderSkinned(EAvatarRenderPass pass)
LLGLState test(GL_ALPHA_TEST, !mIsDummy);
num_indices += renderTransparent(first_pass);
}
- }
-
- LLViewerJointMesh::sRenderPass = AVATAR_RENDER_PASS_SINGLE;
-
- //llinfos << "Avatar render: " << render_timer.getElapsedTimeF32() << llendl;
-
- //render_stat.addValue(render_timer.getElapsedTimeF32()*1000.f);
return num_indices;
}
@@ -4162,7 +4156,7 @@ U32 LLVOAvatar::renderTransparent(BOOL first_pass)
{
LLViewerJoint* hair_mesh = getViewerJoint(MESH_ID_HAIR);
if (hair_mesh)
- {
+ {
num_indices += hair_mesh->render(mAdjustedPixelArea, first_pass, mIsDummy);
}
first_pass = FALSE;
@@ -4172,7 +4166,7 @@ U32 LLVOAvatar::renderTransparent(BOOL first_pass)
gGL.setAlphaRejectSettings(LLRender::CF_DEFAULT);
}
}
-
+
return num_indices;
}
@@ -4363,9 +4357,9 @@ std::string LLVOAvatar::bakedTextureOriginInfo()
return result;
}
-S32 LLVOAvatar::totalTextureMemForUUIDS(std::set<LLUUID>& ids)
+S32Bytes LLVOAvatar::totalTextureMemForUUIDS(std::set<LLUUID>& ids)
{
- S32 result = 0;
+ S32Bytes result(0);
for (std::set<LLUUID>::const_iterator it = ids.begin(); it != ids.end(); ++it)
{
LLViewerFetchedTexture *imagep = gTextureList.findImage(*it);
@@ -4430,12 +4424,12 @@ void LLVOAvatar::collectTextureUUIDs(std::set<LLUUID>& ids)
void LLVOAvatar::releaseOldTextures()
{
- S32 current_texture_mem = 0;
+ S32Bytes current_texture_mem;
// Any textures that we used to be using but are no longer using should no longer be flagged as "NO_DELETE"
std::set<LLUUID> baked_texture_ids;
collectBakedTextureUUIDs(baked_texture_ids);
- S32 new_baked_mem = totalTextureMemForUUIDS(baked_texture_ids);
+ S32Bytes new_baked_mem = totalTextureMemForUUIDS(baked_texture_ids);
std::set<LLUUID> local_texture_ids;
collectLocalTextureUUIDs(local_texture_ids);
@@ -4444,13 +4438,13 @@ void LLVOAvatar::releaseOldTextures()
std::set<LLUUID> new_texture_ids;
new_texture_ids.insert(baked_texture_ids.begin(),baked_texture_ids.end());
new_texture_ids.insert(local_texture_ids.begin(),local_texture_ids.end());
- S32 new_total_mem = totalTextureMemForUUIDS(new_texture_ids);
+ S32Bytes new_total_mem = totalTextureMemForUUIDS(new_texture_ids);
//S32 old_total_mem = totalTextureMemForUUIDS(mTextureIDs);
- //LL_DEBUGS("Avatar") << getFullname() << " old_total_mem: " << old_total_mem << " new_total_mem (L/B): " << new_total_mem << " (" << new_local_mem <<", " << new_baked_mem << ")" << llendl;
+ //LL_DEBUGS("Avatar") << getFullname() << " old_total_mem: " << old_total_mem << " new_total_mem (L/B): " << new_total_mem << " (" << new_local_mem <<", " << new_baked_mem << ")" << LL_ENDL;
if (!isSelf() && new_total_mem > new_baked_mem)
{
- llwarns << "extra local textures stored for non-self av" << llendl;
+ LL_WARNS() << "extra local textures stored for non-self av" << LL_ENDL;
}
for (std::set<LLUUID>::iterator it = mTextureIDs.begin(); it != mTextureIDs.end(); ++it)
{
@@ -4538,7 +4532,7 @@ void LLVOAvatar::updateTextures()
}
else
{
- llwarns << "getTE( " << texture_index << " ) returned 0" <<llendl;
+ LL_WARNS() << "getTE( " << texture_index << " ) returned 0" <<LL_ENDL;
}
LLViewerFetchedTexture *imagep = NULL;
@@ -4569,7 +4563,7 @@ void LLVOAvatar::updateTextures()
LL_WARNS_ONCE("Texture") << "LLVOAvatar::updateTextures No host for texture "
<< imagep->getID() << " for avatar "
<< (isSelf() ? "<myself>" : getID().asString())
- << " on host " << getRegion()->getHost() << llendl;
+ << " on host " << getRegion()->getHost() << LL_ENDL;
}
addBakedTextureStats( imagep, mPixelArea, texel_area_ratio, boost_level );
@@ -4709,7 +4703,7 @@ const std::string LLVOAvatar::getImageURL(const U8 te, const LLUUID &uuid)
if (appearance_service_url.empty())
{
// Probably a server-side issue if we get here:
- llwarns << "AgentAppearanceServiceURL not set - Baked texture requests will fail" << llendl;
+ LL_WARNS() << "AgentAppearanceServiceURL not set - Baked texture requests will fail" << LL_ENDL;
return url;
}
@@ -4717,7 +4711,7 @@ const std::string LLVOAvatar::getImageURL(const U8 te, const LLUUID &uuid)
if (texture_entry != NULL)
{
url = appearance_service_url + "texture/" + getID().asString() + "/" + texture_entry->mDefaultImageName + "/" + uuid.asString();
- //llinfos << "baked texture url: " << url << llendl;
+ //LL_INFOS() << "baked texture url: " << url << LL_ENDL;
}
}
return url;
@@ -4767,7 +4761,7 @@ void LLVOAvatar::resolveHeightGlobal(const LLVector3d &inPos, LLVector3d &outPos
LLVector3 relativePos = gAgent.getPosAgentFromGlobal(outPos) - obj->getPositionAgent();
LLVector3 linearComponent = angularVelocity % relativePos;
-// llinfos << "Linear Component of Rotation Velocity " << linearComponent << llendl;
+// LL_INFOS() << "Linear Component of Rotation Velocity " << linearComponent << LL_ENDL;
mStepObjectVelocity = obj->getVelocity() + linearComponent;
}
}
@@ -4920,7 +4914,7 @@ BOOL LLVOAvatar::processSingleAnimationStateChange( const LLUUID& anim_id, BOOL
}
else
{
- llwarns << "Failed to start motion!" << llendl;
+ LL_WARNS() << "Failed to start motion!" << LL_ENDL;
}
}
else //stop animation
@@ -5016,13 +5010,13 @@ LLUUID LLVOAvatar::remapMotionID(const LLUUID& id)
//-----------------------------------------------------------------------------
BOOL LLVOAvatar::startMotion(const LLUUID& id, F32 time_offset)
{
- lldebugs << "motion requested " << id.asString() << " " << gAnimLibrary.animationName(id) << llendl;
+ LL_DEBUGS() << "motion requested " << id.asString() << " " << gAnimLibrary.animationName(id) << LL_ENDL;
LLUUID remap_id = remapMotionID(id);
if (remap_id != id)
{
- lldebugs << "motion resultant " << remap_id.asString() << " " << gAnimLibrary.animationName(remap_id) << llendl;
+ LL_DEBUGS() << "motion resultant " << remap_id.asString() << " " << gAnimLibrary.animationName(remap_id) << LL_ENDL;
}
if (isSelf() && remap_id == ANIM_AGENT_AWAY)
@@ -5038,13 +5032,13 @@ BOOL LLVOAvatar::startMotion(const LLUUID& id, F32 time_offset)
//-----------------------------------------------------------------------------
BOOL LLVOAvatar::stopMotion(const LLUUID& id, BOOL stop_immediate)
{
- lldebugs << "motion requested " << id.asString() << " " << gAnimLibrary.animationName(id) << llendl;
+ LL_DEBUGS() << "motion requested " << id.asString() << " " << gAnimLibrary.animationName(id) << LL_ENDL;
LLUUID remap_id = remapMotionID(id);
if (remap_id != id)
{
- lldebugs << "motion resultant " << remap_id.asString() << " " << gAnimLibrary.animationName(remap_id) << llendl;
+ LL_DEBUGS() << "motion resultant " << remap_id.asString() << " " << gAnimLibrary.animationName(remap_id) << LL_ENDL;
}
if (isSelf())
@@ -5137,7 +5131,7 @@ void LLVOAvatar::resetSpecificJointPosition( const std::string& name )
}
else
{
- llinfos<<"Did not find "<< name.c_str()<<llendl;
+ LL_INFOS()<<"Did not find "<< name.c_str()<<LL_ENDL;
}
}
//-----------------------------------------------------------------------------
@@ -5289,9 +5283,9 @@ BOOL LLVOAvatar::loadSkeletonNode ()
{
if (!LLAvatarAppearance::loadSkeletonNode())
{
- return FALSE;
- }
-
+ return FALSE;
+ }
+
// ATTACHMENTS
{
LLAvatarXmlInfo::attachment_info_list_t::iterator iter;
@@ -5311,7 +5305,7 @@ BOOL LLVOAvatar::loadSkeletonNode ()
LLJoint *parentJoint = getJoint(info->mJointName);
if (!parentJoint)
{
- llwarns << "No parent joint by name " << info->mJointName << " found for attachment point " << info->mName << llendl;
+ LL_WARNS() << "No parent joint by name " << info->mJointName << " found for attachment point " << info->mName << LL_ENDL;
delete attachment;
continue;
}
@@ -5335,7 +5329,7 @@ BOOL LLVOAvatar::loadSkeletonNode ()
{
if (group < 0 || group >= 9)
{
- llwarns << "Invalid group number (" << group << ") for attachment point " << info->mName << llendl;
+ LL_WARNS() << "Invalid group number (" << group << ") for attachment point " << info->mName << LL_ENDL;
}
else
{
@@ -5346,13 +5340,13 @@ BOOL LLVOAvatar::loadSkeletonNode ()
S32 attachmentID = info->mAttachmentID;
if (attachmentID < 1 || attachmentID > 255)
{
- llwarns << "Attachment point out of range [1-255]: " << attachmentID << " on attachment point " << info->mName << llendl;
+ LL_WARNS() << "Attachment point out of range [1-255]: " << attachmentID << " on attachment point " << info->mName << LL_ENDL;
delete attachment;
continue;
}
if (mAttachmentPoints.find(attachmentID) != mAttachmentPoints.end())
{
- llwarns << "Attachment point redefined with id " << attachmentID << " on attachment point " << info->mName << llendl;
+ LL_WARNS() << "Attachment point redefined with id " << attachmentID << " on attachment point " << info->mName << LL_ENDL;
delete attachment;
continue;
}
@@ -5522,10 +5516,10 @@ void LLVOAvatar::updateGL()
//-----------------------------------------------------------------------------
// updateGeometry()
//-----------------------------------------------------------------------------
-static LLFastTimer::DeclareTimer FTM_UPDATE_AVATAR("Update Avatar");
+static LLTrace::BlockTimerStatHandle FTM_UPDATE_AVATAR("Update Avatar");
BOOL LLVOAvatar::updateGeometry(LLDrawable *drawable)
{
- LLFastTimer ftm(FTM_UPDATE_AVATAR);
+ LL_RECORD_BLOCK_TIME(FTM_UPDATE_AVATAR);
if (!(gPipeline.hasRenderType(LLPipeline::RENDER_TYPE_AVATAR)))
{
return TRUE;
@@ -5538,7 +5532,7 @@ BOOL LLVOAvatar::updateGeometry(LLDrawable *drawable)
if (!drawable)
{
- llerrs << "LLVOAvatar::updateGeometry() called with NULL drawable" << llendl;
+ LL_ERRS() << "LLVOAvatar::updateGeometry() called with NULL drawable" << LL_ENDL;
}
return TRUE;
@@ -5613,10 +5607,10 @@ void LLVOAvatar::addChild(LLViewerObject *childp)
{
if (!attachObject(childp))
{
- llwarns << "addChild() failed for "
+ LL_WARNS() << "addChild() failed for "
<< childp->getID()
<< " item " << childp->getAttachmentItemID()
- << llendl;
+ << LL_ENDL;
// MAINT-3312 backout
// mPendingAttachment.push_back(childp);
}
@@ -5632,7 +5626,7 @@ void LLVOAvatar::removeChild(LLViewerObject *childp)
LLViewerObject::removeChild(childp);
if (!detachObject(childp))
{
- llwarns << "Calling detach on non-attached object " << llendl;
+ LL_WARNS() << "Calling detach on non-attached object " << LL_ENDL;
}
}
@@ -5644,7 +5638,7 @@ LLViewerJointAttachment* LLVOAvatar::getTargetAttachmentPoint(LLViewerObject* vi
// correctly, but putting this check in here to be safe.
if (attachmentID & ATTACHMENT_ADD)
{
- llwarns << "Got an attachment with ATTACHMENT_ADD mask, removing ( attach pt:" << attachmentID << " )" << llendl;
+ LL_WARNS() << "Got an attachment with ATTACHMENT_ADD mask, removing ( attach pt:" << attachmentID << " )" << LL_ENDL;
attachmentID &= ~ATTACHMENT_ADD;
}
@@ -5652,26 +5646,26 @@ LLViewerJointAttachment* LLVOAvatar::getTargetAttachmentPoint(LLViewerObject* vi
if (!attachment)
{
- llwarns << "Object attachment point invalid: " << attachmentID
+ LL_WARNS() << "Object attachment point invalid: " << attachmentID
<< " trying to use 1 (chest)"
- << llendl;
+ << LL_ENDL;
attachment = get_if_there(mAttachmentPoints, 1, (LLViewerJointAttachment*)NULL); // Arbitrary using 1 (chest)
if (attachment)
{
- llwarns << "Object attachment point invalid: " << attachmentID
+ LL_WARNS() << "Object attachment point invalid: " << attachmentID
<< " on object " << viewer_object->getID()
<< " attachment item " << viewer_object->getAttachmentItemID()
<< " falling back to 1 (chest)"
- << llendl;
+ << LL_ENDL;
}
else
{
- llwarns << "Object attachment point invalid: " << attachmentID
+ LL_WARNS() << "Object attachment point invalid: " << attachmentID
<< " on object " << viewer_object->getID()
<< " attachment item " << viewer_object->getAttachmentItemID()
<< "Unable to use fallback attachment point 1 (chest)"
- << llendl;
+ << LL_ENDL;
}
}
@@ -5748,10 +5742,10 @@ void LLVOAvatar::lazyAttach()
{
if (!attachObject(cur_attachment))
{ // Drop it
- llwarns << "attachObject() failed for "
+ LL_WARNS() << "attachObject() failed for "
<< cur_attachment->getID()
<< " item " << cur_attachment->getAttachmentItemID()
- << llendl;
+ << LL_ENDL;
// MAINT-3312 backout
//still_pending.push_back(cur_attachment);
}
@@ -5834,7 +5828,7 @@ void LLVOAvatar::cleanupAttachedMesh( LLViewerObject* pVO )
}
}
}
-}
+ }
//-----------------------------------------------------------------------------
// detachObject()
@@ -5852,7 +5846,7 @@ BOOL LLVOAvatar::detachObject(LLViewerObject *viewer_object)
mVisualComplexityStale = TRUE;
cleanupAttachedMesh( viewer_object );
attachment->removeObject(viewer_object);
- lldebugs << "Detaching object " << viewer_object->mID << " from " << attachment->getName() << llendl;
+ LL_DEBUGS() << "Detaching object " << viewer_object->mID << " from " << attachment->getName() << LL_ENDL;
return TRUE;
}
}
@@ -6048,18 +6042,18 @@ BOOL LLVOAvatar::isWearingWearableType(LLWearableType::EType type) const
{
const LLAvatarAppearanceDictionary::TextureEntry *texture_dict = tex_iter->second;
if (texture_dict->mWearableType == type)
- {
+ {
// Thus, you must check to see if the corresponding baked texture is defined.
// NOTE: this is a poor substitute if you actually want to know about individual pieces of clothing
// this works for detecting a skirt (most important), but is ineffective at any piece of clothing that
// gets baked into a texture that always exists (upper or lower).
if (texture_dict->mIsUsedByBakedTexture)
- {
+ {
const EBakedTextureIndex baked_index = texture_dict->mBakedTextureIndex;
return isTextureDefined(LLAvatarAppearanceDictionary::getInstance()->getBakedTexture(baked_index)->mTextureIndex);
- }
+ }
return FALSE;
- }
+ }
}
return FALSE;
}
@@ -6124,7 +6118,7 @@ void LLVOAvatar::onGlobalColorChanged(const LLTexGlobalColor* global_color, BOOL
{
LLAvatarJointMesh* mesh = (*iter);
if (mesh)
- {
+ {
mesh->setColor( color );
}
}
@@ -6132,7 +6126,7 @@ void LLVOAvatar::onGlobalColorChanged(const LLTexGlobalColor* global_color, BOOL
}
else if (global_color == mTexEyeColor)
{
-// llinfos << "invalidateComposite cause: onGlobalColorChanged( eyecolor )" << llendl;
+// LL_INFOS() << "invalidateComposite cause: onGlobalColorChanged( eyecolor )" << LL_ENDL;
invalidateComposite( mBakedTextureDatas[BAKED_EYES].mTexLayerSet, upload_bake );
}
updateMeshTextures();
@@ -6192,9 +6186,9 @@ void LLVOAvatar::updateRezzedStatusTimers()
{
// load level has decreased. start phase timers for higher load levels.
for (S32 i = rez_status+1; i <= mLastRezzedStatus; i++)
- {
+ {
startPhase("load_" + LLVOAvatar::rezStatusToString(i));
- }
+ }
}
else if (rez_status > mLastRezzedStatus)
{
@@ -6203,16 +6197,16 @@ void LLVOAvatar::updateRezzedStatusTimers()
{
stopPhase("load_" + LLVOAvatar::rezStatusToString(i));
stopPhase("first_load_" + LLVOAvatar::rezStatusToString(i), false);
- }
+ }
if (rez_status == 3)
- {
+ {
// "fully loaded", mark any pending appearance change complete.
selfStopPhase("update_appearance_from_cof");
selfStopPhase("wear_inventory_category", false);
selfStopPhase("process_initial_wearables_update", false);
}
}
-
+
mLastRezzedStatus = rez_status;
}
}
@@ -6230,16 +6224,16 @@ void LLVOAvatar::startPhase(const std::string& phase_name)
{
if (!completed)
{
- LL_DEBUGS("Avatar") << avString() << "no-op, start when started already for " << phase_name << llendl;
+ LL_DEBUGS("Avatar") << avString() << "no-op, start when started already for " << phase_name << LL_ENDL;
return;
}
}
- LL_DEBUGS("Avatar") << "started phase " << phase_name << llendl;
+ LL_DEBUGS("Avatar") << "started phase " << phase_name << LL_ENDL;
getPhases().startPhase(phase_name);
}
void LLVOAvatar::stopPhase(const std::string& phase_name, bool err_check)
-{
+ {
F32 elapsed;
bool completed;
if (getPhases().getPhaseValues(phase_name, elapsed, completed))
@@ -6249,13 +6243,13 @@ void LLVOAvatar::stopPhase(const std::string& phase_name, bool err_check)
getPhases().stopPhase(phase_name);
completed = true;
logMetricsTimerRecord(phase_name, elapsed, completed);
- LL_DEBUGS("Avatar") << avString() << "stopped phase " << phase_name << " elapsed " << elapsed << llendl;
+ LL_DEBUGS("Avatar") << avString() << "stopped phase " << phase_name << " elapsed " << elapsed << LL_ENDL;
}
else
{
if (err_check)
{
- LL_DEBUGS("Avatar") << "no-op, stop when stopped already for " << phase_name << llendl;
+ LL_DEBUGS("Avatar") << "no-op, stop when stopped already for " << phase_name << LL_ENDL;
}
}
}
@@ -6263,7 +6257,7 @@ void LLVOAvatar::stopPhase(const std::string& phase_name, bool err_check)
{
if (err_check)
{
- LL_DEBUGS("Avatar") << "no-op, stop when not started for " << phase_name << llendl;
+ LL_DEBUGS("Avatar") << "no-op, stop when not started for " << phase_name << LL_ENDL;
}
}
}
@@ -6271,7 +6265,7 @@ void LLVOAvatar::stopPhase(const std::string& phase_name, bool err_check)
void LLVOAvatar::logPendingPhases()
{
if (!isAgentAvatarValid())
- {
+ {
return;
}
@@ -6287,14 +6281,14 @@ void LLVOAvatar::logPendingPhases()
if (!completed)
{
logMetricsTimerRecord(phase_name, elapsed, completed);
- }
+ }
}
}
-}
+ }
//static
void LLVOAvatar::logPendingPhasesAllAvatars()
-{
+ {
for (std::vector<LLCharacter*>::iterator iter = LLCharacter::sInstances.begin();
iter != LLCharacter::sInstances.end(); ++iter)
{
@@ -6305,14 +6299,14 @@ void LLVOAvatar::logPendingPhasesAllAvatars()
}
inst->logPendingPhases();
}
-}
+ }
void LLVOAvatar::logMetricsTimerRecord(const std::string& phase_name, F32 elapsed, bool completed)
-{
+ {
if (!isAgentAvatarValid())
- {
+ {
return;
- }
+ }
LLSD record;
record["timer_name"] = phase_name;
@@ -6321,15 +6315,15 @@ void LLVOAvatar::logMetricsTimerRecord(const std::string& phase_name, F32 elapse
record["completed"] = completed;
U32 grid_x(0), grid_y(0);
if (getRegion())
- {
+ {
record["central_bake_version"] = LLSD::Integer(getRegion()->getCentralBakeVersion());
grid_from_region_handle(getRegion()->getHandle(), &grid_x, &grid_y);
- }
+ }
record["grid_x"] = LLSD::Integer(grid_x);
record["grid_y"] = LLSD::Integer(grid_y);
record["is_using_server_bakes"] = ((bool) isUsingServerBakes());
record["is_self"] = isSelf();
-
+
if (isAgentAvatarValid())
{
gAgentAvatarp->addMetricsTimerRecord(record);
@@ -6537,28 +6531,28 @@ void LLVOAvatar::updateMeshTextures()
use_lkg_baked_layer[i],
last_id_string.c_str());
}
-
+
for (U32 i=0; i < mBakedTextureDatas.size(); i++)
{
debugColorizeSubMeshes(i, LLColor4::white);
LLViewerTexLayerSet* layerset = getTexLayerSet(i);
if (use_lkg_baked_layer[i] && !isUsingLocalAppearance() )
- {
+ {
LLViewerFetchedTexture* baked_img = LLViewerTextureManager::getFetchedTexture(mBakedTextureDatas[i].mLastTextureID);
mBakedTextureDatas[i].mIsUsed = TRUE;
debugColorizeSubMeshes(i,LLColor4::red);
-
+
avatar_joint_mesh_list_t::iterator iter = mBakedTextureDatas[i].mJointMeshes.begin();
avatar_joint_mesh_list_t::iterator end = mBakedTextureDatas[i].mJointMeshes.end();
for (; iter != end; ++iter)
- {
+ {
LLAvatarJointMesh* mesh = (*iter);
if (mesh)
- {
+ {
mesh->setTexture( baked_img );
- }
+ }
}
}
else if (!isUsingLocalAppearance() && is_layer_baked[i])
@@ -6602,7 +6596,7 @@ void LLVOAvatar::updateMeshTextures()
if (mesh)
{
mesh->setLayerSet( layerset );
- }
+ }
}
}
else
@@ -6624,7 +6618,7 @@ void LLVOAvatar::updateMeshTextures()
{
LLAvatarJointMesh* mesh = (*iter);
if (mesh)
- {
+ {
mesh->setColor( color );
mesh->setTexture( hair_img );
}
@@ -6714,19 +6708,19 @@ void LLVOAvatar::applyMorphMask(U8* tex_data, S32 width, S32 height, S32 num_com
{
if (index >= BAKED_NUM_INDICES)
{
- llwarns << "invalid baked texture index passed to applyMorphMask" << llendl;
+ LL_WARNS() << "invalid baked texture index passed to applyMorphMask" << LL_ENDL;
return;
}
for (morph_list_t::const_iterator iter = mBakedTextureDatas[index].mMaskedMorphs.begin();
iter != mBakedTextureDatas[index].mMaskedMorphs.end(); ++iter)
- {
+{
const LLMaskedMorph* maskedMorph = (*iter);
LLPolyMorphTarget* morph_target = dynamic_cast<LLPolyMorphTarget*>(maskedMorph->mMorphTarget);
if (morph_target)
- {
+ {
morph_target->applyMask(tex_data, width, height, num_components, maskedMorph->mInvert);
- }
+}
}
}
@@ -6883,7 +6877,7 @@ LLBBox LLVOAvatar::getHUDBBox() const
const LLViewerObject* attached_object = (*attachment_iter);
if (attached_object == NULL)
{
- llwarns << "HUD attached object is NULL!" << llendl;
+ LL_WARNS() << "HUD attached object is NULL!" << LL_ENDL;
continue;
}
// initialize bounding box to contain identity orientation and center point for attached object
@@ -6972,14 +6966,14 @@ bool LLVOAvatar::visualParamWeightsAreDefault()
// we have to not care whether skirt weights are default, if we're not actually wearing a skirt
(is_wearing_skirt || !is_skirt_param))
{
- //llinfos << "param '" << param->getName() << "'=" << param->getWeight() << " which differs from default=" << param->getDefaultWeight() << llendl;
+ //LL_INFOS() << "param '" << param->getName() << "'=" << param->getWeight() << " which differs from default=" << param->getDefaultWeight() << LL_ENDL;
rtn = false;
break;
}
}
}
- //llinfos << "params are default ? " << int(rtn) << llendl;
+ //LL_INFOS() << "params are default ? " << int(rtn) << LL_ENDL;
return rtn;
}
@@ -7009,8 +7003,8 @@ void dump_visual_param(apr_file_t* file, LLVisualParam* viewer_param, F32 value)
LLWearableType::getTypeName(LLWearableType::EType(wtype)).c_str()
// param_location_name(vparam->getParamLocation()).c_str()
);
-}
-
+ }
+
void LLVOAvatar::dumpAppearanceMsgParams( const std::string& dump_prefix,
const LLAppearanceMessageContents& contents)
@@ -7024,12 +7018,12 @@ void LLVOAvatar::dumpAppearanceMsgParams( const std::string& dump_prefix,
outfile.open(fullpath, LL_APR_WB );
apr_file_t* file = outfile.getFileHandle();
if (!file)
- {
- return;
- }
+ {
+ return;
+ }
else
{
- LL_DEBUGS("Avatar") << "dumping appearance message to " << fullpath << llendl;
+ LL_DEBUGS("Avatar") << "dumping appearance message to " << fullpath << LL_ENDL;
}
apr_file_printf(file, "<header>\n");
@@ -7060,7 +7054,7 @@ void LLVOAvatar::dumpAppearanceMsgParams( const std::string& dump_prefix,
apr_file_printf( file, "\t\t<texture te=\"%i\" uuid=\"%s\"/>\n", i, uuid_str.c_str());
}
apr_file_printf(file, "</textures>\n");
-}
+ }
void LLVOAvatar::parseAppearanceMessage(LLMessageSystem* mesgsys, LLAppearanceMessageContents& contents)
{
@@ -7072,12 +7066,12 @@ void LLVOAvatar::parseAppearanceMessage(LLMessageSystem* mesgsys, LLAppearanceMe
U8 av_u8;
mesgsys->getU8Fast(_PREHASH_AppearanceData, _PREHASH_AppearanceVersion, av_u8, 0);
contents.mAppearanceVersion = av_u8;
- LL_DEBUGS("Avatar") << "appversion set by AppearanceData field: " << contents.mAppearanceVersion << llendl;
+ LL_DEBUGS("Avatar") << "appversion set by AppearanceData field: " << contents.mAppearanceVersion << LL_ENDL;
mesgsys->getS32Fast(_PREHASH_AppearanceData, _PREHASH_CofVersion, contents.mCOFVersion, 0);
// For future use:
//mesgsys->getU32Fast(_PREHASH_AppearanceData, _PREHASH_Flags, appearance_flags, 0);
}
-
+
// Parse visual params, if any.
S32 num_blocks = mesgsys->getNumberOfBlocksFast(_PREHASH_VisualParam);
bool drop_visual_params_debug = gSavedSettings.getBOOL("BlockSomeAvatarAppearanceVisualParams") && (ll_rand(2) == 0); // pretend that ~12% of AvatarAppearance messages arrived without a VisualParam block, for testing
@@ -7089,7 +7083,7 @@ void LLVOAvatar::parseAppearanceMessage(LLMessageSystem* mesgsys, LLAppearanceMe
llassert(param); // if this ever fires, we should do the same as when num_blocks<=1
if (!param)
{
- llwarns << "No visual params!" << llendl;
+ LL_WARNS() << "No visual params!" << LL_ENDL;
}
else
{
@@ -7119,18 +7113,18 @@ void LLVOAvatar::parseAppearanceMessage(LLMessageSystem* mesgsys, LLAppearanceMe
const S32 expected_tweakable_count = getVisualParamCountInGroup(VISUAL_PARAM_GROUP_TWEAKABLE); // don't worry about VISUAL_PARAM_GROUP_TWEAKABLE_NO_TRANSMIT
if (num_blocks != expected_tweakable_count)
{
- LL_DEBUGS("Avatar") << "Number of params in AvatarAppearance msg (" << num_blocks << ") does not match number of tweakable params in avatar xml file (" << expected_tweakable_count << "). Processing what we can. object: " << getID() << llendl;
+ LL_DEBUGS("Avatar") << "Number of params in AvatarAppearance msg (" << num_blocks << ") does not match number of tweakable params in avatar xml file (" << expected_tweakable_count << "). Processing what we can. object: " << getID() << LL_ENDL;
}
}
else
{
if (drop_visual_params_debug)
{
- llinfos << "Debug-faked lack of parameters on AvatarAppearance for object: " << getID() << llendl;
+ LL_INFOS() << "Debug-faked lack of parameters on AvatarAppearance for object: " << getID() << LL_ENDL;
}
else
{
- LL_DEBUGS("Avatar") << "AvatarAppearance msg received without any parameters, object: " << getID() << llendl;
+ LL_DEBUGS("Avatar") << "AvatarAppearance msg received without any parameters, object: " << getID() << LL_ENDL;
}
}
@@ -7142,7 +7136,7 @@ void LLVOAvatar::parseAppearanceMessage(LLMessageSystem* mesgsys, LLAppearanceMe
{
S32 index = it - contents.mParams.begin();
contents.mParamAppearanceVersion = llround(contents.mParamWeights[index]);
- LL_DEBUGS("Avatar") << "appversion req by appearance_version param: " << contents.mParamAppearanceVersion << llendl;
+ LL_DEBUGS("Avatar") << "appversion req by appearance_version param: " << contents.mParamAppearanceVersion << LL_ENDL;
}
}
}
@@ -7155,8 +7149,8 @@ bool resolve_appearance_version(const LLAppearanceMessageContents& contents, S32
(contents.mParamAppearanceVersion >= 0) &&
(contents.mAppearanceVersion != contents.mParamAppearanceVersion))
{
- llwarns << "inconsistent appearance_version settings - field: " <<
- contents.mAppearanceVersion << ", param: " << contents.mParamAppearanceVersion << llendl;
+ LL_WARNS() << "inconsistent appearance_version settings - field: " <<
+ contents.mAppearanceVersion << ", param: " << contents.mParamAppearanceVersion << LL_ENDL;
return false;
}
if (contents.mParamAppearanceVersion >= 0) // use visual param if available.
@@ -7173,7 +7167,7 @@ bool resolve_appearance_version(const LLAppearanceMessageContents& contents, S32
}
LL_DEBUGS("Avatar") << "appearance version info - field " << contents.mAppearanceVersion
<< " param: " << contents.mParamAppearanceVersion
- << " final: " << appearance_version << llendl;
+ << " final: " << appearance_version << LL_ENDL;
return true;
}
@@ -7182,13 +7176,13 @@ bool resolve_appearance_version(const LLAppearanceMessageContents& contents, S32
//-----------------------------------------------------------------------------
void LLVOAvatar::processAvatarAppearance( LLMessageSystem* mesgsys )
{
- LL_DEBUGS("Avatar") << "starts" << llendl;
+ LL_DEBUGS("Avatar") << "starts" << LL_ENDL;
bool enable_verbose_dumps = gSavedSettings.getBOOL("DebugAvatarAppearanceMessage");
std::string dump_prefix = getFullname() + "_" + (isSelf()?"s":"o") + "_";
if (gSavedSettings.getBOOL("BlockAvatarAppearanceMessages"))
{
- llwarns << "Blocking AvatarAppearance message" << llendl;
+ LL_WARNS() << "Blocking AvatarAppearance message" << LL_ENDL;
return;
}
@@ -7204,7 +7198,7 @@ void LLVOAvatar::processAvatarAppearance( LLMessageSystem* mesgsys )
S32 appearance_version;
if (!resolve_appearance_version(contents, appearance_version))
{
- llwarns << "bad appearance version info, discarding" << llendl;
+ LL_WARNS() << "bad appearance version info, discarding" << LL_ENDL;
return;
}
S32 this_update_cof_version = contents.mCOFVersion;
@@ -7215,11 +7209,11 @@ void LLVOAvatar::processAvatarAppearance( LLMessageSystem* mesgsys )
{
LL_DEBUGS("Avatar") << "this_update_cof_version " << this_update_cof_version
<< " last_update_request_cof_version " << last_update_request_cof_version
- << " my_cof_version " << LLAppearanceMgr::instance().getCOFVersion() << llendl;
+ << " my_cof_version " << LLAppearanceMgr::instance().getCOFVersion() << LL_ENDL;
if (getRegion() && (getRegion()->getCentralBakeVersion()==0))
{
- llwarns << avString() << "Received AvatarAppearance message for self in non-server-bake region" << llendl;
+ LL_WARNS() << avString() << "Received AvatarAppearance message for self in non-server-bake region" << LL_ENDL;
}
if( mFirstTEMessageReceived && (appearance_version == 0))
{
@@ -7228,7 +7222,7 @@ void LLVOAvatar::processAvatarAppearance( LLMessageSystem* mesgsys )
}
else
{
- LL_DEBUGS("Avatar") << "appearance message received" << llendl;
+ LL_DEBUGS("Avatar") << "appearance message received" << LL_ENDL;
}
// Check for stale update.
@@ -7236,14 +7230,14 @@ void LLVOAvatar::processAvatarAppearance( LLMessageSystem* mesgsys )
&& (appearance_version>0)
&& (this_update_cof_version < last_update_request_cof_version))
{
- llwarns << "Stale appearance update, wanted version " << last_update_request_cof_version
- << ", got " << this_update_cof_version << llendl;
+ LL_WARNS() << "Stale appearance update, wanted version " << last_update_request_cof_version
+ << ", got " << this_update_cof_version << LL_ENDL;
return;
}
if (isSelf() && isEditingAppearance())
{
- LL_DEBUGS("Avatar") << "ignoring appearance message while in appearance edit" << llendl;
+ LL_DEBUGS("Avatar") << "ignoring appearance message while in appearance edit" << LL_ENDL;
return;
}
@@ -7254,7 +7248,7 @@ void LLVOAvatar::processAvatarAppearance( LLMessageSystem* mesgsys )
// appearance version, which may cause us to look for baked
// textures in the wrong place and flag them as missing
// assets.
- LL_DEBUGS("Avatar") << "ignoring appearance message due to lack of params" << llendl;
+ LL_DEBUGS("Avatar") << "ignoring appearance message due to lack of params" << LL_ENDL;
return;
}
@@ -7305,24 +7299,24 @@ void LLVOAvatar::processAvatarAppearance( LLMessageSystem* mesgsys )
LLVisualParam* param = contents.mParams[i];
F32 newWeight = contents.mParamWeights[i];
- if (is_first_appearance_message || (param->getWeight() != newWeight))
- {
- params_changed = TRUE;
- if(is_first_appearance_message)
- {
- param->setWeight(newWeight, FALSE);
- }
- else
+ if (is_first_appearance_message || (param->getWeight() != newWeight))
{
- interp_params = TRUE;
- param->setAnimationTarget(newWeight, FALSE);
+ params_changed = TRUE;
+ if(is_first_appearance_message)
+ {
+ param->setWeight(newWeight, FALSE);
+ }
+ else
+ {
+ interp_params = TRUE;
+ param->setAnimationTarget(newWeight, FALSE);
+ }
}
- }
}
const S32 expected_tweakable_count = getVisualParamCountInGroup(VISUAL_PARAM_GROUP_TWEAKABLE); // don't worry about VISUAL_PARAM_GROUP_TWEAKABLE_NO_TRANSMIT
if (num_params != expected_tweakable_count)
{
- LL_DEBUGS("Avatar") << "Number of params in AvatarAppearance msg (" << num_params << ") does not match number of tweakable params in avatar xml file (" << expected_tweakable_count << "). Processing what we can. object: " << getID() << llendl;
+ LL_DEBUGS("Avatar") << "Number of params in AvatarAppearance msg (" << num_params << ") does not match number of tweakable params in avatar xml file (" << expected_tweakable_count << "). Processing what we can. object: " << getID() << LL_ENDL;
}
if (params_changed)
@@ -7352,13 +7346,13 @@ void LLVOAvatar::processAvatarAppearance( LLMessageSystem* mesgsys )
if (visualParamWeightsAreDefault() && mRuthTimer.getElapsedTimeF32() > LOADING_TIMEOUT_SECONDS)
{
// re-request appearance, hoping that it comes back with a shape next time
- llinfos << "Re-requesting AvatarAppearance for object: " << getID() << llendl;
+ LL_INFOS() << "Re-requesting AvatarAppearance for object: " << getID() << LL_ENDL;
LLAvatarPropertiesProcessor::getInstance()->sendAvatarTexturesRequest(getID());
mRuthTimer.reset();
}
else
{
- llinfos << "That's okay, we already have a non-default shape for object: " << getID() << llendl;
+ LL_INFOS() << "That's okay, we already have a non-default shape for object: " << getID() << LL_ENDL;
// we don't really care.
}
}
@@ -7379,30 +7373,32 @@ void LLVOAvatar::processAvatarAppearance( LLMessageSystem* mesgsys )
}
// static
-void LLVOAvatar::getAnimLabels( LLDynamicArray<std::string>* labels )
+void LLVOAvatar::getAnimLabels( std::vector<std::string>* labels )
{
S32 i;
+ labels->reserve(gUserAnimStatesCount);
for( i = 0; i < gUserAnimStatesCount; i++ )
{
- labels->put( LLAnimStateLabels::getStateLabel( gUserAnimStates[i].mName ) );
+ labels->push_back( LLAnimStateLabels::getStateLabel( gUserAnimStates[i].mName ) );
}
// Special case to trigger away (AFK) state
- labels->put( "Away From Keyboard" );
+ labels->push_back( "Away From Keyboard" );
}
// static
-void LLVOAvatar::getAnimNames( LLDynamicArray<std::string>* names )
+void LLVOAvatar::getAnimNames( std::vector<std::string>* names )
{
S32 i;
+ names->reserve(gUserAnimStatesCount);
for( i = 0; i < gUserAnimStatesCount; i++ )
{
- names->put( std::string(gUserAnimStates[i].mName) );
+ names->push_back( std::string(gUserAnimStates[i].mName) );
}
// Special case to trigger away (AFK) state
- names->put( "enter_away_from_keyboard_state" );
+ names->push_back( "enter_away_from_keyboard_state" );
}
// static
@@ -7410,7 +7406,7 @@ void LLVOAvatar::onBakedTextureMasksLoaded( BOOL success, LLViewerFetchedTexture
{
if (!userdata) return;
- //llinfos << "onBakedTextureMasksLoaded: " << src_vi->getID() << llendl;
+ //LL_INFOS() << "onBakedTextureMasksLoaded: " << src_vi->getID() << LL_ENDL;
const LLUUID id = src_vi->getID();
LLTextureMaskData* maskData = (LLTextureMaskData*) userdata;
@@ -7424,7 +7420,7 @@ void LLVOAvatar::onBakedTextureMasksLoaded( BOOL success, LLViewerFetchedTexture
{
if (!aux_src->getData())
{
- llerrs << "No auxiliary source (morph mask) data for image id " << id << llendl;
+ LL_ERRS() << "No auxiliary source (morph mask) data for image id " << id << LL_ENDL;
return;
}
@@ -7445,7 +7441,7 @@ void LLVOAvatar::onBakedTextureMasksLoaded( BOOL success, LLViewerFetchedTexture
/* if( id == head_baked->getID() )
if (self->mBakedTextureDatas[BAKED_HEAD].mTexLayerSet)
- //llinfos << "onBakedTextureMasksLoaded for head " << id << " discard = " << discard_level << llendl;
+ //LL_INFOS() << "onBakedTextureMasksLoaded for head " << id << " discard = " << discard_level << LL_ENDL;
self->mBakedTextureDatas[BAKED_HEAD].mTexLayerSet->applyMorphMask(aux_src->getData(), aux_src->getWidth(), aux_src->getHeight(), 1);
maskData->mLastDiscardLevel = discard_level; */
BOOL found_texture_id = false;
@@ -7476,7 +7472,7 @@ void LLVOAvatar::onBakedTextureMasksLoaded( BOOL success, LLViewerFetchedTexture
}
if (!found_texture_id)
{
- llinfos << "unexpected image id: " << id << llendl;
+ LL_INFOS() << "unexpected image id: " << id << LL_ENDL;
}
self->dirtyMesh();
}
@@ -7484,7 +7480,7 @@ void LLVOAvatar::onBakedTextureMasksLoaded( BOOL success, LLViewerFetchedTexture
{
// this can happen when someone uses an old baked texture possibly provided by
// viewer-side baked texture caching
- llwarns << "Masks loaded callback but NO aux source, id " << id << llendl;
+ LL_WARNS() << "Masks loaded callback but NO aux source, id " << id << LL_ENDL;
}
}
@@ -7564,7 +7560,7 @@ void LLVOAvatar::useBakedTexture( const LLUUID& id )
if (isUsingLocalAppearance())
{
- llinfos << "not changing to baked texture while isUsingLocalAppearance" << llendl;
+ LL_INFOS() << "not changing to baked texture while isUsingLocalAppearance" << LL_ENDL;
}
else
{
@@ -7573,12 +7569,12 @@ void LLVOAvatar::useBakedTexture( const LLUUID& id )
avatar_joint_mesh_list_t::iterator iter = mBakedTextureDatas[i].mJointMeshes.begin();
avatar_joint_mesh_list_t::iterator end = mBakedTextureDatas[i].mJointMeshes.end();
for (; iter != end; ++iter)
- {
+ {
LLAvatarJointMesh* mesh = (*iter);
if (mesh)
- {
+ {
mesh->setTexture( image_baked );
- }
+ }
}
}
@@ -7602,7 +7598,7 @@ void LLVOAvatar::useBakedTexture( const LLUUID& id )
{
LLAvatarJointMesh* mesh = (*iter);
if (mesh)
- {
+ {
mesh->setColor( LLColor4::white );
}
}
@@ -7621,7 +7617,7 @@ std::string get_sequential_numbered_file_name(const std::string& prefix,
file_num_type::iterator it = file_nums.find(prefix);
S32 num = 0;
if (it != file_nums.end())
- {
+{
num = it->second;
}
file_nums[prefix] = num+1;
@@ -7638,7 +7634,7 @@ void LLVOAvatar::dumpArchetypeXML(const std::string& prefix, bool group_by_weara
outprefix = getFullname() + (isSelf()?"_s":"_o");
}
if (outprefix.empty())
- {
+{
outprefix = getFullname() + (isSelf()?"_s":"_o");
}
if (outprefix.empty())
@@ -7657,7 +7653,7 @@ void LLVOAvatar::dumpArchetypeXML(const std::string& prefix, bool group_by_weara
}
else
{
- llinfos << "xmlfile write handle obtained : " << fullpath << llendl;
+ LL_INFOS() << "xmlfile write handle obtained : " << fullpath << LL_ENDL;
}
apr_file_printf( file, "<?xml version=\"1.0\" encoding=\"US-ASCII\" standalone=\"yes\"?>\n" );
@@ -7667,36 +7663,36 @@ void LLVOAvatar::dumpArchetypeXML(const std::string& prefix, bool group_by_weara
if (group_by_wearables)
{
for (S32 type = LLWearableType::WT_SHAPE; type < LLWearableType::WT_COUNT; type++)
- {
- const std::string& wearable_name = LLWearableType::getTypeName((LLWearableType::EType)type);
- apr_file_printf( file, "\n\t\t<!-- wearable: %s -->\n", wearable_name.c_str() );
+ {
+ const std::string& wearable_name = LLWearableType::getTypeName((LLWearableType::EType)type);
+ apr_file_printf( file, "\n\t\t<!-- wearable: %s -->\n", wearable_name.c_str() );
for (LLVisualParam* param = getFirstVisualParam(); param; param = getNextVisualParam())
+ {
+ LLViewerVisualParam* viewer_param = (LLViewerVisualParam*)param;
+ if( (viewer_param->getWearableType() == type) &&
+ (viewer_param->isTweakable() ) )
{
- LLViewerVisualParam* viewer_param = (LLViewerVisualParam*)param;
- if( (viewer_param->getWearableType() == type) &&
- (viewer_param->isTweakable() ) )
- {
dump_visual_param(file, viewer_param, viewer_param->getWeight());
- }
}
+ }
- for (U8 te = 0; te < TEX_NUM_INDICES; te++)
- {
+ for (U8 te = 0; te < TEX_NUM_INDICES; te++)
+ {
if (LLAvatarAppearanceDictionary::getTEWearableType((ETextureIndex)te) == type)
- {
- // MULTIPLE_WEARABLES: extend to multiple wearables?
+ {
+ // MULTIPLE_WEARABLES: extend to multiple wearables?
LLViewerTexture* te_image = getImage((ETextureIndex)te, 0);
- if( te_image )
- {
- std::string uuid_str;
- te_image->getID().toString( uuid_str );
- apr_file_printf( file, "\t\t<texture te=\"%i\" uuid=\"%s\"/>\n", te, uuid_str.c_str());
- }
+ if( te_image )
+ {
+ std::string uuid_str;
+ te_image->getID().toString( uuid_str );
+ apr_file_printf( file, "\t\t<texture te=\"%i\" uuid=\"%s\"/>\n", te, uuid_str.c_str());
}
}
}
}
+ }
else
{
// Just dump all params sequentially.
@@ -7796,7 +7792,7 @@ void LLVOAvatar::cullAvatarsByPixelArea()
if (inst->mCulled != culled)
{
inst->mCulled = culled;
- lldebugs << "avatar " << inst->getID() << (culled ? " start culled" : " start not culled" ) << llendl;
+ LL_DEBUGS() << "avatar " << inst->getID() << (culled ? " start culled" : " start not culled" ) << LL_ENDL;
inst->updateMeshTextures();
}
@@ -7817,14 +7813,14 @@ void LLVOAvatar::cullAvatarsByPixelArea()
if (gFrameTimeSeconds != sUnbakedUpdateTime) // only update once per frame
{
sUnbakedUpdateTime = gFrameTimeSeconds;
- sUnbakedTime += gFrameIntervalSeconds;
+ sUnbakedTime += gFrameIntervalSeconds.value();
}
if (grey_avatars > 0)
{
if (gFrameTimeSeconds != sGreyUpdateTime) // only update once per frame
{
sGreyUpdateTime = gFrameTimeSeconds;
- sGreyTime += gFrameIntervalSeconds;
+ sGreyTime += gFrameIntervalSeconds.value();
}
}
}
@@ -7842,12 +7838,12 @@ void LLVOAvatar::startAppearanceAnimation()
// virtual
void LLVOAvatar::bodySizeChanged()
-{
+{
if (isSelf() && !LLAppearanceMgr::instance().isInUpdateAppearanceFromCOF())
{ // notify simulator of change in size
// but not if we are in the middle of updating appearance
gAgent.sendAgentSetAppearance();
- }
+}
}
BOOL LLVOAvatar::isUsingServerBakes() const
@@ -7859,25 +7855,25 @@ BOOL LLVOAvatar::isUsingServerBakes() const
F32 wt = appearance_version_param->getWeight();
F32 expect_wt = mUseServerBakes ? 1.0 : 0.0;
if (!is_approx_equal(wt,expect_wt))
- {
- llwarns << "wt " << wt << " differs from expected " << expect_wt << llendl;
+{
+ LL_WARNS() << "wt " << wt << " differs from expected " << expect_wt << LL_ENDL;
}
#endif
return mUseServerBakes;
-}
-
+ }
+
void LLVOAvatar::setIsUsingServerBakes(BOOL newval)
-{
+ {
mUseServerBakes = newval;
LLVisualParam* appearance_version_param = getVisualParam(11000);
llassert(appearance_version_param);
appearance_version_param->setWeight(newval ? 1.0 : 0.0, false);
-}
+ }
// virtual
void LLVOAvatar::removeMissingBakedTextures()
-{
+ {
}
//virtual
@@ -8148,7 +8144,7 @@ void LLVOAvatar::calculateUpdateRenderCost()
if (all_textures.find(image_id) == all_textures.end())
{
// attachment texture not previously seen.
- llinfos << "attachment_texture: " << image_id.asString() << llendl;
+ LL_INFOS() << "attachment_texture: " << image_id.asString() << LL_ENDL;
all_textures.insert(image_id);
}
}
@@ -8168,7 +8164,7 @@ void LLVOAvatar::calculateUpdateRenderCost()
continue;
if (all_textures.find(image_id) == all_textures.end())
{
- llinfos << "local_texture: " << texture_dict->mName << ": " << image_id << llendl;
+ LL_INFOS() << "local_texture: " << texture_dict->mName << ": " << image_id << LL_ENDL;
all_textures.insert(image_id);
}
}
@@ -8200,10 +8196,10 @@ LLColor4 LLVOAvatar::calcMutedAVColor(F32 value, S32 range_low, S32 range_high)
new_color.normalize();
new_color *= 0.7f; // Tone it down a bit
- //llinfos << "From value " << std::setprecision(3) << value << " returning color " << new_color
+ //LL_INFOS() << "From value " << std::setprecision(3) << value << " returning color " << new_color
// << " using indexes " << spectrum_index_1 << ", " << spectrum_index_2
// << " and fractBetween " << fractBetween
- // << llendl;
+ // << LL_ENDL;
return new_color;
}
@@ -8272,7 +8268,7 @@ BOOL LLVOAvatar::isTextureDefined(LLAvatarAppearanceDefines::ETextureIndex te, U
if( !getImage( te, index ) )
{
- llwarns << "getImage( " << te << ", " << index << " ) returned 0" << llendl;
+ LL_WARNS() << "getImage( " << te << ", " << index << " ) returned 0" << LL_ENDL;
return FALSE;
}
diff --git a/indra/newview/llvoavatar.h b/indra/newview/llvoavatar.h
index cd8a5ecdf2..9d0391b42c 100755
--- a/indra/newview/llvoavatar.h
+++ b/indra/newview/llvoavatar.h
@@ -33,9 +33,8 @@
#include <string>
#include <vector>
-#include <boost/signals2.hpp>
+#include <boost/signals2/trackable.hpp>
-#include "imageids.h" // IMG_INVISIBLE
#include "llavatarappearance.h"
#include "llchat.h"
#include "lldrawpoolalpha.h"
@@ -74,6 +73,7 @@ struct LLVOAvatarChildJoint;
//class LLViewerJoint;
struct LLAppearanceMessageContents;
struct LLVOAvatarSkeletonInfo;
+class LLViewerJointMesh;
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// LLVOAvatar
@@ -97,12 +97,12 @@ public:
public:
void* operator new(size_t size)
{
- return ll_aligned_malloc_16(size);
+ return LLTrace::MemTrackable<LLViewerObject>::aligned_new<16>(size);
}
- void operator delete(void* ptr)
+ void operator delete(void* ptr, size_t size)
{
- ll_aligned_free_16(ptr);
+ LLTrace::MemTrackable<LLViewerObject>::aligned_delete<16>(ptr, size);
}
LLVOAvatar(const LLUUID &id, const LLPCode pcode, LLViewerRegion *regionp);
@@ -129,28 +129,28 @@ public:
/*virtual*/ void updateGL();
/*virtual*/ LLVOAvatar* asAvatar();
virtual U32 processUpdateMessage(LLMessageSystem *mesgsys,
- void **user_data,
- U32 block_num,
- const EObjectUpdateType update_type,
- LLDataPacker *dp);
+ void **user_data,
+ U32 block_num,
+ const EObjectUpdateType update_type,
+ LLDataPacker *dp);
virtual void idleUpdate(LLAgent &agent, const F64 &time);
/*virtual*/ BOOL updateLOD();
BOOL updateJointLODs();
void updateLODRiggedAttachments( void );
/*virtual*/ BOOL isActive() const; // Whether this object needs to do an idleUpdate.
- S32 totalTextureMemForUUIDS(std::set<LLUUID>& ids);
- bool allTexturesCompletelyDownloaded(std::set<LLUUID>& ids) const;
- bool allLocalTexturesCompletelyDownloaded() const;
- bool allBakedTexturesCompletelyDownloaded() const;
- void bakedTextureOriginCounts(S32 &sb_count, S32 &host_count,
- S32 &both_count, S32 &neither_count);
- std::string bakedTextureOriginInfo();
- void collectLocalTextureUUIDs(std::set<LLUUID>& ids) const;
- void collectBakedTextureUUIDs(std::set<LLUUID>& ids) const;
- void collectTextureUUIDs(std::set<LLUUID>& ids);
- void releaseOldTextures();
+ S32Bytes totalTextureMemForUUIDS(std::set<LLUUID>& ids);
+ bool allTexturesCompletelyDownloaded(std::set<LLUUID>& ids) const;
+ bool allLocalTexturesCompletelyDownloaded() const;
+ bool allBakedTexturesCompletelyDownloaded() const;
+ void bakedTextureOriginCounts(S32 &sb_count, S32 &host_count,
+ S32 &both_count, S32 &neither_count);
+ std::string bakedTextureOriginInfo();
+ void collectLocalTextureUUIDs(std::set<LLUUID>& ids) const;
+ void collectBakedTextureUUIDs(std::set<LLUUID>& ids) const;
+ void collectTextureUUIDs(std::set<LLUUID>& ids);
+ void releaseOldTextures();
/*virtual*/ void updateTextures();
- LLViewerFetchedTexture* getBakedTextureImage(const U8 te, const LLUUID& uuid);
+ LLViewerFetchedTexture* getBakedTextureImage(const U8 te, const LLUUID& uuid);
/*virtual*/ S32 setTETexture(const U8 te, const LLUUID& uuid); // If setting a baked texture, need to request it from a non-local sim.
/*virtual*/ void onShift(const LLVector4a& shift_vector);
/*virtual*/ U32 getPartitionType() const;
@@ -402,7 +402,7 @@ public:
VisualMuteSettings getVisualMuteSettings() { return mVisuallyMuteSetting; };
U32 renderRigid();
- U32 renderSkinned(EAvatarRenderPass pass);
+ U32 renderSkinned();
F32 getLastSkinTime() { return mLastSkinTime; }
U32 renderTransparent(BOOL first_pass);
void renderCollisionVolumes();
@@ -892,8 +892,8 @@ public:
std::string getFullname() const; // Returns "FirstName LastName"
std::string avString() const; // Frequently used string in log messages "Avatar '<full name'"
protected:
- static void getAnimLabels(LLDynamicArray<std::string>* labels);
- static void getAnimNames(LLDynamicArray<std::string>* names);
+ static void getAnimLabels(std::vector<std::string>* labels);
+ static void getAnimNames(std::vector<std::string>* names);
private:
bool mNameIsSet;
std::string mTitle;
diff --git a/indra/newview/llvoavatarself.cpp b/indra/newview/llvoavatarself.cpp
index 082a85e217..319da1abb5 100755
--- 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
@@ -141,9 +142,8 @@ struct LocalTextureData
//-----------------------------------------------------------------------------
// Static Data
//-----------------------------------------------------------------------------
-S32 LLVOAvatarSelf::sScratchTexBytes = 0;
-LLMap< LLGLenum, LLGLuint*> LLVOAvatarSelf::sScratchTexNames;
-LLMap< LLGLenum, F32*> LLVOAvatarSelf::sScratchTexLastBindTime;
+S32Bytes LLVOAvatarSelf::sScratchTexBytes(0);
+std::map< LLGLenum, LLGLuint*> LLVOAvatarSelf::sScratchTexNames;
/*********************************************************************************
@@ -165,7 +165,7 @@ LLVOAvatarSelf::LLVOAvatarSelf(const LLUUID& id,
mMotionController.mIsSelf = TRUE;
- lldebugs << "Marking avatar as self " << id << llendl;
+ LL_DEBUGS() << "Marking avatar as self " << id << LL_ENDL;
}
// Called periodically for diagnostics, return true when done.
@@ -206,7 +206,7 @@ void LLVOAvatarSelf::initInstance()
// adds attachment points to mScreen among other things
LLVOAvatar::initInstance();
- llinfos << "Self avatar object created. Starting timer." << llendl;
+ LL_INFOS() << "Self avatar object created. Starting timer." << LL_ENDL;
mDebugSelfLoadTimer.reset();
// clear all times to -1 for debugging
for (U32 i =0; i < LLAvatarAppearanceDefines::TEX_NUM_INDICES; ++i)
@@ -227,7 +227,7 @@ void LLVOAvatarSelf::initInstance()
status &= buildMenus();
if (!status)
{
- llerrs << "Unable to load user's avatar" << llendl;
+ LL_ERRS() << "Unable to load user's avatar" << LL_ENDL;
return;
}
@@ -271,7 +271,7 @@ BOOL LLVOAvatarSelf::loadAvatarSelf()
// avatar_skeleton.xml
if (!buildSkeletonSelf(sAvatarSkeletonInfo))
{
- llwarns << "avatar file: buildSkeleton() failed" << llendl;
+ LL_WARNS() << "avatar file: buildSkeleton() failed" << LL_ENDL;
return FALSE;
}
@@ -602,7 +602,7 @@ LLVOAvatarSelf::~LLVOAvatarSelf()
** **
*********************************************************************************/
-//virtual
+// virtual
BOOL LLVOAvatarSelf::updateCharacter(LLAgent &agent)
{
// update screen joint size
@@ -789,7 +789,10 @@ U32 LLVOAvatarSelf::processUpdateMessage(LLMessageSystem *mesgsys,
updateMeshTextures();
// unpack the texture UUIDs to the texture slots
+ if(mesgsys != NULL)
+ {
retval = unpackTEMessage(mesgsys, _PREHASH_ObjectData, (S32) block_num);
+ }
// need to trigger a few operations to get the avatar to use the new bakes
for (U32 i = 0; i < mBakedTextureDatas.size(); i++)
@@ -886,9 +889,9 @@ void LLVOAvatarSelf::updateRegion(LLViewerRegion *regionp)
// Diagnostic info
//LLVector3d pos_from_new_region = getPositionGlobal();
- //llinfos << "pos_from_old_region is " << global_pos_from_old_region
+ //LL_INFOS() << "pos_from_old_region is " << global_pos_from_old_region
// << " while pos_from_new_region is " << pos_from_new_region
- // << llendl;
+ // << LL_ENDL;
}
if (!regionp || (regionp->getHandle() != mLastRegionHandle))
@@ -896,17 +899,11 @@ void LLVOAvatarSelf::updateRegion(LLViewerRegion *regionp)
if (mLastRegionHandle != 0)
{
++mRegionCrossingCount;
- F64 delta = (F64)mRegionCrossingTimer.getElapsedTimeF32();
- F64 avg = (mRegionCrossingCount == 1) ? 0 : LLViewerStats::getInstance()->getStat(LLViewerStats::ST_CROSSING_AVG);
- F64 delta_avg = (delta + avg*(mRegionCrossingCount-1)) / mRegionCrossingCount;
- LLViewerStats::getInstance()->setStat(LLViewerStats::ST_CROSSING_AVG, delta_avg);
-
- F64 max = (mRegionCrossingCount == 1) ? 0 : LLViewerStats::getInstance()->getStat(LLViewerStats::ST_CROSSING_MAX);
- max = llmax(delta, max);
- LLViewerStats::getInstance()->setStat(LLViewerStats::ST_CROSSING_MAX, max);
+ F64Seconds delta(mRegionCrossingTimer.getElapsedTimeF32());
+ record(LLStatViewer::REGION_CROSSING_TIME, delta);
// Diagnostics
- llinfos << "Region crossing took " << (F32)(delta * 1000.0) << " ms " << llendl;
+ LL_INFOS() << "Region crossing took " << (F32)(delta * 1000.0).value() << " ms " << LL_ENDL;
}
if (regionp)
{
@@ -990,7 +987,7 @@ void LLVOAvatarSelf::idleUpdateTractorBeam()
// virtual
void LLVOAvatarSelf::restoreMeshData()
{
- //llinfos << "Restoring" << llendl;
+ //LL_INFOS() << "Restoring" << LL_ENDL;
mMeshValid = TRUE;
updateJointLODs();
updateAttachmentVisibility(gAgentCamera.getCameraMode());
@@ -1230,7 +1227,7 @@ BOOL LLVOAvatarSelf::detachObject(LLViewerObject *viewer_object)
// Update COF contents, don't trigger appearance update.
if (!isValid())
{
- llinfos << "removeItemLinks skipped, avatar is under destruction" << llendl;
+ LL_INFOS() << "removeItemLinks skipped, avatar is under destruction" << LL_ENDL;
}
else
{
@@ -1604,7 +1601,7 @@ void LLVOAvatarSelf::invalidateComposite( LLTexLayerSet* layerset, BOOL upload_r
{
return;
}
- // llinfos << "LLVOAvatar::invalidComposite() " << layerset->getBodyRegionName() << llendl;
+ // LL_INFOS() << "LLVOAvatar::invalidComposite() " << layerset->getBodyRegionName() << LL_ENDL;
layer_set->requestUpdate();
layer_set->invalidateMorphMasks();
@@ -1757,7 +1754,7 @@ void LLVOAvatarSelf::setLocalTexture(ETextureIndex type, LLViewerTexture* src_te
{
if (type >= TEX_NUM_INDICES)
{
- llerrs << "Tried to set local texture with invalid type: (" << (U32) type << ", " << index << ")" << llendl;
+ LL_ERRS() << "Tried to set local texture with invalid type: (" << (U32) type << ", " << index << ")" << LL_ENDL;
return;
}
LLWearableType::EType wearable_type = LLAvatarAppearanceDictionary::getInstance()->getTEWearableType(type);
@@ -1770,7 +1767,7 @@ void LLVOAvatarSelf::setLocalTexture(ETextureIndex type, LLViewerTexture* src_te
local_tex_obj = getLocalTextureObject(type,index);
if (!local_tex_obj)
{
- llerrs << "Unable to create LocalTextureObject for wearable type & index: (" << (U32) wearable_type << ", " << index << ")" << llendl;
+ LL_ERRS() << "Unable to create LocalTextureObject for wearable type & index: (" << (U32) wearable_type << ", " << index << ")" << LL_ENDL;
return;
}
@@ -1832,7 +1829,7 @@ void LLVOAvatarSelf::setBakedReady(LLAvatarAppearanceDefines::ETextureIndex type
// virtual
void LLVOAvatarSelf::dumpLocalTextures() const
{
- llinfos << "Local Textures:" << llendl;
+ LL_INFOS() << "Local Textures:" << LL_ENDL;
/* ETextureIndex baked_equiv[] = {
TEX_UPPER_BAKED,
@@ -1856,22 +1853,22 @@ void LLVOAvatarSelf::dumpLocalTextures() const
#if LL_RELEASE_FOR_DOWNLOAD
// End users don't get to trivially see avatar texture IDs, makes textures
// easier to steal. JC
- llinfos << "LocTex " << name << ": Baked " << llendl;
+ LL_INFOS() << "LocTex " << name << ": Baked " << LL_ENDL;
#else
- llinfos << "LocTex " << name << ": Baked " << getTEImage(baked_equiv)->getID() << llendl;
+ LL_INFOS() << "LocTex " << name << ": Baked " << getTEImage(baked_equiv)->getID() << LL_ENDL;
#endif
}
else if (local_tex_obj && local_tex_obj->getImage() != NULL)
{
if (local_tex_obj->getImage()->getID() == IMG_DEFAULT_AVATAR)
{
- llinfos << "LocTex " << name << ": None" << llendl;
+ LL_INFOS() << "LocTex " << name << ": None" << LL_ENDL;
}
else
{
const LLViewerFetchedTexture* image = dynamic_cast<LLViewerFetchedTexture*>( local_tex_obj->getImage() );
- llinfos << "LocTex " << name << ": "
+ LL_INFOS() << "LocTex " << name << ": "
<< "Discard " << image->getDiscardLevel() << ", "
<< "(" << image->getWidth() << ", " << image->getHeight() << ") "
#if !LL_RELEASE_FOR_DOWNLOAD
@@ -1880,12 +1877,12 @@ void LLVOAvatarSelf::dumpLocalTextures() const
<< image->getID() << " "
#endif
<< "Priority: " << image->getDecodePriority()
- << llendl;
+ << LL_ENDL;
}
}
else
{
- llinfos << "LocTex " << name << ": No LLViewerTexture" << llendl;
+ LL_INFOS() << "LocTex " << name << ": No LLViewerTexture" << LL_ENDL;
}
}
}
@@ -1941,7 +1938,7 @@ void LLVOAvatarSelf::dumpTotalLocalTextureByteCount()
{
S32 gl_bytes = 0;
gAgentAvatarp->getLocalTextureByteCount(&gl_bytes);
- llinfos << "Total Avatar LocTex GL:" << (gl_bytes/1024) << "KB" << llendl;
+ LL_INFOS() << "Total Avatar LocTex GL:" << (gl_bytes/1024) << "KB" << LL_ENDL;
}
BOOL LLVOAvatarSelf::getIsCloud() const
@@ -1965,12 +1962,12 @@ BOOL LLVOAvatarSelf::getIsCloud() const
{
if (do_warn)
{
- llinfos << "Self is clouded due to missing one or more required body parts: "
+ LL_INFOS() << "Self is clouded due to missing one or more required body parts: "
<< (shape_count ? "" : "SHAPE ")
<< (hair_count ? "" : "HAIR ")
<< (eye_count ? "" : "EYES ")
<< (skin_count ? "" : "SKIN ")
- << llendl;
+ << LL_ENDL;
}
return TRUE;
}
@@ -1979,7 +1976,7 @@ BOOL LLVOAvatarSelf::getIsCloud() const
{
if (do_warn)
{
- llinfos << "Self is clouded because of no hair texture" << llendl;
+ LL_INFOS() << "Self is clouded because of no hair texture" << LL_ENDL;
}
return TRUE;
}
@@ -1991,7 +1988,7 @@ BOOL LLVOAvatarSelf::getIsCloud() const
{
if (do_warn)
{
- llinfos << "Self is clouded because lower textures not baked" << llendl;
+ LL_INFOS() << "Self is clouded because lower textures not baked" << LL_ENDL;
}
return TRUE;
}
@@ -2001,7 +1998,7 @@ BOOL LLVOAvatarSelf::getIsCloud() const
{
if (do_warn)
{
- llinfos << "Self is clouded because upper textures not baked" << llendl;
+ LL_INFOS() << "Self is clouded because upper textures not baked" << LL_ENDL;
}
return TRUE;
}
@@ -2021,14 +2018,14 @@ BOOL LLVOAvatarSelf::getIsCloud() const
{
if (do_warn)
{
- llinfos << "Self is clouded because texture at index " << i
- << " (texture index is " << texture_data.mTextureIndex << ") is not loaded" << llendl;
+ LL_INFOS() << "Self is clouded because texture at index " << i
+ << " (texture index is " << texture_data.mTextureIndex << ") is not loaded" << LL_ENDL;
}
return TRUE;
}
}
- lldebugs << "Avatar de-clouded" << llendl;
+ LL_DEBUGS() << "Avatar de-clouded" << LL_ENDL;
}
return FALSE;
}
@@ -2149,7 +2146,7 @@ void LLVOAvatarSelf::dumpAllTextures() const
if (!layerset_buffer) continue;
vd_text += verboseDebugDumpLocalTextureDataInfo(layerset);
}
- LL_DEBUGS("Avatar") << vd_text << llendl;
+ LL_DEBUGS("Avatar") << vd_text << LL_ENDL;
}
const std::string LLVOAvatarSelf::debugDumpLocalTextureDataInfo(const LLViewerTexLayerSet* layerset) const
@@ -2233,7 +2230,7 @@ LLSD LLVOAvatarSelf::metricsData()
result["timers"]["ruth"] = mRuthTimer.getElapsedTimeF32();
result["timers"]["invisible"] = mInvisibleTimer.getElapsedTimeF32();
result["timers"]["fully_loaded"] = mFullyLoadedTimer.getElapsedTimeF32();
- result["startup"] = LLStartUp::getPhases().dumpPhases();
+ result["startup"] = LLStartUp::getPhases().asLLSD();
return result;
}
@@ -2351,7 +2348,7 @@ LLSD summarize_by_buckets(std::vector<LLSD> in_records,
accum_it != accum.end(); ++accum_it)
{
LLSD out_record = accum_it->first;
- out_record["stats"] = accum_it->second.getData();
+ out_record["stats"] = accum_it->second.asLLSD();
result.append(out_record);
}
return result;
@@ -2436,7 +2433,7 @@ public:
/* virtual */ void result(const LLSD& content)
{
- LL_DEBUGS("Avatar") << "status OK" << llendl;
+ LL_DEBUGS("Avatar") << "status OK" << LL_ENDL;
}
// Error
@@ -2445,7 +2442,7 @@ public:
if (isAgentAvatarValid())
{
LL_DEBUGS("Avatar") << "failed, will rebake [status:"
- << status << "]: " << content << llendl;
+ << status << "]: " << content << LL_ENDL;
forceAppearanceUpdate();
}
}
@@ -2504,7 +2501,7 @@ BOOL LLVOAvatarSelf::canGrabBakedTexture(EBakedTextureIndex baked_index) const
// Check if the texture hasn't been baked yet.
if (!isTextureDefined(tex_index, 0))
{
- lldebugs << "getTEImage( " << (U32) tex_index << " )->getID() == IMG_DEFAULT_AVATAR" << llendl;
+ LL_DEBUGS() << "getTEImage( " << (U32) tex_index << " )->getID() == IMG_DEFAULT_AVATAR" << LL_ENDL;
return FALSE;
}
@@ -2523,7 +2520,7 @@ BOOL LLVOAvatarSelf::canGrabBakedTexture(EBakedTextureIndex baked_index) const
const ETextureIndex t_index = (*iter);
LLWearableType::EType wearable_type = LLAvatarAppearanceDictionary::getTEWearableType(t_index);
U32 count = gAgentWearables.getWearableCount(wearable_type);
- lldebugs << "Checking index " << (U32) t_index << " count: " << count << llendl;
+ LL_DEBUGS() << "Checking index " << (U32) t_index << " count: " << count << LL_ENDL;
for (U32 wearable_index = 0; wearable_index < count; ++wearable_index)
{
@@ -2545,11 +2542,11 @@ BOOL LLVOAvatarSelf::canGrabBakedTexture(EBakedTextureIndex baked_index) const
asset_id_matches);
BOOL can_grab = FALSE;
- lldebugs << "item count for asset " << texture_id << ": " << items.count() << llendl;
- if (items.count())
+ LL_DEBUGS() << "item count for asset " << texture_id << ": " << items.size() << LL_ENDL;
+ if (items.size())
{
// search for full permissions version
- for (S32 i = 0; i < items.count(); i++)
+ for (S32 i = 0; i < items.size(); i++)
{
LLViewerInventoryItem* itemp = items[i];
if (itemp->getIsFullPerm())
@@ -2660,16 +2657,16 @@ void LLVOAvatarSelf::setNewBakedTexture( ETextureIndex te, const LLUUID& uuid )
/* switch(te)
case TEX_HEAD_BAKED:
- llinfos << "New baked texture: HEAD" << llendl; */
+ LL_INFOS() << "New baked texture: HEAD" << LL_ENDL; */
const LLAvatarAppearanceDictionary::TextureEntry *texture_dict = LLAvatarAppearanceDictionary::getInstance()->getTexture(te);
if (texture_dict->mIsBakedTexture)
{
debugBakedTextureUpload(texture_dict->mBakedTextureIndex, TRUE); // FALSE for start of upload, TRUE for finish.
- llinfos << "New baked texture: " << texture_dict->mName << " UUID: " << uuid <<llendl;
+ LL_INFOS() << "New baked texture: " << texture_dict->mName << " UUID: " << uuid <<LL_ENDL;
}
else
{
- llwarns << "New baked texture: unknown te " << te << llendl;
+ LL_WARNS() << "New baked texture: unknown te " << te << LL_ENDL;
}
// dumpAvatarTEs( "setNewBakedTexture() send" );
@@ -2692,7 +2689,7 @@ void LLVOAvatarSelf::setNewBakedTexture( ETextureIndex te, const LLUUID& uuid )
<< "RuthTimer " << (U32)mRuthDebugTimer.getElapsedTimeF32()
<< " SelfLoadTimer " << (U32)mDebugSelfLoadTimer.getElapsedTimeF32()
<< " Notification " << "AvatarRezSelfBakedDoneNotification"
- << llendl;
+ << LL_ENDL;
}
else
{
@@ -2704,7 +2701,7 @@ void LLVOAvatarSelf::setNewBakedTexture( ETextureIndex te, const LLUUID& uuid )
<< "RuthTimer " << (U32)mRuthDebugTimer.getElapsedTimeF32()
<< " SelfLoadTimer " << (U32)mDebugSelfLoadTimer.getElapsedTimeF32()
<< " Notification " << "AvatarRezSelfBakedUpdateNotification"
- << llendl;
+ << LL_ENDL;
}
}
@@ -2721,11 +2718,11 @@ void LLVOAvatarSelf::outputRezDiagnostics() const
}
const F32 final_time = mDebugSelfLoadTimer.getElapsedTimeF32();
- LL_DEBUGS("Avatar") << "REZTIME: Myself rez stats:" << llendl;
- LL_DEBUGS("Avatar") << "\t Time from avatar creation to load wearables: " << (S32)mDebugTimeWearablesLoaded << llendl;
- LL_DEBUGS("Avatar") << "\t Time from avatar creation to de-cloud: " << (S32)mDebugTimeAvatarVisible << llendl;
- LL_DEBUGS("Avatar") << "\t Time from avatar creation to de-cloud for others: " << (S32)final_time << llendl;
- LL_DEBUGS("Avatar") << "\t Load time for each texture: " << llendl;
+ LL_DEBUGS("Avatar") << "REZTIME: Myself rez stats:" << LL_ENDL;
+ LL_DEBUGS("Avatar") << "\t Time from avatar creation to load wearables: " << (S32)mDebugTimeWearablesLoaded << LL_ENDL;
+ LL_DEBUGS("Avatar") << "\t Time from avatar creation to de-cloud: " << (S32)mDebugTimeAvatarVisible << LL_ENDL;
+ LL_DEBUGS("Avatar") << "\t Time from avatar creation to de-cloud for others: " << (S32)final_time << LL_ENDL;
+ LL_DEBUGS("Avatar") << "\t Load time for each texture: " << LL_ENDL;
for (U32 i = 0; i < LLAvatarAppearanceDefines::TEX_NUM_INDICES; ++i)
{
std::stringstream out;
@@ -2753,10 +2750,10 @@ void LLVOAvatarSelf::outputRezDiagnostics() const
LL_DEBUGS("Avatar") << out.str() << LL_ENDL;
}
}
- LL_DEBUGS("Avatar") << "\t Time points for each upload (start / finish)" << llendl;
+ LL_DEBUGS("Avatar") << "\t Time points for each upload (start / finish)" << LL_ENDL;
for (U32 i = 0; i < LLAvatarAppearanceDefines::BAKED_NUM_INDICES; ++i)
{
- LL_DEBUGS("Avatar") << "\t\t (" << i << ") \t" << (S32)mDebugBakedTextureTimes[i][0] << " / " << (S32)mDebugBakedTextureTimes[i][1] << llendl;
+ LL_DEBUGS("Avatar") << "\t\t (" << i << ") \t" << (S32)mDebugBakedTextureTimes[i][0] << " / " << (S32)mDebugBakedTextureTimes[i][1] << LL_ENDL;
}
for (LLAvatarAppearanceDefines::LLAvatarAppearanceDictionary::BakedTextures::const_iterator baked_iter = LLAvatarAppearanceDefines::LLAvatarAppearanceDictionary::getInstance()->getBakedTextures().begin();
@@ -2768,7 +2765,7 @@ void LLVOAvatarSelf::outputRezDiagnostics() const
if (!layerset) continue;
const LLViewerTexLayerSetBuffer *layerset_buffer = layerset->getViewerComposite();
if (!layerset_buffer) continue;
- LL_DEBUGS("Avatar") << layerset_buffer->dumpTextureInfo() << llendl;
+ LL_DEBUGS("Avatar") << layerset_buffer->dumpTextureInfo() << LL_ENDL;
}
dumpAllTextures();
@@ -2808,11 +2805,11 @@ void LLVOAvatarSelf::setCachedBakedTexture( ETextureIndex te, const LLUUID& uuid
{
if (mInitialBakeIDs[i] == uuid)
{
- llinfos << "baked texture correctly loaded at login! " << i << llendl;
+ LL_INFOS() << "baked texture correctly loaded at login! " << i << LL_ENDL;
}
else
{
- llwarns << "baked texture does not match id loaded at login!" << i << llendl;
+ LL_WARNS() << "baked texture does not match id loaded at login!" << i << LL_ENDL;
}
mInitialBakeIDs[i] = LLUUID::null;
}
@@ -2848,10 +2845,10 @@ void LLVOAvatarSelf::processRebakeAvatarTextures(LLMessageSystem* msg, void**)
LLViewerTexLayerSet* layer_set = gAgentAvatarp->getLayerSet(index);
if (layer_set)
{
- llinfos << "TAT: rebake - matched entry " << (S32)index << llendl;
+ LL_INFOS() << "TAT: rebake - matched entry " << (S32)index << LL_ENDL;
gAgentAvatarp->invalidateComposite(layer_set, TRUE);
found = TRUE;
- LLViewerStats::getInstance()->incStat(LLViewerStats::ST_TEX_REBAKES);
+ add(LLStatViewer::TEX_REBAKES, 1);
}
}
}
@@ -2872,7 +2869,7 @@ void LLVOAvatarSelf::processRebakeAvatarTextures(LLMessageSystem* msg, void**)
void LLVOAvatarSelf::forceBakeAllTextures(bool slam_for_debug)
{
- llinfos << "TAT: forced full rebake. " << llendl;
+ LL_INFOS() << "TAT: forced full rebake. " << LL_ENDL;
for (U32 i = 0; i < mBakedTextureDatas.size(); i++)
{
@@ -2887,11 +2884,11 @@ void LLVOAvatarSelf::forceBakeAllTextures(bool slam_for_debug)
}
invalidateComposite(layer_set, TRUE);
- LLViewerStats::getInstance()->incStat(LLViewerStats::ST_TEX_REBAKES);
+ add(LLStatViewer::TEX_REBAKES, 1);
}
else
{
- llwarns << "TAT: NO LAYER SET FOR " << (S32)baked_index << llendl;
+ LL_WARNS() << "TAT: NO LAYER SET FOR " << (S32)baked_index << LL_ENDL;
}
}
@@ -3062,29 +3059,28 @@ BOOL LLVOAvatarSelf::needsRenderBeam()
// static
void LLVOAvatarSelf::deleteScratchTextures()
{
- for( LLGLuint* namep = sScratchTexNames.getFirstData();
- namep;
- namep = sScratchTexNames.getNextData() )
+ for(std::map< LLGLenum, LLGLuint*>::iterator it = sScratchTexNames.begin(), end_it = sScratchTexNames.end();
+ it != end_it;
+ ++it)
{
- LLImageGL::deleteTextures(1, (U32 *)namep );
+ LLImageGL::deleteTextures(1, (U32 *)it->second );
stop_glerror();
}
- if( sScratchTexBytes )
+ if( sScratchTexBytes.value() )
{
- lldebugs << "Clearing Scratch Textures " << (sScratchTexBytes/1024) << "KB" << llendl;
+ LL_DEBUGS() << "Clearing Scratch Textures " << (S32Kilobytes)sScratchTexBytes << LL_ENDL;
- sScratchTexNames.deleteAllData();
- sScratchTexLastBindTime.deleteAllData();
- LLImageGL::sGlobalTextureMemoryInBytes -= sScratchTexBytes;
- sScratchTexBytes = 0;
+ delete_and_clear(sScratchTexNames);
+ LLImageGL::sGlobalTextureMemory -= sScratchTexBytes;
+ sScratchTexBytes = S32Bytes(0);
}
}
// static
void LLVOAvatarSelf::dumpScratchTextureByteCount()
{
- llinfos << "Scratch Texture GL: " << (sScratchTexBytes/1024) << "KB" << llendl;
+ LL_INFOS() << "Scratch Texture GL: " << (sScratchTexBytes/1024) << "KB" << LL_ENDL;
}
void LLVOAvatarSelf::dumpWearableInfo(LLAPRFile& outfile)
diff --git a/indra/newview/llvoavatarself.h b/indra/newview/llvoavatarself.h
index 521c86e1c3..444175b62e 100755
--- a/indra/newview/llvoavatarself.h
+++ b/indra/newview/llvoavatarself.h
@@ -30,6 +30,7 @@
#include "llviewertexture.h"
#include "llvoavatar.h"
+#include <map>
struct LocalTextureData;
@@ -49,16 +50,6 @@ class LLVOAvatarSelf :
**/
public:
- void* operator new(size_t size)
- {
- return ll_aligned_malloc_16(size);
- }
-
- void operator delete(void* ptr)
- {
- ll_aligned_free_16(ptr);
- }
-
LLVOAvatarSelf(const LLUUID &id, const LLPCode pcode, LLViewerRegion *regionp);
virtual ~LLVOAvatarSelf();
virtual void markDead();
@@ -275,9 +266,8 @@ public:
public:
static void deleteScratchTextures();
private:
- static S32 sScratchTexBytes;
- static LLMap< LLGLenum, LLGLuint*> sScratchTexNames;
- static LLMap< LLGLenum, F32*> sScratchTexLastBindTime;
+ static S32Bytes sScratchTexBytes;
+ static std::map< LLGLenum, LLGLuint*> sScratchTexNames;
/** Textures
** **
diff --git a/indra/newview/llvocache.cpp b/indra/newview/llvocache.cpp
index 7db19c5c1b..fd1d57a9d0 100755
--- a/indra/newview/llvocache.cpp
+++ b/indra/newview/llvocache.cpp
@@ -29,6 +29,20 @@
#include "llerror.h"
#include "llregionhandle.h"
#include "llviewercontrol.h"
+#include "llviewerobjectlist.h"
+#include "lldrawable.h"
+#include "llviewerregion.h"
+#include "pipeline.h"
+#include "llagentcamera.h"
+#include "llmemory.h"
+
+//static variables
+U32 LLVOCacheEntry::sMinFrameRange = 0;
+F32 LLVOCacheEntry::sNearRadius = 1.0f;
+F32 LLVOCacheEntry::sRearFarRadius = 1.0f;
+F32 LLVOCacheEntry::sFrontPixelThreshold = 1.0f;
+F32 LLVOCacheEntry::sRearPixelThreshold = 1.0f;
+BOOL LLVOCachePartition::sNeedsOcclusionCheck = FALSE;
BOOL check_read(LLAPRFile* apr_file, void* src, S32 n_bytes)
{
@@ -46,12 +60,19 @@ BOOL check_write(LLAPRFile* apr_file, void* src, S32 n_bytes)
//---------------------------------------------------------------------------
LLVOCacheEntry::LLVOCacheEntry(U32 local_id, U32 crc, LLDataPackerBinaryBuffer &dp)
- :
+: LLTrace::MemTrackable<LLVOCacheEntry, 16>("LLVOCacheEntry"),
+ LLViewerOctreeEntryData(LLViewerOctreeEntry::LLVOCACHEENTRY),
mLocalID(local_id),
mCRC(crc),
+ mUpdateFlags(-1),
mHitCount(0),
mDupeCount(0),
- mCRCChangeCount(0)
+ mCRCChangeCount(0),
+ mState(INACTIVE),
+ mSceneContrib(0.f),
+ mValid(TRUE),
+ mParentID(0),
+ mBSphereRadius(-1.0f)
{
mBuffer = new U8[dp.getBufferSize()];
mDP.assignBuffer(mBuffer, dp.getBufferSize());
@@ -59,24 +80,40 @@ LLVOCacheEntry::LLVOCacheEntry(U32 local_id, U32 crc, LLDataPackerBinaryBuffer &
}
LLVOCacheEntry::LLVOCacheEntry()
- :
+: LLTrace::MemTrackable<LLVOCacheEntry, 16>("LLVOCacheEntry"),
+ LLViewerOctreeEntryData(LLViewerOctreeEntry::LLVOCACHEENTRY),
mLocalID(0),
mCRC(0),
+ mUpdateFlags(-1),
mHitCount(0),
mDupeCount(0),
mCRCChangeCount(0),
- mBuffer(NULL)
+ mBuffer(NULL),
+ mState(INACTIVE),
+ mSceneContrib(0.f),
+ mValid(TRUE),
+ mParentID(0),
+ mBSphereRadius(-1.0f)
{
mDP.assignBuffer(mBuffer, 0);
}
LLVOCacheEntry::LLVOCacheEntry(LLAPRFile* apr_file)
- : mBuffer(NULL)
+: LLTrace::MemTrackable<LLVOCacheEntry, 16>("LLVOCacheEntry"),
+ LLViewerOctreeEntryData(LLViewerOctreeEntry::LLVOCACHEENTRY),
+ mBuffer(NULL),
+ mUpdateFlags(-1),
+ mState(INACTIVE),
+ mSceneContrib(0.f),
+ mValid(FALSE),
+ mParentID(0),
+ mBSphereRadius(-1.0f)
{
S32 size = -1;
BOOL success;
mDP.assignBuffer(mBuffer, 0);
+
success = check_read(apr_file, &mLocalID, sizeof(U32));
if(success)
{
@@ -104,7 +141,7 @@ LLVOCacheEntry::LLVOCacheEntry(LLAPRFile* apr_file)
// We've got a bogus size, skip reading it.
// We won't bother seeking, because the rest of this file
// is likely bogus, and will be tossed anyway.
- llwarns << "Bogus cache entry, size " << size << ", aborting!" << llendl;
+ LL_WARNS() << "Bogus cache entry, size " << size << ", aborting!" << LL_ENDL;
success = FALSE;
}
}
@@ -132,6 +169,8 @@ LLVOCacheEntry::LLVOCacheEntry(LLAPRFile* apr_file)
mDupeCount = 0;
mCRCChangeCount = 0;
mBuffer = NULL;
+ mEntry = NULL;
+ mState = INACTIVE;
}
}
@@ -140,37 +179,156 @@ LLVOCacheEntry::~LLVOCacheEntry()
mDP.freeBuffer();
}
-
-// New CRC means the object has changed.
-void LLVOCacheEntry::assignCRC(U32 crc, LLDataPackerBinaryBuffer &dp)
+void LLVOCacheEntry::updateEntry(U32 crc, LLDataPackerBinaryBuffer &dp)
{
- if ( (mCRC != crc)
- ||(mDP.getBufferSize() == 0))
+ if(mCRC != crc)
{
mCRC = crc;
- mHitCount = 0;
mCRCChangeCount++;
+ }
+
+ mDP.freeBuffer();
+
+ llassert_always(dp.getBufferSize() > 0);
+ mBuffer = new U8[dp.getBufferSize()];
+ mDP.assignBuffer(mBuffer, dp.getBufferSize());
+ mDP = dp;
+}
+
+void LLVOCacheEntry::setParentID(U32 id)
+{
+ if(mParentID != id)
+ {
+ removeAllChildren();
+ mParentID = id;
+ }
+}
+
+void LLVOCacheEntry::removeAllChildren()
+{
+ if(mChildrenList.empty())
+ {
+ return;
+ }
+
+ for(vocache_entry_set_t::iterator iter = mChildrenList.begin(); iter != mChildrenList.end(); ++iter)
+ {
+ (*iter)->setParentID(0);
+ }
+ mChildrenList.clear();
+
+ return;
+}
- mDP.freeBuffer();
- mBuffer = new U8[dp.getBufferSize()];
- mDP.assignBuffer(mBuffer, dp.getBufferSize());
- mDP = dp;
+//virtual
+void LLVOCacheEntry::setOctreeEntry(LLViewerOctreeEntry* entry)
+{
+ if(!entry && mDP.getBufferSize() > 0)
+ {
+ LLUUID fullid;
+ LLViewerObject::unpackUUID(&mDP, fullid, "ID");
+
+ LLViewerObject* obj = gObjectList.findObject(fullid);
+ if(obj && obj->mDrawable)
+ {
+ entry = obj->mDrawable->getEntry();
+ }
}
+
+ LLViewerOctreeEntryData::setOctreeEntry(entry);
}
-LLDataPackerBinaryBuffer *LLVOCacheEntry::getDP(U32 crc)
+void LLVOCacheEntry::setState(U32 state)
{
- if ( (mCRC != crc)
- ||(mDP.getBufferSize() == 0))
+ if(state > LOW_BITS) //special states
{
- //llinfos << "Not getting cache entry, invalid!" << llendl;
+ mState |= (HIGH_BITS & state);
+ return;
+ }
+
+ //
+ //otherwise LOW_BITS states
+ //
+ clearState(LOW_BITS);
+ mState |= (LOW_BITS & state);
+
+ if(getState() == ACTIVE)
+ {
+ const S32 MIN_INTERVAL = 64 + sMinFrameRange;
+ U32 last_visible = getVisible();
+
+ setVisible();
+
+ U32 cur_visible = getVisible();
+ if(cur_visible - last_visible > MIN_INTERVAL ||
+ cur_visible < MIN_INTERVAL)
+ {
+ mLastCameraUpdated = 0; //reset
+ }
+ else
+ {
+ mLastCameraUpdated = LLViewerRegion::sLastCameraUpdated;
+ }
+ }
+}
+
+void LLVOCacheEntry::addChild(LLVOCacheEntry* entry)
+{
+ llassert(entry != NULL);
+ llassert(entry->getParentID() == mLocalID);
+ llassert(entry->getEntry() != NULL);
+
+ if(!entry || !entry->getEntry() || entry->getParentID() != mLocalID)
+ {
+ return;
+ }
+
+ mChildrenList.insert(entry);
+
+ //update parent bbox
+ if(getEntry() != NULL && isState(INACTIVE))
+ {
+ updateParentBoundingInfo(entry);
+ resetVisible();
+ }
+}
+
+void LLVOCacheEntry::removeChild(LLVOCacheEntry* entry)
+{
+ entry->setParentID(0);
+
+ vocache_entry_set_t::iterator iter = mChildrenList.find(entry);
+ if(iter != mChildrenList.end())
+ {
+ mChildrenList.erase(iter);
+ }
+}
+
+//remove the first child, and return it.
+LLVOCacheEntry* LLVOCacheEntry::getChild()
+{
+ LLVOCacheEntry* child = NULL;
+ vocache_entry_set_t::iterator iter = mChildrenList.begin();
+ if(iter != mChildrenList.end())
+ {
+ child = *iter;
+ mChildrenList.erase(iter);
+ }
+
+ return child;
+}
+
+LLDataPackerBinaryBuffer *LLVOCacheEntry::getDP()
+{
+ if (mDP.getBufferSize() == 0)
+ {
+ //LL_INFOS() << "Not getting cache entry, invalid!" << LL_ENDL;
return NULL;
}
- mHitCount++;
+
return &mDP;
}
-
void LLVOCacheEntry::recordHit()
{
mHitCount++;
@@ -179,12 +337,12 @@ void LLVOCacheEntry::recordHit()
void LLVOCacheEntry::dump() const
{
- llinfos << "local " << mLocalID
+ LL_INFOS() << "local " << mLocalID
<< " crc " << mCRC
<< " hits " << mHitCount
<< " dupes " << mDupeCount
<< " change " << mCRCChangeCount
- << llendl;
+ << LL_ENDL;
}
BOOL LLVOCacheEntry::writeToFile(LLAPRFile* apr_file) const
@@ -221,49 +379,675 @@ BOOL LLVOCacheEntry::writeToFile(LLAPRFile* apr_file) const
return success ;
}
+//static
+void LLVOCacheEntry::updateDebugSettings()
+{
+ static LLFrameTimer timer;
+ if(timer.getElapsedTimeF32() < 1.0f) //update frequency once per second.
+ {
+ return;
+ }
+ timer.reset();
+
+ //the number of frames invisible objects stay in memory
+ static LLCachedControl<U32> inv_obj_time(gSavedSettings,"NonvisibleObjectsInMemoryTime");
+ sMinFrameRange = inv_obj_time - 1; //make 0 to be the maximum
+
+ //min radius: all objects within this radius remain loaded in memory
+ static LLCachedControl<F32> min_radius(gSavedSettings,"SceneLoadMinRadius");
+ sNearRadius = llmin((F32)min_radius, gAgentCamera.mDrawDistance); //can not exceed the draw distance
+ sNearRadius = llmax(sNearRadius, 1.f); //minimum value is 1.0m
+
+ //objects within the view frustum whose visible area is greater than this threshold will be loaded
+ static LLCachedControl<F32> front_pixel_threshold(gSavedSettings,"SceneLoadFrontPixelThreshold");
+ sFrontPixelThreshold = front_pixel_threshold;
+
+ //objects out of the view frustum whose visible area is greater than this threshold will remain loaded
+ static LLCachedControl<F32> rear_pixel_threshold(gSavedSettings,"SceneLoadRearPixelThreshold");
+ sRearPixelThreshold = rear_pixel_threshold;
+ sRearPixelThreshold = llmax(sRearPixelThreshold, sFrontPixelThreshold); //can not be smaller than sFrontPixelThreshold.
+
+ // a percentage of draw distance beyond which all objects outside of view frustum will be unloaded, regardless of pixel threshold
+ static LLCachedControl<F32> rear_max_radius_frac(gSavedSettings,"SceneLoadRearMaxRadiusFraction");
+ sRearFarRadius = llmax(rear_max_radius_frac * gAgentCamera.mDrawDistance / 100.f, 1.0f); //minimum value is 1.0m
+ sRearFarRadius = llmax(sRearFarRadius, (F32)min_radius); //can not be less than "SceneLoadMinRadius".
+ sRearFarRadius = llmin(sRearFarRadius, gAgentCamera.mDrawDistance); //can not be more than the draw distance.
+
+ //make the above parameters adaptive to memory usage
+ //starts to put restrictions from low_mem_bound_MB, apply tightest restrictions when hits high_mem_bound_MB
+ static LLCachedControl<U32> low_mem_bound_MB(gSavedSettings,"SceneLoadLowMemoryBound");
+ static LLCachedControl<U32> high_mem_bound_MB(gSavedSettings,"SceneLoadHighMemoryBound");
+
+ LLMemory::updateMemoryInfo() ;
+ U32 allocated_mem = LLMemory::getAllocatedMemKB().value();
+ allocated_mem /= 1024; //convert to MB.
+ if(allocated_mem < low_mem_bound_MB)
+ {
+ return;
+ }
+ F32 adjust_factor = llmax(0.f, (F32)(high_mem_bound_MB - allocated_mem) / (high_mem_bound_MB - low_mem_bound_MB));
+
+ sRearFarRadius = llmin(adjust_factor * sRearFarRadius, 96.f); //[0.f, 96.f]
+ sMinFrameRange = (U32)llclamp(adjust_factor * sMinFrameRange, 10.f, 64.f); //[10, 64]
+ sNearRadius = llmax(adjust_factor * sNearRadius, 1.0f);
+}
+
+//static
+F32 LLVOCacheEntry::getSquaredPixelThreshold(bool is_front)
+{
+ F32 threshold;
+ if(is_front)
+ {
+ threshold = sFrontPixelThreshold;
+ }
+ else
+ {
+ threshold = sRearPixelThreshold;
+ }
+
+ //object projected area threshold
+ F32 pixel_meter_ratio = LLViewerCamera::getInstance()->getPixelMeterRatio();
+ F32 projection_threshold = pixel_meter_ratio > 0.f ? threshold / pixel_meter_ratio : 0.f;
+ projection_threshold *= projection_threshold;
+
+ return projection_threshold;
+}
+
+bool LLVOCacheEntry::isAnyVisible(const LLVector4a& camera_origin, const LLVector4a& local_camera_origin, F32 dist_threshold)
+{
+ LLOcclusionCullingGroup* group = (LLOcclusionCullingGroup*)getGroup();
+ if(!group)
+ {
+ return false;
+ }
+
+ //any visible
+ bool vis = group->isAnyRecentlyVisible();
+
+ //not ready to remove
+ if(!vis)
+ {
+ S32 cur_vis = llmax(group->getAnyVisible(), (S32)getVisible());
+ vis = (cur_vis + sMinFrameRange > LLViewerOctreeEntryData::getCurrentFrame());
+ }
+
+ //within the back sphere
+ if(!vis && !mParentID && !group->isOcclusionState(LLOcclusionCullingGroup::OCCLUDED))
+ {
+ LLVector4a lookAt;
+
+ if(mBSphereRadius > 0.f)
+ {
+ lookAt.setSub(mBSphereCenter, local_camera_origin);
+ dist_threshold += mBSphereRadius;
+ }
+ else
+ {
+ lookAt.setSub(getPositionGroup(), camera_origin);
+ dist_threshold += getBinRadius();
+ }
+
+ vis = (lookAt.dot3(lookAt).getF32() < dist_threshold * dist_threshold);
+ }
+
+ return vis;
+}
+
+void LLVOCacheEntry::calcSceneContribution(const LLVector4a& camera_origin, bool needs_update, U32 last_update, F32 max_dist)
+{
+ if(!needs_update && getVisible() >= last_update)
+ {
+ return; //no need to update
+ }
+
+ LLVector4a lookAt;
+ lookAt.setSub(getPositionGroup(), camera_origin);
+ F32 distance = lookAt.getLength3().getF32();
+ distance -= sNearRadius;
+
+ if(distance <= 0.f)
+ {
+ //nearby objects, set a large number
+ const F32 LARGE_SCENE_CONTRIBUTION = 1000.f; //a large number to force to load the object.
+ mSceneContrib = LARGE_SCENE_CONTRIBUTION;
+ }
+ else
+ {
+ F32 rad = getBinRadius();
+ max_dist += rad;
+
+ if(distance + sNearRadius < max_dist)
+ {
+ mSceneContrib = (rad * rad) / distance;
+ }
+ else
+ {
+ mSceneContrib = 0.f; //out of draw distance, not to load
+ }
+ }
+
+ setVisible();
+}
+
+void LLVOCacheEntry::saveBoundingSphere()
+{
+ mBSphereCenter = getPositionGroup();
+ mBSphereRadius = getBinRadius();
+}
+
+void LLVOCacheEntry::setBoundingInfo(const LLVector3& pos, const LLVector3& scale)
+{
+ LLVector4a center, newMin, newMax;
+ center.load3(pos.mV);
+ LLVector4a size;
+ size.load3(scale.mV);
+ newMin.setSub(center, size);
+ newMax.setAdd(center, size);
+
+ setPositionGroup(center);
+ setSpatialExtents(newMin, newMax);
+
+ if(getNumOfChildren() > 0) //has children
+ {
+ updateParentBoundingInfo();
+ }
+ else
+ {
+ setBinRadius(llmin(size.getLength3().getF32() * 4.f, 256.f));
+ }
+}
+
+//make the parent bounding box to include all children
+void LLVOCacheEntry::updateParentBoundingInfo()
+{
+ if(mChildrenList.empty())
+ {
+ return;
+ }
+
+ for(vocache_entry_set_t::iterator iter = mChildrenList.begin(); iter != mChildrenList.end(); ++iter)
+ {
+ updateParentBoundingInfo(*iter);
+ }
+ resetVisible();
+}
+
+//make the parent bounding box to include this child
+void LLVOCacheEntry::updateParentBoundingInfo(const LLVOCacheEntry* child)
+{
+ const LLVector4a* child_exts = child->getSpatialExtents();
+ LLVector4a newMin, newMax;
+ newMin = child_exts[0];
+ newMax = child_exts[1];
+
+ //move to regional space.
+ {
+ const LLVector4a& parent_pos = getPositionGroup();
+ newMin.add(parent_pos);
+ newMax.add(parent_pos);
+ }
+
+ //update parent's bbox(min, max)
+ const LLVector4a* parent_exts = getSpatialExtents();
+ update_min_max(newMin, newMax, parent_exts[0]);
+ update_min_max(newMin, newMax, parent_exts[1]);
+ for(S32 i = 0; i < 4; i++)
+ {
+ llclamp(newMin[i], 0.f, 256.f);
+ llclamp(newMax[i], 0.f, 256.f);
+ }
+ setSpatialExtents(newMin, newMax);
+
+ //update parent's bbox center
+ LLVector4a center;
+ center.setAdd(newMin, newMax);
+ center.mul(0.5f);
+ setPositionGroup(center);
+
+ //update parent's bbox size vector
+ LLVector4a size;
+ size.setSub(newMax, newMin);
+ size.mul(0.5f);
+ setBinRadius(llmin(size.getLength3().getF32() * 4.f, 256.f));
+}
//-------------------------------------------------------------------
-//LLVOCache
+//LLVOCachePartition
//-------------------------------------------------------------------
-// Format string used to construct filename for the object cache
-static const char OBJECT_CACHE_FILENAME[] = "objects_%d_%d.slc";
+LLVOCacheGroup::~LLVOCacheGroup()
+{
+ if(mOcclusionState[LLViewerCamera::CAMERA_WORLD] & ACTIVE_OCCLUSION)
+ {
+ ((LLVOCachePartition*)mSpatialPartition)->removeOccluder(this);
+ }
+}
-const U32 MAX_NUM_OBJECT_ENTRIES = 128 ;
-const U32 MIN_ENTRIES_TO_PURGE = 16 ;
-const U32 INVALID_TIME = 0 ;
-const char* object_cache_dirname = "objectcache";
-const char* header_filename = "object.cache";
+//virtual
+void LLVOCacheGroup::handleChildAddition(const OctreeNode* parent, OctreeNode* child)
+{
+ if (child->getListenerCount() == 0)
+ {
+ new LLVOCacheGroup(child, mSpatialPartition);
+ }
+ else
+ {
+ OCT_ERRS << "LLVOCacheGroup redundancy detected." << LL_ENDL;
+ }
-LLVOCache* LLVOCache::sInstance = NULL;
+ unbound();
+
+ ((LLViewerOctreeGroup*)child->getListener(0))->unbound();
+}
-//static
-LLVOCache* LLVOCache::getInstance()
-{
- if(!sInstance)
+LLVOCachePartition::LLVOCachePartition(LLViewerRegion* regionp)
+: LLTrace::MemTrackable<LLVOCachePartition>("LLVOCachePartition")
+{
+ mLODPeriod = 16;
+ mRegionp = regionp;
+ mPartitionType = LLViewerRegion::PARTITION_VO_CACHE;
+ mBackSlectionEnabled = -1;
+ mIdleHash = 0;
+
+ for(S32 i = 0; i < LLViewerCamera::NUM_CAMERAS; i++)
{
- sInstance = new LLVOCache() ;
+ mCulledTime[i] = 0;
}
- return sInstance ;
+ mCullHistory = -1;
+
+ new LLVOCacheGroup(mOctree, this);
}
-//static
-BOOL LLVOCache::hasInstance()
+bool LLVOCachePartition::addEntry(LLViewerOctreeEntry* entry)
{
- return sInstance != NULL ;
+ llassert(entry->hasVOCacheEntry());
+
+ if(!llfinite(entry->getBinRadius()) || !entry->getPositionGroup().isFinite3())
+ {
+ return false; //data corrupted
+ }
+
+ mOctree->insert(entry);
+
+ return true;
}
+
+void LLVOCachePartition::removeEntry(LLViewerOctreeEntry* entry)
+{
+ entry->getVOCacheEntry()->setGroup(NULL);
-//static
-void LLVOCache::destroyClass()
+ llassert(!entry->getGroup());
+}
+
+class LLVOCacheOctreeCull : public LLViewerOctreeCull
+{
+public:
+ LLVOCacheOctreeCull(LLCamera* camera, LLViewerRegion* regionp,
+ const LLVector3& shift, bool use_object_cache_occlusion, F32 pixel_threshold, LLVOCachePartition* part)
+ : LLViewerOctreeCull(camera),
+ mRegionp(regionp),
+ mPartition(part),
+ mPixelThreshold(pixel_threshold)
+ {
+ mLocalShift = shift;
+ mUseObjectCacheOcclusion = use_object_cache_occlusion;
+ mNearRadius = LLVOCacheEntry::sNearRadius;
+ }
+
+ virtual bool earlyFail(LLViewerOctreeGroup* base_group)
+ {
+ if( mUseObjectCacheOcclusion &&
+ base_group->getOctreeNode()->getParent()) //never occlusion cull the root node
+ {
+ LLOcclusionCullingGroup* group = (LLOcclusionCullingGroup*)base_group;
+ if(group->needsUpdate())
+ {
+ //needs to issue new occlusion culling check, perform view culling check first.
+ return false;
+ }
+
+ group->checkOcclusion();
+
+ if (group->isOcclusionState(LLOcclusionCullingGroup::OCCLUDED))
+ {
+ return true;
+ }
+ }
+
+ return false;
+ }
+
+ virtual S32 frustumCheck(const LLViewerOctreeGroup* group)
+ {
+#if 0
+ S32 res = AABBInRegionFrustumGroupBounds(group);
+#else
+ S32 res = AABBInRegionFrustumNoFarClipGroupBounds(group);
+ if (res != 0)
+ {
+ res = llmin(res, AABBRegionSphereIntersectGroupExtents(group, mLocalShift));
+ }
+#endif
+
+ return res;
+ }
+
+ virtual S32 frustumCheckObjects(const LLViewerOctreeGroup* group)
+ {
+#if 0
+ S32 res = AABBInRegionFrustumObjectBounds(group);
+#else
+ S32 res = AABBInRegionFrustumNoFarClipObjectBounds(group);
+ if (res != 0)
+ {
+ res = llmin(res, AABBRegionSphereIntersectObjectExtents(group, mLocalShift));
+ }
+#endif
+
+ if(res != 0)
+ {
+ //check if the objects projection large enough
+ const LLVector4a* exts = group->getObjectExtents();
+ res = checkProjectionArea(exts[0], exts[1], mLocalShift, mPixelThreshold, mNearRadius);
+ }
+
+ return res;
+ }
+
+ virtual void processGroup(LLViewerOctreeGroup* base_group)
+ {
+ if( !mUseObjectCacheOcclusion ||
+ !base_group->getOctreeNode()->getParent())
+ {
+ //no occlusion check
+ if(mRegionp->addVisibleGroup(base_group))
+ {
+ base_group->setVisible();
+ }
+ return;
+ }
+
+ LLOcclusionCullingGroup* group = (LLOcclusionCullingGroup*)base_group;
+ if(group->needsUpdate() || !group->isRecentlyVisible())//needs to issue new occlusion culling check.
+ {
+ mPartition->addOccluders(group);
+ group->setVisible();
+ return ; //wait for occlusion culling result
+ }
+
+ if(group->isOcclusionState(LLOcclusionCullingGroup::QUERY_PENDING) ||
+ group->isOcclusionState(LLOcclusionCullingGroup::ACTIVE_OCCLUSION))
+ {
+ //keep waiting
+ group->setVisible();
+ }
+ else
+ {
+ if(mRegionp->addVisibleGroup(base_group))
+ {
+ base_group->setVisible();
+ }
+ }
+ }
+
+private:
+ LLVOCachePartition* mPartition;
+ LLViewerRegion* mRegionp;
+ LLVector3 mLocalShift; //shift vector from agent space to local region space.
+ F32 mPixelThreshold;
+ F32 mNearRadius;
+ bool mUseObjectCacheOcclusion;
+};
+
+//select objects behind camera
+class LLVOCacheOctreeBackCull : public LLViewerOctreeCull
+{
+public:
+ LLVOCacheOctreeBackCull(LLCamera* camera, const LLVector3& shift, LLViewerRegion* regionp, F32 pixel_threshold, bool use_occlusion)
+ : LLViewerOctreeCull(camera), mRegionp(regionp), mPixelThreshold(pixel_threshold), mUseObjectCacheOcclusion(use_occlusion)
+ {
+ mLocalShift = shift;
+ mSphereRadius = LLVOCacheEntry::sRearFarRadius;
+ }
+
+ virtual bool earlyFail(LLViewerOctreeGroup* base_group)
+ {
+ if( mUseObjectCacheOcclusion &&
+ base_group->getOctreeNode()->getParent()) //never occlusion cull the root node
+ {
+ LLOcclusionCullingGroup* group = (LLOcclusionCullingGroup*)base_group;
+
+ if (group->getOcclusionState() > 0) //occlusion state is not clear.
+ {
+ return true;
+ }
+ }
+
+ return false;
+ }
+
+ virtual S32 frustumCheck(const LLViewerOctreeGroup* group)
+ {
+ const LLVector4a* exts = group->getExtents();
+ return backSphereCheck(exts[0], exts[1]);
+ }
+
+ virtual S32 frustumCheckObjects(const LLViewerOctreeGroup* group)
+ {
+ const LLVector4a* exts = group->getObjectExtents();
+ if(backSphereCheck(exts[0], exts[1]))
+ {
+ //check if the objects projection large enough
+ const LLVector4a* exts = group->getObjectExtents();
+ return checkProjectionArea(exts[0], exts[1], mLocalShift, mPixelThreshold, mSphereRadius);
+ }
+ return false;
+ }
+
+ virtual void processGroup(LLViewerOctreeGroup* base_group)
+ {
+ mRegionp->addVisibleGroup(base_group);
+ return;
+ }
+
+private:
+ //a sphere around the camera origin, including objects behind camera.
+ S32 backSphereCheck(const LLVector4a& min, const LLVector4a& max)
+ {
+ return AABBSphereIntersect(min, max, mCamera->getOrigin() - mLocalShift, mSphereRadius);
+ }
+
+private:
+ F32 mSphereRadius;
+ LLViewerRegion* mRegionp;
+ LLVector3 mLocalShift; //shift vector from agent space to local region space.
+ F32 mPixelThreshold;
+ bool mUseObjectCacheOcclusion;
+};
+
+void LLVOCachePartition::selectBackObjects(LLCamera &camera, F32 pixel_threshold, bool use_occlusion)
+{
+ if(LLViewerCamera::sCurCameraID != LLViewerCamera::CAMERA_WORLD)
+ {
+ return;
+ }
+
+ if(mBackSlectionEnabled < 0)
+ {
+ mBackSlectionEnabled = LLVOCacheEntry::sMinFrameRange - 1;
+ mBackSlectionEnabled = llmax(mBackSlectionEnabled, (S32)1);
+ }
+
+ if(!mBackSlectionEnabled)
+ {
+ return;
+ }
+
+ //localize the camera
+ LLVector3 region_agent = mRegionp->getOriginAgent();
+
+ LLVOCacheOctreeBackCull culler(&camera, region_agent, mRegionp, pixel_threshold, use_occlusion);
+ culler.traverse(mOctree);
+
+ mBackSlectionEnabled--;
+ if(!mRegionp->getNumOfVisibleGroups())
+ {
+ mBackSlectionEnabled = 0;
+ }
+
+ return;
+}
+
+S32 LLVOCachePartition::cull(LLCamera &camera, bool do_occlusion)
+{
+ static LLCachedControl<bool> use_object_cache_occlusion(gSavedSettings,"UseObjectCacheOcclusion");
+
+ if(!LLViewerRegion::sVOCacheCullingEnabled)
+ {
+ return 0;
+ }
+ if(mRegionp->isPaused())
+ {
+ return 0;
+ }
+
+ ((LLViewerOctreeGroup*)mOctree->getListener(0))->rebound();
+
+ if(LLViewerCamera::sCurCameraID != LLViewerCamera::CAMERA_WORLD)
+ {
+ return 0; //no need for those cameras.
+ }
+
+ if(mCulledTime[LLViewerCamera::sCurCameraID] == LLViewerOctreeEntryData::getCurrentFrame())
+ {
+ return 0; //already culled
+ }
+ mCulledTime[LLViewerCamera::sCurCameraID] = LLViewerOctreeEntryData::getCurrentFrame();
+
+ if(!mCullHistory && LLViewerRegion::isViewerCameraStatic())
+ {
+ U32 seed = llmax(mLODPeriod >> 1, (U32)4);
+ if(LLViewerCamera::sCurCameraID == LLViewerCamera::CAMERA_WORLD)
+ {
+ if(!(LLViewerOctreeEntryData::getCurrentFrame() % seed))
+ {
+ mIdleHash = (mIdleHash + 1) % seed;
+ }
+ }
+ if(LLViewerOctreeEntryData::getCurrentFrame() % seed != mIdleHash)
+ {
+ mFrontCull = FALSE;
+
+ //process back objects selection
+ selectBackObjects(camera, LLVOCacheEntry::getSquaredPixelThreshold(mFrontCull),
+ do_occlusion && use_object_cache_occlusion);
+ return 0; //nothing changed, reduce frequency of culling
+ }
+ }
+ else
+ {
+ mBackSlectionEnabled = -1; //reset it.
+ }
+
+ //localize the camera
+ LLVector3 region_agent = mRegionp->getOriginAgent();
+ camera.calcRegionFrustumPlanes(region_agent, gAgentCamera.mDrawDistance);
+
+ mFrontCull = TRUE;
+ LLVOCacheOctreeCull culler(&camera, mRegionp, region_agent, do_occlusion && use_object_cache_occlusion,
+ LLVOCacheEntry::getSquaredPixelThreshold(mFrontCull), this);
+ culler.traverse(mOctree);
+
+ if(!sNeedsOcclusionCheck)
+ {
+ sNeedsOcclusionCheck = !mOccludedGroups.empty();
+ }
+ return 1;
+}
+
+void LLVOCachePartition::setCullHistory(BOOL has_new_object)
{
- if(sInstance)
+ mCullHistory <<= 1;
+ mCullHistory |= has_new_object;
+}
+
+void LLVOCachePartition::addOccluders(LLViewerOctreeGroup* gp)
+{
+ LLVOCacheGroup* group = (LLVOCacheGroup*)gp;
+
+ if(!group->isOcclusionState(LLOcclusionCullingGroup::ACTIVE_OCCLUSION))
{
- delete sInstance ;
- sInstance = NULL ;
+ group->setOcclusionState(LLOcclusionCullingGroup::ACTIVE_OCCLUSION);
+ mOccludedGroups.insert(group);
}
}
+void LLVOCachePartition::processOccluders(LLCamera* camera)
+{
+ if(mOccludedGroups.empty())
+ {
+ return;
+ }
+ if(LLViewerCamera::sCurCameraID != LLViewerCamera::CAMERA_WORLD)
+ {
+ return; //no need for those cameras.
+ }
+
+ LLVector3 region_agent = mRegionp->getOriginAgent();
+ LLVector4a shift(region_agent[0], region_agent[1], region_agent[2]);
+ for(std::set<LLVOCacheGroup*>::iterator iter = mOccludedGroups.begin(); iter != mOccludedGroups.end(); ++iter)
+ {
+ LLVOCacheGroup* group = *iter;
+ if(group->isOcclusionState(LLOcclusionCullingGroup::ACTIVE_OCCLUSION))
+ {
+ group->doOcclusion(camera, &shift);
+ group->clearOcclusionState(LLOcclusionCullingGroup::ACTIVE_OCCLUSION);
+ }
+ }
+
+ //safe to clear mOccludedGroups here because only the world camera accesses it.
+ mOccludedGroups.clear();
+ sNeedsOcclusionCheck = FALSE;
+}
+
+void LLVOCachePartition::resetOccluders()
+{
+ if(mOccludedGroups.empty())
+ {
+ return;
+ }
+
+ for(std::set<LLVOCacheGroup*>::iterator iter = mOccludedGroups.begin(); iter != mOccludedGroups.end(); ++iter)
+ {
+ LLVOCacheGroup* group = *iter;
+ group->clearOcclusionState(LLOcclusionCullingGroup::ACTIVE_OCCLUSION);
+ }
+ mOccludedGroups.clear();
+ sNeedsOcclusionCheck = FALSE;
+}
+
+void LLVOCachePartition::removeOccluder(LLVOCacheGroup* group)
+{
+ if(mOccludedGroups.empty())
+ {
+ return;
+ }
+ mOccludedGroups.erase(group);
+}
+//-------------------------------------------------------------------
+//LLVOCache
+//-------------------------------------------------------------------
+// Format string used to construct filename for the object cache
+static const char OBJECT_CACHE_FILENAME[] = "objects_%d_%d.slc";
+
+const U32 MAX_NUM_OBJECT_ENTRIES = 128 ;
+const U32 MIN_ENTRIES_TO_PURGE = 16 ;
+const U32 INVALID_TIME = 0 ;
+const char* object_cache_dirname = "objectcache";
+const char* header_filename = "object.cache";
+
+
LLVOCache::LLVOCache():
- mInitialized(FALSE),
- mReadOnly(TRUE),
+ mInitialized(false),
+ mReadOnly(true),
mNumEntries(0),
mCacheSize(1)
{
@@ -291,16 +1075,16 @@ void LLVOCache::initCache(ELLPath location, U32 size, U32 cache_version)
{
if(!mEnabled)
{
- llwarns << "Not initializing cache: Cache is currently disabled." << llendl;
+ LL_WARNS() << "Not initializing cache: Cache is currently disabled." << LL_ENDL;
return ;
}
if(mInitialized)
{
- llwarns << "Cache already initialized." << llendl;
+ LL_WARNS() << "Cache already initialized." << LL_ENDL;
return ;
}
- mInitialized = TRUE ;
+ mInitialized = true;
setDirNames(location);
if (!mReadOnly)
@@ -325,39 +1109,48 @@ void LLVOCache::initCache(ELLPath location, U32 size, U32 cache_version)
}
}
-void LLVOCache::removeCache(ELLPath location)
+void LLVOCache::removeCache(ELLPath location, bool started)
{
+ if(started)
+ {
+ removeCache();
+ return;
+ }
+
if(mReadOnly)
{
- llwarns << "Not removing cache at " << location << ": Cache is currently in read-only mode." << llendl;
+ LL_WARNS() << "Not removing cache at " << location << ": Cache is currently in read-only mode." << LL_ENDL;
return ;
- }
+ }
- llinfos << "about to remove the object cache due to settings." << llendl ;
+ LL_INFOS() << "about to remove the object cache due to settings." << LL_ENDL ;
std::string mask = "*";
std::string cache_dir = gDirUtilp->getExpandedFilename(location, object_cache_dirname);
- llinfos << "Removing cache at " << cache_dir << llendl;
+ LL_INFOS() << "Removing cache at " << cache_dir << LL_ENDL;
gDirUtilp->deleteFilesInDir(cache_dir, mask); //delete all files
LLFile::rmdir(cache_dir);
clearCacheInMemory();
- mInitialized = FALSE ;
+ mInitialized = false;
}
void LLVOCache::removeCache()
{
- llassert_always(mInitialized) ;
+ if(!mInitialized)
+ {
+ //OK to remove cache even it is not initialized.
+ LL_WARNS() << "Object cache is not initialized yet." << LL_ENDL;
+ }
+
if(mReadOnly)
{
- llwarns << "Not clearing object cache: Cache is currently in read-only mode." << llendl;
+ LL_WARNS() << "Not clearing object cache: Cache is currently in read-only mode." << LL_ENDL;
return ;
}
- llinfos << "about to remove the object cache due to some error." << llendl ;
-
std::string mask = "*";
- llinfos << "Removing cache at " << mObjectCacheDirName << llendl;
+ LL_INFOS() << "Removing object cache at " << mObjectCacheDirName << LL_ENDL;
gDirUtilp->deleteFilesInDir(mObjectCacheDirName, mask);
clearCacheInMemory() ;
@@ -366,23 +1159,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() ;
}
@@ -429,7 +1222,7 @@ void LLVOCache::removeFromCache(HeaderEntryInfo* entry)
{
if(mReadOnly)
{
- llwarns << "Not removing cache for handle " << entry->mHandle << ": Cache is currently in read-only mode." << llendl;
+ LL_WARNS() << "Not removing cache for handle " << entry->mHandle << ": Cache is currently in read-only mode." << LL_ENDL;
return ;
}
@@ -444,7 +1237,7 @@ void LLVOCache::readCacheHeader()
{
if(!mEnabled)
{
- llwarns << "Not reading cache header: Cache is currently disabled." << llendl;
+ LL_WARNS() << "Not reading cache header: Cache is currently disabled." << LL_ENDL;
return;
}
@@ -474,7 +1267,7 @@ void LLVOCache::readCacheHeader()
if(!success) //failed
{
- llwarns << "Error reading cache header entry. (entry_index=" << mNumEntries << ")" << llendl;
+ LL_WARNS() << "Error reading cache header entry. (entry_index=" << mNumEntries << ")" << LL_ENDL;
delete entry ;
entry = NULL ;
break ;
@@ -502,7 +1295,7 @@ void LLVOCache::readCacheHeader()
//for(header_entry_queue_t::iterator iter = mHeaderEntryQueue.begin() ; success && iter != mHeaderEntryQueue.end(); ++iter)
//{
// getObjectCacheFilename((*iter)->mHandle, name) ;
- // llinfos << name << llendl ;
+ // LL_INFOS() << name << LL_ENDL ;
//}
//-----------
}
@@ -527,13 +1320,13 @@ void LLVOCache::writeCacheHeader()
{
if (!mEnabled)
{
- llwarns << "Not writing cache header: Cache is currently disabled." << llendl;
+ LL_WARNS() << "Not writing cache header: Cache is currently disabled." << LL_ENDL;
return;
}
if(mReadOnly)
{
- llwarns << "Not writing cache header: Cache is currently in read-only mode." << llendl;
+ LL_WARNS() << "Not writing cache header: Cache is currently in read-only mode." << LL_ENDL;
return;
}
@@ -587,7 +1380,7 @@ void LLVOCache::readFromCache(U64 handle, const LLUUID& id, LLVOCacheEntry::voca
{
if(!mEnabled)
{
- llwarns << "Not reading cache for handle " << handle << "): Cache is currently disabled." << llendl;
+ LL_WARNS() << "Not reading cache for handle " << handle << "): Cache is currently disabled." << LL_ENDL;
return ;
}
llassert_always(mInitialized);
@@ -595,7 +1388,7 @@ void LLVOCache::readFromCache(U64 handle, const LLUUID& id, LLVOCacheEntry::voca
handle_entry_map_t::iterator iter = mHandleEntryMap.find(handle) ;
if(iter == mHandleEntryMap.end()) //no cache
{
- llwarns << "No handle map entry for " << handle << llendl;
+ LL_WARNS() << "No handle map entry for " << handle << LL_ENDL;
return ;
}
@@ -612,7 +1405,7 @@ void LLVOCache::readFromCache(U64 handle, const LLUUID& id, LLVOCacheEntry::voca
{
if(cache_id != id)
{
- llinfos << "Cache ID doesn't match for this region, discarding"<< llendl;
+ LL_INFOS() << "Cache ID doesn't match for this region, discarding"<< LL_ENDL;
success = false ;
}
@@ -623,13 +1416,12 @@ void LLVOCache::readFromCache(U64 handle, const LLUUID& id, LLVOCacheEntry::voca
if(success)
{
- for (S32 i = 0; i < num_entries; i++)
+ for (S32 i = 0; i < num_entries && apr_file.eof() != APR_EOF; i++)
{
- LLVOCacheEntry* entry = new LLVOCacheEntry(&apr_file);
+ LLPointer<LLVOCacheEntry> entry = new LLVOCacheEntry(&apr_file);
if (!entry->getLocalID())
{
- llwarns << "Aborting cache file load for " << filename << ", cache file corruption!" << llendl;
- delete entry ;
+ LL_WARNS() << "Aborting cache file load for " << filename << ", cache file corruption!" << LL_ENDL;
success = false ;
break ;
}
@@ -665,18 +1457,18 @@ void LLVOCache::purgeEntries(U32 size)
mNumEntries = mHandleEntryMap.size() ;
}
-void LLVOCache::writeToCache(U64 handle, const LLUUID& id, const LLVOCacheEntry::vocache_entry_map_t& cache_entry_map, BOOL dirty_cache)
+void LLVOCache::writeToCache(U64 handle, const LLUUID& id, const LLVOCacheEntry::vocache_entry_map_t& cache_entry_map, BOOL dirty_cache, bool removal_enabled)
{
if(!mEnabled)
{
- llwarns << "Not writing cache for handle " << handle << "): Cache is currently disabled." << llendl;
+ LL_WARNS() << "Not writing cache for handle " << handle << "): Cache is currently disabled." << LL_ENDL;
return ;
}
llassert_always(mInitialized);
if(mReadOnly)
{
- llwarns << "Not writing cache for handle " << handle << "): Cache is currently in read-only mode." << llendl;
+ LL_WARNS() << "Not writing cache for handle " << handle << "): Cache is currently in read-only mode." << LL_ENDL;
return ;
}
@@ -711,13 +1503,13 @@ void LLVOCache::writeToCache(U64 handle, const LLUUID& id, const LLVOCacheEntry:
//update cache header
if(!updateEntry(entry))
{
- llwarns << "Failed to update cache header index " << entry->mIndex << ". handle = " << handle << llendl;
+ LL_WARNS() << "Failed to update cache header index " << entry->mIndex << ". handle = " << handle << LL_ENDL;
return ; //update failed.
}
if(!dirty_cache)
{
- llwarns << "Skipping write to cache for handle " << handle << ": cache not dirty" << llendl;
+ LL_WARNS() << "Skipping write to cache for handle " << handle << ": cache not dirty" << LL_ENDL;
return ; //nothing changed, no need to update.
}
@@ -738,7 +1530,14 @@ void LLVOCache::writeToCache(U64 handle, const LLUUID& id, const LLVOCacheEntry:
for (LLVOCacheEntry::vocache_entry_map_t::const_iterator iter = cache_entry_map.begin(); success && iter != cache_entry_map.end(); ++iter)
{
- success = iter->second->writeToFile(&apr_file) ;
+ if(!removal_enabled || iter->second->isValid())
+ {
+ success = iter->second->writeToFile(&apr_file) ;
+ if(!success)
+ {
+ break;
+ }
+ }
}
}
}
@@ -746,7 +1545,6 @@ void LLVOCache::writeToCache(U64 handle, const LLUUID& id, const LLVOCacheEntry:
if(!success)
{
removeEntry(entry) ;
-
}
return ;
diff --git a/indra/newview/llvocache.h b/indra/newview/llvocache.h
index 14e3b4c793..082f5f0b1d 100755
--- a/indra/newview/llvocache.h
+++ b/indra/newview/llvocache.h
@@ -29,51 +29,199 @@
#include "lluuid.h"
#include "lldatapacker.h"
-#include "lldlinked.h"
#include "lldir.h"
-
+#include "llvieweroctree.h"
+#include "llapr.h"
//---------------------------------------------------------------------------
// Cache entries
-class LLVOCacheEntry;
+class LLCamera;
-class LLVOCacheEntry
+class LLVOCacheEntry
+: public LLViewerOctreeEntryData,
+ public LLTrace::MemTrackable<LLVOCacheEntry, 16>
{
public:
+ enum
+ {
+ //low 16-bit state
+ INACTIVE = 0x00000000, //not visible
+ IN_QUEUE = 0x00000001, //in visible queue, object to be created
+ WAITING = 0x00000002, //object creation request sent
+ ACTIVE = 0x00000004, //object created, and in rendering pipeline.
+
+ //high 16-bit state
+ IN_VO_TREE = 0x00010000, //the entry is in the object cache tree.
+
+ LOW_BITS = 0x0000ffff,
+ HIGH_BITS = 0xffff0000
+ };
+
+ struct CompareVOCacheEntry
+ {
+ bool operator()(const LLVOCacheEntry* const& lhs, const LLVOCacheEntry* const& rhs)
+ {
+ F32 lpa = lhs->getSceneContribution();
+ F32 rpa = rhs->getSceneContribution();
+
+ //larger pixel area first
+ if(lpa > rpa)
+ {
+ return true;
+ }
+ else if(lpa < rpa)
+ {
+ return false;
+ }
+ else
+ {
+ return lhs < rhs;
+ }
+ }
+ };
+protected:
+ ~LLVOCacheEntry();
+public:
LLVOCacheEntry(U32 local_id, U32 crc, LLDataPackerBinaryBuffer &dp);
LLVOCacheEntry(LLAPRFile* apr_file);
- LLVOCacheEntry();
- ~LLVOCacheEntry();
+ LLVOCacheEntry();
+
+ void updateEntry(U32 crc, LLDataPackerBinaryBuffer &dp);
+
+ void clearState(U32 state) {mState &= ~state;}
+ bool hasState(U32 state) {return mState & state;}
+ void setState(U32 state);
+ bool isState(U32 state) {return (mState & LOW_BITS) == state;}
+ U32 getState() const {return mState & LOW_BITS;}
+
+ bool isAnyVisible(const LLVector4a& camera_origin, const LLVector4a& local_camera_origin, F32 dist_threshold);
U32 getLocalID() const { return mLocalID; }
U32 getCRC() const { return mCRC; }
S32 getHitCount() const { return mHitCount; }
S32 getCRCChangeCount() const { return mCRCChangeCount; }
+
+ void calcSceneContribution(const LLVector4a& camera_origin, bool needs_update, U32 last_update, F32 dist_threshold);
+ void setSceneContribution(F32 scene_contrib) {mSceneContrib = scene_contrib;}
+ F32 getSceneContribution() const { return mSceneContrib;}
void dump() const;
BOOL writeToFile(LLAPRFile* apr_file) const;
- void assignCRC(U32 crc, LLDataPackerBinaryBuffer &dp);
- LLDataPackerBinaryBuffer *getDP(U32 crc);
+ LLDataPackerBinaryBuffer *getDP();
void recordHit();
void recordDupe() { mDupeCount++; }
+
+ /*virtual*/ void setOctreeEntry(LLViewerOctreeEntry* entry);
+
+ void setParentID(U32 id);
+ U32 getParentID() const {return mParentID;}
+ bool isChild() const {return mParentID > 0;}
+
+ void addChild(LLVOCacheEntry* entry);
+ void removeChild(LLVOCacheEntry* entry);
+ void removeAllChildren();
+ LLVOCacheEntry* getChild(); //remove the first child, and return it.
+ S32 getNumOfChildren() const {return mChildrenList.size();}
+
+ void setBoundingInfo(const LLVector3& pos, const LLVector3& scale); //called from processing object update message
+ void updateParentBoundingInfo();
+ void saveBoundingSphere();
+
+ void setValid(BOOL valid = TRUE) {mValid = valid;}
+ BOOL isValid() const {return mValid;}
+
+ void setUpdateFlags(U32 flags) {mUpdateFlags = flags;}
+ U32 getUpdateFlags() const {return mUpdateFlags;}
+
+ static void updateDebugSettings();
+ static F32 getSquaredPixelThreshold(bool is_front);
+
+private:
+ void updateParentBoundingInfo(const LLVOCacheEntry* child);
public:
- typedef std::map<U32, LLVOCacheEntry*> vocache_entry_map_t;
+ typedef std::map<U32, LLPointer<LLVOCacheEntry> > vocache_entry_map_t;
+ typedef std::set<LLVOCacheEntry*> vocache_entry_set_t;
+ typedef std::set<LLVOCacheEntry*, CompareVOCacheEntry> vocache_entry_priority_list_t;
+ S32 mLastCameraUpdated;
protected:
U32 mLocalID;
+ U32 mParentID;
U32 mCRC;
+ U32 mUpdateFlags; //receive from sim
S32 mHitCount;
S32 mDupeCount;
S32 mCRCChangeCount;
LLDataPackerBinaryBuffer mDP;
U8 *mBuffer;
+
+ F32 mSceneContrib; //projected scene contributuion of this object.
+ U32 mState; //high 16 bits reserved for special use.
+ vocache_entry_set_t mChildrenList; //children entries in a linked set.
+
+ BOOL mValid; //if set, this entry is valid, otherwise it is invalid and will be removed.
+
+ LLVector4a mBSphereCenter; //bounding sphere center
+ F32 mBSphereRadius; //bounding sphere radius
+
+public:
+ static U32 sMinFrameRange;
+ static F32 sNearRadius;
+ static F32 sRearFarRadius;
+ static F32 sFrontPixelThreshold;
+ static F32 sRearPixelThreshold;
+};
+
+class LLVOCacheGroup : public LLOcclusionCullingGroup
+{
+public:
+ LLVOCacheGroup(OctreeNode* node, LLViewerOctreePartition* part) : LLOcclusionCullingGroup(node, part){}
+
+ //virtual
+ void handleChildAddition(const OctreeNode* parent, OctreeNode* child);
+
+protected:
+ virtual ~LLVOCacheGroup();
+};
+
+class LLVOCachePartition : public LLViewerOctreePartition, public LLTrace::MemTrackable<LLVOCachePartition>
+{
+public:
+ LLVOCachePartition(LLViewerRegion* regionp);
+
+ bool addEntry(LLViewerOctreeEntry* entry);
+ void removeEntry(LLViewerOctreeEntry* entry);
+ /*virtual*/ S32 cull(LLCamera &camera, bool do_occlusion);
+ void addOccluders(LLViewerOctreeGroup* gp);
+ void resetOccluders();
+ void processOccluders(LLCamera* camera);
+ void removeOccluder(LLVOCacheGroup* group);
+
+ void setCullHistory(BOOL has_new_object);
+
+ bool isFrontCull() const {return mFrontCull;}
+
+private:
+ void selectBackObjects(LLCamera &camera, F32 projection_area_cutoff, bool use_occlusion); //select objects behind camera.
+
+public:
+ static BOOL sNeedsOcclusionCheck;
+
+private:
+ BOOL mFrontCull; //the view frustum cull if set, otherwise is back sphere cull.
+ U32 mCullHistory;
+ U32 mCulledTime[LLViewerCamera::NUM_CAMERAS];
+ std::set<LLVOCacheGroup*> mOccludedGroups;
+
+ S32 mBackSlectionEnabled; //enable to select back objects if > 0.
+ U32 mIdleHash;
};
//
//Note: LLVOCache is not thread-safe
//
-class LLVOCache
+class LLVOCache : public LLSingleton<LLVOCache>
{
private:
struct HeaderEntryInfo
@@ -106,19 +254,20 @@ private:
typedef std::set<HeaderEntryInfo*, header_entry_less> header_entry_queue_t;
typedef std::map<U64, HeaderEntryInfo*> handle_entry_map_t;
private:
+ friend class LLSingleton<LLVOCache>;
LLVOCache() ;
public:
~LLVOCache() ;
void initCache(ELLPath location, U32 size, U32 cache_version) ;
- void removeCache(ELLPath location) ;
+ void removeCache(ELLPath location, bool started = false) ;
void readFromCache(U64 handle, const LLUUID& id, LLVOCacheEntry::vocache_entry_map_t& cache_entry_map) ;
- void writeToCache(U64 handle, const LLUUID& id, const LLVOCacheEntry::vocache_entry_map_t& cache_entry_map, BOOL dirty_cache) ;
+ 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);
@@ -134,9 +283,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;
@@ -145,12 +294,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/llvograss.cpp b/indra/newview/llvograss.cpp
index 600b44d371..b79a48012a 100755
--- a/indra/newview/llvograss.cpp
+++ b/indra/newview/llvograss.cpp
@@ -28,7 +28,6 @@
#include "llvograss.h"
-#include "imageids.h"
#include "llviewercontrol.h"
#include "llagentcamera.h"
@@ -98,7 +97,7 @@ void LLVOGrass::updateSpecies()
if (!sSpeciesTable.count(mSpecies))
{
- llinfos << "Unknown grass type, substituting grass type." << llendl;
+ LL_INFOS() << "Unknown grass type, substituting grass type." << LL_ENDL;
SpeciesMap::const_iterator it = sSpeciesTable.begin();
mSpecies = (*it).first;
}
@@ -120,7 +119,7 @@ void LLVOGrass::initClass()
if (!grass_def_grass.parseFile(xml_filename))
{
- llerrs << "Failed to parse grass file." << llendl;
+ LL_ERRS() << "Failed to parse grass file." << LL_ENDL;
return;
}
@@ -132,7 +131,7 @@ void LLVOGrass::initClass()
{
if (!grass_def->hasName("grass"))
{
- llwarns << "Invalid grass definition node " << grass_def->getName() << llendl;
+ LL_WARNS() << "Invalid grass definition node " << grass_def->getName() << LL_ENDL;
continue;
}
F32 F32_val;
@@ -144,13 +143,13 @@ void LLVOGrass::initClass()
static LLStdStringHandle species_id_string = LLXmlTree::addAttributeString("species_id");
if (!grass_def->getFastAttributeS32(species_id_string, species))
{
- llwarns << "No species id defined" << llendl;
+ LL_WARNS() << "No species id defined" << LL_ENDL;
continue;
}
if (species < 0)
{
- llwarns << "Invalid species id " << species << llendl;
+ LL_WARNS() << "Invalid species id " << species << LL_ENDL;
continue;
}
@@ -171,7 +170,7 @@ void LLVOGrass::initClass()
if (sSpeciesTable.count(species))
{
- llinfos << "Grass species " << species << " already defined! Duplicate discarded." << llendl;
+ LL_INFOS() << "Grass species " << species << " already defined! Duplicate discarded." << LL_ENDL;
delete newGrass;
continue;
}
@@ -187,7 +186,7 @@ void LLVOGrass::initClass()
std::string name;
static LLStdStringHandle name_string = LLXmlTree::addAttributeString("name");
grass_def->getFastAttributeString(name_string, name);
- llwarns << "Incomplete definition of grass " << name << llendl;
+ LL_WARNS() << "Incomplete definition of grass " << name << LL_ENDL;
}
}
@@ -259,7 +258,7 @@ U32 LLVOGrass::processUpdateMessage(LLMessageSystem *mesgsys,
||(getAcceleration().lengthSquared() > 0.f)
||(getAngularVelocity().lengthSquared() > 0.f))
{
- llinfos << "ACK! Moving grass!" << llendl;
+ LL_INFOS() << "ACK! Moving grass!" << LL_ENDL;
setVelocity(LLVector3::zero);
setAcceleration(LLVector3::zero);
setAngularVelocity(LLVector3::zero);
@@ -414,11 +413,11 @@ LLDrawable* LLVOGrass::createDrawable(LLPipeline *pipeline)
return mDrawable;
}
-static LLFastTimer::DeclareTimer FTM_UPDATE_GRASS("Update Grass");
+static LLTrace::BlockTimerStatHandle FTM_UPDATE_GRASS("Update Grass");
BOOL LLVOGrass::updateGeometry(LLDrawable *drawable)
{
- LLFastTimer ftm(FTM_UPDATE_GRASS);
+ LL_RECORD_BLOCK_TIME(FTM_UPDATE_GRASS);
dirtySpatialGroup();
@@ -446,7 +445,7 @@ void LLVOGrass::plantBlades()
// This is bad, but not the end of the world.
if (!sSpeciesTable.count(mSpecies))
{
- llinfos << "Unknown grass species " << mSpecies << llendl;
+ LL_INFOS() << "Unknown grass species " << mSpecies << LL_ENDL;
return;
}
@@ -605,8 +604,8 @@ U32 LLVOGrass::getPartitionType() const
return LLViewerRegion::PARTITION_GRASS;
}
-LLGrassPartition::LLGrassPartition()
-: LLSpatialPartition(LLDrawPoolAlpha::VERTEX_DATA_MASK | LLVertexBuffer::MAP_TEXTURE_INDEX, TRUE, GL_STREAM_DRAW_ARB)
+LLGrassPartition::LLGrassPartition(LLViewerRegion* regionp)
+: LLSpatialPartition(LLDrawPoolAlpha::VERTEX_DATA_MASK | LLVertexBuffer::MAP_TEXTURE_INDEX, TRUE, GL_STREAM_DRAW_ARB, regionp)
{
mDrawableType = LLPipeline::RENDER_TYPE_GRASS;
mPartitionType = LLViewerRegion::PARTITION_GRASS;
@@ -626,9 +625,9 @@ void LLGrassPartition::addGeometryCount(LLSpatialGroup* group, U32& vertex_count
LLViewerCamera* camera = LLViewerCamera::getInstance();
for (LLSpatialGroup::element_iter i = group->getDataBegin(); i != group->getDataEnd(); ++i)
{
- LLDrawable* drawablep = *i;
+ LLDrawable* drawablep = (LLDrawable*)(*i)->getDrawable();
- if (drawablep->isDead())
+ if (!drawablep || drawablep->isDead())
{
continue;
}
@@ -673,11 +672,11 @@ void LLGrassPartition::addGeometryCount(LLSpatialGroup* group, U32& vertex_count
}
}
-static LLFastTimer::DeclareTimer FTM_REBUILD_GRASS_VB("Grass VB");
+static LLTrace::BlockTimerStatHandle FTM_REBUILD_GRASS_VB("Grass VB");
void LLGrassPartition::getGeometry(LLSpatialGroup* group)
{
- LLFastTimer ftm(FTM_REBUILD_GRASS_VB);
+ LL_RECORD_BLOCK_TIME(FTM_REBUILD_GRASS_VB);
std::sort(mFaceList.begin(), mFaceList.end(), LLFace::CompareDistanceGreater());
@@ -744,8 +743,10 @@ void LLGrassPartition::getGeometry(LLSpatialGroup* group)
LLDrawInfo* info = new LLDrawInfo(start,end,count,offset,facep->getTexture(),
//facep->getTexture(),
buffer, fullbright);
- info->mExtents[0] = group->mObjectExtents[0];
- info->mExtents[1] = group->mObjectExtents[1];
+
+ const LLVector4a* exts = group->getObjectExtents();
+ info->mExtents[0] = exts[0];
+ info->mExtents[1] = exts[1];
info->mVSize = vsize;
draw_vec.push_back(info);
//for alpha sorting
diff --git a/indra/newview/llvograss.h b/indra/newview/llvograss.h
index ff4fa6b00d..71d358362d 100755
--- a/indra/newview/llvograss.h
+++ b/indra/newview/llvograss.h
@@ -28,7 +28,6 @@
#define LL_LLVOGRASS_H
#include "llviewerobject.h"
-#include "lldarray.h"
#include <map>
class LLSurfacePatch;
diff --git a/indra/newview/llvoicechannel.cpp b/indra/newview/llvoicechannel.cpp
index ac2a34ba1e..312842a70f 100755
--- 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 e17da9cecd..1e20a814a0 100755
--- 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/llvoicevisualizer.cpp b/indra/newview/llvoicevisualizer.cpp
index 9281334d81..23a8a61b85 100755
--- a/indra/newview/llvoicevisualizer.cpp
+++ b/indra/newview/llvoicevisualizer.cpp
@@ -310,7 +310,7 @@ void LLVoiceVisualizer::lipSyncOohAah( F32& ooh, F32& aah )
aah = transfer_aah * sAah[elapsed_aahs];
/*
- llinfos << " elapsed frames " << elapsed_frames
+ LL_INFOS() << " elapsed frames " << elapsed_frames
<< " ooh " << ooh
<< " aah " << aah
<< " transfer ooh" << transfer_ooh
@@ -320,7 +320,7 @@ void LLVoiceVisualizer::lipSyncOohAah( F32& ooh, F32& aah )
<< " elapsed time " << elapsed_time
<< " elapsed oohs " << elapsed_oohs
<< " elapsed aahs " << elapsed_aahs
- << llendl;
+ << LL_ENDL;
*/
}
else
@@ -590,7 +590,7 @@ void LLVoiceVisualizer::unpackData(LLMessageSystem *mesgsys, S32 blocknum)
S32 size = mesgsys->getSizeFast(_PREHASH_Effect, blocknum, _PREHASH_TypeData);
if (size != 1)
{
- llwarns << "Voice effect with bad size " << size << llendl;
+ LL_WARNS() << "Voice effect with bad size " << size << LL_ENDL;
return;
}
mesgsys->getBinaryDataFast(_PREHASH_Effect, _PREHASH_TypeData, packed_data, 1, blocknum);
diff --git a/indra/newview/llvoicevivox.cpp b/indra/newview/llvoicevivox.cpp
index 050d9dd785..09a2003ef8 100755
--- a/indra/newview/llvoicevivox.cpp
+++ b/indra/newview/llvoicevivox.cpp
@@ -1343,7 +1343,7 @@ void LLVivoxVoiceClient::stateMachine()
{
// Notify observers to let them know there is problem with voice
notifyStatusObservers(LLVoiceClientStatusObserver::STATUS_VOICE_DISABLED);
- llwarns << "There seems to be problem with connection to voice server. Disabling voice chat abilities." << llendl;
+ LL_WARNS() << "There seems to be problem with connection to voice server. Disabling voice chat abilities." << LL_ENDL;
}
// Increase mSpatialJoiningNum only for spatial sessions- it's normal to reach this case for
@@ -5824,8 +5824,8 @@ void LLVivoxVoiceClient::expireVoiceFonts()
// Give a warning notification if any voice fonts are due to expire.
if (will_expire)
{
- S32 seconds = gSavedSettings.getS32("VoiceEffectExpiryWarningTime");
- args["INTERVAL"] = llformat("%d", seconds / SEC_PER_DAY);
+ S32Seconds seconds(gSavedSettings.getS32("VoiceEffectExpiryWarningTime"));
+ args["INTERVAL"] = llformat("%d", LLUnit<S32, LLUnits::Days>(seconds).value());
LLNotificationsUtil::add("VoiceEffectsWillExpire", args);
}
@@ -6318,7 +6318,7 @@ LLVivoxProtocolParser::~LLVivoxProtocolParser()
XML_ParserFree(parser);
}
-static LLFastTimer::DeclareTimer FTM_VIVOX_PROCESS("Vivox Process");
+static LLTrace::BlockTimerStatHandle FTM_VIVOX_PROCESS("Vivox Process");
// virtual
LLIOPipe::EStatus LLVivoxProtocolParser::process_impl(
@@ -6328,7 +6328,7 @@ LLIOPipe::EStatus LLVivoxProtocolParser::process_impl(
LLSD& context,
LLPumpIO* pump)
{
- LLFastTimer t(FTM_VIVOX_PROCESS);
+ LL_RECORD_BLOCK_TIME(FTM_VIVOX_PROCESS);
LLBufferStream istr(channels, buffer.get());
std::ostringstream ostr;
while (istr.good())
diff --git a/indra/newview/llvoinventorylistener.h b/indra/newview/llvoinventorylistener.h
index bf14d19b01..c50c475478 100755
--- 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/llvopartgroup.cpp b/indra/newview/llvopartgroup.cpp
index 54e27ff4c6..c1593fa5fc 100755
--- a/indra/newview/llvopartgroup.cpp
+++ b/indra/newview/llvopartgroup.cpp
@@ -46,7 +46,7 @@
const F32 MAX_PART_LIFETIME = 120.f;
-extern U64 gFrameTime;
+extern U64MicrosecondsImplicit gFrameTime;
LLPointer<LLVertexBuffer> LLVOPartGroup::sVB = NULL;
S32 LLVOPartGroup::sVBSlotCursor = 0;
@@ -292,10 +292,10 @@ LLVector3 LLVOPartGroup::getCameraPosition() const
return gAgentCamera.getCameraPositionAgent();
}
-static LLFastTimer::DeclareTimer FTM_UPDATE_PARTICLES("Update Particles");
+static LLTrace::BlockTimerStatHandle FTM_UPDATE_PARTICLES("Update Particles");
BOOL LLVOPartGroup::updateGeometry(LLDrawable *drawable)
{
- LLFastTimer ftm(FTM_UPDATE_PARTICLES);
+ LL_RECORD_BLOCK_TIME(FTM_UPDATE_PARTICLES);
dirtySpatialGroup();
@@ -405,7 +405,7 @@ BOOL LLVOPartGroup::updateGeometry(LLDrawable *drawable)
facep = drawable->getFace(i);
if (!facep)
{
- llwarns << "No face found for index " << i << "!" << llendl;
+ LL_WARNS() << "No face found for index " << i << "!" << LL_ENDL;
continue;
}
@@ -451,7 +451,7 @@ BOOL LLVOPartGroup::updateGeometry(LLDrawable *drawable)
LLFace* facep = drawable->getFace(i);
if (!facep)
{
- llwarns << "No face found for index " << i << "!" << llendl;
+ LL_WARNS() << "No face found for index " << i << "!" << LL_ENDL;
continue;
}
facep->setTEOffset(i);
@@ -722,8 +722,8 @@ U32 LLVOPartGroup::getPartitionType() const
return LLViewerRegion::PARTITION_PARTICLE;
}
-LLParticlePartition::LLParticlePartition()
-: LLSpatialPartition(LLDrawPoolAlpha::VERTEX_DATA_MASK | LLVertexBuffer::MAP_TEXTURE_INDEX, TRUE, GL_STREAM_DRAW_ARB)
+LLParticlePartition::LLParticlePartition(LLViewerRegion* regionp)
+: LLSpatialPartition(LLDrawPoolAlpha::VERTEX_DATA_MASK | LLVertexBuffer::MAP_TEXTURE_INDEX, TRUE, GL_STREAM_DRAW_ARB, regionp)
{
mRenderPass = LLRenderPass::PASS_ALPHA;
mDrawableType = LLPipeline::RENDER_TYPE_PARTICLES;
@@ -732,18 +732,18 @@ LLParticlePartition::LLParticlePartition()
mLODPeriod = 1;
}
-LLHUDParticlePartition::LLHUDParticlePartition() :
- LLParticlePartition()
+LLHUDParticlePartition::LLHUDParticlePartition(LLViewerRegion* regionp) :
+ LLParticlePartition(regionp)
{
mDrawableType = LLPipeline::RENDER_TYPE_HUD_PARTICLES;
mPartitionType = LLViewerRegion::PARTITION_HUD_PARTICLE;
}
-static LLFastTimer::DeclareTimer FTM_REBUILD_PARTICLE_VBO("Particle VBO");
+static LLTrace::BlockTimerStatHandle FTM_REBUILD_PARTICLE_VBO("Particle VBO");
void LLParticlePartition::rebuildGeom(LLSpatialGroup* group)
{
- if (group->isDead() || !group->isState(LLSpatialGroup::GEOM_DIRTY))
+ if (group->isDead() || !group->hasState(LLSpatialGroup::GEOM_DIRTY))
{
return;
}
@@ -754,7 +754,7 @@ void LLParticlePartition::rebuildGeom(LLSpatialGroup* group)
group->mLastUpdateViewAngle = group->mViewAngle;
}
- LLFastTimer ftm(FTM_REBUILD_PARTICLE_VBO);
+ LL_RECORD_BLOCK_TIME(FTM_REBUILD_PARTICLE_VBO);
group->clearDrawMap();
@@ -791,9 +791,9 @@ void LLParticlePartition::addGeometryCount(LLSpatialGroup* group, U32& vertex_co
LLViewerCamera* camera = LLViewerCamera::getInstance();
for (LLSpatialGroup::element_iter i = group->getDataBegin(); i != group->getDataEnd(); ++i)
{
- LLDrawable* drawablep = *i;
+ LLDrawable* drawablep = (LLDrawable*)(*i)->getDrawable();
- if (drawablep->isDead())
+ if (!drawablep || drawablep->isDead())
{
continue;
}
@@ -828,11 +828,11 @@ void LLParticlePartition::addGeometryCount(LLSpatialGroup* group, U32& vertex_co
}
-static LLFastTimer::DeclareTimer FTM_REBUILD_PARTICLE_GEOM("Particle Geom");
+static LLTrace::BlockTimerStatHandle FTM_REBUILD_PARTICLE_GEOM("Particle Geom");
void LLParticlePartition::getGeometry(LLSpatialGroup* group)
{
- LLFastTimer ftm(FTM_REBUILD_PARTICLE_GEOM);
+ LL_RECORD_BLOCK_TIME(FTM_REBUILD_PARTICLE_GEOM);
std::sort(mFaceList.begin(), mFaceList.end(), LLFace::CompareDistanceGreater());
@@ -958,8 +958,10 @@ void LLParticlePartition::getGeometry(LLSpatialGroup* group)
LLDrawInfo* info = new LLDrawInfo(start,end,count,offset,facep->getTexture(),
//facep->getTexture(),
buffer, fullbright);
- info->mExtents[0] = group->mObjectExtents[0];
- info->mExtents[1] = group->mObjectExtents[1];
+
+ const LLVector4a* exts = group->getObjectExtents();
+ info->mExtents[0] = exts[0];
+ info->mExtents[1] = exts[1];
info->mVSize = vsize;
info->mBlendFuncDst = bf_dst;
info->mBlendFuncSrc = bf_src;
diff --git a/indra/newview/llvosky.cpp b/indra/newview/llvosky.cpp
index 93f0e50336..07c2f0d44d 100755
--- a/indra/newview/llvosky.cpp
+++ b/indra/newview/llvosky.cpp
@@ -28,11 +28,9 @@
#include "llvosky.h"
-#include "imageids.h"
#include "llfeaturemanager.h"
#include "llviewercontrol.h"
#include "llframetimer.h"
-#include "timing.h"
#include "llagent.h"
#include "llagentcamera.h"
@@ -1245,7 +1243,7 @@ void LLVOSky::createDummyVertexBuffer()
}
}
-static LLFastTimer::DeclareTimer FTM_RENDER_FAKE_VBO_UPDATE("Fake VBO Update");
+static LLTrace::BlockTimerStatHandle FTM_RENDER_FAKE_VBO_UPDATE("Fake VBO Update");
void LLVOSky::updateDummyVertexBuffer()
{
@@ -1258,7 +1256,7 @@ void LLVOSky::updateDummyVertexBuffer()
return ;
}
- LLFastTimer t(FTM_RENDER_FAKE_VBO_UPDATE) ;
+ LL_RECORD_BLOCK_TIME(FTM_RENDER_FAKE_VBO_UPDATE) ;
if(!mFace[FACE_DUMMY] || !mFace[FACE_DUMMY]->getVertexBuffer())
createDummyVertexBuffer() ;
@@ -1271,11 +1269,11 @@ void LLVOSky::updateDummyVertexBuffer()
//----------------------------------
//end of fake vertex buffer updating
//----------------------------------
-static LLFastTimer::DeclareTimer FTM_GEO_SKY("Sky Geometry");
+static LLTrace::BlockTimerStatHandle FTM_GEO_SKY("Sky Geometry");
BOOL LLVOSky::updateGeometry(LLDrawable *drawable)
{
- LLFastTimer ftm(FTM_GEO_SKY);
+ LL_RECORD_BLOCK_TIME(FTM_GEO_SKY);
if (mFace[FACE_REFLECTION] == NULL)
{
LLDrawPoolWater *poolp = (LLDrawPoolWater*) gPipeline.getPool(LLDrawPool::POOL_WATER);
@@ -2146,7 +2144,7 @@ void LLVOSky::updateFog(const F32 distance)
// get the water param manager variables
float water_fog_density = LLWaterParamManager::getInstance()->getFogDensity();
- LLColor4 water_fog_color = LLDrawPoolWater::sWaterFogColor.mV;
+ LLColor4 water_fog_color(LLDrawPoolWater::sWaterFogColor.mV);
// adjust the color based on depth. We're doing linear approximations
float depth_scale = gSavedSettings.getF32("WaterGLFogDepthScale");
diff --git a/indra/newview/llvosurfacepatch.cpp b/indra/newview/llvosurfacepatch.cpp
index 9a5c5831ca..79e1921f1b 100755
--- a/indra/newview/llvosurfacepatch.cpp
+++ b/indra/newview/llvosurfacepatch.cpp
@@ -72,7 +72,7 @@ public:
if ((data_mask & type_mask) != data_mask)
{
- llerrs << "LLVertexBuffer::setupVertexBuffer missing required components for supplied data mask." << llendl;
+ LL_ERRS() << "LLVertexBuffer::setupVertexBuffer missing required components for supplied data mask." << LL_ENDL;
}
if (data_mask & MAP_NORMAL)
@@ -212,7 +212,7 @@ LLDrawable *LLVOSurfacePatch::createDrawable(LLPipeline *pipeline)
return mDrawable;
}
-static LLFastTimer::DeclareTimer FTM_UPDATE_TERRAIN("Update Terrain");
+static LLTrace::BlockTimerStatHandle FTM_UPDATE_TERRAIN("Update Terrain");
void LLVOSurfacePatch::updateGL()
{
@@ -224,7 +224,7 @@ void LLVOSurfacePatch::updateGL()
BOOL LLVOSurfacePatch::updateGeometry(LLDrawable *drawable)
{
- LLFastTimer ftm(FTM_UPDATE_TERRAIN);
+ LL_RECORD_BLOCK_TIME(FTM_UPDATE_TERRAIN);
dirtySpatialGroup(TRUE);
@@ -291,7 +291,7 @@ void LLVOSurfacePatch::updateFaceSize(S32 idx)
{
if (idx != 0)
{
- llwarns << "Terrain partition requested invalid face!!!" << llendl;
+ LL_WARNS() << "Terrain partition requested invalid face!!!" << LL_ENDL;
return;
}
@@ -1056,8 +1056,8 @@ U32 LLVOSurfacePatch::getPartitionType() const
return LLViewerRegion::PARTITION_TERRAIN;
}
-LLTerrainPartition::LLTerrainPartition()
-: LLSpatialPartition(LLDrawPoolTerrain::VERTEX_DATA_MASK, FALSE, GL_DYNAMIC_DRAW_ARB)
+LLTerrainPartition::LLTerrainPartition(LLViewerRegion* regionp)
+: LLSpatialPartition(LLDrawPoolTerrain::VERTEX_DATA_MASK, FALSE, GL_DYNAMIC_DRAW_ARB, regionp)
{
mOcclusionEnabled = FALSE;
mInfiniteFarClip = TRUE;
@@ -1070,10 +1070,10 @@ LLVertexBuffer* LLTerrainPartition::createVertexBuffer(U32 type_mask, U32 usage)
return new LLVertexBufferTerrain();
}
-static LLFastTimer::DeclareTimer FTM_REBUILD_TERRAIN_VB("Terrain VB");
+static LLTrace::BlockTimerStatHandle FTM_REBUILD_TERRAIN_VB("Terrain VB");
void LLTerrainPartition::getGeometry(LLSpatialGroup* group)
{
- LLFastTimer ftm(FTM_REBUILD_TERRAIN_VB);
+ LL_RECORD_BLOCK_TIME(FTM_REBUILD_TERRAIN_VB);
LLVertexBuffer* buffer = group->mVertexBuffer;
diff --git a/indra/newview/llvosurfacepatch.h b/indra/newview/llvosurfacepatch.h
index 7b53219be8..3383b16dd9 100755
--- 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/llvotree.cpp b/indra/newview/llvotree.cpp
index b82c4fe769..66c0ace79d 100755
--- a/indra/newview/llvotree.cpp
+++ b/indra/newview/llvotree.cpp
@@ -112,7 +112,7 @@ void LLVOTree::initClass()
if (!tree_def_tree.parseFile(xml_filename))
{
- llerrs << "Failed to parse tree file." << llendl;
+ LL_ERRS() << "Failed to parse tree file." << LL_ENDL;
}
LLXmlTreeNode* rootp = tree_def_tree.getRoot();
@@ -123,7 +123,7 @@ void LLVOTree::initClass()
{
if (!tree_def->hasName("tree"))
{
- llwarns << "Invalid tree definition node " << tree_def->getName() << llendl;
+ LL_WARNS() << "Invalid tree definition node " << tree_def->getName() << LL_ENDL;
continue;
}
F32 F32_val;
@@ -138,19 +138,19 @@ void LLVOTree::initClass()
static LLStdStringHandle species_id_string = LLXmlTree::addAttributeString("species_id");
if (!tree_def->getFastAttributeS32(species_id_string, species))
{
- llwarns << "No species id defined" << llendl;
+ LL_WARNS() << "No species id defined" << LL_ENDL;
continue;
}
if (species < 0)
{
- llwarns << "Invalid species id " << species << llendl;
+ LL_WARNS() << "Invalid species id " << species << LL_ENDL;
continue;
}
if (sSpeciesTable.count(species))
{
- llwarns << "Tree species " << species << " already defined! Duplicate discarded." << llendl;
+ LL_WARNS() << "Tree species " << species << " already defined! Duplicate discarded." << LL_ENDL;
continue;
}
@@ -241,7 +241,7 @@ void LLVOTree::initClass()
std::string name;
static LLStdStringHandle name_string = LLXmlTree::addAttributeString("name");
tree_def->getFastAttributeString(name_string, name);
- llwarns << "Incomplete definition of tree " << name << llendl;
+ LL_WARNS() << "Incomplete definition of tree " << name << LL_ENDL;
}
}
@@ -284,7 +284,7 @@ U32 LLVOTree::processUpdateMessage(LLMessageSystem *mesgsys,
||(getAcceleration().lengthSquared() > 0.f)
||(getAngularVelocity().lengthSquared() > 0.f))
{
- llinfos << "ACK! Moving tree!" << llendl;
+ LL_INFOS() << "ACK! Moving tree!" << LL_ENDL;
setVelocity(LLVector3::zero);
setAcceleration(LLVector3::zero);
setAngularVelocity(LLVector3::zero);
@@ -480,11 +480,11 @@ LLDrawable* LLVOTree::createDrawable(LLPipeline *pipeline)
const S32 LEAF_INDICES = 24;
const S32 LEAF_VERTICES = 16;
-static LLFastTimer::DeclareTimer FTM_UPDATE_TREE("Update Tree");
+static LLTrace::BlockTimerStatHandle FTM_UPDATE_TREE("Update Tree");
BOOL LLVOTree::updateGeometry(LLDrawable *drawable)
{
- LLFastTimer ftm(FTM_UPDATE_TREE);
+ LL_RECORD_BLOCK_TIME(FTM_UPDATE_TREE);
if(mTrunkLOD >= sMAX_NUM_TREE_LOD_LEVELS) //do not display the tree.
{
@@ -698,8 +698,8 @@ BOOL LLVOTree::updateGeometry(LLDrawable *drawable)
slices = sLODSlices[lod];
F32 base_radius = 0.65f;
F32 top_radius = base_radius * sSpeciesTable[mSpecies]->mTaper;
- //llinfos << "Species " << ((U32) mSpecies) << ", taper = " << sSpeciesTable[mSpecies].mTaper << llendl;
- //llinfos << "Droop " << mDroop << ", branchlength: " << mBranchLength << llendl;
+ //LL_INFOS() << "Species " << ((U32) mSpecies) << ", taper = " << sSpeciesTable[mSpecies].mTaper << LL_ENDL;
+ //LL_INFOS() << "Droop " << mDroop << ", branchlength: " << mBranchLength << LL_ENDL;
F32 angle = 0;
F32 angle_inc = 360.f/(slices-1);
F32 z = 0.f;
@@ -1168,8 +1168,8 @@ U32 LLVOTree::getPartitionType() const
return LLViewerRegion::PARTITION_TREE;
}
-LLTreePartition::LLTreePartition()
-: LLSpatialPartition(0, FALSE, GL_DYNAMIC_DRAW_ARB)
+LLTreePartition::LLTreePartition(LLViewerRegion* regionp)
+: LLSpatialPartition(0, FALSE, GL_DYNAMIC_DRAW_ARB, regionp)
{
mDrawableType = LLPipeline::RENDER_TYPE_TREE;
mPartitionType = LLViewerRegion::PARTITION_TREE;
diff --git a/indra/newview/llvotree.h b/indra/newview/llvotree.h
index 6137ae412d..c862de8230 100755
--- a/indra/newview/llvotree.h
+++ b/indra/newview/llvotree.h
@@ -28,7 +28,6 @@
#define LL_LLVOTREE_H
#include "llviewerobject.h"
-#include "lldarray.h"
#include "xform.h"
class LLFace;
diff --git a/indra/newview/llvotreenew.h b/indra/newview/llvotreenew.h
deleted file mode 100755
index 0bb07008ca..0000000000
--- a/indra/newview/llvotreenew.h
+++ /dev/null
@@ -1,218 +0,0 @@
-/**
- * @file llvotreenew.h
- * @brief LLVOTreeNew class header file
- *
- * $LicenseInfo:firstyear=2003&license=viewerlgpl$
- * Second Life Viewer Source Code
- * Copyright (C) 2010, Linden Research, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation;
- * version 2.1 of the License only.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- *
- * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
- * $/LicenseInfo$
- */
-
-#ifndef LL_LLVOTREENEW_H
-#define LL_LLVOTREENEW_H
-
-#include "llviewerobject.h"
-#include "lldarray.h"
-#include "xform.h"
-
-#include "lltreeparams.h"
-#include "llstrider.h"
-#include "v2math.h"
-#include "v3math.h"
-#include "llviewertexture.h"
-
-class LLFace;
-class LLDrawPool;
-
-// number of static arrays created
-const U8 MAX_SPECIES = 16; // max species of trees
-const U8 MAX_PARTS = 15; // trunk, 2 or 3 branches per species?
-const U8 MAX_RES = 6; // max # cross sections for a branch curve
-const U8 MAX_FLARE = 6; // max # cross sections for flare of trunk
-const U8 MAX_LEVELS = 3;
-
-// initial vertex array allocations
-const U32 NUM_INIT_VERTS = 5000; // number of vertices/normals/texcoords
-const U32 NUM_INIT_INDICES = 15000; // number of indices to vert array (3 vertices per triangle, roughly 3x)
-const U32 NUM_TIMES_TO_DOUBLE = 2; // if we go over initial allocations, num times to double each step
-
-// for finding the closest parts...
-
-// the parts are searched based on:
-const F32 MAX_LOBES_DIFF = 2;
-const F32 MAX_LOBEDEPTH_DIFF = .3f;
-const F32 MAX_CURVEBACK_DIFF = 20.0f;
-const F32 MAX_CURVE_DIFF = 15.0f;
-const F32 MAX_CURVE_V_DIFF = 20.0f;
-
-const F32 CURVEV_DIVIDER = 10.0f; // curveV/CURVEV_DIVIDER = # branch variances...
-const U8 MAX_VARS = 3; // max number of variations of branches
-
-const U8 MAX_RAND_NUMS = 100; // max number of rand numbers to pregenerate and store
-
-// texture params
-const F32 WIDTH_OF_BARK = .48f;
-
-class LLVOTreeNew : public LLViewerObject
-{
-public:
-
- // Some random number generators using the pre-generated random numbers
- // return +- negPos
- static S32 llrand_signed(S32 negPos)
- {
- return (ll_rand((U32)negPos * 2) - negPos);
- };
-
- static S32 llrand_signed(S32 negPos, U32 index)
- {
- return lltrunc((sRandNums[index % MAX_RAND_NUMS] * (negPos * 2.0f) - negPos));
- };
-
- static S32 llrand_unsigned(S32 pos, U32 index)
- {
- return lltrunc((sRandNums[index % MAX_RAND_NUMS] * pos));
- };
-
- // return +- negPos
- static F32 llfrand_signed(F32 negPos)
- {
- return (ll_frand(negPos * 2.0f) - negPos);
- };
-
- static F32 llfrand_signed(F32 negPos, U32 index)
- {
- return (sRandNums[index % MAX_RAND_NUMS] * negPos * 2.0f) - negPos;
- };
-
- static F32 llfrand_unsigned(F32 pos, U32 index)
- {
- return sRandNums[index % MAX_RAND_NUMS] * pos;
- };
-
- // return between 0-pos
- static F32 llfrand_unsigned(F32 pos)
- {
- return ll_frand(pos);
- };
-
- static void cleanupTextures() {}; // not needed anymore
-
- struct TreePart
- {
- F32 mRadius; // scale x/y
- F32 mLength; // scale z
- F32 mCurve;
- F32 mCurveV;
- F32 mCurveRes;
- F32 mCurveBack;
- U8 mLobes;
- F32 mLobeDepth;
- U8 mLevel;
- U32 mNumTris;
- U8 mVertsPerSection;
- U8 mNumVariants;
-
- // first index into the drawpool arrays for this particular branch
- U32 mIndiceIndex[MAX_VARS];
- U32 mOffsets[MAX_VARS][MAX_RES]; // offsets for the partial branch pieces
- // local section frames for this branch
- LLMatrix4 mFrames[MAX_VARS][(MAX_RES*(MAX_RES + 1))/2]; // (0...n) + (1...n) + ... + (n-1..n)
- LLDynamicArray<LLVector3> mFaceNormals;
-
- };
-
- LLVOTreeNew(const LLUUID &id, const LLPCode pcode, LLViewerRegion *regionp);
- virtual ~LLVOTreeNew();
-
- /*virtual*/
- U32 processUpdateMessage(LLMessageSystem *mesgsys,
- void **user_data,
- U32 block_num, const EObjectUpdateType update_type,
- LLDataPacker *dp);
-
- /*virtual*/ BOOL idleUpdate(LLAgent &agent, LLWorld &world, const F64 &time);
-
- /*virtual*/ void render(LLAgent &agent);
- /*virtual*/ void updateTextures();
-
- /*virtual*/ LLDrawable* createDrawable(LLPipeline *pipeline);
- /*virtual*/ BOOL updateGeometry(LLDrawable *drawable);
-
- F32 CalcZStep(TreePart *part, U8 section);
-
- void createPart(U8 level, F32 length, F32 radius, LLStrider<LLVector3> &vertices, LLStrider<LLVector3> &normals,
- LLStrider<LLVector2> &tex_coords, U32 *indices,
- U32 &curVertexIndex, U32 &curTexCoordIndex,
- U32 &curNormalIndex, U32 &curIndiceIndex);
-
- S32 findSimilarPart(U8 level);
-
- F32 CalculateSectionRadius(U8 level, F32 y, F32 stemLength, F32 stemRadius);
- //F32 CalculateVerticalAttraction(U8 level, LLMatrix4 &sectionFrame);
-
- void createSection(LLMatrix4 &frame, TreePart *part, F32 sectionRadius, F32 stemZ,
- LLStrider<LLVector3> &vertices, LLStrider<LLVector2> &tex_coords, U32 *indices,
- U32 &curVertexIndex, U32 &curTexCoordIndex, U32 &curIndiceIndex, U8 curSection, BOOL firstBranch);
-
- void genIndicesAndFaceNormalsForLastSection(TreePart *part, U8 numVerts, LLStrider<LLVector3> &vertices, U32 curVertexIndex, U32 *indices, U32 &curIndiceIndex, BOOL firstBranch);
-
- void genVertexNormals(TreePart *part, LLStrider<LLVector3> &normals, U8 numSections, U32 curNormalOffset);
-
- void drawTree(LLDrawPool &draw_pool, const LLMatrix4 &frame, U8 level, F32 offsetChild, F32 curLength, F32 parentLength, F32 curRadius, F32 parentRadius, U8 part, U8 variant, U8 startSection);
- void drawTree(LLDrawPool &draw_pool);
-
-
- //LLTreeParams mParams;
- U8 mSpecies;
- LLPointer<LLViewerTexture> mTreeImagep;
- LLMatrix4 mTrunkFlareFrames[MAX_FLARE];
- F32 mSegSplitsError[3];
- U32 mRandOffset[MAX_LEVELS];
-
- U32 mNumTrisDrawn;
- U32 mTotalIndices;
- U32 mTotalVerts;
-
- static void initClass();
-
- // tree params
- static LLTreeParams sParameters;
-
- // next indexes used to drawpool arrays
- static U32 sNextVertexIndex[MAX_SPECIES];
- static U32 sNextIndiceIndex[MAX_SPECIES];
-
- // tree parts
- static U32 sNextPartIndex[MAX_PARTS];
- static TreePart sTreeParts[MAX_SPECIES][MAX_PARTS];
-
- // species images
- static LLUUID sTreeImageIDs[MAX_SPECIES];
-
- // random numbers
- static F32 sRandNums[MAX_RAND_NUMS];
-
- // usage data
- static U32 sTreePartsUsed[MAX_SPECIES][MAX_PARTS][MAX_VARS];
-
-
-};
-
-#endif
diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp
index c233221e5f..d1108020ff 100755
--- a/indra/newview/llvovolume.cpp
+++ b/indra/newview/llvovolume.cpp
@@ -47,7 +47,6 @@
#include "message.h"
#include "llpluginclassmedia.h" // for code in the mediaEvent handler
#include "object_flags.h"
-#include "llagentconstants.h"
#include "lldrawable.h"
#include "lldrawpoolavatar.h"
#include "lldrawpoolbump.h"
@@ -97,9 +96,9 @@ S32 LLVOVolume::mRenderComplexity_current = 0;
LLPointer<LLObjectMediaDataClient> LLVOVolume::sObjectMediaClient = NULL;
LLPointer<LLObjectMediaNavigateClient> LLVOVolume::sObjectMediaNavigateClient = NULL;
-static LLFastTimer::DeclareTimer FTM_GEN_TRIANGLES("Generate Triangles");
-static LLFastTimer::DeclareTimer FTM_GEN_VOLUME("Generate Volumes");
-static LLFastTimer::DeclareTimer FTM_VOLUME_TEXTURES("Volume Textures");
+static LLTrace::BlockTimerStatHandle FTM_GEN_TRIANGLES("Generate Triangles");
+static LLTrace::BlockTimerStatHandle FTM_GEN_VOLUME("Generate Volumes");
+static LLTrace::BlockTimerStatHandle FTM_VOLUME_TEXTURES("Volume Textures");
extern BOOL gGLDebugLoggingEnabled;
@@ -393,8 +392,8 @@ U32 LLVOVolume::processUpdateMessage(LLMessageSystem *mesgsys,
BOOL res = LLVolumeMessage::unpackVolumeParams(&volume_params, *dp);
if (!res)
{
- llwarns << "Bogus volume parameters in object " << getID() << llendl;
- llwarns << getRegion()->getOriginGlobal() << llendl;
+ LL_WARNS() << "Bogus volume parameters in object " << getID() << LL_ENDL;
+ LL_WARNS() << getRegion()->getOriginGlobal() << LL_ENDL;
}
volume_params.setSculptID(sculpt_id, sculpt_type);
@@ -408,14 +407,14 @@ U32 LLVOVolume::processUpdateMessage(LLMessageSystem *mesgsys,
{
// There's something bogus in the data that we're unpacking.
dp->dumpBufferToLog();
- llwarns << "Flushing cache files" << llendl;
+ LL_WARNS() << "Flushing cache files" << LL_ENDL;
- if(LLVOCache::hasInstance() && getRegion())
+ if(LLVOCache::instanceExists() && getRegion())
{
LLVOCache::getInstance()->removeEntry(getRegion()->getHandle()) ;
}
- llwarns << "Bogus TE data in " << getID() << llendl;
+ LL_WARNS() << "Bogus TE data in " << getID() << LL_ENDL;
}
else
{
@@ -563,9 +562,9 @@ void LLVOVolume::animateTextures()
tex_mat.setIdentity();
LLVector3 trans ;
- trans.set(LLVector3(off_s+0.5f, off_t+0.5f, 0.f));
- tex_mat.translate(LLVector3(-0.5f, -0.5f, 0.f));
-
+ trans.set(LLVector3(off_s+0.5f, off_t+0.5f, 0.f));
+ tex_mat.translate(LLVector3(-0.5f, -0.5f, 0.f));
+
LLVector3 scale(scale_s, scale_t, 1.f);
LLQuaternion quat;
quat.setQuat(rot, 0, 0, -1.f);
@@ -667,7 +666,7 @@ BOOL LLVOVolume::isVisible() const
void LLVOVolume::updateTextureVirtualSize(bool forced)
{
- LLFastTimer ftm(FTM_VOLUME_TEXTURES);
+ LL_RECORD_BLOCK_TIME(FTM_VOLUME_TEXTURES);
// Update the pixel area of all faces
if(!forced)
@@ -1142,11 +1141,11 @@ void LLVOVolume::sculpt()
if ( low_sculpty_discard_warning_count < 10 ||
(low_sculpty_discard_warning_count % interval) == 0)
{ // Log first 10 time, then decreasing intervals afterwards otherwise this can flood the logs
- llwarns << "WARNING!!: Current discard for sculpty " << mSculptTexture->getID()
+ LL_WARNS() << "WARNING!!: Current discard for sculpty " << mSculptTexture->getID()
<< " at " << current_discard
<< " is less than -2."
<< " Hit this " << low_sculpty_discard_warning_count << " times"
- << llendl;
+ << LL_ENDL;
}
low_sculpty_discard_warning_count++;
@@ -1161,11 +1160,11 @@ void LLVOVolume::sculpt()
if ( high_sculpty_discard_warning_count < 10 ||
(high_sculpty_discard_warning_count % interval) == 0)
{ // Log first 10 time, then decreasing intervals afterwards otherwise this can flood the logs
- llwarns << "WARNING!!: Current discard for sculpty " << mSculptTexture->getID()
+ LL_WARNS() << "WARNING!!: Current discard for sculpty " << mSculptTexture->getID()
<< " at " << current_discard
<< " is more than than allowed max of " << MAX_DISCARD_LEVEL
<< ". Hit this " << high_sculpty_discard_warning_count << " times"
- << llendl;
+ << LL_ENDL;
}
high_sculpty_discard_warning_count++;
@@ -1299,10 +1298,8 @@ BOOL LLVOVolume::calcLOD()
mLOD = cur_detail;
return TRUE;
}
- else
- {
- return FALSE;
- }
+
+ return FALSE;
}
BOOL LLVOVolume::updateLOD()
@@ -1625,18 +1622,18 @@ void LLVOVolume::updateRelativeXform(bool force_identity)
}
}
-static LLFastTimer::DeclareTimer FTM_GEN_FLEX("Generate Flexies");
-static LLFastTimer::DeclareTimer FTM_UPDATE_PRIMITIVES("Update Primitives");
-static LLFastTimer::DeclareTimer FTM_UPDATE_RIGGED_VOLUME("Update Rigged");
+static LLTrace::BlockTimerStatHandle FTM_GEN_FLEX("Generate Flexies");
+static LLTrace::BlockTimerStatHandle FTM_UPDATE_PRIMITIVES("Update Primitives");
+static LLTrace::BlockTimerStatHandle FTM_UPDATE_RIGGED_VOLUME("Update Rigged");
BOOL LLVOVolume::updateGeometry(LLDrawable *drawable)
{
- LLFastTimer t(FTM_UPDATE_PRIMITIVES);
+ LL_RECORD_BLOCK_TIME(FTM_UPDATE_PRIMITIVES);
if (mDrawable->isState(LLDrawable::REBUILD_RIGGED))
{
{
- LLFastTimer t(FTM_UPDATE_RIGGED_VOLUME);
+ LL_RECORD_BLOCK_TIME(FTM_UPDATE_RIGGED_VOLUME);
updateRiggedVolume();
}
genBBoxes(FALSE);
@@ -1647,7 +1644,7 @@ BOOL LLVOVolume::updateGeometry(LLDrawable *drawable)
{
BOOL res;
{
- LLFastTimer t(FTM_GEN_FLEX);
+ LL_RECORD_BLOCK_TIME(FTM_GEN_FLEX);
res = mVolumeImpl->doUpdateGeometry(drawable);
}
updateFaceFlags();
@@ -1677,14 +1674,14 @@ BOOL LLVOVolume::updateGeometry(LLDrawable *drawable)
if (mVolumeChanged)
{
- LLFastTimer ftm(FTM_GEN_VOLUME);
+ LL_RECORD_BLOCK_TIME(FTM_GEN_VOLUME);
LLVolumeParams volume_params = getVolume()->getParams();
setVolume(volume_params, 0);
drawable->setState(LLDrawable::REBUILD_VOLUME);
}
{
- LLFastTimer t(FTM_GEN_TRIANGLES);
+ LL_RECORD_BLOCK_TIME(FTM_GEN_TRIANGLES);
regenFaces();
genBBoxes(FALSE);
}
@@ -1703,7 +1700,7 @@ BOOL LLVOVolume::updateGeometry(LLDrawable *drawable)
old_volumep = NULL ;
{
- LLFastTimer ftm(FTM_GEN_VOLUME);
+ LL_RECORD_BLOCK_TIME(FTM_GEN_VOLUME);
LLVolumeParams volume_params = getVolume()->getParams();
setVolume(volume_params, 0);
}
@@ -1726,7 +1723,7 @@ BOOL LLVOVolume::updateGeometry(LLDrawable *drawable)
drawable->setState(LLDrawable::REBUILD_VOLUME); // for face->genVolumeTriangles()
{
- LLFastTimer t(FTM_GEN_TRIANGLES);
+ LL_RECORD_BLOCK_TIME(FTM_GEN_TRIANGLES);
if (new_num_faces != old_num_faces || mNumFaces != (S32)getNumTEs())
{
regenFaces();
@@ -1751,7 +1748,7 @@ BOOL LLVOVolume::updateGeometry(LLDrawable *drawable)
{
compiled = TRUE;
// All it did was move or we changed the texture coordinate offset
- LLFastTimer t(FTM_GEN_TRIANGLES);
+ LL_RECORD_BLOCK_TIME(FTM_GEN_TRIANGLES);
genBBoxes(FALSE);
}
@@ -2177,7 +2174,7 @@ void LLVOVolume::updateObjectMediaData(const LLSD &media_data_array, const std::
if ( (S32)fetched_version > mLastFetchedMediaVersion)
{
mLastFetchedMediaVersion = fetched_version;
- //llinfos << "updating:" << this->getID() << " " << ll_pretty_print_sd(media_data_array) << llendl;
+ //LL_INFOS() << "updating:" << this->getID() << " " << ll_pretty_print_sd(media_data_array) << LL_ENDL;
LLSD::array_const_iterator iter = media_data_array.beginArray();
LLSD::array_const_iterator end = media_data_array.endArray();
@@ -2205,7 +2202,7 @@ void LLVOVolume::syncMediaData(S32 texture_index, const LLSD &media_data, bool m
LL_DEBUGS("MediaOnAPrim") << "BEFORE: texture_index = " << texture_index
<< " hasMedia = " << te->hasMedia() << " : "
- << ((NULL == te->getMediaData()) ? "NULL MEDIA DATA" : ll_pretty_print_sd(te->getMediaData()->asLLSD())) << llendl;
+ << ((NULL == te->getMediaData()) ? "NULL MEDIA DATA" : ll_pretty_print_sd(te->getMediaData()->asLLSD())) << LL_ENDL;
std::string previous_url;
LLMediaEntry* mep = te->getMediaData();
@@ -2247,7 +2244,7 @@ void LLVOVolume::syncMediaData(S32 texture_index, const LLSD &media_data, bool m
LL_DEBUGS("MediaOnAPrim") << "AFTER: texture_index = " << texture_index
<< " hasMedia = " << te->hasMedia() << " : "
- << ((NULL == te->getMediaData()) ? "NULL MEDIA DATA" : ll_pretty_print_sd(te->getMediaData()->asLLSD())) << llendl;
+ << ((NULL == te->getMediaData()) ? "NULL MEDIA DATA" : ll_pretty_print_sd(te->getMediaData()->asLLSD())) << LL_ENDL;
}
void LLVOVolume::mediaNavigateBounceBack(U8 texture_index)
@@ -3684,7 +3681,7 @@ BOOL LLVOVolume::lineSegmentIntersect(const LLVector4a& start, const LLVector4a&
{
LLVector4a local_start = start;
LLVector4a local_end = end;
-
+
if (transform)
{
LLVector3 v_start(start.getF32ptr());
@@ -3696,7 +3693,7 @@ BOOL LLVOVolume::lineSegmentIntersect(const LLVector4a& start, const LLVector4a&
local_start.load3(v_start.mV);
local_end.load3(v_end.mV);
}
-
+
LLVector4a p;
LLVector4a n;
LLVector2 tc;
@@ -3912,8 +3909,8 @@ void LLVOVolume::updateRiggedVolume()
}
-static LLFastTimer::DeclareTimer FTM_SKIN_RIGGED("Skin");
-static LLFastTimer::DeclareTimer FTM_RIGGED_OCTREE("Octree");
+static LLTrace::BlockTimerStatHandle FTM_SKIN_RIGGED("Skin");
+static LLTrace::BlockTimerStatHandle FTM_RIGGED_OCTREE("Octree");
void LLRiggedVolume::update(const LLMeshSkinInfo* skin, LLVOAvatar* avatar, const LLVolume* volume)
{
@@ -3974,7 +3971,7 @@ void LLRiggedVolume::update(const LLMeshSkinInfo* skin, LLVOAvatar* avatar, cons
if( pos && weight && dst_face.mExtents )
{
- LLFastTimer t(FTM_SKIN_RIGGED);
+ LL_RECORD_BLOCK_TIME(FTM_SKIN_RIGGED);
for (U32 j = 0; j < dst_face.mNumVertices; ++j)
{
@@ -4037,7 +4034,7 @@ void LLRiggedVolume::update(const LLMeshSkinInfo* skin, LLVOAvatar* avatar, cons
}
{
- LLFastTimer t(FTM_RIGGED_OCTREE);
+ LL_RECORD_BLOCK_TIME(FTM_RIGGED_OCTREE);
delete dst_face.mOctree;
dst_face.mOctree = NULL;
@@ -4061,8 +4058,8 @@ U32 LLVOVolume::getPartitionType() const
return LLViewerRegion::PARTITION_VOLUME;
}
-LLVolumePartition::LLVolumePartition()
-: LLSpatialPartition(LLVOVolume::VERTEX_DATA_MASK, TRUE, GL_DYNAMIC_DRAW_ARB)
+LLVolumePartition::LLVolumePartition(LLViewerRegion* regionp)
+: LLSpatialPartition(LLVOVolume::VERTEX_DATA_MASK, TRUE, GL_DYNAMIC_DRAW_ARB, regionp)
{
mLODPeriod = 32;
mDepthMask = FALSE;
@@ -4072,8 +4069,8 @@ LLVolumePartition::LLVolumePartition()
mBufferUsage = GL_DYNAMIC_DRAW_ARB;
}
-LLVolumeBridge::LLVolumeBridge(LLDrawable* drawablep)
-: LLSpatialBridge(drawablep, TRUE, LLVOVolume::VERTEX_DATA_MASK)
+LLVolumeBridge::LLVolumeBridge(LLDrawable* drawablep, LLViewerRegion* regionp)
+: LLSpatialBridge(drawablep, TRUE, LLVOVolume::VERTEX_DATA_MASK, regionp)
{
mDepthMask = FALSE;
mLODPeriod = 32;
@@ -4110,16 +4107,16 @@ bool can_batch_texture(LLFace* facep)
return true;
}
-static LLFastTimer::DeclareTimer FTM_REGISTER_FACE("Register Face");
+static LLTrace::BlockTimerStatHandle FTM_REGISTER_FACE("Register Face");
void LLVolumeGeometryManager::registerFace(LLSpatialGroup* group, LLFace* facep, U32 type)
{
- LLFastTimer t(FTM_REGISTER_FACE);
+ LL_RECORD_BLOCK_TIME(FTM_REGISTER_FACE);
if (type == LLRenderPass::PASS_ALPHA && facep->getTextureEntry()->getMaterialParams().notNull() && !facep->getVertexBuffer()->hasDataType(LLVertexBuffer::TYPE_TANGENT))
{
LL_WARNS("RenderMaterials") << "Oh no! No binormals for this alpha blended face!" << LL_ENDL;
}
-
+
if (facep->getViewerObject()->isSelected() && LLSelectMgr::getInstance()->mHideSelectedObjects)
{
return;
@@ -4138,7 +4135,7 @@ void LLVolumeGeometryManager::registerFace(LLSpatialGroup* group, LLFace* facep,
if (!fullbright && type != LLRenderPass::PASS_GLOW && !facep->getVertexBuffer()->hasDataType(LLVertexBuffer::TYPE_NORMAL))
{
- llwarns << "Non fullbright face has no normals!" << llendl;
+ LL_WARNS() << "Non fullbright face has no normals!" << LL_ENDL;
return;
}
@@ -4169,11 +4166,11 @@ void LLVolumeGeometryManager::registerFace(LLSpatialGroup* group, LLFace* facep,
U8 bump = (type == LLRenderPass::PASS_BUMP || type == LLRenderPass::PASS_POST_BUMP) ? facep->getTextureEntry()->getBumpmap() : 0;
U8 shiny = facep->getTextureEntry()->getShiny();
-
+
LLViewerTexture* tex = facep->getTexture();
U8 index = facep->getTextureIndex();
-
+
LLMaterial* mat = facep->getTextureEntry()->getMaterialParams().get();
LLMaterialID mat_id = facep->getTextureEntry()->getMaterialID();
@@ -4229,7 +4226,7 @@ void LLVolumeGeometryManager::registerFace(LLSpatialGroup* group, LLFace* facep,
draw_vec[idx]->mMaterial == mat &&
draw_vec[idx]->mMaterialID == mat_id &&
draw_vec[idx]->mFullbright == fullbright &&
- draw_vec[idx]->mBump == bump &&
+ draw_vec[idx]->mBump == bump &&
(!mat || (draw_vec[idx]->mShiny == shiny)) && // need to break batches when a material is shared, but legacy settings are different
draw_vec[idx]->mTextureMatrix == tex_mat &&
draw_vec[idx]->mModelMatrix == model_mat &&
@@ -4255,7 +4252,7 @@ void LLVolumeGeometryManager::registerFace(LLSpatialGroup* group, LLFace* facep,
U32 offset = facep->getIndicesStart();
U32 count = facep->getIndicesCount();
LLPointer<LLDrawInfo> draw_info = new LLDrawInfo(start,end,count,offset, tex,
- facep->getVertexBuffer(), fullbright, bump);
+ facep->getVertexBuffer(), fullbright, bump);
draw_info->mGroup = group;
draw_info->mVSize = facep->getVirtualSize();
draw_vec.push_back(draw_info);
@@ -4341,9 +4338,9 @@ void LLVolumeGeometryManager::getGeometry(LLSpatialGroup* group)
}
-static LLFastTimer::DeclareTimer FTM_REBUILD_VOLUME_VB("Volume VB");
-static LLFastTimer::DeclareTimer FTM_REBUILD_VOLUME_FACE_LIST("Build Face List");
-static LLFastTimer::DeclareTimer FTM_REBUILD_VOLUME_GEN_DRAW_INFO("Gen Draw Info");
+static LLTrace::BlockTimerStatHandle FTM_REBUILD_VOLUME_VB("Volume VB");
+static LLTrace::BlockTimerStatHandle FTM_REBUILD_VOLUME_FACE_LIST("Build Face List");
+static LLTrace::BlockTimerStatHandle FTM_REBUILD_VOLUME_GEN_DRAW_INFO("Gen Draw Info");
static LLDrawPoolAvatar* get_avatar_drawpool(LLViewerObject* vobj)
{
@@ -4383,22 +4380,22 @@ void LLVolumeGeometryManager::rebuildGeom(LLSpatialGroup* group)
group->mLastUpdateViewAngle = group->mViewAngle;
- if (!group->isState(LLSpatialGroup::GEOM_DIRTY | LLSpatialGroup::ALPHA_DIRTY))
+ if (!group->hasState(LLSpatialGroup::GEOM_DIRTY | LLSpatialGroup::ALPHA_DIRTY))
{
- if (group->isState(LLSpatialGroup::MESH_DIRTY) && !LLPipeline::sDelayVBUpdate)
+ if (group->hasState(LLSpatialGroup::MESH_DIRTY) && !LLPipeline::sDelayVBUpdate)
{
rebuildMesh(group);
}
return;
}
- LLFastTimer ftm(FTM_REBUILD_VOLUME_VB);
+ LL_RECORD_BLOCK_TIME(FTM_REBUILD_VOLUME_VB);
group->mBuilt = 1.f;
LLVOAvatar* pAvatarVO = NULL;
- LLSpatialBridge* bridge = group->mSpatialPartition->asBridge();
+ LLSpatialBridge* bridge = group->getSpatialPartition()->asBridge();
if (bridge)
{
if (bridge->mAvatar.isNull())
@@ -4425,7 +4422,8 @@ void LLVolumeGeometryManager::rebuildGeom(LLSpatialGroup* group)
group->mSurfaceArea = 0;
//cache object box size since it might be used for determining visibility
- group->mObjectBoxSize = group->mObjectBounds[1].getLength3().getF32();
+ const LLVector4a* bounds = group->getObjectBounds();
+ group->mObjectBoxSize = bounds[1].getLength3().getF32();
group->clearDrawMap();
@@ -4433,13 +4431,13 @@ void LLVolumeGeometryManager::rebuildGeom(LLSpatialGroup* group)
const U32 MAX_FACE_COUNT = 4096;
- static LLFace** fullbright_faces = (LLFace**) ll_aligned_malloc(MAX_FACE_COUNT*sizeof(LLFace*),64);
- static LLFace** bump_faces = (LLFace**) ll_aligned_malloc(MAX_FACE_COUNT*sizeof(LLFace*),64);
- static LLFace** simple_faces = (LLFace**) ll_aligned_malloc(MAX_FACE_COUNT*sizeof(LLFace*),64);
- static LLFace** norm_faces = (LLFace**) ll_aligned_malloc(MAX_FACE_COUNT*sizeof(LLFace*), 64);
- static LLFace** spec_faces = (LLFace**) ll_aligned_malloc(MAX_FACE_COUNT*sizeof(LLFace*), 64);
- static LLFace** normspec_faces = (LLFace**) ll_aligned_malloc(MAX_FACE_COUNT*sizeof(LLFace*), 64);
- static LLFace** alpha_faces = (LLFace**) ll_aligned_malloc(MAX_FACE_COUNT*sizeof(LLFace*),64);
+ static LLFace** fullbright_faces = (LLFace**) ll_aligned_malloc<64>(MAX_FACE_COUNT*sizeof(LLFace*));
+ static LLFace** bump_faces = (LLFace**) ll_aligned_malloc<64>(MAX_FACE_COUNT*sizeof(LLFace*));
+ static LLFace** simple_faces = (LLFace**) ll_aligned_malloc<64>(MAX_FACE_COUNT*sizeof(LLFace*));
+ static LLFace** norm_faces = (LLFace**) ll_aligned_malloc<64>(MAX_FACE_COUNT*sizeof(LLFace*));
+ static LLFace** spec_faces = (LLFace**) ll_aligned_malloc<64>(MAX_FACE_COUNT*sizeof(LLFace*));
+ static LLFace** normspec_faces = (LLFace**) ll_aligned_malloc<64>(MAX_FACE_COUNT*sizeof(LLFace*));
+ static LLFace** alpha_faces = (LLFace**) ll_aligned_malloc<64>(MAX_FACE_COUNT*sizeof(LLFace*));
U32 fullbright_count = 0;
U32 bump_count = 0;
@@ -4450,10 +4448,10 @@ void LLVolumeGeometryManager::rebuildGeom(LLSpatialGroup* group)
U32 normspec_count = 0;
- U32 useage = group->mSpatialPartition->mBufferUsage;
+ U32 useage = group->getSpatialPartition()->mBufferUsage;
- U32 max_vertices = (gSavedSettings.getS32("RenderMaxVBOSize")*1024)/LLVertexBuffer::calcVertexSize(group->mSpatialPartition->mVertexDataMask);
- U32 max_total = (gSavedSettings.getS32("RenderMaxNodeSize")*1024)/LLVertexBuffer::calcVertexSize(group->mSpatialPartition->mVertexDataMask);
+ U32 max_vertices = (gSavedSettings.getS32("RenderMaxVBOSize")*1024)/LLVertexBuffer::calcVertexSize(group->getSpatialPartition()->mVertexDataMask);
+ U32 max_total = (gSavedSettings.getS32("RenderMaxNodeSize")*1024)/LLVertexBuffer::calcVertexSize(group->getSpatialPartition()->mVertexDataMask);
max_vertices = llmin(max_vertices, (U32) 65535);
U32 cur_total = 0;
@@ -4463,14 +4461,14 @@ void LLVolumeGeometryManager::rebuildGeom(LLSpatialGroup* group)
{
- LLFastTimer t(FTM_REBUILD_VOLUME_FACE_LIST);
+ LL_RECORD_BLOCK_TIME(FTM_REBUILD_VOLUME_FACE_LIST);
//get all the faces into a list
for (LLSpatialGroup::element_iter drawable_iter = group->getDataBegin(); drawable_iter != group->getDataEnd(); ++drawable_iter)
{
- LLDrawable* drawablep = *drawable_iter;
+ LLDrawable* drawablep = (LLDrawable*)(*drawable_iter)->getDrawable();
- if (drawablep->isDead() || drawablep->isState(LLDrawable::FORCE_INVISIBLE) )
+ if (!drawablep || drawablep->isDead() || drawablep->isState(LLDrawable::FORCE_INVISIBLE) )
{
continue;
}
@@ -4568,7 +4566,7 @@ void LLVolumeGeometryManager::rebuildGeom(LLSpatialGroup* group)
for ( int i=0; i<jointCnt; ++i )
{
std::string lookingForJoint = pSkinData->mJointNames[i].c_str();
- //llinfos<<"joint name "<<lookingForJoint.c_str()<<llendl;
+ //LL_INFOS()<<"joint name "<<lookingForJoint.c_str()<<LL_ENDL;
LLJoint* pJoint = pAvatarVO->getJoint( lookingForJoint );
if ( pJoint && pJoint->getId() != currentId )
{
@@ -4675,67 +4673,67 @@ void LLVolumeGeometryManager::rebuildGeom(LLSpatialGroup* group)
}
else
{
- if (type == LLDrawPool::POOL_ALPHA)
- {
- if (te->getColor().mV[3] > 0.f)
- {
- if (te->getFullbright())
- {
- pool->addRiggedFace(facep, LLDrawPoolAvatar::RIGGED_FULLBRIGHT_ALPHA);
- }
- else
- {
- pool->addRiggedFace(facep, LLDrawPoolAvatar::RIGGED_ALPHA);
- }
- }
- }
- else if (te->getShiny())
+ if (type == LLDrawPool::POOL_ALPHA)
+ {
+ if (te->getColor().mV[3] > 0.f)
{
if (te->getFullbright())
{
- pool->addRiggedFace(facep, LLDrawPoolAvatar::RIGGED_FULLBRIGHT_SHINY);
+ pool->addRiggedFace(facep, LLDrawPoolAvatar::RIGGED_FULLBRIGHT_ALPHA);
}
else
{
- if (LLPipeline::sRenderDeferred)
- {
- pool->addRiggedFace(facep, LLDrawPoolAvatar::RIGGED_SIMPLE);
- }
- else
- {
- pool->addRiggedFace(facep, LLDrawPoolAvatar::RIGGED_SHINY);
- }
+ pool->addRiggedFace(facep, LLDrawPoolAvatar::RIGGED_ALPHA);
}
}
+ }
+ else if (te->getShiny())
+ {
+ if (te->getFullbright())
+ {
+ pool->addRiggedFace(facep, LLDrawPoolAvatar::RIGGED_FULLBRIGHT_SHINY);
+ }
else
{
- if (te->getFullbright())
+ if (LLPipeline::sRenderDeferred)
{
- pool->addRiggedFace(facep, LLDrawPoolAvatar::RIGGED_FULLBRIGHT);
+ pool->addRiggedFace(facep, LLDrawPoolAvatar::RIGGED_SIMPLE);
}
else
{
- pool->addRiggedFace(facep, LLDrawPoolAvatar::RIGGED_SIMPLE);
+ pool->addRiggedFace(facep, LLDrawPoolAvatar::RIGGED_SHINY);
}
}
+ }
+ else
+ {
+ if (te->getFullbright())
+ {
+ pool->addRiggedFace(facep, LLDrawPoolAvatar::RIGGED_FULLBRIGHT);
+ }
+ else
+ {
+ pool->addRiggedFace(facep, LLDrawPoolAvatar::RIGGED_SIMPLE);
+ }
+ }
-
- if (LLPipeline::sRenderDeferred)
+
+ if (LLPipeline::sRenderDeferred)
+ {
+ if (type != LLDrawPool::POOL_ALPHA && !te->getFullbright())
{
- if (type != LLDrawPool::POOL_ALPHA && !te->getFullbright())
+ if (te->getBumpmap())
{
- if (te->getBumpmap())
- {
- pool->addRiggedFace(facep, LLDrawPoolAvatar::RIGGED_DEFERRED_BUMP);
- }
- else
- {
- pool->addRiggedFace(facep, LLDrawPoolAvatar::RIGGED_DEFERRED_SIMPLE);
- }
+ pool->addRiggedFace(facep, LLDrawPoolAvatar::RIGGED_DEFERRED_BUMP);
+ }
+ else
+ {
+ pool->addRiggedFace(facep, LLDrawPoolAvatar::RIGGED_DEFERRED_SIMPLE);
}
}
}
}
+ }
continue;
}
@@ -5003,10 +5001,13 @@ void LLVolumeGeometryManager::rebuildGeom(LLSpatialGroup* group)
//drawables have been rebuilt, clear rebuild status
for (LLSpatialGroup::element_iter drawable_iter = group->getDataBegin(); drawable_iter != group->getDataEnd(); ++drawable_iter)
{
- LLDrawable* drawablep = *drawable_iter;
+ LLDrawable* drawablep = (LLDrawable*)(*drawable_iter)->getDrawable();
+ if(drawablep)
+ {
drawablep->clearState(LLDrawable::REBUILD_ALL);
}
}
+ }
group->mLastUpdateTime = gFrameTimeSeconds;
group->mBuilt = 1.f;
@@ -5040,15 +5041,15 @@ void LLVolumeGeometryManager::rebuildGeom(LLSpatialGroup* group)
}
}
-static LLFastTimer::DeclareTimer FTM_REBUILD_MESH_FLUSH("Flush Mesh");
+static LLTrace::BlockTimerStatHandle FTM_REBUILD_MESH_FLUSH("Flush Mesh");
void LLVolumeGeometryManager::rebuildMesh(LLSpatialGroup* group)
{
llassert(group);
- if (group && group->isState(LLSpatialGroup::MESH_DIRTY) && !group->isState(LLSpatialGroup::GEOM_DIRTY))
+ if (group && group->hasState(LLSpatialGroup::MESH_DIRTY) && !group->hasState(LLSpatialGroup::GEOM_DIRTY))
{
- LLFastTimer ftm(FTM_REBUILD_VOLUME_VB);
- LLFastTimer t(FTM_REBUILD_VOLUME_GEN_DRAW_INFO); //make sure getgeometryvolume shows up in the right place in timers
+ LL_RECORD_BLOCK_TIME(FTM_REBUILD_VOLUME_VB);
+ LL_RECORD_BLOCK_TIME(FTM_REBUILD_VOLUME_GEN_DRAW_INFO); //make sure getgeometryvolume shows up in the right place in timers
group->mBuilt = 1.f;
@@ -5061,9 +5062,9 @@ void LLVolumeGeometryManager::rebuildMesh(LLSpatialGroup* group)
for (LLSpatialGroup::element_iter drawable_iter = group->getDataBegin(); drawable_iter != group->getDataEnd(); ++drawable_iter)
{
- LLDrawable* drawablep = *drawable_iter;
+ LLDrawable* drawablep = (LLDrawable*)(*drawable_iter)->getDrawable();
- if (!drawablep->isDead() && drawablep->isState(LLDrawable::REBUILD_ALL) && !drawablep->isState(LLDrawable::RIGGED) )
+ if (drawablep && !drawablep->isDead() && drawablep->isState(LLDrawable::REBUILD_ALL) && !drawablep->isState(LLDrawable::RIGGED) )
{
LLVOVolume* vobj = drawablep->getVOVolume();
vobj->preRebuild();
@@ -5111,7 +5112,7 @@ void LLVolumeGeometryManager::rebuildMesh(LLSpatialGroup* group)
}
{
- LLFastTimer t(FTM_REBUILD_MESH_FLUSH);
+ LL_RECORD_BLOCK_TIME(FTM_REBUILD_MESH_FLUSH);
for (LLVertexBuffer** iter = locked_buffer, ** end_iter = locked_buffer+buffer_count; iter != end_iter; ++iter)
{
(*iter)->flush();
@@ -5129,10 +5130,14 @@ void LLVolumeGeometryManager::rebuildMesh(LLSpatialGroup* group)
//if not all buffers are unmapped
if(num_mapped_vertex_buffer != LLVertexBuffer::sMappedCount)
{
- llwarns << "Not all mapped vertex buffers are unmapped!" << llendl ;
+ LL_WARNS() << "Not all mapped vertex buffers are unmapped!" << LL_ENDL ;
for (LLSpatialGroup::element_iter drawable_iter = group->getDataBegin(); drawable_iter != group->getDataEnd(); ++drawable_iter)
{
- LLDrawable* drawablep = *drawable_iter;
+ LLDrawable* drawablep = (LLDrawable*)(*drawable_iter)->getDrawable();
+ if(!drawablep)
+ {
+ continue;
+ }
for (S32 i = 0; i < drawablep->getNumFaces(); ++i)
{
LLFace* face = drawablep->getFace(i);
@@ -5184,11 +5189,11 @@ struct CompareBatchBreakerModified
}
};
-static LLFastTimer::DeclareTimer FTM_GEN_DRAW_INFO_SORT("Draw Info Face Sort");
-static LLFastTimer::DeclareTimer FTM_GEN_DRAW_INFO_FACE_SIZE("Face Sizing");
-static LLFastTimer::DeclareTimer FTM_GEN_DRAW_INFO_ALLOCATE("Allocate VB");
-static LLFastTimer::DeclareTimer FTM_GEN_DRAW_INFO_FIND_VB("Find VB");
-static LLFastTimer::DeclareTimer FTM_GEN_DRAW_INFO_RESIZE_VB("Resize VB");
+static LLTrace::BlockTimerStatHandle FTM_GEN_DRAW_INFO_SORT("Draw Info Face Sort");
+static LLTrace::BlockTimerStatHandle FTM_GEN_DRAW_INFO_FACE_SIZE("Face Sizing");
+static LLTrace::BlockTimerStatHandle FTM_GEN_DRAW_INFO_ALLOCATE("Allocate VB");
+static LLTrace::BlockTimerStatHandle FTM_GEN_DRAW_INFO_FIND_VB("Find VB");
+static LLTrace::BlockTimerStatHandle FTM_GEN_DRAW_INFO_RESIZE_VB("Resize VB");
@@ -5196,7 +5201,7 @@ static LLFastTimer::DeclareTimer FTM_GEN_DRAW_INFO_RESIZE_VB("Resize VB");
void LLVolumeGeometryManager::genDrawInfo(LLSpatialGroup* group, U32 mask, LLFace** faces, U32 face_count, BOOL distance_sort, BOOL batch_textures, BOOL no_materials)
{
- LLFastTimer t(FTM_REBUILD_VOLUME_GEN_DRAW_INFO);
+ LL_RECORD_BLOCK_TIME(FTM_REBUILD_VOLUME_GEN_DRAW_INFO);
U32 buffer_usage = group->mBufferUsage;
@@ -5222,11 +5227,11 @@ void LLVolumeGeometryManager::genDrawInfo(LLSpatialGroup* group, U32 mask, LLFac
#endif
//calculate maximum number of vertices to store in a single buffer
- U32 max_vertices = (gSavedSettings.getS32("RenderMaxVBOSize")*1024)/LLVertexBuffer::calcVertexSize(group->mSpatialPartition->mVertexDataMask);
+ U32 max_vertices = (gSavedSettings.getS32("RenderMaxVBOSize")*1024)/LLVertexBuffer::calcVertexSize(group->getSpatialPartition()->mVertexDataMask);
max_vertices = llmin(max_vertices, (U32) 65535);
{
- LLFastTimer t(FTM_GEN_DRAW_INFO_SORT);
+ LL_RECORD_BLOCK_TIME(FTM_GEN_DRAW_INFO_SORT);
if (!distance_sort)
{
//sort faces by things that break batches
@@ -5311,7 +5316,7 @@ void LLVolumeGeometryManager::genDrawInfo(LLSpatialGroup* group, U32 mask, LLFac
U32 texture_count = 0;
{
- LLFastTimer t(FTM_GEN_DRAW_INFO_FACE_SIZE);
+ LL_RECORD_BLOCK_TIME(FTM_GEN_DRAW_INFO_FACE_SIZE);
if (batch_textures)
{
U8 cur_tex = 0;
@@ -5434,7 +5439,7 @@ void LLVolumeGeometryManager::genDrawInfo(LLSpatialGroup* group, U32 mask, LLFac
LLVertexBuffer* buffer = NULL;
{
- LLFastTimer t(FTM_GEN_DRAW_INFO_ALLOCATE);
+ LL_RECORD_BLOCK_TIME(FTM_GEN_DRAW_INFO_ALLOCATE);
buffer = createVertexBuffer(mask, buffer_usage);
buffer->allocateBuffer(geom_count, index_count, TRUE);
}
@@ -5458,7 +5463,7 @@ void LLVolumeGeometryManager::genDrawInfo(LLSpatialGroup* group, U32 mask, LLFac
if (batch_textures && facep->getTextureIndex() == 255)
{
- llerrs << "Invalid texture index." << llendl;
+ LL_ERRS() << "Invalid texture index." << LL_ENDL;
}
{
@@ -5483,7 +5488,7 @@ void LLVolumeGeometryManager::genDrawInfo(LLSpatialGroup* group, U32 mask, LLFac
if (!facep->getGeometryVolume(*volume, te_idx,
vobj->getRelativeXform(), vobj->getRelativeXformInvTrans(), index_offset,true))
{
- llwarns << "Failed to get geometry for face!" << llendl;
+ LL_WARNS() << "Failed to get geometry for face!" << LL_ENDL;
}
if (drawablep->isState(LLDrawable::ANIMATED_CHILD))
@@ -5495,7 +5500,7 @@ void LLVolumeGeometryManager::genDrawInfo(LLSpatialGroup* group, U32 mask, LLFac
index_offset += facep->getGeomCount();
indices_index += facep->getIndicesCount();
-
+
//append face to appropriate render batch
BOOL force_simple = facep->getPixelArea() < FORCE_SIMPLE_RENDER_AREA;
@@ -5719,7 +5724,7 @@ void LLVolumeGeometryManager::genDrawInfo(LLSpatialGroup* group, U32 mask, LLFac
}
else
{
- registerFace(group, facep, LLRenderPass::PASS_FULLBRIGHT);
+ registerFace(group, facep, LLRenderPass::PASS_FULLBRIGHT);
}
if (LLPipeline::sRenderDeferred && !hud_group && LLPipeline::sRenderBump && use_legacy_bump)
{ //if this is the deferred render and a bump map is present, register in post deferred bump
@@ -5741,10 +5746,10 @@ void LLVolumeGeometryManager::genDrawInfo(LLSpatialGroup* group, U32 mask, LLFac
}
else
{
- registerFace(group, facep, LLRenderPass::PASS_SIMPLE);
- }
+ registerFace(group, facep, LLRenderPass::PASS_SIMPLE);
}
}
+ }
if (!gPipeline.canUseVertexShaders() &&
@@ -5789,7 +5794,7 @@ void LLVolumeGeometryManager::genDrawInfo(LLSpatialGroup* group, U32 mask, LLFac
void LLGeometryManager::addGeometryCount(LLSpatialGroup* group, U32 &vertex_count, U32 &index_count)
{
//initialize to default usage for this partition
- U32 usage = group->mSpatialPartition->mBufferUsage;
+ U32 usage = group->getSpatialPartition()->mBufferUsage;
//clear off any old faces
mFaceList.clear();
@@ -5798,9 +5803,9 @@ void LLGeometryManager::addGeometryCount(LLSpatialGroup* group, U32 &vertex_coun
for (LLSpatialGroup::element_iter drawable_iter = group->getDataBegin(); drawable_iter != group->getDataEnd(); ++drawable_iter)
{
- LLDrawable* drawablep = *drawable_iter;
+ LLDrawable* drawablep = (LLDrawable*)(*drawable_iter)->getDrawable();
- if (drawablep->isDead())
+ if (!drawablep || drawablep->isDead())
{
continue;
}
@@ -5838,7 +5843,7 @@ void LLGeometryManager::addGeometryCount(LLSpatialGroup* group, U32 &vertex_coun
group->mBufferUsage = usage;
}
-LLHUDPartition::LLHUDPartition()
+LLHUDPartition::LLHUDPartition(LLViewerRegion* regionp) : LLBridgePartition(regionp)
{
mPartitionType = LLViewerRegion::PARTITION_HUD;
mDrawableType = LLPipeline::RENDER_TYPE_HUD;
diff --git a/indra/newview/llvowater.cpp b/indra/newview/llvowater.cpp
index 21595ee0bc..e3419af10d 100755
--- a/indra/newview/llvowater.cpp
+++ b/indra/newview/llvowater.cpp
@@ -28,7 +28,6 @@
#include "llvowater.h"
-#include "imageids.h"
#include "llviewercontrol.h"
#include "lldrawable.h"
@@ -124,11 +123,11 @@ LLDrawable *LLVOWater::createDrawable(LLPipeline *pipeline)
return mDrawable;
}
-static LLFastTimer::DeclareTimer FTM_UPDATE_WATER("Update Water");
+static LLTrace::BlockTimerStatHandle FTM_UPDATE_WATER("Update Water");
BOOL LLVOWater::updateGeometry(LLDrawable *drawable)
{
- LLFastTimer ftm(FTM_UPDATE_WATER);
+ LL_RECORD_BLOCK_TIME(FTM_UPDATE_WATER);
LLFace *face;
if (drawable->getNumFaces() < 1)
@@ -298,15 +297,15 @@ U32 LLVOVoidWater::getPartitionType() const
return LLViewerRegion::PARTITION_VOIDWATER;
}
-LLWaterPartition::LLWaterPartition()
-: LLSpatialPartition(0, FALSE, GL_DYNAMIC_DRAW_ARB)
+LLWaterPartition::LLWaterPartition(LLViewerRegion* regionp)
+: LLSpatialPartition(0, FALSE, GL_DYNAMIC_DRAW_ARB, regionp)
{
mInfiniteFarClip = TRUE;
mDrawableType = LLPipeline::RENDER_TYPE_WATER;
mPartitionType = LLViewerRegion::PARTITION_WATER;
}
-LLVoidWaterPartition::LLVoidWaterPartition()
+LLVoidWaterPartition::LLVoidWaterPartition(LLViewerRegion* regionp) : LLWaterPartition(regionp)
{
mOcclusionEnabled = FALSE;
mDrawableType = LLPipeline::RENDER_TYPE_VOIDWATER;
diff --git a/indra/newview/llvowlsky.cpp b/indra/newview/llvowlsky.cpp
index e7435b6860..90bc6509a6 100755
--- a/indra/newview/llvowlsky.cpp
+++ b/indra/newview/llvowlsky.cpp
@@ -301,11 +301,11 @@ void LLVOWLSky::restoreGL()
gPipeline.markRebuild(mDrawable, LLDrawable::REBUILD_ALL, TRUE);
}
-static LLFastTimer::DeclareTimer FTM_GEO_SKY("Windlight Sky Geometry");
+static LLTrace::BlockTimerStatHandle FTM_GEO_SKY("Windlight Sky Geometry");
BOOL LLVOWLSky::updateGeometry(LLDrawable * drawable)
{
- LLFastTimer ftm(FTM_GEO_SKY);
+ LL_RECORD_BLOCK_TIME(FTM_GEO_SKY);
LLStrider<LLVector3> vertices;
LLStrider<LLVector2> texCoords;
LLStrider<U16> indices;
@@ -321,7 +321,7 @@ BOOL LLVOWLSky::updateGeometry(LLDrawable * drawable)
if(!success)
{
- llerrs << "Failed updating WindLight sky geometry." << llendl;
+ LL_ERRS() << "Failed updating WindLight sky geometry." << LL_ENDL;
}
buildFanBuffer(vertices, texCoords, indices);
@@ -345,7 +345,7 @@ BOOL LLVOWLSky::updateGeometry(LLDrawable * drawable)
// round up to a whole number of segments
const U32 strips_segments = (total_stacks+stacks_per_seg-1) / stacks_per_seg;
- llinfos << "WL Skydome strips in " << strips_segments << " batches." << llendl;
+ LL_INFOS() << "WL Skydome strips in " << strips_segments << " batches." << LL_ENDL;
mStripsVerts.resize(strips_segments, NULL);
@@ -384,7 +384,7 @@ BOOL LLVOWLSky::updateGeometry(LLDrawable * drawable)
if(!success)
{
- llerrs << "Failed updating WindLight sky geometry." << llendl;
+ LL_ERRS() << "Failed updating WindLight sky geometry." << LL_ENDL;
}
// fill it
@@ -394,7 +394,7 @@ BOOL LLVOWLSky::updateGeometry(LLDrawable * drawable)
segment->flush();
}
- llinfos << "completed in " << llformat("%.2f", timer.getElapsedTimeF32()) << "seconds" << llendl;
+ LL_INFOS() << "completed in " << llformat("%.2f", timer.getElapsedTimeF32().value()) << "seconds" << LL_ENDL;
}
#else
mStripsVerts = new LLVertexBuffer(LLDrawPoolWLSky::SKY_VERTEX_DATA_MASK, GL_STATIC_DRAW_ARB);
@@ -786,7 +786,7 @@ BOOL LLVOWLSky::updateStarGeometry(LLDrawable *drawable)
if(!success)
{
- llerrs << "Failed updating star geometry." << llendl;
+ LL_ERRS() << "Failed updating star geometry." << LL_ENDL;
}
// *TODO: fix LLStrider with a real prefix increment operator so it can be
@@ -795,7 +795,7 @@ BOOL LLVOWLSky::updateStarGeometry(LLDrawable *drawable)
if (mStarVertices.size() < getStarsNumVerts())
{
- llerrs << "Star reference geometry insufficient." << llendl;
+ LL_ERRS() << "Star reference geometry insufficient." << LL_ENDL;
}
for (U32 vtx = 0; vtx < getStarsNumVerts(); ++vtx)
diff --git a/indra/newview/llwatchdog.cpp b/indra/newview/llwatchdog.cpp
index 4f582fc2db..7b5bcf4db0 100755
--- a/indra/newview/llwatchdog.cpp
+++ b/indra/newview/llwatchdog.cpp
@@ -27,6 +27,7 @@
#include "llviewerprecompiledheaders.h"
#include "llwatchdog.h"
+#include "llthread.h"
const U32 WATCHDOG_SLEEP_TIME_USEC = 1000000;
@@ -221,7 +222,7 @@ void LLWatchdog::run()
if(current_run_delta > (WATCHDOG_SLEEP_TIME_USEC * TIME_ELAPSED_MULTIPLIER))
{
- llinfos << "Watchdog thread delayed: resetting entries." << llendl;
+ LL_INFOS() << "Watchdog thread delayed: resetting entries." << LL_ENDL;
std::for_each(mSuspects.begin(),
mSuspects.end(),
std::mem_fun(&LLWatchdogEntry::reset)
@@ -243,7 +244,7 @@ void LLWatchdog::run()
mTimer->stop();
}
- llinfos << "Watchdog detected error:" << llendl;
+ LL_INFOS() << "Watchdog detected error:" << LL_ENDL;
mKillerCallback();
}
}
diff --git a/indra/newview/llwaterparammanager.cpp b/indra/newview/llwaterparammanager.cpp
index 72d628fb88..c854e1fc66 100755
--- a/indra/newview/llwaterparammanager.cpp
+++ b/indra/newview/llwaterparammanager.cpp
@@ -89,7 +89,7 @@ void LLWaterParamManager::loadAllPresets()
void LLWaterParamManager::loadPresetsFromDir(const std::string& dir)
{
- LL_INFOS2("AppInit", "Shaders") << "Loading water presets from " << dir << LL_ENDL;
+ LL_INFOS("AppInit", "Shaders") << "Loading water presets from " << dir << LL_ENDL;
LLDirIterator dir_iter(dir, "*.xml");
while (1)
@@ -103,7 +103,7 @@ void LLWaterParamManager::loadPresetsFromDir(const std::string& dir)
std::string path = gDirUtilp->add(dir, file);
if (!loadPreset(path))
{
- llwarns << "Error loading water preset from " << path << llendl;
+ LL_WARNS() << "Error loading water preset from " << path << LL_ENDL;
}
}
}
@@ -119,7 +119,7 @@ bool LLWaterParamManager::loadPreset(const std::string& path)
return false;
}
- LL_DEBUGS2("AppInit", "Shaders") << "Loading water " << name << LL_ENDL;
+ LL_DEBUGS("AppInit", "Shaders") << "Loading water " << name << LL_ENDL;
LLSD params_data;
LLPointer<LLSDParser> parser = new LLSDXMLParser();
@@ -201,7 +201,7 @@ void LLWaterParamManager::applyParams(const LLSD& params, bool interpolate)
{
if (params.size() == 0)
{
- llwarns << "Undefined water params" << llendl;
+ LL_WARNS() << "Undefined water params" << LL_ENDL;
return;
}
@@ -215,11 +215,11 @@ void LLWaterParamManager::applyParams(const LLSD& params, bool interpolate)
}
}
-static LLFastTimer::DeclareTimer FTM_UPDATE_WATERPARAM("Update Water Params");
+static LLTrace::BlockTimerStatHandle FTM_UPDATE_WATERPARAM("Update Water Params");
void LLWaterParamManager::update(LLViewerCamera * cam)
{
- LLFastTimer ftm(FTM_UPDATE_WATERPARAM);
+ LL_RECORD_BLOCK_TIME(FTM_UPDATE_WATERPARAM);
// update the shaders and the menu
propagateParameters();
diff --git a/indra/newview/llwearableitemslist.cpp b/indra/newview/llwearableitemslist.cpp
index c196d70617..ca60b79f9d 100755
--- a/indra/newview/llwearableitemslist.cpp
+++ b/indra/newview/llwearableitemslist.cpp
@@ -558,7 +558,7 @@ LLWearableItemTypeNameComparator::ETypeListOrder LLWearableItemTypeNameComparato
if(const_it == mWearableOrder.end())
{
- llwarns<<"Absent information about order rang of items of "<<LLAssetType::getDesc(item_type)<<" type"<<llendl;
+ LL_WARNS()<<"Absent information about order rang of items of "<<LLAssetType::getDesc(item_type)<<" type"<<LL_ENDL;
return ORDER_RANK_UNKNOWN;
}
@@ -572,7 +572,7 @@ bool LLWearableItemTypeNameComparator::sortAssetTypeByName(LLAssetType::EType it
if(const_it == mWearableOrder.end())
{
- llwarns<<"Absent information about sorting items of "<<LLAssetType::getDesc(item_type)<<" type"<<llendl;
+ LL_WARNS()<<"Absent information about sorting items of "<<LLAssetType::getDesc(item_type)<<" type"<<LL_ENDL;
return true;
}
@@ -588,7 +588,7 @@ bool LLWearableItemTypeNameComparator::sortWearableTypeByName(LLAssetType::EType
if(const_it == mWearableOrder.end())
{
- llwarns<<"Absent information about sorting items of "<<LLAssetType::getDesc(item_type)<<" type"<<llendl;
+ LL_WARNS()<<"Absent information about sorting items of "<<LLAssetType::getDesc(item_type)<<" type"<<LL_ENDL;
return true;
}
@@ -648,7 +648,7 @@ void LLWearableItemsList::addNewItem(LLViewerInventoryItem* item, bool rearrange
{
if (!item)
{
- llwarns << "No inventory item. Couldn't create flat list item." << llendl;
+ LL_WARNS() << "No inventory item. Couldn't create flat list item." << LL_ENDL;
llassert(item != NULL);
}
@@ -659,7 +659,7 @@ void LLWearableItemsList::addNewItem(LLViewerInventoryItem* item, bool rearrange
bool is_item_added = addItem(list_item, item->getUUID(), ADD_BOTTOM, rearrange);
if (!is_item_added)
{
- llwarns << "Couldn't add flat list item." << llendl;
+ LL_WARNS() << "Couldn't add flat list item." << LL_ENDL;
llassert(is_item_added);
}
}
@@ -825,7 +825,7 @@ void LLWearableItemsList::ContextMenu::updateItemsVisibility(LLContextMenu* menu
{
if (!menu)
{
- llwarns << "Invalid menu" << llendl;
+ LL_WARNS() << "Invalid menu" << LL_ENDL;
return;
}
@@ -846,7 +846,7 @@ void LLWearableItemsList::ContextMenu::updateItemsVisibility(LLContextMenu* menu
if (!item)
{
- llwarns << "Invalid item" << llendl;
+ LL_WARNS() << "Invalid item" << LL_ENDL;
// *NOTE: the logic below may not work in this case
continue;
}
@@ -919,7 +919,7 @@ void LLWearableItemsList::ContextMenu::updateItemsVisibility(LLContextMenu* menu
if (mask & MASK_UNKNOWN)
{
- llwarns << "Non-wearable items passed." << llendl;
+ LL_WARNS() << "Non-wearable items passed." << LL_ENDL;
}
U32 num_visible_items = 0;
@@ -1026,7 +1026,7 @@ bool LLWearableItemsList::ContextMenu::canAddWearables(const uuid_vec_t& item_id
}
else
{
- llwarns << "Unexpected wearable type" << llendl;
+ LL_WARNS() << "Unexpected wearable type" << LL_ENDL;
return false;
}
}
diff --git a/indra/newview/llwearableitemslist.h b/indra/newview/llwearableitemslist.h
index a8a5ef3117..58a00c5be0 100755
--- a/indra/newview/llwearableitemslist.h
+++ b/indra/newview/llwearableitemslist.h
@@ -258,7 +258,7 @@ public:
if (!wearable_item1 || !wearable_item2)
{
- llwarning("item1 and item2 cannot be null", 0);
+ LL_WARNS() << "item1 and item2 cannot be null" << LL_ENDL;
return true;
}
diff --git a/indra/newview/llwearablelist.cpp b/indra/newview/llwearablelist.cpp
index ef1a953f59..6085893129 100755
--- a/indra/newview/llwearablelist.cpp
+++ b/indra/newview/llwearablelist.cpp
@@ -148,7 +148,6 @@ void LLWearableList::processGetAssetReply( const char* filename, const LLAssetID
{
LLFile::remove(std::string(filename));
}
- LLViewerStats::getInstance()->incStat( LLViewerStats::ST_DOWNLOAD_FAILED );
LL_WARNS("Wearable") << "Wearable download failed: " << LLAssetStorage::getErrorString( status ) << " " << uuid << LL_ENDL;
switch( status )
@@ -217,7 +216,7 @@ void LLWearableList::processGetAssetReply( const char* filename, const LLAssetID
LLViewerWearable* LLWearableList::createCopy(const LLViewerWearable* old_wearable, const std::string& new_name)
{
- lldebugs << "LLWearableList::createCopy()" << llendl;
+ LL_DEBUGS() << "LLWearableList::createCopy()" << LL_ENDL;
LLViewerWearable *wearable = generateNewWearable();
wearable->copyDataFrom(old_wearable);
@@ -236,7 +235,7 @@ LLViewerWearable* LLWearableList::createCopy(const LLViewerWearable* old_wearabl
LLViewerWearable* LLWearableList::createNewWearable( LLWearableType::EType type, LLAvatarAppearance *avatarp )
{
- lldebugs << "LLWearableList::createNewWearable()" << llendl;
+ LL_DEBUGS() << "LLWearableList::createNewWearable()" << LL_ENDL;
LLViewerWearable *wearable = generateNewWearable();
wearable->setType( type, avatarp );
diff --git a/indra/newview/llweb.cpp b/indra/newview/llweb.cpp
index 83337b386d..665671a38f 100755
--- a/indra/newview/llweb.cpp
+++ b/indra/newview/llweb.cpp
@@ -121,7 +121,7 @@ void LLWeb::loadURLExternal(const std::string& url, bool async, const std::strin
if(gSavedSettings.getBOOL("DisableExternalBrowser"))
{
// Don't open an external browser under any circumstances.
- llwarns << "Blocked attempt to open external browser." << llendl;
+ LL_WARNS() << "Blocked attempt to open external browser." << LL_ENDL;
return;
}
diff --git a/indra/newview/llwebprofile.cpp b/indra/newview/llwebprofile.cpp
index 69255af179..0cf0e7b9c0 100755
--- a/indra/newview/llwebprofile.cpp
+++ b/indra/newview/llwebprofile.cpp
@@ -80,7 +80,7 @@ public:
if (status != 200)
{
- llwarns << "Failed to get upload config (" << status << ")" << llendl;
+ LL_WARNS() << "Failed to get upload config (" << status << ")" << LL_ENDL;
LLWebProfile::reportImageUploadStatus(false);
return;
}
@@ -89,7 +89,7 @@ public:
Json::Reader reader;
if (!reader.parse(body, root))
{
- llwarns << "Failed to parse upload config: " << reader.getFormatedErrorMessages() << llendl;
+ LL_WARNS() << "Failed to parse upload config: " << reader.getFormatedErrorMessages() << LL_ENDL;
LLWebProfile::reportImageUploadStatus(false);
return;
}
@@ -112,7 +112,7 @@ public:
config["caption"] = data.get("caption", "").asString();
// Do the actual image upload using the configuration.
- LL_DEBUGS("Snapshots") << "Got upload config, POSTing image to " << upload_url << ", config=[" << config << "]" << llendl;
+ LL_DEBUGS("Snapshots") << "Got upload config, POSTing image to " << upload_url << ", config=[" << config << "]" << LL_ENDL;
LLWebProfile::post(mImagep, config, upload_url);
}
@@ -135,7 +135,7 @@ public:
{
if (status != 200)
{
- llwarns << "Failed to upload image: " << status << " " << reason << llendl;
+ LL_WARNS() << "Failed to upload image: " << status << " " << reason << LL_ENDL;
LLWebProfile::reportImageUploadStatus(false);
return;
}
@@ -144,8 +144,8 @@ public:
std::stringstream strstrm;
strstrm << istr.rdbuf();
const std::string body = strstrm.str();
- llinfos << "Image uploaded." << llendl;
- LL_DEBUGS("Snapshots") << "Uploading image succeeded. Response: [" << body << "]" << llendl;
+ LL_INFOS() << "Image uploaded." << LL_ENDL;
+ LL_DEBUGS("Snapshots") << "Uploading image succeeded. Response: [" << body << "]" << LL_ENDL;
LLWebProfile::reportImageUploadStatus(true);
}
};
@@ -168,13 +168,13 @@ public:
LLSD headers = LLViewerMedia::getHeaders();
headers["Cookie"] = LLWebProfile::getAuthCookie();
const std::string& redir_url = content["location"];
- LL_DEBUGS("Snapshots") << "Got redirection URL: " << redir_url << llendl;
+ LL_DEBUGS("Snapshots") << "Got redirection URL: " << redir_url << LL_ENDL;
LLHTTPClient::get(redir_url, new LLWebProfileResponders::PostImageRedirectResponder(), headers);
}
else
{
- llwarns << "Unexpected POST status: " << status << " " << reason << llendl;
- LL_DEBUGS("Snapshots") << "headers: [" << content << "]" << llendl;
+ LL_WARNS() << "Unexpected POST status: " << status << " " << reason << LL_ENDL;
+ LL_DEBUGS("Snapshots") << "headers: [" << content << "]" << LL_ENDL;
LLWebProfile::reportImageUploadStatus(false);
}
}
@@ -201,7 +201,7 @@ void LLWebProfile::uploadImage(LLPointer<LLImageFormatted> image, const std::str
config_url += "?caption=" + LLURI::escape(caption);
config_url += "&add_loc=" + std::string(add_location ? "1" : "0");
- LL_DEBUGS("Snapshots") << "Requesting " << config_url << llendl;
+ LL_DEBUGS("Snapshots") << "Requesting " << config_url << LL_ENDL;
LLSD headers = LLViewerMedia::getHeaders();
headers["Cookie"] = getAuthCookie();
LLHTTPClient::get(config_url, new LLWebProfileResponders::ConfigResponder(image), headers);
@@ -210,7 +210,7 @@ void LLWebProfile::uploadImage(LLPointer<LLImageFormatted> image, const std::str
// static
void LLWebProfile::setAuthCookie(const std::string& cookie)
{
- LL_DEBUGS("Snapshots") << "Setting auth cookie: " << cookie << llendl;
+ LL_DEBUGS("Snapshots") << "Setting auth cookie: " << cookie << LL_ENDL;
sAuthCookie = cookie;
}
@@ -219,7 +219,7 @@ void LLWebProfile::post(LLPointer<LLImageFormatted> image, const LLSD& config, c
{
if (dynamic_cast<LLImagePNG*>(image.get()) == 0)
{
- llwarns << "Image to upload is not a PNG" << llendl;
+ LL_WARNS() << "Image to upload is not a PNG" << LL_ENDL;
llassert(dynamic_cast<LLImagePNG*>(image.get()) != 0);
return;
}
diff --git a/indra/newview/llwind.h b/indra/newview/llwind.h
index 3b57f07124..e73d1baa58 100755
--- a/indra/newview/llwind.h
+++ b/indra/newview/llwind.h
@@ -35,6 +35,8 @@ class LLVector3;
class LLBitPack;
class LLGroupHeader;
+const F32 WIND_SCALE_HACK = 2.0f; // hack to make wind speeds more realistic
+
class LLWind
{
diff --git a/indra/newview/llwindebug.h b/indra/newview/llwindebug.h
index 3837825d31..6f274c6f16 100755
--- a/indra/newview/llwindebug.h
+++ b/indra/newview/llwindebug.h
@@ -28,6 +28,7 @@
#define LL_LLWINDEBUG_H
#include "stdtypes.h"
+#include "llwin32headerslean.h"
#include <dbghelp.h>
class LLWinDebug:
diff --git a/indra/newview/llwldaycycle.cpp b/indra/newview/llwldaycycle.cpp
index 4c0cb7c0f4..e9b0baf612 100755
--- a/indra/newview/llwldaycycle.cpp
+++ b/indra/newview/llwldaycycle.cpp
@@ -46,7 +46,7 @@ LLWLDayCycle::~LLWLDayCycle()
void LLWLDayCycle::loadDayCycle(const LLSD& day_data, LLWLParamKey::EScope scope)
{
- lldebugs << "Loading day cycle (day_data.size() = " << day_data.size() << ", scope = " << scope << ")" << llendl;
+ LL_DEBUGS() << "Loading day cycle (day_data.size() = " << day_data.size() << ", scope = " << scope << ")" << LL_ENDL;
mTimeMap.clear();
// add each key frame
@@ -128,7 +128,7 @@ LLSD LLWLDayCycle::loadDayCycleFromPath(const std::string& file_path)
void LLWLDayCycle::saveDayCycle(const std::string & fileName)
{
std::string pathName(gDirUtilp->getExpandedFilename(LL_PATH_APP_SETTINGS, "windlight/days", fileName));
- //llinfos << "Saving WindLight settings to " << pathName << llendl;
+ //LL_INFOS() << "Saving WindLight settings to " << pathName << LL_ENDL;
save(pathName);
}
@@ -154,7 +154,7 @@ LLSD LLWLDayCycle::asLLSD()
day_data.append(key);
}
- lldebugs << "Dumping day cycle (" << mTimeMap.size() << ") to LLSD: " << day_data << llendl;
+ LL_DEBUGS() << "Dumping day cycle (" << mTimeMap.size() << ") to LLSD: " << day_data << LL_ENDL;
return day_data;
}
@@ -169,7 +169,7 @@ bool LLWLDayCycle::getSkyRefs(std::map<LLWLParamKey, LLWLParamSet>& refs) const
const LLWLParamKey& key = iter->second;
if (!wl_mgr.getParamSet(key, refs[key]))
{
- llwarns << "Cannot find sky [" << key.name << "] referenced by a day cycle" << llendl;
+ LL_WARNS() << "Cannot find sky [" << key.name << "] referenced by a day cycle" << LL_ENDL;
result = false;
}
}
@@ -192,7 +192,7 @@ bool LLWLDayCycle::getSkyMap(LLSD& sky_map) const
void LLWLDayCycle::clearKeyframes()
{
- lldebugs << "Clearing key frames" << llendl;
+ LL_DEBUGS() << "Clearing key frames" << LL_ENDL;
mTimeMap.clear();
}
@@ -209,18 +209,18 @@ bool LLWLDayCycle::addKeyframe(F32 newTime, LLWLParamKey frame)
if(mTimeMap.find(newTime) == mTimeMap.end())
{
mTimeMap.insert(std::pair<F32, LLWLParamKey>(newTime, frame));
- lldebugs << "Adding key frame (" << newTime << ", " << frame.toLLSD() << ")" << llendl;
+ LL_DEBUGS() << "Adding key frame (" << newTime << ", " << frame.toLLSD() << ")" << LL_ENDL;
return true;
}
// otherwise, don't add, and return error
- llwarns << "Error adding key frame (" << newTime << ", " << frame.toLLSD() << ")" << llendl;
+ LL_WARNS() << "Error adding key frame (" << newTime << ", " << frame.toLLSD() << ")" << LL_ENDL;
return false;
}
bool LLWLDayCycle::changeKeyframeTime(F32 oldTime, F32 newTime)
{
- lldebugs << "Changing key frame time (" << oldTime << " => " << newTime << ")" << llendl;
+ LL_DEBUGS() << "Changing key frame time (" << oldTime << " => " << newTime << ")" << LL_ENDL;
// just remove and add back
LLWLParamKey frame = mTimeMap[oldTime];
@@ -228,7 +228,7 @@ bool LLWLDayCycle::changeKeyframeTime(F32 oldTime, F32 newTime)
bool stat = removeKeyframe(oldTime);
if(stat == false)
{
- lldebugs << "Failed to change key frame time (" << oldTime << " => " << newTime << ")" << llendl;
+ LL_DEBUGS() << "Failed to change key frame time (" << oldTime << " => " << newTime << ")" << LL_ENDL;
return stat;
}
@@ -237,7 +237,7 @@ bool LLWLDayCycle::changeKeyframeTime(F32 oldTime, F32 newTime)
bool LLWLDayCycle::changeKeyframeParam(F32 time, LLWLParamKey key)
{
- lldebugs << "Changing key frame param (" << time << ", " << key.toLLSD() << ")" << llendl;
+ LL_DEBUGS() << "Changing key frame param (" << time << ", " << key.toLLSD() << ")" << LL_ENDL;
// just remove and add back
// make sure param exists
@@ -245,7 +245,7 @@ bool LLWLDayCycle::changeKeyframeParam(F32 time, LLWLParamKey key)
bool stat = LLWLParamManager::getInstance()->getParamSet(key, tmp);
if(stat == false)
{
- lldebugs << "Failed to change key frame param (" << time << ", " << key.toLLSD() << ")" << llendl;
+ LL_DEBUGS() << "Failed to change key frame param (" << time << ", " << key.toLLSD() << ")" << LL_ENDL;
return stat;
}
@@ -256,7 +256,7 @@ bool LLWLDayCycle::changeKeyframeParam(F32 time, LLWLParamKey key)
bool LLWLDayCycle::removeKeyframe(F32 time)
{
- lldebugs << "Removing key frame (" << time << ")" << llendl;
+ LL_DEBUGS() << "Removing key frame (" << time << ")" << LL_ENDL;
// look for the time. If there, erase it
std::map<F32, LLWLParamKey>::iterator mIt = mTimeMap.find(time);
@@ -295,7 +295,7 @@ bool LLWLDayCycle::getKeyedParam(F32 time, LLWLParamSet& param)
}
// return error if not found
- lldebugs << "Key " << time << " not found" << llendl;
+ LL_DEBUGS() << "Key " << time << " not found" << LL_ENDL;
return false;
}
@@ -310,7 +310,7 @@ bool LLWLDayCycle::getKeyedParamName(F32 time, std::string & name)
}
// return error if not found
- lldebugs << "Key " << time << " not found" << llendl;
+ LL_DEBUGS() << "Key " << time << " not found" << LL_ENDL;
return false;
}
@@ -322,7 +322,7 @@ bool LLWLDayCycle::hasReferencesTo(const LLWLParamKey& keyframe) const
void LLWLDayCycle::removeReferencesTo(const LLWLParamKey& keyframe)
{
- lldebugs << "Removing references to key frame " << keyframe.toLLSD() << llendl;
+ LL_DEBUGS() << "Removing references to key frame " << keyframe.toLLSD() << LL_ENDL;
F32 keytime;
bool might_exist;
do
diff --git a/indra/newview/llwlparammanager.cpp b/indra/newview/llwlparammanager.cpp
index ce9f61c0af..91ea10d43d 100755
--- a/indra/newview/llwlparammanager.cpp
+++ b/indra/newview/llwlparammanager.cpp
@@ -128,12 +128,12 @@ void LLWLParamManager::clearParamSetsOfScope(LLWLParamKey::EScope scope)
// side effect: applies changes to all internal structures!
std::map<LLWLParamKey, LLWLParamSet> LLWLParamManager::finalizeFromDayCycle(LLWLParamKey::EScope scope)
{
- lldebugs << "mDay before finalizing:" << llendl;
+ LL_DEBUGS() << "mDay before finalizing:" << LL_ENDL;
{
for (std::map<F32, LLWLParamKey>::iterator iter = mDay.mTimeMap.begin(); iter != mDay.mTimeMap.end(); ++iter)
{
LLWLParamKey& key = iter->second;
- lldebugs << iter->first << "->" << key.name << llendl;
+ LL_DEBUGS() << iter->first << "->" << key.name << LL_ENDL;
}
}
@@ -219,12 +219,12 @@ std::map<LLWLParamKey, LLWLParamSet> LLWLParamManager::finalizeFromDayCycle(LLWL
final_references[new_key] = iter->second;
}
- lldebugs << "mDay after finalizing:" << llendl;
+ LL_DEBUGS() << "mDay after finalizing:" << LL_ENDL;
{
for (std::map<F32, LLWLParamKey>::iterator iter = mDay.mTimeMap.begin(); iter != mDay.mTimeMap.end(); ++iter)
{
LLWLParamKey& key = iter->second;
- lldebugs << iter->first << "->" << key.name << llendl;
+ LL_DEBUGS() << iter->first << "->" << key.name << LL_ENDL;
}
}
@@ -272,7 +272,7 @@ void LLWLParamManager::loadAllPresets()
void LLWLParamManager::loadPresetsFromDir(const std::string& dir)
{
- LL_INFOS2("AppInit", "Shaders") << "Loading sky presets from " << dir << LL_ENDL;
+ LL_INFOS("AppInit", "Shaders") << "Loading sky presets from " << dir << LL_ENDL;
LLDirIterator dir_iter(dir, "*.xml");
while (1)
@@ -286,7 +286,7 @@ void LLWLParamManager::loadPresetsFromDir(const std::string& dir)
std::string path = gDirUtilp->add(dir, file);
if (!loadPreset(path))
{
- llwarns << "Error loading sky preset from " << path << llendl;
+ LL_WARNS() << "Error loading sky preset from " << path << LL_ENDL;
}
}
}
@@ -302,7 +302,7 @@ bool LLWLParamManager::loadPreset(const std::string& path)
return false;
}
- LL_DEBUGS2("AppInit", "Shaders") << "Loading sky " << name << LL_ENDL;
+ LL_DEBUGS("AppInit", "Shaders") << "Loading sky " << name << LL_ENDL;
LLSD params_data;
LLPointer<LLSDParser> parser = new LLSDXMLParser();
@@ -364,11 +364,11 @@ void LLWLParamManager::updateShaderUniforms(LLGLSLShader * shader)
}
-static LLFastTimer::DeclareTimer FTM_UPDATE_WLPARAM("Update Windlight Params");
+static LLTrace::BlockTimerStatHandle FTM_UPDATE_WLPARAM("Update Windlight Params");
void LLWLParamManager::propagateParameters(void)
{
- LLFastTimer ftm(FTM_UPDATE_WLPARAM);
+ LL_RECORD_BLOCK_TIME(FTM_UPDATE_WLPARAM);
LLVector4 sunDir;
LLVector4 moonDir;
@@ -439,7 +439,7 @@ void LLWLParamManager::propagateParameters(void)
void LLWLParamManager::update(LLViewerCamera * cam)
{
- LLFastTimer ftm(FTM_UPDATE_WLPARAM);
+ LL_RECORD_BLOCK_TIME(FTM_UPDATE_WLPARAM);
// update clouds, sun, and general
mCurParams.updateCloudScrolling();
@@ -577,7 +577,7 @@ void LLWLParamManager::removeParamSet(const LLWLParamKey& key, bool delete_from_
if (key.scope == LLEnvKey::SCOPE_REGION)
{
- llwarns << "Removing region skies not supported" << llendl;
+ LL_WARNS() << "Removing region skies not supported" << LL_ENDL;
llassert(key.scope == LLEnvKey::SCOPE_LOCAL);
return;
}
@@ -677,7 +677,7 @@ void LLWLParamManager::initSingleton()
if (!LLDayCycleManager::instance().getPreset(preferred_day, mDay))
{
// Fall back to default.
- llwarns << "No day cycle named " << preferred_day << ", falling back to defaults" << llendl;
+ LL_WARNS() << "No day cycle named " << preferred_day << ", falling back to defaults" << LL_ENDL;
mDay.loadDayCycleFromFile("Default.xml");
// *TODO: Fix user preferences accordingly.
@@ -687,7 +687,7 @@ void LLWLParamManager::initSingleton()
std::string sky = LLEnvManagerNew::instance().getSkyPresetName();
if (!getParamSet(LLWLParamKey(sky, LLWLParamKey::SCOPE_LOCAL), mCurParams))
{
- llwarns << "No sky preset named " << sky << ", falling back to defaults" << llendl;
+ LL_WARNS() << "No sky preset named " << sky << ", falling back to defaults" << LL_ENDL;
getParamSet(LLWLParamKey("Default", LLWLParamKey::SCOPE_LOCAL), mCurParams);
// *TODO: Fix user preferences accordingly.
diff --git a/indra/newview/llwlparamset.cpp b/indra/newview/llwlparamset.cpp
index 8529a4614b..066cb9a0ac 100755
--- a/indra/newview/llwlparamset.cpp
+++ b/indra/newview/llwlparamset.cpp
@@ -60,11 +60,11 @@ LLWLParamSet::LLWLParamSet(void) :
mCloudScrollXOffset(0.f), mCloudScrollYOffset(0.f)
{}
-static LLFastTimer::DeclareTimer FTM_WL_PARAM_UPDATE("WL Param Update");
+static LLTrace::BlockTimerStatHandle FTM_WL_PARAM_UPDATE("WL Param Update");
void LLWLParamSet::update(LLGLSLShader * shader) const
{
- LLFastTimer t(FTM_WL_PARAM_UPDATE);
+ LL_RECORD_BLOCK_TIME(FTM_WL_PARAM_UPDATE);
LLSD::map_const_iterator i = mParamValues.beginMap();
std::vector<LLStaticHashedString>::const_iterator n = mParamHashedNames.begin();
for(;(i != mParamValues.endMap()) && (n != mParamHashedNames.end());++i, n++)
diff --git a/indra/newview/llworld.cpp b/indra/newview/llworld.cpp
index 85614f397c..1ef2cfff8a 100755
--- a/indra/newview/llworld.cpp
+++ b/indra/newview/llworld.cpp
@@ -55,7 +55,7 @@
#include "message.h"
#include "pipeline.h"
#include "llappviewer.h" // for do_disconnect()
-
+#include "llscenemonitor.h"
#include <deque>
#include <queue>
#include <map>
@@ -110,6 +110,7 @@ LLWorld::LLWorld() :
gGL.getTexUnit(0)->bind(mDefaultWaterTexturep);
mDefaultWaterTexturep->setAddressMode(LLTexUnit::TAM_CLAMP);
+ LLViewerRegion::sVOCacheCullingEnabled = gSavedSettings.getBOOL("RequestFullRegionCache") && gSavedSettings.getBOOL("ObjectCacheEnabled");
}
@@ -122,10 +123,7 @@ void LLWorld::destroyClass()
LLViewerRegion* region_to_delete = *region_it++;
removeRegion(region_to_delete->getHost());
}
- if(LLVOCache::hasInstance())
- {
- LLVOCache::getInstance()->destroyClass() ;
- }
+
LLViewerPartSim::getInstance()->destroyClass();
mDefaultWaterTexturep = NULL ;
@@ -133,12 +131,17 @@ void LLWorld::destroyClass()
{
mEdgeWaterObjects[i] = NULL;
}
+
+ //make all visible drawbles invisible.
+ LLDrawable::incrementVisible();
+
+ LLSceneMonitor::deleteSingleton();
}
LLViewerRegion* LLWorld::addRegion(const U64 &region_handle, const LLHost &host)
{
- llinfos << "Add region with handle: " << region_handle << " on host " << host << llendl;
+ LL_INFOS() << "Add region with handle: " << region_handle << " on host " << host << LL_ENDL;
LLViewerRegion *regionp = getRegionFromHandle(region_handle);
std::string seedUrl;
if (regionp)
@@ -148,19 +151,19 @@ LLViewerRegion* LLWorld::addRegion(const U64 &region_handle, const LLHost &host)
if (host == old_host && regionp->isAlive())
{
// This is a duplicate for the same host and it's alive, don't bother.
- llinfos << "Region already exists and is alive, using existing region" << llendl;
+ LL_INFOS() << "Region already exists and is alive, using existing region" << LL_ENDL;
return regionp;
}
if (host != old_host)
{
- llwarns << "LLWorld::addRegion exists, but old host " << old_host
+ LL_WARNS() << "LLWorld::addRegion exists, but old host " << old_host
<< " does not match new host " << host
- << ", removing old region and creating new" << llendl;
+ << ", removing old region and creating new" << LL_ENDL;
}
if (!regionp->isAlive())
{
- llwarns << "LLWorld::addRegion exists, but isn't alive. Removing old region and creating new" << llendl;
+ LL_WARNS() << "LLWorld::addRegion exists, but isn't alive. Removing old region and creating new" << LL_ENDL;
}
// Save capabilities seed URL
@@ -172,7 +175,7 @@ LLViewerRegion* LLWorld::addRegion(const U64 &region_handle, const LLHost &host)
}
else
{
- llinfos << "Region does not exist, creating new one" << llendl;
+ LL_INFOS() << "Region does not exist, creating new one" << LL_ENDL;
}
U32 iindex = 0;
@@ -180,8 +183,8 @@ LLViewerRegion* LLWorld::addRegion(const U64 &region_handle, const LLHost &host)
from_region_handle(region_handle, &iindex, &jindex);
S32 x = (S32)(iindex/mWidth);
S32 y = (S32)(jindex/mWidth);
- llinfos << "Adding new region (" << x << ":" << y << ")"
- << " on host: " << host << llendl;
+ LL_INFOS() << "Adding new region (" << x << ":" << y << ")"
+ << " on host: " << host << LL_ENDL;
LLVector3d origin_global;
@@ -194,7 +197,7 @@ LLViewerRegion* LLWorld::addRegion(const U64 &region_handle, const LLHost &host)
getRegionWidthInMeters() );
if (!regionp)
{
- llerrs << "Unable to create new region!" << llendl;
+ LL_ERRS() << "Unable to create new region!" << LL_ENDL;
}
if ( !seedUrl.empty() )
@@ -232,7 +235,7 @@ LLViewerRegion* LLWorld::addRegion(const U64 &region_handle, const LLHost &host)
neighborp = getRegionFromHandle(adj_handle);
if (neighborp)
{
- //llinfos << "Connecting " << region_x << ":" << region_y << " -> " << adj_x << ":" << adj_y << llendl;
+ //LL_INFOS() << "Connecting " << region_x << ":" << region_y << " -> " << adj_x << ":" << adj_y << LL_ENDL;
regionp->connectNeighbor(neighborp, dir);
}
}
@@ -250,7 +253,7 @@ void LLWorld::removeRegion(const LLHost &host)
LLViewerRegion *regionp = getRegion(host);
if (!regionp)
{
- llwarns << "Trying to remove region that doesn't exist!" << llendl;
+ LL_WARNS() << "Trying to remove region that doesn't exist!" << LL_ENDL;
return;
}
@@ -260,21 +263,21 @@ void LLWorld::removeRegion(const LLHost &host)
iter != mRegionList.end(); ++iter)
{
LLViewerRegion* reg = *iter;
- llwarns << "RegionDump: " << reg->getName()
+ LL_WARNS() << "RegionDump: " << reg->getName()
<< " " << reg->getHost()
<< " " << reg->getOriginGlobal()
- << llendl;
+ << LL_ENDL;
}
- llwarns << "Agent position global " << gAgent.getPositionGlobal()
+ LL_WARNS() << "Agent position global " << gAgent.getPositionGlobal()
<< " agent " << gAgent.getPositionAgent()
- << llendl;
+ << LL_ENDL;
- llwarns << "Regions visited " << gAgent.getRegionsVisited() << llendl;
+ LL_WARNS() << "Regions visited " << gAgent.getRegionsVisited() << LL_ENDL;
- llwarns << "gFrameTimeSeconds " << gFrameTimeSeconds << llendl;
+ LL_WARNS() << "gFrameTimeSeconds " << gFrameTimeSeconds << LL_ENDL;
- llwarns << "Disabling region " << regionp->getName() << " that agent is in!" << llendl;
+ LL_WARNS() << "Disabling region " << regionp->getName() << " that agent is in!" << LL_ENDL;
LLAppViewer::instance()->forceDisconnect(LLTrans::getString("YouHaveBeenDisconnected"));
regionp->saveObjectCache() ; //force to save objects here in case that the object cache is about to be destroyed.
@@ -282,7 +285,7 @@ void LLWorld::removeRegion(const LLHost &host)
}
from_region_handle(regionp->getHandle(), &x, &y);
- llinfos << "Removing region " << x << ":" << y << llendl;
+ LL_INFOS() << "Removing region " << x << ":" << y << LL_ENDL;
mRegionList.remove(regionp);
mActiveRegionList.remove(regionp);
@@ -628,7 +631,8 @@ void LLWorld::updateVisibilities()
if (part)
{
LLSpatialGroup* group = (LLSpatialGroup*) part->mOctree->getListener(0);
- if (LLViewerCamera::getInstance()->AABBInFrustum(group->mBounds[0], group->mBounds[1]))
+ const LLVector4a* bounds = group->getBounds();
+ if (LLViewerCamera::getInstance()->AABBInFrustum(bounds[0], bounds[1]))
{
mCulledRegionList.erase(curiter);
mVisibleRegionList.push_back(regionp);
@@ -651,7 +655,8 @@ void LLWorld::updateVisibilities()
if (part)
{
LLSpatialGroup* group = (LLSpatialGroup*) part->mOctree->getListener(0);
- if (LLViewerCamera::getInstance()->AABBInFrustum(group->mBounds[0], group->mBounds[1]))
+ const LLVector4a* bounds = group->getBounds();
+ if (LLViewerCamera::getInstance()->AABBInFrustum(bounds[0], bounds[1]))
{
regionp->calculateCameraDistance();
regionp->getLand().updatePatchVisibilities(gAgent);
@@ -670,24 +675,75 @@ void LLWorld::updateVisibilities()
LLViewerCamera::getInstance()->setFar(cur_far_clip);
}
+static LLTrace::SampleStatHandle<> sNumActiveCachedObjects("numactivecachedobjects", "Number of objects loaded from cache");
+
void LLWorld::updateRegions(F32 max_update_time)
{
LLTimer update_timer;
- BOOL did_one = FALSE;
+ mNumOfActiveCachedObjects = 0;
- // Perform idle time updates for the regions (and associated surfaces)
+ if(LLViewerCamera::getInstance()->isChanged())
+ {
+ LLViewerRegion::sLastCameraUpdated = LLViewerOctreeEntryData::getCurrentFrame() + 1;
+ }
+ LLViewerRegion::calcNewObjectCreationThrottle();
+ if(LLViewerRegion::isNewObjectCreationThrottleDisabled())
+ {
+ max_update_time = llmax(max_update_time, 1.0f); //seconds, loosen the time throttle.
+ }
+
+ F32 max_time = llmin((F32)(max_update_time - update_timer.getElapsedTimeF32()), max_update_time * 0.25f);
+ //update the self avatar region
+ LLViewerRegion* self_regionp = gAgent.getRegion();
+ if(self_regionp)
+ {
+ self_regionp->idleUpdate(max_time);
+ }
+
+ //sort regions by its mLastUpdate
+ //smaller mLastUpdate first to make sure every region has chance to get updated.
+ LLViewerRegion::region_priority_list_t region_list;
for (region_list_t::iterator iter = mRegionList.begin();
iter != mRegionList.end(); ++iter)
{
LLViewerRegion* regionp = *iter;
- F32 max_time = max_update_time - update_timer.getElapsedTimeF32();
- if (did_one && max_time <= 0.f)
- break;
- max_time = llmin(max_time, max_update_time*.1f);
- if (regionp->idleUpdate(max_update_time))
+ if(regionp != self_regionp)
{
- did_one = TRUE;
+ region_list.insert(regionp);
}
+ mNumOfActiveCachedObjects += regionp->getNumOfActiveCachedObjects();
+ }
+
+ // Perform idle time updates for the regions (and associated surfaces)
+ for (LLViewerRegion::region_priority_list_t::iterator iter = region_list.begin();
+ iter != region_list.end(); ++iter)
+ {
+ if(max_time > 0.f)
+ {
+ max_time = llmin((F32)(max_update_time - update_timer.getElapsedTimeF32()), max_update_time * 0.25f);
+ }
+
+ if(max_time > 0.f)
+ {
+ (*iter)->idleUpdate(max_time);
+ }
+ else
+ {
+ //perform some necessary but very light updates.
+ (*iter)->lightIdleUpdate();
+ }
+ }
+
+ sample(sNumActiveCachedObjects, mNumOfActiveCachedObjects);
+ }
+
+void LLWorld::clearAllVisibleObjects()
+{
+ for (region_list_t::iterator iter = mRegionList.begin();
+ iter != mRegionList.end(); ++iter)
+ {
+ //clear all cached visible objects.
+ (*iter)->clearCachedVisibleObjects();
}
}
@@ -713,7 +769,7 @@ void LLWorld::renderPropertyLines()
void LLWorld::updateNetStats()
{
- F32 bits = 0.f;
+ F64Bits bits;
U32 packets = 0;
for (region_list_t::iterator iter = mActiveRegionList.begin();
@@ -721,29 +777,28 @@ void LLWorld::updateNetStats()
{
LLViewerRegion* regionp = *iter;
regionp->updateNetStats();
- bits += regionp->mBitStat.getCurrent();
- packets += llfloor( regionp->mPacketsStat.getCurrent() );
+ bits += regionp->mBitsReceived;
+ packets += llfloor( regionp->mPacketsReceived );
+ regionp->mBitsReceived = (F32Bits)0.f;
+ regionp->mPacketsReceived = 0.f;
}
S32 packets_in = gMessageSystem->mPacketsIn - mLastPacketsIn;
S32 packets_out = gMessageSystem->mPacketsOut - mLastPacketsOut;
S32 packets_lost = gMessageSystem->mDroppedPackets - mLastPacketsLost;
- S32 actual_in_bits = gMessageSystem->mPacketRing.getAndResetActualInBits();
- S32 actual_out_bits = gMessageSystem->mPacketRing.getAndResetActualOutBits();
- LLViewerStats::getInstance()->mActualInKBitStat.addValue(actual_in_bits/1024.f);
- LLViewerStats::getInstance()->mActualOutKBitStat.addValue(actual_out_bits/1024.f);
- LLViewerStats::getInstance()->mKBitStat.addValue(bits/1024.f);
- LLViewerStats::getInstance()->mPacketsInStat.addValue(packets_in);
- LLViewerStats::getInstance()->mPacketsOutStat.addValue(packets_out);
- LLViewerStats::getInstance()->mPacketsLostStat.addValue(gMessageSystem->mDroppedPackets);
+ F64Bits actual_in_bits(gMessageSystem->mPacketRing.getAndResetActualInBits());
+ F64Bits actual_out_bits(gMessageSystem->mPacketRing.getAndResetActualOutBits());
+
+ add(LLStatViewer::MESSAGE_SYSTEM_DATA_IN, actual_in_bits);
+ add(LLStatViewer::MESSAGE_SYSTEM_DATA_OUT, actual_out_bits);
+ add(LLStatViewer::ACTIVE_MESSAGE_DATA_RECEIVED, bits);
+ add(LLStatViewer::PACKETS_IN, packets_in);
+ add(LLStatViewer::PACKETS_OUT, packets_out);
+ add(LLStatViewer::PACKETS_LOST, packets_lost);
if (packets_in)
{
- LLViewerStats::getInstance()->mPacketsLostPercentStat.addValue(100.f*((F32)packets_lost/(F32)packets_in));
- }
- else
- {
- LLViewerStats::getInstance()->mPacketsLostPercentStat.addValue(0.f);
+ sample(LLStatViewer::PACKETS_LOST_PERCENT, LLUnits::Ratio::fromValue((F32)packets_lost/(F32)packets_in));
}
mLastPacketsIn = gMessageSystem->mPacketsIn;
@@ -754,8 +809,8 @@ void LLWorld::updateNetStats()
void LLWorld::printPacketsLost()
{
- llinfos << "Simulators:" << llendl;
- llinfos << "----------" << llendl;
+ LL_INFOS() << "Simulators:" << LL_ENDL;
+ LL_INFOS() << "----------" << LL_ENDL;
LLCircuitData *cdp = NULL;
for (region_list_t::iterator iter = mActiveRegionList.begin();
@@ -767,8 +822,8 @@ void LLWorld::printPacketsLost()
{
LLVector3d range = regionp->getCenterGlobal() - gAgent.getPositionGlobal();
- llinfos << regionp->getHost() << ", range: " << range.length()
- << " packets lost: " << cdp->getPacketsLost() << llendl;
+ LL_INFOS() << regionp->getHost() << ", range: " << range.length()
+ << " packets lost: " << cdp->getPacketsLost() << LL_ENDL;
}
}
}
@@ -824,7 +879,7 @@ void LLWorld::updateWaterObjects()
}
if (mRegionList.empty())
{
- llwarns << "No regions!" << llendl;
+ LL_WARNS() << "No regions!" << LL_ENDL;
return;
}
@@ -974,12 +1029,12 @@ LLViewerTexture* LLWorld::getDefaultWaterTexture()
return mDefaultWaterTexturep;
}
-void LLWorld::setSpaceTimeUSec(const U64 space_time_usec)
+void LLWorld::setSpaceTimeUSec(const U64MicrosecondsImplicit space_time_usec)
{
mSpaceTimeUSec = space_time_usec;
}
-U64 LLWorld::getSpaceTimeUSec() const
+U64MicrosecondsImplicit LLWorld::getSpaceTimeUSec() const
{
return mSpaceTimeUSec;
}
@@ -1019,7 +1074,7 @@ void LLWorld::disconnectRegions()
continue;
}
- llinfos << "Sending AgentQuitCopy to: " << regionp->getHost() << llendl;
+ LL_INFOS() << "Sending AgentQuitCopy to: " << regionp->getHost() << LL_ENDL;
msg->newMessageFast(_PREHASH_AgentQuitCopy);
msg->nextBlockFast(_PREHASH_AgentData);
msg->addUUIDFast(_PREHASH_AgentID, gAgent.getID());
@@ -1030,11 +1085,11 @@ void LLWorld::disconnectRegions()
}
}
-static LLFastTimer::DeclareTimer FTM_ENABLE_SIMULATOR("Enable Sim");
+static LLTrace::BlockTimerStatHandle FTM_ENABLE_SIMULATOR("Enable Sim");
void process_enable_simulator(LLMessageSystem *msg, void **user_data)
{
- LLFastTimer t(FTM_ENABLE_SIMULATOR);
+ LL_RECORD_BLOCK_TIME(FTM_ENABLE_SIMULATOR);
// enable the appropriate circuit for this simulator and
// add its values into the gSimulator structure
U64 handle;
@@ -1053,7 +1108,7 @@ void process_enable_simulator(LLMessageSystem *msg, void **user_data)
LLWorld::getInstance()->addRegion(handle, sim);
// give the simulator a message it can use to get ip and port
- llinfos << "simulator_enable() Enabling " << sim << " with code " << msg->getOurCircuitCode() << llendl;
+ LL_INFOS() << "simulator_enable() Enabling " << sim << " with code " << msg->getOurCircuitCode() << LL_ENDL;
msg->newMessageFast(_PREHASH_UseCircuitCode);
msg->nextBlockFast(_PREHASH_CircuitCode);
msg->addU32Fast(_PREHASH_Code, msg->getOurCircuitCode());
@@ -1081,7 +1136,7 @@ public:
!input["body"].has("sim-ip-and-port") ||
!input["body"].has("seed-capability"))
{
- llwarns << "invalid parameters" << llendl;
+ LL_WARNS() << "invalid parameters" << LL_ENDL;
return;
}
@@ -1090,8 +1145,8 @@ public:
LLViewerRegion* regionp = LLWorld::getInstance()->getRegion(sim);
if (!regionp)
{
- llwarns << "Got EstablishAgentCommunication for unknown region "
- << sim << llendl;
+ LL_WARNS() << "Got EstablishAgentCommunication for unknown region "
+ << sim << LL_ENDL;
return;
}
regionp->setSeedCapability(input["body"]["seed-capability"]);
@@ -1104,7 +1159,7 @@ void process_disable_simulator(LLMessageSystem *mesgsys, void **user_data)
{
LLHost host = mesgsys->getSender();
- //llinfos << "Disabling simulator with message from " << host << llendl;
+ //LL_INFOS() << "Disabling simulator with message from " << host << LL_ENDL;
LLWorld::getInstance()->removeRegion(host);
mesgsys->disableCircuit(host);
@@ -1117,8 +1172,8 @@ void process_region_handshake(LLMessageSystem* msg, void** user_data)
LLViewerRegion* regionp = LLWorld::getInstance()->getRegion(host);
if (!regionp)
{
- llwarns << "Got region handshake for unknown region "
- << host << llendl;
+ LL_WARNS() << "Got region handshake for unknown region "
+ << host << LL_ENDL;
return;
}
@@ -1156,6 +1211,7 @@ void send_agent_pause()
}
gObjectList.mWasPaused = TRUE;
+ LLViewerStats::instance().getRecording().stop();
}
@@ -1185,8 +1241,8 @@ void send_agent_resume()
gMessageSystem->sendReliable(regionp->getHost());
}
- // Reset the FPS counter to avoid an invalid fps
- LLViewerStats::getInstance()->mFPSStat.start();
+ // Resume data collection to ignore invalid rates
+ LLViewerStats::instance().getRecording().resume();
LLAppViewer::instance()->resumeMainloopTimeout();
}
@@ -1246,13 +1302,13 @@ void LLWorld::getAvatars(uuid_vec_t* avatar_ids, std::vector<LLVector3d>* positi
{
LLViewerRegion* regionp = *iter;
const LLVector3d& origin_global = regionp->getOriginGlobal();
- S32 count = regionp->mMapAvatars.count();
+ S32 count = regionp->mMapAvatars.size();
for (S32 i = 0; i < count; i++)
{
- LLVector3d pos_global = unpackLocalToGlobalPosition(regionp->mMapAvatars.get(i), origin_global);
+ LLVector3d pos_global = unpackLocalToGlobalPosition(regionp->mMapAvatars.at(i), origin_global);
if(dist_vec_squared(pos_global, relative_to) <= radius_squared)
{
- LLUUID uuid = regionp->mMapAvatarIDs.get(i);
+ LLUUID uuid = regionp->mMapAvatarIDs.at(i);
// if this avatar doesn't already exist in the list, add it
if(uuid.notNull() && avatar_ids != NULL && std::find(avatar_ids->begin(), avatar_ids->end(), uuid) == avatar_ids->end())
{
diff --git a/indra/newview/llworld.h b/indra/newview/llworld.h
index d0b001ba44..b2d8418064 100755
--- a/indra/newview/llworld.h
+++ b/indra/newview/llworld.h
@@ -141,11 +141,13 @@ public:
void waterHeightRegionInfo(std::string const& sim_name, F32 water_height);
void shiftRegions(const LLVector3& offset);
- void setSpaceTimeUSec(const U64 space_time_usec);
- U64 getSpaceTimeUSec() const;
+ void setSpaceTimeUSec(const U64MicrosecondsImplicit space_time_usec);
+ U64MicrosecondsImplicit getSpaceTimeUSec() const;
void getInfo(LLSD& info);
+ U32 getNumOfActiveCachedObjects() const {return mNumOfActiveCachedObjects;}
+ void clearAllVisibleObjects();
public:
typedef std::list<LLViewerRegion*> region_list_t;
const region_list_t& getRegionList() const { return mActiveRegionList; }
@@ -187,8 +189,8 @@ private:
S32 mLastPacketsIn;
S32 mLastPacketsOut;
S32 mLastPacketsLost;
-
- U64 mSpaceTimeUSec;
+ U32 mNumOfActiveCachedObjects;
+ U64MicrosecondsImplicit mSpaceTimeUSec;
BOOL mClassicCloudsEnabled;
diff --git a/indra/newview/llworldmap.h b/indra/newview/llworldmap.h
index d514b2f14c..1a168e4b4d 100755
--- a/indra/newview/llworldmap.h
+++ b/indra/newview/llworldmap.h
@@ -38,6 +38,18 @@
#include "llviewertexture.h"
#include "llgltexture.h"
+// map item types
+const U32 MAP_ITEM_TELEHUB = 0x01;
+const U32 MAP_ITEM_PG_EVENT = 0x02;
+const U32 MAP_ITEM_MATURE_EVENT = 0x03;
+//const U32 MAP_ITEM_POPULAR = 0x04; // No longer supported, 2009-03-02 KLW
+//const U32 MAP_ITEM_AGENT_COUNT = 0x05;
+const U32 MAP_ITEM_AGENT_LOCATIONS = 0x06;
+const U32 MAP_ITEM_LAND_FOR_SALE = 0x07;
+const U32 MAP_ITEM_CLASSIFIED = 0x08;
+const U32 MAP_ITEM_ADULT_EVENT = 0x09;
+const U32 MAP_ITEM_LAND_FOR_SALE_ADULT = 0x0a;
+
// Description of objects like hubs, events, land for sale, people and more (TBD).
// Note: we don't store a "type" in there so we need to store instances of this class in
// well known objects (i.e. list of objects which type is "well known").
diff --git a/indra/newview/llworldmapmessage.cpp b/indra/newview/llworldmapmessage.cpp
index 8307d32336..865292fa90 100755
--- a/indra/newview/llworldmapmessage.cpp
+++ b/indra/newview/llworldmapmessage.cpp
@@ -156,7 +156,7 @@ void LLWorldMapMessage::processMapBlockReply(LLMessageSystem* msg, void**)
// There's only one flag that we ever use here
if (agent_flags != LAYER_FLAG)
{
- llwarns << "Invalid map image type returned! layer = " << agent_flags << llendl;
+ LL_WARNS() << "Invalid map image type returned! layer = " << agent_flags << LL_ENDL;
return;
}
diff --git a/indra/newview/llworldmapmessage.h b/indra/newview/llworldmapmessage.h
index 12b6ef4792..ac1ea1607c 100755
--- a/indra/newview/llworldmapmessage.h
+++ b/indra/newview/llworldmapmessage.h
@@ -27,6 +27,8 @@
#ifndef LL_LLWORLDMAPMESSAGE_H
#define LL_LLWORLDMAPMESSAGE_H
+#include "boost/function.hpp"
+
// Handling of messages (send and process) as well as SLURL callback if necessary
class LLMessageSystem;
diff --git a/indra/newview/llworldmapview.cpp b/indra/newview/llworldmapview.cpp
index 786e4f2de6..a770352f86 100755
--- a/indra/newview/llworldmapview.cpp
+++ b/indra/newview/llworldmapview.cpp
@@ -302,8 +302,8 @@ void LLWorldMapView::draw()
mVisibleRegions.clear();
// animate pan if necessary
- sPanX = lerp(sPanX, sTargetPanX, LLCriticalDamp::getInterpolant(0.1f));
- sPanY = lerp(sPanY, sTargetPanY, LLCriticalDamp::getInterpolant(0.1f));
+ sPanX = lerp(sPanX, sTargetPanX, LLSmoothInterpolation::getInterpolant(0.1f));
+ sPanY = lerp(sPanY, sTargetPanY, LLSmoothInterpolation::getInterpolant(0.1f));
const S32 width = getRect().getWidth();
const S32 height = getRect().getHeight();
@@ -1713,7 +1713,7 @@ BOOL LLWorldMapView::handleHover( S32 x, S32 y, MASK mask )
{
gViewerWindow->setCursor( UI_CURSOR_CROSS );
}
- lldebugst(LLERR_USER_INPUT) << "hover handled by LLWorldMapView" << llendl;
+ LL_DEBUGS("UserInput") << "hover handled by LLWorldMapView" << LL_ENDL;
return TRUE;
}
}
diff --git a/indra/newview/llxmlrpctransaction.cpp b/indra/newview/llxmlrpctransaction.cpp
index 0da70d398b..8e164337b6 100755
--- a/indra/newview/llxmlrpctransaction.cpp
+++ b/indra/newview/llxmlrpctransaction.cpp
@@ -25,6 +25,8 @@
*/
#include "llviewerprecompiledheaders.h"
+// include this to get winsock2 because openssl attempts to include winsock1
+#include "llwin32headerslean.h"
#include <openssl/x509_vfy.h>
#include <openssl/ssl.h>
#include "llsecapi.h"
@@ -307,7 +309,7 @@ void LLXMLRPCTransaction::Impl::init(XMLRPC_REQUEST request, bool useGzip)
}
if(!mCurlRequest->isValid())
{
- llwarns << "mCurlRequest is invalid." << llendl ;
+ LL_WARNS() << "mCurlRequest is invalid." << LL_ENDL ;
delete mCurlRequest ;
mCurlRequest = NULL ;
@@ -373,7 +375,7 @@ bool LLXMLRPCTransaction::Impl::process()
{
if(!mCurlRequest || !mCurlRequest->isValid())
{
- llwarns << "transaction failed." << llendl ;
+ LL_WARNS() << "transaction failed." << LL_ENDL ;
delete mCurlRequest ;
mCurlRequest = NULL ;
@@ -423,10 +425,10 @@ bool LLXMLRPCTransaction::Impl::process()
// appropriate
setCurlStatus(result);
- llwarns << "LLXMLRPCTransaction CURL error "
- << mCurlCode << ": " << mCurlRequest->getErrorString() << llendl;
- llwarns << "LLXMLRPCTransaction request URI: "
- << mURI << llendl;
+ LL_WARNS() << "LLXMLRPCTransaction CURL error "
+ << mCurlCode << ": " << mCurlRequest->getErrorString() << LL_ENDL;
+ LL_WARNS() << "LLXMLRPCTransaction request URI: "
+ << mURI << LL_ENDL;
}
return true;
@@ -460,12 +462,12 @@ bool LLXMLRPCTransaction::Impl::process()
{
setStatus(LLXMLRPCTransaction::StatusXMLRPCError);
- llwarns << "LLXMLRPCTransaction XMLRPC "
+ LL_WARNS() << "LLXMLRPCTransaction XMLRPC "
<< (hasError ? "error " : "fault ")
<< faultCode << ": "
- << faultString << llendl;
- llwarns << "LLXMLRPCTransaction request URI: "
- << mURI << llendl;
+ << faultString << LL_ENDL;
+ LL_WARNS() << "LLXMLRPCTransaction request URI: "
+ << mURI << LL_ENDL;
}
return true;
diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp
index 5da8a78b1b..21ccec5c0a 100755
--- a/indra/newview/pipeline.cpp
+++ b/indra/newview/pipeline.cpp
@@ -30,7 +30,6 @@
// library includes
#include "llaudioengine.h" // For debugging.
-#include "imageids.h"
#include "llerror.h"
#include "llviewercontrol.h"
#include "llfasttimer.h"
@@ -40,7 +39,6 @@
#include "llprimitive.h"
#include "llvolume.h"
#include "material_codes.h"
-#include "timing.h"
#include "v3color.h"
#include "llui.h"
#include "llglheaders.h"
@@ -87,6 +85,7 @@
#include "llviewerregion.h" // for audio debugging.
#include "llviewerwindow.h" // For getSpinAxis
#include "llvoavatarself.h"
+#include "llvocache.h"
#include "llvoground.h"
#include "llvosky.h"
#include "llvotree.h"
@@ -114,6 +113,8 @@
#include "llfloatertools.h"
#include "llpanelface.h"
#include "llpathfindingpathtool.h"
+#include "llscenemonitor.h"
+#include "llprogressview.h"
#ifdef _DEBUG
// Debug indices is disabled for now for debug performance - djs 4/24/02
@@ -204,6 +205,7 @@ BOOL LLPipeline::CameraOffset;
F32 LLPipeline::CameraMaxCoF;
F32 LLPipeline::CameraDoFResScale;
F32 LLPipeline::RenderAutoHideSurfaceAreaLimit;
+LLTrace::EventStatHandle<S64> LLPipeline::sStatBatchSize("renderbatchsize");
const F32 BACKLIGHT_DAY_MAGNITUDE_AVATAR = 0.2f;
const F32 BACKLIGHT_NIGHT_MAGNITUDE_AVATAR = 0.1f;
@@ -226,40 +228,40 @@ BOOL gDebugPipeline = FALSE;
LLPipeline gPipeline;
const LLMatrix4* gGLLastMatrix = NULL;
-LLFastTimer::DeclareTimer FTM_RENDER_GEOMETRY("Render Geometry");
-LLFastTimer::DeclareTimer FTM_RENDER_GRASS("Grass");
-LLFastTimer::DeclareTimer FTM_RENDER_INVISIBLE("Invisible");
-LLFastTimer::DeclareTimer FTM_RENDER_OCCLUSION("Occlusion");
-LLFastTimer::DeclareTimer FTM_RENDER_SHINY("Shiny");
-LLFastTimer::DeclareTimer FTM_RENDER_SIMPLE("Simple");
-LLFastTimer::DeclareTimer FTM_RENDER_TERRAIN("Terrain");
-LLFastTimer::DeclareTimer FTM_RENDER_TREES("Trees");
-LLFastTimer::DeclareTimer FTM_RENDER_UI("UI");
-LLFastTimer::DeclareTimer FTM_RENDER_WATER("Water");
-LLFastTimer::DeclareTimer FTM_RENDER_WL_SKY("Windlight Sky");
-LLFastTimer::DeclareTimer FTM_RENDER_ALPHA("Alpha Objects");
-LLFastTimer::DeclareTimer FTM_RENDER_CHARACTERS("Avatars");
-LLFastTimer::DeclareTimer FTM_RENDER_BUMP("Bump");
-LLFastTimer::DeclareTimer FTM_RENDER_MATERIALS("Materials");
-LLFastTimer::DeclareTimer FTM_RENDER_FULLBRIGHT("Fullbright");
-LLFastTimer::DeclareTimer FTM_RENDER_GLOW("Glow");
-LLFastTimer::DeclareTimer FTM_GEO_UPDATE("Geo Update");
-LLFastTimer::DeclareTimer FTM_PIPELINE_CREATE("Pipeline Create");
-LLFastTimer::DeclareTimer FTM_POOLRENDER("RenderPool");
-LLFastTimer::DeclareTimer FTM_POOLS("Pools");
-LLFastTimer::DeclareTimer FTM_DEFERRED_POOLRENDER("RenderPool (Deferred)");
-LLFastTimer::DeclareTimer FTM_DEFERRED_POOLS("Pools (Deferred)");
-LLFastTimer::DeclareTimer FTM_POST_DEFERRED_POOLRENDER("RenderPool (Post)");
-LLFastTimer::DeclareTimer FTM_POST_DEFERRED_POOLS("Pools (Post)");
-LLFastTimer::DeclareTimer FTM_RENDER_BLOOM_FBO("First FBO");
-LLFastTimer::DeclareTimer FTM_STATESORT("Sort Draw State");
-LLFastTimer::DeclareTimer FTM_PIPELINE("Pipeline");
-LLFastTimer::DeclareTimer FTM_CLIENT_COPY("Client Copy");
-LLFastTimer::DeclareTimer FTM_RENDER_DEFERRED("Deferred Shading");
-
-
-static LLFastTimer::DeclareTimer FTM_STATESORT_DRAWABLE("Sort Drawables");
-static LLFastTimer::DeclareTimer FTM_STATESORT_POSTSORT("Post Sort");
+LLTrace::BlockTimerStatHandle FTM_RENDER_GEOMETRY("Render Geometry");
+LLTrace::BlockTimerStatHandle FTM_RENDER_GRASS("Grass");
+LLTrace::BlockTimerStatHandle FTM_RENDER_INVISIBLE("Invisible");
+LLTrace::BlockTimerStatHandle FTM_RENDER_OCCLUSION("Occlusion");
+LLTrace::BlockTimerStatHandle FTM_RENDER_SHINY("Shiny");
+LLTrace::BlockTimerStatHandle FTM_RENDER_SIMPLE("Simple");
+LLTrace::BlockTimerStatHandle FTM_RENDER_TERRAIN("Terrain");
+LLTrace::BlockTimerStatHandle FTM_RENDER_TREES("Trees");
+LLTrace::BlockTimerStatHandle FTM_RENDER_UI("UI");
+LLTrace::BlockTimerStatHandle FTM_RENDER_WATER("Water");
+LLTrace::BlockTimerStatHandle FTM_RENDER_WL_SKY("Windlight Sky");
+LLTrace::BlockTimerStatHandle FTM_RENDER_ALPHA("Alpha Objects");
+LLTrace::BlockTimerStatHandle FTM_RENDER_CHARACTERS("Avatars");
+LLTrace::BlockTimerStatHandle FTM_RENDER_BUMP("Bump");
+LLTrace::BlockTimerStatHandle FTM_RENDER_MATERIALS("Render Materials");
+LLTrace::BlockTimerStatHandle FTM_RENDER_FULLBRIGHT("Fullbright");
+LLTrace::BlockTimerStatHandle FTM_RENDER_GLOW("Glow");
+LLTrace::BlockTimerStatHandle FTM_GEO_UPDATE("Geo Update");
+LLTrace::BlockTimerStatHandle FTM_PIPELINE_CREATE("Pipeline Create");
+LLTrace::BlockTimerStatHandle FTM_POOLRENDER("RenderPool");
+LLTrace::BlockTimerStatHandle FTM_POOLS("Pools");
+LLTrace::BlockTimerStatHandle FTM_DEFERRED_POOLRENDER("RenderPool (Deferred)");
+LLTrace::BlockTimerStatHandle FTM_DEFERRED_POOLS("Pools (Deferred)");
+LLTrace::BlockTimerStatHandle FTM_POST_DEFERRED_POOLRENDER("RenderPool (Post)");
+LLTrace::BlockTimerStatHandle FTM_POST_DEFERRED_POOLS("Pools (Post)");
+LLTrace::BlockTimerStatHandle FTM_RENDER_BLOOM_FBO("First FBO");
+LLTrace::BlockTimerStatHandle FTM_STATESORT("Sort Draw State");
+LLTrace::BlockTimerStatHandle FTM_PIPELINE("Pipeline");
+LLTrace::BlockTimerStatHandle FTM_CLIENT_COPY("Client Copy");
+LLTrace::BlockTimerStatHandle FTM_RENDER_DEFERRED("Deferred Shading");
+
+
+static LLTrace::BlockTimerStatHandle FTM_STATESORT_DRAWABLE("Sort Drawables");
+static LLTrace::BlockTimerStatHandle FTM_STATESORT_POSTSORT("Post Sort");
static LLStaticHashedString sTint("tint");
static LLStaticHashedString sAmbiance("ambiance");
@@ -429,17 +431,9 @@ bool addDeferredAttachments(LLRenderTarget& target)
LLPipeline::LLPipeline() :
mBackfaceCull(FALSE),
- mBatchCount(0),
mMatrixOpCount(0),
mTextureMatrixOps(0),
- mMaxBatchSize(0),
- mMinBatchSize(0),
- mMeanBatchSize(0),
- mTrianglesDrawn(0),
mNumVisibleNodes(0),
- mVerticesRelit(0),
- mLightingChanges(0),
- mGeometryChanges(0),
mNumVisibleFaces(0),
mInitialized(FALSE),
@@ -485,7 +479,7 @@ void LLPipeline::connectRefreshCachedSettingsSafe(const std::string name)
LLPointer<LLControlVariable> cntrl_ptr = gSavedSettings.getControl(name);
if ( cntrl_ptr.isNull() )
{
- llwarns << "Global setting name not found:" << name << llendl;
+ LL_WARNS() << "Global setting name not found:" << name << LL_ENDL;
}
else
{
@@ -523,7 +517,6 @@ void LLPipeline::init()
getPool(LLDrawPool::POOL_MATERIALS);
getPool(LLDrawPool::POOL_GLOW);
- LLViewerStats::getInstance()->mTrianglesDrawnStat.reset();
resetFrameStats();
if (gSavedSettings.getBOOL("DisableAllRenderFeatures"))
@@ -709,11 +702,11 @@ void LLPipeline::cleanup()
if (!mTerrainPools.empty())
{
- llwarns << "Terrain Pools not cleaned up" << llendl;
+ LL_WARNS() << "Terrain Pools not cleaned up" << LL_ENDL;
}
if (!mTreePools.empty())
{
- llwarns << "Tree Pools not cleaned up" << llendl;
+ LL_WARNS() << "Tree Pools not cleaned up" << LL_ENDL;
}
delete mAlphaPool;
@@ -779,7 +772,7 @@ void LLPipeline::destroyGL()
}
}
-static LLFastTimer::DeclareTimer FTM_RESIZE_SCREEN_TEXTURE("Resize Screen Texture");
+static LLTrace::BlockTimerStatHandle FTM_RESIZE_SCREEN_TEXTURE("Resize Screen Texture");
//static
void LLPipeline::throttleNewMemoryAllocation(BOOL disable)
@@ -801,7 +794,7 @@ void LLPipeline::throttleNewMemoryAllocation(BOOL disable)
void LLPipeline::resizeScreenTexture()
{
- LLFastTimer ft(FTM_RESIZE_SCREEN_TEXTURE);
+ LL_RECORD_BLOCK_TIME(FTM_RESIZE_SCREEN_TEXTURE);
if (gPipeline.canUseVertexShaders() && assertInitialized())
{
GLuint resX = gViewerWindow->getWorldViewWidthRaw();
@@ -922,7 +915,7 @@ LLPipeline::eFBOStatus LLPipeline::doAllocateScreenBuffer(U32 resX, U32 resY)
releaseScreenBuffers();
}
- llwarns << "Unable to allocate screen buffer at any resolution!" << llendl;
+ LL_WARNS() << "Unable to allocate screen buffer at any resolution!" << LL_ENDL;
}
return ret;
@@ -964,7 +957,7 @@ bool LLPipeline::allocateScreenBuffer(U32 resX, U32 resY, U32 samples)
if (!mDeferredDepth.allocate(resX, resY, 0, TRUE, FALSE, LLTexUnit::TT_RECT_TEXTURE, FALSE, samples)) return false;
if (!mOcclusionDepth.allocate(resX/occlusion_divisor, resY/occlusion_divisor, 0, TRUE, FALSE, LLTexUnit::TT_RECT_TEXTURE, FALSE, samples)) return false;
if (!addDeferredAttachments(mDeferredScreen)) return false;
-
+
GLuint screenFormat = GL_RGBA16;
if (gGLManager.mIsATI)
{
@@ -1083,7 +1076,7 @@ void LLPipeline::updateRenderDeferred()
{
BOOL deferred = ((RenderDeferred &&
LLRenderTarget::sUseFBO &&
- LLFeatureManager::getInstance()->isFeatureAvailable("RenderDeferred") &&
+ LLFeatureManager::getInstance()->isFeatureAvailable("RenderDeferred") &&
LLPipeline::sRenderBump &&
VertexShaderEnable &&
RenderAvatarVP &&
@@ -1300,7 +1293,7 @@ void LLPipeline::createGLBuffers()
for (U32 i = 0; i < 3; i++)
{
- mGlow[i].allocate(512,glow_res, GL_RGBA,FALSE,FALSE);
+ mGlow[i].allocate(512,glow_res,GL_RGBA,FALSE,FALSE);
}
allocateScreenBuffer(resX,resY);
@@ -1537,7 +1530,7 @@ void LLPipeline::unloadShaders()
void LLPipeline::assertInitializedDoError()
{
- llerrs << "LLPipeline used when uninitialized." << llendl;
+ LL_ERRS() << "LLPipeline used when uninitialized." << LL_ENDL;
}
//============================================================================
@@ -1580,18 +1573,18 @@ S32 LLPipeline::setLightingDetail(S32 level)
return mLightingDetail;
}
-class LLOctreeDirtyTexture : public LLOctreeTraveler<LLDrawable>
+class LLOctreeDirtyTexture : public OctreeTraveler
{
public:
const std::set<LLViewerFetchedTexture*>& mTextures;
LLOctreeDirtyTexture(const std::set<LLViewerFetchedTexture*>& textures) : mTextures(textures) { }
- virtual void visit(const LLOctreeNode<LLDrawable>* node)
+ virtual void visit(const OctreeNode* node)
{
LLSpatialGroup* group = (LLSpatialGroup*) node->getListener(0);
- if (!group->isState(LLSpatialGroup::GEOM_DIRTY) && !group->isEmpty())
+ if (!group->hasState(LLSpatialGroup::GEOM_DIRTY) && !group->isEmpty())
{
for (LLSpatialGroup::draw_map_t::iterator i = group->mDrawMap.begin(); i != group->mDrawMap.end(); ++i)
{
@@ -1722,7 +1715,7 @@ LLDrawPool *LLPipeline::findPool(const U32 type, LLViewerTexture *tex0)
default:
llassert(0);
- llerrs << "Invalid Pool Type in LLPipeline::findPool() type=" << type << llendl;
+ LL_ERRS() << "Invalid Pool Type in LLPipeline::findPool() type=" << type << LL_ENDL;
break;
}
@@ -1768,7 +1761,7 @@ U32 LLPipeline::getPoolTypeFromTE(const LLTextureEntry* te, LLViewerTexture* ima
{
alpha = alpha || (imagep->getComponents() == 4 && imagep->getType() != LLViewerTexture::MEDIA_TEXTURE) || (imagep->getComponents() == 2);
}
-
+
if (alpha && mat)
{
switch (mat->getDiffuseAlphaMode())
@@ -1814,11 +1807,9 @@ void LLPipeline::addPool(LLDrawPool *new_poolp)
void LLPipeline::allocDrawable(LLViewerObject *vobj)
{
- LLDrawable *drawable = new LLDrawable();
+ LLDrawable *drawable = new LLDrawable(vobj);
vobj->mDrawable = drawable;
- drawable->mVObjp = vobj;
-
//encompass completely sheared objects by taking
//the most extreme point possible (<1,1,0.5>)
drawable->setRadius(LLVector3(1,1,0.5f).scaleVec(vobj->getScale()).length());
@@ -1830,15 +1821,15 @@ void LLPipeline::allocDrawable(LLViewerObject *vobj)
}
-static LLFastTimer::DeclareTimer FTM_UNLINK("Unlink");
-static LLFastTimer::DeclareTimer FTM_REMOVE_FROM_MOVE_LIST("Movelist");
-static LLFastTimer::DeclareTimer FTM_REMOVE_FROM_SPATIAL_PARTITION("Spatial Partition");
-static LLFastTimer::DeclareTimer FTM_REMOVE_FROM_LIGHT_SET("Light Set");
-static LLFastTimer::DeclareTimer FTM_REMOVE_FROM_HIGHLIGHT_SET("Highlight Set");
+static LLTrace::BlockTimerStatHandle FTM_UNLINK("Unlink");
+static LLTrace::BlockTimerStatHandle FTM_REMOVE_FROM_MOVE_LIST("Movelist");
+static LLTrace::BlockTimerStatHandle FTM_REMOVE_FROM_SPATIAL_PARTITION("Spatial Partition");
+static LLTrace::BlockTimerStatHandle FTM_REMOVE_FROM_LIGHT_SET("Light Set");
+static LLTrace::BlockTimerStatHandle FTM_REMOVE_FROM_HIGHLIGHT_SET("Highlight Set");
void LLPipeline::unlinkDrawable(LLDrawable *drawable)
{
- LLFastTimer t(FTM_UNLINK);
+ LL_RECORD_BLOCK_TIME(FTM_UNLINK);
assertInitialized();
@@ -1847,7 +1838,7 @@ void LLPipeline::unlinkDrawable(LLDrawable *drawable)
// Based on flags, remove the drawable from the queues that it's on.
if (drawablep->isState(LLDrawable::ON_MOVE_LIST))
{
- LLFastTimer t(FTM_REMOVE_FROM_MOVE_LIST);
+ LL_RECORD_BLOCK_TIME(FTM_REMOVE_FROM_MOVE_LIST);
LLDrawable::drawable_vector_t::iterator iter = std::find(mMovedList.begin(), mMovedList.end(), drawablep);
if (iter != mMovedList.end())
{
@@ -1857,19 +1848,19 @@ void LLPipeline::unlinkDrawable(LLDrawable *drawable)
if (drawablep->getSpatialGroup())
{
- LLFastTimer t(FTM_REMOVE_FROM_SPATIAL_PARTITION);
- if (!drawablep->getSpatialGroup()->mSpatialPartition->remove(drawablep, drawablep->getSpatialGroup()))
+ LL_RECORD_BLOCK_TIME(FTM_REMOVE_FROM_SPATIAL_PARTITION);
+ if (!drawablep->getSpatialGroup()->getSpatialPartition()->remove(drawablep, drawablep->getSpatialGroup()))
{
#ifdef LL_RELEASE_FOR_DOWNLOAD
- llwarns << "Couldn't remove object from spatial group!" << llendl;
+ LL_WARNS() << "Couldn't remove object from spatial group!" << LL_ENDL;
#else
- llerrs << "Couldn't remove object from spatial group!" << llendl;
+ LL_ERRS() << "Couldn't remove object from spatial group!" << LL_ENDL;
#endif
}
}
{
- LLFastTimer t(FTM_REMOVE_FROM_LIGHT_SET);
+ LL_RECORD_BLOCK_TIME(FTM_REMOVE_FROM_LIGHT_SET);
mLights.erase(drawablep);
for (light_set_t::iterator iter = mNearbyLights.begin();
@@ -1884,7 +1875,7 @@ void LLPipeline::unlinkDrawable(LLDrawable *drawable)
}
{
- LLFastTimer t(FTM_REMOVE_FROM_HIGHLIGHT_SET);
+ LL_RECORD_BLOCK_TIME(FTM_REMOVE_FROM_HIGHLIGHT_SET);
HighlightItem item(drawablep);
mHighlightSet.erase(item);
@@ -1913,7 +1904,7 @@ void LLPipeline::unlinkDrawable(LLDrawable *drawable)
//static
void LLPipeline::removeMutedAVsLights(LLVOAvatar* muted_avatar)
{
- LLFastTimer t(FTM_REMOVE_FROM_LIGHT_SET);
+ LL_RECORD_BLOCK_TIME(FTM_REMOVE_FROM_LIGHT_SET);
for (light_set_t::iterator iter = gPipeline.mNearbyLights.begin();
iter != gPipeline.mNearbyLights.end(); iter++)
{
@@ -1941,7 +1932,7 @@ U32 LLPipeline::addObject(LLViewerObject *vobj)
void LLPipeline::createObjects(F32 max_dtime)
{
- LLFastTimer ftm(FTM_PIPELINE_CREATE);
+ LL_RECORD_BLOCK_TIME(FTM_PIPELINE_CREATE);
LLTimer update_timer;
@@ -1973,7 +1964,7 @@ void LLPipeline::createObject(LLViewerObject* vobj)
}
else
{
- llerrs << "Redundant drawable creation!" << llendl;
+ LL_ERRS() << "Redundant drawable creation!" << LL_ENDL;
}
llassert(drawablep);
@@ -2004,17 +1995,7 @@ void LLPipeline::resetFrameStats()
{
assertInitialized();
- LLViewerStats::getInstance()->mTrianglesDrawnStat.addValue(mTrianglesDrawn/1000.f);
-
- if (mBatchCount > 0)
- {
- mMeanBatchSize = gPipeline.mTrianglesDrawn/gPipeline.mBatchCount;
- }
- mTrianglesDrawn = 0;
sCompiles = 0;
- mVerticesRelit = 0;
- mLightingChanges = 0;
- mGeometryChanges = 0;
mNumVisibleFaces = 0;
if (mOldRenderDebugMask != mRenderDebugMask)
@@ -2022,7 +2003,6 @@ void LLPipeline::resetFrameStats()
gObjectList.clearDebugText();
mOldRenderDebugMask = mRenderDebugMask;
}
-
}
//external functions for asynchronous updating
@@ -2034,7 +2014,7 @@ void LLPipeline::updateMoveDampedAsync(LLDrawable* drawablep)
}
if (!drawablep)
{
- llerrs << "updateMove called with NULL drawablep" << llendl;
+ LL_ERRS() << "updateMove called with NULL drawablep" << LL_ENDL;
return;
}
if (drawablep->isState(LLDrawable::EARLY_MOVE))
@@ -2064,7 +2044,7 @@ void LLPipeline::updateMoveNormalAsync(LLDrawable* drawablep)
}
if (!drawablep)
{
- llerrs << "updateMove called with NULL drawablep" << llendl;
+ LL_ERRS() << "updateMove called with NULL drawablep" << LL_ENDL;
return;
}
if (drawablep->isState(LLDrawable::EARLY_MOVE))
@@ -2121,12 +2101,14 @@ void LLPipeline::updateMovedList(LLDrawable::drawable_vector_t& moved_list)
}
}
-static LLFastTimer::DeclareTimer FTM_OCTREE_BALANCE("Balance Octree");
-static LLFastTimer::DeclareTimer FTM_UPDATE_MOVE("Update Move");
+static LLTrace::BlockTimerStatHandle FTM_OCTREE_BALANCE("Balance Octree");
+static LLTrace::BlockTimerStatHandle FTM_UPDATE_MOVE("Update Move");
+static LLTrace::BlockTimerStatHandle FTM_RETEXTURE("Retexture");
+static LLTrace::BlockTimerStatHandle FTM_MOVED_LIST("Moved List");
void LLPipeline::updateMove()
{
- LLFastTimer t(FTM_UPDATE_MOVE);
+ LL_RECORD_BLOCK_TIME(FTM_UPDATE_MOVE);
if (FreezeTime)
{
@@ -2136,8 +2118,7 @@ void LLPipeline::updateMove()
assertInitialized();
{
- static LLFastTimer::DeclareTimer ftm("Retexture");
- LLFastTimer t(ftm);
+ LL_RECORD_BLOCK_TIME(FTM_RETEXTURE);
for (LLDrawable::drawable_set_t::iterator iter = mRetexturedList.begin();
iter != mRetexturedList.end(); ++iter)
@@ -2152,14 +2133,13 @@ void LLPipeline::updateMove()
}
{
- static LLFastTimer::DeclareTimer ftm("Moved List");
- LLFastTimer t(ftm);
+ LL_RECORD_BLOCK_TIME(FTM_MOVED_LIST);
updateMovedList(mMovedList);
}
//balance octrees
{
- LLFastTimer ot(FTM_OCTREE_BALANCE);
+ LL_RECORD_BLOCK_TIME(FTM_OCTREE_BALANCE);
for (LLWorld::region_list_t::const_iterator iter = LLWorld::getInstance()->getRegionList().begin();
iter != LLWorld::getInstance()->getRegionList().end(); ++iter)
@@ -2173,6 +2153,13 @@ void LLPipeline::updateMove()
part->mOctree->balance();
}
}
+
+ //balance the VO Cache tree
+ LLVOCachePartition* vo_part = region->getVOCachePartition();
+ if(vo_part)
+ {
+ vo_part->mOctree->balance();
+ }
}
}
}
@@ -2242,9 +2229,9 @@ void check_references(LLSpatialGroup* group, LLDrawable* drawable)
{
for (LLSpatialGroup::element_iter i = group->getDataBegin(); i != group->getDataEnd(); ++i)
{
- if (drawable == *i)
+ if (drawable == (LLDrawable*)(*i)->getDrawable())
{
- llerrs << "LLDrawable deleted while actively reference by LLPipeline." << llendl;
+ LL_ERRS() << "LLDrawable deleted while actively reference by LLPipeline." << LL_ENDL;
}
}
}
@@ -2255,7 +2242,7 @@ void check_references(LLDrawable* drawable, LLFace* face)
{
if (drawable->getFace(i) == face)
{
- llerrs << "LLFace deleted while actively referenced by LLPipeline." << llendl;
+ LL_ERRS() << "LLFace deleted while actively referenced by LLPipeline." << LL_ENDL;
}
}
}
@@ -2264,10 +2251,13 @@ void check_references(LLSpatialGroup* group, LLFace* face)
{
for (LLSpatialGroup::element_iter i = group->getDataBegin(); i != group->getDataEnd(); ++i)
{
- LLDrawable* drawable = *i;
+ LLDrawable* drawable = (LLDrawable*)(*i)->getDrawable();
+ if(drawable)
+ {
check_references(drawable, face);
}
}
+}
void LLPipeline::checkReferences(LLFace* face)
{
@@ -2328,7 +2318,7 @@ void LLPipeline::checkReferences(LLDrawable* drawable)
{
if (drawable == *iter)
{
- llerrs << "LLDrawable deleted while actively referenced by LLPipeline." << llendl;
+ LL_ERRS() << "LLDrawable deleted while actively referenced by LLPipeline." << LL_ENDL;
}
}
}
@@ -2345,7 +2335,7 @@ void check_references(LLSpatialGroup* group, LLDrawInfo* draw_info)
LLDrawInfo* params = *j;
if (params == draw_info)
{
- llerrs << "LLDrawInfo deleted while actively referenced by LLPipeline." << llendl;
+ LL_ERRS() << "LLDrawInfo deleted while actively referenced by LLPipeline." << LL_ENDL;
}
}
}
@@ -2387,7 +2377,7 @@ void LLPipeline::checkReferences(LLSpatialGroup* group)
{
if (group == *iter)
{
- llerrs << "LLSpatialGroup deleted while actively referenced by LLPipeline." << llendl;
+ LL_ERRS() << "LLSpatialGroup deleted while actively referenced by LLPipeline." << LL_ENDL;
}
}
@@ -2395,7 +2385,7 @@ void LLPipeline::checkReferences(LLSpatialGroup* group)
{
if (group == *iter)
{
- llerrs << "LLSpatialGroup deleted while actively referenced by LLPipeline." << llendl;
+ LL_ERRS() << "LLSpatialGroup deleted while actively referenced by LLPipeline." << LL_ENDL;
}
}
@@ -2403,7 +2393,7 @@ void LLPipeline::checkReferences(LLSpatialGroup* group)
{
if (group == *iter)
{
- llerrs << "LLSpatialGroup deleted while actively referenced by LLPipeline." << llendl;
+ LL_ERRS() << "LLSpatialGroup deleted while actively referenced by LLPipeline." << LL_ENDL;
}
}
}
@@ -2444,7 +2434,7 @@ BOOL LLPipeline::getVisibleExtents(LLCamera& camera, LLVector3& min, LLVector3&
min = LLVector3(X,X,X);
max = LLVector3(-X,-X,-X);
- U32 saved_camera_id = LLViewerCamera::sCurCameraID;
+ LLViewerCamera::eCameraID saved_camera_id = LLViewerCamera::sCurCameraID;
LLViewerCamera::sCurCameraID = LLViewerCamera::CAMERA_WORLD;
BOOL res = TRUE;
@@ -2475,11 +2465,16 @@ BOOL LLPipeline::getVisibleExtents(LLCamera& camera, LLVector3& min, LLVector3&
return res;
}
-static LLFastTimer::DeclareTimer FTM_CULL("Object Culling");
+static LLTrace::BlockTimerStatHandle FTM_CULL("Object Culling");
void LLPipeline::updateCull(LLCamera& camera, LLCullResult& result, S32 water_clip, LLPlane* planep)
{
- LLFastTimer t(FTM_CULL);
+ static LLCachedControl<bool> use_occlusion(gSavedSettings,"UseOcclusion");
+ static bool can_use_occlusion = LLGLSLShader::sNoFixedFunction
+ && LLFeatureManager::getInstance()->isFeatureAvailable("UseOcclusion")
+ && gGLManager.mHasOcclusionQuery;
+
+ LL_RECORD_BLOCK_TIME(FTM_CULL);
grabReferences(result);
@@ -2596,6 +2591,14 @@ void LLPipeline::updateCull(LLCamera& camera, LLCullResult& result, S32 water_cl
}
}
}
+
+ //scan the VO Cache tree
+ LLVOCachePartition* vo_part = region->getVOCachePartition();
+ if(vo_part)
+ {
+ bool do_occlusion_cull = can_use_occlusion && use_occlusion && !gUseWireframe/* && !gViewerWindow->getProgressView()->getVisible()*/;
+ vo_part->cull(camera, do_occlusion_cull);
+ }
}
if (bound_shader)
@@ -2670,15 +2673,16 @@ void LLPipeline::markNotCulled(LLSpatialGroup* group, LLCamera& camera)
return;
}
+ const LLVector4a* bounds = group->getBounds();
if (sMinRenderSize > 0.f &&
- llmax(llmax(group->mBounds[1][0], group->mBounds[1][1]), group->mBounds[1][2]) < sMinRenderSize)
+ llmax(llmax(bounds[1][0], bounds[1][1]), bounds[1][2]) < sMinRenderSize)
{
return;
}
assertInitialized();
- if (!group->mSpatialPartition->mRenderByGroup)
+ if (!group->getSpatialPartition()->mRenderByGroup)
{ //render by drawable
sCull->pushDrawableGroup(group);
}
@@ -2782,7 +2786,8 @@ void LLPipeline::doOcclusion(LLCamera& camera, LLRenderTarget& source, LLRenderT
void LLPipeline::doOcclusion(LLCamera& camera)
{
- if (LLPipeline::sUseOcclusion > 1 && sCull->hasOcclusionGroups())
+ if (LLPipeline::sUseOcclusion > 1 && !LLSpatialPartition::sTeleportRequested &&
+ (sCull->hasOcclusionGroups() || LLVOCachePartition::sNeedsOcclusionCheck))
{
LLVertexBuffer::unbind();
@@ -2828,6 +2833,17 @@ void LLPipeline::doOcclusion(LLCamera& camera)
group->clearOcclusionState(LLSpatialGroup::ACTIVE_OCCLUSION);
}
+ //apply occlusion culling to object cache tree
+ for (LLWorld::region_list_t::const_iterator iter = LLWorld::getInstance()->getRegionList().begin();
+ iter != LLWorld::getInstance()->getRegionList().end(); ++iter)
+ {
+ LLVOCachePartition* vo_part = (*iter)->getVOCachePartition();
+ if(vo_part)
+ {
+ vo_part->processOccluders(&camera);
+ }
+ }
+
if (bind_shader)
{
if (LLPipeline::sShadowRender)
@@ -2850,19 +2866,18 @@ BOOL LLPipeline::updateDrawableGeom(LLDrawable* drawablep, BOOL priority)
if (update_complete && assertInitialized())
{
drawablep->setState(LLDrawable::BUILT);
- mGeometryChanges++;
}
return update_complete;
}
-static LLFastTimer::DeclareTimer FTM_SEED_VBO_POOLS("Seed VBO Pool");
+static LLTrace::BlockTimerStatHandle FTM_SEED_VBO_POOLS("Seed VBO Pool");
-static LLFastTimer::DeclareTimer FTM_UPDATE_GL("Update GL");
+static LLTrace::BlockTimerStatHandle FTM_UPDATE_GL("Update GL");
void LLPipeline::updateGL()
{
{
- LLFastTimer t(FTM_UPDATE_GL);
+ LL_RECORD_BLOCK_TIME(FTM_UPDATE_GL);
while (!LLGLUpdate::sGLQ.empty())
{
LLGLUpdate* glu = LLGLUpdate::sGLQ.front();
@@ -2873,12 +2888,12 @@ void LLPipeline::updateGL()
}
{ //seed VBO Pools
- LLFastTimer t(FTM_SEED_VBO_POOLS);
+ LL_RECORD_BLOCK_TIME(FTM_SEED_VBO_POOLS);
LLVertexBuffer::seedPools();
}
}
-static LLFastTimer::DeclareTimer FTM_REBUILD_PRIORITY_GROUPS("Rebuild Priority Groups");
+static LLTrace::BlockTimerStatHandle FTM_REBUILD_PRIORITY_GROUPS("Rebuild Priority Groups");
void LLPipeline::clearRebuildGroups()
{
@@ -2938,9 +2953,55 @@ void LLPipeline::clearRebuildGroups()
mGroupQ2Locked = false;
}
+void LLPipeline::clearRebuildDrawables()
+{
+ // Clear all drawables on the priority build queue,
+ for (LLDrawable::drawable_list_t::iterator iter = mBuildQ1.begin();
+ iter != mBuildQ1.end(); ++iter)
+ {
+ LLDrawable* drawablep = *iter;
+ if (drawablep && !drawablep->isDead())
+ {
+ drawablep->clearState(LLDrawable::IN_REBUILD_Q2);
+ drawablep->clearState(LLDrawable::IN_REBUILD_Q1);
+ }
+ }
+ mBuildQ1.clear();
+
+ // clear drawables on the non-priority build queue
+ for (LLDrawable::drawable_list_t::iterator iter = mBuildQ2.begin();
+ iter != mBuildQ2.end(); ++iter)
+ {
+ LLDrawable* drawablep = *iter;
+ if (!drawablep->isDead())
+ {
+ drawablep->clearState(LLDrawable::IN_REBUILD_Q2);
+ }
+ }
+ mBuildQ2.clear();
+
+ //clear all moving bridges
+ for (LLDrawable::drawable_vector_t::iterator iter = mMovedBridge.begin();
+ iter != mMovedBridge.end(); ++iter)
+ {
+ LLDrawable *drawablep = *iter;
+ drawablep->clearState(LLDrawable::EARLY_MOVE | LLDrawable::MOVE_UNDAMPED | LLDrawable::ON_MOVE_LIST | LLDrawable::ANIMATED_CHILD);
+ }
+ mMovedBridge.clear();
+
+ //clear all moving drawables
+ for (LLDrawable::drawable_vector_t::iterator iter = mMovedList.begin();
+ iter != mMovedList.end(); ++iter)
+ {
+ LLDrawable *drawablep = *iter;
+ drawablep->clearState(LLDrawable::EARLY_MOVE | LLDrawable::MOVE_UNDAMPED | LLDrawable::ON_MOVE_LIST | LLDrawable::ANIMATED_CHILD);
+ }
+ mMovedList.clear();
+}
+
void LLPipeline::rebuildPriorityGroups()
{
- LLFastTimer t(FTM_REBUILD_PRIORITY_GROUPS);
+ LL_RECORD_BLOCK_TIME(FTM_REBUILD_PRIORITY_GROUPS);
LLTimer update_timer;
assertInitialized();
@@ -2962,7 +3023,7 @@ void LLPipeline::rebuildPriorityGroups()
}
-static LLFastTimer::DeclareTimer FTM_REBUILD_GROUPS("Rebuild Groups");
+static LLTrace::BlockTimerStatHandle FTM_REBUILD_GROUPS("Rebuild Groups");
void LLPipeline::rebuildGroups()
{
@@ -2971,7 +3032,7 @@ void LLPipeline::rebuildGroups()
return;
}
- LLFastTimer t(FTM_REBUILD_GROUPS);
+ LL_RECORD_BLOCK_TIME(FTM_REBUILD_GROUPS);
mGroupQ2Locked = true;
// Iterate through some drawables on the non-priority build queue
S32 size = (S32) mGroupQ2.size();
@@ -2994,7 +3055,7 @@ void LLPipeline::rebuildGroups()
{
group->rebuildGeom();
- if (group->mSpatialPartition->mRenderByGroup)
+ if (group->getSpatialPartition()->mRenderByGroup)
{
count++;
}
@@ -3015,7 +3076,7 @@ void LLPipeline::updateGeom(F32 max_dtime)
LLTimer update_timer;
LLPointer<LLDrawable> drawablep;
- LLFastTimer t(FTM_GEO_UPDATE);
+ LL_RECORD_BLOCK_TIME(FTM_GEO_UPDATE);
assertInitialized();
@@ -3063,7 +3124,7 @@ void LLPipeline::updateGeom(F32 max_dtime)
S32 count = 0;
- max_dtime = llmax(update_timer.getElapsedTimeF32()+0.001f, max_dtime);
+ max_dtime = llmax(update_timer.getElapsedTimeF32()+0.001f, F32SecondsImplicit(max_dtime));
LLSpatialGroup* last_group = NULL;
LLSpatialBridge* last_bridge = NULL;
@@ -3147,13 +3208,13 @@ void LLPipeline::markMoved(LLDrawable *drawablep, BOOL damped_motion)
{
if (!drawablep)
{
- //llerrs << "Sending null drawable to moved list!" << llendl;
+ //LL_ERRS() << "Sending null drawable to moved list!" << LL_ENDL;
return;
}
if (drawablep->isDead())
{
- llwarns << "Marking NULL or dead drawable moved!" << llendl;
+ LL_WARNS() << "Marking NULL or dead drawable moved!" << LL_ENDL;
return;
}
@@ -3208,9 +3269,9 @@ void LLPipeline::markShift(LLDrawable *drawablep)
}
}
-static LLFastTimer::DeclareTimer FTM_SHIFT_DRAWABLE("Shift Drawable");
-static LLFastTimer::DeclareTimer FTM_SHIFT_OCTREE("Shift Octree");
-static LLFastTimer::DeclareTimer FTM_SHIFT_HUD("Shift HUD");
+static LLTrace::BlockTimerStatHandle FTM_SHIFT_DRAWABLE("Shift Drawable");
+static LLTrace::BlockTimerStatHandle FTM_SHIFT_OCTREE("Shift Octree");
+static LLTrace::BlockTimerStatHandle FTM_SHIFT_HUD("Shift HUD");
void LLPipeline::shiftObjects(const LLVector3 &offset)
{
@@ -3223,7 +3284,7 @@ void LLPipeline::shiftObjects(const LLVector3 &offset)
offseta.load3(offset.mV);
{
- LLFastTimer t(FTM_SHIFT_DRAWABLE);
+ LL_RECORD_BLOCK_TIME(FTM_SHIFT_DRAWABLE);
for (LLDrawable::drawable_vector_t::iterator iter = mShiftList.begin();
iter != mShiftList.end(); iter++)
@@ -3241,7 +3302,7 @@ void LLPipeline::shiftObjects(const LLVector3 &offset)
{
- LLFastTimer t(FTM_SHIFT_OCTREE);
+ LL_RECORD_BLOCK_TIME(FTM_SHIFT_OCTREE);
for (LLWorld::region_list_t::const_iterator iter = LLWorld::getInstance()->getRegionList().begin();
iter != LLWorld::getInstance()->getRegionList().end(); ++iter)
{
@@ -3258,7 +3319,7 @@ void LLPipeline::shiftObjects(const LLVector3 &offset)
}
{
- LLFastTimer t(FTM_SHIFT_HUD);
+ LL_RECORD_BLOCK_TIME(FTM_SHIFT_HUD);
LLHUDText::shiftAll(offset);
LLHUDNameTag::shiftAll(offset);
}
@@ -3292,10 +3353,10 @@ void LLPipeline::markPartitionMove(LLDrawable* drawable)
}
}
-static LLFastTimer::DeclareTimer FTM_PROCESS_PARTITIONQ("PartitionQ");
+static LLTrace::BlockTimerStatHandle FTM_PROCESS_PARTITIONQ("PartitionQ");
void LLPipeline::processPartitionQ()
{
- LLFastTimer t(FTM_PROCESS_PARTITIONQ);
+ LL_RECORD_BLOCK_TIME(FTM_PROCESS_PARTITIONQ);
for (LLDrawable::drawable_list_t::iterator iter = mPartitionQ.begin(); iter != mPartitionQ.end(); ++iter)
{
LLDrawable* drawable = *iter;
@@ -3317,23 +3378,23 @@ void LLPipeline::markMeshDirty(LLSpatialGroup* group)
void LLPipeline::markRebuild(LLSpatialGroup* group, BOOL priority)
{
- if (group && !group->isDead() && group->mSpatialPartition)
+ if (group && !group->isDead() && group->getSpatialPartition())
{
- if (group->mSpatialPartition->mPartitionType == LLViewerRegion::PARTITION_HUD)
+ if (group->getSpatialPartition()->mPartitionType == LLViewerRegion::PARTITION_HUD)
{
priority = TRUE;
}
if (priority)
{
- if (!group->isState(LLSpatialGroup::IN_BUILD_Q1))
+ if (!group->hasState(LLSpatialGroup::IN_BUILD_Q1))
{
llassert_always(!mGroupQ1Locked);
mGroupQ1.push_back(group);
group->setState(LLSpatialGroup::IN_BUILD_Q1);
- if (group->isState(LLSpatialGroup::IN_BUILD_Q2))
+ if (group->hasState(LLSpatialGroup::IN_BUILD_Q2))
{
LLSpatialGroup::sg_vector_t::iterator iter = std::find(mGroupQ2.begin(), mGroupQ2.end(), group);
if (iter != mGroupQ2.end())
@@ -3344,7 +3405,7 @@ void LLPipeline::markRebuild(LLSpatialGroup* group, BOOL priority)
}
}
}
- else if (!group->isState(LLSpatialGroup::IN_BUILD_Q2 | LLSpatialGroup::IN_BUILD_Q1))
+ else if (!group->hasState(LLSpatialGroup::IN_BUILD_Q2 | LLSpatialGroup::IN_BUILD_Q1))
{
llassert_always(!mGroupQ2Locked);
mGroupQ2.push_back(group);
@@ -3383,7 +3444,7 @@ void LLPipeline::markRebuild(LLDrawable *drawablep, LLDrawable::EDrawableFlags f
}
}
-static LLFastTimer::DeclareTimer FTM_RESET_DRAWORDER("Reset Draw Order");
+static LLTrace::BlockTimerStatHandle FTM_RESET_DRAWORDER("Reset Draw Order");
void LLPipeline::stateSort(LLCamera& camera, LLCullResult &result)
{
@@ -3397,11 +3458,11 @@ void LLPipeline::stateSort(LLCamera& camera, LLCullResult &result)
LLPipeline::END_RENDER_TYPES))
{
//clear faces from face pools
- LLFastTimer t(FTM_RESET_DRAWORDER);
+ LL_RECORD_BLOCK_TIME(FTM_RESET_DRAWORDER);
gPipeline.resetDrawOrders();
}
- LLFastTimer ftm(FTM_STATESORT);
+ LL_RECORD_BLOCK_TIME(FTM_STATESORT);
//LLVertexBuffer::unbind();
@@ -3419,7 +3480,7 @@ void LLPipeline::stateSort(LLCamera& camera, LLCullResult &result)
group->setVisible();
for (LLSpatialGroup::element_iter i = group->getDataBegin(); i != group->getDataEnd(); ++i)
{
- markVisible(*i, camera);
+ markVisible((LLDrawable*)(*i)->getDrawable(), camera);
}
if (!sDelayVBUpdate)
@@ -3485,7 +3546,7 @@ void LLPipeline::stateSort(LLCamera& camera, LLCullResult &result)
}
{
- LLFastTimer ftm(FTM_STATESORT_DRAWABLE);
+ LL_RECORD_BLOCK_TIME(FTM_STATESORT_DRAWABLE);
for (LLCullResult::drawable_iterator iter = sCull->beginVisibleList();
iter != sCull->endVisibleList(); ++iter)
{
@@ -3506,8 +3567,7 @@ void LLPipeline::stateSort(LLSpatialGroup* group, LLCamera& camera)
{
for (LLSpatialGroup::element_iter i = group->getDataBegin(); i != group->getDataEnd(); ++i)
{
- LLDrawable* drawablep = *i;
- stateSort(drawablep, camera);
+ stateSort((LLDrawable*)(*i)->getDrawable(), camera);
}
if (LLViewerCamera::sCurCameraID == LLViewerCamera::CAMERA_WORLD)
@@ -3608,7 +3668,6 @@ void LLPipeline::stateSort(LLDrawable* drawablep, LLCamera& camera)
}
}
-
mNumVisibleFaces += drawablep->getNumFaces();
}
@@ -3621,7 +3680,10 @@ void forAllDrawables(LLCullResult::sg_iterator begin,
{
for (LLSpatialGroup::element_iter j = (*i)->getDataBegin(); j != (*i)->getDataEnd(); ++j)
{
- func(*j);
+ if((*j)->hasDrawable())
+ {
+ func((LLDrawable*)(*j)->getDrawable());
+ }
}
}
}
@@ -3814,11 +3876,11 @@ void renderSoundHighlights(LLDrawable* drawablep)
void LLPipeline::postSort(LLCamera& camera)
{
- LLFastTimer ftm(FTM_STATESORT_POSTSORT);
+ LL_RECORD_BLOCK_TIME(FTM_STATESORT_POSTSORT);
assertInitialized();
- llpushcallstacks ;
+ LL_PUSH_CALLSTACKS();
//rebuild drawable geometry
for (LLCullResult::sg_iterator i = sCull->beginDrawableGroups(); i != sCull->endDrawableGroups(); ++i)
{
@@ -3829,12 +3891,12 @@ void LLPipeline::postSort(LLCamera& camera)
group->rebuildGeom();
}
}
- llpushcallstacks ;
+ LL_PUSH_CALLSTACKS();
//rebuild groups
sCull->assertDrawMapsEmpty();
rebuildPriorityGroups();
- llpushcallstacks ;
+ LL_PUSH_CALLSTACKS();
//build render map
@@ -3849,7 +3911,7 @@ void LLPipeline::postSort(LLCamera& camera)
continue;
}
- if (group->isState(LLSpatialGroup::NEW_DRAWINFO) && group->isState(LLSpatialGroup::GEOM_DIRTY))
+ if (group->hasState(LLSpatialGroup::NEW_DRAWINFO) && group->hasState(LLSpatialGroup::GEOM_DIRTY))
{ //no way this group is going to be drawable without a rebuild
group->rebuildGeom();
}
@@ -3887,7 +3949,7 @@ void LLPipeline::postSort(LLCamera& camera)
if (alpha != group->mDrawMap.end())
{ //store alpha groups for sorting
- LLSpatialBridge* bridge = group->mSpatialPartition->asBridge();
+ LLSpatialBridge* bridge = group->getSpatialPartition()->asBridge();
if (LLViewerCamera::sCurCameraID == LLViewerCamera::CAMERA_WORLD)
{
if (bridge)
@@ -3945,7 +4007,7 @@ void LLPipeline::postSort(LLCamera& camera)
std::sort(sCull->beginAlphaGroups(), sCull->endAlphaGroups(), LLSpatialGroup::CompareDepthGreater());
}
- llpushcallstacks ;
+ LL_PUSH_CALLSTACKS();
// only render if the flag is set. The flag is only set if we are in edit mode or the toggle is set in the menus
if (LLFloaterReg::instanceVisible("beacons") && !sShadowRender)
{
@@ -3998,7 +4060,7 @@ void LLPipeline::postSort(LLCamera& camera)
forAllVisibleDrawables(renderSoundHighlights);
}
}
- llpushcallstacks ;
+ LL_PUSH_CALLSTACKS();
// If managing your telehub, draw beacons at telehub and currently selected spawnpoint.
if (LLFloaterTelehub::renderBeacons())
{
@@ -4033,41 +4095,14 @@ void LLPipeline::postSort(LLCamera& camera)
}
}
- /*static LLFastTimer::DeclareTimer FTM_TRANSFORM_WAIT("Transform Fence");
- static LLFastTimer::DeclareTimer FTM_TRANSFORM_DO_WORK("Transform Work");
- if (use_transform_feedback)
- { //using transform feedback, wait for transform feedback to complete
- LLFastTimer t(FTM_TRANSFORM_WAIT);
-
- S32 done = 0;
- //glGetQueryivARB(GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN, GL_CURRENT_QUERY, &count);
-
- glGetQueryObjectivARB(mMeshDirtyQueryObject, GL_QUERY_RESULT_AVAILABLE, &done);
-
- while (!done)
- {
- {
- LLFastTimer t(FTM_TRANSFORM_DO_WORK);
- F32 max_time = llmin(gFrameIntervalSeconds*10.f, 1.f);
- //do some useful work while we wait
- LLAppViewer::getTextureCache()->update(max_time); // unpauses the texture cache thread
- LLAppViewer::getImageDecodeThread()->update(max_time); // unpauses the image thread
- LLAppViewer::getTextureFetch()->update(max_time); // unpauses the texture fetch thread
- }
- glGetQueryObjectivARB(mMeshDirtyQueryObject, GL_QUERY_RESULT_AVAILABLE, &done);
- }
-
- mTransformFeedbackPrimitives = 0;
- }*/
-
//LLSpatialGroup::sNoDelete = FALSE;
- llpushcallstacks ;
+ LL_PUSH_CALLSTACKS();
}
void render_hud_elements()
{
- LLFastTimer t(FTM_RENDER_UI);
+ LL_RECORD_BLOCK_TIME(FTM_RENDER_UI);
gPipeline.disableLights();
LLGLDisable fog(GL_FOG);
@@ -4234,9 +4269,9 @@ void LLPipeline::renderHighlights()
}
if (hasRenderDebugFeatureMask(RENDER_DEBUG_FEATURE_SELECTED) && !mFaceSelectImagep)
- {
- mFaceSelectImagep = LLViewerTextureManager::getFetchedTexture(IMG_FACE_SELECT);
- }
+ {
+ mFaceSelectImagep = LLViewerTextureManager::getFetchedTexture(IMG_FACE_SELECT);
+ }
if (hasRenderDebugFeatureMask(RENDER_DEBUG_FEATURE_SELECTED) && (sRenderHighlightTextureChannel == LLRender::DIFFUSE_MAP))
{
@@ -4249,14 +4284,14 @@ void LLPipeline::renderHighlights()
LLFace *facep = mSelectedFaces[i];
if (!facep || facep->getDrawable()->isDead())
{
- llerrs << "Bad face on selection" << llendl;
+ LL_ERRS() << "Bad face on selection" << LL_ENDL;
return;
}
facep->renderSelected(mFaceSelectImagep, color);
}
}
-
+
if (hasRenderDebugFeatureMask(RENDER_DEBUG_FEATURE_SELECTED))
{
// Paint 'em red!
@@ -4297,7 +4332,7 @@ void LLPipeline::renderHighlights()
LLFace *facep = mSelectedFaces[i];
if (!facep || facep->getDrawable()->isDead())
{
- llerrs << "Bad face on selection" << llendl;
+ LL_ERRS() << "Bad face on selection" << LL_ENDL;
return;
}
@@ -4327,7 +4362,7 @@ void LLPipeline::renderHighlights()
LLFace *facep = mSelectedFaces[i];
if (!facep || facep->getDrawable()->isDead())
{
- llerrs << "Bad face on selection" << llendl;
+ LL_ERRS() << "Bad face on selection" << LL_ENDL;
return;
}
@@ -4346,7 +4381,7 @@ U32 LLPipeline::sCurRenderPoolType = 0 ;
void LLPipeline::renderGeom(LLCamera& camera, BOOL forceVBOUpdate)
{
- LLFastTimer t(FTM_RENDER_GEOMETRY);
+ LL_RECORD_BLOCK_TIME(FTM_RENDER_GEOMETRY);
assertInitialized();
@@ -4381,7 +4416,7 @@ void LLPipeline::renderGeom(LLCamera& camera, BOOL forceVBOUpdate)
{
if (!verify())
{
- llerrs << "Pipeline verification failed!" << llendl;
+ LL_ERRS() << "Pipeline verification failed!" << LL_ENDL;
}
}
@@ -4433,7 +4468,7 @@ void LLPipeline::renderGeom(LLCamera& camera, BOOL forceVBOUpdate)
}
{
- LLFastTimer t(FTM_POOLS);
+ LL_RECORD_BLOCK_TIME(FTM_POOLS);
// HACK: don't calculate local lights if we're rendering the HUD!
// Removing this check will cause bad flickering when there are
@@ -4469,7 +4504,7 @@ void LLPipeline::renderGeom(LLCamera& camera, BOOL forceVBOUpdate)
pool_set_t::iterator iter2 = iter1;
if (hasRenderType(poolp->getType()) && poolp->getNumPasses() > 0)
{
- LLFastTimer t(FTM_POOLRENDER);
+ LL_RECORD_BLOCK_TIME(FTM_POOLRENDER);
gGLLastMatrix = NULL;
gGL.loadMatrix(gGLModelView);
@@ -4598,9 +4633,9 @@ void LLPipeline::renderGeomDeferred(LLCamera& camera)
{
LLAppViewer::instance()->pingMainloopTimeout("Pipeline:RenderGeomDeferred");
- LLFastTimer t(FTM_RENDER_GEOMETRY);
+ LL_RECORD_BLOCK_TIME(FTM_RENDER_GEOMETRY);
- LLFastTimer t2(FTM_DEFERRED_POOLS);
+ LL_RECORD_BLOCK_TIME(FTM_DEFERRED_POOLS);
LLGLEnable cull(GL_CULL_FACE);
@@ -4642,7 +4677,7 @@ void LLPipeline::renderGeomDeferred(LLCamera& camera)
pool_set_t::iterator iter2 = iter1;
if (hasRenderType(poolp->getType()) && poolp->getNumDeferredPasses() > 0)
{
- LLFastTimer t(FTM_DEFERRED_POOLRENDER);
+ LL_RECORD_BLOCK_TIME(FTM_DEFERRED_POOLRENDER);
gGLLastMatrix = NULL;
gGL.loadMatrix(gGLModelView);
@@ -4694,7 +4729,7 @@ void LLPipeline::renderGeomDeferred(LLCamera& camera)
void LLPipeline::renderGeomPostDeferred(LLCamera& camera, bool do_occlusion)
{
- LLFastTimer t(FTM_POST_DEFERRED_POOLS);
+ LL_RECORD_BLOCK_TIME(FTM_POST_DEFERRED_POOLS);
U32 cur_type = 0;
LLGLEnable cull(GL_CULL_FACE);
@@ -4728,7 +4763,7 @@ void LLPipeline::renderGeomPostDeferred(LLCamera& camera, bool do_occlusion)
pool_set_t::iterator iter2 = iter1;
if (hasRenderType(poolp->getType()) && poolp->getNumPostDeferredPasses() > 0)
{
- LLFastTimer t(FTM_POST_DEFERRED_POOLRENDER);
+ LL_RECORD_BLOCK_TIME(FTM_POST_DEFERRED_POOLRENDER);
gGLLastMatrix = NULL;
gGL.loadMatrix(gGLModelView);
@@ -4865,10 +4900,8 @@ void LLPipeline::addTrianglesDrawn(S32 index_count, U32 render_type)
count = index_count/3;
}
- mTrianglesDrawn += count;
- mBatchCount++;
- mMaxBatchSize = llmax(mMaxBatchSize, count);
- mMinBatchSize = llmin(mMinBatchSize, count);
+ record(sStatBatchSize, count);
+ add(LLStatViewer::TRIANGLES_DRAWN, LLUnits::Triangles::fromValue(count));
if (LLPipeline::sRenderFrameTest)
{
@@ -5286,7 +5319,7 @@ void LLPipeline::renderDebug()
{
DebugBlip& blip = *iter;
- blip.mAge += gFrameIntervalSeconds;
+ blip.mAge += gFrameIntervalSeconds.value();
if (blip.mAge > 2.f)
{
mDebugBlips.erase(iter++);
@@ -5296,7 +5329,7 @@ void LLPipeline::renderDebug()
iter++;
}
- blip.mPosition.mV[2] += gFrameIntervalSeconds*2.f;
+ blip.mPosition.mV[2] += gFrameIntervalSeconds.value()*2.f;
gGL.color4fv(blip.mColor.mV);
gGL.vertex3fv(blip.mPosition.mV);
@@ -5351,9 +5384,10 @@ void LLPipeline::renderDebug()
fudge.splat(0.25f); //SG_OCCLUSION_FUDGE
LLVector4a size;
- size.setAdd(fudge, group->mBounds[1]);
-
- drawBox(group->mBounds[0], size);
+ const LLVector4a* bounds = group->getBounds();
+ size.setAdd(fudge, bounds[1]);
+
+ drawBox(bounds[0], size);
}
}
@@ -5595,7 +5629,7 @@ void LLPipeline::renderDebug()
continue;
}
- LLSpatialBridge* bridge = group->mSpatialPartition->asBridge();
+ LLSpatialBridge* bridge = group->getSpatialPartition()->asBridge();
if (bridge && (!bridge->mDrawable || bridge->mDrawable->isDead()))
{
@@ -5635,11 +5669,11 @@ void LLPipeline::renderDebug()
}
}
-static LLFastTimer::DeclareTimer FTM_REBUILD_POOLS("Rebuild Pools");
+static LLTrace::BlockTimerStatHandle FTM_REBUILD_POOLS("Rebuild Pools");
void LLPipeline::rebuildPools()
{
- LLFastTimer t(FTM_REBUILD_POOLS);
+ LL_RECORD_BLOCK_TIME(FTM_REBUILD_POOLS);
assertInitialized();
@@ -5682,7 +5716,7 @@ void LLPipeline::addToQuickLookup( LLDrawPool* new_poolp )
if (mSimplePool)
{
llassert(0);
- llwarns << "Ignoring duplicate simple pool." << llendl;
+ LL_WARNS() << "Ignoring duplicate simple pool." << LL_ENDL;
}
else
{
@@ -5694,7 +5728,7 @@ void LLPipeline::addToQuickLookup( LLDrawPool* new_poolp )
if (mAlphaMaskPool)
{
llassert(0);
- llwarns << "Ignoring duplicate alpha mask pool." << llendl;
+ LL_WARNS() << "Ignoring duplicate alpha mask pool." << LL_ENDL;
break;
}
else
@@ -5707,7 +5741,7 @@ void LLPipeline::addToQuickLookup( LLDrawPool* new_poolp )
if (mFullbrightAlphaMaskPool)
{
llassert(0);
- llwarns << "Ignoring duplicate alpha mask pool." << llendl;
+ LL_WARNS() << "Ignoring duplicate alpha mask pool." << LL_ENDL;
break;
}
else
@@ -5720,7 +5754,7 @@ void LLPipeline::addToQuickLookup( LLDrawPool* new_poolp )
if (mGrassPool)
{
llassert(0);
- llwarns << "Ignoring duplicate grass pool." << llendl;
+ LL_WARNS() << "Ignoring duplicate grass pool." << LL_ENDL;
}
else
{
@@ -5732,7 +5766,7 @@ void LLPipeline::addToQuickLookup( LLDrawPool* new_poolp )
if (mFullbrightPool)
{
llassert(0);
- llwarns << "Ignoring duplicate simple pool." << llendl;
+ LL_WARNS() << "Ignoring duplicate simple pool." << LL_ENDL;
}
else
{
@@ -5744,7 +5778,7 @@ void LLPipeline::addToQuickLookup( LLDrawPool* new_poolp )
if (mInvisiblePool)
{
llassert(0);
- llwarns << "Ignoring duplicate simple pool." << llendl;
+ LL_WARNS() << "Ignoring duplicate simple pool." << LL_ENDL;
}
else
{
@@ -5756,7 +5790,7 @@ void LLPipeline::addToQuickLookup( LLDrawPool* new_poolp )
if (mGlowPool)
{
llassert(0);
- llwarns << "Ignoring duplicate glow pool." << llendl;
+ LL_WARNS() << "Ignoring duplicate glow pool." << LL_ENDL;
}
else
{
@@ -5776,7 +5810,7 @@ void LLPipeline::addToQuickLookup( LLDrawPool* new_poolp )
if (mBumpPool)
{
llassert(0);
- llwarns << "Ignoring duplicate bump pool." << llendl;
+ LL_WARNS() << "Ignoring duplicate bump pool." << LL_ENDL;
}
else
{
@@ -5787,7 +5821,7 @@ void LLPipeline::addToQuickLookup( LLDrawPool* new_poolp )
if (mMaterialsPool)
{
llassert(0);
- llwarns << "Ignorning duplicate materials pool." << llendl;
+ LL_WARNS() << "Ignorning duplicate materials pool." << LL_ENDL;
}
else
{
@@ -5798,7 +5832,7 @@ void LLPipeline::addToQuickLookup( LLDrawPool* new_poolp )
if( mAlphaPool )
{
llassert(0);
- llwarns << "LLPipeline::addPool(): Ignoring duplicate Alpha pool" << llendl;
+ LL_WARNS() << "LLPipeline::addPool(): Ignoring duplicate Alpha pool" << LL_ENDL;
}
else
{
@@ -5813,7 +5847,7 @@ void LLPipeline::addToQuickLookup( LLDrawPool* new_poolp )
if( mSkyPool )
{
llassert(0);
- llwarns << "LLPipeline::addPool(): Ignoring duplicate Sky pool" << llendl;
+ LL_WARNS() << "LLPipeline::addPool(): Ignoring duplicate Sky pool" << LL_ENDL;
}
else
{
@@ -5825,7 +5859,7 @@ void LLPipeline::addToQuickLookup( LLDrawPool* new_poolp )
if( mWaterPool )
{
llassert(0);
- llwarns << "LLPipeline::addPool(): Ignoring duplicate Water pool" << llendl;
+ LL_WARNS() << "LLPipeline::addPool(): Ignoring duplicate Water pool" << LL_ENDL;
}
else
{
@@ -5837,7 +5871,7 @@ void LLPipeline::addToQuickLookup( LLDrawPool* new_poolp )
if( mGroundPool )
{
llassert(0);
- llwarns << "LLPipeline::addPool(): Ignoring duplicate Ground Pool" << llendl;
+ LL_WARNS() << "LLPipeline::addPool(): Ignoring duplicate Ground Pool" << LL_ENDL;
}
else
{
@@ -5849,7 +5883,7 @@ void LLPipeline::addToQuickLookup( LLDrawPool* new_poolp )
if( mWLSkyPool )
{
llassert(0);
- llwarns << "LLPipeline::addPool(): Ignoring duplicate WLSky Pool" << llendl;
+ LL_WARNS() << "LLPipeline::addPool(): Ignoring duplicate WLSky Pool" << LL_ENDL;
}
else
{
@@ -5859,7 +5893,7 @@ void LLPipeline::addToQuickLookup( LLDrawPool* new_poolp )
default:
llassert(0);
- llwarns << "Invalid Pool Type in LLPipeline::addPool()" << llendl;
+ LL_WARNS() << "Invalid Pool Type in LLPipeline::addPool()" << LL_ENDL;
break;
}
}
@@ -5943,7 +5977,7 @@ void LLPipeline::removeFromQuickLookup( LLDrawPool* poolp )
llassert( poolp == mBumpPool );
mBumpPool = NULL;
break;
-
+
case LLDrawPool::POOL_MATERIALS:
llassert(poolp == mMaterialsPool);
mMaterialsPool = NULL;
@@ -5974,7 +6008,7 @@ void LLPipeline::removeFromQuickLookup( LLDrawPool* poolp )
default:
llassert(0);
- llwarns << "Invalid Pool Type in LLPipeline::removeFromQuickLookup() type=" << poolp->getType() << llendl;
+ LL_WARNS() << "Invalid Pool Type in LLPipeline::removeFromQuickLookup() type=" << poolp->getType() << LL_ENDL;
break;
}
}
@@ -6019,7 +6053,7 @@ void LLPipeline::setupAvatarLights(BOOL for_edit)
}
mHWLightColors[1] = diffuse;
-
+
light->setDiffuse(diffuse);
light->setAmbient(LLColor4::black);
light->setSpecular(LLColor4::black);
@@ -6224,7 +6258,7 @@ void LLPipeline::calcNearbyLights(LLCamera& camera)
{
if (farthest_light->fade >= 0.f)
{
- farthest_light->fade = -gFrameIntervalSeconds;
+ farthest_light->fade = -(gFrameIntervalSeconds.value());
}
}
else
@@ -6234,6 +6268,13 @@ void LLPipeline::calcNearbyLights(LLCamera& camera)
}
}
+ //mark nearby lights not-removable.
+ for (light_set_t::iterator iter = mNearbyLights.begin();
+ iter != mNearbyLights.end(); iter++)
+ {
+ const Light* light = &(*iter);
+ ((LLViewerOctreeEntryData*) light->drawable)->setVisible();
+ }
}
}
@@ -6328,12 +6369,12 @@ void LLPipeline::setupHWLights(LLDrawPool* pool)
if (fade >= 0.f)
{
fade = fade / LIGHT_FADE_TIME;
- ((Light*) (&(*iter)))->fade += gFrameIntervalSeconds;
+ ((Light*) (&(*iter)))->fade += gFrameIntervalSeconds.value();
}
else
{
fade = 1.f + fade / LIGHT_FADE_TIME;
- ((Light*) (&(*iter)))->fade -= gFrameIntervalSeconds;
+ ((Light*) (&(*iter)))->fade -= gFrameIntervalSeconds.value();
}
fade = llclamp(fade,0.f,1.f);
light_color *= fade;
@@ -6645,28 +6686,28 @@ void LLPipeline::findReferences(LLDrawable *drawablep)
assertInitialized();
if (mLights.find(drawablep) != mLights.end())
{
- llinfos << "In mLights" << llendl;
+ LL_INFOS() << "In mLights" << LL_ENDL;
}
if (std::find(mMovedList.begin(), mMovedList.end(), drawablep) != mMovedList.end())
{
- llinfos << "In mMovedList" << llendl;
+ LL_INFOS() << "In mMovedList" << LL_ENDL;
}
if (std::find(mShiftList.begin(), mShiftList.end(), drawablep) != mShiftList.end())
{
- llinfos << "In mShiftList" << llendl;
+ LL_INFOS() << "In mShiftList" << LL_ENDL;
}
if (mRetexturedList.find(drawablep) != mRetexturedList.end())
{
- llinfos << "In mRetexturedList" << llendl;
+ LL_INFOS() << "In mRetexturedList" << LL_ENDL;
}
if (std::find(mBuildQ1.begin(), mBuildQ1.end(), drawablep) != mBuildQ1.end())
{
- llinfos << "In mBuildQ1" << llendl;
+ LL_INFOS() << "In mBuildQ1" << LL_ENDL;
}
if (std::find(mBuildQ2.begin(), mBuildQ2.end(), drawablep) != mBuildQ2.end())
{
- llinfos << "In mBuildQ2" << llendl;
+ LL_INFOS() << "In mBuildQ2" << LL_ENDL;
}
S32 count;
@@ -6674,7 +6715,7 @@ void LLPipeline::findReferences(LLDrawable *drawablep)
count = gObjectList.findReferences(drawablep);
if (count)
{
- llinfos << "In other drawables: " << count << " references" << llendl;
+ LL_INFOS() << "In other drawables: " << count << " references" << LL_ENDL;
}
}
@@ -6695,7 +6736,7 @@ BOOL LLPipeline::verify()
if (!ok)
{
- llwarns << "Pipeline verify failed!" << llendl;
+ LL_WARNS() << "Pipeline verify failed!" << LL_ENDL;
}
return ok;
}
@@ -6833,11 +6874,11 @@ void LLPipeline::toggleRenderTypeControl(void* data)
U32 bit = (1<<type);
if (gPipeline.hasRenderType(type))
{
- llinfos << "Toggling render type mask " << std::hex << bit << " off" << std::dec << llendl;
+ LL_INFOS() << "Toggling render type mask " << std::hex << bit << " off" << std::dec << LL_ENDL;
}
else
{
- llinfos << "Toggling render type mask " << std::hex << bit << " on" << std::dec << llendl;
+ LL_INFOS() << "Toggling render type mask " << std::hex << bit << " on" << std::dec << LL_ENDL;
}
gPipeline.toggleRenderType(type);
}
@@ -6863,11 +6904,11 @@ void LLPipeline::toggleRenderDebug(void* data)
U32 bit = (U32)(intptr_t)data;
if (gPipeline.hasRenderDebugMask(bit))
{
- llinfos << "Toggling render debug mask " << std::hex << bit << " off" << std::dec << llendl;
+ LL_INFOS() << "Toggling render debug mask " << std::hex << bit << " off" << std::dec << LL_ENDL;
}
else
{
- llinfos << "Toggling render debug mask " << std::hex << bit << " on" << std::dec << llendl;
+ LL_INFOS() << "Toggling render debug mask " << std::hex << bit << " on" << std::dec << LL_ENDL;
}
gPipeline.mRenderDebugMask ^= bit;
}
@@ -6916,7 +6957,7 @@ void LLPipeline::popRenderDebugFeatureMask()
{
if (mRenderDebugFeatureStack.empty())
{
- llerrs << "Depleted render feature stack." << llendl;
+ LL_ERRS() << "Depleted render feature stack." << LL_ENDL;
}
mRenderDebugFeatureMask = mRenderDebugFeatureStack.top();
@@ -7343,16 +7384,30 @@ void LLPipeline::resetVertexBuffers()
mResetVertexBuffers = true;
}
-static LLFastTimer::DeclareTimer FTM_RESET_VB("Reset VB");
+static LLTrace::BlockTimerStatHandle FTM_RESET_VB("Reset VB");
-void LLPipeline::doResetVertexBuffers()
+void LLPipeline::doResetVertexBuffers(bool forced)
{
if (!mResetVertexBuffers)
{
return;
}
+ if(!forced && LLSpatialPartition::sTeleportRequested)
+ {
+ if(gAgent.getTeleportState() != LLAgent::TELEPORT_NONE)
+ {
+ return; //wait for teleporting to finish
+ }
+ else
+ {
+ //teleporting aborted
+ LLSpatialPartition::sTeleportRequested = FALSE;
+ mResetVertexBuffers = false;
+ return;
+ }
+ }
- LLFastTimer t(FTM_RESET_VB);
+ LL_RECORD_BLOCK_TIME(FTM_RESET_VB);
mResetVertexBuffers = false;
mCubeVB = NULL;
@@ -7370,6 +7425,13 @@ void LLPipeline::doResetVertexBuffers()
}
}
}
+ if(LLSpatialPartition::sTeleportRequested)
+ {
+ LLSpatialPartition::sTeleportRequested = FALSE;
+
+ LLWorld::getInstance()->clearAllVisibleObjects();
+ clearRebuildDrawables();
+ }
resetDrawOrders();
@@ -7392,7 +7454,7 @@ void LLPipeline::doResetVertexBuffers()
if (LLVertexBuffer::sGLCount > 0)
{
- llwarns << "VBO wipe failed -- " << LLVertexBuffer::sGLCount << " buffers remaining." << llendl;
+ LL_WARNS() << "VBO wipe failed -- " << LLVertexBuffer::sGLCount << " buffers remaining." << LL_ENDL;
}
LLVertexBuffer::unbind();
@@ -7475,18 +7537,18 @@ void validate_framebuffer_object()
break;
case GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT:
// frame buffer not OK: probably means unsupported depth buffer format
- llerrs << "Framebuffer Incomplete Missing Attachment." << llendl;
+ LL_ERRS() << "Framebuffer Incomplete Missing Attachment." << LL_ENDL;
break;
case GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT:
// frame buffer not OK: probably means unsupported depth buffer format
- llerrs << "Framebuffer Incomplete Attachment." << llendl;
+ LL_ERRS() << "Framebuffer Incomplete Attachment." << LL_ENDL;
break;
case GL_FRAMEBUFFER_UNSUPPORTED:
/* choose different formats */
- llerrs << "Framebuffer unsupported." << llendl;
+ LL_ERRS() << "Framebuffer unsupported." << LL_ENDL;
break;
default:
- llerrs << "Unknown framebuffer status." << llendl;
+ LL_ERRS() << "Unknown framebuffer status." << LL_ENDL;
break;
}
}
@@ -7496,7 +7558,7 @@ void LLPipeline::bindScreenToTexture()
}
-static LLFastTimer::DeclareTimer FTM_RENDER_BLOOM("Bloom");
+static LLTrace::BlockTimerStatHandle FTM_RENDER_BLOOM("Bloom");
void LLPipeline::renderBloom(BOOL for_snapshot, F32 zoom_factor, int subfield)
{
@@ -7521,7 +7583,7 @@ void LLPipeline::renderBloom(BOOL for_snapshot, F32 zoom_factor, int subfield)
LLVector2 tc2((F32) mScreen.getWidth()*2,
(F32) mScreen.getHeight()*2);
- LLFastTimer ftm(FTM_RENDER_BLOOM);
+ LL_RECORD_BLOCK_TIME(FTM_RENDER_BLOOM);
gGL.color4f(1,1,1,1);
LLGLDepthTest depth(GL_FALSE);
LLGLDisable blend(GL_BLEND);
@@ -7537,13 +7599,13 @@ void LLPipeline::renderBloom(BOOL for_snapshot, F32 zoom_factor, int subfield)
gGL.loadIdentity();
LLGLDisable test(GL_ALPHA_TEST);
-
+
gGL.setColorMask(true, true);
glClearColor(0,0,0,0);
-
+
{
{
- LLFastTimer ftm(FTM_RENDER_BLOOM_FBO);
+ LL_RECORD_BLOCK_TIME(FTM_RENDER_BLOOM_FBO);
mGlow[2].bindTarget();
mGlow[2].clear();
}
@@ -7611,7 +7673,7 @@ void LLPipeline::renderBloom(BOOL for_snapshot, F32 zoom_factor, int subfield)
for (S32 i = 0; i < kernel; i++)
{
{
- LLFastTimer ftm(FTM_RENDER_BLOOM_FBO);
+ LL_RECORD_BLOCK_TIME(FTM_RENDER_BLOOM_FBO);
mGlow[i%2].bindTarget();
mGlow[i%2].clear();
}
@@ -7653,7 +7715,7 @@ void LLPipeline::renderBloom(BOOL for_snapshot, F32 zoom_factor, int subfield)
/*if (LLRenderTarget::sUseFBO)
{
- LLFastTimer ftm(FTM_RENDER_BLOOM_FBO);
+ LL_RECORD_BLOCK_TIME(FTM_RENDER_BLOOM_FBO);
glBindFramebuffer(GL_FRAMEBUFFER, 0);
}*/
@@ -7751,7 +7813,7 @@ void LLPipeline::renderBloom(BOOL for_snapshot, F32 zoom_factor, int subfield)
}
else if (transition_time < 1.f)
{ //currently in a transition, continue interpolating
- transition_time += 1.f/CameraFocusTransitionTime*gFrameIntervalSeconds;
+ transition_time += 1.f/CameraFocusTransitionTime*gFrameIntervalSeconds.value();
transition_time = llmin(transition_time, 1.f);
F32 t = cosf(transition_time*F_PI+F_PI)*0.5f+0.5f;
@@ -7887,7 +7949,7 @@ void LLPipeline::renderBloom(BOOL for_snapshot, F32 zoom_factor, int subfield)
mScreen.bindTexture(0, channel);
gGL.getTexUnit(channel)->setTextureFilteringOption(LLTexUnit::TFO_BILINEAR);
}
-
+
if (!LLViewerCamera::getInstance()->cameraUnderWater())
{
shader->uniform1f(LLShaderMgr::GLOBAL_GAMMA, 2.2);
@@ -7935,7 +7997,7 @@ void LLPipeline::renderBloom(BOOL for_snapshot, F32 zoom_factor, int subfield)
{
mScreen.bindTexture(0, channel);
}
-
+
if (!LLViewerCamera::getInstance()->cameraUnderWater())
{
shader->uniform1f(LLShaderMgr::GLOBAL_GAMMA, 2.2);
@@ -8153,11 +8215,11 @@ void LLPipeline::renderBloom(BOOL for_snapshot, F32 zoom_factor, int subfield)
}
-static LLFastTimer::DeclareTimer FTM_BIND_DEFERRED("Bind Deferred");
+static LLTrace::BlockTimerStatHandle FTM_BIND_DEFERRED("Bind Deferred");
void LLPipeline::bindDeferredShader(LLGLSLShader& shader, U32 light_index, U32 noise_map)
{
- LLFastTimer t(FTM_BIND_DEFERRED);
+ LL_RECORD_BLOCK_TIME(FTM_BIND_DEFERRED);
if (noise_map == 0xFFFFFFFF)
{
@@ -8378,16 +8440,16 @@ LLVector4 pow4fsrgb(LLVector4 v, F32 f)
return v;
}
-static LLFastTimer::DeclareTimer FTM_GI_TRACE("Trace");
-static LLFastTimer::DeclareTimer FTM_GI_GATHER("Gather");
-static LLFastTimer::DeclareTimer FTM_SUN_SHADOW("Shadow Map");
-static LLFastTimer::DeclareTimer FTM_SOFTEN_SHADOW("Shadow Soften");
-static LLFastTimer::DeclareTimer FTM_EDGE_DETECTION("Find Edges");
-static LLFastTimer::DeclareTimer FTM_LOCAL_LIGHTS("Local Lights");
-static LLFastTimer::DeclareTimer FTM_ATMOSPHERICS("Atmospherics");
-static LLFastTimer::DeclareTimer FTM_FULLSCREEN_LIGHTS("Fullscreen Lights");
-static LLFastTimer::DeclareTimer FTM_PROJECTORS("Projectors");
-static LLFastTimer::DeclareTimer FTM_POST("Post");
+static LLTrace::BlockTimerStatHandle FTM_GI_TRACE("Trace");
+static LLTrace::BlockTimerStatHandle FTM_GI_GATHER("Gather");
+static LLTrace::BlockTimerStatHandle FTM_SUN_SHADOW("Shadow Map");
+static LLTrace::BlockTimerStatHandle FTM_SOFTEN_SHADOW("Shadow Soften");
+static LLTrace::BlockTimerStatHandle FTM_EDGE_DETECTION("Find Edges");
+static LLTrace::BlockTimerStatHandle FTM_LOCAL_LIGHTS("Local Lights");
+static LLTrace::BlockTimerStatHandle FTM_ATMOSPHERICS("Atmospherics");
+static LLTrace::BlockTimerStatHandle FTM_FULLSCREEN_LIGHTS("Fullscreen Lights");
+static LLTrace::BlockTimerStatHandle FTM_PROJECTORS("Projectors");
+static LLTrace::BlockTimerStatHandle FTM_POST("Post");
void LLPipeline::renderDeferredLighting()
@@ -8398,7 +8460,7 @@ void LLPipeline::renderDeferredLighting()
}
{
- LLFastTimer ftm(FTM_RENDER_DEFERRED);
+ LL_RECORD_BLOCK_TIME(FTM_RENDER_DEFERRED);
LLViewerCamera* camera = LLViewerCamera::getInstance();
{
@@ -8454,7 +8516,7 @@ void LLPipeline::renderDeferredLighting()
{
mDeferredLight.bindTarget();
{ //paint shadow/SSAO light map (direct lighting lightmap)
- LLFastTimer ftm(FTM_SUN_SHADOW);
+ LL_RECORD_BLOCK_TIME(FTM_SUN_SHADOW);
bindDeferredShader(gDeferredSunProgram, 0);
mDeferredVB->setBuffer(LLVertexBuffer::MAP_VERTEX);
glClearColor(1,1,1,1);
@@ -8498,7 +8560,7 @@ void LLPipeline::renderDeferredLighting()
if (RenderDeferredSSAO)
{ //soften direct lighting lightmap
- LLFastTimer ftm(FTM_SOFTEN_SHADOW);
+ LL_RECORD_BLOCK_TIME(FTM_SOFTEN_SHADOW);
//blur lightmap
mScreen.bindTarget();
glClearColor(1,1,1,1);
@@ -8573,7 +8635,7 @@ void LLPipeline::renderDeferredLighting()
if (RenderDeferredAtmospheric)
{ //apply sunlight contribution
- LLFastTimer ftm(FTM_ATMOSPHERICS);
+ LL_RECORD_BLOCK_TIME(FTM_ATMOSPHERICS);
bindDeferredShader(LLPipeline::sUnderWaterRender ? gDeferredSoftenWaterProgram : gDeferredSoftenProgram);
{
LLGLDepthTest depth(GL_FALSE);
@@ -8710,7 +8772,7 @@ void LLPipeline::renderDeferredLighting()
col.mV[1] = powf(col.mV[1], 2.2f);
col.mV[2] = powf(col.mV[2], 2.2f);*/
- LLFastTimer ftm(FTM_LOCAL_LIGHTS);
+ LL_RECORD_BLOCK_TIME(FTM_LOCAL_LIGHTS);
gDeferredLightProgram.uniform3fv(LLShaderMgr::LIGHT_CENTER, 1, c);
gDeferredLightProgram.uniform1f(LLShaderMgr::LIGHT_SIZE, s);
gDeferredLightProgram.uniform3fv(LLShaderMgr::DIFFUSE_COLOR, 1, col.mV);
@@ -8751,7 +8813,7 @@ void LLPipeline::renderDeferredLighting()
for (LLDrawable::drawable_list_t::iterator iter = spot_lights.begin(); iter != spot_lights.end(); ++iter)
{
- LLFastTimer ftm(FTM_PROJECTORS);
+ LL_RECORD_BLOCK_TIME(FTM_PROJECTORS);
LLDrawable* drawablep = *iter;
LLVOVolume* volume = drawablep->getVOVolume();
@@ -8808,12 +8870,12 @@ void LLPipeline::renderDeferredLighting()
while (!fullscreen_lights.empty())
{
- LLFastTimer ftm(FTM_FULLSCREEN_LIGHTS);
+ LL_RECORD_BLOCK_TIME(FTM_FULLSCREEN_LIGHTS);
light[count] = fullscreen_lights.front();
fullscreen_lights.pop_front();
col[count] = light_colors.front();
light_colors.pop_front();
-
+
/*col[count].mV[0] = powf(col[count].mV[0], 2.2f);
col[count].mV[1] = powf(col[count].mV[1], 2.2f);
col[count].mV[2] = powf(col[count].mV[2], 2.2f);*/
@@ -8845,7 +8907,7 @@ void LLPipeline::renderDeferredLighting()
for (LLDrawable::drawable_list_t::iterator iter = fullscreen_spot_lights.begin(); iter != fullscreen_spot_lights.end(); ++iter)
{
- LLFastTimer ftm(FTM_PROJECTORS);
+ LL_RECORD_BLOCK_TIME(FTM_PROJECTORS);
LLDrawable* drawablep = *iter;
LLVOVolume* volume = drawablep->getVOVolume();
@@ -9006,7 +9068,7 @@ void LLPipeline::renderDeferredLightingToRT(LLRenderTarget* target)
}
{
- LLFastTimer ftm(FTM_RENDER_DEFERRED);
+ LL_RECORD_BLOCK_TIME(FTM_RENDER_DEFERRED);
LLViewerCamera* camera = LLViewerCamera::getInstance();
@@ -9063,7 +9125,7 @@ void LLPipeline::renderDeferredLightingToRT(LLRenderTarget* target)
{
mDeferredLight.bindTarget();
{ //paint shadow/SSAO light map (direct lighting lightmap)
- LLFastTimer ftm(FTM_SUN_SHADOW);
+ LL_RECORD_BLOCK_TIME(FTM_SUN_SHADOW);
bindDeferredShader(gDeferredSunProgram);
mDeferredVB->setBuffer(LLVertexBuffer::MAP_VERTEX);
glClearColor(1,1,1,1);
@@ -9121,7 +9183,7 @@ void LLPipeline::renderDeferredLightingToRT(LLRenderTarget* target)
if (RenderDeferredAtmospheric)
{ //apply sunlight contribution
- LLFastTimer ftm(FTM_ATMOSPHERICS);
+ LL_RECORD_BLOCK_TIME(FTM_ATMOSPHERICS);
bindDeferredShader(gDeferredSoftenProgram);
{
LLGLDepthTest depth(GL_FALSE);
@@ -9258,7 +9320,7 @@ void LLPipeline::renderDeferredLightingToRT(LLRenderTarget* target)
col.mV[1] = powf(col.mV[1], 2.2f);
col.mV[2] = powf(col.mV[2], 2.2f);*/
- LLFastTimer ftm(FTM_LOCAL_LIGHTS);
+ LL_RECORD_BLOCK_TIME(FTM_LOCAL_LIGHTS);
gDeferredLightProgram.uniform3fv(LLShaderMgr::LIGHT_CENTER, 1, c);
gDeferredLightProgram.uniform1f(LLShaderMgr::LIGHT_SIZE, s);
gDeferredLightProgram.uniform3fv(LLShaderMgr::DIFFUSE_COLOR, 1, col.mV);
@@ -9299,7 +9361,7 @@ void LLPipeline::renderDeferredLightingToRT(LLRenderTarget* target)
for (LLDrawable::drawable_list_t::iterator iter = spot_lights.begin(); iter != spot_lights.end(); ++iter)
{
- LLFastTimer ftm(FTM_PROJECTORS);
+ LL_RECORD_BLOCK_TIME(FTM_PROJECTORS);
LLDrawable* drawablep = *iter;
LLVOVolume* volume = drawablep->getVOVolume();
@@ -9356,7 +9418,7 @@ void LLPipeline::renderDeferredLightingToRT(LLRenderTarget* target)
while (!fullscreen_lights.empty())
{
- LLFastTimer ftm(FTM_FULLSCREEN_LIGHTS);
+ LL_RECORD_BLOCK_TIME(FTM_FULLSCREEN_LIGHTS);
light[count] = fullscreen_lights.front();
fullscreen_lights.pop_front();
col[count] = light_colors.front();
@@ -9394,7 +9456,7 @@ void LLPipeline::renderDeferredLightingToRT(LLRenderTarget* target)
for (LLDrawable::drawable_list_t::iterator iter = fullscreen_spot_lights.begin(); iter != fullscreen_spot_lights.end(); ++iter)
{
- LLFastTimer ftm(FTM_PROJECTORS);
+ LL_RECORD_BLOCK_TIME(FTM_PROJECTORS);
LLDrawable* drawablep = *iter;
LLVOVolume* volume = drawablep->getVOVolume();
@@ -10095,13 +10157,13 @@ glh::matrix4f scale_translate_to_fit(const LLVector3 min, const LLVector3 max)
return ret;
}
-static LLFastTimer::DeclareTimer FTM_SHADOW_RENDER("Render Shadows");
-static LLFastTimer::DeclareTimer FTM_SHADOW_ALPHA("Alpha Shadow");
-static LLFastTimer::DeclareTimer FTM_SHADOW_SIMPLE("Simple Shadow");
+static LLTrace::BlockTimerStatHandle FTM_SHADOW_RENDER("Render Shadows");
+static LLTrace::BlockTimerStatHandle FTM_SHADOW_ALPHA("Alpha Shadow");
+static LLTrace::BlockTimerStatHandle FTM_SHADOW_SIMPLE("Simple Shadow");
void LLPipeline::renderShadow(glh::matrix4f& view, glh::matrix4f& proj, LLCamera& shadow_cam, LLCullResult &result, BOOL use_shader, BOOL use_occlusion, U32 target_width)
{
- LLFastTimer t(FTM_SHADOW_RENDER);
+ LL_RECORD_BLOCK_TIME(FTM_SHADOW_RENDER);
//clip out geometry on the same side of water as the camera
S32 occlude = LLPipeline::sUseOcclusion;
@@ -10176,7 +10238,7 @@ void LLPipeline::renderShadow(glh::matrix4f& view, glh::matrix4f& proj, LLCamera
gGL.diffuseColor4f(1,1,1,1);
gGL.setColorMask(false, false);
- LLFastTimer ftm(FTM_SHADOW_SIMPLE);
+ LL_RECORD_BLOCK_TIME(FTM_SHADOW_SIMPLE);
gGL.getTexUnit(0)->disable();
for (U32 i = 0; i < sizeof(types)/sizeof(U32); ++i)
@@ -10202,7 +10264,7 @@ void LLPipeline::renderShadow(glh::matrix4f& view, glh::matrix4f& proj, LLCamera
}
{
- LLFastTimer ftm(FTM_SHADOW_ALPHA);
+ LL_RECORD_BLOCK_TIME(FTM_SHADOW_ALPHA);
gDeferredShadowAlphaMaskProgram.bind();
gDeferredShadowAlphaMaskProgram.uniform1f(LLShaderMgr::DEFERRED_SHADOW_TARGET_WIDTH, (float)target_width);
@@ -10255,10 +10317,10 @@ void LLPipeline::renderShadow(glh::matrix4f& view, glh::matrix4f& proj, LLCamera
LLPipeline::sShadowRender = FALSE;
}
-static LLFastTimer::DeclareTimer FTM_VISIBLE_CLOUD("Visible Cloud");
+static LLTrace::BlockTimerStatHandle FTM_VISIBLE_CLOUD("Visible Cloud");
BOOL LLPipeline::getVisiblePointCloud(LLCamera& camera, LLVector3& min, LLVector3& max, std::vector<LLVector3>& fp, LLVector3 light_dir)
{
- LLFastTimer t(FTM_VISIBLE_CLOUD);
+ LL_RECORD_BLOCK_TIME(FTM_VISIBLE_CLOUD);
//get point cloud of intersection of frust and min, max
if (getVisibleExtents(camera, min, max))
@@ -10461,7 +10523,7 @@ void LLPipeline::generateHighlight(LLCamera& camera)
if (!mHighlightSet.empty())
{
- F32 transition = gFrameIntervalSeconds/RenderHighlightFadeTime;
+ F32 transition = gFrameIntervalSeconds.value()/RenderHighlightFadeTime;
LLGLDisable test(GL_ALPHA_TEST);
LLGLDepthTest depth(GL_FALSE);
@@ -10505,7 +10567,7 @@ void LLPipeline::generateHighlight(LLCamera& camera)
}
-static LLFastTimer::DeclareTimer FTM_GEN_SUN_SHADOW("Gen Sun Shadow");
+static LLTrace::BlockTimerStatHandle FTM_GEN_SUN_SHADOW("Gen Sun Shadow");
void LLPipeline::generateSunShadow(LLCamera& camera)
{
@@ -10514,7 +10576,7 @@ void LLPipeline::generateSunShadow(LLCamera& camera)
return;
}
- LLFastTimer t(FTM_GEN_SUN_SHADOW);
+ LL_RECORD_BLOCK_TIME(FTM_GEN_SUN_SHADOW);
BOOL skip_avatar_update = FALSE;
if (!isAgentAvatarValid() || gAgentCamera.getCameraAnimating() || gAgentCamera.getCameraMode() != CAMERA_MODE_MOUSELOOK || !LLVOAvatar::sVisibleInFirstPerson)
@@ -10735,7 +10797,7 @@ void LLPipeline::generateSunShadow(LLCamera& camera)
mShadowFrustPoints[j].clear();
}
- LLViewerCamera::sCurCameraID = LLViewerCamera::CAMERA_SHADOW0+j;
+ LLViewerCamera::sCurCameraID = (LLViewerCamera::eCameraID)(LLViewerCamera::CAMERA_SHADOW0+j);
//restore render matrices
glh_set_current_modelview(saved_view);
@@ -11111,12 +11173,14 @@ void LLPipeline::generateSunShadow(LLCamera& camera)
if (gen_shadow)
{
- F32 fade_amt = gFrameIntervalSeconds * llmax(LLViewerCamera::getInstance()->getVelocityStat()->getCurrentPerSec(), 1.f);
+ LLTrace::CountStatHandle<>* velocity_stat = LLViewerCamera::getVelocityStat();
+ F32 fade_amt = gFrameIntervalSeconds.value()
+ * llmax(LLTrace::get_frame_recording().getLastRecording().getSum(*velocity_stat) / LLTrace::get_frame_recording().getLastRecording().getDuration().value(), 1.0);
//update shadow targets
for (U32 i = 0; i < 2; i++)
{ //for each current shadow
- LLViewerCamera::sCurCameraID = LLViewerCamera::CAMERA_SHADOW4+i;
+ LLViewerCamera::sCurCameraID = (LLViewerCamera::eCameraID)(LLViewerCamera::CAMERA_SHADOW4+i);
if (mShadowSpotLight[i].notNull() &&
(mShadowSpotLight[i] == mTargetShadowSpotLight[0] ||
@@ -11235,7 +11299,7 @@ void LLPipeline::generateSunShadow(LLCamera& camera)
static LLCullResult result[2];
- LLViewerCamera::sCurCameraID = LLViewerCamera::CAMERA_SHADOW0+i+4;
+ LLViewerCamera::sCurCameraID = (LLViewerCamera::eCameraID)(LLViewerCamera::CAMERA_SHADOW0 + i + 4);
renderShadow(view[i+4], proj[i+4], shadow_cam, result[i], FALSE, FALSE, target_width);
@@ -11285,7 +11349,7 @@ void LLPipeline::renderGroups(LLRenderPass* pass, U32 type, U32 mask, BOOL textu
LLSpatialGroup* group = *i;
if (!group->isDead() &&
(!sUseOcclusion || !group->isOcclusionState(LLSpatialGroup::OCCLUDED)) &&
- gPipeline.hasRenderType(group->mSpatialPartition->mDrawableType) &&
+ gPipeline.hasRenderType(group->getSpatialPartition()->mDrawableType) &&
group->mDrawMap.find(type) != group->mDrawMap.end())
{
pass->renderGroup(group,type,mask,texture);
@@ -11293,11 +11357,11 @@ void LLPipeline::renderGroups(LLRenderPass* pass, U32 type, U32 mask, BOOL textu
}
}
-static LLFastTimer::DeclareTimer FTM_IMPOSTOR_MARK_VISIBLE("Impostor Mark Visible");
-static LLFastTimer::DeclareTimer FTM_IMPOSTOR_SETUP("Impostor Setup");
-static LLFastTimer::DeclareTimer FTM_IMPOSTOR_BACKGROUND("Impostor Background");
-static LLFastTimer::DeclareTimer FTM_IMPOSTOR_ALLOCATE("Impostor Allocate");
-static LLFastTimer::DeclareTimer FTM_IMPOSTOR_RESIZE("Impostor Resize");
+static LLTrace::BlockTimerStatHandle FTM_IMPOSTOR_MARK_VISIBLE("Impostor Mark Visible");
+static LLTrace::BlockTimerStatHandle FTM_IMPOSTOR_SETUP("Impostor Setup");
+static LLTrace::BlockTimerStatHandle FTM_IMPOSTOR_BACKGROUND("Impostor Background");
+static LLTrace::BlockTimerStatHandle FTM_IMPOSTOR_ALLOCATE("Impostor Allocate");
+static LLTrace::BlockTimerStatHandle FTM_IMPOSTOR_RESIZE("Impostor Resize");
void LLPipeline::generateImpostor(LLVOAvatar* avatar)
{
@@ -11363,7 +11427,7 @@ void LLPipeline::generateImpostor(LLVOAvatar* avatar)
LLViewerCamera* viewer_camera = LLViewerCamera::getInstance();
{
- LLFastTimer t(FTM_IMPOSTOR_MARK_VISIBLE);
+ LL_RECORD_BLOCK_TIME(FTM_IMPOSTOR_MARK_VISIBLE);
markVisible(avatar->mDrawable, *viewer_camera);
LLVOAvatar::sUseImpostors = FALSE;
@@ -11393,7 +11457,7 @@ void LLPipeline::generateImpostor(LLVOAvatar* avatar)
U32 resX = 0;
{
- LLFastTimer t(FTM_IMPOSTOR_SETUP);
+ LL_RECORD_BLOCK_TIME(FTM_IMPOSTOR_SETUP);
const LLVector4a* ext = avatar->mDrawable->getSpatialExtents();
LLVector3 pos(avatar->getRenderPosition()+avatar->getImpostorOffset());
@@ -11450,7 +11514,7 @@ void LLPipeline::generateImpostor(LLVOAvatar* avatar)
if (!avatar->mImpostor.isComplete())
{
- LLFastTimer t(FTM_IMPOSTOR_ALLOCATE);
+ LL_RECORD_BLOCK_TIME(FTM_IMPOSTOR_ALLOCATE);
if (LLPipeline::sRenderDeferred)
@@ -11469,7 +11533,7 @@ void LLPipeline::generateImpostor(LLVOAvatar* avatar)
}
else if(resX != avatar->mImpostor.getWidth() || resY != avatar->mImpostor.getHeight())
{
- LLFastTimer t(FTM_IMPOSTOR_RESIZE);
+ LL_RECORD_BLOCK_TIME(FTM_IMPOSTOR_RESIZE);
avatar->mImpostor.resize(resX,resY);
}
@@ -11531,8 +11595,7 @@ void LLPipeline::generateImpostor(LLVOAvatar* avatar)
LLDrawPoolAvatar::sMinimumAlpha = old_alpha;
{ //create alpha mask based on depth buffer (grey out if muted)
- LLFastTimer t(FTM_IMPOSTOR_BACKGROUND);
-
+ LL_RECORD_BLOCK_TIME(FTM_IMPOSTOR_BACKGROUND);
if (LLPipeline::sRenderDeferred)
{
GLuint buff = GL_COLOR_ATTACHMENT0;
@@ -11671,7 +11734,7 @@ void LLPipeline::setRenderTypeMask(U32 type, ...)
if (type > END_RENDER_TYPES)
{
- llerrs << "Invalid render type." << llendl;
+ LL_ERRS() << "Invalid render type." << LL_ENDL;
}
}
@@ -11692,7 +11755,7 @@ BOOL LLPipeline::hasAnyRenderType(U32 type, ...) const
if (type > END_RENDER_TYPES)
{
- llerrs << "Invalid render type." << llendl;
+ LL_ERRS() << "Invalid render type." << LL_ENDL;
}
return FALSE;
@@ -11709,7 +11772,7 @@ void LLPipeline::popRenderTypeMask()
{
if (mRenderTypeEnableStack.empty())
{
- llerrs << "Depleted render type stack." << llendl;
+ LL_ERRS() << "Depleted render type stack." << LL_ENDL;
}
memcpy(mRenderTypeEnabled, mRenderTypeEnableStack.top().data(), sizeof(mRenderTypeEnabled));
@@ -11740,7 +11803,7 @@ void LLPipeline::andRenderTypeMask(U32 type, ...)
if (type > END_RENDER_TYPES)
{
- llerrs << "Invalid render type." << llendl;
+ LL_ERRS() << "Invalid render type." << LL_ENDL;
}
for (U32 i = 0; i < LLPipeline::NUM_RENDER_TYPES; ++i)
@@ -11765,7 +11828,7 @@ void LLPipeline::clearRenderTypeMask(U32 type, ...)
if (type > END_RENDER_TYPES)
{
- llerrs << "Invalid render type." << llendl;
+ LL_ERRS() << "Invalid render type." << LL_ENDL;
}
}
diff --git a/indra/newview/pipeline.h b/indra/newview/pipeline.h
index 1c7154d413..ce2f4b17b1 100755
--- 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"
@@ -43,28 +41,16 @@
#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 LLVOPartGroup;
class LLGLSLShader;
-class LLCurlRequest;
class LLDrawPoolAlpha;
-class LLMeshResponder;
-
typedef enum e_avatar_skinning_method
{
SKIN_METHOD_SOFTWARE,
@@ -84,26 +70,26 @@ glh::matrix4f gl_ortho(GLfloat left, GLfloat right, GLfloat bottom, GLfloat top,
glh::matrix4f gl_perspective(GLfloat fovy, GLfloat aspect, GLfloat zNear, GLfloat zFar);
glh::matrix4f gl_lookat(LLVector3 eye, LLVector3 center, LLVector3 up);
-extern LLFastTimer::DeclareTimer FTM_RENDER_GEOMETRY;
-extern LLFastTimer::DeclareTimer FTM_RENDER_GRASS;
-extern LLFastTimer::DeclareTimer FTM_RENDER_INVISIBLE;
-extern LLFastTimer::DeclareTimer FTM_RENDER_OCCLUSION;
-extern LLFastTimer::DeclareTimer FTM_RENDER_SHINY;
-extern LLFastTimer::DeclareTimer FTM_RENDER_SIMPLE;
-extern LLFastTimer::DeclareTimer FTM_RENDER_TERRAIN;
-extern LLFastTimer::DeclareTimer FTM_RENDER_TREES;
-extern LLFastTimer::DeclareTimer FTM_RENDER_UI;
-extern LLFastTimer::DeclareTimer FTM_RENDER_WATER;
-extern LLFastTimer::DeclareTimer FTM_RENDER_WL_SKY;
-extern LLFastTimer::DeclareTimer FTM_RENDER_ALPHA;
-extern LLFastTimer::DeclareTimer FTM_RENDER_CHARACTERS;
-extern LLFastTimer::DeclareTimer FTM_RENDER_BUMP;
-extern LLFastTimer::DeclareTimer FTM_RENDER_MATERIALS;
-extern LLFastTimer::DeclareTimer FTM_RENDER_FULLBRIGHT;
-extern LLFastTimer::DeclareTimer FTM_RENDER_GLOW;
-extern LLFastTimer::DeclareTimer FTM_STATESORT;
-extern LLFastTimer::DeclareTimer FTM_PIPELINE;
-extern LLFastTimer::DeclareTimer FTM_CLIENT_COPY;
+extern LLTrace::BlockTimerStatHandle FTM_RENDER_GEOMETRY;
+extern LLTrace::BlockTimerStatHandle FTM_RENDER_GRASS;
+extern LLTrace::BlockTimerStatHandle FTM_RENDER_INVISIBLE;
+extern LLTrace::BlockTimerStatHandle FTM_RENDER_OCCLUSION;
+extern LLTrace::BlockTimerStatHandle FTM_RENDER_SHINY;
+extern LLTrace::BlockTimerStatHandle FTM_RENDER_SIMPLE;
+extern LLTrace::BlockTimerStatHandle FTM_RENDER_TERRAIN;
+extern LLTrace::BlockTimerStatHandle FTM_RENDER_TREES;
+extern LLTrace::BlockTimerStatHandle FTM_RENDER_UI;
+extern LLTrace::BlockTimerStatHandle FTM_RENDER_WATER;
+extern LLTrace::BlockTimerStatHandle FTM_RENDER_WL_SKY;
+extern LLTrace::BlockTimerStatHandle FTM_RENDER_ALPHA;
+extern LLTrace::BlockTimerStatHandle FTM_RENDER_CHARACTERS;
+extern LLTrace::BlockTimerStatHandle FTM_RENDER_BUMP;
+extern LLTrace::BlockTimerStatHandle FTM_RENDER_MATERIALS;
+extern LLTrace::BlockTimerStatHandle FTM_RENDER_FULLBRIGHT;
+extern LLTrace::BlockTimerStatHandle FTM_RENDER_GLOW;
+extern LLTrace::BlockTimerStatHandle FTM_STATESORT;
+extern LLTrace::BlockTimerStatHandle FTM_PIPELINE;
+extern LLTrace::BlockTimerStatHandle FTM_CLIENT_COPY;
class LLPipeline
@@ -115,7 +101,7 @@ public:
void destroyGL();
void restoreGL();
void resetVertexBuffers();
- void doResetVertexBuffers();
+ void doResetVertexBuffers(bool forced = false);
void resizeScreenTexture();
void releaseGLBuffers();
void releaseLUTBuffers();
@@ -259,6 +245,7 @@ public:
void rebuildPriorityGroups();
void rebuildGroups();
void clearRebuildGroups();
+ void clearRebuildDrawables();
//calculate pixel area of given box from vantage point of given camera
static F32 calcPixelArea(LLVector3 center, LLVector3 size, LLCamera& camera);
@@ -557,23 +544,14 @@ public:
LLQuaternion mFlyCamRotation;
BOOL mBackfaceCull;
- S32 mBatchCount;
S32 mMatrixOpCount;
S32 mTextureMatrixOps;
- S32 mMaxBatchSize;
- S32 mMinBatchSize;
- S32 mMeanBatchSize;
- S32 mTrianglesDrawn;
S32 mNumVisibleNodes;
- S32 mVerticesRelit;
S32 mDebugTextureUploadCost;
S32 mDebugSculptUploadCost;
S32 mDebugMeshUploadCost;
- S32 mLightingChanges;
- S32 mGeometryChanges;
-
S32 mNumVisibleFaces;
static S32 sCompiles;
@@ -609,6 +587,8 @@ public:
static F32 sMinRenderSize;
static BOOL sRenderingHUDs;
+ static LLTrace::EventStatHandle<S64> sStatBatchSize;
+
//screen texture
U32 mScreenWidth;
U32 mScreenHeight;
diff --git a/indra/newview/roles_constants.h b/indra/newview/roles_constants.h
new file mode 100755
index 0000000000..effd15ea72
--- /dev/null
+++ b/indra/newview/roles_constants.h
@@ -0,0 +1,192 @@
+/**
+ * @file roles_constants.h
+ * @brief General Roles Constants
+ *
+ * $LicenseInfo:firstyear=2006&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2010, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
+ * $/LicenseInfo$
+ */
+
+#ifndef LL_ROLES_CONSTANTS_H
+#define LL_ROLES_CONSTANTS_H
+
+// This value includes the everyone group.
+const S32 MAX_ROLES = 10;
+
+enum LLRoleMemberChangeType
+{
+ RMC_ADD,
+ RMC_REMOVE,
+ RMC_NONE
+};
+
+enum LLRoleChangeType
+{
+ RC_UPDATE_NONE,
+ RC_UPDATE_DATA,
+ RC_UPDATE_POWERS,
+ RC_UPDATE_ALL,
+ RC_CREATE,
+ RC_DELETE
+};
+
+//
+// Powers
+//
+
+// KNOWN HOLES: use these for any single bit powers you need
+// bit 0x1 << 46
+// bit 0x1 << 49 and above
+
+// These powers were removed to make group roles simpler
+// bit 0x1 << 41 (GP_ACCOUNTING_VIEW)
+// bit 0x1 << 46 (GP_PROPOSAL_VIEW)
+
+const U64 GP_NO_POWERS = 0x0;
+const U64 GP_ALL_POWERS = 0xFFFFFFFFFFFFFFFFLL;
+
+// Membership
+const U64 GP_MEMBER_INVITE = 0x1 << 1; // Invite member
+const U64 GP_MEMBER_EJECT = 0x1 << 2; // Eject member from group
+const U64 GP_MEMBER_OPTIONS = 0x1 << 3; // Toggle "Open enrollment" and change "Signup Fee"
+const U64 GP_MEMBER_VISIBLE_IN_DIR = 0x1LL << 47;
+
+// Roles
+const U64 GP_ROLE_CREATE = 0x1 << 4; // Create new roles
+const U64 GP_ROLE_DELETE = 0x1 << 5; // Delete roles
+const U64 GP_ROLE_PROPERTIES = 0x1 << 6; // Change Role Names, Titles, and Descriptions (Of roles the user is in, only, or any role in group?)
+const U64 GP_ROLE_ASSIGN_MEMBER_LIMITED = 0x1 << 7; // Assign Member to a Role that the assigner is in
+const U64 GP_ROLE_ASSIGN_MEMBER = 0x1 << 8; // Assign Member to Role
+const U64 GP_ROLE_REMOVE_MEMBER = 0x1 << 9; // Remove Member from Role
+const U64 GP_ROLE_CHANGE_ACTIONS = 0x1 << 10; // Change actions a role can perform
+
+// Group Identity
+const U64 GP_GROUP_CHANGE_IDENTITY = 0x1 << 11; // Charter, insignia, 'Show In Group List', 'Publish on the web', 'Mature', all 'Show Member In Group Profile' checkboxes
+
+// Parcel Management
+const U64 GP_LAND_DEED = 0x1 << 12; // Deed Land and Buy Land for Group
+const U64 GP_LAND_RELEASE = 0x1 << 13; // Release Land (to Gov. Linden)
+const U64 GP_LAND_SET_SALE_INFO = 0x1 << 14; // Set for sale info (Toggle "For Sale", Set Price, Set Target, Toggle "Sell objects with the land")
+const U64 GP_LAND_DIVIDE_JOIN = 0x1 << 15; // Divide and Join Parcels
+
+// Parcel Identity
+const U64 GP_LAND_FIND_PLACES = 0x1 << 17; // Toggle "Show in Find Places" and Set Category.
+const U64 GP_LAND_CHANGE_IDENTITY = 0x1 << 18; // Change Parcel Identity: Parcel Name, Parcel Description, Snapshot, 'Publish on the web', and 'Mature' checkbox
+const U64 GP_LAND_SET_LANDING_POINT = 0x1 << 19; // Set Landing Point
+
+// Parcel Settings
+const U64 GP_LAND_CHANGE_MEDIA = 0x1 << 20; // Change Media Settings
+const U64 GP_LAND_EDIT = 0x1 << 21; // Toggle Edit Land
+const U64 GP_LAND_OPTIONS = 0x1 << 22; // Toggle Set Home Point, Fly, Outside Scripts, Create/Edit Objects, Landmark, and Damage checkboxes
+
+// Parcel Powers
+const U64 GP_LAND_ALLOW_EDIT_LAND = 0x1 << 23; // Bypass Edit Land Restriction
+const U64 GP_LAND_ALLOW_FLY = 0x1 << 24; // Bypass Fly Restriction
+const U64 GP_LAND_ALLOW_CREATE = 0x1 << 25; // Bypass Create/Edit Objects Restriction
+const U64 GP_LAND_ALLOW_LANDMARK = 0x1 << 26; // Bypass Landmark Restriction
+const U64 GP_LAND_ALLOW_SET_HOME = 0x1 << 28; // Bypass Set Home Point Restriction
+const U64 GP_LAND_ALLOW_HOLD_EVENT = 0x1LL << 41; // Allowed to hold events on group-owned land
+
+
+// Parcel Access
+const U64 GP_LAND_MANAGE_ALLOWED = 0x1 << 29; // Manage Allowed List
+const U64 GP_LAND_MANAGE_BANNED = 0x1 << 30; // Manage Banned List
+const U64 GP_LAND_MANAGE_PASSES = 0x1LL << 31; // Change Sell Pass Settings
+const U64 GP_LAND_ADMIN = 0x1LL << 32; // Eject and Freeze Users on the land
+
+// Parcel Content
+const U64 GP_LAND_RETURN_GROUP_SET = 0x1LL << 33; // Return objects on parcel that are set to group
+const U64 GP_LAND_RETURN_NON_GROUP = 0x1LL << 34; // Return objects on parcel that are not set to group
+const U64 GP_LAND_RETURN_GROUP_OWNED= 0x1LL << 48; // Return objects on parcel that are owned by the group
+
+// Select a power-bit based on an object's relationship to a parcel.
+const U64 GP_LAND_RETURN = GP_LAND_RETURN_GROUP_OWNED
+ | GP_LAND_RETURN_GROUP_SET
+ | GP_LAND_RETURN_NON_GROUP;
+
+const U64 GP_LAND_GARDENING = 0x1LL << 35; // Parcel Gardening - plant and move linden trees
+
+// Object Management
+const U64 GP_OBJECT_DEED = 0x1LL << 36; // Deed Object
+const U64 GP_OBJECT_MANIPULATE = 0x1LL << 38; // Manipulate Group Owned Objects (Move, Copy, Mod)
+const U64 GP_OBJECT_SET_SALE = 0x1LL << 39; // Set Group Owned Object for Sale
+
+// Accounting
+const U64 GP_ACCOUNTING_ACCOUNTABLE = 0x1LL << 40; // Pay Group Liabilities and Receive Group Dividends
+
+// Notices
+const U64 GP_NOTICES_SEND = 0x1LL << 42; // Send Notices
+const U64 GP_NOTICES_RECEIVE = 0x1LL << 43; // Receive Notices and View Notice History
+
+// Proposals
+// TODO: _DEPRECATED suffix as part of vote removal - DEV-24856:
+const U64 GP_PROPOSAL_START = 0x1LL << 44; // Start Proposal
+// TODO: _DEPRECATED suffix as part of vote removal - DEV-24856:
+const U64 GP_PROPOSAL_VOTE = 0x1LL << 45; // Vote on Proposal
+
+// Group chat moderation related
+const U64 GP_SESSION_JOIN = 0x1LL << 16; //can join session
+const U64 GP_SESSION_VOICE = 0x1LL << 27; //can hear/talk
+const U64 GP_SESSION_MODERATOR = 0x1LL << 37; //can mute people's session
+
+const U64 GP_DEFAULT_MEMBER = GP_ACCOUNTING_ACCOUNTABLE
+ | GP_LAND_ALLOW_SET_HOME
+ | GP_NOTICES_RECEIVE
+ | GP_SESSION_JOIN
+ | GP_SESSION_VOICE
+ ;
+
+const U64 GP_DEFAULT_OFFICER = GP_DEFAULT_MEMBER // Superset of GP_DEFAULT_MEMBER
+ | GP_GROUP_CHANGE_IDENTITY
+ | GP_LAND_ADMIN
+ | GP_LAND_ALLOW_EDIT_LAND
+ | GP_LAND_ALLOW_FLY
+ | GP_LAND_ALLOW_CREATE
+ | GP_LAND_ALLOW_LANDMARK
+ | GP_LAND_CHANGE_IDENTITY
+ | GP_LAND_CHANGE_MEDIA
+ | GP_LAND_DEED
+ | GP_LAND_DIVIDE_JOIN
+ | GP_LAND_EDIT
+ | GP_LAND_FIND_PLACES
+ | GP_LAND_GARDENING
+ | GP_LAND_MANAGE_ALLOWED
+ | GP_LAND_MANAGE_BANNED
+ | GP_LAND_MANAGE_PASSES
+ | GP_LAND_OPTIONS
+ | GP_LAND_RELEASE
+ | GP_LAND_RETURN_GROUP_OWNED
+ | GP_LAND_RETURN_GROUP_SET
+ | GP_LAND_RETURN_NON_GROUP
+ | GP_LAND_SET_LANDING_POINT
+ | GP_LAND_SET_SALE_INFO
+ | GP_MEMBER_EJECT
+ | GP_MEMBER_INVITE
+ | GP_MEMBER_OPTIONS
+ | GP_MEMBER_VISIBLE_IN_DIR
+ | GP_NOTICES_SEND
+ | GP_OBJECT_DEED
+ | GP_OBJECT_MANIPULATE
+ | GP_OBJECT_SET_SALE
+ | GP_ROLE_ASSIGN_MEMBER_LIMITED
+ | GP_ROLE_PROPERTIES
+ | GP_SESSION_MODERATOR
+ ;
+#endif
diff --git a/indra/newview/skins/default/textures/textures.xml b/indra/newview/skins/default/textures/textures.xml
index 94c187e21a..d4df1ee71c 100755
--- a/indra/newview/skins/default/textures/textures.xml
+++ b/indra/newview/skins/default/textures/textures.xml
@@ -234,6 +234,7 @@ with the same filename but different name
<texture name="Home_Off" file_name="navbar/Home_Off.png" preload="false" />
+ <texture name="Horizontal Drag Handle" file_name="widgets/horizontal_drag_handle.png" scale.left="8" scale.right="120" scale.bottom="1" scale.top="6" scale_type="scale_outer"/>
<texture name="Icon_Close_Foreground" file_name="windows/Icon_Close_Foreground.png" preload="true" />
<texture name="Icon_Close_Press" file_name="windows/Icon_Close_Press.png" preload="true" />
@@ -652,6 +653,7 @@ with the same filename but different name
<texture name="Unread_Chiclet" file_name="bottomtray/Unread_Chiclet.png" preload="false" />
<texture name="UpArrow_Off" file_name="icons/UpArrow_Off.png" preload="false" />
+ <texture name="Vertical Drag Handle" file_name="widgets/vertical_drag_handle.png" scale.left="2" scale.right="7" scale.bottom="8" scale.top="120" scale_type="scale_outer"/>
<texture name="Volume_Background" file_name="windows/Volume_Background.png" preload="false"
scale.left="6" scale.top="33" scale.right="63" scale.bottom="10" />
@@ -781,6 +783,4 @@ with the same filename but different name
<texture name="Camera_Drag_Dot" file_name="world/CameraDragDot.png"/>
<texture name="NavBar Separator" file_name="navbar/separator.png"/>
- <texture name="Horizontal Drag Handle" file_name="widgets/horizontal_drag_handle.png"/>
- <texture name="Vertical Drag Handle" file_name="widgets/vertical_drag_handle.png"/>
</textures>
diff --git a/indra/newview/skins/default/textures/widgets/horizontal_drag_handle.png b/indra/newview/skins/default/textures/widgets/horizontal_drag_handle.png
index 642eac4065..5f5a33be42 100644
--- a/indra/newview/skins/default/textures/widgets/horizontal_drag_handle.png
+++ b/indra/newview/skins/default/textures/widgets/horizontal_drag_handle.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/widgets/vertical_drag_handle.png b/indra/newview/skins/default/textures/widgets/vertical_drag_handle.png
index b06b70cf36..2ce5208c21 100644
--- a/indra/newview/skins/default/textures/widgets/vertical_drag_handle.png
+++ b/indra/newview/skins/default/textures/widgets/vertical_drag_handle.png
Binary files differ
diff --git a/indra/newview/skins/default/xui/da/floater_lagmeter.xml b/indra/newview/skins/default/xui/da/floater_lagmeter.xml
deleted file mode 100755
index 149d174c34..0000000000
--- a/indra/newview/skins/default/xui/da/floater_lagmeter.xml
+++ /dev/null
@@ -1,151 +0,0 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<floater name="floater_lagmeter" title="LAG METER">
- <floater.string name="max_title_msg">
- Lag måler
- </floater.string>
- <floater.string name="max_width_px">
- 360
- </floater.string>
- <floater.string name="min_title_msg">
- Lag
- </floater.string>
- <floater.string name="min_width_px">
- 90
- </floater.string>
- <floater.string name="client_text_msg">
- Klient
- </floater.string>
- <floater.string name="client_frame_rate_critical_fps">
- 10
- </floater.string>
- <floater.string name="client_frame_rate_warning_fps">
- 15
- </floater.string>
- <floater.string name="client_frame_time_window_bg_msg">
- Normal, vindue i baggrund
- </floater.string>
- <floater.string name="client_frame_time_critical_msg">
- Klients billeder/sek under [CLIENT_FRAME_RATE_CRITICAL]
- </floater.string>
- <floater.string name="client_frame_time_warning_msg">
- Klients billeder/sek mellem [CLIENT_FRAME_RATE_CRITICAL] og [CLIENT_FRAME_RATE_WARNING]
- </floater.string>
- <floater.string name="client_frame_time_normal_msg">
- Normal
- </floater.string>
- <floater.string name="client_draw_distance_cause_msg">
- Mulig årsag: &apos;Vis afstand&apos; sat for højt i grafik indstillinger
- </floater.string>
- <floater.string name="client_texture_loading_cause_msg">
- Mulig årsag: Billeder hentes
- </floater.string>
- <floater.string name="client_texture_memory_cause_msg">
- Mulig årsag: For mange billeder i hukommelse
- </floater.string>
- <floater.string name="client_complex_objects_cause_msg">
- Mulig årsag: For mange komplekse objekter i scenariet
- </floater.string>
- <floater.string name="network_text_msg">
- Netværk
- </floater.string>
- <floater.string name="network_packet_loss_critical_pct">
- 10
- </floater.string>
- <floater.string name="network_packet_loss_warning_pct">
- 5
- </floater.string>
- <floater.string name="network_packet_loss_critical_msg">
- Forbindelsen mister over [NETWORK_PACKET_LOSS_CRITICAL]% pakker
- </floater.string>
- <floater.string name="network_packet_loss_warning_msg">
- Forbindelsen mister [NETWORK_PACKET_LOSS_WARNING]%-[NETWORK_PACKET_LOSS_CRITICAL]% pakker
- </floater.string>
- <floater.string name="network_performance_normal_msg">
- Normal
- </floater.string>
- <floater.string name="network_ping_critical_ms">
- 600
- </floater.string>
- <floater.string name="network_ping_warning_ms">
- 300
- </floater.string>
- <floater.string name="network_ping_critical_msg">
- Forbindelsens ping tider er over [NETWORK_PING_CRITICAL] ms
- </floater.string>
- <floater.string name="network_ping_warning_msg">
- Forbindelsens ping tider er [NETWORK_PING_WARNING]-[NETWORK_PING_CRITICAL] ms
- </floater.string>
- <floater.string name="network_packet_loss_cause_msg">
- Muligvis dårlig forbindelse eller &apos;båndbredde&apos; sat for højt i netværksopsætning.
- </floater.string>
- <floater.string name="network_ping_cause_msg">
- Muligvis dårlig forbindelse eller fil delings program.
- </floater.string>
- <floater.string name="server_text_msg">
- Server
- </floater.string>
- <floater.string name="server_frame_rate_critical_fps">
- 20
- </floater.string>
- <floater.string name="server_frame_rate_warning_fps">
- 30
- </floater.string>
- <floater.string name="server_single_process_max_time_ms">
- 20
- </floater.string>
- <floater.string name="server_frame_time_critical_msg">
- Simulator framerate er under [SERVER_FRAME_RATE_CRITICAL]
- </floater.string>
- <floater.string name="server_frame_time_warning_msg">
- Simulator framerate er mellem [SERVER_FRAME_RATE_CRITICAL] og [SERVER_FRAME_RATE_WARNING]
- </floater.string>
- <floater.string name="server_frame_time_normal_msg">
- Normal
- </floater.string>
- <floater.string name="server_physics_cause_msg">
- Mulig årsag: For mange fysiske objekter
- </floater.string>
- <floater.string name="server_scripts_cause_msg">
- Mulig årsag: For mange objekter med script
- </floater.string>
- <floater.string name="server_net_cause_msg">
- Mulig årsag: For meget netværks trafik
- </floater.string>
- <floater.string name="server_agent_cause_msg">
- Mulig årsag: For mange avatarer i bevægelse i regionen
- </floater.string>
- <floater.string name="server_images_cause_msg">
- Mulig årsag: For mange billed udregninger
- </floater.string>
- <floater.string name="server_generic_cause_msg">
- Mulig årsag: Simulator belastning for stor
- </floater.string>
- <floater.string name="smaller_label">
- &gt;&gt;
- </floater.string>
- <floater.string name="bigger_label">
- &lt;&lt;
- </floater.string>
- <button label="" label_selected="" name="client_lagmeter" tool_tip="Status for klient lag"/>
- <text name="client">
- Klient
- </text>
- <text name="client_text">
- Normal
- </text>
- <button label="" label_selected="" name="network_lagmeter" tool_tip="Network lag status"/>
- <text name="network">
- Netværk
- </text>
- <text name="network_text">
- Normal
- </text>
- <button label="" label_selected="" name="server_lagmeter" tool_tip="Status for server lag"/>
- <text name="server">
- Server
- </text>
- <text name="server_text">
- Normal
- </text>
- <button label="&gt;&gt;" name="minimize" tool_tip="Ændre størrelse"/>
-</floater>
diff --git a/indra/newview/skins/default/xui/da/sidepanel_inventory.xml b/indra/newview/skins/default/xui/da/sidepanel_inventory.xml
index b3293b981e..b4b494cafa 100755
--- a/indra/newview/skins/default/xui/da/sidepanel_inventory.xml
+++ b/indra/newview/skins/default/xui/da/sidepanel_inventory.xml
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<panel label="Ting" name="objects panel">
- <panel label="" name="sidepanel__inventory_panel">
+ <panel label="" name="sidepanel_inventory_panel">
<panel name="button_panel">
<layout_stack name="button_panel_ls">
<layout_panel name="info_btn_lp">
diff --git a/indra/newview/skins/default/xui/de/floater_lagmeter.xml b/indra/newview/skins/default/xui/de/floater_lagmeter.xml
deleted file mode 100755
index 45ff37c147..0000000000
--- a/indra/newview/skins/default/xui/de/floater_lagmeter.xml
+++ /dev/null
@@ -1,151 +0,0 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<floater name="floater_lagmeter" title="LAG METER">
- <floater.string name="max_title_msg">
- Lag-Anzeige
- </floater.string>
- <floater.string name="max_width_px">
- 350
- </floater.string>
- <floater.string name="min_title_msg">
- Lag
- </floater.string>
- <floater.string name="min_width_px">
- 90
- </floater.string>
- <floater.string name="client_text_msg">
- Client
- </floater.string>
- <floater.string name="client_frame_rate_critical_fps">
- 10
- </floater.string>
- <floater.string name="client_frame_rate_warning_fps">
- 15
- </floater.string>
- <floater.string name="client_frame_time_window_bg_msg">
- Normal, Fenster im Hintergrund
- </floater.string>
- <floater.string name="client_frame_time_critical_msg">
- Client-Frame-Rate unter [CLIENT_FRAME_RATE_CRITICAL]
- </floater.string>
- <floater.string name="client_frame_time_warning_msg">
- Client-Frame-Rate zwischen [CLIENT_FRAME_RATE_CRITICAL] und [CLIENT_FRAME_RATE_WARNING]
- </floater.string>
- <floater.string name="client_frame_time_normal_msg">
- Normal
- </floater.string>
- <floater.string name="client_draw_distance_cause_msg">
- Mögliche Ursache: Sichtweite zu groß
- </floater.string>
- <floater.string name="client_texture_loading_cause_msg">
- Mögliche Ursache: Bilder werden geladen
- </floater.string>
- <floater.string name="client_texture_memory_cause_msg">
- Mögliche Ursache: Zu viele Bilder im Speicher
- </floater.string>
- <floater.string name="client_complex_objects_cause_msg">
- Mögliche Ursache: Zu viele komplexe Objekte in der Szene
- </floater.string>
- <floater.string name="network_text_msg">
- Netzwerk
- </floater.string>
- <floater.string name="network_packet_loss_critical_pct">
- 10
- </floater.string>
- <floater.string name="network_packet_loss_warning_pct">
- 5
- </floater.string>
- <floater.string name="network_packet_loss_critical_msg">
- Paketverlust der Verbindung übersteigt [NETWORK_PACKET_LOSS_CRITICAL]%
- </floater.string>
- <floater.string name="network_packet_loss_warning_msg">
- Paketverlust der Verbindung liegt bei [NETWORK_PACKET_LOSS_WARNING]%-[NETWORK_PACKET_LOSS_CRITICAL]%
- </floater.string>
- <floater.string name="network_performance_normal_msg">
- Normal
- </floater.string>
- <floater.string name="network_ping_critical_ms">
- 600
- </floater.string>
- <floater.string name="network_ping_warning_ms">
- 300
- </floater.string>
- <floater.string name="network_ping_critical_msg">
- Ping-Zeit der Verbindung übersteigt [NETWORK_PING_CRITICAL] ms
- </floater.string>
- <floater.string name="network_ping_warning_msg">
- Ping-Zeit der Verbindung liegt bei [NETWORK_PING_WARNING]-[NETWORK_PING_CRITICAL] ms
- </floater.string>
- <floater.string name="network_packet_loss_cause_msg">
- Möglicherweise schlechte Verbindung oder zu hoher Wert für „Bandbreite“.
- </floater.string>
- <floater.string name="network_ping_cause_msg">
- Möglicherweise schlechte Verbindung oder File-Sharing-Anwendung.
- </floater.string>
- <floater.string name="server_text_msg">
- Server
- </floater.string>
- <floater.string name="server_frame_rate_critical_fps">
- 20
- </floater.string>
- <floater.string name="server_frame_rate_warning_fps">
- 30
- </floater.string>
- <floater.string name="server_single_process_max_time_ms">
- 20
- </floater.string>
- <floater.string name="server_frame_time_critical_msg">
- Simulator-Frame-Rate liegt unter [SERVER_FRAME_RATE_CRITICAL]
- </floater.string>
- <floater.string name="server_frame_time_warning_msg">
- Simulator-Frame-Rate liegt zwischen [SERVER_FRAME_RATE_CRITICAL] und [SERVER_FRAME_RATE_WARNING]
- </floater.string>
- <floater.string name="server_frame_time_normal_msg">
- Normal
- </floater.string>
- <floater.string name="server_physics_cause_msg">
- Mögliche Ursache: Zu viele physische Objekte
- </floater.string>
- <floater.string name="server_scripts_cause_msg">
- Mögliche Ursache: Zu viele geskriptete Objekte
- </floater.string>
- <floater.string name="server_net_cause_msg">
- Mögliche Ursache: Zu viel Netzwerktraffic
- </floater.string>
- <floater.string name="server_agent_cause_msg">
- Mögliche Ursache: Zu viele Personen in Bewegung in der Region
- </floater.string>
- <floater.string name="server_images_cause_msg">
- Mögliche Ursache: Zu viele Bildberechnungen
- </floater.string>
- <floater.string name="server_generic_cause_msg">
- Mögliche Ursache: Zu hohe Simulator-Last
- </floater.string>
- <floater.string name="smaller_label">
- &gt;&gt;
- </floater.string>
- <floater.string name="bigger_label">
- &lt;&lt;
- </floater.string>
- <button name="client_lagmeter" tool_tip="Client-Lag-Status"/>
- <text name="client">
- Client
- </text>
- <text name="client_text">
- Normal
- </text>
- <button name="network_lagmeter" tool_tip="Netzwerk-Lag-Status"/>
- <text name="network">
- Netzwerk
- </text>
- <text name="network_text">
- Normal
- </text>
- <button name="server_lagmeter" tool_tip="Server-Lag-Status"/>
- <text name="server">
- Server
- </text>
- <text name="server_text">
- Normal
- </text>
- <button label="&gt;&gt; " name="minimize" tool_tip="Fenstergröße ändern"/>
-</floater>
diff --git a/indra/newview/skins/default/xui/de/sidepanel_inventory.xml b/indra/newview/skins/default/xui/de/sidepanel_inventory.xml
index 18aad64f96..2585c5dc90 100755
--- a/indra/newview/skins/default/xui/de/sidepanel_inventory.xml
+++ b/indra/newview/skins/default/xui/de/sidepanel_inventory.xml
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<panel label="Sonstiges" name="objects panel">
- <panel label="" name="sidepanel__inventory_panel">
+ <panel label="" name="sidepanel_inventory_panel">
<layout_stack name="inventory_layout_stack">
<layout_panel name="inbox_layout_panel">
<panel label="" name="marketplace_inbox">
diff --git a/indra/newview/skins/default/xui/en/floater_conversation_preview.xml b/indra/newview/skins/default/xui/en/floater_conversation_preview.xml
index 764b9d8385..99ad59a7a3 100755
--- a/indra/newview/skins/default/xui/en/floater_conversation_preview.xml
+++ b/indra/newview/skins/default/xui/en/floater_conversation_preview.xml
@@ -2,7 +2,6 @@
<floater
legacy_header_height="18"
can_resize="true"
- default_tab_group="1"
help_topic="conversation_preview"
height="391"
layout="topleft"
diff --git a/indra/newview/skins/default/xui/en/floater_fast_timers.xml b/indra/newview/skins/default/xui/en/floater_fast_timers.xml
index 77adb5524e..671f116df3 100755
--- a/indra/newview/skins/default/xui/en/floater_fast_timers.xml
+++ b/indra/newview/skins/default/xui/en/floater_fast_timers.xml
@@ -16,6 +16,27 @@
width="700">
<string name="pause" >Pause</string>
<string name="run">Run</string>
+ <combo_box name="time_scale_combo"
+ follows="left|top"
+ left="10"
+ top="5"
+ width="150"
+ height="20">
+ <item label="2x Average"/>
+ <item label="Max"/>
+ <item label="Recent Max"/>
+ <item label="100ms"/>
+ </combo_box>
+ <combo_box name="metric_combo"
+ follows="left|top"
+ left_pad="10"
+ top="5"
+ width="150"
+ height="20">
+ <item label="Time"/>
+ <item label="Number of Calls"/>
+ <item label="Hz"/>
+ </combo_box>
<button follows="top|right"
name="pause_btn"
left="-200"
@@ -24,4 +45,52 @@
height="40"
label="Pause"
font="SansSerifHuge"/>
+ <layout_stack name="legend_stack"
+ orientation="horizontal"
+ left="0"
+ top="50"
+ right="695"
+ bottom="500"
+ follows="all">
+ <layout_panel name="legend_panel"
+ auto_resize="false"
+ user_resize="true"
+ width="220"
+ height="450"
+ min_width="100">
+ <panel top="0"
+ left="0"
+ width="220"
+ height="440"
+ name="legend"
+ follows="all"/>
+ </layout_panel>
+ <layout_panel name="timers_panel"
+ auto_resize="true"
+ user_resize="true"
+ height="450"
+ width="475"
+ min_width="100">
+ <layout_stack name="timer_bars_stack"
+ orientation="vertical"
+ left="0"
+ top="0"
+ width="475"
+ height="445"
+ follows="all">
+ <layout_panel name="bars_panel"
+ auto_resize="true"
+ user_resize="true"
+ top="0"
+ width="475"
+ height="210"/>
+ <layout_panel name="lines_panel"
+ auto_resize="false"
+ user_resize="true"
+ width="475"
+ min_height="50"
+ height="240"/>
+ </layout_stack>
+ </layout_panel>
+ </layout_stack>
</floater>
diff --git a/indra/newview/skins/default/xui/en/floater_im_session.xml b/indra/newview/skins/default/xui/en/floater_im_session.xml
index 7076de55e3..dad81aca4f 100755
--- a/indra/newview/skins/default/xui/en/floater_im_session.xml
+++ b/indra/newview/skins/default/xui/en/floater_im_session.xml
@@ -1,7 +1,6 @@
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<floater
background_visible="true"
- default_tab_group="1"
height="355"
help_topic="floater_im_box"
layout="topleft"
@@ -213,7 +212,6 @@
min_width="230">
<layout_stack
animate="true"
- default_tab_group="2"
follows="all"
orientation="vertical"
name="translate_and_chat_stack"
diff --git a/indra/newview/skins/default/xui/en/floater_joystick.xml b/indra/newview/skins/default/xui/en/floater_joystick.xml
index 59f6a9434c..259acccb68 100755
--- a/indra/newview/skins/default/xui/en/floater_joystick.xml
+++ b/indra/newview/skins/default/xui/en/floater_joystick.xml
@@ -197,18 +197,18 @@
name="JoystickFlycamEnabled"
width="60" />
<stat_view
- height="250"
+ height="270"
label="Joystick Monitor"
layout="topleft"
left="359"
name="axis_view"
show_label="true"
- top="142"
+ top="135"
width="200">
<stat_bar
bar_max="2"
bar_min="-2"
- height="0"
+ show_bar="true"
label="Axis 0"
label_spacing="1"
layout="topleft"
@@ -220,6 +220,7 @@
<stat_bar
bar_max="2"
bar_min="-2"
+ show_bar="true"
label="Axis 1"
label_spacing="1"
layout="topleft"
@@ -228,6 +229,7 @@
<stat_bar
bar_max="2"
bar_min="-2"
+ show_bar="true"
label="Axis 2"
label_spacing="1"
layout="topleft"
@@ -236,6 +238,7 @@
<stat_bar
bar_max="2"
bar_min="-2"
+ show_bar="true"
label="Axis 3"
label_spacing="1"
layout="topleft"
@@ -244,6 +247,7 @@
<stat_bar
bar_max="2"
bar_min="-2"
+ show_bar="true"
label="Axis 4"
label_spacing="1"
layout="topleft"
@@ -253,6 +257,7 @@
bar_max="2"
bar_min="-2"
label="Axis 5"
+ show_bar="true"
label_spacing="1"
layout="topleft"
name="axis5"
diff --git a/indra/newview/skins/default/xui/en/floater_lagmeter.xml b/indra/newview/skins/default/xui/en/floater_lagmeter.xml
deleted file mode 100755
index b24c745bdd..0000000000
--- a/indra/newview/skins/default/xui/en/floater_lagmeter.xml
+++ /dev/null
@@ -1,336 +0,0 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
-<floater
- legacy_header_height="18"
- height="170"
- layout="topleft"
- name="floater_lagmeter"
- help_topic="floater_lagmeter"
- save_rect="true"
- title="LAG METER"
- width="350">
- <floater.string
- name="max_title_msg">
- Lag Meter
- </floater.string>
- <floater.string
- name="max_width_px">
- 360
- </floater.string>
- <floater.string
- name="min_title_msg">
- Lag
- </floater.string>
- <floater.string
- name="min_width_px">
- 90
- </floater.string>
- <floater.string
- name="client_text_msg">
- Client
- </floater.string>
- <floater.string
- name="client_frame_rate_critical_fps">
- 10
- </floater.string>
- <floater.string
- name="client_frame_rate_warning_fps">
- 15
- </floater.string>
- <floater.string
- name="client_frame_time_window_bg_msg">
- Normal, window in background
- </floater.string>
- <floater.string
- name="client_frame_time_critical_msg">
- Client frame rate below [CLIENT_FRAME_RATE_CRITICAL]
- </floater.string>
- <floater.string
- name="client_frame_time_warning_msg">
- Client frame rate between [CLIENT_FRAME_RATE_CRITICAL] and [CLIENT_FRAME_RATE_WARNING]
- </floater.string>
- <floater.string
- name="client_frame_time_normal_msg">
- Normal
- </floater.string>
- <floater.string
- name="client_draw_distance_cause_msg">
- Possible cause: Draw distance set too high
- </floater.string>
- <floater.string
- name="client_texture_loading_cause_msg">
- Possible cause: Images loading
- </floater.string>
- <floater.string
- name="client_texture_memory_cause_msg">
- Possible cause: Too many images in memory
- </floater.string>
- <floater.string
- name="client_complex_objects_cause_msg">
- Possible cause: Too many complex objects in scene
- </floater.string>
- <floater.string
- name="network_text_msg">
- Network
- </floater.string>
- <floater.string
- name="network_packet_loss_critical_pct">
- 10
- </floater.string>
- <floater.string
- name="network_packet_loss_warning_pct">
- 5
- </floater.string>
- <floater.string
- name="network_packet_loss_critical_msg">
- Connection is dropping over [NETWORK_PACKET_LOSS_CRITICAL]% of packets
- </floater.string>
- <floater.string
- name="network_packet_loss_warning_msg">
- Connection is dropping [NETWORK_PACKET_LOSS_WARNING]%-[NETWORK_PACKET_LOSS_CRITICAL]% of packets
- </floater.string>
- <floater.string
- name="network_performance_normal_msg">
- Normal
- </floater.string>
- <floater.string
- name="network_ping_critical_ms">
- 600
- </floater.string>
- <floater.string
- name="network_ping_warning_ms">
- 300
- </floater.string>
- <floater.string
- name="network_ping_critical_msg">
- Connection ping time is over [NETWORK_PING_CRITICAL] ms
- </floater.string>
- <floater.string
- name="network_ping_warning_msg">
- Connection ping time is [NETWORK_PING_WARNING]-[NETWORK_PING_CRITICAL] ms
- </floater.string>
- <floater.string
- name="network_packet_loss_cause_msg">
- Possible bad connection or &apos;Bandwidth&apos; pref too high.
- </floater.string>
- <floater.string
- name="network_ping_cause_msg">
- Possible bad connection or file-sharing app.
- </floater.string>
- <floater.string
- name="server_text_msg">
- Server
- </floater.string>
- <floater.string
- name="server_frame_rate_critical_fps">
- 20
- </floater.string>
- <floater.string
- name="server_frame_rate_warning_fps">
- 30
- </floater.string>
- <floater.string
- name="server_single_process_max_time_ms">
- 20
- </floater.string>
- <floater.string
- name="server_frame_time_critical_msg">
- Simulator framerate below [SERVER_FRAME_RATE_CRITICAL]
- </floater.string>
- <floater.string
- name="server_frame_time_warning_msg">
- Simulator framerate between [SERVER_FRAME_RATE_CRITICAL] and [SERVER_FRAME_RATE_WARNING]
- </floater.string>
- <floater.string
- name="server_frame_time_normal_msg">
- Normal
- </floater.string>
- <floater.string
- name="server_physics_cause_msg">
- Possible Cause: Too many physical objects
- </floater.string>
- <floater.string
- name="server_scripts_cause_msg">
- Possible Cause: Too many scripted objects
- </floater.string>
- <floater.string
- name="server_net_cause_msg">
- Possible Cause: Too much network traffic
- </floater.string>
- <floater.string
- name="server_agent_cause_msg">
- Possible Cause: Too many moving people in region
- </floater.string>
- <floater.string
- name="server_images_cause_msg">
- Possible Cause: Too many image calculations
- </floater.string>
- <floater.string
- name="server_generic_cause_msg">
- Possible Cause: Simulator load too heavy
- </floater.string>
- <floater.string
- name="smaller_label">
- &gt;&gt;
- </floater.string>
- <floater.string
- name="bigger_label">
- &lt;&lt;
- </floater.string>
- <button
- follows="top|left"
- height="16"
- image_selected="lag_status_good.tga"
- image_unselected="lag_status_good.tga"
- layout="topleft"
- left="8"
- name="client_lagmeter"
- tab_stop="false"
- tool_tip="Client lag status"
- top="24"
- width="16" />
- <text
- type="string"
- length="1"
- follows="left|top"
- font="SansSerif"
- height="16"
- layout="topleft"
- left_pad="3"
- name="client"
- top_delta="0"
- width="128">
- Client
- </text>
- <text
- invisiblity_control="LagMeterShrunk"
- type="string"
- length="1"
- bottom="40"
- follows="left|top"
- font="SansSerif"
- height="16"
- layout="topleft"
- left="110"
- name="client_text"
- right="-10">
- Normal
- </text>
- <text
- invisiblity_control="LagMeterShrunk"
- bottom="56"
- follows="left|top"
- height="16"
- layout="topleft"
- left="40"
- name="client_lag_cause"
- right="-32" />
- <button
- follows="top|left"
- height="16"
- image_selected="lag_status_good.tga"
- image_unselected="lag_status_good.tga"
- layout="topleft"
- left="8"
- name="network_lagmeter"
- tab_stop="false"
- tool_tip="Network lag status"
- top="64"
- width="16" />
- <text
- type="string"
- length="1"
- follows="left|top"
- font="SansSerif"
- height="16"
- layout="topleft"
- left_pad="3"
- name="network"
- top_delta="0"
- width="128">
- Network
- </text>
- <text
- invisiblity_control="LagMeterShrunk"
- type="string"
- length="1"
- bottom="80"
- follows="left|top"
- font="SansSerif"
- height="16"
- layout="topleft"
- left="110"
- name="network_text"
- right="-10">
- Normal
- </text>
- <text
- invisiblity_control="LagMeterShrunk"
- bottom="96"
- follows="left|top"
- height="16"
- layout="topleft"
- left="40"
- name="network_lag_cause"
- right="-32" />
- <button
- follows="top|left"
- height="16"
- image_selected="lag_status_good.tga"
- image_unselected="lag_status_good.tga"
- layout="topleft"
- left="8"
- name="server_lagmeter"
- tab_stop="false"
- tool_tip="Server lag status"
- top="104"
- width="16" />
- <text
- type="string"
- length="1"
- follows="left|top"
- font="SansSerif"
- height="16"
- layout="topleft"
- left_pad="3"
- name="server"
- top_delta="0"
- width="60">
- Server
- </text>
- <text
- invisiblity_control="LagMeterShrunk"
- type="string"
- length="1"
- bottom="120"
- follows="left|top"
- font="SansSerif"
- height="16"
- layout="topleft"
- left="110"
- name="server_text"
- right="-10">
- Normal
- </text>
- <text
- invisiblity_control="LagMeterShrunk"
- bottom="136"
- follows="left|top"
- height="16"
- layout="topleft"
- left="40"
- name="server_lag_cause"
- right="-32" />
- <button
- follows="left|top"
- height="20"
- label="&gt;&gt;"
- layout="topleft"
- left="10"
- name="minimize"
- tool_tip="Toggle floater size"
- top_delta="24"
- width="40">
- <button.commit_callback
- function="LagMeter.ClickShrink" />
- </button>
-</floater>
diff --git a/indra/newview/skins/default/xui/en/floater_model_preview.xml b/indra/newview/skins/default/xui/en/floater_model_preview.xml
index 9fa416012c..a4acd1df78 100755
--- a/indra/newview/skins/default/xui/en/floater_model_preview.xml
+++ b/indra/newview/skins/default/xui/en/floater_model_preview.xml
@@ -212,7 +212,7 @@
follows="top|left"
height="20"
layout="topleft"
- left="222"
+ left="225"
name="lod_mode_high"
top_delta="0"
visible="false"
@@ -342,7 +342,7 @@
follows="top|left"
height="20"
layout="topleft"
- left="222"
+ left="225"
name="lod_mode_medium"
top_delta="0"
width="130">
@@ -470,7 +470,7 @@
follows="top|left"
height="20"
layout="topleft"
- left="222"
+ left="225"
name="lod_mode_low"
top_delta="0"
width="130">
@@ -598,7 +598,7 @@
follows="top|left"
height="20"
layout="topleft"
- left="222"
+ left="225"
name="lod_mode_lowest"
top_delta="0"
width="130">
diff --git a/indra/newview/skins/default/xui/en/floater_scene_load_stats.xml b/indra/newview/skins/default/xui/en/floater_scene_load_stats.xml
new file mode 100644
index 0000000000..71ff961c59
--- /dev/null
+++ b/indra/newview/skins/default/xui/en/floater_scene_load_stats.xml
@@ -0,0 +1,446 @@
+<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<floater legacy_header_height="18"
+ can_resize="true"
+ height="400"
+ layout="topleft"
+ name="Scene Load Statistics"
+ save_rect="true"
+ save_visibility="true"
+ title="SCENE LOAD STATISTICS"
+ width="260">
+ <button follows="top|left"
+ top="20"
+ bottom="60"
+ left="10"
+ width="100"
+ label="Pause"
+ name="playpause"/>
+ <scroll_container follows="top|left|bottom|right"
+ bottom="400"
+ layout="topleft"
+ left="0"
+ name="statistics_scroll"
+ reserve_scroll_corner="true"
+ top="60"
+ width="260">
+ <container_view follows="top|left|bottom|right"
+ height="378"
+ layout="topleft"
+ left="2"
+ name="statistics_view"
+ top="20"
+ width="245" >
+<!--Basic Section-->
+ <stat_view name="basic"
+ label="Basic"
+ show_label="true"
+ setting="OpenDebugStatBasic">
+ <stat_bar name="frame difference"
+ label="Frame Pixel Difference"
+ orientation="horizontal"
+ unit_label="%"
+ stat="FramePixelDifference"
+ bar_max="100"
+ tick_spacing="10"
+ unit_scale="100"
+ precision="0"/>
+ <stat_bar name="bandwidth"
+ label="UDP Data Received"
+ orientation="horizontal"
+ unit_label="kbps"
+ stat="activemessagedatareceived"
+ bar_max="5000"
+ tick_spacing="500"
+ precision="0"/>
+ <stat_bar name="packet_loss"
+ label="Packet Loss"
+ orientation="horizontal"
+ unit_label=" %"
+ stat="packetslostpercentstat"
+ bar_max="5"
+ tick_spacing="0.5"
+ precision="3"
+ show_bar="false"
+ show_mean="true"/>
+ </stat_view>
+<!--Advanced Section-->
+ <stat_view name="advanced"
+ label="Advanced"
+ show_label="true"
+ setting="OpenDebugStatAdvanced">
+ <stat_view name="render"
+ label="Render"
+ show_label="true"
+ setting="OpenDebugStatRender">
+ <stat_bar name="objs"
+ label="Total Objects"
+ orientation="horizontal"
+ unit_label=""
+ stat="numobjectsstat"
+ bar_max="50000"
+ tick_spacing="5000"
+ precision="0"
+ show_bar="false"/>
+ <stat_bar name="newobjs"
+ label="New Objects"
+ orientation="horizontal"
+ unit_label="/sec"
+ stat="numnewobjectsstat"
+ bar_max="2000"
+ tick_spacing="200"
+ show_bar="false"/>
+ <stat_bar name="object_cache_hits"
+ label="Object Cache Hit Rate"
+ orientation="horizontal"
+ stat="object_cache_hits"
+ bar_max="100"
+ unit_label="%"
+ tick_spacing="20"
+ show_history="true"
+ show_bar="false"/>
+ </stat_view>
+<!--Texture Stats-->
+ <stat_view name="texture"
+ label="Texture"
+ show_label="true">
+ <stat_bar name="texture_cache_hits"
+ label="Cache Hit Rate"
+ orientation="horizontal"
+ stat="texture_cache_hits"
+ bar_max="100.f"
+ unit_label="%"
+ tick_spacing="20"
+ show_history="true"
+ show_bar="false"/>
+ <stat_bar name="texture_cache_read_latency"
+ label="Cache Read Latency"
+ orientation="horizontal"
+ unit_label="msec"
+ stat="texture_cache_read_latency"
+ bar_max="1000.f"
+ tick_spacing="100"
+ show_history="true"
+ show_bar="false"/>
+ <stat_bar name="numimagesstat"
+ label="Count"
+ orientation="horizontal"
+ stat="numimagesstat"
+ bar_max="8000.f"
+ tick_spacing="2000.f"
+ show_bar="false"/>
+ <stat_bar name="numrawimagesstat"
+ label="Raw Count"
+ orientation="horizontal"
+ stat="numrawimagesstat"
+ bar_max="8000.f"
+ tick_spacing="2000.f"
+ show_bar="false"/>
+ </stat_view>
+<!--Network Stats-->
+ <stat_view name="network"
+ label="Network"
+ show_label="true"
+ setting="OpenDebugStatNet">
+ <stat_bar name="packetsinstat"
+ label="Packets In"
+ orientation="horizontal"
+ stat="packetsinstat"
+ unit_label="/sec"
+ bar_max="1024.f"
+ tick_spacing="128.f"
+ precision="1"
+ show_bar="false"/>
+ <stat_bar name="packetsoutstat"
+ label="Packets Out"
+ orientation="horizontal"
+ stat="packetsoutstat"
+ unit_label="/sec"
+ bar_max="1024.f"
+ tick_spacing="128.f"
+ precision="1"
+ show_bar="false"/>
+ <stat_bar name="objectdatareceived"
+ label="Objects"
+ orientation="horizontal"
+ stat="objectdatareceived"
+ unit_label="kbps"
+ bar_max="1024.f"
+ tick_spacing="128.f"
+ precision="1"
+ show_bar="false"/>
+ <stat_bar name="texturedatareceived"
+ label="Texture"
+ orientation="horizontal"
+ stat="texturedatareceived"
+ unit_label="kbps"
+ bar_max="1024.f"
+ tick_spacing="128.f"
+ precision="1"
+ show_bar="false"/>
+ <stat_bar name="assetudpdatareceived"
+ label="Asset"
+ orientation="horizontal"
+ stat="assetudpdatareceived"
+ unit_label="kbps"
+ bar_max="1024.f"
+ tick_spacing="128.f"
+ precision="1"
+ show_bar="false"/>
+ <stat_bar name="layersdatareceived"
+ label="Layers"
+ orientation="horizontal"
+ stat="layersdatareceived"
+ unit_label="kbps"
+ bar_max="1024.f"
+ tick_spacing="128.f"
+ precision="1"
+ show_bar="false"/>
+ <stat_bar name="messagedatain"
+ label="Actual In"
+ orientation="horizontal"
+ stat="messagedatain"
+ unit_label="kbps"
+ bar_max="1024.f"
+ tick_spacing="128.f"
+ precision="1"
+ show_bar="false"/>
+ <stat_bar name="messagedataout"
+ label="Actual Out"
+ orientation="horizontal"
+ stat="messagedataout"
+ unit_label="kbps"
+ bar_max="1024.f"
+ tick_spacing="128.f"
+ precision="1"
+ show_bar="false"/>
+ <stat_bar name="vfspendingoperations"
+ label="VFS Pending Operations"
+ orientation="horizontal"
+ stat="vfspendingoperations"
+ unit_label=" Ops."
+ show_bar="false"/>
+ </stat_view>
+ </stat_view>
+<!--Sim Stats-->
+ <stat_view name="sim"
+ label="Simulator"
+ show_label="true"
+ setting="OpenDebugStatSim">
+ <stat_bar name="simobjects"
+ label="Objects"
+ orientation="horizontal"
+ stat="simobjects"
+ precision="0"
+ bar_max="30000.f"
+ tick_spacing="5000.f"
+ show_bar="false"
+ show_mean="false"/>
+ <stat_bar name="simactiveobjects"
+ label="Active Objects"
+ orientation="horizontal"
+ stat="simactiveobjects"
+ precision="0"
+ bar_max="5000.f"
+ tick_spacing="750.f"
+ show_bar="false"
+ show_mean="false"/>
+ <stat_bar name="simactivescripts"
+ label="Active Scripts"
+ orientation="horizontal"
+ stat="simactivescripts"
+ precision="0"
+ bar_max="15000.f"
+ tick_spacing="1875.f"
+ show_bar="false"
+ show_mean="false"/>
+ <stat_bar name="siminpps"
+ label="Packets In"
+ orientation="horizontal"
+ stat="siminpps"
+ unit_label="pps"
+ precision="0"
+ bar_max="2000.f"
+ tick_spacing="250.f"
+ show_bar="false"
+ show_mean="false"/>
+ <stat_bar name="simoutpps"
+ label="Packets Out"
+ orientation="horizontal"
+ stat="simoutpps"
+ unit_label="pps"
+ precision="0"
+ bar_max="2000.f"
+ tick_spacing="250.f"
+ show_bar="false"
+ show_mean="false"/>
+ <stat_bar name="simpendingdownloads"
+ label="Pending Downloads"
+ orientation="horizontal"
+ stat="simpendingdownloads"
+ precision="0"
+ bar_max="800.f"
+ tick_spacing="100.f"
+ show_bar="false"
+ show_mean="false"/>
+ <stat_bar name="simpendinguploads"
+ label="Pending Uploads"
+ orientation="horizontal"
+ stat="simpendinguploads"
+ precision="0"
+ bar_max="100.f"
+ tick_spacing="25.f"
+ show_bar="false"
+ show_mean="false"/>
+ <stat_bar name="simtotalunackedbytes"
+ label="Total Unacked Bytes"
+ orientation="horizontal"
+ stat="simtotalunackedbytes"
+ unit_label="kb"
+ precision="1"
+ bar_max="100000.f"
+ tick_spacing="25000.f"
+ show_bar="false"
+ show_mean="false"/>
+ <stat_view name="simperf"
+ label="Time (ms)"
+ show_label="true">
+ <stat_bar name="simframemsec"
+ label="Total Frame Time"
+ orientation="horizontal"
+ stat="simframemsec"
+ unit_label="ms"
+ precision="3"
+ bar_max="40.f"
+ tick_spacing="10.f"
+ show_bar="false"
+ show_mean="false"/>
+ <stat_bar name="simnetmsec"
+ label="Net Time"
+ orientation="horizontal"
+ stat="simnetmsec"
+ unit_label="ms"
+ precision="3"
+ bar_max="40.f"
+ tick_spacing="10.f"
+ show_bar="false"
+ show_mean="false"/>
+ <stat_bar name="simsimphysicsmsec"
+ label="Physics Time"
+ orientation="horizontal"
+ stat="simsimphysicsmsec"
+ unit_label="ms"
+ precision="3"
+ bar_max="40.f"
+ tick_spacing="10.f"
+ show_bar="false"
+ show_mean="false"/>
+ <stat_bar name="simsimothermsec"
+ label="Simulation Time"
+ orientation="horizontal"
+ stat="simsimothermsec"
+ unit_label="ms"
+ precision="3"
+ bar_max="40.f"
+ tick_spacing="10.f"
+ show_bar="false"
+ show_mean="false"/>
+ <stat_bar name="simagentmsec"
+ label="Agent Time"
+ orientation="horizontal"
+ stat="simagentmsec"
+ unit_label="ms"
+ precision="3"
+ bar_max="40.f"
+ tick_spacing="10.f"
+ show_bar="false"
+ show_mean="false"/>
+ <stat_bar name="simimagesmsec"
+ label="Images Time"
+ orientation="horizontal"
+ stat="simimagesmsec"
+ unit_label="ms"
+ precision="3"
+ bar_max="40.f"
+ tick_spacing="10.f"
+ show_bar="false"
+ show_mean="false"/>
+ <stat_bar name="simscriptmsec"
+ label="Script Time"
+ orientation="horizontal"
+ stat="simscriptmsec"
+ unit_label="ms"
+ precision="3"
+ bar_max="40.f"
+ tick_spacing="10.f"
+ show_bar="false"
+ show_mean="false"/>
+ <stat_bar name="simsparemsec"
+ label="Spare Time"
+ orientation="horizontal"
+ stat="simsparemsec"
+ unit_label="ms"
+ precision="3"
+ bar_max="40.f"
+ tick_spacing="10.f"
+ show_bar="false"
+ show_mean="false"/>
+<!--2nd level time blocks under 'Details' second-->
+ <stat_view name="timedetails"
+ label="Time Details (ms)"
+ show_label="true">
+ <stat_bar name="simsimphysicsstepmsec"
+ label=" Physics Step"
+ orientation="horizontal"
+ stat="simsimphysicsstepmsec"
+ unit_label="ms"
+ precision="3"
+ bar_max="40.f"
+ tick_spacing="10.f"
+ show_bar="false"
+ show_mean="false"/>
+ <stat_bar name="simsimphysicsshapeupdatemsec"
+ label=" Update Phys Shapes"
+ orientation="horizontal"
+ stat="simsimphysicsshapeupdatemsec"
+ unit_label="ms"
+ precision="3"
+ bar_max="40.f"
+ tick_spacing="10.f"
+ show_bar="false"
+ show_mean="false"/>
+ <stat_bar name="simsimphysicsothermsec"
+ label=" Physics Other"
+ orientation="horizontal"
+ stat="simsimphysicsothermsec"
+ unit_label="ms"
+ precision="3"
+ bar_max="40.f"
+ tick_spacing="10.f"
+ show_bar="false"
+ show_mean="false"/>
+ <stat_bar name="simsleepmsec"
+ label=" Sleep Time"
+ orientation="horizontal"
+ stat="simsleepmsec"
+ unit_label="ms"
+ precision="3"
+ bar_max="40.f"
+ tick_spacing="10.f"
+ show_bar="false"
+ show_mean="false"/>
+ <stat_bar name="simpumpiomsec"
+ label=" Pump IO"
+ orientation="horizontal"
+ stat="simpumpiomsec"
+ unit_label="ms"
+ precision="3"
+ bar_max="40.f"
+ tick_spacing="10.f"
+ show_bar="false"
+ show_mean="false"/>
+ </stat_view>
+ </stat_view>
+ </stat_view>
+ </container_view>
+ </scroll_container>
+</floater>
diff --git a/indra/newview/skins/default/xui/en/floater_stats.xml b/indra/newview/skins/default/xui/en/floater_stats.xml
index f9eb16d224..bee570d5d0 100755
--- a/indra/newview/skins/default/xui/en/floater_stats.xml
+++ b/indra/newview/skins/default/xui/en/floater_stats.xml
@@ -1,927 +1,339 @@
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
-<floater
- legacy_header_height="18"
- can_resize="true"
- height="400"
- layout="topleft"
- name="Statistics"
- help_topic="statistics"
- save_rect="true"
- save_visibility="true"
- title="STATISTICS"
- width="260">
- <scroll_container
- follows="top|left|bottom|right"
- height="380"
- layout="topleft"
- left="0"
- name="statistics_scroll"
- reserve_scroll_corner="true"
- top="20"
- width="260">
- <container_view
- follows="top|left|bottom|right"
- height="378"
- layout="topleft"
- left="2"
- name="statistics_view"
- top="20"
- width="245" >
- <!--Basic Section-->
- <stat_view
- name="basic"
- label="Basic"
- show_label="true"
- setting="OpenDebugStatBasic">
- <stat_bar
- name="fps"
- label="FPS"
- unit_label="fps"
- stat="fpsstat"
- bar_min="0"
- bar_max="60"
- tick_spacing="6"
- label_spacing="12"
- precision="1"
- show_bar="true"
- show_history="true">
- </stat_bar>
- <stat_bar
- name="bandwidth"
- label="Bandwidth"
- unit_label="kbps"
- stat="kbitstat"
- bar_min="0"
- bar_max="5000"
- tick_spacing="500"
- label_spacing="1000"
- precision="0"
- show_bar="true"
- show_history="false">
- </stat_bar>
- <stat_bar
- name="packet_loss"
- label="Packet Loss"
- unit_label=" %"
- stat="packetslostpercentstat"
- bar_min="0"
- bar_max="5"
- tick_spacing="0.5"
- label_spacing="1"
- precision="3"
- show_per_sec="false"
- show_bar="false"
- show_mean="true">
- </stat_bar>
- <stat_bar
- name="ping"
- label="Ping Sim"
- unit_label="msec"
- stat="simpingstat"
- bar_min="0"
- bar_max="5000"
- tick_spacing="500"
- label_spacing="1000"
- precision="0"
- show_bar="false"
- show_per_sec="false"
- show_mean="false">
- </stat_bar>
- </stat_view>
- <!--Advanced Section-->
- <stat_view
- name="advanced"
- label="Advanced"
- show_label="true"
- setting="OpenDebugStatAdvanced">
- <stat_view
- name="render"
- label="Render"
- show_label="true"
- setting="OpenDebugStatRender">
- <stat_bar
- name="ktrisframe"
- label="KTris Drawn per Frame"
- unit_label="/fr"
- stat="trianglesdrawnstat"
- bar_min="0"
- bar_max="10000"
- tick_spacing="1000"
- label_spacing="2000"
- precision="0"
- show_per_sec="false"
- show_bar="false">
- </stat_bar>
- <stat_bar
- name="ktrissec"
- label="KTris Drawn per Sec"
- unit_label="/sec"
- stat="trianglesdrawnstat"
- bar_min="0"
- bar_max="200000"
- tick_spacing="25000"
- label_spacing="50000"
- precision="0"
- show_bar="false">
- </stat_bar>
- <stat_bar
- name="objs"
- label="Total Objects"
- unit_label=""
- stat="numobjectsstat"
- bar_min="0"
- bar_max="50000"
- tick_spacing="5000"
- label_spacing="10000"
- precision="0"
- show_per_sec="false"
- show_bar="false">
- </stat_bar>
- <stat_bar
- name="newobjs"
- label="New Objects"
- unit_label="/sec"
- stat="numnewobjectsstat"
- bar_min="0"
- bar_max="2000"
- tick_spacing="200"
- label_spacing="400"
- show_per_sec="true"
- show_bar="false">
- </stat_bar>
- <stat_bar
- name="object_cache_hits"
- label="Object Cache Hit Rate"
- stat="object_cache_hits"
- bar_min="0"
- bar_max="100"
- unit_label="%"
- tick_spacing="20"
- label_spacing="20"
- show_history="true"
- show_per_sec="false"
- show_bar="false">
- </stat_bar>
- </stat_view>
- <!--Texture Stats-->
- <stat_view
- name="texture"
- label="Texture"
- show_label="true">
- <stat_bar
- name="texture_cache_hits"
- label="Cache Hit Rate"
- stat="texture_cache_hits"
- bar_min="0.f"
- bar_max="100.f"
- unit_label="%"
- tick_spacing="20"
- label_spacing="20"
- show_history="true"
- show_per_sec="false"
- show_bar="false">
- </stat_bar>
- <stat_bar
- name="texture_cache_read_latency"
- label="Cache Read Latency"
- unit_label="msec"
- stat="texture_cache_read_latency"
- bar_min="0.f"
- bar_max="1000.f"
- tick_spacing="100"
- label_spacing="200"
- show_history="true"
- show_per_sec="false"
- show_bar="false">
- </stat_bar>
- <stat_bar
- name="numimagesstat"
- label="Count"
- stat="numimagesstat"
- bar_min="0.f"
- bar_max="8000.f"
- tick_spacing="2000.f"
- label_spacing="4000.f"
- show_per_sec="false"
- show_bar="false">
- </stat_bar>
-
- <stat_bar
- name="numrawimagesstat"
- label="Raw Count"
- stat="numrawimagesstat"
- bar_min="0.f"
- bar_max="8000.f"
- tick_spacing="2000.f"
- label_spacing="4000.f"
- show_per_sec="false"
- show_bar="false">
- </stat_bar>
-
- <stat_bar
- name="gltexmemstat"
- label="GL Mem"
- stat="gltexmemstat"
- bar_min="0.f"
- bar_max="400.f"
- tick_spacing="100.f"
- label_spacing="200.f"
- precision="1"
- show_per_sec="false"
- show_bar="false">
- </stat_bar>
-
- <stat_bar
- name="formattedmemstat"
- label="Formatted Mem"
- stat="formattedmemstat"
- bar_min="0.f"
- bar_max="400.f"
- tick_spacing="100.f"
- label_spacing="200.f"
- precision="1"
- show_per_sec="false"
- show_bar="false">
- </stat_bar>
-
- <stat_bar
- name="rawmemstat"
- label="Raw Mem"
- stat="rawmemstat"
- bar_min="0.f"
- bar_max="400.f"
- tick_spacing="100.f"
- label_spacing="200.f"
- precision="1"
- show_per_sec="false"
- show_bar="false">
- </stat_bar>
-
- <stat_bar
- name="glboundmemstat"
- label="Bound Mem"
- stat="glboundmemstat"
- bar_min="0.f"
- bar_max="400.f"
- tick_spacing="100.f"
- label_spacing="200.f"
- precision="1"
- show_per_sec="false"
- show_bar="false">
- </stat_bar>
- </stat_view>
- <!--Network Stats-->
- <stat_view
- name="network"
- label="Network"
- show_label="true"
- setting="OpenDebugStatNet">
- <stat_bar
- name="packetsinstat"
- label="Packets In"
- stat="packetsinstat"
- unit_label="/sec"
- bar_min="0.f"
- bar_max="1024.f"
- tick_spacing="128.f"
- label_spacing="256.f"
- precision="1"
- show_bar="false">
- </stat_bar>
-
- <stat_bar
- name="packetsoutstat"
- label="Packets Out"
- stat="packetsoutstat"
- unit_label="/sec"
- bar_min="0.f"
- bar_max="1024.f"
- tick_spacing="128.f"
- label_spacing="256.f"
- precision="1"
- show_bar="false" >
- </stat_bar>
-
- <stat_bar
- name="objectkbitstat"
- label="Objects"
- stat="objectkbitstat"
- unit_label="kbps"
- bar_min="0.f"
- bar_max="1024.f"
- tick_spacing="128.f"
- label_spacing="256.f"
- precision="1"
- show_bar="false" >
- </stat_bar>
-
- <stat_bar
- name="texturekbitstat"
- label="Texture"
- stat="texturekbitstat"
- unit_label="kbps"
- bar_min="0.f"
- bar_max="1024.f"
- tick_spacing="128.f"
- label_spacing="256.f"
- precision="1"
- show_bar="false" >
- </stat_bar>
-
- <stat_bar
- name="assetkbitstat"
- label="Asset"
- stat="assetkbitstat"
- unit_label="kbps"
- bar_min="0.f"
- bar_max="1024.f"
- tick_spacing="128.f"
- label_spacing="256.f"
- precision="1"
- show_bar="false" >
- </stat_bar>
-
- <stat_bar
- name="layerskbitstat"
- label="Layers"
- stat="layerskbitstat"
- unit_label="kbps"
- bar_min="0.f"
- bar_max="1024.f"
- tick_spacing="128.f"
- label_spacing="256.f"
- precision="1"
- show_bar="false" >
- </stat_bar>
-
- <stat_bar
- name="actualinkbitstat"
- label="Actual In"
- stat="actualinkbitstat"
- unit_label="kbps"
- bar_min="0.f"
- bar_max="1024.f"
- tick_spacing="128.f"
- label_spacing="256.f"
- precision="1"
- show_bar="false"
- show_history="false" >
- </stat_bar>
-
- <stat_bar
- name="actualoutkbitstat"
- label="Actual Out"
- stat="actualoutkbitstat"
- unit_label="kbps"
- bar_min="0.f"
- bar_max="1024.f"
- tick_spacing="128.f"
- label_spacing="256.f"
- precision="1"
- show_bar="false"
- show_history="false">
- </stat_bar>
-
- <stat_bar
- name="vfspendingoperations"
- label="VFS Pending Operations"
- stat="vfspendingoperations"
- unit_label=" Ops."
- show_per_sec="false"
- show_bar="false" >
- </stat_bar>
- </stat_view>
- </stat_view>
- <!--Sim Stats-->
- <stat_view
- name="sim"
- label="Simulator"
- show_label="true"
- setting="OpenDebugStatSim">
- <stat_bar
- name="simtimedilation"
- label="Time Dilation"
- stat="simtimedilation"
- precision="3"
- bar_min="0.f"
- bar_max="1.f"
- tick_spacing="0.16666f"
- label_spacing="0.33333f"
- show_per_sec="false"
- show_bar="false"
- show_mean="false" >
- </stat_bar>
-
- <stat_bar
- name="simfps"
- label="Sim FPS"
- stat="simfps"
- precision="1"
- bar_min="0.f"
- bar_max="45.f"
- tick_spacing="7.5f"
- label_spacing="15.f"
- show_per_sec="false"
- show_bar="false"
- show_mean="false" >
- </stat_bar>
-
- <stat_bar
- name="simphysicsfps"
- label="Physics FPS"
- stat="simphysicsfps"
- precision="1"
- bar_min="0.f"
- bar_max="45.f"
- tick_spacing="7.5.f"
- label_spacing="15.f"
- show_per_sec="false"
- show_bar="false"
- show_mean="false" >
- </stat_bar>
-
- <stat_view
- name="physicsdetail"
- label="Physics Details"
- show_label="true">
- <stat_bar
- name="physicspinnedtasks"
- label="Pinned Objects"
- stat="physicspinnedtasks"
- precision="0"
- bar_min="0.f"
- bar_max="500.f"
- tick_spacing="50.f"
- label_spacing="100.f"
- show_per_sec="false"
- show_bar="false"
- show_mean="false" >
- </stat_bar>
-
- <stat_bar
- name="physicslodtasks"
- label="Low LOD Objects"
- stat="physicslodtasks"
- precision="0"
- bar_min="0.f"
- bar_max="500.f"
- tick_spacing="50.f"
- label_spacing="100.f"
- show_per_sec="false"
- show_bar="false"
- show_mean="false" >
- </stat_bar>
-
- <stat_bar
- name="physicsmemoryallocated"
- label="Memory Allocated"
- stat="physicsmemoryallocated"
- unit_label="MB"
- precision="1"
- bar_min="0.f"
- bar_max="1024.f"
- tick_spacing="128.f"
- label_spacing="256.f"
- show_per_sec="false"
- show_bar="false"
- show_mean="false" >
- </stat_bar>
- </stat_view>
-
- <stat_bar
- name="simagentups"
- label="Agent Updates/Sec"
- stat="simagentups"
- precision="1"
- bar_min="0.f"
- bar_max="100.f"
- tick_spacing="25.f"
- label_spacing="50.f"
- show_per_sec="false"
- show_bar="false"
- show_mean="false" >
- </stat_bar>
-
- <stat_bar
- name="simmainagents"
- label="Main Agents"
- stat="simmainagents"
- precision="0"
- bar_min="0.f"
- bar_max="80.f"
- tick_spacing="10.f"
- label_spacing="40.f"
- show_per_sec="false"
- show_bar="false"
- show_mean="false" >
- </stat_bar>
-
- <stat_bar
- name="simchildagents"
- label="Child Agents"
- stat="simchildagents"
- precision="0"
- bar_min="0.f"
- bar_max="40.f"
- tick_spacing="5.f"
- label_spacing="10.f"
- show_per_sec="false"
- show_bar="false"
- show_mean="false" >
- </stat_bar>
-
- <stat_bar
- name="simobjects"
- label="Objects"
- stat="simobjects"
- precision="0"
- bar_min="0.f"
- bar_max="30000.f"
- tick_spacing="5000.f"
- label_spacing="10000.f"
- show_per_sec="false"
- show_bar="false"
- show_mean="false" >
- </stat_bar>
-
- <stat_bar
- name="simactiveobjects"
- label="Active Objects"
- stat="simactiveobjects"
- precision="0"
- bar_min="0.f"
- bar_max="5000.f"
- tick_spacing="750.f"
- label_spacing="1250.f"
- show_per_sec="false"
- show_bar="false"
- show_mean="false" >
- </stat_bar>
-
- <stat_bar
- name="simactivescripts"
- label="Active Scripts"
- stat="simactivescripts"
- precision="0"
- bar_min="0.f"
- bar_max="15000.f"
- tick_spacing="1875.f"
- label_spacing="3750.f"
- show_per_sec="false"
- show_bar="false"
- show_mean="false" >
- </stat_bar>
- <stat_bar
- name="simpctscriptsrun"
- label="Scripts Run"
- unit_label=" %"
- stat="simpctscriptsrun"
- bar_min="0"
- bar_max="100"
- tick_spacing="10"
- label_spacing="20"
- precision="3"
- show_per_sec="false"
- show_bar="false"
- show_mean="true">
- </stat_bar>
-
- <stat_bar
- name="simscripteps"
- label="Script Events"
- stat="simscripteps"
- unit_label="eps"
- precision="0"
- bar_min="0.f"
- bar_max="5000.f"
- tick_spacing="750.f"
- label_spacing="1250.f"
- show_per_sec="false"
- show_bar="false"
- show_mean="false" >
- </stat_bar>
-
- <stat_view
- name="simpathfinding"
- label="Pathfinding"
- show_label="true">
- <stat_bar
- name="simsimaistepmsec"
- label=" AI Step Time"
- stat="simsimaistepmsec"
- unit_label="ms"
- precision="3"
- bar_min="0.f"
- bar_max="40.f"
- tick_spacing="10.f"
- label_spacing="20.f"
- show_per_sec="false"
- show_bar="false"
- show_mean="false" >
- </stat_bar>
- <stat_bar
- name="simsimskippedsilhouettesteps"
- label=" Skipped Silhouette Steps"
- stat="simsimskippedsilhouettesteps"
- unit_label="/sec"
- precision="0"
- bar_min="0"
- bar_max="45"
- tick_spacing="4"
- label_spacing="8"
- show_per_sec="false"
- show_bar="false">
- </stat_bar>
- <stat_bar
- name="simsimpctsteppedcharacters"
- label=" Characters Updated"
- unit_label=" %"
- stat="simsimpctsteppedcharacters"
- bar_min="0"
- bar_max="100"
- tick_spacing="10"
- label_spacing="20"
- precision="1"
- show_per_sec="false"
- show_bar="false"
- show_mean="true">
- </stat_bar>
+<floater legacy_header_height="18"
+ can_resize="true"
+ height="400"
+ layout="topleft"
+ name="Statistics"
+ help_topic="statistics"
+ save_rect="true"
+ save_visibility="true"
+ title="STATISTICS"
+ width="260">
+ <scroll_container follows="all"
+ height="380"
+ layout="topleft"
+ left="0"
+ name="statistics_scroll"
+ reserve_scroll_corner="true"
+ top="20"
+ width="260">
+ <container_view follows="all"
+ height="378"
+ layout="topleft"
+ left="2"
+ name="statistics_view"
+ top="20"
+ width="245" >
+ <stat_view name="basic"
+ label="Basic"
+ setting="OpenDebugStatBasic">
+ <stat_bar name="fps"
+ label="FPS"
+ unit_label="fps"
+ stat="FPS"
+ decimal_digits="1"
+ show_bar="true"
+ show_history="true"/>
+ <stat_bar name="bandwidth"
+ label="UDP Data Received"
+ stat="activemessagedatareceived"
+ show_bar="true"/>
+ <stat_bar name="packet_loss"
+ label="Packet Loss"
+ stat="packetslostpercentstat"/>
+ <stat_bar name="ping"
+ label="Ping Sim"
+ stat="simpingstat"/>
+ </stat_view>
+
+ <stat_view name="advanced"
+ label="Advanced"
+ setting="OpenDebugStatAdvanced">
+ <stat_view name="render"
+ label="Render"
+ setting="OpenDebugStatRender">
+ <stat_bar name="ktrisframe"
+ label="KTris per Frame"
+ unit_label="ktris/fr"
+ stat="trianglesdrawnperframestat"/>
+ <stat_bar name="ktrissec"
+ label="KTris per Sec"
+ stat="trianglesdrawnstat"/>
+ <stat_bar name="objs"
+ label="Total Objects"
+ stat="numobjectsstat"/>
+ <stat_bar name="objs"
+ label="Cached Objects"
+ stat="numactivecachedobjects"/>
+ <stat_bar name="newobjs"
+ label="New Objects"
+ stat="numnewobjectsstat"/>
+ <stat_bar name="object_cache_hits"
+ label="Object Cache Hit Rate"
+ stat="object_cache_hits"
+ show_history="true"/>
+ <stat_bar name="occlusion_queries"
+ label="Occlusion Queries Performed"
+ stat="occlusion_queries"/>
+ <stat_bar name="occluded"
+ label="Objects Occluded"
+ stat="occluded_objects"/>
+ <stat_bar name="unoccluded"
+ label="Object Unoccluded"
+ stat="unoccluded_objects"/>
+ </stat_view>
+ <stat_view name="texture"
+ label="Texture">
+ <stat_bar name="texture_cache_hits"
+ label="Cache Hit Rate"
+ stat="texture_cache_hits"
+ show_history="true"/>
+ <stat_bar name="texture_cache_read_latency"
+ label="Cache Read Latency"
+ stat="texture_cache_read_latency"
+ show_history="true"/>
+ <stat_bar name="numimagesstat"
+ label="Count"
+ stat="numimagesstat"/>
+ <stat_bar name="numrawimagesstat"
+ label="Raw Count"
+ stat="numrawimagesstat"/>
+ <stat_bar name="gltexmemstat"
+ label="GL Mem"
+ stat="gltexmemstat"/>
+ <stat_bar name="formattedmemstat"
+ label="Formatted Mem"
+ stat="formattedmemstat"/>
+ <stat_bar name="rawmemstat"
+ label="Raw Mem"
+ stat="rawmemstat"/>
+ <stat_bar name="glboundmemstat"
+ label="Bound Mem"
+ stat="glboundmemstat"/>
</stat_view>
-
- <stat_bar
- name="siminpps"
- label="Packets In"
- stat="siminpps"
- unit_label="pps"
- precision="0"
- bar_min="0.f"
- bar_max="2000.f"
- tick_spacing="250.f"
- label_spacing="1000.f"
- show_per_sec="false"
- show_bar="false"
- show_mean="false" >
- </stat_bar>
-
- <stat_bar
- name="simoutpps"
- label="Packets Out"
- stat="simoutpps"
- unit_label="pps"
- precision="0"
- bar_min="0.f"
- bar_max="2000.f"
- tick_spacing="250.f"
- label_spacing="1000.f"
- show_per_sec="false"
- show_bar="false"
- show_mean="false" >
- </stat_bar>
-
- <stat_bar
- name="simpendingdownloads"
- label="Pending Downloads"
- stat="simpendingdownloads"
- precision="0"
- bar_min="0.f"
- bar_max="800.f"
- tick_spacing="100.f"
- label_spacing="200.f"
- show_per_sec="false"
- show_bar="false"
- show_mean="false" >
- </stat_bar>
-
- <stat_bar
- name="simpendinguploads"
- label="Pending Uploads"
- stat="simpendinguploads"
- precision="0"
- bar_min="0.f"
- bar_max="100.f"
- tick_spacing="25.f"
- label_spacing="50.f"
- show_per_sec="false"
- show_bar="false"
- show_mean="false" >
- </stat_bar>
-
- <stat_bar
- name="simtotalunackedbytes"
- label="Total Unacked Bytes"
- stat="simtotalunackedbytes"
- unit_label="kb"
- precision="1"
- bar_min="0.f"
- bar_max="100000.f"
- tick_spacing="25000.f"
- label_spacing="50000.f"
- show_per_sec="false"
- show_bar="false"
- show_mean="false" >
- </stat_bar>
-
- <stat_view
- name="simperf"
- label="Time (ms)"
- show_label="true">
- <stat_bar
- name="simframemsec"
- label="Total Frame Time"
- stat="simframemsec"
- unit_label="ms"
- precision="3"
- bar_min="0.f"
- bar_max="40.f"
- tick_spacing="10.f"
- label_spacing="20.f"
- show_per_sec="false"
- show_bar="false"
- show_mean="false" >
- </stat_bar>
-
- <stat_bar
- name="simnetmsec"
- label="Net Time"
- stat="simnetmsec"
- unit_label="ms"
- precision="3"
- bar_min="0.f"
- bar_max="40.f"
- tick_spacing="10.f"
- label_spacing="20.f"
- show_per_sec="false"
- show_bar="false"
- show_mean="false" >
- </stat_bar>
-
- <stat_bar
- name="simsimphysicsmsec"
- label="Physics Time"
- stat="simsimphysicsmsec"
- unit_label="ms"
- precision="3"
- bar_min="0.f"
- bar_max="40.f"
- tick_spacing="10.f"
- label_spacing="20.f"
- show_per_sec="false"
- show_bar="false"
- show_mean="false" >
- </stat_bar>
-
- <stat_bar
- name="simsimothermsec"
- label="Simulation Time"
- stat="simsimothermsec"
- unit_label="ms"
- precision="3"
- bar_min="0.f"
- bar_max="40.f"
- tick_spacing="10.f"
- label_spacing="20.f"
- show_per_sec="false"
- show_bar="false"
- show_mean="false" >
- </stat_bar>
-
- <stat_bar
- name="simagentmsec"
- label="Agent Time"
- stat="simagentmsec"
- unit_label="ms"
- precision="3"
- bar_min="0.f"
- bar_max="40.f"
- tick_spacing="10.f"
- label_spacing="20.f"
- show_per_sec="false"
- show_bar="false"
- show_mean="false" >
- </stat_bar>
-
- <stat_bar
- name="simimagesmsec"
- label="Images Time"
- stat="simimagesmsec"
- unit_label="ms"
- precision="3"
- bar_min="0.f"
- bar_max="40.f"
- tick_spacing="10.f"
- label_spacing="20.f"
- show_per_sec="false"
- show_bar="false"
- show_mean="false" >
- </stat_bar>
-
- <stat_bar
- name="simscriptmsec"
- label="Script Time"
- stat="simscriptmsec"
- unit_label="ms"
- precision="3"
- bar_min="0.f"
- bar_max="40.f"
- tick_spacing="10.f"
- label_spacing="20.f"
- show_per_sec="false"
- show_bar="false"
- show_mean="false" >
- </stat_bar>
-
- <stat_bar
- name="simsparemsec"
- label="Spare Time"
- stat="simsparemsec"
- unit_label="ms"
- precision="3"
- bar_min="0.f"
- bar_max="40.f"
- tick_spacing="10.f"
- label_spacing="20.f"
- show_per_sec="false"
- show_bar="false"
- show_mean="false" >
- </stat_bar>
- <!--2nd level time blocks under 'Details' second-->
- <stat_view
- name="timedetails"
- label="Time Details (ms)"
- show_label="true">
- <stat_bar
- name="simsimphysicsstepmsec"
- label=" Physics Step"
- stat="simsimphysicsstepmsec"
- unit_label="ms"
- precision="3"
- bar_min="0.f"
- bar_max="40.f"
- tick_spacing="10.f"
- label_spacing="20.f"
- show_per_sec="false"
- show_bar="false"
- show_mean="false" >
- </stat_bar>
- <stat_bar
- name="simsimphysicsshapeupdatemsec"
- label=" Update Phys Shapes"
- stat="simsimphysicsshapeupdatemsec"
- unit_label="ms"
- precision="3"
- bar_min="0.f"
- bar_max="40.f"
- tick_spacing="10.f"
- label_spacing="20.f"
- show_per_sec="false"
- show_bar="false"
- show_mean="false" >
- </stat_bar>
- <stat_bar
- name="simsimphysicsothermsec"
- label=" Physics Other"
- stat="simsimphysicsothermsec"
- unit_label="ms"
- precision="3"
- bar_min="0.f"
- bar_max="40.f"
- tick_spacing="10.f"
- label_spacing="20.f"
- show_per_sec="false"
- show_bar="false"
- show_mean="false" >
- </stat_bar>
- <stat_bar
- name="simsleepmsec"
- label=" Sleep Time"
- stat="simsleepmsec"
- unit_label="ms"
- precision="3"
- bar_min="0.f"
- bar_max="40.f"
- tick_spacing="10.f"
- label_spacing="20.f"
- show_per_sec="false"
- show_bar="false"
- show_mean="false" >
- </stat_bar>
- <stat_bar
- name="simpumpiomsec"
- label=" Pump IO"
- stat="simpumpiomsec"
- unit_label="ms"
- precision="3"
- bar_min="0.f"
- bar_max="40.f"
- tick_spacing="10.f"
- label_spacing="20.f"
- show_per_sec="false"
- show_bar="false"
- show_mean="false" >
- </stat_bar>
- </stat_view>
- </stat_view>
- </stat_view>
- </container_view>
- </scroll_container>
+ <stat_view name="memory"
+ label="Memory Usage">
+ <stat_bar name="LLTrace"
+ label="LLTrace"
+ stat="LLTrace"/>
+ <stat_bar name="LLView"
+ label="UI"
+ stat="LLView"/>
+ <stat_bar name="LLFontFreetype"
+ label="Fonts"
+ stat="LLFontFreetype"/>
+ <stat_bar name="LLInventoryObject"
+ label="Inventory"
+ stat="LLInventoryObject"/>
+ <stat_bar name="LLViewerObject"
+ label="Viewer Objects"
+ stat="LLViewerObject"/>
+ <stat_bar name="LLViewerOctreeGroup"
+ label="Octree Group Data"
+ stat="LLViewerOctreeGroup"/>
+ <stat_bar name="LLViewerOctreeEntry"
+ label="Octree Data"
+ stat="LLViewerOctreeEntry"/>
+ <stat_bar name="LLVOCacheEntry"
+ label="Viewer Object Cache"
+ stat="LLVOCacheEntry"/>
+ <stat_bar name="LLDrawable"
+ label="Drawables"
+ stat="LLDrawable"/>
+ <stat_bar name="LLFace"
+ label="Face Data"
+ stat="LLFace"/>
+ <stat_bar name="LLDrawInfo"
+ label="Draw Info"
+ stat="LLDrawInfo"/>
+ <stat_bar name="LLTexture"
+ label="Texture Data"
+ stat="LLTexture"/>
+ <stat_bar name="LLImage"
+ label="Image Data"
+ stat="LLImage"/>
+ <stat_bar name="LLImageGL"
+ label="GL Image Data"
+ stat="LLImageGL"/>
+ <stat_bar name="LLVertexBuffer"
+ label="Vertex Buffers"
+ stat="LLVertexBuffer"/>
+ </stat_view>
+ <stat_view name="network"
+ label="Network"
+ setting="OpenDebugStatNet">
+ <stat_bar name="packetsinstat"
+ label="Packets In"
+ stat="Packets In"
+ decimal_digits="1"/>
+ <stat_bar name="packetsoutstat"
+ label="Packets Out"
+ stat="packetsoutstat"
+ decimal_digits="1"/>
+ <stat_bar name="objectdatareceived"
+ label="Objects"
+ stat="objectdatareceived"
+ decimal_digits="1"/>
+ <stat_bar name="texturedatareceived"
+ label="Texture"
+ stat="texturedatareceived"
+ decimal_digits="1"/>
+ <stat_bar name="assetudpdatareceived"
+ label="Asset"
+ stat="assetudpdatareceived"
+ decimal_digits="1"/>
+ <stat_bar name="layersdatareceived"
+ label="Layers"
+ stat="layersdatareceived"
+ decimal_digits="1"/>
+ <stat_bar name="messagedatain"
+ label="Actual In"
+ stat="messagedatain"
+ decimal_digits="1"/>
+ <stat_bar name="messagedataout"
+ label="Actual Out"
+ stat="messagedataout"
+ decimal_digits="1"
+ show_history="false"/>
+ <stat_bar name="vfspendingoperations"
+ label="VFS Pending Operations"
+ stat="vfspendingoperations"
+ unit_label="Ops."/>
+ </stat_view>
+ </stat_view>
+
+ <stat_view name="sim"
+ label="Simulator"
+ setting="OpenDebugStatSim">
+ <stat_bar name="simtimedilation"
+ label="Time Dilation"
+ stat="simtimedilation"/>
+ <stat_bar name="simfps"
+ label="Sim FPS"
+ stat="simfps"
+ decimal_digits="1"
+ bar_max="45" />
+ <stat_bar name="simphysicsfps"
+ label="Physics FPS"
+ stat="simphysicsfps"
+ decimal_digits="1"
+ bar_max="45" />
+ <stat_view name="physicsdetail"
+ label="Physics Details">
+ <stat_bar name="physicspinnedtasks"
+ label="Pinned Objects"
+ stat="physicspinnedtasks"/>
+ <stat_bar name="physicslodtasks"
+ label="Low LOD Objects"
+ stat="physicslodtasks"/>
+ <stat_bar name="physicsmemoryallocated"
+ label="Memory Allocated"
+ stat="physicsmemoryallocated"
+ decimal_digits="1"/>
+ </stat_view>
+ <stat_bar name="simagentups"
+ label="Agent Updates/Sec"
+ stat="simagentups"
+ decimal_digits="1"/>
+ <stat_bar name="simmainagents"
+ label="Main Agents"
+ stat="simmainagents"/>
+ <stat_bar name="simchildagents"
+ label="Child Agents"
+ stat="simchildagents"/>
+ <stat_bar name="simobjects"
+ label="Objects"
+ stat="simobjects"/>
+ <stat_bar name="simactiveobjects"
+ label="Active Objects"
+ stat="simactiveobjects"/>
+ <stat_bar name="simactivescripts"
+ label="Active Scripts"
+ stat="simactivescripts"/>
+ <stat_bar name="simpctscriptsrun"
+ label="Scripts Run"
+ stat="simpctscriptsrun"/>
+ <stat_bar name="simscripteps"
+ label="Script Events"
+ stat="simscripteps"
+ unit_label="eps"/>
+ <stat_view name="simpathfinding"
+ label="Pathfinding">
+ <stat_bar name="simsimaistepmsec"
+ label="AI Step Time"
+ stat="simsimaistepmsec"/>
+ <stat_bar name="simsimskippedsilhouettesteps"
+ label="Skipped Silhouette Steps"
+ stat="simsimskippedsilhouettesteps"
+ unit_label="/sec"/>
+ <stat_bar name="simsimpctsteppedcharacters"
+ stat="simsimpctsteppedcharacters"
+ decimal_digits="1"/>
+ </stat_view>
+ <stat_bar name="siminpps"
+ label="Packets In"
+ stat="siminpps"
+ unit_label="pkt/sec"/>
+ <stat_bar name="simoutpps"
+ label="Packets Out"
+ stat="simoutpps"
+ unit_label="pkt/sec"/>
+ <stat_bar name="simpendingdownloads"
+ label="Pending Downloads"
+ stat="simpendingdownloads"/>
+ <stat_bar name="simpendinguploads"
+ label="Pending Uploads"
+ stat="simpendinguploads"/>
+ <stat_bar name="simtotalunackedbytes"
+ label="Total Unacked Data"
+ stat="simtotalunackedbytes"
+ decimal_digits="1"/>
+ <stat_view name="simperf"
+ label="Time">
+ <stat_bar name="simframemsec"
+ label="Total Frame Time"
+ stat="simframemsec"/>
+ <stat_bar name="simnetmsec"
+ label="Net Time"
+ stat="simnetmsec"/>
+ <stat_bar name="simsimphysicsmsec"
+ label="Physics Time"
+ stat="simsimphysicsmsec"/>
+ <stat_bar name="simsimothermsec"
+ label="Simulation Time"
+ stat="simsimothermsec"/>
+ <stat_bar name="simagentmsec"
+ label="Agent Time"
+ stat="simagentmsec"/>
+ <stat_bar name="simimagesmsec"
+ label="Images Time"
+ stat="simimagesmsec"/>
+ <stat_bar name="simscriptmsec"
+ label="Script Time"
+ stat="simscriptmsec"/>
+ <stat_bar name="simsparemsec"
+ label="Spare Time"
+ stat="simsparemsec"/>
+ <stat_view name="timedetails"
+ label="Time Details">
+ <stat_bar name="simsimphysicsstepmsec"
+ label="Physics Step"
+ stat="simsimphysicsstepmsec"/>
+ <stat_bar name="simsimphysicsshapeupdatemsec"
+ label="Update Phys Shapes"
+ stat="simsimphysicsshapeupdatemsec"/>
+ <stat_bar name="simsimphysicsothermsec"
+ label="Physics Other"
+ stat="simsimphysicsothermsec"/>
+ <stat_bar name="simsleepmsec"
+ label="Sleep Time"
+ stat="simsleepmsec"/>
+ <stat_bar name="simpumpiomsec"
+ label="Pump IO"
+ stat="simpumpiomsec"/>
+ </stat_view>
+ </stat_view>
+ </stat_view>
+ </container_view>
+ </scroll_container>
</floater>
diff --git a/indra/newview/skins/default/xui/en/floater_toybox.xml b/indra/newview/skins/default/xui/en/floater_toybox.xml
index d8211c24a7..bc19d6e79f 100755
--- a/indra/newview/skins/default/xui/en/floater_toybox.xml
+++ b/indra/newview/skins/default/xui/en/floater_toybox.xml
@@ -4,7 +4,6 @@
can_dock="false"
can_minimize="false"
can_resize="false"
- default_tab_group="1"
height="375"
help_topic="toybox"
layout="topleft"
diff --git a/indra/newview/skins/default/xui/en/menu_viewer.xml b/indra/newview/skins/default/xui/en/menu_viewer.xml
index 7e8d2aaf9a..8045826ff5 100755
--- a/indra/newview/skins/default/xui/en/menu_viewer.xml
+++ b/indra/newview/skins/default/xui/en/menu_viewer.xml
@@ -1492,6 +1492,14 @@
function="Floater.Toggle"
parameter="stats" />
</menu_item_check>
+ <menu_item_call
+ label="Scene Load Statistics"
+ name="Scene Load Statistics"
+ shortcut="control|shift|2">
+ <on_click
+ function="Floater.Show"
+ parameter="scene_load_stats" />
+ </menu_item_call>
<menu_item_check
label="Show Draw Weight for Avatars"
name="Avatar Rendering Cost">
@@ -2097,6 +2105,16 @@
function="Advanced.ToggleConsole"
parameter="scene view" />
</menu_item_check>
+ <menu_item_check
+ label="Scene Loading Monitor"
+ name="Scene Loading Monitor">
+ <menu_item_check.on_check
+ function="Advanced.CheckConsole"
+ parameter="scene monitor" />
+ <menu_item_check.on_click
+ function="Advanced.ToggleConsole"
+ parameter="scene monitor" />
+ </menu_item_check>
<menu_item_call
enabled="false"
visible="false"
@@ -2877,6 +2895,16 @@
function="ToggleControl"
parameter="RenderHoverGlowEnable" />
</menu_item_check>
+ <menu_item_separator />
+
+ <menu_item_call
+ enabled="true"
+ label="Clear Cache Immediately"
+ name="Cache Clear">
+ <menu_item_call.on_click
+ function="Develop.ClearCache" />
+ </menu_item_call>
+
</menu>
<menu
diff --git a/indra/newview/skins/default/xui/en/panel_bottomtray_lite.xml b/indra/newview/skins/default/xui/en/panel_bottomtray_lite.xml
index 27a27473d8..1c0b205c4f 100755
--- a/indra/newview/skins/default/xui/en/panel_bottomtray_lite.xml
+++ b/indra/newview/skins/default/xui/en/panel_bottomtray_lite.xml
@@ -1,6 +1,5 @@
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<panel
- default_tab_group="2"
mouse_opaque="true"
background_visible="true"
bg_alpha_color="DkGray"
diff --git a/indra/newview/skins/default/xui/en/panel_main_inventory.xml b/indra/newview/skins/default/xui/en/panel_main_inventory.xml
index 1c882bb099..0518688f45 100755
--- a/indra/newview/skins/default/xui/en/panel_main_inventory.xml
+++ b/indra/newview/skins/default/xui/en/panel_main_inventory.xml
@@ -1,6 +1,5 @@
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<panel
- default_tab_group="1"
follows="all"
height="423"
label="Things"
@@ -57,7 +56,6 @@
left="7"
name="inventory filter tabs"
tab_height="30"
- tab_group="1"
tab_position="top"
tab_min_width="100"
top_pad="10"
diff --git a/indra/newview/skins/default/xui/en/panel_nearby_chat_bar.xml b/indra/newview/skins/default/xui/en/panel_nearby_chat_bar.xml
index 19143cef89..1e43db08f7 100755
--- a/indra/newview/skins/default/xui/en/panel_nearby_chat_bar.xml
+++ b/indra/newview/skins/default/xui/en/panel_nearby_chat_bar.xml
@@ -1,6 +1,5 @@
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<panel
- default_tab_group="1"
follows="left|bottom|right"
height="25"
layout="topleft"
diff --git a/indra/newview/skins/default/xui/en/panel_outfit_edit.xml b/indra/newview/skins/default/xui/en/panel_outfit_edit.xml
index b61f110e32..3f13cea58e 100755
--- a/indra/newview/skins/default/xui/en/panel_outfit_edit.xml
+++ b/indra/newview/skins/default/xui/en/panel_outfit_edit.xml
@@ -12,32 +12,32 @@
name="outfit_edit"
top="0"
width="320">
- <string
- name="No Outfit"
- value="No Outfit"/>
- <string
- name="unsaved_changes"
- value="Unsaved Changes"/>
- <string
- name="now_editing"
- value="Now Editing"/>
- <string
- name="folder_view_off"
- value="Hierarchy_View_Disabled"
- translate="false"/>
- <string
- name="folder_view_on"
- value="Hierarchy_View_On"
- translate="false"/>
- <string
- name="list_view_off"
- value="List_View_Disabled"
- translate="false"/>
- <string
- name="list_view_on"
- value="List_View_On"
- translate="false"/>
-
+ <string
+ name="No Outfit"
+ value="No Outfit"/>
+ <string
+ name="unsaved_changes"
+ value="Unsaved Changes"/>
+ <string
+ name="now_editing"
+ value="Now Editing"/>
+ <string
+ name="folder_view_off"
+ value="Hierarchy_View_Disabled"
+ translate="false"/>
+ <string
+ name="folder_view_on"
+ value="Hierarchy_View_On"
+ translate="false"/>
+ <string
+ name="list_view_off"
+ value="List_View_Disabled"
+ translate="false"/>
+ <string
+ name="list_view_on"
+ value="List_View_On"
+ translate="false"/>
+
<panel.string
name="not_available">
(N\A)
@@ -47,475 +47,466 @@
(unknown)
</panel.string>
- <!-- Wearables filtering strings -->
- <string name="Filter.All" value="All"/>
- <string name="Filter.Clothes/Body" value="Clothes/Body"/>
- <string name="Filter.Objects" value="Objects"/>
- <string name="Filter.Clothing" value="Clothing"/>
- <string name="Filter.Bodyparts" value="Body parts"/>
+ <!-- Wearables filtering strings -->
+ <string name="Filter.All" value="All"/>
+ <string name="Filter.Clothes/Body" value="Clothes/Body"/>
+ <string name="Filter.Objects" value="Objects"/>
+ <string name="Filter.Clothing" value="Clothing"/>
+ <string name="Filter.Bodyparts" value="Body parts"/>
+
+ <string
+ name="replace_body_part"
+ value="Click to replace your existing shape"/>
- <string
- name="replace_body_part"
- value="Click to replace your existing shape"/>
-
- <button
- follows="top|left"
- height="24"
- image_hover_unselected="BackButton_Over"
- image_pressed="BackButton_Press"
- image_unselected="BackButton_Off"
- layout="topleft"
- name="back_btn"
- left="5"
- tab_stop="false"
- top="1"
- width="30"
- use_draw_context_alpha="false" />
- <text
- follows="top|left|right"
- font="SansSerifHugeBold"
- height="26"
- layout="topleft"
- left_pad="10"
- name="title"
- text_color="LtGray"
- top="0"
- value="Edit Outfit"
- use_ellipses="true"
- width="275" />
+ <button
+ follows="top|left"
+ height="24"
+ image_hover_unselected="BackButton_Over"
+ image_pressed="BackButton_Press"
+ image_unselected="BackButton_Off"
+ layout="topleft"
+ name="back_btn"
+ left="5"
+ tab_stop="false"
+ top="1"
+ width="30"
+ use_draw_context_alpha="false" />
+ <text
+ follows="top|left|right"
+ font="SansSerifHugeBold"
+ height="26"
+ layout="topleft"
+ left_pad="10"
+ name="title"
+ text_color="LtGray"
+ top="0"
+ value="Edit Outfit"
+ use_ellipses="true"
+ width="275" />
-<!-- "HEADER WITH ICON, STATUS TEXT AND OUTFIT NAME" -->
- <panel
- background_visible="true"
- bg_alpha_color="DkGray2"
- bevel_style="none"
- follows="top|left|right"
- height="40"
- layout="topleft"
- left="6"
- name="header_panel"
- top_pad="5"
- width="311">
- <icon
- follows="left|top"
- height="31"
- image_name="Shirt_Large"
- left="2"
- mouse_opaque="false"
- name="outfit_icon"
- top="2"
- scale_image="true"
- visible="true"
- width="31" />
- <panel
- bevel_style="none"
- follows="top|left|right"
- height="37"
- layout="topleft"
- left_pad="5"
- name="outfit_name_and_status"
- top="2"
- width="270">
- <text
- follows="top|left|right"
- font="SansSerifSmallBold"
- height="13"
- layout="topleft"
- name="status"
- text_color="EmphasisColor"
- top="2"
- value="Now editing..."
- use_ellipses="true"
- width="245" />
- <text
- follows="bottom|left|right"
- font="SansSerifLargeBold"
- height="18"
- layout="topleft"
- name="curr_outfit_name"
- parse_urls="false"
- text_color="LtGray"
- top_pad="2"
- value="[Current Outfit]"
- use_ellipses="true"
- width="245" />
- <loading_indicator
- follows="right|top"
- height="24"
- layout="topleft"
- right="-2"
- name="edit_outfit_loading_indicator"
- top="6"
- width="24" />
- </panel>
- </panel>
+ <!-- "HEADER WITH ICON, STATUS TEXT AND OUTFIT NAME" -->
+ <panel
+ background_visible="true"
+ bg_alpha_color="DkGray2"
+ bevel_style="none"
+ follows="top|left|right"
+ height="40"
+ layout="topleft"
+ left="6"
+ name="header_panel"
+ top_pad="5"
+ width="311">
+ <icon
+ follows="left|top"
+ height="31"
+ image_name="Shirt_Large"
+ left="2"
+ mouse_opaque="false"
+ name="outfit_icon"
+ top="2"
+ scale_image="true"
+ visible="true"
+ width="31" />
+ <panel
+ bevel_style="none"
+ follows="top|left|right"
+ height="37"
+ layout="topleft"
+ left_pad="5"
+ name="outfit_name_and_status"
+ top="2"
+ width="270">
+ <text
+ follows="top|left|right"
+ font="SansSerifSmallBold"
+ height="13"
+ layout="topleft"
+ name="status"
+ text_color="EmphasisColor"
+ top="2"
+ value="Now editing..."
+ use_ellipses="true"
+ width="245" />
+ <text
+ follows="bottom|left|right"
+ font="SansSerifLargeBold"
+ height="18"
+ layout="topleft"
+ name="curr_outfit_name"
+ parse_urls="false"
+ text_color="LtGray"
+ top_pad="2"
+ value="[Current Outfit]"
+ use_ellipses="true"
+ width="245" />
+ <loading_indicator
+ follows="right|top"
+ height="24"
+ layout="topleft"
+ right="-2"
+ name="edit_outfit_loading_indicator"
+ top="6"
+ width="24" />
+ </panel>
+ </panel>
-<!-- LIST OF WEARABLES (CURRENT OUTFIT/ WEARABLES TO ADD) -->
-<!-- *NOTE: border_size is used to calculate space between layout panels and also to calculate resize bar's height.
+ <!-- LIST OF WEARABLES (CURRENT OUTFIT/ WEARABLES TO ADD) -->
+ <!-- *NOTE: border_size is used to calculate space between layout panels and also to calculate resize bar's height.
Required height for dragbar (icon in spec) is 10, so resizebar height should be 10 px.
It is calculated as border_size + 2*UIResizeBarOverlap
-->
- <layout_stack
- animate="true"
- border_size="8"
- clip="false"
- default_tab_group="2"
- follows="all"
- height="465"
- width="313"
- layout="topleft"
- orientation="vertical"
- name="im_panels"
- tab_group="1"
- top_pad="5"
- left="5">
- <layout_panel
- layout="topleft"
- height="187"
- min_height="155"
- name="outfit_wearables_panel"
- width="313"
- auto_resize="true"
- user_resize="true">
+ <layout_stack
+ animate="true"
+ border_size="8"
+ clip="false"
+ default_tab_group="2"
+ follows="all"
+ height="465"
+ width="313"
+ layout="topleft"
+ orientation="vertical"
+ name="im_panels"
+ tab_group="1"
+ top_pad="5"
+ left="5">
+ <layout_panel
+ layout="topleft"
+ height="187"
+ min_height="155"
+ name="outfit_wearables_panel"
+ width="313"
+ auto_resize="true"
+ user_resize="true">
- <layout_stack
- animate="true"
- border_size="0"
- follows="all"
- height="185"
- width="313"
- orientation="vertical"
- layout="topleft"
- name="filter_panels"
- top="0"
- left="0">
- <layout_panel
- auto_resize="true"
- background_visible="false"
- layout="topleft"
- height="154"
- name="add_button_and_combobox"
- width="311"
- visible="true">
+ <layout_stack
+ animate="true"
+ border_size="0"
+ follows="all"
+ height="185"
+ width="313"
+ orientation="vertical"
+ layout="topleft"
+ name="filter_panels"
+ top="0"
+ left="0">
+ <layout_panel
+ auto_resize="true"
+ background_visible="false"
+ layout="topleft"
+ height="154"
+ name="add_button_and_combobox"
+ width="311"
+ visible="true">
- <!-- List containing items from the COF and Base outfit -->
- <panel
- background_visible="false"
- class="cof_wearables"
- filename="panel_cof_wearables.xml"
- follows="all"
- height="129"
- layout="topleft"
- left="1"
- name="cof_wearables_list"
- top="0"
- width="311" />
+ <!-- List containing items from the COF and Base outfit -->
+ <panel
+ background_visible="false"
+ class="cof_wearables"
+ filename="panel_cof_wearables.xml"
+ follows="all"
+ height="129"
+ layout="topleft"
+ left="1"
+ name="cof_wearables_list"
+ top="0"
+ width="311" />
- <button
- follows="left|bottom"
- height="22"
- image_pressed="PushButton_Press"
- image_pressed_selected="PushButton_Selected_Press"
- image_selected="PushButton_Selected_Press"
- is_toggle="true"
- label="Add More..."
- layout="topleft"
- left="2"
- name="show_add_wearables_btn"
- top_pad="2"
- tool_tip="Open/Close"
- width="125" />
+ <button
+ follows="left|bottom"
+ height="22"
+ image_pressed="PushButton_Press"
+ image_pressed_selected="PushButton_Selected_Press"
+ image_selected="PushButton_Selected_Press"
+ is_toggle="true"
+ label="Add More..."
+ layout="topleft"
+ left="2"
+ name="show_add_wearables_btn"
+ top_pad="2"
+ tool_tip="Open/Close"
+ width="125" />
- <combo_box
- follows="left|right|bottom"
- height="22"
- layout="topleft"
- left_pad="5"
- name="list_view_filter_combobox"
- top_delta="0"
- visible="false"
- width="152"/>
- <combo_box
- follows="left|right|bottom"
- height="22"
- layout="topleft"
- left_delta="0"
- name="folder_view_filter_combobox"
- top_delta="0"
- visible="false"
- width="152"/>
-
- <button
- follows="bottom|right"
- height="22"
- image_overlay="Search_Icon"
- image_pressed="PushButton_Press"
- image_pressed_selected="PushButton_Selected_Press"
- image_selected="PushButton_Selected_Press"
- is_toggle="true"
- layout="topleft"
- name="filter_button"
- right="-5"
- top_delta="0"
- visible="false"
- width="20" />
- </layout_panel>
+ <combo_box
+ follows="left|right|bottom"
+ height="22"
+ layout="topleft"
+ left_pad="5"
+ name="list_view_filter_combobox"
+ top_delta="0"
+ visible="false"
+ width="152"/>
+ <combo_box
+ follows="left|right|bottom"
+ height="22"
+ layout="topleft"
+ left_delta="0"
+ name="folder_view_filter_combobox"
+ top_delta="0"
+ visible="false"
+ width="152"/>
- <layout_panel
- auto_resize="false"
- background_visible="true"
- bg_alpha_color="DkGray2"
- height="30"
- name="filter_panel"
- width="311"
- visible="false">
+ <button
+ follows="bottom|right"
+ height="22"
+ image_overlay="Search_Icon"
+ image_pressed="PushButton_Press"
+ image_pressed_selected="PushButton_Selected_Press"
+ image_selected="PushButton_Selected_Press"
+ is_toggle="true"
+ layout="topleft"
+ name="filter_button"
+ right="-5"
+ top_delta="0"
+ visible="false"
+ width="20" />
+ </layout_panel>
- <filter_editor
- background_image="TextField_Search_Off"
- enabled="true"
- follows="left|right|top"
- label="Filter Inventory Wearables"
- layout="topleft"
- left="5"
- width="290"
- height="25"
- name="look_item_filter"
- search_button_visible="true"
- text_color="black"
- visible="true"/>
-
- </layout_panel>
- </layout_stack>
- </layout_panel>
+ <layout_panel
+ auto_resize="false"
+ background_visible="true"
+ bg_alpha_color="DkGray2"
+ height="30"
+ name="filter_panel"
+ width="311"
+ visible="false">
+ <filter_editor
+ background_image="TextField_Search_Off"
+ enabled="true"
+ follows="left|right|top"
+ label="Filter Inventory Wearables"
+ layout="topleft"
+ left="5"
+ width="290"
+ height="25"
+ name="look_item_filter"
+ search_button_visible="true"
+ text_color="black"
+ visible="true"/>
- <layout_panel
- background_visible="false"
- bg_alpha_color="DkGray2"
- auto_resize="true"
- default_tab_group="3"
- height="450"
- min_height="80"
- name="add_wearables_panel"
- width="313"
- tab_group="2"
- user_resize="true"
- visible="false">
+ </layout_panel>
+ </layout_stack>
+ </layout_panel>
+
+
+ <layout_panel background_visible="false"
+ bg_alpha_color="DkGray2"
+ auto_resize="true"
+ height="450"
+ min_height="80"
+ name="add_wearables_panel"
+ width="313"
+ tab_group="2"
+ user_resize="true"
+ visible="false">
<!-- this icon represent dragbar between layout panels.
This is a workaround implemented in EXT-7255 becouse of an issue with layout stack (EXT-7471) -->
- <icon
- follows="left|top|right"
- height="10"
- image_name="Dragbar"
- left="0"
- top_pad="-9"
- width="313" />
+ <icon follows="left|top|right"
+ height="10"
+ image_name="Dragbar"
+ left="0"
+ top_pad="-9"
+ width="313" />
+ <inventory_panel allow_multi_select="true"
+ background_visible="false"
+ border="false"
+ follows="left|top|right|bottom"
+ height="418"
+ layout="topleft"
+ left="0"
+ mouse_opaque="false"
+ name="folder_view"
+ top_pad="0"
+ width="313"
+ visible="false"/>
+ <panel name="filtered_wearables_panel"
+ background_opaque="true"
+ background_visible="false"
+ layout="topleft"
+ follows="left|top|right|bottom"
+ border="false"
+ height="418"
+ left="0"
+ mouse_opaque="false"
+ width="310"
+ top_delta="0"
+ visible="true">
+ <wearable_items_list color="0.107 0.107 0.107 1"
+ name="list_view"
+ allow_select="true"
+ layout="topleft"
+ follows="all"
+ multi_select="true"
+ width="313"
+ height="418"
+ left="0"
+ top="0"/>
+ </panel>
+ <button follows="bottom|left"
+ height="22"
+ left="2"
+ label="Wear Item"
+ layout="topleft"
+ name="plus_btn"
+ top_pad="5"
+ width="130" />
+ </layout_panel>
+ </layout_stack>
- <inventory_panel
- allow_multi_select="true"
- background_visible="false"
- border="false"
- follows="left|top|right|bottom"
- height="418"
- layout="topleft"
- left="0"
- mouse_opaque="false"
- name="folder_view"
- top_pad="0"
- width="313"
- visible="false"/>
- <panel
- name="filtered_wearables_panel"
- background_opaque="true"
- background_visible="false"
- layout="topleft"
- follows="left|top|right|bottom"
- border="false"
- height="418"
- left="0"
- mouse_opaque="false"
- width="310"
- top_delta="0"
- visible="true">
- <wearable_items_list
- color="0.107 0.107 0.107 1"
- name="list_view"
- allow_select="true"
- layout="topleft"
- follows="all"
- multi_select="true"
- width="313"
- height="418"
- left="0"
- top="0"/>
- </panel>
- <button
- follows="bottom|left"
- height="22"
- left="2"
- label="Wear Item"
- layout="topleft"
- name="plus_btn"
- top_pad="5"
- width="130" />
- </layout_panel>
- </layout_stack>
+ <!-- BUTTON BAR -->
+ <panel
+ background_visible="true"
+ bevel_style="none"
+ follows="bottom|left|right"
+ height="27"
+ layout="topleft"
+ left="5"
+ name="no_add_wearables_button_bar"
+ top_pad="0"
+ width="313">
+ <menu_button
+ follows="bottom|left"
+ height="25"
+ image_hover_unselected="Toolbar_Left_Over"
+ image_overlay="OptionsMenu_Off"
+ image_selected="Toolbar_Left_Selected"
+ image_unselected="Toolbar_Left_Off"
+ layout="topleft"
+ left="0"
+ name="gear_menu_btn"
+ top="1"
+ width="31" />
+ <icon
+ follows="bottom|left|right"
+ height="25"
+ image_name="Toolbar_Middle_Off"
+ layout="topleft"
+ left_pad="1"
+ name="dummy_right_icon"
+ width="250" />
+ <button
+ follows="bottom|right"
+ height="25"
+ image_hover_unselected="Toolbar_Right_Over"
+ image_overlay="Shop"
+ image_selected="Toolbar_Right_Selected"
+ image_unselected="Toolbar_Right_Off"
+ layout="topleft"
+ left_pad="1"
+ name="shop_btn_1"
+ top="1"
+ tool_tip="Visit the SL Marketplace. You can also select something you are wearing, then click here to see more things like it"
+ width="31" />
+ </panel>
- <!-- BUTTON BAR -->
- <panel
- background_visible="true"
- bevel_style="none"
- follows="bottom|left|right"
- height="27"
- layout="topleft"
- left="5"
- name="no_add_wearables_button_bar"
- top_pad="0"
- width="313">
- <menu_button
- follows="bottom|left"
- height="25"
- image_hover_unselected="Toolbar_Left_Over"
- image_overlay="OptionsMenu_Off"
- image_selected="Toolbar_Left_Selected"
- image_unselected="Toolbar_Left_Off"
- layout="topleft"
- left="0"
- name="gear_menu_btn"
- top="1"
- width="31" />
- <icon
- follows="bottom|left|right"
- height="25"
- image_name="Toolbar_Middle_Off"
- layout="topleft"
- left_pad="1"
- name="dummy_right_icon"
- width="250" />
- <button
- follows="bottom|right"
- height="25"
- image_hover_unselected="Toolbar_Right_Over"
- image_overlay="Shop"
- image_selected="Toolbar_Right_Selected"
- image_unselected="Toolbar_Right_Off"
- layout="topleft"
- left_pad="1"
- name="shop_btn_1"
- top="1"
- tool_tip="Visit the SL Marketplace. You can also select something you are wearing, then click here to see more things like it"
- width="31" />
- </panel>
-
-
- <!-- BUTTON BAR - WEARABLES ADDING MODE -->
- <panel
- background_visible="true"
- bevel_style="none"
- follows="left|right|bottom"
- height="27"
- layout="topleft"
- left="5"
- name="add_wearables_button_bar"
- top_delta="0"
- visible="false"
- width="313">
- <menu_button
- follows="bottom|left"
- height="25"
- image_hover_unselected="Toolbar_Left_Over"
- image_overlay="OptionsMenu_Off"
- image_selected="Toolbar_Left_Selected"
- image_unselected="Toolbar_Left_Off"
- layout="topleft"
- left="0"
- name="wearables_gear_menu_btn"
- top="1"
- width="31" />
- <button
- follows="bottom|left"
- height="25"
- image_hover_unselected="Toolbar_Middle_Over"
- image_overlay="Hierarchy_View_Disabled"
- image_selected="Toolbar_Middle_Selected"
- image_unselected="Toolbar_Middle_Off"
- is_toggle="true"
- layout="topleft"
- left_pad="1"
- name="folder_view_btn"
- top="1"
- width="31" />
- <button
- follows="bottom|left"
- height="25"
- image_hover_unselected="Toolbar_Middle_Over"
- image_overlay="List_View_On"
- image_selected="Toolbar_Middle_Selected"
- image_unselected="Toolbar_Middle_Off"
- is_toggle="true"
- layout="topleft"
- left_pad="1"
- name="list_view_btn"
- top="1"
- width="31" />
- <icon
- follows="bottom|left|right"
- height="25"
- image_name="Toolbar_Middle_Off"
- layout="topleft"
- left_pad="1"
- name="dummy_right_icon"
- width="186" >
- </icon>
- <button
- follows="bottom|right"
- height="25"
- image_hover_unselected="Toolbar_Right_Over"
- image_overlay="Shop"
- image_selected="Toolbar_Right_Selected"
- image_unselected="Toolbar_Right_Off"
- layout="topleft"
- left_pad="1"
- name="shop_btn_2"
- top="1"
- tool_tip="Visit the SL Marketplace. You can also select something you are wearing, then click here to see more things like it"
- width="31" />
- </panel>
+ <!-- BUTTON BAR - WEARABLES ADDING MODE -->
+ <panel
+ background_visible="true"
+ bevel_style="none"
+ follows="left|right|bottom"
+ height="27"
+ layout="topleft"
+ left="5"
+ name="add_wearables_button_bar"
+ top_delta="0"
+ visible="false"
+ width="313">
+ <menu_button
+ follows="bottom|left"
+ height="25"
+ image_hover_unselected="Toolbar_Left_Over"
+ image_overlay="OptionsMenu_Off"
+ image_selected="Toolbar_Left_Selected"
+ image_unselected="Toolbar_Left_Off"
+ layout="topleft"
+ left="0"
+ name="wearables_gear_menu_btn"
+ top="1"
+ width="31" />
+ <button
+ follows="bottom|left"
+ height="25"
+ image_hover_unselected="Toolbar_Middle_Over"
+ image_overlay="Hierarchy_View_Disabled"
+ image_selected="Toolbar_Middle_Selected"
+ image_unselected="Toolbar_Middle_Off"
+ is_toggle="true"
+ layout="topleft"
+ left_pad="1"
+ name="folder_view_btn"
+ top="1"
+ width="31" />
+ <button
+ follows="bottom|left"
+ height="25"
+ image_hover_unselected="Toolbar_Middle_Over"
+ image_overlay="List_View_On"
+ image_selected="Toolbar_Middle_Selected"
+ image_unselected="Toolbar_Middle_Off"
+ is_toggle="true"
+ layout="topleft"
+ left_pad="1"
+ name="list_view_btn"
+ top="1"
+ width="31" />
+ <icon
+ follows="bottom|left|right"
+ height="25"
+ image_name="Toolbar_Middle_Off"
+ layout="topleft"
+ left_pad="1"
+ name="dummy_right_icon"
+ width="186" >
+ </icon>
+ <button
+ follows="bottom|right"
+ height="25"
+ image_hover_unselected="Toolbar_Right_Over"
+ image_overlay="Shop"
+ image_selected="Toolbar_Right_Selected"
+ image_unselected="Toolbar_Right_Off"
+ layout="topleft"
+ left_pad="1"
+ name="shop_btn_2"
+ top="1"
+ tool_tip="Visit the SL Marketplace. You can also select something you are wearing, then click here to see more things like it"
+ width="31" />
+ </panel>
- <!-- SAVE AND REVERT BUTTONS -->
- <panel
- follows="left|right|bottom"
- height="30"
- layout="topleft"
- left="4"
- top_pad="2"
- name="save_revert_button_bar"
- width="300">
- <layout_stack
- follows="bottom|left|right"
- height="23"
- layout="topleft"
- mouse_opaque="false"
- name="button_bar_ls"
- left="0"
- orientation="horizontal"
- top="0"
- width="313">
- <layout_panel
- follows="bottom|left|right"
- height="23"
- layout="bottomleft"
- left="0"
- mouse_opaque="false"
- name="save_btn_lp"
- auto_resize="true"
- width="156">
- <button
+ <!-- SAVE AND REVERT BUTTONS -->
+ <panel
+ follows="left|right|bottom"
+ height="30"
+ layout="topleft"
+ left="4"
+ top_pad="2"
+ name="save_revert_button_bar"
+ width="300">
+ <layout_stack
+ follows="bottom|left|right"
+ height="23"
+ layout="topleft"
+ mouse_opaque="false"
+ name="button_bar_ls"
+ left="0"
+ orientation="horizontal"
+ top="0"
+ width="313">
+ <layout_panel
+ follows="bottom|left|right"
+ height="23"
+ layout="bottomleft"
+ left="0"
+ mouse_opaque="false"
+ name="save_btn_lp"
+ auto_resize="true"
+ width="156">
+ <button
follows="bottom|left|right"
height="23"
label="Save"
@@ -524,7 +515,7 @@ It is calculated as border_size + 2*UIResizeBarOverlap
name="save_btn"
top="0"
width="155" />
- <button
+ <button
follows="bottom|right"
height="23"
name="save_flyout_btn"
@@ -539,17 +530,17 @@ It is calculated as border_size + 2*UIResizeBarOverlap
image_pressed_selected="SegmentedBtn_Right_Selected_Press"
image_overlay="Arrow_Small_Up"
width="20"/>
- </layout_panel>
- <layout_panel
- follows="bottom|left|right"
- height="23"
- layout="bottomleft"
- left_pad="3"
- mouse_opaque="false"
- name="revert_btn_lp"
- auto_resize="true"
- width="147">
- <button
+ </layout_panel>
+ <layout_panel
+ follows="bottom|left|right"
+ height="23"
+ layout="bottomleft"
+ left_pad="3"
+ mouse_opaque="false"
+ name="revert_btn_lp"
+ auto_resize="true"
+ width="147">
+ <button
follows="bottom|left|right"
height="23"
left="0"
@@ -559,7 +550,7 @@ It is calculated as border_size + 2*UIResizeBarOverlap
top="0"
tool_tip="Revert to last saved version"
width="147" />
- </layout_panel>
- </layout_stack>
- </panel>
+ </layout_panel>
+ </layout_stack>
+ </panel>
</panel>
diff --git a/indra/newview/skins/default/xui/en/panel_people.xml b/indra/newview/skins/default/xui/en/panel_people.xml
index d2caf63052..2d4665c128 100755
--- a/indra/newview/skins/default/xui/en/panel_people.xml
+++ b/indra/newview/skins/default/xui/en/panel_people.xml
@@ -1,7 +1,6 @@
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<!-- Side tray panel -->
<panel
- default_tab_group="1"
follows="all"
height="449"
label="People"
@@ -60,7 +59,6 @@ Looking for people to hang out with? Try the [secondlife:///app/worldmap World M
layout="topleft"
left="3"
name="tabs"
- tab_group="1"
tab_min_width="70"
tab_height="30"
tab_position="top"
diff --git a/indra/newview/skins/default/xui/en/sidepanel_inventory.xml b/indra/newview/skins/default/xui/en/sidepanel_inventory.xml
index 14bd349480..d3e24a19ef 100755
--- a/indra/newview/skins/default/xui/en/sidepanel_inventory.xml
+++ b/indra/newview/skins/default/xui/en/sidepanel_inventory.xml
@@ -12,17 +12,19 @@
follows="all"
layout="topleft"
left="0"
- name="sidepanel__inventory_panel"
+ name="sidepanel_inventory_panel"
top="0"
label=""
height="570"
visible="true"
+ default_tab_group="1"
width="330">
- <layout_stack
+ <layout_stack
follows="left|right|top|bottom"
layout="topleft"
left="0"
top="0"
+ tab_group="1"
orientation="vertical"
name="inventory_layout_stack"
height="535"
@@ -75,7 +77,7 @@
<button
control_name="InventoryInboxToggleState"
label="Received items"
- font="SansSerifMedium"
+ font="SansSerifMedium"
name="inbox_btn"
height="35"
width="308"
@@ -116,61 +118,56 @@
background_opaque="true"
tool_tip="Drag and drop items to your inventory to use them"
>
- <text
- name="inbox_inventory_placeholder"
- type="string"
- follows="all"
- layout="topleft"
- top="0"
- left="0"
- width="308"
- height="200"
- wrap="true"
- halign="center">
- Purchases from the marketplace will be delivered here.
- </text>
+ <text name="inbox_inventory_placeholder"
+ type="string"
+ follows="all"
+ layout="topleft"
+ top="0"
+ left="0"
+ width="308"
+ height="200"
+ wrap="true"
+ halign="center">
+Purchases from the marketplace will be delivered here.
+ </text>
</panel>
</panel>
</layout_panel>
</layout_stack>
- <panel
- follows="bottom|left|right"
- height="30"
- layout="topleft"
- name="button_panel"
- left="9"
- top_pad="7"
- width="308">
- <layout_stack
- follows="bottom|left|right"
- height="23"
- layout="topleft"
- mouse_opaque="false"
- name="button_panel_ls"
- left="0"
- orientation="horizontal"
- top="0"
- width="308">
- <layout_panel
- follows="bottom|left|right"
- height="23"
- layout="bottomleft"
- left="0"
- mouse_opaque="false"
- name="info_btn_lp"
- auto_resize="true"
- width="101">
- <button
- enabled="true"
- follows="bottom|left|right"
- height="23"
- label="Profile"
- layout="topleft"
- left="1"
- name="info_btn"
- tool_tip="Show object profile"
- top="0"
- width="100" />
+ <panel follows="bottom|left|right"
+ height="30"
+ layout="topleft"
+ name="button_panel"
+ left="9"
+ top_pad="7"
+ width="308">
+ <layout_stack follows="bottom|left|right"
+ height="23"
+ layout="topleft"
+ mouse_opaque="false"
+ name="button_panel_ls"
+ left="0"
+ orientation="horizontal"
+ top="0"
+ width="308">
+ <layout_panel follows="bottom|left|right"
+ height="23"
+ layout="bottomleft"
+ left="0"
+ mouse_opaque="false"
+ name="info_btn_lp"
+ auto_resize="true"
+ width="101">
+ <button enabled="true"
+ follows="bottom|left|right"
+ height="23"
+ label="Profile"
+ layout="topleft"
+ left="1"
+ name="info_btn"
+ tool_tip="Show object profile"
+ top="0"
+ width="100" />
</layout_panel>
<layout_panel
follows="bottom|left|right"
diff --git a/indra/newview/skins/default/xui/en/strings.xml b/indra/newview/skins/default/xui/en/strings.xml
index 67f75fe1d2..c3223ec83d 100755
--- a/indra/newview/skins/default/xui/en/strings.xml
+++ b/indra/newview/skins/default/xui/en/strings.xml
@@ -2451,6 +2451,7 @@ Drag folders to this area and click "Send to Marketplace" to list them for sale
<!-- compile queue-->
<string name="CompileQueueDownloadedCompiling">Downloaded, now compiling</string>
+ <string name="CompileQueueServiceUnavailable">Script compilation service not available</string>
<string name="CompileQueueScriptNotFound">Script not found on server.</string>
<string name="CompileQueueProblemDownloading">Problem downloading</string>
<string name="CompileQueueInsufficientPermDownload">Insufficient permissions to download a script.</string>
diff --git a/indra/newview/skins/default/xui/en/widgets/avatar_icon.xml b/indra/newview/skins/default/xui/en/widgets/avatar_icon.xml
index 4d69dda7eb..7f8fac04d0 100755
--- a/indra/newview/skins/default/xui/en/widgets/avatar_icon.xml
+++ b/indra/newview/skins/default/xui/en/widgets/avatar_icon.xml
@@ -1,7 +1,9 @@
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
-<avatar_icon
- name="avatar_icon"
- default_icon_name="Generic_Person_Large"
- use_draw_context_alpha="false">
-</avatar_icon>
+<avatar_icon name="avatar_icon"
+ default_icon_name="Generic_Person_Large"
+ use_draw_context_alpha="false"
+ symbol_hpad = "2"
+ symbol_vpad = "1"
+ symbol_size = "5"/>
+
diff --git a/indra/newview/skins/default/xui/en/widgets/floater.xml b/indra/newview/skins/default/xui/en/widgets/floater.xml
index 97a5ae7d4e..807b67d112 100755
--- a/indra/newview/skins/default/xui/en/widgets/floater.xml
+++ b/indra/newview/skins/default/xui/en/widgets/floater.xml
@@ -2,7 +2,6 @@
<!-- See also settings.xml UIFloater* settings for configuration -->
<floater
name="floater"
- positioning="none"
layout="topleft"
bg_opaque_color="FloaterFocusBackgroundColor"
bg_alpha_color="FloaterDefaultBackgroundColor"
diff --git a/indra/newview/skins/default/xui/es/floater_lagmeter.xml b/indra/newview/skins/default/xui/es/floater_lagmeter.xml
deleted file mode 100755
index 227689a194..0000000000
--- a/indra/newview/skins/default/xui/es/floater_lagmeter.xml
+++ /dev/null
@@ -1,154 +0,0 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<floater name="floater_lagmeter" title="MEDIDOR DEL LAG">
- <floater.string name="max_title_msg">
- Medidor del lag
- </floater.string>
- <floater.string name="max_width_px">
- 360
- </floater.string>
- <floater.string name="min_title_msg">
- Lag
- </floater.string>
- <floater.string name="min_width_px">
- 90
- </floater.string>
- <floater.string name="client_text_msg">
- Cliente
- </floater.string>
- <floater.string name="client_frame_rate_critical_fps">
- 10
- </floater.string>
- <floater.string name="client_frame_rate_warning_fps">
- 15
- </floater.string>
- <floater.string name="client_frame_time_window_bg_msg">
- Normal, ventana en segundo plano
- </floater.string>
- <floater.string name="client_frame_time_critical_msg">
- Frames del cliente valorados por debajo de [CLIENT_FRAME_RATE_CRITICAL]
- </floater.string>
- <floater.string name="client_frame_time_warning_msg">
- Frames del cliente valorados entre [CLIENT_FRAME_RATE_CRITICAL] y [CLIENT_FRAME_RATE_WARNING]
- </floater.string>
- <floater.string name="client_frame_time_normal_msg">
- Normal
- </floater.string>
- <floater.string name="client_draw_distance_cause_msg">
- Posible causa: distancia de dibujo fijada muy alta
- </floater.string>
- <floater.string name="client_texture_loading_cause_msg">
- Posible causa: imágenes cargándose
- </floater.string>
- <floater.string name="client_texture_memory_cause_msg">
- Posible causa: demasiadas imágenes en la memoria
- </floater.string>
- <floater.string name="client_complex_objects_cause_msg">
- Posible causa: demasiados objetos complejos en la escena
- </floater.string>
- <floater.string name="network_text_msg">
- Red
- </floater.string>
- <floater.string name="network_packet_loss_critical_pct">
- 10
- </floater.string>
- <floater.string name="network_packet_loss_warning_pct">
- 5
- </floater.string>
- <floater.string name="network_packet_loss_critical_msg">
- La conexión deja caer más del [NETWORK_PACKET_LOSS_CRITICAL]% de los paquetes
- </floater.string>
- <floater.string name="network_packet_loss_warning_msg">
- La conexión deja caer [NETWORK_PACKET_LOSS_WARNING]%-[NETWORK_PACKET_LOSS_CRITICAL]% de los paquetes
- </floater.string>
- <floater.string name="network_performance_normal_msg">
- Normal
- </floater.string>
- <floater.string name="network_ping_critical_ms">
- 600
- </floater.string>
- <floater.string name="network_ping_warning_ms">
- 300
- </floater.string>
- <floater.string name="network_ping_critical_msg">
- El tiempo de conexión -ping- supera los [NETWORK_PING_CRITICAL] ms
- </floater.string>
- <floater.string name="network_ping_warning_msg">
- El tiempo de conexión -ping- es de [NETWORK_PING_WARNING]-[NETWORK_PING_CRITICAL] ms
- </floater.string>
- <floater.string name="network_packet_loss_cause_msg">
- Quizá una mala conexión o un ancho de banda fijado demasiado alto.
- </floater.string>
- <floater.string name="network_ping_cause_msg">
- Quizá una mala conexión o una aplicación de archivos compartidos.
- </floater.string>
- <floater.string name="server_text_msg">
- Servidor
- </floater.string>
- <floater.string name="server_frame_rate_critical_fps">
- 20
- </floater.string>
- <floater.string name="server_frame_rate_warning_fps">
- 30
- </floater.string>
- <floater.string name="server_single_process_max_time_ms">
- 20
- </floater.string>
- <floater.string name="server_frame_time_critical_msg">
- Frecuencia (framerate) por debajo de [SERVER_FRAME_RATE_CRITICAL]
- </floater.string>
- <floater.string name="server_frame_time_warning_msg">
- Frecuencia (framerate) entre [SERVER_FRAME_RATE_CRITICAL] y [SERVER_FRAME_RATE_WARNING]
- </floater.string>
- <floater.string name="server_frame_time_normal_msg">
- Normal
- </floater.string>
- <floater.string name="server_physics_cause_msg">
- Posible causa: demasiados objetos físicos
- </floater.string>
- <floater.string name="server_scripts_cause_msg">
- Posible causa: demasiados objetos con script
- </floater.string>
- <floater.string name="server_net_cause_msg">
- Posible causa: demasiado tráfico en la red
- </floater.string>
- <floater.string name="server_agent_cause_msg">
- Posible causa: demasiada gente moviéndose en la región
- </floater.string>
- <floater.string name="server_images_cause_msg">
- Posible causa: demasiados cálculos de imáganes
- </floater.string>
- <floater.string name="server_generic_cause_msg">
- Posible causa: carga del simulador muy pesada
- </floater.string>
- <floater.string name="smaller_label">
- &gt;&gt;
- </floater.string>
- <floater.string name="bigger_label">
- &lt;&lt;
- </floater.string>
- <button label="" label_selected="" name="client_lagmeter" tool_tip="Estado del lag del cliente"/>
- <text name="client">
- Cliente
- </text>
- <text font="SansSerifSmall" name="client_text">
- Normal
- </text>
- <text left="30" name="client_lag_cause" right="-10"/>
- <button label="" label_selected="" name="network_lagmeter" tool_tip="Estado del lag de la red"/>
- <text name="network">
- Red
- </text>
- <text font="SansSerifSmall" name="network_text">
- Normal
- </text>
- <text left="30" name="network_lag_cause" right="-10"/>
- <button label="" label_selected="" name="server_lagmeter" tool_tip="Estado del lag del servidor"/>
- <text name="server">
- Servidor
- </text>
- <text font="SansSerifSmall" name="server_text">
- Normal
- </text>
- <text left="30" name="server_lag_cause" right="-32"/>
- <button label="&gt;&gt;" name="minimize" tool_tip="Cambia el tamaño de la ventana"/>
-</floater>
diff --git a/indra/newview/skins/default/xui/es/sidepanel_inventory.xml b/indra/newview/skins/default/xui/es/sidepanel_inventory.xml
index f68dcc65e3..9ce14c856f 100755
--- a/indra/newview/skins/default/xui/es/sidepanel_inventory.xml
+++ b/indra/newview/skins/default/xui/es/sidepanel_inventory.xml
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<panel label="Cosas" name="objects panel">
- <panel label="" name="sidepanel__inventory_panel">
+ <panel label="" name="sidepanel_inventory_panel">
<layout_stack name="inventory_layout_stack">
<layout_panel name="inbox_layout_panel">
<panel label="" name="marketplace_inbox">
diff --git a/indra/newview/skins/default/xui/fr/floater_lagmeter.xml b/indra/newview/skins/default/xui/fr/floater_lagmeter.xml
deleted file mode 100755
index 39a861d8bd..0000000000
--- a/indra/newview/skins/default/xui/fr/floater_lagmeter.xml
+++ /dev/null
@@ -1,151 +0,0 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<floater name="floater_lagmeter" title="MESURE DU LAG">
- <floater.string name="max_title_msg">
- Mesure du lag
- </floater.string>
- <floater.string name="max_width_px">
- 360
- </floater.string>
- <floater.string name="min_title_msg">
- Lag
- </floater.string>
- <floater.string name="min_width_px">
- 90
- </floater.string>
- <floater.string name="client_text_msg">
- Client
- </floater.string>
- <floater.string name="client_frame_rate_critical_fps">
- 10
- </floater.string>
- <floater.string name="client_frame_rate_warning_fps">
- 15
- </floater.string>
- <floater.string name="client_frame_time_window_bg_msg">
- Normal, fenêtre en arrière-plan
- </floater.string>
- <floater.string name="client_frame_time_critical_msg">
- Taux de défilement [CLIENT_FRAME_RATE_CRITICAL]
- </floater.string>
- <floater.string name="client_frame_time_warning_msg">
- Taux de défilement entre [CLIENT_FRAME_RATE_CRITICAL] et [CLIENT_FRAME_RATE_WARNING]
- </floater.string>
- <floater.string name="client_frame_time_normal_msg">
- Normal
- </floater.string>
- <floater.string name="client_draw_distance_cause_msg">
- Cause possible : limite d&apos;affichage trop élevée
- </floater.string>
- <floater.string name="client_texture_loading_cause_msg">
- Cause possible : images en cours de chargement
- </floater.string>
- <floater.string name="client_texture_memory_cause_msg">
- Cause possible : trop d&apos;images en mémoire
- </floater.string>
- <floater.string name="client_complex_objects_cause_msg">
- Cause possible : trop d&apos;objets complexes
- </floater.string>
- <floater.string name="network_text_msg">
- Réseau
- </floater.string>
- <floater.string name="network_packet_loss_critical_pct">
- 10
- </floater.string>
- <floater.string name="network_packet_loss_warning_pct">
- 5
- </floater.string>
- <floater.string name="network_packet_loss_critical_msg">
- La connexion perd plus de [NETWORK_PACKET_LOSS_CRITICAL] % de paquets
- </floater.string>
- <floater.string name="network_packet_loss_warning_msg">
- La connexion perd entre [NETWORK_PACKET_LOSS_WARNING] % et [NETWORK_PACKET_LOSS_CRITICAL] % de paquets
- </floater.string>
- <floater.string name="network_performance_normal_msg">
- Normal
- </floater.string>
- <floater.string name="network_ping_critical_ms">
- 600
- </floater.string>
- <floater.string name="network_ping_warning_ms">
- 300
- </floater.string>
- <floater.string name="network_ping_critical_msg">
- Connexion ping > [NETWORK_PING_CRITICAL] ms
- </floater.string>
- <floater.string name="network_ping_warning_msg">
- Connexion ping entre [NETWORK_PING_WARNING] et [NETWORK_PING_CRITICAL] ms
- </floater.string>
- <floater.string name="network_packet_loss_cause_msg">
- Mauvaise connexion possible ou réglage de la bande passante trop élevé.
- </floater.string>
- <floater.string name="network_ping_cause_msg">
- Mauvaise connexion possible ou app. de partage des fichiers
- </floater.string>
- <floater.string name="server_text_msg">
- Serveur
- </floater.string>
- <floater.string name="server_frame_rate_critical_fps">
- 20
- </floater.string>
- <floater.string name="server_frame_rate_warning_fps">
- 30
- </floater.string>
- <floater.string name="server_single_process_max_time_ms">
- 20
- </floater.string>
- <floater.string name="server_frame_time_critical_msg">
- Défilement du simulateur &lt; [SERVER_FRAME_RATE_CRITICAL]
- </floater.string>
- <floater.string name="server_frame_time_warning_msg">
- Défilement simulateur entre [SERVER_FRAME_RATE_CRITICAL] et [SERVER_FRAME_RATE_WARNING]
- </floater.string>
- <floater.string name="server_frame_time_normal_msg">
- Normal
- </floater.string>
- <floater.string name="server_physics_cause_msg">
- Cause possible : trop d&apos;objets physiques
- </floater.string>
- <floater.string name="server_scripts_cause_msg">
- Cause possible : trop d&apos;objets scriptés
- </floater.string>
- <floater.string name="server_net_cause_msg">
- Cause possible : trop de trafic réseau
- </floater.string>
- <floater.string name="server_agent_cause_msg">
- Cause possible : trop de personnes en mouvement
- </floater.string>
- <floater.string name="server_images_cause_msg">
- Cause possible : trop de calculs d&apos;images
- </floater.string>
- <floater.string name="server_generic_cause_msg">
- Cause possible : charge simulateur trop lourde
- </floater.string>
- <floater.string name="smaller_label">
- &gt;&gt;
- </floater.string>
- <floater.string name="bigger_label">
- &lt;&lt;
- </floater.string>
- <button name="client_lagmeter" tool_tip="Statut du lag client"/>
- <text name="client">
- Client
- </text>
- <text name="client_text">
- Normal
- </text>
- <button name="network_lagmeter" tool_tip="Statut du lag réseau"/>
- <text name="network">
- Réseau
- </text>
- <text name="network_text">
- Normal
- </text>
- <button name="server_lagmeter" tool_tip="Statut du lag serveur"/>
- <text name="server">
- Serveur
- </text>
- <text name="server_text">
- Normal
- </text>
- <button label="&gt;&gt;" name="minimize" tool_tip="Activer/désactiver la taille du floater"/>
-</floater>
diff --git a/indra/newview/skins/default/xui/fr/sidepanel_inventory.xml b/indra/newview/skins/default/xui/fr/sidepanel_inventory.xml
index 1b9c832679..ec7dd8c095 100755
--- a/indra/newview/skins/default/xui/fr/sidepanel_inventory.xml
+++ b/indra/newview/skins/default/xui/fr/sidepanel_inventory.xml
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<panel label="Choses" name="objects panel">
- <panel label="" name="sidepanel__inventory_panel">
+ <panel label="" name="sidepanel_inventory_panel">
<layout_stack name="inventory_layout_stack">
<layout_panel name="inbox_layout_panel">
<panel label="" name="marketplace_inbox">
diff --git a/indra/newview/skins/default/xui/it/floater_lagmeter.xml b/indra/newview/skins/default/xui/it/floater_lagmeter.xml
deleted file mode 100755
index f7b2b1ab4a..0000000000
--- a/indra/newview/skins/default/xui/it/floater_lagmeter.xml
+++ /dev/null
@@ -1,154 +0,0 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<floater name="floater_lagmeter" title="MISURATORE LAG">
- <floater.string name="max_title_msg">
- Misuratore del lag
- </floater.string>
- <floater.string name="max_width_px">
- 360
- </floater.string>
- <floater.string name="min_title_msg">
- Lag
- </floater.string>
- <floater.string name="min_width_px">
- 90
- </floater.string>
- <floater.string name="client_text_msg">
- Programma in locale
- </floater.string>
- <floater.string name="client_frame_rate_critical_fps">
- 10
- </floater.string>
- <floater.string name="client_frame_rate_warning_fps">
- 15
- </floater.string>
- <floater.string name="client_frame_time_window_bg_msg">
- Normale, finestra sullo sfondo
- </floater.string>
- <floater.string name="client_frame_time_critical_msg">
- Velocità dei frame al di sotto di [CLIENT_FRAME_RATE_CRITICAL]
- </floater.string>
- <floater.string name="client_frame_time_warning_msg">
- Velocità dei frame tra [CLIENT_FRAME_RATE_CRITICAL] e [CLIENT_FRAME_RATE_WARNING]
- </floater.string>
- <floater.string name="client_frame_time_normal_msg">
- Normale
- </floater.string>
- <floater.string name="client_draw_distance_cause_msg">
- Possibile causa: Campo visivo impostato troppo alto
- </floater.string>
- <floater.string name="client_texture_loading_cause_msg">
- Possibile causa: Caricamento immagini
- </floater.string>
- <floater.string name="client_texture_memory_cause_msg">
- Possibile causa: Troppe immagini in memoria
- </floater.string>
- <floater.string name="client_complex_objects_cause_msg">
- Possibile causa: Troppi oggetti complessi intorno
- </floater.string>
- <floater.string name="network_text_msg">
- Network
- </floater.string>
- <floater.string name="network_packet_loss_critical_pct">
- 10
- </floater.string>
- <floater.string name="network_packet_loss_warning_pct">
- 5
- </floater.string>
- <floater.string name="network_packet_loss_critical_msg">
- La connessione sta calando al di sotto del [NETWORK_PACKET_LOSS_CRITICAL]% di pacchetti
- </floater.string>
- <floater.string name="network_packet_loss_warning_msg">
- La connessione sta calando tra il [NETWORK_PACKET_LOSS_WARNING]% e il [NETWORK_PACKET_LOSS_CRITICAL]% di pacchetti
- </floater.string>
- <floater.string name="network_performance_normal_msg">
- Normale
- </floater.string>
- <floater.string name="network_ping_critical_ms">
- 600
- </floater.string>
- <floater.string name="network_ping_warning_ms">
- 300
- </floater.string>
- <floater.string name="network_ping_critical_msg">
- Il tempo di ping della connessione è al di sopra di [NETWORK_PING_CRITICAL] ms
- </floater.string>
- <floater.string name="network_ping_warning_msg">
- Il tempo di ping della connessione è tra [NETWORK_PING_WARNING]-[NETWORK_PING_CRITICAL] ms
- </floater.string>
- <floater.string name="network_packet_loss_cause_msg">
- Possibile cattiva connessione o la larghezza di banda impostata nelle preferenze troppo alta.
- </floater.string>
- <floater.string name="network_ping_cause_msg">
- Possibile cattiva connessione o l&apos;apertura di un programma di scambio files.
- </floater.string>
- <floater.string name="server_text_msg">
- Server
- </floater.string>
- <floater.string name="server_frame_rate_critical_fps">
- 20
- </floater.string>
- <floater.string name="server_frame_rate_warning_fps">
- 30
- </floater.string>
- <floater.string name="server_single_process_max_time_ms">
- 20
- </floater.string>
- <floater.string name="server_frame_time_critical_msg">
- Velocità dei frame al di sotto di [SERVER_FRAME_RATE_CRITICAL]
- </floater.string>
- <floater.string name="server_frame_time_warning_msg">
- Velocità dei frame tra [SERVER_FRAME_RATE_CRITICAL] e [SERVER_FRAME_RATE_WARNING]
- </floater.string>
- <floater.string name="server_frame_time_normal_msg">
- Normale
- </floater.string>
- <floater.string name="server_physics_cause_msg">
- Possibile causa: troppi oggetti fisici
- </floater.string>
- <floater.string name="server_scripts_cause_msg">
- Possibile causa: troppi oggetti scriptati
- </floater.string>
- <floater.string name="server_net_cause_msg">
- Possibile causa: eccessivo traffico sulla rete
- </floater.string>
- <floater.string name="server_agent_cause_msg">
- Possibile causa: troppi residenti in movimento nella regione
- </floater.string>
- <floater.string name="server_images_cause_msg">
- Possibile causa: troppe elaborazioni di immagini
- </floater.string>
- <floater.string name="server_generic_cause_msg">
- Possibile causa: carico eccessivo del simulatore
- </floater.string>
- <floater.string name="smaller_label">
- &gt;&gt;
- </floater.string>
- <floater.string name="bigger_label">
- &lt;&lt;
- </floater.string>
- <button label="" label_selected="" name="client_lagmeter" tool_tip="Stato del lag del programma in locale"/>
- <text name="client">
- Client
- </text>
- <text font="SansSerifSmall" left="145" name="client_text">
- Normale
- </text>
- <text left="30" name="client_lag_cause" right="-10"/>
- <button label="" label_selected="" name="network_lagmeter" tool_tip="Stato del lag del network"/>
- <text name="network">
- Rete
- </text>
- <text font="SansSerifSmall" name="network_text">
- Normale
- </text>
- <text left="30" name="network_lag_cause" right="-10"/>
- <button label="" label_selected="" name="server_lagmeter" tool_tip="Stato del lag del server"/>
- <text name="server">
- Server
- </text>
- <text font="SansSerifSmall" name="server_text">
- Normale
- </text>
- <text left="30" name="server_lag_cause" right="-32"/>
- <button label="&gt;&gt;" name="minimize" tool_tip="Cambia dimensioni floater"/>
-</floater>
diff --git a/indra/newview/skins/default/xui/it/sidepanel_inventory.xml b/indra/newview/skins/default/xui/it/sidepanel_inventory.xml
index 5ac0961bd7..907857bf5a 100755
--- a/indra/newview/skins/default/xui/it/sidepanel_inventory.xml
+++ b/indra/newview/skins/default/xui/it/sidepanel_inventory.xml
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<panel label="Cose" name="objects panel">
- <panel label="" name="sidepanel__inventory_panel">
+ <panel label="" name="sidepanel_inventory_panel">
<layout_stack name="inventory_layout_stack">
<layout_panel name="inbox_layout_panel">
<panel label="" name="marketplace_inbox">
diff --git a/indra/newview/skins/default/xui/ja/floater_lagmeter.xml b/indra/newview/skins/default/xui/ja/floater_lagmeter.xml
deleted file mode 100755
index e3546cd837..0000000000
--- a/indra/newview/skins/default/xui/ja/floater_lagmeter.xml
+++ /dev/null
@@ -1,151 +0,0 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<floater name="floater_lagmeter" title="ラグメーター">
- <floater.string name="max_title_msg">
- ラグ メーター
- </floater.string>
- <floater.string name="max_width_px">
- 350
- </floater.string>
- <floater.string name="min_title_msg">
- ラグ
- </floater.string>
- <floater.string name="min_width_px">
- 90
- </floater.string>
- <floater.string name="client_text_msg">
- クライアント
- </floater.string>
- <floater.string name="client_frame_rate_critical_fps">
- 10
- </floater.string>
- <floater.string name="client_frame_rate_warning_fps">
- 15
- </floater.string>
- <floater.string name="client_frame_time_window_bg_msg">
- ノーマル、ウィンドウは背景に
- </floater.string>
- <floater.string name="client_frame_time_critical_msg">
- クライアント フレームレート < [CLIENT_FRAME_RATE_CRITICAL]
- </floater.string>
- <floater.string name="client_frame_time_warning_msg">
- クライアント フレームレート: [CLIENT_FRAME_RATE_CRITICAL] ~ [CLIENT_FRAME_RATE_WARNING]
- </floater.string>
- <floater.string name="client_frame_time_normal_msg">
- ノーマル
- </floater.string>
- <floater.string name="client_draw_distance_cause_msg">
- 考えられる原因: 描画距離の設定が大きすぎる
- </floater.string>
- <floater.string name="client_texture_loading_cause_msg">
- 考えられる原因: 画像のロード中
- </floater.string>
- <floater.string name="client_texture_memory_cause_msg">
- 考えられる原因: メモリ内の画像数が多すぎる
- </floater.string>
- <floater.string name="client_complex_objects_cause_msg">
- 考えられる原因: 画面に含まれる複雑なオブジェクトが多すぎる
- </floater.string>
- <floater.string name="network_text_msg">
- ネットワーク
- </floater.string>
- <floater.string name="network_packet_loss_critical_pct">
- 10
- </floater.string>
- <floater.string name="network_packet_loss_warning_pct">
- 5
- </floater.string>
- <floater.string name="network_packet_loss_critical_msg">
- 接続でドロップされるパケットの割合: > [NETWORK_PACKET_LOSS_CRITICAL]
- </floater.string>
- <floater.string name="network_packet_loss_warning_msg">
- 接続でドロップされるパケットの割合:[NETWORK_PACKET_LOSS_WARNING] ~ [NETWORK_PACKET_LOSS_CRITICAL]
- </floater.string>
- <floater.string name="network_performance_normal_msg">
- ノーマル
- </floater.string>
- <floater.string name="network_ping_critical_ms">
- 600
- </floater.string>
- <floater.string name="network_ping_warning_ms">
- 300
- </floater.string>
- <floater.string name="network_ping_critical_msg">
- 接続の ping 時間: > [NETWORK_PING_CRITICAL] ミリ秒
- </floater.string>
- <floater.string name="network_ping_warning_msg">
- 接続の ping 時間: [NETWORK_PING_WARNING] ~ [NETWORK_PING_CRITICAL] ミリ秒
- </floater.string>
- <floater.string name="network_packet_loss_cause_msg">
- 接続不良になっているか、帯域幅設定が高すぎます。
- </floater.string>
- <floater.string name="network_ping_cause_msg">
- 接続不良になっているか、ファイル共有アプリケーションに問題があります。
- </floater.string>
- <floater.string name="server_text_msg">
- サーバー
- </floater.string>
- <floater.string name="server_frame_rate_critical_fps">
- 20
- </floater.string>
- <floater.string name="server_frame_rate_warning_fps">
- 30
- </floater.string>
- <floater.string name="server_single_process_max_time_ms">
- 20
- </floater.string>
- <floater.string name="server_frame_time_critical_msg">
- シミュレーターのフレームレート: < [SERVER_FRAME_RATE_CRITICAL]
- </floater.string>
- <floater.string name="server_frame_time_warning_msg">
- シミュレーターのフレームレート: [SERVER_FRAME_RATE_CRITICAL] ~ [SERVER_FRAME_RATE_WARNING]
- </floater.string>
- <floater.string name="server_frame_time_normal_msg">
- ノーマル
- </floater.string>
- <floater.string name="server_physics_cause_msg">
- 考えられる原因: 物理的オブジェクトが多すぎる
- </floater.string>
- <floater.string name="server_scripts_cause_msg">
- 考えられる原因: スクリプトを含むオブジェクトが多すぎる
- </floater.string>
- <floater.string name="server_net_cause_msg">
- 考えられる原因: ネットワーク トラフィック過大
- </floater.string>
- <floater.string name="server_agent_cause_msg">
- 考えられる原因: 地域内にて動いているアバターが多すぎる
- </floater.string>
- <floater.string name="server_images_cause_msg">
- 考えられる原因: 画像計算が多すぎる
- </floater.string>
- <floater.string name="server_generic_cause_msg">
- 考えられる原因: シミュレーターの過負荷
- </floater.string>
- <floater.string name="smaller_label">
- &gt;&gt;
- </floater.string>
- <floater.string name="bigger_label">
- &lt;&lt;
- </floater.string>
- <button name="client_lagmeter" tool_tip="クライアント ラグ ステータス"/>
- <text name="client">
- クライアント
- </text>
- <text name="client_text">
- ノーマル
- </text>
- <button name="network_lagmeter" tool_tip="ネットワーク ラグ ステータス"/>
- <text name="network">
- ネットワーク
- </text>
- <text name="network_text">
- ノーマル
- </text>
- <button name="server_lagmeter" tool_tip="サーバー ラグ ステータス"/>
- <text name="server">
- サーバー
- </text>
- <text name="server_text">
- ノーマル
- </text>
- <button label="&gt;&gt; " name="minimize" tool_tip="フローターのサイズをトグル"/>
-</floater>
diff --git a/indra/newview/skins/default/xui/ja/sidepanel_inventory.xml b/indra/newview/skins/default/xui/ja/sidepanel_inventory.xml
index 51d6d48f90..32e84ce542 100755
--- a/indra/newview/skins/default/xui/ja/sidepanel_inventory.xml
+++ b/indra/newview/skins/default/xui/ja/sidepanel_inventory.xml
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<panel label="もの" name="objects panel">
- <panel label="" name="sidepanel__inventory_panel">
+ <panel label="" name="sidepanel_inventory_panel">
<layout_stack name="inventory_layout_stack">
<layout_panel name="inbox_layout_panel">
<panel label="" name="marketplace_inbox">
diff --git a/indra/newview/skins/default/xui/pl/floater_lagmeter.xml b/indra/newview/skins/default/xui/pl/floater_lagmeter.xml
deleted file mode 100755
index 8038550bcb..0000000000
--- a/indra/newview/skins/default/xui/pl/floater_lagmeter.xml
+++ /dev/null
@@ -1,151 +0,0 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<floater name="floater_lagmeter" title="POMIAR LAGÓW">
- <floater.string name="max_title_msg">
- Pomiar lagów
- </floater.string>
- <floater.string name="max_width_px">
- 360
- </floater.string>
- <floater.string name="min_title_msg">
- Lag
- </floater.string>
- <floater.string name="min_width_px">
- 90
- </floater.string>
- <floater.string name="client_text_msg">
- Klient
- </floater.string>
- <floater.string name="client_frame_rate_critical_fps">
- 10
- </floater.string>
- <floater.string name="client_frame_rate_warning_fps">
- 15
- </floater.string>
- <floater.string name="client_frame_time_window_bg_msg">
- W normie, okno w tle
- </floater.string>
- <floater.string name="client_frame_time_critical_msg">
- Ilość klatek na sekundę klienta poniżej [CLIENT_FRAME_RATE_CRITICAL]
- </floater.string>
- <floater.string name="client_frame_time_warning_msg">
- Ilość klatek na sekundę pomiędzy [CLIENT_FRAME_RATE_CRITICAL] i [CLIENT_FRAME_RATE_WARNING]
- </floater.string>
- <floater.string name="client_frame_time_normal_msg">
- W normie
- </floater.string>
- <floater.string name="client_draw_distance_cause_msg">
- Przyczyna: dystans rysowania jest za wysoki
- </floater.string>
- <floater.string name="client_texture_loading_cause_msg">
- Przyczyna: ładowanie obrazu
- </floater.string>
- <floater.string name="client_texture_memory_cause_msg">
- Przyczyna: za dużo obrazów w pamięci
- </floater.string>
- <floater.string name="client_complex_objects_cause_msg">
- Przyczyna: za dużo złożonych obiektów
- </floater.string>
- <floater.string name="network_text_msg">
- Sieć
- </floater.string>
- <floater.string name="network_packet_loss_critical_pct">
- 10
- </floater.string>
- <floater.string name="network_packet_loss_warning_pct">
- 5
- </floater.string>
- <floater.string name="network_packet_loss_critical_msg">
- Utrata pakietów przekracza [NETWORK_PACKET_LOSS_CRITICAL]%
- </floater.string>
- <floater.string name="network_packet_loss_warning_msg">
- Utrata pakietów przekracza [NETWORK_PACKET_LOSS_WARNING]%-[NETWORK_PACKET_LOSS_CRITICAL]%
- </floater.string>
- <floater.string name="network_performance_normal_msg">
- W normie
- </floater.string>
- <floater.string name="network_ping_critical_ms">
- 600
- </floater.string>
- <floater.string name="network_ping_warning_ms">
- 300
- </floater.string>
- <floater.string name="network_ping_critical_msg">
- Fatalny ping - [NETWORK_PING_CRITICAL] ms
- </floater.string>
- <floater.string name="network_ping_warning_msg">
- Wolny ping - [NETWORK_PING_WARNING]-[NETWORK_PING_CRITICAL] ms
- </floater.string>
- <floater.string name="network_packet_loss_cause_msg">
- Złe połączenie lub przepustowość.
- </floater.string>
- <floater.string name="network_ping_cause_msg">
- Złe połączenie lub aplikacja współdzieląca pliki.
- </floater.string>
- <floater.string name="server_text_msg">
- Serwer
- </floater.string>
- <floater.string name="server_frame_rate_critical_fps">
- 20
- </floater.string>
- <floater.string name="server_frame_rate_warning_fps">
- 30
- </floater.string>
- <floater.string name="server_single_process_max_time_ms">
- 20
- </floater.string>
- <floater.string name="server_frame_time_critical_msg">
- Ilość klatek na sekundę poniżej [SERVER_FRAME_RATE_CRITICAL]
- </floater.string>
- <floater.string name="server_frame_time_warning_msg">
- Ilość klatek na sekundę pomiędzy [SERVER_FRAME_RATE_CRITICAL] i [SERVER_FRAME_RATE_WARNING]
- </floater.string>
- <floater.string name="server_frame_time_normal_msg">
- W normie
- </floater.string>
- <floater.string name="server_physics_cause_msg">
- Przyczyna: za dużo obiektów fizycznych
- </floater.string>
- <floater.string name="server_scripts_cause_msg">
- Przyczyna: za dużo obieków skryptowanych
- </floater.string>
- <floater.string name="server_net_cause_msg">
- Przyczyna: za duży ruch w sieci
- </floater.string>
- <floater.string name="server_agent_cause_msg">
- Przyczyna: za dużo poruszających się awatarów w regionie
- </floater.string>
- <floater.string name="server_images_cause_msg">
- Przyczyna: za dużo kalkulacji obrazu
- </floater.string>
- <floater.string name="server_generic_cause_msg">
- Przyczyna: symulator ładuje się zbyt powoli
- </floater.string>
- <floater.string name="smaller_label">
- &gt;&gt;
- </floater.string>
- <floater.string name="bigger_label">
- &lt;&lt;
- </floater.string>
- <button label="" label_selected="" name="client_lagmeter" tool_tip="Status lagów klienta"/>
- <text name="client">
- Klient
- </text>
- <text name="client_text">
- W normie
- </text>
- <button label="" label_selected="" name="network_lagmeter" tool_tip="Network lag status"/>
- <text name="network">
- Sieć
- </text>
- <text name="network_text">
- W normie
- </text>
- <button label="" label_selected="" name="server_lagmeter" tool_tip="Server lag status"/>
- <text name="server">
- Serwer
- </text>
- <text name="server_text">
- W normie
- </text>
- <button label="&gt;&gt;" name="minimize" tool_tip="Złącz rozmiar pliku xml"/>
-</floater>
diff --git a/indra/newview/skins/default/xui/pl/sidepanel_inventory.xml b/indra/newview/skins/default/xui/pl/sidepanel_inventory.xml
index c2e50473a5..1034a06f1f 100755
--- a/indra/newview/skins/default/xui/pl/sidepanel_inventory.xml
+++ b/indra/newview/skins/default/xui/pl/sidepanel_inventory.xml
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<panel label="Rzeczy" name="objects panel">
- <panel label="" name="sidepanel__inventory_panel">
+ <panel label="" name="sidepanel_inventory_panel">
<panel name="button_panel">
<layout_stack name="button_panel_ls">
<layout_panel name="info_btn_lp">
diff --git a/indra/newview/skins/default/xui/pt/floater_lagmeter.xml b/indra/newview/skins/default/xui/pt/floater_lagmeter.xml
deleted file mode 100755
index 9932318293..0000000000
--- a/indra/newview/skins/default/xui/pt/floater_lagmeter.xml
+++ /dev/null
@@ -1,154 +0,0 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<floater name="floater_lagmeter" title="LAG - Índice">
- <floater.string name="max_title_msg">
- Medidor de Atraso
- </floater.string>
- <floater.string name="max_width_px">
- 360
- </floater.string>
- <floater.string name="min_title_msg">
- Atraso
- </floater.string>
- <floater.string name="min_width_px">
- 90
- </floater.string>
- <floater.string name="client_text_msg">
- Cliente
- </floater.string>
- <floater.string name="client_frame_rate_critical_fps">
- 10
- </floater.string>
- <floater.string name="client_frame_rate_warning_fps">
- 15
- </floater.string>
- <floater.string name="client_frame_time_window_bg_msg">
- Normal, janela por baixo
- </floater.string>
- <floater.string name="client_frame_time_critical_msg">
- Taxa de quadros do Cliente abaixo de [CLIENT_FRAME_RATE_CRITICAL]
- </floater.string>
- <floater.string name="client_frame_time_warning_msg">
- Taxa de quadros do Cliente entre [CLIENT_FRAME_RATE_CRITICAL] e [CLIENT_FRAME_RATE_WARNING]
- </floater.string>
- <floater.string name="client_frame_time_normal_msg">
- Normal
- </floater.string>
- <floater.string name="client_draw_distance_cause_msg">
- Causa possível: Distância de desenho ajustada muito alta
- </floater.string>
- <floater.string name="client_texture_loading_cause_msg">
- Causa possível: Carregamento de Imagens
- </floater.string>
- <floater.string name="client_texture_memory_cause_msg">
- Causa possível: Muitas imagens na memória
- </floater.string>
- <floater.string name="client_complex_objects_cause_msg">
- Causa possível: Muitos objetos complexos na cena
- </floater.string>
- <floater.string name="network_text_msg">
- Rede
- </floater.string>
- <floater.string name="network_packet_loss_critical_pct">
- 10
- </floater.string>
- <floater.string name="network_packet_loss_warning_pct">
- 5
- </floater.string>
- <floater.string name="network_packet_loss_critical_msg">
- Conexão está caindo para cerca de [NETWORK_PACKET_LOSS_CRITICAL]% de pacotes
- </floater.string>
- <floater.string name="network_packet_loss_warning_msg">
- Conexão está caindo [NETWORK_PACKET_LOSS_WARNING]%-[NETWORK_PACKET_LOSS_CRITICAL]% de pacotes
- </floater.string>
- <floater.string name="network_performance_normal_msg">
- Normal
- </floater.string>
- <floater.string name="network_ping_critical_ms">
- 600
- </floater.string>
- <floater.string name="network_ping_warning_ms">
- 300
- </floater.string>
- <floater.string name="network_ping_critical_msg">
- Tempo de conexão de ping é cerca de [NETWORK_PING_CRITICAL] ms
- </floater.string>
- <floater.string name="network_ping_warning_msg">
- Tempo de conexão de ping é [NETWORK_PING_WARNING]-[NETWORK_PING_CRITICAL] ms
- </floater.string>
- <floater.string name="network_packet_loss_cause_msg">
- Possível conexão ruim ou &apos;Largura de Banda&apos; escolhida muito alta.
- </floater.string>
- <floater.string name="network_ping_cause_msg">
- Possível conexão ruim ou aplicativos compartilhando arquivos.
- </floater.string>
- <floater.string name="server_text_msg">
- Servidor
- </floater.string>
- <floater.string name="server_frame_rate_critical_fps">
- 20
- </floater.string>
- <floater.string name="server_frame_rate_warning_fps">
- 30
- </floater.string>
- <floater.string name="server_single_process_max_time_ms">
- 20
- </floater.string>
- <floater.string name="server_frame_time_critical_msg">
- Taxa de quadros abaixo de [SERVER_FRAME_RATE_CRITICAL]
- </floater.string>
- <floater.string name="server_frame_time_warning_msg">
- Taxa de quadros entre [SERVER_FRAME_RATE_CRITICAL] e [SERVER_FRAME_RATE_WARNING]
- </floater.string>
- <floater.string name="server_frame_time_normal_msg">
- Normal
- </floater.string>
- <floater.string name="server_physics_cause_msg">
- Causa possível: Muitos objetos físicos
- </floater.string>
- <floater.string name="server_scripts_cause_msg">
- Causa possível: Muitos objetos com scripts
- </floater.string>
- <floater.string name="server_net_cause_msg">
- Causa possível: Muito tráfego na rede
- </floater.string>
- <floater.string name="server_agent_cause_msg">
- Causa possível: Muitas pessoas se movendo na região
- </floater.string>
- <floater.string name="server_images_cause_msg">
- Causa possível: Muitos cálculos de imagem
- </floater.string>
- <floater.string name="server_generic_cause_msg">
- Causa possível: Carga no simulador muito pesada
- </floater.string>
- <floater.string name="smaller_label">
- &gt;&gt;
- </floater.string>
- <floater.string name="bigger_label">
- &lt;&lt;
- </floater.string>
- <button label="" label_selected="" name="client_lagmeter" tool_tip="Status de atraso no Cliente"/>
- <text name="client">
- Cliente
- </text>
- <text font="SansSerifSmall" name="client_text">
- Normal
- </text>
- <text left="30" name="client_lag_cause" right="-10"/>
- <button label="" label_selected="" name="network_lagmeter" tool_tip="Status de atraso na rede"/>
- <text name="network">
- Rede
- </text>
- <text font="SansSerifSmall" name="network_text">
- Normal
- </text>
- <text left="30" name="network_lag_cause" right="-10"/>
- <button label="" label_selected="" name="server_lagmeter" tool_tip="Status de atraso no servidor"/>
- <text name="server">
- Servidor
- </text>
- <text font="SansSerifSmall" name="server_text">
- Normal
- </text>
- <text left="30" name="server_lag_cause" right="-32"/>
- <button label="&gt;&gt;" name="minimize" tool_tip="Alternar o tamanho da janela"/>
-</floater>
diff --git a/indra/newview/skins/default/xui/pt/sidepanel_inventory.xml b/indra/newview/skins/default/xui/pt/sidepanel_inventory.xml
index 7908ea5f3a..c44345323f 100755
--- a/indra/newview/skins/default/xui/pt/sidepanel_inventory.xml
+++ b/indra/newview/skins/default/xui/pt/sidepanel_inventory.xml
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<panel label="Coisas" name="objects panel">
- <panel label="" name="sidepanel__inventory_panel">
+ <panel label="" name="sidepanel_inventory_panel">
<layout_stack name="inventory_layout_stack">
<layout_panel name="inbox_layout_panel">
<panel label="" name="marketplace_inbox">
diff --git a/indra/newview/skins/default/xui/ru/floater_lagmeter.xml b/indra/newview/skins/default/xui/ru/floater_lagmeter.xml
deleted file mode 100755
index c420006a03..0000000000
--- a/indra/newview/skins/default/xui/ru/floater_lagmeter.xml
+++ /dev/null
@@ -1,151 +0,0 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<floater name="floater_lagmeter" title="УРОВЕНЬ ЛАГОВ">
- <floater.string name="max_title_msg">
- Уровень лагов
- </floater.string>
- <floater.string name="max_width_px">
- 360
- </floater.string>
- <floater.string name="min_title_msg">
- Лаг
- </floater.string>
- <floater.string name="min_width_px">
- 90
- </floater.string>
- <floater.string name="client_text_msg">
- Клиент
- </floater.string>
- <floater.string name="client_frame_rate_critical_fps">
- 10
- </floater.string>
- <floater.string name="client_frame_rate_warning_fps">
- 15
- </floater.string>
- <floater.string name="client_frame_time_window_bg_msg">
- Нормально, окно в фоне
- </floater.string>
- <floater.string name="client_frame_time_critical_msg">
- Частота кадров клиента ниже [CLIENT_FRAME_RATE_CRITICAL]
- </floater.string>
- <floater.string name="client_frame_time_warning_msg">
- Частота кадров клиента от [CLIENT_FRAME_RATE_CRITICAL] до [CLIENT_FRAME_RATE_WARNING]
- </floater.string>
- <floater.string name="client_frame_time_normal_msg">
- Нормально
- </floater.string>
- <floater.string name="client_draw_distance_cause_msg">
- Возможная причина: дальность отрисовки слишком велика
- </floater.string>
- <floater.string name="client_texture_loading_cause_msg">
- Возможная причина: загрузка изображений
- </floater.string>
- <floater.string name="client_texture_memory_cause_msg">
- Возможная причина: слишком много изображений в памяти
- </floater.string>
- <floater.string name="client_complex_objects_cause_msg">
- Возможная причина: слишком много сложных объектов в сцене
- </floater.string>
- <floater.string name="network_text_msg">
- Сеть
- </floater.string>
- <floater.string name="network_packet_loss_critical_pct">
- 10
- </floater.string>
- <floater.string name="network_packet_loss_warning_pct">
- 5
- </floater.string>
- <floater.string name="network_packet_loss_critical_msg">
- Сеть теряет более [NETWORK_PACKET_LOSS_CRITICAL]% пакетов
- </floater.string>
- <floater.string name="network_packet_loss_warning_msg">
- Сеть теряет [NETWORK_PACKET_LOSS_WARNING]–[NETWORK_PACKET_LOSS_CRITICAL]% пакетов
- </floater.string>
- <floater.string name="network_performance_normal_msg">
- Нормально
- </floater.string>
- <floater.string name="network_ping_critical_ms">
- 600
- </floater.string>
- <floater.string name="network_ping_warning_ms">
- 300
- </floater.string>
- <floater.string name="network_ping_critical_msg">
- Пинг соединения более [NETWORK_PING_CRITICAL] мс
- </floater.string>
- <floater.string name="network_ping_warning_msg">
- Пинг соединения [NETWORK_PING_WARNING]–[NETWORK_PING_CRITICAL] мс
- </floater.string>
- <floater.string name="network_packet_loss_cause_msg">
- Возможно, плохое соединение, или параметр «Ширина канала» слишком велик.
- </floater.string>
- <floater.string name="network_ping_cause_msg">
- Возможно, плохое соединение или есть работающие файлообменные программы.
- </floater.string>
- <floater.string name="server_text_msg">
- Сервер
- </floater.string>
- <floater.string name="server_frame_rate_critical_fps">
- 20
- </floater.string>
- <floater.string name="server_frame_rate_warning_fps">
- 30
- </floater.string>
- <floater.string name="server_single_process_max_time_ms">
- 20
- </floater.string>
- <floater.string name="server_frame_time_critical_msg">
- Частота кадров сервера ниже [SERVER_FRAME_RATE_CRITICAL]
- </floater.string>
- <floater.string name="server_frame_time_warning_msg">
- Частота кадров сервера [SERVER_FRAME_RATE_CRITICAL]–[SERVER_FRAME_RATE_WARNING]
- </floater.string>
- <floater.string name="server_frame_time_normal_msg">
- Нормально
- </floater.string>
- <floater.string name="server_physics_cause_msg">
- Возможная причина: слишком много физических объектов
- </floater.string>
- <floater.string name="server_scripts_cause_msg">
- Возможная причина: слишком много скриптовых объектов
- </floater.string>
- <floater.string name="server_net_cause_msg">
- Возможная причина: слишком большой сетевой трафик
- </floater.string>
- <floater.string name="server_agent_cause_msg">
- Возможная причина: слишком много людей в регионе
- </floater.string>
- <floater.string name="server_images_cause_msg">
- Возможная причина: слишком много изображений
- </floater.string>
- <floater.string name="server_generic_cause_msg">
- Возможная причина: сервер сильно загружен
- </floater.string>
- <floater.string name="smaller_label">
- &gt;&gt;
- </floater.string>
- <floater.string name="bigger_label">
- &lt;&lt;
- </floater.string>
- <button name="client_lagmeter" tool_tip="Уровень лагов клиента"/>
- <text name="client">
- Клиент
- </text>
- <text name="client_text">
- Нормально
- </text>
- <button name="network_lagmeter" tool_tip="Уровень лагов сети"/>
- <text name="network">
- Сеть
- </text>
- <text name="network_text">
- Нормально
- </text>
- <button name="server_lagmeter" tool_tip="Уровень лагов сервера"/>
- <text name="server">
- Сервер
- </text>
- <text name="server_text">
- Нормально
- </text>
- <button label="&gt;&gt;" name="minimize" tool_tip="Переключение размера"/>
-</floater>
diff --git a/indra/newview/skins/default/xui/ru/sidepanel_inventory.xml b/indra/newview/skins/default/xui/ru/sidepanel_inventory.xml
index c106c2de79..1741f63074 100755
--- a/indra/newview/skins/default/xui/ru/sidepanel_inventory.xml
+++ b/indra/newview/skins/default/xui/ru/sidepanel_inventory.xml
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<panel label="Вещи" name="objects panel">
- <panel label="" name="sidepanel__inventory_panel">
+ <panel label="" name="sidepanel_inventory_panel">
<layout_stack name="inventory_layout_stack">
<layout_panel name="inbox_layout_panel">
<panel label="" name="marketplace_inbox">
diff --git a/indra/newview/skins/default/xui/tr/floater_lagmeter.xml b/indra/newview/skins/default/xui/tr/floater_lagmeter.xml
deleted file mode 100755
index 736c50be90..0000000000
--- a/indra/newview/skins/default/xui/tr/floater_lagmeter.xml
+++ /dev/null
@@ -1,151 +0,0 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<floater name="floater_lagmeter" title="GECİKME ÖLÇER">
- <floater.string name="max_title_msg">
- Gecikme Ölçer
- </floater.string>
- <floater.string name="max_width_px">
- 360
- </floater.string>
- <floater.string name="min_title_msg">
- Gecikme
- </floater.string>
- <floater.string name="min_width_px">
- 90
- </floater.string>
- <floater.string name="client_text_msg">
- İstemci
- </floater.string>
- <floater.string name="client_frame_rate_critical_fps">
- 10
- </floater.string>
- <floater.string name="client_frame_rate_warning_fps">
- 15
- </floater.string>
- <floater.string name="client_frame_time_window_bg_msg">
- Normal, pencere alt zeminde
- </floater.string>
- <floater.string name="client_frame_time_critical_msg">
- İstemci kare hızı [CLIENT_FRAME_RATE_CRITICAL] altında
- </floater.string>
- <floater.string name="client_frame_time_warning_msg">
- İstemci kare hızı [CLIENT_FRAME_RATE_CRITICAL] ile [CLIENT_FRAME_RATE_WARNING] arasınad
- </floater.string>
- <floater.string name="client_frame_time_normal_msg">
- Normal
- </floater.string>
- <floater.string name="client_draw_distance_cause_msg">
- Muhtemel neden: Çizme mesafesi çok yüksek
- </floater.string>
- <floater.string name="client_texture_loading_cause_msg">
- Muhtemel neden: Görüntüler yükleniyor
- </floater.string>
- <floater.string name="client_texture_memory_cause_msg">
- Muhtemel neden: Bellekte çok fazla görüntü
- </floater.string>
- <floater.string name="client_complex_objects_cause_msg">
- Muhtemel neden: Sahnede çok fazla karmaşık nesne
- </floater.string>
- <floater.string name="network_text_msg">
- Ağ
- </floater.string>
- <floater.string name="network_packet_loss_critical_pct">
- 10
- </floater.string>
- <floater.string name="network_packet_loss_warning_pct">
- 5
- </floater.string>
- <floater.string name="network_packet_loss_critical_msg">
- Bağlantı paketlerin % [NETWORK_PACKET_LOSS_CRITICAL]&apos;sinden fazlasını bırakıyor
- </floater.string>
- <floater.string name="network_packet_loss_warning_msg">
- Bağlantı paketlerin % [NETWORK_PACKET_LOSS_WARNING]%-[NETWORK_PACKET_LOSS_CRITICAL]&apos;sini bırakıyor
- </floater.string>
- <floater.string name="network_performance_normal_msg">
- Normal
- </floater.string>
- <floater.string name="network_ping_critical_ms">
- 600
- </floater.string>
- <floater.string name="network_ping_warning_ms">
- 300
- </floater.string>
- <floater.string name="network_ping_critical_msg">
- Bağlantı ping süresi [NETWORK_PING_CRITICAL] ms.den fazla
- </floater.string>
- <floater.string name="network_ping_warning_msg">
- Bağlantı ping süresi [NETWORK_PING_WARNING]-[NETWORK_PING_CRITICAL] ms
- </floater.string>
- <floater.string name="network_packet_loss_cause_msg">
- Muhtemel yetersiz bağlantı veya &apos;Bant Genişliği&apos; tercihi çok yüksek.
- </floater.string>
- <floater.string name="network_ping_cause_msg">
- Muhtemel yetersiz bağlantı veya dosya paylaşım uygulaması.
- </floater.string>
- <floater.string name="server_text_msg">
- Sunucu
- </floater.string>
- <floater.string name="server_frame_rate_critical_fps">
- 20
- </floater.string>
- <floater.string name="server_frame_rate_warning_fps">
- 30
- </floater.string>
- <floater.string name="server_single_process_max_time_ms">
- 20
- </floater.string>
- <floater.string name="server_frame_time_critical_msg">
- Simülatör kare hızı [SERVER_FRAME_RATE_CRITICAL] altında
- </floater.string>
- <floater.string name="server_frame_time_warning_msg">
- Simülatör kare hızı [SERVER_FRAME_RATE_CRITICAL] ve [SERVER_FRAME_RATE_WARNING] arasında
- </floater.string>
- <floater.string name="server_frame_time_normal_msg">
- Normal
- </floater.string>
- <floater.string name="server_physics_cause_msg">
- Muhtemel Neden: Çok fazla fiziki nesne
- </floater.string>
- <floater.string name="server_scripts_cause_msg">
- Muhtemel Neden: Çok fazla komut dosyalı nesne
- </floater.string>
- <floater.string name="server_net_cause_msg">
- Muhtemel Neden: Çok fazla ağ trafiği
- </floater.string>
- <floater.string name="server_agent_cause_msg">
- Muhtemel Neden: Bölgede hareket eden çok fazla insan var
- </floater.string>
- <floater.string name="server_images_cause_msg">
- Muhtemel Neden: Çok fazla görüntü hesabı
- </floater.string>
- <floater.string name="server_generic_cause_msg">
- Muhtemel Neden: Simülatör yükü çok ağır
- </floater.string>
- <floater.string name="smaller_label">
- &gt;&gt;
- </floater.string>
- <floater.string name="bigger_label">
- &lt;&lt;
- </floater.string>
- <button name="client_lagmeter" tool_tip="İstemci gecikme durumu"/>
- <text name="client">
- İstemci
- </text>
- <text name="client_text">
- Normal
- </text>
- <button name="network_lagmeter" tool_tip="Ağ gecikme durumu"/>
- <text name="network">
- Ağ
- </text>
- <text name="network_text">
- Normal
- </text>
- <button name="server_lagmeter" tool_tip="Sunucu gecikme durumu"/>
- <text name="server">
- Sunucu
- </text>
- <text name="server_text">
- Normal
- </text>
- <button label="&gt;&gt;" name="minimize" tool_tip="Gezdirici büyüklüğünü değiştir"/>
-</floater>
diff --git a/indra/newview/skins/default/xui/tr/sidepanel_inventory.xml b/indra/newview/skins/default/xui/tr/sidepanel_inventory.xml
index 938b5a76d8..3241d52c81 100755
--- a/indra/newview/skins/default/xui/tr/sidepanel_inventory.xml
+++ b/indra/newview/skins/default/xui/tr/sidepanel_inventory.xml
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<panel label="Eşyalar" name="objects panel">
- <panel label="" name="sidepanel__inventory_panel">
+ <panel label="" name="sidepanel_inventory_panel">
<layout_stack name="inventory_layout_stack">
<layout_panel name="inbox_layout_panel">
<panel label="" name="marketplace_inbox">
diff --git a/indra/newview/skins/default/xui/zh/floater_lagmeter.xml b/indra/newview/skins/default/xui/zh/floater_lagmeter.xml
deleted file mode 100755
index e9a082288a..0000000000
--- a/indra/newview/skins/default/xui/zh/floater_lagmeter.xml
+++ /dev/null
@@ -1,151 +0,0 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<floater name="floater_lagmeter" title="LAG 測量器">
- <floater.string name="max_title_msg">
- Lag 測量器
- </floater.string>
- <floater.string name="max_width_px">
- 360
- </floater.string>
- <floater.string name="min_title_msg">
- 延遲
- </floater.string>
- <floater.string name="min_width_px">
- 90
- </floater.string>
- <floater.string name="client_text_msg">
- 客戶端
- </floater.string>
- <floater.string name="client_frame_rate_critical_fps">
- 10
- </floater.string>
- <floater.string name="client_frame_rate_warning_fps">
- 15
- </floater.string>
- <floater.string name="client_frame_time_window_bg_msg">
- 正常,視窗位於背景
- </floater.string>
- <floater.string name="client_frame_time_critical_msg">
- 客戶端幀率低於 [CLIENT_FRAME_RATE_CRITICAL]
- </floater.string>
- <floater.string name="client_frame_time_warning_msg">
- 客戶端幀率介於 [CLIENT_FRAME_RATE_CRITICAL] 和 [CLIENT_FRAME_RATE_WARNING] 之間
- </floater.string>
- <floater.string name="client_frame_time_normal_msg">
- 正常
- </floater.string>
- <floater.string name="client_draw_distance_cause_msg">
- 可能原因:可視距離設得太遠
- </floater.string>
- <floater.string name="client_texture_loading_cause_msg">
- 可能原因:正在載入圖像
- </floater.string>
- <floater.string name="client_texture_memory_cause_msg">
- 可能原因:記憶體裡圖像太多
- </floater.string>
- <floater.string name="client_complex_objects_cause_msg">
- 可能原因:場景內複雜物件太多
- </floater.string>
- <floater.string name="network_text_msg">
- 網路
- </floater.string>
- <floater.string name="network_packet_loss_critical_pct">
- 10
- </floater.string>
- <floater.string name="network_packet_loss_warning_pct">
- 5
- </floater.string>
- <floater.string name="network_packet_loss_critical_msg">
- 這次連通丟失了至少 [NETWORK_PACKET_LOSS_CRITICAL]% 的封包
- </floater.string>
- <floater.string name="network_packet_loss_warning_msg">
- 這次連通丟失了 [NETWORK_PACKET_LOSS_WARNING]%-[NETWORK_PACKET_LOSS_CRITICAL]% 的封包
- </floater.string>
- <floater.string name="network_performance_normal_msg">
- 正常
- </floater.string>
- <floater.string name="network_ping_critical_ms">
- 600
- </floater.string>
- <floater.string name="network_ping_warning_ms">
- 300
- </floater.string>
- <floater.string name="network_ping_critical_msg">
- 探測連通回應時間超過 [NETWORK_PING_CRITICAL] 毫秒
- </floater.string>
- <floater.string name="network_ping_warning_msg">
- 探測連通回應時間為 [NETWORK_PING_WARNING]-[NETWORK_PING_CRITICAL] 毫秒
- </floater.string>
- <floater.string name="network_packet_loss_cause_msg">
- 可能連通不良,或所設的偏好連通頻寬過高。
- </floater.string>
- <floater.string name="network_ping_cause_msg">
- 可能連通不良,或使用檔案分享應用程式。
- </floater.string>
- <floater.string name="server_text_msg">
- 伺服器
- </floater.string>
- <floater.string name="server_frame_rate_critical_fps">
- 20
- </floater.string>
- <floater.string name="server_frame_rate_warning_fps">
- 30
- </floater.string>
- <floater.string name="server_single_process_max_time_ms">
- 20
- </floater.string>
- <floater.string name="server_frame_time_critical_msg">
- 模擬器 framerate 低於 [SERVER_FRAME_RATE_CRITICAL]
- </floater.string>
- <floater.string name="server_frame_time_warning_msg">
- 模擬器 framerate 介於 [SERVER_FRAME_RATE_CRITICAL] 與 [SERVER_FRAME_RATE_WARNING] 之間
- </floater.string>
- <floater.string name="server_frame_time_normal_msg">
- 正常
- </floater.string>
- <floater.string name="server_physics_cause_msg">
- 可能原因:太多物理物件
- </floater.string>
- <floater.string name="server_scripts_cause_msg">
- 可能原因:太多腳本物件
- </floater.string>
- <floater.string name="server_net_cause_msg">
- 可能原因:太多網路流量
- </floater.string>
- <floater.string name="server_agent_cause_msg">
- 可能原因:地區有太多移動的人
- </floater.string>
- <floater.string name="server_images_cause_msg">
- 可能原因:太多圖像計算
- </floater.string>
- <floater.string name="server_generic_cause_msg">
- 可能原因:模擬器負載過重
- </floater.string>
- <floater.string name="smaller_label">
- &gt;&gt;
- </floater.string>
- <floater.string name="bigger_label">
- &lt;&lt;
- </floater.string>
- <button name="client_lagmeter" tool_tip="客戶端 lag 狀態"/>
- <text name="client">
- 客戶端
- </text>
- <text name="client_text">
- 正常
- </text>
- <button name="network_lagmeter" tool_tip="網路 lag 狀態"/>
- <text name="network">
- 網路
- </text>
- <text name="network_text">
- 正常
- </text>
- <button name="server_lagmeter" tool_tip="伺服器 lag 狀態"/>
- <text name="server">
- 伺服器
- </text>
- <text name="server_text">
- 正常
- </text>
- <button label="&gt;&gt;" name="minimize" tool_tip="切換浮動視窗尺寸"/>
-</floater>
diff --git a/indra/newview/skins/default/xui/zh/sidepanel_inventory.xml b/indra/newview/skins/default/xui/zh/sidepanel_inventory.xml
index c8aae15011..4034a7154f 100755
--- a/indra/newview/skins/default/xui/zh/sidepanel_inventory.xml
+++ b/indra/newview/skins/default/xui/zh/sidepanel_inventory.xml
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<panel label="事物" name="objects panel">
- <panel label="" name="sidepanel__inventory_panel">
+ <panel label="" name="sidepanel_inventory_panel">
<layout_stack name="inventory_layout_stack">
<layout_panel name="inbox_layout_panel">
<panel label="" name="marketplace_inbox">
diff --git a/indra/newview/tests/llcapabilitylistener_test.cpp b/indra/newview/tests/llcapabilitylistener_test.cpp
index e1cbd28f92..bde991a01e 100755
--- a/indra/newview/tests/llcapabilitylistener_test.cpp
+++ b/indra/newview/tests/llcapabilitylistener_test.cpp
@@ -134,10 +134,10 @@ namespace tut
std::string threw;
try
{
- WrapLL_ERRS capture;
+ WrapLLErrs capture;
regionPump.post(request);
}
- catch (const WrapLL_ERRS::FatalException& e)
+ catch (const WrapLLErrs::FatalException& e)
{
threw = e.what();
}
@@ -181,10 +181,10 @@ namespace tut
std::string threw;
try
{
- WrapLL_ERRS capture;
+ WrapLLErrs capture;
regionPump.post(request);
}
- catch (const WrapLL_ERRS::FatalException& e)
+ catch (const WrapLLErrs::FatalException& e)
{
threw = e.what();
}
@@ -243,10 +243,10 @@ namespace tut
std::string threw;
try
{
- WrapLL_ERRS capture;
+ WrapLLErrs capture;
regionPump.post(request);
}
- catch (const WrapLL_ERRS::FatalException& e)
+ catch (const WrapLLErrs::FatalException& e)
{
threw = e.what();
}
diff --git a/indra/newview/tests/llsimplestat_test.cpp b/indra/newview/tests/llsimplestat_test.cpp
deleted file mode 100755
index b556941f4a..0000000000
--- a/indra/newview/tests/llsimplestat_test.cpp
+++ /dev/null
@@ -1,580 +0,0 @@
-/**
- * @file llsimplestats_test.cpp
- * @date 2010-10-22
- * @brief Test cases for some of llsimplestat.h
- *
- * $LicenseInfo:firstyear=2010&license=viewerlgpl$
- * Second Life Viewer Source Code
- * Copyright (C) 2010, Linden Research, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation;
- * version 2.1 of the License only.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- *
- * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
- * $/LicenseInfo$
- */
-
-#include "linden_common.h"
-
-#include <tut/tut.hpp>
-
-#include "lltut.h"
-#include "../llsimplestat.h"
-#include "llsd.h"
-#include "llmath.h"
-
-// @brief Used as a pointer cast type to get access to LLSimpleStatCounter
-class TutStatCounter: public LLSimpleStatCounter
-{
-public:
- TutStatCounter(); // Not defined
- ~TutStatCounter(); // Not defined
- void operator=(const TutStatCounter &); // Not defined
-
- void setRawCount(U32 c) { mCount = c; }
- U32 getRawCount() const { return mCount; }
-};
-
-
-namespace tut
-{
- struct stat_counter_index
- {};
- typedef test_group<stat_counter_index> stat_counter_index_t;
- typedef stat_counter_index_t::object stat_counter_index_object_t;
- tut::stat_counter_index_t tut_stat_counter_index("stat_counter_test");
-
- // Testing LLSimpleStatCounter's external interface
- template<> template<>
- void stat_counter_index_object_t::test<1>()
- {
- LLSimpleStatCounter c1;
- ensure("Initialized counter is zero", (0 == c1.getCount()));
-
- ensure("Counter increment return is 1", (1 == ++c1));
- ensure("Counter increment return is 2", (2 == ++c1));
-
- ensure("Current counter is 2", (2 == c1.getCount()));
-
- c1.reset();
- ensure("Counter is 0 after reset", (0 == c1.getCount()));
-
- ensure("Counter increment return is 1", (1 == ++c1));
- }
-
- // Testing LLSimpleStatCounter's internal state
- template<> template<>
- void stat_counter_index_object_t::test<2>()
- {
- LLSimpleStatCounter c1;
- TutStatCounter * tc1 = (TutStatCounter *) &c1;
-
- ensure("Initialized private counter is zero", (0 == tc1->getRawCount()));
-
- ++c1;
- ++c1;
-
- ensure("Current private counter is 2", (2 == tc1->getRawCount()));
-
- c1.reset();
- ensure("Raw counter is 0 after reset", (0 == tc1->getRawCount()));
- }
-
- // Testing LLSimpleStatCounter's wrapping behavior
- template<> template<>
- void stat_counter_index_object_t::test<3>()
- {
- LLSimpleStatCounter c1;
- TutStatCounter * tc1 = (TutStatCounter *) &c1;
-
- tc1->setRawCount(U32_MAX);
- ensure("Initialized private counter is zero", (U32_MAX == c1.getCount()));
-
- ensure("Increment of max value wraps to 0", (0 == ++c1));
- }
-
- // Testing LLSimpleStatMMM's external behavior
- template<> template<>
- void stat_counter_index_object_t::test<4>()
- {
- LLSimpleStatMMM<> m1;
- typedef LLSimpleStatMMM<>::Value lcl_float;
- lcl_float zero(0);
-
- // Freshly-constructed
- ensure("Constructed MMM<> has 0 count", (0 == m1.getCount()));
- ensure("Constructed MMM<> has 0 min", (zero == m1.getMin()));
- ensure("Constructed MMM<> has 0 max", (zero == m1.getMax()));
- ensure("Constructed MMM<> has 0 mean no div-by-zero", (zero == m1.getMean()));
-
- // Single insert
- m1.record(1.0);
- ensure("Single insert MMM<> has 1 count", (1 == m1.getCount()));
- ensure("Single insert MMM<> has 1.0 min", (1.0 == m1.getMin()));
- ensure("Single insert MMM<> has 1.0 max", (1.0 == m1.getMax()));
- ensure("Single insert MMM<> has 1.0 mean", (1.0 == m1.getMean()));
-
- // Second insert
- m1.record(3.0);
- ensure("2nd insert MMM<> has 2 count", (2 == m1.getCount()));
- ensure("2nd insert MMM<> has 1.0 min", (1.0 == m1.getMin()));
- ensure("2nd insert MMM<> has 3.0 max", (3.0 == m1.getMax()));
- ensure_approximately_equals("2nd insert MMM<> has 2.0 mean", m1.getMean(), lcl_float(2.0), 1);
-
- // Third insert
- m1.record(5.0);
- ensure("3rd insert MMM<> has 3 count", (3 == m1.getCount()));
- ensure("3rd insert MMM<> has 1.0 min", (1.0 == m1.getMin()));
- ensure("3rd insert MMM<> has 5.0 max", (5.0 == m1.getMax()));
- ensure_approximately_equals("3rd insert MMM<> has 3.0 mean", m1.getMean(), lcl_float(3.0), 1);
-
- // Fourth insert
- m1.record(1000000.0);
- ensure("4th insert MMM<> has 4 count", (4 == m1.getCount()));
- ensure("4th insert MMM<> has 1.0 min", (1.0 == m1.getMin()));
- ensure("4th insert MMM<> has 100000.0 max", (1000000.0 == m1.getMax()));
- ensure_approximately_equals("4th insert MMM<> has 250002.0 mean", m1.getMean(), lcl_float(250002.0), 1);
-
- // Reset
- m1.reset();
- ensure("Reset MMM<> has 0 count", (0 == m1.getCount()));
- ensure("Reset MMM<> has 0 min", (zero == m1.getMin()));
- ensure("Reset MMM<> has 0 max", (zero == m1.getMax()));
- ensure("Reset MMM<> has 0 mean no div-by-zero", (zero == m1.getMean()));
- }
-
- // Testing LLSimpleStatMMM's response to large values
- template<> template<>
- void stat_counter_index_object_t::test<5>()
- {
- LLSimpleStatMMM<> m1;
- typedef LLSimpleStatMMM<>::Value lcl_float;
- lcl_float zero(0);
-
- // Insert overflowing values
- const lcl_float bignum(F32_MAX / 2);
-
- m1.record(bignum);
- m1.record(bignum);
- m1.record(bignum);
- m1.record(bignum);
- m1.record(bignum);
- m1.record(bignum);
- m1.record(bignum);
- m1.record(zero);
-
- ensure("Overflowed MMM<> has 8 count", (8 == m1.getCount()));
- ensure("Overflowed MMM<> has 0 min", (zero == m1.getMin()));
- ensure("Overflowed MMM<> has huge max", (bignum == m1.getMax()));
- ensure("Overflowed MMM<> has fetchable mean", (1.0 == m1.getMean() || true));
- // We should be infinte but not interested in proving the IEEE standard here.
- LLSD sd1(m1.getMean());
- // std::cout << "Thingy: " << m1.getMean() << " and as LLSD: " << sd1 << std::endl;
- ensure("Overflowed MMM<> produces LLSDable Real", (sd1.isReal()));
- }
-
- // Testing LLSimpleStatMMM<F32>'s external behavior
- template<> template<>
- void stat_counter_index_object_t::test<6>()
- {
- LLSimpleStatMMM<F32> m1;
- typedef LLSimpleStatMMM<F32>::Value lcl_float;
- lcl_float zero(0);
-
- // Freshly-constructed
- ensure("Constructed MMM<F32> has 0 count", (0 == m1.getCount()));
- ensure("Constructed MMM<F32> has 0 min", (zero == m1.getMin()));
- ensure("Constructed MMM<F32> has 0 max", (zero == m1.getMax()));
- ensure("Constructed MMM<F32> has 0 mean no div-by-zero", (zero == m1.getMean()));
-
- // Single insert
- m1.record(1.0);
- ensure("Single insert MMM<F32> has 1 count", (1 == m1.getCount()));
- ensure("Single insert MMM<F32> has 1.0 min", (1.0 == m1.getMin()));
- ensure("Single insert MMM<F32> has 1.0 max", (1.0 == m1.getMax()));
- ensure("Single insert MMM<F32> has 1.0 mean", (1.0 == m1.getMean()));
-
- // Second insert
- m1.record(3.0);
- ensure("2nd insert MMM<F32> has 2 count", (2 == m1.getCount()));
- ensure("2nd insert MMM<F32> has 1.0 min", (1.0 == m1.getMin()));
- ensure("2nd insert MMM<F32> has 3.0 max", (3.0 == m1.getMax()));
- ensure_approximately_equals("2nd insert MMM<F32> has 2.0 mean", m1.getMean(), lcl_float(2.0), 1);
-
- // Third insert
- m1.record(5.0);
- ensure("3rd insert MMM<F32> has 3 count", (3 == m1.getCount()));
- ensure("3rd insert MMM<F32> has 1.0 min", (1.0 == m1.getMin()));
- ensure("3rd insert MMM<F32> has 5.0 max", (5.0 == m1.getMax()));
- ensure_approximately_equals("3rd insert MMM<F32> has 3.0 mean", m1.getMean(), lcl_float(3.0), 1);
-
- // Fourth insert
- m1.record(1000000.0);
- ensure("4th insert MMM<F32> has 4 count", (4 == m1.getCount()));
- ensure("4th insert MMM<F32> has 1.0 min", (1.0 == m1.getMin()));
- ensure("4th insert MMM<F32> has 1000000.0 max", (1000000.0 == m1.getMax()));
- ensure_approximately_equals("4th insert MMM<F32> has 250002.0 mean", m1.getMean(), lcl_float(250002.0), 1);
-
- // Reset
- m1.reset();
- ensure("Reset MMM<F32> has 0 count", (0 == m1.getCount()));
- ensure("Reset MMM<F32> has 0 min", (zero == m1.getMin()));
- ensure("Reset MMM<F32> has 0 max", (zero == m1.getMax()));
- ensure("Reset MMM<F32> has 0 mean no div-by-zero", (zero == m1.getMean()));
- }
-
- // Testing LLSimpleStatMMM's response to large values
- template<> template<>
- void stat_counter_index_object_t::test<7>()
- {
- LLSimpleStatMMM<F32> m1;
- typedef LLSimpleStatMMM<F32>::Value lcl_float;
- lcl_float zero(0);
-
- // Insert overflowing values
- const lcl_float bignum(F32_MAX / 2);
-
- m1.record(bignum);
- m1.record(bignum);
- m1.record(bignum);
- m1.record(bignum);
- m1.record(bignum);
- m1.record(bignum);
- m1.record(bignum);
- m1.record(zero);
-
- ensure("Overflowed MMM<F32> has 8 count", (8 == m1.getCount()));
- ensure("Overflowed MMM<F32> has 0 min", (zero == m1.getMin()));
- ensure("Overflowed MMM<F32> has huge max", (bignum == m1.getMax()));
- ensure("Overflowed MMM<F32> has fetchable mean", (1.0 == m1.getMean() || true));
- // We should be infinte but not interested in proving the IEEE standard here.
- LLSD sd1(m1.getMean());
- // std::cout << "Thingy: " << m1.getMean() << " and as LLSD: " << sd1 << std::endl;
- ensure("Overflowed MMM<F32> produces LLSDable Real", (sd1.isReal()));
- }
-
- // Testing LLSimpleStatMMM<F64>'s external behavior
- template<> template<>
- void stat_counter_index_object_t::test<8>()
- {
- LLSimpleStatMMM<F64> m1;
- typedef LLSimpleStatMMM<F64>::Value lcl_float;
- lcl_float zero(0);
-
- // Freshly-constructed
- ensure("Constructed MMM<F64> has 0 count", (0 == m1.getCount()));
- ensure("Constructed MMM<F64> has 0 min", (zero == m1.getMin()));
- ensure("Constructed MMM<F64> has 0 max", (zero == m1.getMax()));
- ensure("Constructed MMM<F64> has 0 mean no div-by-zero", (zero == m1.getMean()));
-
- // Single insert
- m1.record(1.0);
- ensure("Single insert MMM<F64> has 1 count", (1 == m1.getCount()));
- ensure("Single insert MMM<F64> has 1.0 min", (1.0 == m1.getMin()));
- ensure("Single insert MMM<F64> has 1.0 max", (1.0 == m1.getMax()));
- ensure("Single insert MMM<F64> has 1.0 mean", (1.0 == m1.getMean()));
-
- // Second insert
- m1.record(3.0);
- ensure("2nd insert MMM<F64> has 2 count", (2 == m1.getCount()));
- ensure("2nd insert MMM<F64> has 1.0 min", (1.0 == m1.getMin()));
- ensure("2nd insert MMM<F64> has 3.0 max", (3.0 == m1.getMax()));
- ensure_approximately_equals("2nd insert MMM<F64> has 2.0 mean", m1.getMean(), lcl_float(2.0), 1);
-
- // Third insert
- m1.record(5.0);
- ensure("3rd insert MMM<F64> has 3 count", (3 == m1.getCount()));
- ensure("3rd insert MMM<F64> has 1.0 min", (1.0 == m1.getMin()));
- ensure("3rd insert MMM<F64> has 5.0 max", (5.0 == m1.getMax()));
- ensure_approximately_equals("3rd insert MMM<F64> has 3.0 mean", m1.getMean(), lcl_float(3.0), 1);
-
- // Fourth insert
- m1.record(1000000.0);
- ensure("4th insert MMM<F64> has 4 count", (4 == m1.getCount()));
- ensure("4th insert MMM<F64> has 1.0 min", (1.0 == m1.getMin()));
- ensure("4th insert MMM<F64> has 1000000.0 max", (1000000.0 == m1.getMax()));
- ensure_approximately_equals("4th insert MMM<F64> has 250002.0 mean", m1.getMean(), lcl_float(250002.0), 1);
-
- // Reset
- m1.reset();
- ensure("Reset MMM<F64> has 0 count", (0 == m1.getCount()));
- ensure("Reset MMM<F64> has 0 min", (zero == m1.getMin()));
- ensure("Reset MMM<F64> has 0 max", (zero == m1.getMax()));
- ensure("Reset MMM<F64> has 0 mean no div-by-zero", (zero == m1.getMean()));
- }
-
- // Testing LLSimpleStatMMM's response to large values
- template<> template<>
- void stat_counter_index_object_t::test<9>()
- {
- LLSimpleStatMMM<F64> m1;
- typedef LLSimpleStatMMM<F64>::Value lcl_float;
- lcl_float zero(0);
-
- // Insert overflowing values
- const lcl_float bignum(F64_MAX / 2);
-
- m1.record(bignum);
- m1.record(bignum);
- m1.record(bignum);
- m1.record(bignum);
- m1.record(bignum);
- m1.record(bignum);
- m1.record(bignum);
- m1.record(zero);
-
- ensure("Overflowed MMM<F64> has 8 count", (8 == m1.getCount()));
- ensure("Overflowed MMM<F64> has 0 min", (zero == m1.getMin()));
- ensure("Overflowed MMM<F64> has huge max", (bignum == m1.getMax()));
- ensure("Overflowed MMM<F64> has fetchable mean", (1.0 == m1.getMean() || true));
- // We should be infinte but not interested in proving the IEEE standard here.
- LLSD sd1(m1.getMean());
- // std::cout << "Thingy: " << m1.getMean() << " and as LLSD: " << sd1 << std::endl;
- ensure("Overflowed MMM<F64> produces LLSDable Real", (sd1.isReal()));
- }
-
- // Testing LLSimpleStatMMM<U64>'s external behavior
- template<> template<>
- void stat_counter_index_object_t::test<10>()
- {
- LLSimpleStatMMM<U64> m1;
- typedef LLSimpleStatMMM<U64>::Value lcl_int;
- lcl_int zero(0);
-
- // Freshly-constructed
- ensure("Constructed MMM<U64> has 0 count", (0 == m1.getCount()));
- ensure("Constructed MMM<U64> has 0 min", (zero == m1.getMin()));
- ensure("Constructed MMM<U64> has 0 max", (zero == m1.getMax()));
- ensure("Constructed MMM<U64> has 0 mean no div-by-zero", (zero == m1.getMean()));
-
- // Single insert
- m1.record(1);
- ensure("Single insert MMM<U64> has 1 count", (1 == m1.getCount()));
- ensure("Single insert MMM<U64> has 1 min", (1 == m1.getMin()));
- ensure("Single insert MMM<U64> has 1 max", (1 == m1.getMax()));
- ensure("Single insert MMM<U64> has 1 mean", (1 == m1.getMean()));
-
- // Second insert
- m1.record(3);
- ensure("2nd insert MMM<U64> has 2 count", (2 == m1.getCount()));
- ensure("2nd insert MMM<U64> has 1 min", (1 == m1.getMin()));
- ensure("2nd insert MMM<U64> has 3 max", (3 == m1.getMax()));
- ensure("2nd insert MMM<U64> has 2 mean", (2 == m1.getMean()));
-
- // Third insert
- m1.record(5);
- ensure("3rd insert MMM<U64> has 3 count", (3 == m1.getCount()));
- ensure("3rd insert MMM<U64> has 1 min", (1 == m1.getMin()));
- ensure("3rd insert MMM<U64> has 5 max", (5 == m1.getMax()));
- ensure("3rd insert MMM<U64> has 3 mean", (3 == m1.getMean()));
-
- // Fourth insert
- m1.record(U64L(1000000000000));
- ensure("4th insert MMM<U64> has 4 count", (4 == m1.getCount()));
- ensure("4th insert MMM<U64> has 1 min", (1 == m1.getMin()));
- ensure("4th insert MMM<U64> has 1000000000000ULL max", (U64L(1000000000000) == m1.getMax()));
- ensure("4th insert MMM<U64> has 250000000002ULL mean", (U64L( 250000000002) == m1.getMean()));
-
- // Reset
- m1.reset();
- ensure("Reset MMM<U64> has 0 count", (0 == m1.getCount()));
- ensure("Reset MMM<U64> has 0 min", (zero == m1.getMin()));
- ensure("Reset MMM<U64> has 0 max", (zero == m1.getMax()));
- ensure("Reset MMM<U64> has 0 mean no div-by-zero", (zero == m1.getMean()));
- }
-
- // Testing LLSimpleStatMMM's response to large values
- template<> template<>
- void stat_counter_index_object_t::test<11>()
- {
- LLSimpleStatMMM<U64> m1;
- typedef LLSimpleStatMMM<U64>::Value lcl_int;
- lcl_int zero(0);
-
- // Insert overflowing values
- const lcl_int bignum(U64L(0xffffffffffffffff) / 2);
-
- m1.record(bignum);
- m1.record(bignum);
- m1.record(bignum);
- m1.record(bignum);
- m1.record(bignum);
- m1.record(bignum);
- m1.record(bignum);
- m1.record(zero);
-
- ensure("Overflowed MMM<U64> has 8 count", (8 == m1.getCount()));
- ensure("Overflowed MMM<U64> has 0 min", (zero == m1.getMin()));
- ensure("Overflowed MMM<U64> has huge max", (bignum == m1.getMax()));
- ensure("Overflowed MMM<U64> has fetchable mean", (zero == m1.getMean() || true));
- }
-
- // Testing LLSimpleStatCounter's merge() method
- template<> template<>
- void stat_counter_index_object_t::test<12>()
- {
- LLSimpleStatCounter c1;
- LLSimpleStatCounter c2;
-
- ++c1;
- ++c1;
- ++c1;
- ++c1;
-
- ++c2;
- ++c2;
- c2.merge(c1);
-
- ensure_equals("4 merged into 2 results in 6", 6, c2.getCount());
-
- ensure_equals("Source of merge is undamaged", 4, c1.getCount());
- }
-
- // Testing LLSimpleStatMMM's merge() method
- template<> template<>
- void stat_counter_index_object_t::test<13>()
- {
- LLSimpleStatMMM<> m1;
- LLSimpleStatMMM<> m2;
-
- m1.record(3.5);
- m1.record(4.5);
- m1.record(5.5);
- m1.record(6.5);
-
- m2.record(5.0);
- m2.record(7.0);
- m2.record(9.0);
-
- m2.merge(m1);
-
- ensure_equals("Count after merge (p1)", 7, m2.getCount());
- ensure_approximately_equals("Min after merge (p1)", F32(3.5), m2.getMin(), 22);
- ensure_approximately_equals("Max after merge (p1)", F32(9.0), m2.getMax(), 22);
- ensure_approximately_equals("Mean after merge (p1)", F32(41.000/7.000), m2.getMean(), 22);
-
-
- ensure_equals("Source count of merge is undamaged (p1)", 4, m1.getCount());
- ensure_approximately_equals("Source min of merge is undamaged (p1)", F32(3.5), m1.getMin(), 22);
- ensure_approximately_equals("Source max of merge is undamaged (p1)", F32(6.5), m1.getMax(), 22);
- ensure_approximately_equals("Source mean of merge is undamaged (p1)", F32(5.0), m1.getMean(), 22);
-
- m2.reset();
-
- m2.record(-22.0);
- m2.record(-1.0);
- m2.record(30.0);
-
- m2.merge(m1);
-
- ensure_equals("Count after merge (p2)", 7, m2.getCount());
- ensure_approximately_equals("Min after merge (p2)", F32(-22.0), m2.getMin(), 22);
- ensure_approximately_equals("Max after merge (p2)", F32(30.0), m2.getMax(), 22);
- ensure_approximately_equals("Mean after merge (p2)", F32(27.000/7.000), m2.getMean(), 22);
-
- }
-
- // Testing LLSimpleStatMMM's merge() method when src contributes nothing
- template<> template<>
- void stat_counter_index_object_t::test<14>()
- {
- LLSimpleStatMMM<> m1;
- LLSimpleStatMMM<> m2;
-
- m2.record(5.0);
- m2.record(7.0);
- m2.record(9.0);
-
- m2.merge(m1);
-
- ensure_equals("Count after merge (p1)", 3, m2.getCount());
- ensure_approximately_equals("Min after merge (p1)", F32(5.0), m2.getMin(), 22);
- ensure_approximately_equals("Max after merge (p1)", F32(9.0), m2.getMax(), 22);
- ensure_approximately_equals("Mean after merge (p1)", F32(7.000), m2.getMean(), 22);
-
- ensure_equals("Source count of merge is undamaged (p1)", 0, m1.getCount());
- ensure_approximately_equals("Source min of merge is undamaged (p1)", F32(0), m1.getMin(), 22);
- ensure_approximately_equals("Source max of merge is undamaged (p1)", F32(0), m1.getMax(), 22);
- ensure_approximately_equals("Source mean of merge is undamaged (p1)", F32(0), m1.getMean(), 22);
-
- m2.reset();
-
- m2.record(-22.0);
- m2.record(-1.0);
-
- m2.merge(m1);
-
- ensure_equals("Count after merge (p2)", 2, m2.getCount());
- ensure_approximately_equals("Min after merge (p2)", F32(-22.0), m2.getMin(), 22);
- ensure_approximately_equals("Max after merge (p2)", F32(-1.0), m2.getMax(), 22);
- ensure_approximately_equals("Mean after merge (p2)", F32(-11.5), m2.getMean(), 22);
- }
-
- // Testing LLSimpleStatMMM's merge() method when dst contributes nothing
- template<> template<>
- void stat_counter_index_object_t::test<15>()
- {
- LLSimpleStatMMM<> m1;
- LLSimpleStatMMM<> m2;
-
- m1.record(5.0);
- m1.record(7.0);
- m1.record(9.0);
-
- m2.merge(m1);
-
- ensure_equals("Count after merge (p1)", 3, m2.getCount());
- ensure_approximately_equals("Min after merge (p1)", F32(5.0), m2.getMin(), 22);
- ensure_approximately_equals("Max after merge (p1)", F32(9.0), m2.getMax(), 22);
- ensure_approximately_equals("Mean after merge (p1)", F32(7.000), m2.getMean(), 22);
-
- ensure_equals("Source count of merge is undamaged (p1)", 3, m1.getCount());
- ensure_approximately_equals("Source min of merge is undamaged (p1)", F32(5.0), m1.getMin(), 22);
- ensure_approximately_equals("Source max of merge is undamaged (p1)", F32(9.0), m1.getMax(), 22);
- ensure_approximately_equals("Source mean of merge is undamaged (p1)", F32(7.0), m1.getMean(), 22);
-
- m1.reset();
- m2.reset();
-
- m1.record(-22.0);
- m1.record(-1.0);
-
- m2.merge(m1);
-
- ensure_equals("Count after merge (p2)", 2, m2.getCount());
- ensure_approximately_equals("Min after merge (p2)", F32(-22.0), m2.getMin(), 22);
- ensure_approximately_equals("Max after merge (p2)", F32(-1.0), m2.getMax(), 22);
- ensure_approximately_equals("Mean after merge (p2)", F32(-11.5), m2.getMean(), 22);
- }
-
- // Testing LLSimpleStatMMM's merge() method when neither dst nor src contributes
- template<> template<>
- void stat_counter_index_object_t::test<16>()
- {
- LLSimpleStatMMM<> m1;
- LLSimpleStatMMM<> m2;
-
- m2.merge(m1);
-
- ensure_equals("Count after merge (p1)", 0, m2.getCount());
- ensure_approximately_equals("Min after merge (p1)", F32(0), m2.getMin(), 22);
- ensure_approximately_equals("Max after merge (p1)", F32(0), m2.getMax(), 22);
- ensure_approximately_equals("Mean after merge (p1)", F32(0), m2.getMean(), 22);
-
- ensure_equals("Source count of merge is undamaged (p1)", 0, m1.getCount());
- ensure_approximately_equals("Source min of merge is undamaged (p1)", F32(0), m1.getMin(), 22);
- ensure_approximately_equals("Source max of merge is undamaged (p1)", F32(0), m1.getMax(), 22);
- ensure_approximately_equals("Source mean of merge is undamaged (p1)", F32(0), m1.getMean(), 22);
- }
-}
diff --git a/indra/newview/tests/lltexturestatsuploader_test.cpp b/indra/newview/tests/lltexturestatsuploader_test.cpp
index cfb2c267cc..4438523022 100755
--- a/indra/newview/tests/lltexturestatsuploader_test.cpp
+++ b/indra/newview/tests/lltexturestatsuploader_test.cpp
@@ -111,7 +111,7 @@ namespace tut
void texturestatsuploader_object_t::test<1>()
{
LLTextureStatsUploader tsu;
- llinfos << &tsu << llendl;
+ LL_INFOS() << &tsu << LL_ENDL;
ensure("have we crashed?", true);
}
diff --git a/indra/newview/tests/llviewerassetstats_test.cpp b/indra/newview/tests/llviewerassetstats_test.cpp
index a331d9aa9e..a08e32cb49 100755
--- a/indra/newview/tests/llviewerassetstats_test.cpp
+++ b/indra/newview/tests/llviewerassetstats_test.cpp
@@ -35,8 +35,38 @@
#include "lluuid.h"
#include "llsdutil.h"
#include "llregionhandle.h"
+#include "lltracethreadrecorder.h"
#include "../llvoavatar.h"
+namespace LLStatViewer
+{
+ LLTrace::SampleStatHandle<> FPS_SAMPLE("fpssample");
+}
+
+void LLVOAvatar::getNearbyRezzedStats(std::vector<S32>& counts)
+{
+ counts.resize(3);
+ counts[0] = 0;
+ counts[1] = 0;
+ counts[2] = 1;
+}
+
+// static
+std::string LLVOAvatar::rezStatusToString(S32 rez_status)
+{
+ if (rez_status==0) return "cloud";
+ if (rez_status==1) return "gray";
+ if (rez_status==2) return "textured";
+ return "unknown";
+}
+
+// static
+LLViewerStats::StatsAccumulator& LLViewerStats::PhaseMap::getPhaseStats(const std::string& phase_name)
+{
+ static LLViewerStats::StatsAccumulator junk;
+ return junk;
+}
+
static const char * all_keys[] =
{
"duration",
@@ -199,7 +229,19 @@ get_region(const LLSD & sd, U64 region_handle1)
namespace tut
{
struct tst_viewerassetstats_index
- {};
+ {
+ tst_viewerassetstats_index()
+ {
+ LLTrace::set_master_thread_recorder(&mThreadRecorder);
+ }
+
+ ~tst_viewerassetstats_index()
+ {
+ LLTrace::set_master_thread_recorder(NULL);
+ }
+
+ LLTrace::ThreadRecorder mThreadRecorder;
+ };
typedef test_group<tst_viewerassetstats_index> tst_viewerassetstats_index_t;
typedef tst_viewerassetstats_index_t::object tst_viewerassetstats_index_object_t;
tut::tst_viewerassetstats_index_t tut_tst_viewerassetstats_index("tst_viewerassetstats_test");
@@ -209,24 +251,24 @@ namespace tut
void tst_viewerassetstats_index_object_t::test<1>()
{
// Check that helpers aren't bothered by missing global stats
- ensure("Global gViewerAssetStatsMain should be NULL", (NULL == gViewerAssetStatsMain));
+ ensure("Global gViewerAssetStats should be NULL", (NULL == gViewerAssetStats));
- LLViewerAssetStatsFF::record_enqueue_main(LLViewerAssetType::AT_TEXTURE, false, false);
+ LLViewerAssetStatsFF::record_enqueue(LLViewerAssetType::AT_TEXTURE, false, false);
- LLViewerAssetStatsFF::record_dequeue_main(LLViewerAssetType::AT_TEXTURE, false, false);
+ LLViewerAssetStatsFF::record_dequeue(LLViewerAssetType::AT_TEXTURE, false, false);
- LLViewerAssetStatsFF::record_response_main(LLViewerAssetType::AT_GESTURE, false, false, 12300000ULL);
+ LLViewerAssetStatsFF::record_response(LLViewerAssetType::AT_GESTURE, false, false, (U64Microseconds)12300000ULL);
}
// Create a non-global instance and check the structure
template<> template<>
void tst_viewerassetstats_index_object_t::test<2>()
{
- ensure("Global gViewerAssetStatsMain should be NULL", (NULL == gViewerAssetStatsMain));
+ ensure("Global gViewerAssetStats should be NULL", (NULL == gViewerAssetStats));
LLViewerAssetStats * it = new LLViewerAssetStats();
- ensure("Global gViewerAssetStatsMain should still be NULL", (NULL == gViewerAssetStatsMain));
+ ensure("Global gViewerAssetStats should still be NULL", (NULL == gViewerAssetStats));
LLSD sd_full = it->asLLSD(false);
@@ -293,16 +335,16 @@ namespace tut
template<> template<>
void tst_viewerassetstats_index_object_t::test<4>()
{
- gViewerAssetStatsMain = new LLViewerAssetStats();
- LLViewerAssetStatsFF::set_region_main(region1_handle);
+ gViewerAssetStats = new LLViewerAssetStats();
+ LLViewerAssetStatsFF::set_region(region1_handle);
- LLViewerAssetStatsFF::record_enqueue_main(LLViewerAssetType::AT_TEXTURE, false, false);
- LLViewerAssetStatsFF::record_dequeue_main(LLViewerAssetType::AT_TEXTURE, false, false);
+ LLViewerAssetStatsFF::record_enqueue(LLViewerAssetType::AT_TEXTURE, false, false);
+ LLViewerAssetStatsFF::record_dequeue(LLViewerAssetType::AT_TEXTURE, false, false);
- LLViewerAssetStatsFF::record_enqueue_main(LLViewerAssetType::AT_BODYPART, false, false);
- LLViewerAssetStatsFF::record_dequeue_main(LLViewerAssetType::AT_BODYPART, false, false);
+ LLViewerAssetStatsFF::record_enqueue(LLViewerAssetType::AT_BODYPART, false, false);
+ LLViewerAssetStatsFF::record_dequeue(LLViewerAssetType::AT_BODYPART, false, false);
- LLSD sd = gViewerAssetStatsMain->asLLSD(false);
+ LLSD sd = gViewerAssetStats->asLLSD(false);
ensure("Correct single-key LLSD map root", is_double_key_map(sd, "regions", "duration"));
ensure("Correct single-slot LLSD array regions", is_single_slot_array(sd["regions"], region1_handle));
sd = sd["regions"][0];
@@ -316,80 +358,38 @@ namespace tut
// Reset and check zeros...
// Reset leaves current region in place
- gViewerAssetStatsMain->reset();
- sd = gViewerAssetStatsMain->asLLSD(false)["regions"][region1_handle_str];
+ gViewerAssetStats->reset();
+ sd = gViewerAssetStats->asLLSD(false)["regions"][region1_handle_str];
- delete gViewerAssetStatsMain;
- gViewerAssetStatsMain = NULL;
+ delete gViewerAssetStats;
+ gViewerAssetStats = NULL;
ensure("sd[get_texture_non_temp_udp][enqueued] is reset", (0 == sd["get_texture_non_temp_udp"]["enqueued"].asInteger()));
ensure("sd[get_gesture_udp][dequeued] is reset", (0 == sd["get_gesture_udp"]["dequeued"].asInteger()));
}
- // Create two global instances and verify no interactions
+ // Check multiple region collection
template<> template<>
void tst_viewerassetstats_index_object_t::test<5>()
{
- gViewerAssetStatsThread1 = new LLViewerAssetStats();
- gViewerAssetStatsMain = new LLViewerAssetStats();
- LLViewerAssetStatsFF::set_region_main(region1_handle);
+ gViewerAssetStats = new LLViewerAssetStats();
- LLViewerAssetStatsFF::record_enqueue_main(LLViewerAssetType::AT_TEXTURE, false, false);
- LLViewerAssetStatsFF::record_dequeue_main(LLViewerAssetType::AT_TEXTURE, false, false);
+ LLViewerAssetStatsFF::set_region(region1_handle);
- LLViewerAssetStatsFF::record_enqueue_main(LLViewerAssetType::AT_BODYPART, false, false);
- LLViewerAssetStatsFF::record_dequeue_main(LLViewerAssetType::AT_BODYPART, false, false);
+ LLViewerAssetStatsFF::record_enqueue(LLViewerAssetType::AT_TEXTURE, false, false);
+ LLViewerAssetStatsFF::record_dequeue(LLViewerAssetType::AT_TEXTURE, false, false);
- LLSD sd = gViewerAssetStatsThread1->asLLSD(false);
- ensure("Other collector is empty", is_no_stats_map(sd));
- sd = gViewerAssetStatsMain->asLLSD(false);
- ensure("Correct single-key LLSD map root", is_double_key_map(sd, "regions", "duration"));
- ensure("Correct single-slot LLSD array regions", is_single_slot_array(sd["regions"], region1_handle));
- sd = sd["regions"][0];
+ LLViewerAssetStatsFF::record_enqueue(LLViewerAssetType::AT_BODYPART, false, false);
+ LLViewerAssetStatsFF::record_dequeue(LLViewerAssetType::AT_BODYPART, false, false);
- // Check a few points on the tree for content
- ensure("sd[get_texture_non_temp_udp][enqueued] is 1", (1 == sd["get_texture_non_temp_udp"]["enqueued"].asInteger()));
- ensure("sd[get_texture_temp_udp][enqueued] is 0", (0 == sd["get_texture_temp_udp"]["enqueued"].asInteger()));
- ensure("sd[get_texture_non_temp_http][enqueued] is 0", (0 == sd["get_texture_non_temp_http"]["enqueued"].asInteger()));
- ensure("sd[get_texture_temp_http][enqueued] is 0", (0 == sd["get_texture_temp_http"]["enqueued"].asInteger()));
- ensure("sd[get_gesture_udp][dequeued] is 0", (0 == sd["get_gesture_udp"]["dequeued"].asInteger()));
-
- // Reset and check zeros...
- // Reset leaves current region in place
- gViewerAssetStatsMain->reset();
- sd = gViewerAssetStatsMain->asLLSD(false)["regions"][0];
-
- delete gViewerAssetStatsMain;
- gViewerAssetStatsMain = NULL;
- delete gViewerAssetStatsThread1;
- gViewerAssetStatsThread1 = NULL;
-
- ensure("sd[get_texture_non_temp_udp][enqueued] is reset", (0 == sd["get_texture_non_temp_udp"]["enqueued"].asInteger()));
- ensure("sd[get_gesture_udp][dequeued] is reset", (0 == sd["get_gesture_udp"]["dequeued"].asInteger()));
- }
-
- // Check multiple region collection
- template<> template<>
- void tst_viewerassetstats_index_object_t::test<6>()
- {
- gViewerAssetStatsMain = new LLViewerAssetStats();
-
- LLViewerAssetStatsFF::set_region_main(region1_handle);
+ LLViewerAssetStatsFF::set_region(region2_handle);
- LLViewerAssetStatsFF::record_enqueue_main(LLViewerAssetType::AT_TEXTURE, false, false);
- LLViewerAssetStatsFF::record_dequeue_main(LLViewerAssetType::AT_TEXTURE, false, false);
+ LLViewerAssetStatsFF::record_enqueue(LLViewerAssetType::AT_GESTURE, false, false);
+ LLViewerAssetStatsFF::record_enqueue(LLViewerAssetType::AT_GESTURE, false, false);
+ LLViewerAssetStatsFF::record_enqueue(LLViewerAssetType::AT_GESTURE, false, false);
+ LLViewerAssetStatsFF::record_enqueue(LLViewerAssetType::AT_GESTURE, false, false);
- LLViewerAssetStatsFF::record_enqueue_main(LLViewerAssetType::AT_BODYPART, false, false);
- LLViewerAssetStatsFF::record_dequeue_main(LLViewerAssetType::AT_BODYPART, false, false);
-
- LLViewerAssetStatsFF::set_region_main(region2_handle);
-
- LLViewerAssetStatsFF::record_enqueue_main(LLViewerAssetType::AT_GESTURE, false, false);
- LLViewerAssetStatsFF::record_enqueue_main(LLViewerAssetType::AT_GESTURE, false, false);
- LLViewerAssetStatsFF::record_enqueue_main(LLViewerAssetType::AT_GESTURE, false, false);
- LLViewerAssetStatsFF::record_enqueue_main(LLViewerAssetType::AT_GESTURE, false, false);
-
- LLSD sd = gViewerAssetStatsMain->asLLSD(false);
+ LLSD sd = gViewerAssetStats->asLLSD(false);
// std::cout << sd << std::endl;
@@ -414,14 +414,14 @@ namespace tut
// Reset and check zeros...
// Reset leaves current region in place
- gViewerAssetStatsMain->reset();
- sd = gViewerAssetStatsMain->asLLSD(false);
+ gViewerAssetStats->reset();
+ sd = gViewerAssetStats->asLLSD(false);
ensure("Correct single-key LLSD map root", is_double_key_map(sd, "regions", "duration"));
ensure("Correct single-slot LLSD array regions (p2)", is_single_slot_array(sd["regions"], region2_handle));
sd2 = sd["regions"][0];
- delete gViewerAssetStatsMain;
- gViewerAssetStatsMain = NULL;
+ delete gViewerAssetStats;
+ gViewerAssetStats = NULL;
ensure("sd2[get_texture_non_temp_udp][enqueued] is reset", (0 == sd2["get_texture_non_temp_udp"]["enqueued"].asInteger()));
ensure("sd2[get_gesture_udp][enqueued] is reset", (0 == sd2["get_gesture_udp"]["enqueued"].asInteger()));
@@ -429,41 +429,41 @@ namespace tut
// Check multiple region collection jumping back-and-forth between regions
template<> template<>
- void tst_viewerassetstats_index_object_t::test<7>()
+ void tst_viewerassetstats_index_object_t::test<6>()
{
- gViewerAssetStatsMain = new LLViewerAssetStats();
+ gViewerAssetStats = new LLViewerAssetStats();
- LLViewerAssetStatsFF::set_region_main(region1_handle);
+ LLViewerAssetStatsFF::set_region(region1_handle);
- LLViewerAssetStatsFF::record_enqueue_main(LLViewerAssetType::AT_TEXTURE, false, false);
- LLViewerAssetStatsFF::record_dequeue_main(LLViewerAssetType::AT_TEXTURE, false, false);
+ LLViewerAssetStatsFF::record_enqueue(LLViewerAssetType::AT_TEXTURE, false, false);
+ LLViewerAssetStatsFF::record_dequeue(LLViewerAssetType::AT_TEXTURE, false, false);
- LLViewerAssetStatsFF::record_enqueue_main(LLViewerAssetType::AT_BODYPART, false, false);
- LLViewerAssetStatsFF::record_dequeue_main(LLViewerAssetType::AT_BODYPART, false, false);
+ LLViewerAssetStatsFF::record_enqueue(LLViewerAssetType::AT_BODYPART, false, false);
+ LLViewerAssetStatsFF::record_dequeue(LLViewerAssetType::AT_BODYPART, false, false);
- LLViewerAssetStatsFF::set_region_main(region2_handle);
+ LLViewerAssetStatsFF::set_region(region2_handle);
- LLViewerAssetStatsFF::record_enqueue_main(LLViewerAssetType::AT_GESTURE, false, false);
- LLViewerAssetStatsFF::record_enqueue_main(LLViewerAssetType::AT_GESTURE, false, false);
- LLViewerAssetStatsFF::record_enqueue_main(LLViewerAssetType::AT_GESTURE, false, false);
- LLViewerAssetStatsFF::record_enqueue_main(LLViewerAssetType::AT_GESTURE, false, false);
+ LLViewerAssetStatsFF::record_enqueue(LLViewerAssetType::AT_GESTURE, false, false);
+ LLViewerAssetStatsFF::record_enqueue(LLViewerAssetType::AT_GESTURE, false, false);
+ LLViewerAssetStatsFF::record_enqueue(LLViewerAssetType::AT_GESTURE, false, false);
+ LLViewerAssetStatsFF::record_enqueue(LLViewerAssetType::AT_GESTURE, false, false);
- LLViewerAssetStatsFF::set_region_main(region1_handle);
+ LLViewerAssetStatsFF::set_region(region1_handle);
- LLViewerAssetStatsFF::record_enqueue_main(LLViewerAssetType::AT_TEXTURE, true, true);
- LLViewerAssetStatsFF::record_dequeue_main(LLViewerAssetType::AT_TEXTURE, true, true);
+ LLViewerAssetStatsFF::record_enqueue(LLViewerAssetType::AT_TEXTURE, true, true);
+ LLViewerAssetStatsFF::record_dequeue(LLViewerAssetType::AT_TEXTURE, true, true);
- LLViewerAssetStatsFF::record_enqueue_main(LLViewerAssetType::AT_BODYPART, false, false);
- LLViewerAssetStatsFF::record_dequeue_main(LLViewerAssetType::AT_BODYPART, false, false);
+ LLViewerAssetStatsFF::record_enqueue(LLViewerAssetType::AT_BODYPART, false, false);
+ LLViewerAssetStatsFF::record_dequeue(LLViewerAssetType::AT_BODYPART, false, false);
- LLViewerAssetStatsFF::set_region_main(region2_handle);
+ LLViewerAssetStatsFF::set_region(region2_handle);
- LLViewerAssetStatsFF::record_enqueue_main(LLViewerAssetType::AT_GESTURE, false, false);
- LLViewerAssetStatsFF::record_enqueue_main(LLViewerAssetType::AT_GESTURE, false, false);
- LLViewerAssetStatsFF::record_enqueue_main(LLViewerAssetType::AT_GESTURE, false, false);
- LLViewerAssetStatsFF::record_enqueue_main(LLViewerAssetType::AT_GESTURE, false, false);
+ LLViewerAssetStatsFF::record_enqueue(LLViewerAssetType::AT_GESTURE, false, false);
+ LLViewerAssetStatsFF::record_enqueue(LLViewerAssetType::AT_GESTURE, false, false);
+ LLViewerAssetStatsFF::record_enqueue(LLViewerAssetType::AT_GESTURE, false, false);
+ LLViewerAssetStatsFF::record_enqueue(LLViewerAssetType::AT_GESTURE, false, false);
- LLSD sd = gViewerAssetStatsMain->asLLSD(false);
+ LLSD sd = gViewerAssetStats->asLLSD(false);
ensure("Correct double-key LLSD map root", is_double_key_map(sd, "duration", "regions"));
ensure("Correct double-slot LLSD array regions", is_double_slot_array(sd["regions"], region1_handle, region2_handle));
@@ -486,15 +486,15 @@ namespace tut
// Reset and check zeros...
// Reset leaves current region in place
- gViewerAssetStatsMain->reset();
- sd = gViewerAssetStatsMain->asLLSD(false);
+ gViewerAssetStats->reset();
+ sd = gViewerAssetStats->asLLSD(false);
ensure("Correct single-key LLSD map root", is_double_key_map(sd, "duration", "regions"));
ensure("Correct single-slot LLSD array regions (p2)", is_single_slot_array(sd["regions"], region2_handle));
sd2 = get_region(sd, region2_handle);
ensure("Region2 is present in results", sd2.isMap());
- delete gViewerAssetStatsMain;
- gViewerAssetStatsMain = NULL;
+ delete gViewerAssetStats;
+ gViewerAssetStats = NULL;
ensure_equals("sd2[get_texture_non_temp_udp][enqueued] is reset", sd2["get_texture_non_temp_udp"]["enqueued"].asInteger(), 0);
ensure_equals("sd2[get_gesture_udp][enqueued] is reset", sd2["get_gesture_udp"]["enqueued"].asInteger(), 0);
@@ -502,38 +502,35 @@ namespace tut
// Non-texture assets ignore transport and persistence flags
template<> template<>
- void tst_viewerassetstats_index_object_t::test<8>()
+ void tst_viewerassetstats_index_object_t::test<7>()
{
- gViewerAssetStatsThread1 = new LLViewerAssetStats();
- gViewerAssetStatsMain = new LLViewerAssetStats();
- LLViewerAssetStatsFF::set_region_main(region1_handle);
+ gViewerAssetStats = new LLViewerAssetStats();
+ LLViewerAssetStatsFF::set_region(region1_handle);
- LLViewerAssetStatsFF::record_enqueue_main(LLViewerAssetType::AT_TEXTURE, false, false);
- LLViewerAssetStatsFF::record_dequeue_main(LLViewerAssetType::AT_TEXTURE, false, false);
+ LLViewerAssetStatsFF::record_enqueue(LLViewerAssetType::AT_TEXTURE, false, false);
+ LLViewerAssetStatsFF::record_dequeue(LLViewerAssetType::AT_TEXTURE, false, false);
- LLViewerAssetStatsFF::record_enqueue_main(LLViewerAssetType::AT_BODYPART, false, false);
- LLViewerAssetStatsFF::record_dequeue_main(LLViewerAssetType::AT_BODYPART, false, false);
+ LLViewerAssetStatsFF::record_enqueue(LLViewerAssetType::AT_BODYPART, false, false);
+ LLViewerAssetStatsFF::record_dequeue(LLViewerAssetType::AT_BODYPART, false, false);
- LLViewerAssetStatsFF::record_enqueue_main(LLViewerAssetType::AT_BODYPART, false, true);
- LLViewerAssetStatsFF::record_dequeue_main(LLViewerAssetType::AT_BODYPART, false, true);
+ LLViewerAssetStatsFF::record_enqueue(LLViewerAssetType::AT_BODYPART, false, true);
+ LLViewerAssetStatsFF::record_dequeue(LLViewerAssetType::AT_BODYPART, false, true);
- LLViewerAssetStatsFF::record_enqueue_main(LLViewerAssetType::AT_BODYPART, true, false);
- LLViewerAssetStatsFF::record_dequeue_main(LLViewerAssetType::AT_BODYPART, true, false);
+ LLViewerAssetStatsFF::record_enqueue(LLViewerAssetType::AT_BODYPART, true, false);
+ LLViewerAssetStatsFF::record_dequeue(LLViewerAssetType::AT_BODYPART, true, false);
- LLViewerAssetStatsFF::record_enqueue_main(LLViewerAssetType::AT_BODYPART, true, true);
- LLViewerAssetStatsFF::record_dequeue_main(LLViewerAssetType::AT_BODYPART, true, true);
+ LLViewerAssetStatsFF::record_enqueue(LLViewerAssetType::AT_BODYPART, true, true);
+ LLViewerAssetStatsFF::record_dequeue(LLViewerAssetType::AT_BODYPART, true, true);
- LLViewerAssetStatsFF::record_enqueue_main(LLViewerAssetType::AT_LSL_BYTECODE, false, false);
+ LLViewerAssetStatsFF::record_enqueue(LLViewerAssetType::AT_LSL_BYTECODE, false, false);
- LLViewerAssetStatsFF::record_enqueue_main(LLViewerAssetType::AT_LSL_BYTECODE, false, true);
+ LLViewerAssetStatsFF::record_enqueue(LLViewerAssetType::AT_LSL_BYTECODE, false, true);
- LLViewerAssetStatsFF::record_enqueue_main(LLViewerAssetType::AT_LSL_BYTECODE, true, false);
+ LLViewerAssetStatsFF::record_enqueue(LLViewerAssetType::AT_LSL_BYTECODE, true, false);
- LLViewerAssetStatsFF::record_enqueue_main(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
+ LLViewerAssetStatsFF::record_enqueue(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
- LLSD sd = gViewerAssetStatsThread1->asLLSD(false);
- ensure("Other collector is empty", is_no_stats_map(sd));
- sd = gViewerAssetStatsMain->asLLSD(false);
+ LLSD sd = gViewerAssetStats->asLLSD(false);
ensure("Correct single-key LLSD map root", is_double_key_map(sd, "regions", "duration"));
ensure("Correct single-slot LLSD array regions", is_single_slot_array(sd["regions"], region1_handle));
sd = get_region(sd, region1_handle);
@@ -551,445 +548,14 @@ namespace tut
// Reset and check zeros...
// Reset leaves current region in place
- gViewerAssetStatsMain->reset();
- sd = get_region(gViewerAssetStatsMain->asLLSD(false), region1_handle);
+ gViewerAssetStats->reset();
+ sd = get_region(gViewerAssetStats->asLLSD(false), region1_handle);
ensure("Region1 is present in results", sd.isMap());
- delete gViewerAssetStatsMain;
- gViewerAssetStatsMain = NULL;
- delete gViewerAssetStatsThread1;
- gViewerAssetStatsThread1 = NULL;
+ delete gViewerAssetStats;
+ gViewerAssetStats = NULL;
ensure_equals("sd[get_texture_non_temp_udp][enqueued] is reset", sd["get_texture_non_temp_udp"]["enqueued"].asInteger(), 0);
ensure_equals("sd[get_gesture_udp][dequeued] is reset", sd["get_gesture_udp"]["dequeued"].asInteger(), 0);
}
-
-
- // LLViewerAssetStats::merge() basic functions work
- template<> template<>
- void tst_viewerassetstats_index_object_t::test<9>()
- {
- LLViewerAssetStats s1;
- LLViewerAssetStats s2;
-
- s1.setRegion(region1_handle);
- s2.setRegion(region1_handle);
-
- s1.recordGetServiced(LLViewerAssetType::AT_TEXTURE, true, true, 5000000);
- s1.recordGetServiced(LLViewerAssetType::AT_TEXTURE, true, true, 6000000);
- s1.recordGetServiced(LLViewerAssetType::AT_TEXTURE, true, true, 8000000);
- s1.recordGetServiced(LLViewerAssetType::AT_TEXTURE, true, true, 7000000);
- s1.recordGetServiced(LLViewerAssetType::AT_TEXTURE, true, true, 9000000);
-
- s2.recordGetServiced(LLViewerAssetType::AT_TEXTURE, true, true, 2000000);
- s2.recordGetServiced(LLViewerAssetType::AT_TEXTURE, true, true, 3000000);
- s2.recordGetServiced(LLViewerAssetType::AT_TEXTURE, true, true, 4000000);
-
- s2.merge(s1);
-
- LLSD s2_llsd = get_region(s2.asLLSD(false), region1_handle);
- ensure("Region1 is present in results", s2_llsd.isMap());
-
- ensure_equals("count after merge", s2_llsd["get_texture_temp_http"]["resp_count"].asInteger(), 8);
- ensure_approximately_equals("min after merge", s2_llsd["get_texture_temp_http"]["resp_min"].asReal(), 2.0, 22);
- ensure_approximately_equals("max after merge", s2_llsd["get_texture_temp_http"]["resp_max"].asReal(), 9.0, 22);
- ensure_approximately_equals("max after merge", s2_llsd["get_texture_temp_http"]["resp_mean"].asReal(), 5.5, 22);
- }
-
- // LLViewerAssetStats::merge() basic functions work without corrupting source data
- template<> template<>
- void tst_viewerassetstats_index_object_t::test<10>()
- {
- LLViewerAssetStats s1;
- LLViewerAssetStats s2;
-
- s1.setRegion(region1_handle);
- s1.recordGetEnqueued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
- s1.recordGetEnqueued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
- s1.recordGetEnqueued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
- s1.recordGetEnqueued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
-
- s1.recordGetDequeued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
- s1.recordGetDequeued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
- s1.recordGetDequeued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
- s1.recordGetDequeued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
-
- s1.recordGetServiced(LLViewerAssetType::AT_LSL_BYTECODE, true, true, 23289200);
- s1.recordGetServiced(LLViewerAssetType::AT_LSL_BYTECODE, true, true, 282900);
-
-
- s2.setRegion(region2_handle);
- s2.recordGetEnqueued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
- s2.recordGetEnqueued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
- s2.recordGetEnqueued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
- s2.recordGetEnqueued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
- s2.recordGetEnqueued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
- s2.recordGetEnqueued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
- s2.recordGetEnqueued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
- s2.recordGetEnqueued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
-
- s2.recordGetDequeued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
- s2.recordGetDequeued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
- s2.recordGetDequeued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
- s2.recordGetDequeued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
- s2.recordGetDequeued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
- s2.recordGetDequeued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
- s2.recordGetDequeued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
-
- s2.recordGetServiced(LLViewerAssetType::AT_LSL_BYTECODE, true, true, 6500000);
- s2.recordGetServiced(LLViewerAssetType::AT_LSL_BYTECODE, true, true, 10000);
-
- {
- s2.merge(s1);
-
- LLSD src = s1.asLLSD(false);
- LLSD dst = s2.asLLSD(false);
-
- ensure_equals("merge src has single region", src["regions"].size(), 1);
- ensure_equals("merge dst has dual regions", dst["regions"].size(), 2);
-
- // Remove time stamps, they're a problem
- src.erase("duration");
- src["regions"][0].erase("duration");
- dst.erase("duration");
- dst["regions"][0].erase("duration");
- dst["regions"][1].erase("duration");
-
- LLSD s1_llsd = get_region(src, region1_handle);
- ensure("Region1 is present in src", s1_llsd.isMap());
- LLSD s2_llsd = get_region(dst, region1_handle);
- ensure("Region1 is present in dst", s2_llsd.isMap());
-
- ensure("result from src is in dst", llsd_equals(s1_llsd, s2_llsd));
- }
-
- s1.setRegion(region1_handle);
- s2.setRegion(region1_handle);
- s1.reset();
- s2.reset();
-
- s1.recordGetEnqueued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
- s1.recordGetEnqueued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
- s1.recordGetEnqueued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
- s1.recordGetEnqueued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
-
- s1.recordGetDequeued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
- s1.recordGetDequeued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
- s1.recordGetDequeued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
- s1.recordGetDequeued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
-
- s1.recordGetServiced(LLViewerAssetType::AT_LSL_BYTECODE, true, true, 23289200);
- s1.recordGetServiced(LLViewerAssetType::AT_LSL_BYTECODE, true, true, 282900);
-
-
- s2.setRegion(region1_handle);
- s2.recordGetEnqueued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
- s2.recordGetEnqueued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
- s2.recordGetEnqueued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
- s2.recordGetEnqueued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
- s2.recordGetEnqueued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
- s2.recordGetEnqueued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
- s2.recordGetEnqueued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
- s2.recordGetEnqueued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
-
- s2.recordGetDequeued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
- s2.recordGetDequeued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
- s2.recordGetDequeued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
- s2.recordGetDequeued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
- s2.recordGetDequeued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
- s2.recordGetDequeued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
- s2.recordGetDequeued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
-
- s2.recordGetServiced(LLViewerAssetType::AT_LSL_BYTECODE, true, true, 6500000);
- s2.recordGetServiced(LLViewerAssetType::AT_LSL_BYTECODE, true, true, 10000);
-
- {
- s2.merge(s1);
-
- LLSD src = s1.asLLSD(false);
- LLSD dst = s2.asLLSD(false);
-
- ensure_equals("merge src has single region (p2)", src["regions"].size(), 1);
- ensure_equals("merge dst has single region (p2)", dst["regions"].size(), 1);
-
- // Remove time stamps, they're a problem
- src.erase("duration");
- src["regions"][0].erase("duration");
- dst.erase("duration");
- dst["regions"][0].erase("duration");
-
- LLSD s1_llsd = get_region(src, region1_handle);
- ensure("Region1 is present in src", s1_llsd.isMap());
- LLSD s2_llsd = get_region(dst, region1_handle);
- ensure("Region1 is present in dst", s2_llsd.isMap());
-
- ensure_equals("src counts okay (enq)", s1_llsd["get_other"]["enqueued"].asInteger(), 4);
- ensure_equals("src counts okay (deq)", s1_llsd["get_other"]["dequeued"].asInteger(), 4);
- ensure_equals("src resp counts okay", s1_llsd["get_other"]["resp_count"].asInteger(), 2);
- ensure_approximately_equals("src respmin okay", s1_llsd["get_other"]["resp_min"].asReal(), 0.2829, 20);
- ensure_approximately_equals("src respmax okay", s1_llsd["get_other"]["resp_max"].asReal(), 23.2892, 20);
-
- ensure_equals("dst counts okay (enq)", s2_llsd["get_other"]["enqueued"].asInteger(), 12);
- ensure_equals("src counts okay (deq)", s2_llsd["get_other"]["dequeued"].asInteger(), 11);
- ensure_equals("dst resp counts okay", s2_llsd["get_other"]["resp_count"].asInteger(), 4);
- ensure_approximately_equals("dst respmin okay", s2_llsd["get_other"]["resp_min"].asReal(), 0.010, 20);
- ensure_approximately_equals("dst respmax okay", s2_llsd["get_other"]["resp_max"].asReal(), 23.2892, 20);
- }
- }
-
-
- // Maximum merges are interesting when one side contributes nothing
- template<> template<>
- void tst_viewerassetstats_index_object_t::test<11>()
- {
- LLViewerAssetStats s1;
- LLViewerAssetStats s2;
-
- s1.setRegion(region1_handle);
- s1.recordGetEnqueued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
- s1.recordGetEnqueued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
- s1.recordGetEnqueued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
- s1.recordGetEnqueued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
-
- s1.recordGetDequeued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
- s1.recordGetDequeued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
- s1.recordGetDequeued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
- s1.recordGetDequeued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
-
- // Want to test negative numbers here but have to work in U64
- s1.recordGetServiced(LLViewerAssetType::AT_LSL_BYTECODE, true, true, 0);
- s1.recordGetServiced(LLViewerAssetType::AT_LSL_BYTECODE, true, true, 0);
- s1.recordGetServiced(LLViewerAssetType::AT_LSL_BYTECODE, true, true, 0);
-
- s2.setRegion(region1_handle);
- s2.recordGetEnqueued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
- s2.recordGetEnqueued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
- s2.recordGetEnqueued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
- s2.recordGetEnqueued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
- s2.recordGetEnqueued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
- s2.recordGetEnqueued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
- s2.recordGetEnqueued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
- s2.recordGetEnqueued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
-
- s2.recordGetDequeued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
- s2.recordGetDequeued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
- s2.recordGetDequeued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
- s2.recordGetDequeued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
- s2.recordGetDequeued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
- s2.recordGetDequeued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
- s2.recordGetDequeued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
-
- {
- s2.merge(s1);
-
- LLSD src = s1.asLLSD(false);
- LLSD dst = s2.asLLSD(false);
-
- ensure_equals("merge src has single region", src["regions"].size(), 1);
- ensure_equals("merge dst has single region", dst["regions"].size(), 1);
-
- // Remove time stamps, they're a problem
- src.erase("duration");
- src["regions"][0].erase("duration");
- dst.erase("duration");
- dst["regions"][0].erase("duration");
-
- LLSD s2_llsd = get_region(dst, region1_handle);
- ensure("Region1 is present in dst", s2_llsd.isMap());
-
- ensure_equals("dst counts come from src only", s2_llsd["get_other"]["resp_count"].asInteger(), 3);
-
- ensure_approximately_equals("dst maximum with count 0 does not contribute to merged maximum",
- s2_llsd["get_other"]["resp_max"].asReal(), F64(0.0), 20);
- }
-
- // Other way around
- s1.setRegion(region1_handle);
- s2.setRegion(region1_handle);
- s1.reset();
- s2.reset();
-
- s1.recordGetEnqueued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
- s1.recordGetEnqueued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
- s1.recordGetEnqueued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
- s1.recordGetEnqueued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
-
- s1.recordGetDequeued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
- s1.recordGetDequeued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
- s1.recordGetDequeued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
- s1.recordGetDequeued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
-
- // Want to test negative numbers here but have to work in U64
- s1.recordGetServiced(LLViewerAssetType::AT_LSL_BYTECODE, true, true, 0);
- s1.recordGetServiced(LLViewerAssetType::AT_LSL_BYTECODE, true, true, 0);
- s1.recordGetServiced(LLViewerAssetType::AT_LSL_BYTECODE, true, true, 0);
-
- s2.recordGetEnqueued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
- s2.recordGetEnqueued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
- s2.recordGetEnqueued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
- s2.recordGetEnqueued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
- s2.recordGetEnqueued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
- s2.recordGetEnqueued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
- s2.recordGetEnqueued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
- s2.recordGetEnqueued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
-
- s2.recordGetDequeued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
- s2.recordGetDequeued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
- s2.recordGetDequeued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
- s2.recordGetDequeued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
- s2.recordGetDequeued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
- s2.recordGetDequeued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
- s2.recordGetDequeued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
-
- {
- s1.merge(s2);
-
- LLSD src = s2.asLLSD(false);
- LLSD dst = s1.asLLSD(false);
-
- ensure_equals("merge src has single region", src["regions"].size(), 1);
- ensure_equals("merge dst has single region", dst["regions"].size(), 1);
-
- // Remove time stamps, they're a problem
- src.erase("duration");
- src["regions"][0].erase("duration");
- dst.erase("duration");
- dst["regions"][0].erase("duration");
-
- LLSD s2_llsd = get_region(dst, region1_handle);
- ensure("Region1 is present in dst", s2_llsd.isMap());
-
- ensure_equals("dst counts come from src only (flipped)", s2_llsd["get_other"]["resp_count"].asInteger(), 3);
-
- ensure_approximately_equals("dst maximum with count 0 does not contribute to merged maximum (flipped)",
- s2_llsd["get_other"]["resp_max"].asReal(), F64(0.0), 20);
- }
- }
-
- // Minimum merges are interesting when one side contributes nothing
- template<> template<>
- void tst_viewerassetstats_index_object_t::test<12>()
- {
- LLViewerAssetStats s1;
- LLViewerAssetStats s2;
-
- s1.setRegion(region1_handle);
- s1.recordGetEnqueued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
- s1.recordGetEnqueued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
- s1.recordGetEnqueued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
- s1.recordGetEnqueued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
-
- s1.recordGetDequeued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
- s1.recordGetDequeued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
- s1.recordGetDequeued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
- s1.recordGetDequeued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
-
- s1.recordGetServiced(LLViewerAssetType::AT_LSL_BYTECODE, true, true, 3800000);
- s1.recordGetServiced(LLViewerAssetType::AT_LSL_BYTECODE, true, true, 2700000);
- s1.recordGetServiced(LLViewerAssetType::AT_LSL_BYTECODE, true, true, 2900000);
-
- s2.setRegion(region1_handle);
- s2.recordGetEnqueued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
- s2.recordGetEnqueued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
- s2.recordGetEnqueued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
- s2.recordGetEnqueued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
- s2.recordGetEnqueued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
- s2.recordGetEnqueued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
- s2.recordGetEnqueued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
- s2.recordGetEnqueued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
-
- s2.recordGetDequeued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
- s2.recordGetDequeued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
- s2.recordGetDequeued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
- s2.recordGetDequeued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
- s2.recordGetDequeued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
- s2.recordGetDequeued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
- s2.recordGetDequeued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
-
- {
- s2.merge(s1);
-
- LLSD src = s1.asLLSD(false);
- LLSD dst = s2.asLLSD(false);
-
- ensure_equals("merge src has single region", src["regions"].size(), 1);
- ensure_equals("merge dst has single region", dst["regions"].size(), 1);
-
- // Remove time stamps, they're a problem
- src.erase("duration");
- src["regions"][0].erase("duration");
- dst.erase("duration");
- dst["regions"][0].erase("duration");
-
- LLSD s2_llsd = get_region(dst, region1_handle);
- ensure("Region1 is present in dst", s2_llsd.isMap());
-
- ensure_equals("dst counts come from src only", s2_llsd["get_other"]["resp_count"].asInteger(), 3);
-
- ensure_approximately_equals("dst minimum with count 0 does not contribute to merged minimum",
- s2_llsd["get_other"]["resp_min"].asReal(), F64(2.7), 20);
- }
-
- // Other way around
- s1.setRegion(region1_handle);
- s2.setRegion(region1_handle);
- s1.reset();
- s2.reset();
-
- s1.recordGetEnqueued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
- s1.recordGetEnqueued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
- s1.recordGetEnqueued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
- s1.recordGetEnqueued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
-
- s1.recordGetDequeued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
- s1.recordGetDequeued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
- s1.recordGetDequeued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
- s1.recordGetDequeued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
-
- s1.recordGetServiced(LLViewerAssetType::AT_LSL_BYTECODE, true, true, 3800000);
- s1.recordGetServiced(LLViewerAssetType::AT_LSL_BYTECODE, true, true, 2700000);
- s1.recordGetServiced(LLViewerAssetType::AT_LSL_BYTECODE, true, true, 2900000);
-
- s2.recordGetEnqueued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
- s2.recordGetEnqueued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
- s2.recordGetEnqueued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
- s2.recordGetEnqueued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
- s2.recordGetEnqueued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
- s2.recordGetEnqueued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
- s2.recordGetEnqueued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
- s2.recordGetEnqueued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
-
- s2.recordGetDequeued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
- s2.recordGetDequeued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
- s2.recordGetDequeued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
- s2.recordGetDequeued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
- s2.recordGetDequeued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
- s2.recordGetDequeued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
- s2.recordGetDequeued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
-
- {
- s1.merge(s2);
-
- LLSD src = s2.asLLSD(false);
- LLSD dst = s1.asLLSD(false);
-
- ensure_equals("merge src has single region", src["regions"].size(), 1);
- ensure_equals("merge dst has single region", dst["regions"].size(), 1);
-
- // Remove time stamps, they're a problem
- src.erase("duration");
- src["regions"][0].erase("duration");
- dst.erase("duration");
- dst["regions"][0].erase("duration");
-
- LLSD s2_llsd = get_region(dst, region1_handle);
- ensure("Region1 is present in dst", s2_llsd.isMap());
-
- ensure_equals("dst counts come from src only (flipped)", s2_llsd["get_other"]["resp_count"].asInteger(), 3);
-
- ensure_approximately_equals("dst minimum with count 0 does not contribute to merged minimum (flipped)",
- s2_llsd["get_other"]["resp_min"].asReal(), F64(2.7), 20);
- }
- }
-
}
diff --git a/indra/newview/tests/llxmlrpclistener_test.cpp b/indra/newview/tests/llxmlrpclistener_test.cpp
index 20f913b670..6e9756e7d5 100755
--- a/indra/newview/tests/llxmlrpclistener_test.cpp
+++ b/indra/newview/tests/llxmlrpclistener_test.cpp
@@ -85,7 +85,7 @@ namespace tut
void object::test<1>()
{
set_test_name("request validation");
- WrapLL_ERRS capture;
+ WrapLLErrs capture;
LLSD request;
request["uri"] = uri;
std::string threw;
@@ -93,7 +93,7 @@ namespace tut
{
pumps.obtain("LLXMLRPCTransaction").post(request);
}
- catch (const WrapLL_ERRS::FatalException& e)
+ catch (const WrapLLErrs::FatalException& e)
{
threw = e.what();
}
@@ -106,7 +106,7 @@ namespace tut
void object::test<2>()
{
set_test_name("param types validation");
- WrapLL_ERRS capture;
+ WrapLLErrs capture;
LLSD request;
request["uri"] = uri;
request["method"] = "hello";
@@ -118,7 +118,7 @@ namespace tut
{
pumps.obtain("LLXMLRPCTransaction").post(request);
}
- catch (const WrapLL_ERRS::FatalException& e)
+ catch (const WrapLLErrs::FatalException& e)
{
threw = e.what();
}