views:

27

answers:

0

I have a NSView that renders some CoreImage stuff in drawRect: method. Everything works fine while I'm rendering on hw-accelerated context, but if I switch to software mode, I have error messages in console for each render:

<Error>: CGBitmapContextGetBitsPerComponent: invalid context 0x1084740 This isn't a bitmap context. Forcing destination format to ARGB_8 for CGContext.
<Error>: CGBitmapContextGetBitsPerComponent: invalid context 0x1084740

Similar issue happens when I render Quartz composition to the CIContext of my NSView. I get a CIImage from QCRenderer and draw it in drawRect: method, however, I have an error each [CIContext drawImage:] call:

<Error>: unknown error code: invalid context

Despite of this error the actual rendering is successful and everything looks fine (visually). It looks like this issues happen when I'm rendering on screen, rendering to an offscreen bitmap context doesn't cause such issue.

Can anyone say how to avoid this issues while drawing on screen (except of using offscreen memory buffer to draw - it's to slow)?