summaryrefslogtreecommitdiff
path: root/indra/llwindow
AgeCommit message (Collapse)Author
2020-03-25DRTVWR-494: Avoid keeping iterator to destroyed temporary container.Nat Goodspeed
2020-03-25DRTVWR-494: Defend LLInstanceTracker against multi-thread usage.Nat Goodspeed
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-10-09Downstream merge from lindenlab/viewer-manulAndreyL ProductEngine
2019-10-09Merged in lindenlab/viewer-xcode11AndreyL ProductEngine
2019-09-25DRTVWR-476: Track change to NSView in Xcode 11's 10.15 SDK.Nat Goodspeed
2019-09-19SL-3221 Safeguard against crashes in LLDXHardwareandreykproductengine
2019-09-11SL-11918 [Mac] Wheel support (horizontal scroll)Mnikolenko ProductEngine
2019-09-10SL-11910 [Win] Horizontal scrollandreykproductengine
2019-08-13Merged in lindenlab/viewer-bearAndreyL ProductEngine
2019-08-13Merged in lindenlab/viewer-lynxAndreyL ProductEngine
2019-08-13Merged in lindenlab/viewer-releaseAndreyL ProductEngine
2019-07-19SL-11592 [Mac] Fixed mouse buttons ids for correct handling.Mnikolenko ProductEngine
2019-07-18SL-11592 [Mac] Ability to bind extra mouse buttons for push to talkandreykproductengine
2019-07-18SL-11592 [Win] Ability to bind extra mouse buttons for push to talkandreykproductengine
2019-06-24Merged in lindenlab/viewer-releaseAndreyL ProductEngine
2019-06-22Merged in lindenlab/viewer-lynxAndreyL ProductEngine
2019-06-22Merged in lindenlab/viewer-releaseAndreyL ProductEngine
2019-06-20SL-11432 FIXED [OSX] Avatar is spinning when pressing Alt+D+Command and then ↵Mnikolenko ProductEngine
releasing D key
2019-06-04SL-11341 Skip storing the previous gamma value on Intel GPUs + more loggingAndreyL ProductEngine
2019-05-16SL-11178 FIXED [mac] Viewer crashes if another app gets focus before viewer ↵Mnikolenko ProductEngine
window is created
2019-05-08Merged in lindenlab/viewer-releaseAndreyL ProductEngine
2019-04-15SL-10888 Fixed OSX mouse issues in HiDPI modeAndreyL ProductEngine
2019-04-08SL-10907 getWidthF32 crash in fontsandreykproductengine
2019-04-02Merged in lindenlab/viewer-releaseAndreyL ProductEngine
2019-03-01Merged in lindenlab/viewer-releaseAndreyL ProductEngine
2019-03-01Merged in lindenlab/viewer-releaseAndreyL ProductEngine
2019-02-08Fix issue where gamma was being corrupted on windows with night light enabledDrake Arconis
2019-01-14Merged in ruslantproductengine/viewer-cougar-4cr-5 (pull request #41)Andrey Lihatskiy
SL-10176 - [Love Me Render] MacOS Quit / Shutdown crash Approved-by: Andrey Lihatskiy <andreylproductengine@lindenlab.com>
2019-01-14- remove getDeviceScaleFactor() and replace it to getSystemUISize() ↵ruslantproductengine
according Ansariel note
2018-12-11SL-10153: Fix OSMessageBoxWin32() to handle non-ASCII text.Nat Goodspeed
2018-12-11SL-10176 - [Love Me Render] MacOS Quit / Shutdown crashruslantproductengine
2018-11-26SL-9766 [Render] [Mac] Alt + left mouse click has severely impaired functionsruslantproductengine
SL-10019 - [Mac] [Render] Right-click context menu immediately disappears when clicking any place in the ‘Inventory’ floater SL-9984 - [Retina] Camera frustum, do not display correctly on "WORLD MAP" window. SL-10027 - [Mac] [Render] Add toggle for Retina support to mitigate FPS loss Re-FIX for Retina support.
2018-10-23SL-9774 [Render] dragging active Second Life session to second monitor zooms ↵ruslantproductengine
in making viewer unusable
2018-10-19SL-9766 [Render] [Mac] Alt + left mouse click has severely impaired functionsruslantproductengine
2018-09-27Merged in lindenlab/viewer-releaseAndreyL ProductEngine
2018-09-26Automated merge with ssh://bitbucket.org/lindenlab/viewer-releaseNat Goodspeed
2018-09-13DRTVWR-474: Clean up use of LLDir::getAppRODataDir(), esp. on Mac.Nat Goodspeed
Clearly it's not obvious to maintainers that on the Mac, getAppRODataDir() returns the app's Resources directory: in a number of places the code starts with the executable directory and appends "../Resources" to find that.
2018-09-04MAINT-9082 crash on HandleFocusLostandreykproductengine
2018-09-03MAINT-9076 Improved support for Retina Displaysruslantproductengine
2019-04-26Automated merge with file:///Users/nat/linden/viewer-gridselectNat Goodspeed
2019-04-25Return CGPoint and CGSize by value, not const ref to temporary.Nat Goodspeed
2019-04-16Merged in lindenlab/viewer-bearAndreyL ProductEngine
2019-04-02Merged in lindenlab/viewer-bearAndreyL ProductEngine
2019-03-21SL-10648 Handling for Window crash on exitandreykproductengine
2018-08-14MAINT-5651 Crashes on close from LLWindowWin32andreykproductengine
2018-06-01MAINT-8712 Crash on close in LLWindowWin32Andrey Kleshchev
2018-11-16SL-10023 FIXED Dragging mouse on World map sometimes causes cursor jump to ↵Mnikolenko ProductEngine
the center of the screen
2018-03-26MAINT-8428 FIXED [OSX] The 'Eyedropper' cursor is not shown in the worldMnikolenko ProductEngine
2018-02-15Add debug setting and code to allow nVidia nSight graphics debugging to ↵Graham Linden graham@lindenlab.com
capture SL frames. These changes are only enabled if RenderNsightDebugSupport is true and eliminate use of some OpenGL legacy functionality which is incompatible with nSight capture (mostly glReadPixels and other fixed-function pipe rendering calls).
2018-01-19Build fix for non-dpi aware environmentandreykproductengine