Commit Graph

89 Commits (07ff9a5d67cefdae1bc112b19947f7ba173c9dbb)

Author SHA1 Message Date
Andrey Kleshchev cc8af5f37d SL-19649 Adjust other classes for new deleteAllChildren mechanics 2023-05-18 23:48:39 +03:00
Maxim Nikolenko 076a895062 SL-17635 remove unused variables 2022-06-21 17:55:29 +03:00
Ptolemy b70614bd87 SL-16606: Add profiler category UI 2022-01-14 11:50:21 -08:00
Dave Parks 8d20480c5f SL-16148 SL-16244 SL-16270 SL-16253 Remove most BlockTimers, remove LLMemTracked, introduce alignas, hook most/all reamining allocs, disable synchronous occlusion, and convert frequently accessed LLSingletons to LLSimpleton 2021-10-28 18:06:21 +00:00
Andrey Kleshchev e67e9f63c3 SL-13293 Fixed reshape behavior for scale change 2020-08-14 01:06:48 +03: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
andreykproductengine c61d0f4297 DRTVWR-493 LLUI to LLParamSingleton 2019-08-10 15:31:03 +03:00
AndreyL ProductEngine e31f4a352d Mac buildfix 2019-05-14 01:14:54 +03:00
andreykproductengine 86d28366b1 SL-1811 Slight chat optimization 2019-02-20 20:30:43 +02:00
Oz Linden c8726aba30 remove execute permission from many files that should not have it 2015-11-10 09:48:56 -05:00
callum_linden 23711c9275 Rename llround(..) to ll_round(..) because of a collision with MS llround (long long round) in VS2013 2014-12-10 08:44:08 -08:00
Richard Linden c35801ef1c fixed focus issue on inventory 2013-11-05 19:26:23 -08:00
Richard Linden 697d2e720b renamed TimeBlock to BlockTimerStatHandle 2013-10-15 20:24:42 -07:00
Richard Linden 52da9f5f49 merge with viewer-release 2013-09-09 18:58:41 -07:00
Richard Linden cbe397ad13 changed fast timer over to using macro
another attempt to move mem stat into base class
2013-09-05 14:04:13 -07:00
Richard Linden 0a96b47663 merge with viewer-release 2013-06-05 19:05:43 -07:00
Merov Linden 2113bb8159 Pull merge from viewer-release 2013-05-22 11:23:51 -07:00
Oz Linden ddd5659f81 merge changes for DRTVWR-294 2013-04-19 10:11:29 -04:00
maksymsproductengine 0193a7b74c CHUI-808 FIXED Draggable separator between conversations and message pane is not discoverable:
- final solution;
2013-04-16 04:55:09 +03:00
Graham Madarasz bf6182daa8 Update Mac and Windows breakpad builds to latest 2013-03-29 07:50:08 -07:00
Richard Linden 8de397b19e SH-3931 WIP Interesting: Add graphs to visualize scene load metrics
changed LLCriticalDamp to LLSmoothInterpolation and sped up interpolator lookup
improvements to stats display of llstatbar
added scene load stats floater accessed with ctrl|shift|2
2013-03-18 08:43:03 -07:00
Richard Linden 7b4d27ecbc SH-3931 WIP Interesting: Add graphs to visualize scene load metrics
collapsed Orientation enums to all use LLView::EOrientation
added ability to display stat bar horizontally
2013-03-14 19:36:50 -07:00
prep 207d9fd767 Viewer-chui merge 2013-03-11 14:45:53 -04:00
maksymsproductengine 01bdfb3ecb CHUI-591 FIXED Issues with resizing conversations floater 2012-12-15 21:28:38 +02:00
Gilbert Gonzales 7e74481f33 This does not pertain to a CHUI bug fix but Richard took a look at the behavior of the layout stack test and found a mathematical bug that caused panels in a layout stack to jitter as they were resized. Submitting in this branch. 2012-11-02 18:00:19 -07:00
Gilbert Gonzales 4f6afb08d7 CHUI-472: This is a fix for the following case: When a torn off floater has its conversation reduced to the minimum width, once re-docked the conversation does not expand. Solution: Discussed problem with Richard, and I'm submitting the changes required to fix the problem. 2012-11-02 16:22:19 -07:00
Don Kjer c06c35609c Updating linux build to gcc4.6 2012-10-11 00:09:04 +00:00
MaximB ProductEngine 06a7bd27cb CHUI-331 FIXED (Resizing conversation list when message panel is collapsed does not resize list)
*fixed missing parentheses from last push
2012-10-04 17:13:10 +03:00
MaximB ProductEngine efd8910069 CHUI-331 FIXED (Resizing conversation list when message panel is collapsed does not resize list) 2012-10-04 00:57:43 +03:00
Richard Linden bea2dfbc22 EXP-1767 WIP Received Items panel state does not persist between sessions
added get/setTargetDim() for managing layout_panel size even if its collapsed/invisible/etc
2012-03-06 16:59:11 -08:00
Richard Linden 93aa231a18 EXP-1767 WIP Received Items panel state does not persist between sessions
ensure that layout stack has updated its layout before manually resizing one of its elements
(which was causing the manual resize to be stomped on by the newly triggered layout update)
made layout stack animation occur even when layout stack not visible (inventory will appear in proper open/closed state)
LLView::setShape() now only calls handleReshape() when dimensions change
removed extraneous calls to LLLayoutStack::updateClass() so that it should be called only
once per frame now, allowing it to limit animation updates to layout stacks to one per frame.
fixed rendering glitches arising from reshaping LLFolderView while in the middle of its draw() method
2012-03-06 16:49:58 -08:00
Richard Linden e482e677b2 EXP-1767 WIP Received Items panel state does not persist between sessions
fixed layout stack so programmatic size updates will work correctly
2012-02-08 16:51:19 -08:00
Richard Linden 8f1f84212b EXP-1858 FIX Received Items panel heading in incorrect position
didn't account properly for collapsed panels
2012-02-02 11:35:36 -08:00
Richard Linden 178b30601b fixed layout_stack regression resulting in side toolbars being truncated 2012-01-31 17:52:01 -08:00
Richard Linden 20b46ef6f6 EXP-1851 FIX Crash when trying to resize the bottom sections
more layout logic fixes and added renormalization to fractional sizes to eliminate drift
2012-01-31 15:34:32 -08:00
Richard Linden f3ddb75b03 EXP-1851 WIP Crash when trying to resize the bottom sections
fixed layout logic when dealing with invisibile layout_panels
2012-01-30 18:32:35 -08:00
Richard Linden 29ad432c8b made layoutPanels have constant user_resize and auto_resize attributes 2012-01-19 19:52:49 -08:00
Richard Linden a662b888ed EXP-1824 FIX Received Items panel does not collapse correct when Height of panel is maximized in Inventory window 2012-01-19 19:40:46 -08:00
Merov Linden 02641d4ef3 Fix a Linux compilation failure 2012-01-18 16:32:07 -08:00
Richard Linden 40687a930c EXP-1812 FIX Cannot resize location bar / favorites in top navigation bar in viewer 2012-01-18 12:59:44 -08:00
Richard Linden 1eae229cf2 EXP-1809 FIX Buttons in right toolbar clipped and can be out of position 2012-01-17 16:28:12 -08:00
Richard Linden 1fede65af2 EXP-1810 FIX Cannot resize Received items panel in Inventory window 2012-01-17 16:05:10 -08:00
Richard Linden 2589a7e135 fix for crash in assert when programmatically toggling user resize 2012-01-17 12:17:03 -08:00
Merov Linden 0e7956a4cb EXP-1758 : Fix crash on login on Mac (bad pointer reference). Might need more work if the intent was to always get that pointer. 2012-01-17 07:39:14 -08:00
Merov Linden 7092a07045 Fix Mac build issue 2012-01-16 14:35:00 -08:00
Richard Linden cd4204b273 EXP-1758 WIP Progress spinner not shown during merketplace synch if Merchant Outbox floater was previously minimized
rewrote layout_stack resizing logic to be symmetrical
2012-01-16 11:03:33 -08:00
Richard Linden b1016782a2 EXP-1367 FIX Moving in and out of mouselook causes location bar to move down 2011-10-18 16:43:43 -07:00
Richard Nelson fc0f5173eb fix linux build 2011-09-28 10:40:28 -07:00
Richard Linden 68d5141fb3 EXP-1258 WIP toggle buttons between icons and icons+text modes
fixed button layout for icon+text
layout stack now uses floating point precision to avoid clamping panels to 0
2011-09-27 19:06:02 -07:00
Richard Linden 64f30a302d EXP-1228 FIX Create toolbar widget class that displays list of buttons horizontally or vertically
buttons are now centered and sized according to content
created floater_test_toolbar.xml to test
2011-09-20 16:37:21 -07:00