Commit Graph

92 Commits (2df8cc4f770e229748cb14decbd1136fc6deab33)

Author SHA1 Message Date
Ansariel 355a80ab91 Merge branch 'develop' of https://github.com/secondlife/viewer
# Conflicts:
#	indra/llimagej2coj/llimagej2coj.cpp
#	indra/newview/llfloaterworldmap.cpp
#	indra/newview/llfloaterworldmap.h
#	indra/newview/llviewertexturelist.cpp
#	indra/newview/skins/default/xui/en/floater_world_map.xml
2025-05-23 13:13:24 +02:00
Andrey Kleshchev 6e6e105f01 #3317 Fix full screen issue with Windows 11 24H2 2025-05-05 18:30:33 +03:00
Ansariel 75aa83aab6 Merge branch 'develop' of https://github.com/secondlife/viewer
# Conflicts:
#	indra/llmessage/lltemplatemessagedispatcher.cpp
#	indra/newview/llappviewer.cpp
2024-07-06 12:42:19 +02:00
Alexander Gavriliuk 9ddf64c651 #1931 BugSplat Crash: SecondLifeViewer!LLRenderTarget::release(387) 2024-07-06 08:38:17 +02:00
Ansariel fa20e5ce3b Merge branch 'release/maint-a' of https://github.com/secondlife/viewer
# Conflicts:
#	indra/llwindow/llwindow.cpp
#	indra/llwindow/llwindow.h
#	indra/llwindow/llwindowmacosx.cpp
#	indra/llwindow/llwindowmacosx.h
#	indra/llwindow/llwindowwin32.cpp
#	indra/llwindow/llwindowwin32.h
#	indra/newview/llviewerwindow.cpp
2024-06-17 19:14:45 +02:00
Ansariel ea83746cda Remove orphaned VRAM handling code 2024-06-17 19:04:41 +03:00
Ansariel e2e37cced8 Fix line endlings 2024-05-22 22:40:26 +03:00
Ansariel 1b67dd855c Merge remote-tracking branch 'origin/main' into DRTVWR-600-maint-A
# Conflicts:
#	autobuild.xml
#	indra/cmake/CMakeLists.txt
#	indra/cmake/GoogleMock.cmake
#	indra/llaudio/llaudioengine_fmodstudio.cpp
#	indra/llaudio/llaudioengine_fmodstudio.h
#	indra/llaudio/lllistener_fmodstudio.cpp
#	indra/llaudio/lllistener_fmodstudio.h
#	indra/llaudio/llstreamingaudio_fmodstudio.cpp
#	indra/llaudio/llstreamingaudio_fmodstudio.h
#	indra/llcharacter/llmultigesture.cpp
#	indra/llcharacter/llmultigesture.h
#	indra/llimage/llimage.cpp
#	indra/llimage/llimagepng.cpp
#	indra/llimage/llimageworker.cpp
#	indra/llimage/tests/llimageworker_test.cpp
#	indra/llmessage/tests/llmockhttpclient.h
#	indra/llprimitive/llgltfmaterial.h
#	indra/llrender/llfontfreetype.cpp
#	indra/llui/llcombobox.cpp
#	indra/llui/llfolderview.cpp
#	indra/llui/llfolderviewmodel.h
#	indra/llui/lllineeditor.cpp
#	indra/llui/lllineeditor.h
#	indra/llui/lltextbase.cpp
#	indra/llui/lltextbase.h
#	indra/llui/lltexteditor.cpp
#	indra/llui/lltextvalidate.cpp
#	indra/llui/lltextvalidate.h
#	indra/llui/lluictrl.h
#	indra/llui/llview.cpp
#	indra/llwindow/llwindowmacosx.cpp
#	indra/newview/app_settings/settings.xml
#	indra/newview/llappearancemgr.cpp
#	indra/newview/llappearancemgr.h
#	indra/newview/llavatarpropertiesprocessor.cpp
#	indra/newview/llavatarpropertiesprocessor.h
#	indra/newview/llbreadcrumbview.cpp
#	indra/newview/llbreadcrumbview.h
#	indra/newview/llbreastmotion.cpp
#	indra/newview/llbreastmotion.h
#	indra/newview/llconversationmodel.h
#	indra/newview/lldensityctrl.cpp
#	indra/newview/lldensityctrl.h
#	indra/newview/llface.inl
#	indra/newview/llfloatereditsky.cpp
#	indra/newview/llfloatereditwater.cpp
#	indra/newview/llfloateremojipicker.h
#	indra/newview/llfloaterimsessiontab.cpp
#	indra/newview/llfloaterprofiletexture.cpp
#	indra/newview/llfloaterprofiletexture.h
#	indra/newview/llgesturemgr.cpp
#	indra/newview/llgesturemgr.h
#	indra/newview/llimpanel.cpp
#	indra/newview/llimpanel.h
#	indra/newview/llinventorybridge.cpp
#	indra/newview/llinventorybridge.h
#	indra/newview/llinventoryclipboard.cpp
#	indra/newview/llinventoryclipboard.h
#	indra/newview/llinventoryfunctions.cpp
#	indra/newview/llinventoryfunctions.h
#	indra/newview/llinventorygallery.cpp
#	indra/newview/lllistbrowser.cpp
#	indra/newview/lllistbrowser.h
#	indra/newview/llpanelobjectinventory.cpp
#	indra/newview/llpanelprofile.cpp
#	indra/newview/llpanelprofile.h
#	indra/newview/llpreviewgesture.cpp
#	indra/newview/llsavedsettingsglue.cpp
#	indra/newview/llsavedsettingsglue.h
#	indra/newview/lltooldraganddrop.cpp
#	indra/newview/llurllineeditorctrl.cpp
#	indra/newview/llvectorperfoptions.cpp
#	indra/newview/llvectorperfoptions.h
#	indra/newview/llviewerparceloverlay.cpp
#	indra/newview/llviewertexlayer.cpp
#	indra/newview/llviewertexturelist.cpp
#	indra/newview/macmain.h
#	indra/test/test.cpp
2024-05-22 19:04:52 +02:00
Ansariel 0ecfbc3de9 Merge remote-tracking branch 'LGPL/master'
# Conflicts:
#	autobuild.xml
#	indra/cmake/CMakeLists.txt
#	indra/cmake/GoogleMock.cmake
#	indra/llappearance/llwearable.cpp
#	indra/llcharacter/llmultigesture.cpp
#	indra/llcharacter/llmultigesture.h
#	indra/llimage/llimage.cpp
#	indra/llimage/llimagepng.cpp
#	indra/llimage/llimageworker.cpp
#	indra/llmessage/tests/llmockhttpclient.h
#	indra/llrender/llfontfreetype.cpp
#	indra/llui/llcombobox.cpp
#	indra/llui/llfolderview.cpp
#	indra/llui/llfolderviewmodel.h
#	indra/llui/lllineeditor.cpp
#	indra/llui/lllineeditor.h
#	indra/llui/lltextbase.cpp
#	indra/llui/lltextbase.h
#	indra/llui/lltexteditor.cpp
#	indra/llui/lltextvalidate.cpp
#	indra/llui/lltextvalidate.h
#	indra/llui/lluictrl.h
#	indra/llui/llview.cpp
#	indra/llwindow/llwindowmacosx.cpp
#	indra/newview/app_settings/settings.xml
#	indra/newview/llappearancemgr.cpp
#	indra/newview/llappearancemgr.h
#	indra/newview/llavatarpropertiesprocessor.h
#	indra/newview/llbreadcrumbview.cpp
#	indra/newview/llbreadcrumbview.h
#	indra/newview/llbreastmotion.cpp
#	indra/newview/llbreastmotion.h
#	indra/newview/llconversationmodel.h
#	indra/newview/lldensityctrl.cpp
#	indra/newview/lldensityctrl.h
#	indra/newview/llface.inl
#	indra/newview/llfloatereditsky.cpp
#	indra/newview/llfloatereditwater.cpp
#	indra/newview/llfloateremojipicker.h
#	indra/newview/llfloaterimsessiontab.cpp
#	indra/newview/llfloaterprofiletexture.cpp
#	indra/newview/llfloaterprofiletexture.h
#	indra/newview/llgesturemgr.cpp
#	indra/newview/llgesturemgr.h
#	indra/newview/llgroupactions.cpp
#	indra/newview/llimpanel.cpp
#	indra/newview/llinventorybridge.cpp
#	indra/newview/llinventorybridge.h
#	indra/newview/llinventoryclipboard.cpp
#	indra/newview/llinventoryclipboard.h
#	indra/newview/llinventoryfunctions.cpp
#	indra/newview/llinventoryfunctions.h
#	indra/newview/llinventorygallery.cpp
#	indra/newview/lllistbrowser.cpp
#	indra/newview/lllistbrowser.h
#	indra/newview/llpaneleditwearable.cpp
#	indra/newview/llpanelobjectinventory.cpp
#	indra/newview/llpanelprofile.cpp
#	indra/newview/llpreviewgesture.cpp
#	indra/newview/llsavedsettingsglue.cpp
#	indra/newview/llsavedsettingsglue.h
#	indra/newview/lltooldraganddrop.cpp
#	indra/newview/llurllineeditorctrl.cpp
#	indra/newview/llvectorperfoptions.cpp
#	indra/newview/llvectorperfoptions.h
#	indra/newview/llviewermenu.cpp
#	indra/newview/llviewerparceloverlay.cpp
#	indra/newview/llviewertexlayer.cpp
#	indra/newview/llviewertexturelist.cpp
#	indra/newview/macmain.h
2024-05-16 14:10:55 +02:00
Ansariel f0e4dcdaf6 Merge branch 'DRTVWR-600-maint-A' of https://github.com/secondlife/viewer
# Conflicts:
#	indra/llcommon/llthread.h
#	indra/llmessage/llcachename.cpp
#	indra/llui/lllineeditor.cpp
#	indra/llwindow/llwindowmacosx.cpp
#	indra/llwindow/llwindowwin32.cpp
#	indra/newview/llchatitemscontainerctrl.cpp
#	indra/newview/llfloaterimnearbychathandler.cpp
#	indra/newview/llfloaterpreference.cpp
#	indra/newview/llimprocessing.cpp
#	indra/newview/llimview.cpp
#	indra/newview/llnotificationhandlerutil.cpp
#	indra/newview/llpaneleditwearable.cpp
#	indra/newview/llselectmgr.cpp
#	indra/newview/lltexturectrl.cpp
#	indra/newview/lltextureview.cpp
#	indra/newview/lltooldraganddrop.cpp
#	indra/newview/llviewerdisplay.cpp
#	indra/newview/llviewertexture.cpp
#	indra/newview/llviewertexture.h
#	indra/newview/llviewerwindow.cpp
#	indra/newview/llvoavatar.cpp
2024-05-08 05:10:22 +02:00
Alexander Gavriliuk f9473e8afc secondlife/viewer#1333 BOOL to bool conversion leftovers: ternaries 2024-05-07 10:18:51 +02:00
Ansariel 5f1a19af72 Merge remote-tracking branch 'LL/marchcat/x-ws-merge'
# Conflicts:
#	autobuild.xml
#	indra/linux_crash_logger/llcrashloggerlinux.cpp
#	indra/newview/llappviewerlinux_api.h
#	indra/newview/llappviewerlinux_api_dbus.cpp
#	indra/newview/llappviewerlinux_api_dbus.h
#	indra/newview/llavatarpropertiesprocessor.h
#	indra/newview/llcallbacklist.cpp
#	indra/newview/llimpanel.h
2024-05-01 12:30:57 +02:00
Andrey Lihatskiy 1b68f71348 #824 Process source files in bulk: replace tabs with spaces, convert CRLF to LF, and trim trailing whitespaces as needed 2024-04-29 07:56:09 +03:00
Ansariel 210f59a923 Merge branch 'DRTVWR-600-maint-A' of https://github.com/secondlife/viewer
# Conflicts:
#	indra/llui/llfloater.cpp
#	indra/llui/llfloater.h
#	indra/llui/llfolderview.h
#	indra/llui/llfolderviewitem.cpp
#	indra/llui/llmenugl.cpp
#	indra/llui/llscrolllistctrl.cpp
#	indra/llui/llstatbar.cpp
#	indra/llui/lltabcontainer.h
#	indra/llwindow/lldxhardware.cpp
#	indra/llwindow/lldxhardware.h
#	indra/llwindow/llkeyboard.cpp
#	indra/llwindow/llkeyboard.h
#	indra/llwindow/llkeyboardheadless.cpp
#	indra/llwindow/llkeyboardheadless.h
#	indra/llwindow/llwindow.h
#	indra/llwindow/llwindowmacosx.cpp
#	indra/llwindow/llwindowmacosx.h
#	indra/llwindow/llwindowsdl.cpp
#	indra/llwindow/llwindowsdl.h
#	indra/llwindow/llwindowwin32.cpp
#	indra/llwindow/llwindowwin32.h
#	indra/newview/llavatarlist.cpp
#	indra/newview/llavatarlistitem.h
#	indra/newview/llchatitemscontainerctrl.cpp
#	indra/newview/llchiclet.cpp
#	indra/newview/llfasttimerview.cpp
#	indra/newview/llfavoritesbar.cpp
#	indra/newview/llfloaterbvhpreview.cpp
#	indra/newview/llfloatermap.cpp
#	indra/newview/llnavigationbar.cpp
#	indra/newview/llnavigationbar.h
#	indra/newview/llnetmap.cpp
#	indra/newview/lltexturectrl.cpp
#	indra/newview/lltoolcomp.cpp
#	indra/newview/lltoolcomp.h
#	indra/newview/lltoolface.cpp
#	indra/newview/lltoolfocus.h
#	indra/newview/lltoolpie.cpp
2024-02-18 16:22:54 +01:00
Ansariel c285f59ce2 Replace BOOL with bool in llwindow and dependent classes 2024-02-18 15:51:54 +02:00
Ansariel 33dfa20463 Merge branch 'DRTVWR-600-maint-A' of https://github.com/secondlife/viewer
# Conflicts:
#	indra/llwindow/llwindow.cpp
#	indra/llwindow/llwindowmacosx.cpp
#	indra/llwindow/llwindowmacosx.h
#	indra/llwindow/llwindowwin32.cpp
#	indra/newview/app_settings/settings.xml
#	indra/newview/lltextureview.cpp
#	indra/newview/llviewerwindow.cpp
2024-02-15 21:41:29 +01:00
Andrey Kleshchev a2971d84d5 Viewer#779 Make RenderMaxVRAMBudget more consistent 2024-02-15 19:31:41 +02:00
Ansariel ffa21ae649 Merge branch 'master' of https://vcs.firestormviewer.org/viewer-merges/phoenix-firestorm-539
# Conflicts:
#	autobuild.xml
#	indra/newview/app_settings/settings.xml
#	indra/newview/featuretable_linux.txt
#	indra/newview/fsfloaterperformance.cpp
#	indra/newview/llappviewer.cpp
#	indra/newview/lldrawpool.cpp
#	indra/newview/lldrawpoolalpha.cpp
#	indra/newview/lldrawpoolbump.cpp
#	indra/newview/lldrawpoolmaterials.cpp
#	indra/newview/llfeaturemanager.cpp
#	indra/newview/llperfstats.cpp
#	indra/newview/llperfstats.h
#	indra/newview/llviewercontrol.cpp
#	indra/newview/llviewerdisplay.cpp
#	indra/newview/llviewertexturelist.cpp
#	indra/newview/llvovolume.cpp
#	indra/newview/pipeline.cpp
2023-04-28 00:39:47 +02:00
Brad Linden 369945b45d Merge remote-tracking branch 'origin/DRTVWR-539' into DRTVWR-559-merge-539 2023-04-26 15:38:47 -07:00
Ansariel 13a509fe05 Merge branch 'DRTVWR-559' of https://github.com/secondlife/viewer
# Conflicts:
#	.gitignore
#	autobuild.xml
#	indra/llwindow/llwindow.cpp
#	indra/llwindow/llwindow.h
#	indra/llwindow/llwindowwin32.cpp
#	indra/llwindow/llwindowwin32.h
#	indra/newview/app_settings/settings.xml
#	indra/newview/llfloaterpreference.cpp
#	indra/newview/llpanelface.h
#	indra/newview/llviewerregion.h
#	indra/newview/llviewerwindow.cpp
2022-11-30 22:51:52 +01:00
Dave Parks b5db671f7c SL-18682 WIP -- Add debug settings that aid in emulating low end hardware. 2022-11-29 09:15:02 -06:00
Ansariel e8f4153fc2 Merge branch 'DRTVWR-539' of https://bitbucket.org/lindenlab/viewer 2022-06-30 18:59:34 +02:00
Mnikolenko Productengine ba9bff5b9b SL-17541 Show the message that user is currently at maximum FPS 2022-06-08 01:21:42 +03:00
Ansariel 63cc972499 Merge branch 'DRTVWR-546' of https://bitbucket.org/lindenlab/viewer
# Conflicts:
#	indra/llappearance/lldriverparam.h
#	indra/llcommon/llmemory.h
#	indra/llcommon/llprofiler.h
#	indra/llrender/llvertexbuffer.cpp
#	indra/llwindow/llwindow.cpp
#	indra/llwindow/llwindowwin32.h
#	indra/newview/app_settings/settings.xml
#	indra/newview/lldrawable.cpp
#	indra/newview/lldrawable.h
#	indra/newview/lldrawpoolalpha.cpp
#	indra/newview/lldrawpoolavatar.cpp
#	indra/newview/lldrawpooltree.cpp
#	indra/newview/lldrawpoolwater.cpp
#	indra/newview/llface.cpp
#	indra/newview/llinventoryfilter.cpp
#	indra/newview/llselectmgr.h
#	indra/newview/llspatialpartition.cpp
#	indra/newview/llviewermenu.cpp
#	indra/newview/llviewerobject.cpp
#	indra/newview/llvieweroctree.cpp
#	indra/newview/llviewertexturelist.cpp
#	indra/newview/llvovolume.cpp
#	indra/newview/llvowlsky.cpp
#	indra/newview/pipeline.cpp
#	indra/newview/skins/default/xui/en/floater_stats.xml
2021-11-12 17:31:39 +01:00
Ansariel 7427b46ea5 Merge branch 'DRTVWR-546' of https://bitbucket.org/lindenlab/viewer
# Conflicts:
#	.gitignore
#	indra/cmake/Copy3rdPartyLibs.cmake
#	indra/llcommon/llcommon.cpp
#	indra/llcommon/llerror.cpp
#	indra/llcommon/llprofiler.h
#	indra/llcommon/llthread.cpp
#	indra/llimage/llimageworker.cpp
#	indra/llprimitive/llmodel.h
#	indra/llrender/llfontgl.cpp
#	indra/llrender/llfontgl.h
#	indra/llrender/llgl.cpp
#	indra/llrender/llvertexbuffer.cpp
#	indra/llrender/llvertexbuffer.h
#	indra/llwindow/llwindowmacosx.h
#	indra/llwindow/llwindowwin32.cpp
#	indra/llwindow/llwindowwin32.h
#	indra/newview/app_settings/settings.xml
#	indra/newview/llappviewer.cpp
#	indra/newview/llappviewer.h
#	indra/newview/lldrawpoolavatar.cpp
#	indra/newview/lldrawpoolavatar.h
#	indra/newview/lldynamictexture.cpp
#	indra/newview/llfloatermodelpreview.cpp
#	indra/newview/llimview.cpp
#	indra/newview/llmeshrepository.h
#	indra/newview/llmodelpreview.cpp
#	indra/newview/llnetmap.cpp
#	indra/newview/llskinningutil.cpp
#	indra/newview/llskinningutil.h
#	indra/newview/llspatialpartition.cpp
#	indra/newview/llteleporthistory.cpp
#	indra/newview/llviewerdisplay.cpp
#	indra/newview/llviewerobject.cpp
#	indra/newview/llviewerobjectlist.cpp
#	indra/newview/llviewertexture.cpp
#	indra/newview/llviewertexturelist.cpp
#	indra/newview/llviewerwindow.cpp
#	indra/newview/llvoicevivox.cpp
#	indra/newview/llvosky.cpp
#	indra/newview/llvovolume.cpp
2021-11-12 15:21:52 +01:00
Mnikolenko Productengine 768b7a4d33 SL-16330 Clean up vertical sync handling, add to UI 2021-11-09 17:17:49 +02:00
Callum Linden 851fef6801 SL-16102 Set window title to agent name (child of SL-15999 Support for low overhead, non interactive viewer sessions) 2021-09-28 15:24:42 -07:00
Ansariel 240757c0d0 Merge branch 'DRTVWR-515-maint' of https://bitbucket.org/lindenlab/viewer 2020-08-20 16:52:04 +02:00
Andrey Lihatskiy 8c3b468531 Merge branch 'master' into DRTVWR-515-maint 2020-07-21 11:54:25 +03:00
Mnikolenko ProductEngine 4d27b11a16 SL-13507 Viewer should log resolution of all associated displays 2020-07-20 17:09:04 +03:00
Mnikolenko Productengine 44906ac0d4 SL-13507 Viewer should log resolution of all associated displays 2020-07-17 20:28:02 +03:00
Nat Goodspeed de4a0b8f5b DRTVWR-494: Avoid keeping iterator to destroyed temporary container. 2020-03-25 15:28:17 -04:00
Nat Goodspeed 9d5b897600 DRTVWR-494: Defend LLInstanceTracker against multi-thread usage.
The previous implementation went to some effort to crash if anyone attempted
to create or destroy an LLInstanceTracker subclass instance during traversal.
That restriction is manageable within a single thread, but becomes unworkable
if it's possible that a given subclass might be used on more than one thread.

