Commit Graph

12 Commits (293187e04b5dfbc002fd694b75ffdca4b2fdbc8e)

Author SHA1 Message Date
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
RunitaiLinden ee0b330b2d DRTVWR-559 Decruft deprecated OpenGL flags. 2023-05-16 20:31:29 -05:00
Andrey Lihatskiy cd831c4228 Merge branch 'master' into DRTVWR-516-maint 2021-02-01 22:11:04 +02:00
Andrey Kleshchev 177ad21ade SL-13729 Performance of LLUI and LLRender2D 2020-09-17 19:59:48 +03:00
Andrey Kleshchev 372ed555ed SL-13348 Thread crashing singleton #2
Reverted LLImage to singleton conversion
2020-05-29 21:53:43 +03:00
andreykproductengine 1233842012 SL-11718 Crash in LLRender2D 2019-08-13 17:22:58 +03:00
Nat Goodspeed 98be6e141c DRTVWR-493: Streamline LLParamSingleton, LLLockedSingleton.
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-12 09:44:56 -04:00
andreykproductengine 34d8200d0f DRTVWR-493 LLRender2D init cleanup 2019-08-10 09:01:54 +03:00
andreykproductengine adeee613c6 DRTVWR-493 LLRender2D to LLParamSingleton 2019-07-25 18:20:17 +03:00
Richard Linden c35801ef1c fixed focus issue on inventory 2013-11-05 19:26:23 -08:00
Richard Linden 0a96b47663 merge with viewer-release 2013-06-05 19:05:43 -07:00
Nyx Linden 1586107e87 SH-3944 WIP CHUI merge fixing
re-introduced don's refactor of low-level openGL calls pulling out of llui
and putting them into llrender. Took the new code from their updated versions
from the CHUI merge, but put them in a place accessible to appearance utility.
2013-03-12 22:34:15 +00:00