Redraw slowness in 1.38 vs. 1.28

I just upgraded a mac project from 1.28 to 1.38. That was pretty smooth, but drawing performance has signifigantly degraded.

When I profile the 1.28 version, the most expensive call is to juce::MacBitmapImage::blitToWindow(), which amounts to 10.6% of my time.

When I profile the 1.38 code, there are three related ColorSync calls that total just over 33% of my time:

I assume these calls are appearing as a result of the 1.35 change to draw everything into HIViews instead of straight to the window.

It looks like a lot of time is being spent to convert my Bitmap colors to match the machine’s colorworld (all three calls are initially called up by img_colormatch_read())

Has anyone else seen this? Is there a way I can speed up this bottleneck on the Mac?


How about this, replacing line 165 of juce_mac_Windowing.cpp:

[code] //colourspace = CGColorSpaceCreateWithName (kCGColorSpaceUserRGB);

    CMProfileRef prof;
    CMGetSystemProfile (&prof);
    colourspace = CGColorSpaceCreateWithPlatformColorSpace (prof);


That seems to have cleared things up nicely, thanks!