- Sep 03, 2016
-
-
Nat Goodspeed authored
We need LLSingleton machinery to be able to reference get_id() without also depending on all the rest of LLCoros -- since LLCoros isa LLSingleton.
-
Nat Goodspeed authored
Change the module-static thread_specific_ptr to a function-static thread_specific_ptr so it will be initialized on demand -- since LLSingleton will need to rely on get_id(). Note that since LLCoros isa LLSingleton, we must take great care to avoid circularity. Introduce a private helper class LLCoros::Current to obtain and bind that thread_specific_ptr. Change all existing internal references from the static thread_specific_ptr to the new Current helper class.
-
Nat Goodspeed authored
Specifically, add DEBUG logging to the code that maintains the stack of LLSingletons currently being initialized. This involves passing LLSingletonBase's constructor the name of LLSingleton's template parameter subclass, since during that constructor typeid(*this).name() will only produce "LLSingletonBase". Also add logdebugs() and oktolog() helper functions.
-
Nat Goodspeed authored
LLError machinery depends on two different LLSingletons. Its is_available() function is primarily for LLSingleton itself to determine whether it is, or is not, safe to log. Until both of LLError's LLSingletons have been constructed, attempting to log LLSingleton operations could produce infinite recursion.
-
- Sep 02, 2016
-
-
Nat Goodspeed authored
LLError::abbreviateFile() is specifically to avoid cluttering log output with the prefix of an absolute file path on the original build system, pointless for anyone trying to read the log.
-
- Sep 01, 2016
-
-
Nat Goodspeed authored
Raw lllog() doesn't work for varying log level, which is why LL_VLOGS() exists.
-
Nat Goodspeed authored
In some places we want to log the same information but with different severity depending on specifics. In other cases we need to test the availability of the logging subsystem before engaging it. LL_VLOGS() accepts an LLError::ELevel argument that can differ with each call, while retaining the desirable feature of deciding only once for each level.
-
Nat Goodspeed authored
-
- Aug 31, 2016
-
-
Nat Goodspeed authored
near the end of LLAppViewer::cleanup() so every LLSingleton class that hasn't already been explicitly cleaned up gets a chance to perform its own cleanup.
-
Nat Goodspeed authored
-
Nat Goodspeed authored
for consistency with everything else, so we can use SUBSYSTEM_CLEANUP() macro to call it.
-
Nat Goodspeed authored
Specifically, log as LLSingleton captures inter-Singleton dependencies. Also log cleanupAll() calls to cleanupSingleton() and deleteAll() calls to deleteSingleton(), since they happen in an implicitly-determined order. But do not log anything during the implicit LLSingletonBase::deleteAll() call triggered by the runtime destroying the last LLSingleton's static data. That's too late in the run; even std::cerr might already have been destroyed!
-
- Aug 30, 2016
-
-
Nat Goodspeed authored
-
Nat Goodspeed authored
Introduce corresponding llcleanup.cpp, llinitdestroyclass.cpp modules to contain code that performs logging calls. Track class::method names for LLInitClass<T> and LLDestroyClass<T> subclasses, and log them when called. The order in which these calls occur could be relevant to bugs, and could surface the need to convert to LLSingleton dependencies.
-
Nat Goodspeed authored
It used to contain an LLSingleton called Singleton, requiring LLGlobalEconomy::Singleton::instance() to access it rather than the conventional LLGlobalEconomy::instance(). This has been fixed, so normalize references accordingly.
-
Nat Goodspeed authored
LLSingleton::getIfExists() has been eliminated. The only remaining way to detect whether a given LLSingleton has been instantiated is to call instanceExists(). But the relevant cleanup code should be refactored to cleanupSingleton() anyway, which would make this specific call moot.
-
Nat Goodspeed authored
This fixes fatal warnings.
-
Nat Goodspeed authored
clang gets nervous about expressions that call functions inside typeid(), even though these particular typeid() calls are runtime expressions on runtime values. Extract the offending calls to a previous statement.
-
- Aug 11, 2016
- Aug 04, 2016
-
-
AndreyL ProductEngine authored
-
Andrey Lihatskiy authored
-
AndreyL ProductEngine authored
-
Nat Goodspeed authored
The only call to the findDiscardLevelsBoundaries() method was commented out inside initDecode(), with a comment: // Merov : Test!! DO NOT COMMIT!! This was the only caller of copy_tile(), which was the only caller of copy_block(). Commented out all three of these (biggish!) functions, since I have no idea what any of them were supposed to do or when it might be useful to call them. In other words, I can't yet rule out the possibility that I might have to uncomment them.
-
AndreyL ProductEngine authored
-
- Aug 01, 2016
-
-
andreykproductengine authored
-
andreykproductengine authored
-
andreykproductengine authored
-
- Jul 27, 2016
-
-
AndreyL ProductEngine authored
-
- Jul 26, 2016
-
-
AndreyL ProductEngine authored
-
- Aug 03, 2016
-
-
Nat Goodspeed authored
Use boost::scoped_ptr instead of raw pointers to LLKDUMemSource, LLKDUDecodeState, kdu_coords and kdu_dims so cleanup is simpler, and automated on destruction of LLImageJ2CKDU. Replace pointer to kdu_codestream with a custom RAII class. kdu_codestream is itself an opaque handle, so we don't need to add another layer of indirection. Just wrap it to ensure its destroy() method is reliably called when needed. Make static instances of LLKDUMessageWarning and LLKDUMessageError self-register, eliminating the companion static bool and explicit checks in code.
-
- Jul 26, 2016
-
-
Oz Linden authored
-
- Jul 25, 2016
-
-
andreykproductengine authored
-
- Jul 22, 2016
-
-
Nat Goodspeed authored
instead of legacy BOOL.
-
Nat Goodspeed authored
Derive them both from a common base class that does the message logging, instead of having each handler class log redundantly -- especially since the put_text() override accepting const kdu_uint16* was simply streaming the kdu_uint16 pointer to the log file, which would log the hex value of the pointer. Although we want a static instance of each of these handler classes, pull it out rather than nesting the instance within the class itself.
-
- Jul 21, 2016
-
-
Nat Goodspeed authored
Specifically, remove unused function pointer types CreateLLImageJ2CFunction, DestroyLLImageJ2CFunction and EngineInfoLLImageJ2CFunction. Also eliminate static fallbackDestroyLLImageJ2CImpl() and fallbackEngineInfoLLImageJ2CImpl(), leaving only static fallbackCreateLLImageJ2CImpl(). We do need a factory function to instantiate the appropriate LLImageJ2CImpl subclass, so leave the fallbackCreateLLImageJ2CImpl() link seam in place. However, given that every known LLImageJ2CImpl subclass is cheap to instantiate, make getEngineInfo() a pure virtual method on that subclass: the static LLImageJ2C::getEngineInfo() method can temporarily construct an instance to query. While we're at it, make getEngineInfo() return std::string like LLImageJ2C::getEngineInfo(). It's ridiculous that fallbackEngineInfoLLImageJ2CImpl() implementations constructed a static std::string and returned its c_str(), only to have LLImageJ2C::getEngineInfo() construct ANOTHER std::string from the returned const char*. fallbackDestroyLLImageJ2CImpl() never did anything useful: it merely deleted the passed LLImageJ2CImpl subclass pointer as the specific subclass type. But since LLImageJ2CImpl's destructor is virtual, LLImageJ2C's destructor could simply delete the stored LLImageJ2CImpl*. In fact, make mImpl a boost::scoped_ptr<LLImageJ2CImpl> so we don't even have to delete it manually.
-
Nat Goodspeed authored
destroyLLImageJ2CKDU(). These were apparently intended as simple C-style DLL entry points. But as nobody calls them, and as we decided against building the viewer from DLLs, they only clutter the code.
-