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.
|
|
|
|
Also change from boost::hof::is_invocable() to std::is_invocable().
|
|
|
|
# Conflicts:
# autobuild.xml
# indra/llcommon/llsys.cpp
|
|
|
|
# Conflicts:
# .github/workflows/build.yaml
|
|
Closing window correctly caused a significant amount of logout freezes
with no known reproes. Temporarily returning to old behavior were thread
was killes without closing window and will reenable in later maints to
hopefully get a scenario or at least more data of what is causing the
freeze.
|
|
Under debug LL_ERRS will show a message as well, but release won't show
anything and will quit silently so show a notification when applicable.
|
|
|
|
# Conflicts:
# indra/newview/llinventorygallery.cpp
|
|
|
|
|
|
Note that crash happened when setting LLProgressView::setMessage
|
|
|
|
|
|
|
|
|
|
|
|
# Conflicts:
# indra/newview/llchiclet.h
|
|
|
|
UIImgInvisibleUUID doesn't exist
Default normal for material is 'null'
|
|
1. After window closes viewer still takes some time to shut down, so
added splash screen to not confuse users (and to see if something gets
stuck)
2. Having two identical mWindowHandle caused confusion for me, so I
split them. It looks like there might have been issues with thread being
stuck because thread's handle wasn't cleaned up.
3. Made region clean mCacheMap immediately instead of spending time
making copies on shutdown
|
|
|
|
a preset...' option of the 'Preferences' floater
|
|
|
|
|
|
coroutines).
|
|
|
|
|
|
|
|
# Conflicts:
# indra/newview/fonts/DejaVu-license.txt
# indra/newview/fonts/DejaVuSans-Bold.ttf
# indra/newview/fonts/DejaVuSans-BoldOblique.ttf
# indra/newview/fonts/DejaVuSans-Oblique.ttf
# indra/newview/fonts/DejaVuSans.ttf
# indra/newview/fonts/DejaVuSansMono.ttf
|
|
# Conflicts:
# indra/newview/llspatialpartition.cpp
|
|
|
|
# Conflicts:
# indra/newview/llinventorygallery.cpp
# indra/newview/skins/default/xui/en/notifications.xml
|
|
|
|
# Conflicts:
# indra/llrender/llgl.cpp
# indra/llrender/llvertexbuffer.cpp
# indra/llui/llflatlistview.cpp
# indra/newview/lldrawpoolground.cpp
# indra/newview/llspatialpartition.cpp
# indra/newview/lltexturefetch.cpp
# indra/newview/llviewergenericmessage.cpp
# indra/newview/llviewertexture.cpp
# indra/newview/llvosky.cpp
# indra/newview/skins/default/xui/en/floater_preferences_graphics_advanced.xml
# indra/newview/skins/default/xui/en/floater_stats.xml
# indra/newview/skins/default/xui/en/floater_texture_fetch_debugger.xml
# indra/newview/skins/default/xui/en/notifications.xml
# indra/newview/skins/default/xui/en/panel_performance_preferences.xml
|
|
# Conflicts:
# indra/llcommon/CMakeLists.txt
# indra/newview/llspatialpartition.cpp
# indra/newview/llviewergenericmessage.cpp
# indra/newview/llvoavatar.cpp
|
|
We actively use event pumps's connections in threads, make sure nothing
modifies list of connections during reset.
And in case this doesn't fix the issue list affected pump before it
crashes to have a better idea of what is going on.
|
|
|
|
by making it thread_local.
|
|
|
|
|
|
|
|
Now that we're building with C++17, we can use Class Template Argument
Deduction to infer the type passed to the constructor of the 'narrow' class.
We no longer require a narrow_holder class with a narrow() factory function.
|
|
With GitHub viewer builds, every few weeks we've seen test failures when
ll_frand() returns exactly 1.0. This is a problem for a function that's
supposed to return [0.0 .. 1.0).
Monty suggests that the problem is likely to be conversion of F32 to F64 to
pass to fmod(), and then truncation of fmod()'s F64 result back to F32. Moved
the clamping code to each size-specific ll_internal_random specialization.
Monty also noted that a stateful static random number engine isn't
thread-safe. Added a mutex lock.
|
|
using for DRTVWR-559
|
|
ensure inventory skeleton loading doesn't block the message system from processing packets.
|
|
On a Windows CI host, we got the dreaded rc 3221225725 aka c00000fd aka stack
overflow.
|
|
The test was coded to push (what's intended to be) the third entry with
timestamp (now + 200ms), then (what's intended to be) the second entry with
timestamp (now + 100ms).
The trouble is that it was re-querying "now" each time. On a slow CI host, the
clock might have advanced by more than 100ms between the first push and the
second -- meaning that the second push would actually have a _later_
timestamp, and thus, even with the queue sorting properly, fail the test's
order validation.
Capture the timestamp once, then add both time deltas to the same time point
to get the relative order right regardless of elapsed real time.
|