Remove LLInstanceTracker::instance_iter, beginInstances(), endInstances(),
also key_iter, beginKeys() and endKeys(). Instead, introduce key_snapshot()
and instance_snapshot(), the only means of iterating over LLInstanceTracker
instances. (These are intended to resemble functions, but in fact the current
implementation simply presents the classes.) Iterating over a captured
snapshot defends against container modifications during traversal. The term
'snapshot' reminds the coder that a new instance created during traversal will
not be considered. To defend against instance deletion during traversal, a
snapshot stores std::weak_ptrs which it lazily dereferences, skipping on the
fly any that have expired.

Dereferencing instance_snapshot::iterator gets you a reference rather than a
pointer. Because some use cases want to delete all existing instances, add an
instance_snapshot::deleteAll() method that extracts the pointer. Those cases
used to require explicitly copying instance pointers into a separate
container; instance_snapshot() now takes care of that. It remains the caller's
responsibility to ensure that all instances of that LLInstanceTracker subclass
were allocated on the heap.

Replace unkeyed static LLInstanceTracker::getInstance(T*) -- which returned
nullptr if that instance had been destroyed -- with new getWeak() method
returning std::weak_ptr<T>. Caller must detect expiration of that weak_ptr.

Adjust tests accordingly.

Use of std::weak_ptr to detect expired instances requires engaging
std::shared_ptr in the constructor. We now store shared_ptrs in the static
containers (std::map for keyed, std::set for unkeyed).

