I wrote a little tool that I figured might be of use to others, so I made the repo public for anyone who’s interested.
This is a JUCE background rendering tool, which will take a paint call that’s taking too long for the message thread, renders it on a background thread and then displays the image with a delay… I realise that this is not an ideal solution to the problem it solves, but especially when prototyping complex paint routines it happens too often, that things get slow and clog up the message thread resulting in problems like resizing being sluggish and making the app overall unresponsive.
This background renderer solves that problem with a few simple lines and therefore enables you to keep coding on your paint routines instead of taking care of infrastructure. Obviously the rendering results will only be displayed with a delay (when the background thread is finished rendering), but it beats stopping what you’re doing to take care of technicalities imo
Hope, this is of use for somebody. Have fun
(Also thanks to @D300 for providing a complex paint routine that will block the message thread if not used through the Background Renderer and to @daniel for giving me the right pointers to make this as easy to use as possible )