• 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: vincent habchi <email@hidden>
  • Date: Thu, 2 Sep 2010 20:29:50 +0200

David, Chris,

I promise I did not plan to start an Apple internal quarrel! ;)

>>> dispatch_async(queue, ^{
>>> 	[layer display];
>>> 	[CATransaction flush];
>>> }
>>
>> There is (almost) never any reason for anyone to be calling +[CATransaction flush] directly. You'll cause all sorts of unexpected things to happen w.r.t. extant CATransactions. You should let +flush be called at the end of the run loop on its own.
>
> The work is occurring on a GCD queue, which has no runloop running, as such it won't be called on its own and there are no other extant transactions to be affected. Assuming 'queue' isn't the main thread queue that is.

You mean I shall use your dispatch_async invocation instead of calling [layer setNeedsDisplay]? I was thinking of calling dispatch_async () inside -drawInContext, but, if I understand your example correctly, this is wrong.

Thanks for taking the time to answer me,
Vincent_______________________________________________

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: David Duncan <email@hidden>
    • Re: CALayer -drawInContext and GCD
      • From: Chris Parker <email@hidden>
References: 
 >CALayer -drawInContext and GCD (From: Vincent Habchi <email@hidden>)
 >Re: CALayer -drawInContext and GCD (From: David Duncan <email@hidden>)
 >Re: CALayer -drawInContext and GCD (From: Chris Parker <email@hidden>)
 >Re: CALayer -drawInContext and GCD (From: David Duncan <email@hidden>)

  • Prev by Date: Re: iTunes 10 UI
  • Next by Date: [NSTextView] Is there a workaround for Snow Leopard new word selection behavior/bug?
  • Previous by thread: Re: CALayer -drawInContext and GCD
  • Next by thread: Re: CALayer -drawInContext and GCD
  • Index(es):
    • Date
    • Thread