Jules originally added the
JUCE_COREGRAPHICS_RENDER_WITH_MULTIPLE_PAINT_CALLS option to work-around CoreGraphics’ inability to tell what components are not in the clip region, and for a while it worked.
After more changes from Apple’s side it stopped working, with some confusing interim states where using certain build settings did work, but as for now on my 10.14.6 system no build settings I know of works and to add injury to insult it doesn’t work in a nasty way!
Nasty way of not working: If you rely on
JUCE_ENABLE_REPAINT_DEBUGGING to catch unnecessary repaints - it will mislead you! You can see for yourself by placing a breakpoint on the
paint method of something that seemingly isn’t repainted but which lies between animating components (level meters etc) and you’ll see that the
paint method is being called even though
JUCE_ENABLE_REPAINT_DEBUGGING tells you otherwise!
Here’s a new work-around that does seem to fix everything:
What Apple broke is the
[NSView getRectsBeingDrawn: count:] method which we can’t rely on anymore to return the right result, and the work-around is to maintain our own
RectangleList of dirty rects like for example the OpenGL renderer does.
If anyone has this problem I’d love to hear if this works well for you. Cheers and stay safe! Yair