Make LLInstanceTrackerBase a template parameterized on the type of the static
data it manages. For that reason, hoist static data class declarations out of
the class definitions to an LLInstanceTrackerStuff namespace.

Remove the static atomic sIterationNestDepth and its methods incrementDepth(),
decrementDepth() and getDepth(), since they were used only to forbid creation
and destruction during traversal.

Add a std::mutex to static data. Introduce an internal LockStatic class that
locks the mutex while providing a pointer to static data, making that the only
way to access the static data.

The LLINSTANCETRACKER_DTOR_NOEXCEPT macro goes away because we no longer
expect ~LLInstanceTracker() to throw an exception in test programs.
That affects LLTrace::StatBase as well as LLInstanceTracker itself.

Adapt consumers to the new LLInstanceTracker API.
2020-03-25 15:28:17 -04:00
Nicky Dasmijn a135b5b428 Merge remote-tracking branch 'origin/ll-vs2017' into fs-vs2017 2019-12-21 13:14:51 +01:00
Nat Goodspeed a851a0c130 DRTVWR-494: Avoid keeping iterator to destroyed temporary container. 2019-12-18 12:27:05 -05:00
Nat Goodspeed b2913b7cf1 DRTVWR-494: Defend LLInstanceTracker against multi-thread usage.
The previous implementation went to some effort to crash if anyone attempted
to create or destroy an LLInstanceTracker subclass instance during traversal.
That restriction is manageable within a single thread, but becomes unworkable
if it's possible that a given subclass might be used on more than one thread.

