Age | Commit message (Collapse) | Author |
|
The big idea is to reduce the number of per-tick callbacks asking, "Is it time
yet? Is it time yet?" We do that for LLEventTimer and LLEventTimeout.
LLLater presents doAtTime(LLDate), with doAfterInterval() and doPeriodically()
methods implemented using doAtTime(). All return handles. The free functions
doAfterInterval() and doPeriodically() now forward to the corresponding
LLLater methods.
LLLater also presents isRunning(handle) and cancel(handle).
LLLater borrows the tactic of LLEventTimer: while there's at least one running
timer, it registers an LLCallbackList tick() callback to service ready timers.
But instead of looping over all of them asking, "Are you ready?" it keeps them
in a priority queue ordered by desired timestamp, and only touches those whose
timestamp has been reached. Also, it honors a maximum time slice: once the
ready timers have run for longer than the limit, it defers processing other
ready timers to the next tick() call. The intent is to consume fewer cycles
per tick() call, both by the management machinery and the timers themselves.
Revamp LLCallbackList to accept C++ callables in addition to (classic C
function pointer, void*) pairs. Make addFunction() return a handle (different
than LLLater handles) that can be passed to a new deleteFunction() overload,
since std::function instances can't be compared for equality.
In fact, implement LLCallbackList using boost::signals2::signal, which provides
almost exactly what we want.
LLCallbackList continues to accept (function pointer, void*) pairs, but now
we store a lambda that calls the function pointer with that void*. It takes
less horsing around to create a C++ callable from a (function pointer, void*)
pair than the other way around. For containsFunction() and deleteFunction(),
such pairs are the keys for a lookup table whose values are handles.
Instead of having a static global LLCallbackList gIdleCallbacks, make
LLCallbackList an LLSingleton to guarantee initialization. For backwards
compatibility, gIdleCallbacks is now a macro for LLCallbackList::instance().
Move doOnIdleOneTime() and doOnIdleRepeating() functions to LLCallbackList
methods, but for backwards compatibility continue providing free functions.
Reimplement LLEventTimer using LLLater::doPeriodically(). One implication is
that LLEventTimer need no longer be derived from LLInstanceTracker, which we
used to iterate over all instances every tick. Give it start() and stop()
methods, since some subclasses (e.g. LLFlashTimer) used to call its member
LLTimer's start() and stop(). Remove updateClass():
LLCallbackList::callFunctions() now takes care of that.
Remove LLToastLifeTimer::start() and stop(), since LLEventTimer now provides
those. Remove getRemainingTimeF32(), since LLLater does not (yet) provide that
feature.
While at it, make LLEventTimer::tick() return bool instead of BOOL, and change
existing overrides.
Make LLApp::stepFrame() call LLCallbackList::callFunctions() instead of
LLEventTimer::updateClass().
We could have refactored LLEventTimer to use the mechanism now built into
LLLater, but frankly the LLEventTimer API is rather clumsy. You MUST derive a
subclass and override tick(), and you must instantiate your subclass on the
heap because, when your tick() override returns false, LLEventTimer deletes
its subclass instance. The LLLater API is simpler to use, and LLEventTimer is
much simplified by using it.
Merge lleventfilter.h's LLEventTimeoutBase into LLEventTimeout, and likewise
merge LLEventThrottleBase into LLEventThrottle. The separation was for
testability, but now that they're no longer based on LLTimer, it becomes
harder to use dummy time for testing. Temporarily skip tests based on
LLEventTimeoutBase and LLEventThrottleBase.
Instead of listening for LLEventPump("mainloop") ticks and using LLTimer,
LLEventTimeout now uses LLLater::doAfterInterval(). Instead of LLTimer and
LLEventTimeout, LLEventThrottle likewise now uses LLLater::doAfterInterval().
Recast a couple local LLEventTimeout pre-lambda callable classes with lambdas.
Dignify F64 with a new typedef LLDate::timestamp. LLDate heavily depends on
that as its base time representation, but there are those who question use of
floating-point for time. This is a step towards insulating us from any future
change.
|
|
Turn on LL_TESTS for CI builds.
|
|
brad/fix gltfmaterial tests
|
|
also correct member packing to match server side
|
|
Project/channel by branch
|
|
|
|
Allow changing debug settings via Lua script
|
|
|
|
|
|
|
|
Add editorconfig
|
|
|
|
|
|
|
|
|
|
|
|
Provide a basic editorconfig file with this repository's defaults.
|
|
|
|
|
|
|
|
* Fix for SL-20652 shadows on mac breaking alpha blended objects.
fix secondlife/jira-archive-internal#71030
* clean up surrounding indentation
* Skip unnecessary casting
* Clean up LLGLSLShader::sIndexedTextureChannels usage and improve fix for SL-20652
|
|
|
|
secondlife/viewer-private#230: Amend terrain loading test plan
|
|
Add more details to Behavior overview.
|
|
Pull SLVoice from s3 so that the OSS build configurations work.
|
|
This was a broken test that got all the way to viewer release and the main
branch.
(cherry picked from commit a33a9d29380e6c1a0a9cc539be309d47adef4acf)
|
|
different feature flags (#1345)
|
|
|
|
|
|
LF, and trim trailing whitespaces as needed
|
|
|
|
|
|
|
|
|
|
Cached minimap textures still using extra memory/loading still not reliable
|
|
|
|
newview/llcallbacklist.cpp has no corresponding .h file, it isn't referenced
by newview/CMakeLists.txt, and its removal doesn't affect the build. See
llcommon/llcallbacklist.{h,cpp} for the real functionality.
(cherry picked from commit 8e53d6ff4c6594f014f456b0ba9ebf86ac91f6bc)
|
|
|
|
|
|
for minimap gen. Fix some emissive maps.
|
|
|
|
This was a broken test that got all the way to viewer release and the main
branch.
(cherry picked from commit a33a9d29380e6c1a0a9cc539be309d47adef4acf)
|
|
|
|
Also change from boost::hof::is_invocable() to std::is_invocable().
|
|
This was a broken test that got all the way to viewer release and the main
branch.
|
|
|
|
|
|
Update from main
|
|
since server still sends those in some cases
|
|
|