We spend more time than necessary in: CGContextSetRGBStrokeColor (); CGContextSetRGBFillColor (); When these are called they construct a new CGColorSpace and compare the color components with old fill/stroke color. If the components aren't equal then they construct a new CGColor and set that using CGContextSet(Stroke/Fill)ColorWithColor. Further we call both functions each time we call _cairo_quartz_setup_source. The simplest thing we can do here is avoid calling both in _cairo_quartz_setup_source. The ideal thing would be to take advantage of the fact that set_source_rgb already does a comparison of the colors and have it communicate source changes to the backend instead of passing all the state into the _fill()/_stroke() functions. Then we could keep a DeviceRGB color space around and construct a new CGColor everytime the source pattern changes.