In my iTunes visualizer, I'm using layers to draw many, many small rectangles 
(to represent segments of a spectrum analyser display). There can be up to 32 
bands x 40 segments x 2 channels = 2,560 segments, all redrawn 30 times per 
second or more.

One layer is used for one bar, which is 40 rectangles. In my override of 
-drawInContext: I draw these using NSRectFill() in a loop.

Am I right in thinking that using calls such as NSRectFill within a CALayer 
like this is really making OpenGL calls behind the scenes? If so it's probably 
going as fast as it can. On my middling iMac it's acceptably fast, but laptops 
start to show a bit of a slow-down.

I can think of ways to optimise this, but first I want to know whether this is 
truly the fastest way to draw a simple solid rectangle in this situation. If 
not, what's better?

--Graham


_______________________________________________

Cocoa-dev mailing list ([email protected])

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 [email protected]

Reply via email to