On Oct 1, 2009, at 6:41 AM, Andrew wrote:

Hi All,

So clearly the UIGraphicsBeginImageContext() set of calls are not thread safe, I was attempting to use them in an NSOperation and they are causing a crash, further research has shown me that I need to drop down into the CG calls to do what I want to do.


.....and presumably I could have been forewarned if I had looked at the 'UI' at the front of the function, and had read that as a Sign.


I am, however, very interested...for my own curiosity...in why they are not? my mental image of that call had it simply wrapping the CGBitmapContextCreate() set of calls, and they are thread safe.


what is it doing that renders it not thread safe, does anyone know?


At the very least, it needs to call UIGraphicsPushContext to set the current "ui graphics context", which is documented as needing to be done on the main thread (which implies that there is a single, global "ui graphics context" variable use by all of UIKit to indicate where all UIKit based drawing should go).




Glenn Andreas                      gandr...@gandreas.com
 <http://www.gandreas.com/> wicked fun!
Mad, Bad, and Dangerous to Know

_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to