* Stop trying to be compatible with the old format, and just bump the version number.
* Add uint64_t support to serializer
* A bit improved debug output from serializer
* Add lastAdvance() function to ask the serializer how much data was added/read in the last operation.
This should complete what was started in the HiFi days but didn't quite succeed.
Setting::Manager is now thread safe, and delegates all settings writes to a thread
that nothing waits on, which should ensure that settings don't degrade performance
even on slow storage devices.
Functions that weren't thread safe were removed from Setting::Manager, and it was
reduced to a key/value store.
Functions that modify state like beginGroup were implemented in the Settings class
instead, which should be created only in the context where it's needed. It will
forward all changes to the manager.
A few QSettings functions were left unimplemented because they're not used in
the code. They may be implemented later if there's a need.
Before this PR, there were no locks around the two internal QHash data structures.
Races are rare, due to the fact that the DependencyManager is initialized on the main thread on startup and the fact that a static QWeakPointer was used as an internal cache.
However, there have been reported crashes where the render thread uses DependencyManager::isSet() perhaps while the main thread is adding a late dependency.
DependencyManager::isSet() did not use the static QWeakPointer cache and was more prone to race conditions.
To avoid this and perhaps other data races, mutexes now guard both of the internal QHash data structures.
Also, as an optimization, the most frequent call to DependencyManager::isSet was removed (Profile.cpp).
There was a bug in writeBitVector(), where the last byte was not consistantly written into the destination buffer.
A unit test was added to verify that writeBitVector() and readBitVector() are correct.
This bug has been around a long time... introduced by commit 39ed7f7b in 2014.
This became apparent to me when testing the tablet-ui, there was a case where the
hand styluses were not appearing when close to a web entity. Because findEntities
is such a fundamental feature used by handControllerGrab, this fix should make all
grabbing feel more consistent and predictable.
I added a unit test that reproduces the issue.