Remove LLInstanceTracker::instance_iter, beginInstances(), endInstances(),
also key_iter, beginKeys() and endKeys(). Instead, introduce key_snapshot()
and instance_snapshot(), the only means of iterating over LLInstanceTracker
instances. (These are intended to resemble functions, but in fact the current
implementation simply presents the classes.) Iterating over a captured
snapshot defends against container modifications during traversal. The term
'snapshot' reminds the coder that a new instance created during traversal will
not be considered. To defend against instance deletion during traversal, a
snapshot stores std::weak_ptrs which it lazily dereferences, skipping on the
fly any that have expired.

Dereferencing instance_snapshot::iterator gets you a reference rather than a
pointer. Because some use cases want to delete all existing instances, add an
instance_snapshot::deleteAll() method that extracts the pointer. Those cases
used to require explicitly copying instance pointers into a separate
container; instance_snapshot() now takes care of that. It remains the caller's
responsibility to ensure that all instances of that LLInstanceTracker subclass
were allocated on the heap.

Replace unkeyed static LLInstanceTracker::getInstance(T*) -- which returned
nullptr if that instance had been destroyed -- with new getWeak() method
returning std::weak_ptr<T>. Caller must detect expiration of that weak_ptr.

Adjust tests accordingly.

Use of std::weak_ptr to detect expired instances requires engaging
std::shared_ptr in the constructor. We now store shared_ptrs in the static
containers (std::map for keyed, std::set for unkeyed).

