I have some audio meter displays (refreshing on Timers) that are causing large unnecessary rects to be repainted (on Mac). So I wanted to try the JUCE_COREGRAPHICS_RENDER_WITH_MULTIPLE_PAINT_CALLS to see if it provided any benefit.
Mac 10.14.6 Mojave.
JUCE 7.0.0
According to the release notes for JUCE 7, this should be within the specs for using this feature.
Projucer MacOS DeploymentTarget = default - does this matter? (I tried setting it to 10.14; didn’t make a difference).
So I added JUCE_COREGRAPHICS_RENDER_WITH_MULTIPLE_PAINT_CALLS=1 to my Preprocessor definitions in my Projucer Project, and tried it.
It does indeed use less CPU when it is displaying the meters. However, all of my ComboBox popup menus are whacked, like this:
It’s related to scaling the enclosing component with an AffineTransform. The example has a comboBox that sets the scaling of the component that it lives inside. At 100%, the popup is normal. At other magnifications, the popup is whacked:
I’m also managing to hit an assert (Line #93 juce_mac_CGMetalRendered.cpp drawRectangleList() ) while playing around with this, although not consistently and I’m not sure what triggers it. Usually when clicking on the comboBox shortly after launch:
if (gpuTexture == nullptr)
{
jassertfalse;
return false;
}