summaryrefslogtreecommitdiff
path: root/indra/llui
AgeCommit message (Collapse)Author
2020-03-25SL-793: Use Boost.Fiber instead of the "dcoroutine" library.Nat Goodspeed
Longtime fans will remember that the "dcoroutine" library is a Google Summer of Code project by Giovanni P. Deretta. He originally called it "Boost.Coroutine," and we originally added it to our 3p-boost autobuild package as such. But when the official Boost.Coroutine library came along (with a very different API), and we still needed the API of the GSoC project, we renamed the unofficial one "dcoroutine" to allow coexistence. The "dcoroutine" library had an internal low-level API more or less analogous to Boost.Context. We later introduced an implementation of that internal API based on Boost.Context, a step towards eliminating the GSoC code in favor of official, supported Boost code. However, recent versions of Boost.Context no longer support the API on which we built the shim for "dcoroutine." We started down the path of reimplementing that shim using the current Boost.Context API -- then realized that it's time to bite the bullet and replace the "dcoroutine" API with the Boost.Fiber API, which we've been itching to do for literally years now. Naturally, most of the heavy lifting is in llcoros.{h,cpp} and lleventcoro.{h,cpp} -- which is good: the LLCoros layer abstracts away most of the differences between "dcoroutine" and Boost.Fiber. The one feature Boost.Fiber does not provide is the ability to forcibly terminate some other fiber. Accordingly, disable LLCoros::kill() and LLCoprocedureManager::shutdown(). The only known shutdown() call was in LLCoprocedurePool's destructor. We also took the opportunity to remove postAndSuspend2() and its associated machinery: FutureListener2, LLErrorEvent, errorException(), errorLog(), LLCoroEventPumps. All that dual-LLEventPump stuff was introduced at a time when the Responder pattern was king, and we assumed we'd want to listen on one LLEventPump with the success handler and on another with the error handler. We have never actually used that in practice. Remove associated tests, of course. There is one other semantic difference that necessitates patching a number of tests: with "dcoroutine," fulfilling a future IMMEDIATELY resumes the waiting coroutine. With Boost.Fiber, fulfilling a future merely marks the fiber as ready to resume next time the scheduler gets around to it. To observe the test side effects, we've inserted a number of llcoro::suspend() calls -- also in the main loop. For a long time we retained a single unit test exercising the raw "dcoroutine" API. Remove that. Eliminate llcoro_get_id.{h,cpp}, which provided llcoro::get_id(), which was a hack to emulate fiber-local variables. Since Boost.Fiber has an actual API for that, remove the hack. In fact, use (new alias) LLCoros::local_ptr for LLSingleton's dependency tracking in place of llcoro::get_id(). In CMake land, replace BOOST_COROUTINE_LIBRARY with BOOST_FIBER_LIBRARY. We don't actually use the Boost.Coroutine for anything (though there exist plausible use cases).
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.
2020-01-28Merge branch 'master' of https://bitbucket.org/lindenlab/viewer-private into ↵Brad Payne (Vir Linden)
DRTVWR-481 Merge
2020-01-20SL-12595 The checkbox overlaps buttons in the 'Delete selected item?' ↵andreykproductengine
notification
2020-01-02SL-12484 EXP-696 Remade "Remember Password" checkbox to be multilineandreykproductengine
2019-12-16mergeBrad Payne (Vir Linden)
2019-11-22SL-12100 Premium Enhancements - Changes to rates to create Groups, UI Workandreykproductengine
2019-11-22SL-12317 UI Changes to Group limitsmaxim_productengine
2019-11-12Downstream merge from 494-maint-wassailAndreyL ProductEngine
2019-11-12BuildfixAndreyL ProductEngine
2019-11-12Merged in lindenlab/viewer-releaseAndreyL ProductEngine
2019-10-15Merge from viewer-releaseandreykproductengine
2019-09-10Merged in lindenlab/viewer-releaseandreykproductengine
2019-09-10SL-11910 [Win] Horizontal scrollandreykproductengine
2019-09-05SL-11315 Viewer asks to play media and retains selected choiceandreykproductengine
2019-08-30SL-1171 [Dev tools] UI controls <-> settings connection issuesandreykproductengine
2019-08-14Merged in lindenlab/viewer-releaseandreykproductengine
2019-08-12DRTVWR-493: Streamline LLParamSingleton, LLLockedSingleton.Nat Goodspeed
Simplify LLSingleton::SingletonLifetimeManager to SingletonInitializer: that struct has not been responsible for deletion ever since LLSingletonBase acquired dependency-ordered deleteAll(). Move SingletonData::mInitState changes from SingletonLifetimeManager to constructSingleton() method. Similarly, constructSingleton() now sets SingletonData::mInstance instead of making its caller store the pointer. Add variadic arguments to LLSingleton::constructSingleton() so we can reuse it for LLParamSingleton. Add finishInitializing() method to encapsulate logic reused for getInstance()'s INITIALIZING and DELETED cases. Make LLParamSingleton a subclass of LLSingleton, just as LLLockedSingleton is a subclass of LLParamSingleton. Make LLParamSingleton a friend of LLSingleton, so it can access private members of LLSingleton without also granting access to any DERIVED_CLASS subclass. This eliminates the need for protected getInitState(). LLParamSingleton::initParamSingleton() reuses LLSingleton::constructSingleton() and finishInitializing(). Its getInstance() method completely replaces LLSingleton::getInstance(): in most EInitStates, LLParamSingleton::getInstance() is an error. Use a std::mutex to serialize calls to LLParamSingleton::initParamSingleton() and getInstance(). While LLSingleton::getInstance() relies on the "initialized exactly once" guarantee for block-scope static declarations, LLParamSingleton cannot rely on the same mechanism. LLLockedSingleton is now a very succinct subclass of LLParamSingleton -- they have very similar functionality. Giving the LLSINGLETON() macro variadic arguments eliminates the need for a separate LLPARAMSINGLETON() macro, while continuing to support existing usage.
2019-08-10DRTVWR-493 LLUI to LLParamSingletonandreykproductengine
2019-08-10DRTVWR-493 LLRender2D init cleanupandreykproductengine
2019-07-26SL-8380 Ability to disable 2D UI tooltipsandreykproductengine
2019-07-25DRTVWR-493 LLRender2D to LLParamSingletonandreykproductengine
2019-07-05SL-11551 tilia-inc.com as an official Linden Lab URL should have SL iconmaxim_productengine
2019-06-27DRTVWR-493 LLSpellcheck doesn't need separate initandreykproductengine
2019-06-03SL-10423 Dump path data when missing critical fileandreykproductengine
2019-05-23Merged in default (pull request #56)Andrey Lihatskiy
SL-10898[Mac] Camera spins and pulls back when using alt+zoom with mouse Approved-by: Maxim Nikolenko Approved-by: Andrey Lihatskiy
2019-05-21SL-10898[Mac] Camera spins and pulls back when using alt+zoom with mouseruslantproductengine
2019-05-21SL-10898[Mac] Camera spins and pulls back when using alt+zoom with mouseruslantproductengine
2019-05-22SL-10898 revertmaxim_productengine
2019-05-14Mac buildfixAndreyL ProductEngine
2019-04-05SL-10890 Ban duration edit field shows value with a left shift if a large ↵andreykproductengine
value was set
2019-04-17Merged in lindenlab/viewer-release (EAM)AndreyL ProductEngine
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-20SL-1811 Slight chat optimizationandreykproductengine
2019-02-15SL-10234 Fixed The viewer shows installation language as system defaultandreykproductengine
2019-01-09SL-10325 FIXED Preferences tabs are displayed incorrectly if hovering it ↵maxim_productengine
while searching any keyword
2019-01-03SL-10293 Firestorm PR: preferences and menu searchAndreyL ProductEngine
2018-12-16DRTVWR-447: Merge up to latest viewer-releaseNat Goodspeed
2018-12-14Merged in lindenlab/viewer-releaseAndreyL ProductEngine
2018-12-04SL-10149 FIXED 'Mute when minimized' checkbox is displayed without focus on ↵maxim_productengine
it after pressing on label in the "Preferences" floater
2018-11-30SL-10145 Right clicking on unselected link in editor near selected text ↵andreykproductengine
shows wrong menu
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-11-08SL-10019 - [Mac] [Render] Right-click context menu immediately disappears ↵ruslantproductengine
when clicking any place in the ‘Inventory’ floater
2018-11-02SL-9766 [Render] [Mac] Alt + left mouse click has severely impaired functionsruslantproductengine
FIX #2
2018-10-04DRTVWR-474: Make "LLNotifications" "requestAdd" propagate "reqid"Nat Goodspeed
from request to response to help with request/response matching protocol.
2018-09-12SL-1397 FIXED Check mark doesn't switch when clicking on the label "Mute ↵maxim_productengine
when minimized" in Preferences
2018-08-23MAINT-8985 Added missed initializationmaxim_productengine
2018-08-22MAINT-8985 FIXED User is able to send friendship request to a friend from ↵maxim_productengine
the group menu