Commit Graph

66 Commits (962be69e7170a9f7e8a99b9da4eae22ea6cdb038)

Author SHA1 Message Date
Ansariel 14fb8f66f8 Merge branch 'DRTVWR-516-maint' of https://bitbucket.org/lindenlab/viewer 2020-09-24 16:34:12 +02:00
Andrey Kleshchev 0d7f6d917a SL-13729 Performance of LLUI and LLRender2D #3 2020-09-18 17:27:12 +03:00
Andrey Kleshchev a5c8b1cbe2 SL-13729 Performance of LLUI and LLRender2D #2 2020-09-17 20:39:45 +03:00
Nicky Dasmijn 7c7e3ae8ba Merge remote-tracking branch 'fs/master' into fs-eep-vs2017-d476 2020-06-03 19:28:05 +02:00
Ansariel 3159200007 FIRE-29614: Chat console is cutting off text after empty lines 2020-05-28 20:29:12 +02:00
Nicky Dasmijn a4aff377e6 Merge branch 'master' into fs-vs2017 2020-04-29 20:02:19 +02: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
Ansariel e77ac3096f FIRE-29294: Viewer occasionally ends in a loop after the fix for FIRE-8257 2020-01-25 16:46:55 +01:00
Ansariel 83a9e1d450 FIRE-8257: Text in chat console is sometimes cut off on the left side; based on a fix by Testicular Slingshot 2020-01-25 01:23:58 +01:00
Nicky Dasmijn a135b5b428 Merge remote-tracking branch 'origin/ll-vs2017' into fs-vs2017 2019-12-21 13:14:51 +01: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 d79b79fbe2 Merge viewer-ordered-shutdown 2019-10-19 03:16:10 +02:00
andreykproductengine c61d0f4297 DRTVWR-493 LLUI to LLParamSingleton 2019-08-10 15:31:03 +03:00
Ansariel 3192fe832f Merge viewer-quickgraphics 2016-03-08 01:41:31 +01:00
Ansariel 9036ed275a FIRE-2436: Change behavior of chat console: Chat console will now always show the chat for sessions that are currently not shown by a visible floater 2015-11-11 13:55:23 +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 500cbd17a5 FIRE-17187: Fix message with URL containing custom label ([url description]) shows description twice in console and fix wrong start and end indices for LLWString URL matches on the way 2015-11-02 11:02:00 +01:00
Nicky 006190f2a1 Merge with tools update. 2015-05-05 13:09:27 +02:00
Ansariel 072e303c82 More banging at URI things: Want to show the full URI in the console as well... 2015-05-04 13:55:09 +02:00
callum_linden 7359e9300a Update to build on Xcode 6.0: collection of removal of unused const variables [-Wunused-const-variable] 2014-10-17 16:52:32 -07:00
Ansariel 3f203c37e0 Fix override of removeExtraLines() function in LLFixedBuffer
Writing to the debug console only worked because LL used an upcast to LLFixedBuffer
instead of using LLConsole, so we might want to make sure we override that function
for our needs in LLConsole properly in case addLine() is called on LLConsole directly
2014-09-11 10:47:41 +02:00
Ansariel 3d2bd2a24f Update text in chat console for SLURLs after we resolved their correct label 2014-08-11 16:11:14 +02:00
Ansariel 0ecd3e16d6 Synchronize LLConsole with V3 2014-07-11 09:32:04 +02:00
Tank_Master 8863d9beaf Compile fixes 2014-06-09 23:27:05 -07:00
simon ee2fce8790 Merge downstream code and viewer-beta 2013-05-09 14:10:45 -07:00
Oz Linden ddd5659f81 merge changes for DRTVWR-294 2013-04-19 10:11:29 -04:00
Graham Madarasz bf6182daa8 Update Mac and Windows breakpad builds to latest 2013-03-29 07:50:08 -07:00
Graham Madarasz e8b8a12b73 Mods to make compile on gcc 4.6.3 work mo betta 2013-03-12 10:48:05 -07:00
Tank_Master 52d9b07503 Merge viewer-bear 2013-09-12 21:15:34 -07:00
Ansariel 460bd8ba27 Improve console performance 2013-07-29 13:00:53 +02:00
Tank_Master d4640277d0 Merge LL 3.5.3 release. 2013-07-09 16:24:58 -07:00
Cinders 77cda051af Update to FIRE-1332 2013-06-25 15:25:34 -06:00
Cinders c9e3a36a9c FIRE-1332: Separate opacity controls for console and nametags/bubble chat 2013-05-30 12:38:18 -06:00
Don Kjer c06c35609c Updating linux build to gcc4.6 2012-10-11 00:09:04 +00:00
Tank_Master ea86bb88c3 first pass merge 2013-02-04 10:52:32 -08:00
Ansariel d8c7dfd223 Crashfix in chat console and Growl (INT-77) 2012-03-11 01:54:06 +01:00
Ansariel ddfdf00dc0 Removed some unused/unnecessary code from console 2012-01-08 01:49:26 +01:00
Ansariel 585c3ced7b Added optional classic console draw mode (renders the background as single block instead of separate blocks for each paragraph) 2012-01-08 01:40:34 +01:00
Ansariel 176f020bb3 Added option for console background image and URL parsing; Disabled URL parsing for debug view console 2012-01-06 16:31:38 +01:00
Ansariel adcf55f20b Added SLURL parsing for console 2012-01-06 15:07:36 +01:00
Richard Nelson fd9f3b9fe9 EXP-1021 FIX Position of web content browser dictates position of profile panel - profile panel position changes do not persist
EXP-1030 FIX Search button toggle can get out of synch in bottom bar
made llinstancetracker::iterator do own nested level management (removing need for separate guard)
added support for filename= to floaters
can pass in arbitrary window_class to floaters
2011-07-26 14:26:27 -07:00
Jonathan Yap e2a531791e STORM-1334 Console debug data scrolls away too quickly and is hard to read 2011-06-15 07:02:28 -04:00
Ansariel c18b8b7d6b Added customizable font styling for the console, originally for FIRE-2791, but default font does not support italics.
Might be useful for something else like showing moderators in group chat in bold.
2011-09-05 16:18:19 +02:00
Selo 2dd25c86ed FIX Fire-2822 Consoletext blends with stand button 2011-09-02 00:53:51 +02:00
Wolfspirit fa546acc89 FIRE-2811: Fixing shape and padding of console chat 2011-08-28 10:15:12 +02:00
Arrehn 9fd0edb326 Initial 2.8.3+ merge, Tozh & Arrehn
Issues: Graphics preferences tab, lighting, depth of field
Issues: Color preferences tab, new direct chat
Issues: Build floater Mesh build tab
Issues: German translations of build, viewer menus
Issues: pipeline issues with mac, possibly other things
Issues: uploading content / temp content
Issues: Windlight quickprefs, parcel windlight, RLVa windlight
2011-08-26 11:18:49 -04:00
Ansariel e9366bd348 Experimental fix for FIRE-993 2011-07-15 12:33:43 +02:00
Arrehn 9e82d7c578 FIRE-969, unify console opacity control with bubblechat 2011-06-09 09:35:20 -04:00
Tonya Souther 8fa0eebd94 Make console window font size match the Conversations window chat size. Fixes FIRE-957. 2011-04-25 20:11:06 -05:00
Arrehn 594f3c0d84 FIRE-805 Initial implementation of console-style nearby chat notifications option. Thanks to Ansariel Hiller 2011-04-22 03:21:50 -04:00