I have a pretty heavy component that displays a lot of stuff, especially some complex path curves that plot very noisy data. So the rendering takes quite a lot of cpu. I have benchmarked it , rendering the full component 1000 times in a loop, using paintEntireComponent (rendering in an Image). If I let the graphics use the default coregraphics renderer, it takes 2x more cpu that when I let it use a LowLevelSoftwareGraphicsRender !
When I profile the CG version, I notice that:
- 30 % of the time is spent in CGContextFillPath ( called by Graphics::strokePath )
- 15 % in drawVerticalLine
- 8% in setColour
These functions are not on the radar when using the software renderer ! I’m especially surprised by the high cost of setColour
So… my question is: what are the advantages of using the CoreGraphics renderer ? better rendering quality ? better compatibility with retina display ? or will it be faster that the software renderer if I use it on a mac with a good graphics card ?