JUCE
JUCE copied to clipboard
[Bug]: CachedImage::triggerRepaint is called on OpenGL-based editor while animating a transform
Detailed steps on how to reproduce the bug
While animating a child component’s transform, JUCE invalidates the parent OpenGL context’s cachedImage, which causes spurious triggerRepaint calls, resulting in extra openGLRender calls (in our case we get around 90 FPS or so until it saturates the GPU).
What is the expected behaviour?
Expected behavior is to not call triggerRepaint since we are already calling it regularly (e.g. at 60 Hz)
Operating systems
macOS
What versions of the operating systems?
12.1
Architectures
x86_64, ARM
Stacktrace
No response
Plug-in formats (if applicable)
VST2, VST3, AU, AAX
Plug-in host applications (DAWs) (if applicable)
N/A
Testing on the develop branch
The bug is present on the develop branch
Code of Conduct
- [X] I agree to follow the Code of Conduct
To add to this: another potentially spurious openGL repaint occurs when the window size is updated. In this case, renderOpenGL is called from the main thread, which seems to really slow things down for us during resize.