Re: Drawing performance in CALayer
Re: Drawing performance in CALayer
- Subject: Re: Drawing performance in CALayer
- From: Kyle Sluder <email@hidden>
- Date: Fri, 29 Jul 2011 08:16:18 -0700
On Thu, Jul 28, 2011 at 11:23 PM, Graham Cox <email@hidden> wrote:
> 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.
No, it's doing the drawing on the CPU on a bitmap context in RAM, then
uploading this as a texture to the GPU.
> 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?
Set the backgroundColor of the layer and don't draw anything into it.
This will just draw a GL quad.
--Kyle Sluder
_______________________________________________
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