• 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: Leak when "drawing too fast"
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Leak when "drawing too fast"


  • Subject: Re: Leak when "drawing too fast"
  • From: Uli Kusterer <email@hidden>
  • Date: Fri, 26 Jul 2013 17:18:11 +0200

On Jul 26, 2013, at 5:11 PM, Kyle Sluder <email@hidden> wrote:

> On Fri, Jul 26, 2013, at 03:41 AM, Uli Kusterer wrote:
>> On Jul 25, 2013, at 20:26, Andreas Mayer <email@hidden> wrote:
>>> Am 25.07.2013 um 19:36 schrieb Uli Kusterer <email@hidden>:
>>>
>>>> Have you considered using a display link callback instead of a timer?
>>>
>>> Yes. Moving to the display link callback was when I noticed the issue in the first place.
>>
>> Usually, when drawing from the display link callback is out of sync, it
>> simply means you’re taking too long to draw. Optimize your drawing code.
>>
>>> Calling -setNeedsDisplay: in the display link callback is too fast. It gives smooth animation but leads to timers piling up in the system.
>
> Or do your drawing offscreen and use the display link to blit it to the
> screen.


 Yes, that'd work, too, as long as you have spare cycles somewhere else that you can use to parallelise the drawing (e.g. another CPU to run a second thread on). But you have to be able to produce a new frame every 1/60th of a second if you want to draw at 60fps. If DisplayLink notices you can't do that, it will call you less often automatically.

Cheers,
-- Uli Kusterer
"The Witnesses of TeachText are everywhere..."
http://www.zathras.de


_______________________________________________

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


References: 
 >Leak when "drawing too fast" (From: Andreas Mayer <email@hidden>)
 >Re: Leak when "drawing too fast" (From: Uli Kusterer <email@hidden>)
 >Re: Leak when "drawing too fast" (From: Andreas Mayer <email@hidden>)
 >Re: Leak when "drawing too fast" (From: Uli Kusterer <email@hidden>)
 >Re: Leak when "drawing too fast" (From: Andreas Mayer <email@hidden>)
 >Re: Leak when "drawing too fast" (From: Uli Kusterer <email@hidden>)
 >Re: Leak when "drawing too fast" (From: Kyle Sluder <email@hidden>)

  • Prev by Date: Re: How to make text view treat colon as word boundary
  • Next by Date: Re: Observing Time
  • Previous by thread: Re: Leak when "drawing too fast"
  • Next by thread: Re: Leak when "drawing too fast"
  • Index(es):
    • Date
    • Thread