I have not checked this on other platforms; it may be macOS specific.
This is tested on a MacBook Pro Retina.
This issue is reproducible with the JUCE demo on the master branch of the ROLI JUCE repo.
What I am finding is that if you run the JUCE Demo (in either Debug or Release) and switch to the 2d Rendering Demo the following will happen:
If the mouse cursor is NOT over the window, then the 2d Demo animates smoothly and the “Actual FPS” readout sits right at 60 FPS (plus or minus a little noise < 1FPS).
If the mouse cursor is over the window (not moving, just within the bounds of the window), the animation “stutters” perhaps 2 times per second. The “Actual FPS” readout jumps between 50 and 60 FPS (throughout the range).
If you select the OpenGL demo, the 3d Content animates smoothly whether or not the mouse cursor is within the bounds of the window. If, you enable the “Draw 2d graphics in the background” you revert to the behavior that is seen for the 2d Rendering demo (e.g. smooth if the mouse is outside of the window, and stuttering if the mouse is within the window). In this case the stutter occurs for both the 2d and the 3d Content.
I am not sure how to trace where this is coming from.
Obviously, this is less than ideal as it causes the UI to stutter while the user is interacting with it.
I think that it is very interesting that the stuttering doesn’t happen with the 3d Content in the OpenGL demo, but it does if the 2d drawing is turned on. Perhaps that is canary for someone who is more familiar with the code…