Make LLInstanceTrackerBase a template parameterized on the type of the static
data it manages. For that reason, hoist static data class declarations out of
the class definitions to an LLInstanceTrackerStuff namespace.

Remove the static atomic sIterationNestDepth and its methods incrementDepth(),
decrementDepth() and getDepth(), since they were used only to forbid creation
and destruction during traversal.

Add a std::mutex to static data. Introduce an internal LockStatic class that
locks the mutex while providing a pointer to static data, making that the only
way to access the static data.

The LLINSTANCETRACKER_DTOR_NOEXCEPT macro goes away because we no longer
expect ~LLInstanceTracker() to throw an exception in test programs.
That affects LLTrace::StatBase as well as LLInstanceTracker itself.

Adapt consumers to the new LLInstanceTracker API.
2019-12-02 14:39:24 -05:00
Ansariel 3192fe832f Merge viewer-quickgraphics 2016-03-08 01:41:31 +01:00
Oz Linden c8726aba30 remove execute permission from many files that should not have it 2015-11-10 09:48:56 -05:00
Ansariel 5fe09cb64d Merge Viewer-Bear 2015-08-22 03:13:17 +02:00
AndreyL ProductEngine 078612e292 MAINT-5019 FIXED Additional cases 2015-07-14 04:39:20 +03:00
Ansariel a45088cb6b Merge LL V3.7.11 2015-01-12 12:54:15 +01:00
Oz Linden a98b4b6bee merge changes for 3.7.7-release 2014-05-07 11:09:04 -04:00
Ansariel c291b53073 FIRE-1715: Links using FTP protocol are not recognized 2014-08-26 14:07:17 +02:00
Ricky Curtice e9116575bf OPEN-209: Corrected all instances of trigraphs in the code.
Trigraphs can cause some real special headaches.  The only part that's annoying is the comment in newview/llimview.cpp where there's an unfortunate collision of a trigraph sequence with a character sequence that could be displayed by the viewer. Thankfully, it's only a comment!
2014-03-13 20:36:05 -07:00
Tank_Master 6babf8abd2 Merge LL 3.7.7 2014-06-09 11:29:57 -07:00
Liny 97a45e7597 Cleaning up legacy cursors and adding merge guard comments on changed code 2014-05-19 16:54:18 -07:00
Richard Linden e340009fc5 second phase summer cleaning
replace llinfos, lldebugs, etc with new LL_INFOS(), LL_DEBUGS(), etc.
2013-08-09 17:11:19 -07:00
Richard Linden a2e22732f1 Summer cleaning - removed a lot of llcommon dependencies to speed up build times
consolidated most indra-specific constants in llcommon under indra_constants.h
fixed issues with operations on mixed unit types (implicit and explicit)
made LL_INFOS() style macros variadic in order to subsume other logging methods
such as ll_infos
added optional tag output to error recorders
2013-07-30 19:13:45 -07:00
Graham Madarasz bf6182daa8 Update Mac and Windows breakpad builds to latest 2013-03-29 07:50:08 -07:00
ziree 338ae29e8f Fix opening log transcripts and folders on linux. FIRE-11533 2013-09-02 22:04:05 +02:00