Closed johntyree closed 8 years ago
Oh, thanks, I was just looking at fixing that merge conflict.
The fps counter is a bit wonky now, but that's not too important.
LGTM otherwise.
The FPS counter is relying on the frame number, which changes randomly if you're moving the slider around.
We could track that better, but it's not really useful if you're not in RUN_FOREVER
mode anyway.
Keeping in line with the sweeping performance improvements of the last two weeks, this PR prevents multiple asynchronous requests from building up when the slider is being moved around.
I'd call it a state machine, but there wasn't really enough to map it out properly. Essentially it works like this:
While running, we check if the system state is STOPPED. If so, we return immediately and the loop breaks. Otherwise, we load whatever frame is currently in the variable. If we ever discover that the current frame and the variable match, we set the system to STOPPED, unless we were in FOREVER mode, at which time we set the variable to current + 1.