• 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: Drawing performance in CALayer
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

References: 
 >Drawing performance in CALayer (From: Graham Cox <email@hidden>)

  • Prev by Date: Receiving Unicode Input in NSView
  • Next by Date: Re: Lion doesn't like tricky.key.paths in bindings?
  • Previous by thread: Drawing performance in CALayer
  • Next by thread: Why Don't Cocoa's (Un)Archiving Methods return Errors?
  • Index(es):
    • Date
    • Thread