• 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: Core Animation vs. Basic Cocoa Graphics
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Core Animation vs. Basic Cocoa Graphics


  • Subject: Re: Core Animation vs. Basic Cocoa Graphics
  • From: Volker in Lists <email@hidden>
  • Date: Thu, 11 Mar 2010 11:23:24 +0100

Hi,

are you drawing ALL of your paths whenever the user scrolls or only the ones that are within the visible rect? If the first, you may try to change that to the second and gain lots of performance. I draw a sound wave view and when drawing all of it while zoomed into it, it is sllllooowww. But when I only draw what actually needs to be drawn, it is lightning fast.

With CoreAnimation: As soon as you have the image, you get fast drawing. Zooming, Size changes etc. may need a redraw of the image. Also, if the image is rather large, you'll need CATiledLayers otherwise your gpu memory may not be big enough to hold the image for the CALayer.

Volker

Am 10.03.2010 um 18:13 schrieb Mazen M. Abdel-Rahman:

> Hi All,
>
> I was able to write a simple calendar view that uses basic cocoa graphics to draw directly on the view (NSBezierPath, etc.).  I actually use several different paths for drawing the calendar (it's a weekly calendar) to allow different horizontal line widths (hour, half hour, etc.).  The calendar view is inside a scroll view - and is actually about 3 times longer than the view window.   The main problem is that the scrolling is not smooth - and my assumption is that it's because the NSBezier stroke functions  have to be constantly called to render the calendar.
>
> For something as relatively simple as this would moving to core animation - i.e. trying to render the calendar on a layer instead (I am still trying to learn core animation) add performance benefits?  And would it allow for smoother scrolling?
>
_______________________________________________

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: 
 >Core Animation vs. Basic Cocoa Graphics (From: "Mazen M. Abdel-Rahman" <email@hidden>)

  • Prev by Date: Re: Core Animation vs. Basic Cocoa Graphics
  • Next by Date: KVO on NSDictionary elements
  • Previous by thread: Re: Core Animation vs. Basic Cocoa Graphics
  • Next by thread: Re: Cocoa-dev Digest, Vol 7, Issue 287
  • Index(es):
    • Date
    • Thread