• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: CALayer -drawInContext and GCD
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: CALayer -drawInContext and GCD


  • Subject: Re: CALayer -drawInContext and GCD
  • From: David Duncan <email@hidden>
  • Date: Thu, 2 Sep 2010 08:52:58 -0700

On Sep 2, 2010, at 7:39 AM, Vincent Habchi wrote:

> I just wanted to know someone has already tried to successfully send a CALayer -drawInContext method to a GCD dispatch queue. I suspect this is not possible, because of main loop related issue, but this is unclear.

This can be done, but you have to ensure that your layer's drawing is threadsafe. Should be as simple as this with that precondition met:

dispatch_async(queue, ^{
	[layer display];
	[CATransaction flush];
}
--
David Duncan

_______________________________________________

Cocoa-dev mailing list (email@hidden)

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:

This email sent to email@hidden

  • Follow-Ups:
    • Re: CALayer -drawInContext and GCD
      • From: Chris Parker <email@hidden>
References: 
 >CALayer -drawInContext and GCD (From: Vincent Habchi <email@hidden>)

  • Prev by Date: CALayer -drawInContext and GCD
  • Next by Date: Re: CALayer -drawInContext and GCD
  • Previous by thread: CALayer -drawInContext and GCD
  • Next by thread: Re: CALayer -drawInContext and GCD
  • Index(es):
    • Date
    • Thread