Merge pull request #4218 from RosettaCommons/roccomoretti/interactive_split_rosetta_util
Foldit: Separate out dependencies on Rosetta in lower-levels of interactive/
It looks like most of the lower-level GUI code is only trivially dependent on Rosetta proper. Attempt to separate this out cleanly, to ease a future frontend/backend split.
The big task here was splitting interactive/util in two, removing the Rosetta-depedendent functionality into interactive/rosetta_util. Once accomplished, with a few minor adjustments all the gui code below interactive/poseview is now independent of the main Rosetta codebase. The levels script (and associated documentation) was updated accordingly.
Merge pull request #4236 from RosettaCommons/roccomoretti/interactive_toplevel_owning
Foldit: Convert TopLevel singleton to store an OP.
This will keep us from accidentally deleting the TopLevel object through a ContainerOP or the like.
To address the Freetype segfault issue, simply add a non-OP-associated owning count.
Merge pull request #3888 from RosettaCommons/roccomoretti/interactive_address_mutex_contention2
Foldit: Address some mutex contention issues.
There are a number of locations where threaded contention for the GUI mutex was delaying threads for significant fraction of the runtime(*). A number of these locations are somewhat trivial to reorganize such that there isn't a need to hold the GUI mutex, or to hold it for shorter periods of time.
Many of these are switching to atomic data, rather than mutex-protected data. There's some larger scale reorganizations, as well as splitting up the GameApplicationTests and GameApplicationMacroTests unit tests, to better isolate some of the finicky/unstable tests.
Merge pull request #3982 from RosettaCommons/roccomoretti/interactive_fix_AP_OP_comparisons
Foldit: Fix AP/OP comparison issues
It looks like my recent pointer check branch had an unanticipated interaction with the bool() conversion function of APs & OPs. The upshot of which is that comparisons of APs & OPs were going through bool(), rather than being compared directly on the pointer. This resulted in some odd behavior in the client. This PR fixes the issue by making the bool() conversion explicit, as well as adjusting the AP & OP comparison functions.
Merge pull request #3981 from RosettaCommons/roccomoretti/interactive_geom_validity
Foldit: Fix issue with puzzle switching and focus geometry.
When you have the camera focused on a residue at the end of the pose, and then switch to a puzzle with a smaller number of residues, you get a crash due to a lingering ResidueGeometry which references a now-nonexisting residue number.
To check for this, I added a Geometry::is_valid() function which can check for this case, and added a check in StandaloneCameraController to make sure that the geometry is valid before we switch.