• 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: NSView -drawRect optimization
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSView -drawRect optimization


  • Subject: Re: NSView -drawRect optimization
  • From: John Stiles <email@hidden>
  • Date: Wed, 13 Feb 2008 09:41:56 -0800

Paul Bruneau wrote:
On Feb 12, 2008, at 5:17 PM, John Stiles wrote:

Paul Bruneau wrote:
If anyone likes looking at newbie code for stupid things, now is your chance. I'll happily take any tips, comments, or even derision. My biggest fear is to hear "There's nothing you can do about it--stuff takes time" to which I would respond, "Then how does Blizzard do it!? I know they are drawing more than 226 rectangles!"

At Blizzard, we render graphics with OpenGL, which is going to be a lot faster than anything you can do on the CPU :)
I haven't looked at your code, but have you experimented with CoreAnimation at all? This would let you leverage the GPU for your drawing as well, which might help.

Thank you John, I knew there had to be some kind of magic involved. I have not experimented with CoreAnimation yet as I have heeded mmalc's warnings about not jumping in too early with advanced Cocoa topics :) At this point, I think I will be able to gain a lot of performance with smarter choices about when to draw different parts of my view but if I am still stuck after that I will look at CA. Thanks again for your kind reply.
Your analysis of the situation seems good to me :)
I would suggest, though, that CoreAnimation is pretty easy to grasp. If you've got some spare time, check out the demo/example code and I bet you will be able to understand it.
_______________________________________________


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: 
 >NSView -drawRect optimization (From: Paul Bruneau <email@hidden>)
 >Re: NSView -drawRect optimization (From: John Stiles <email@hidden>)
 >Re: NSView -drawRect optimization (From: Paul Bruneau <email@hidden>)

  • Prev by Date: Re: Intercepting keyDown event from NSComboBox
  • Next by Date: Re: Core Data: unidirectional relationships
  • Previous by thread: Re: NSView -drawRect optimization
  • Next by thread: Re: NSView -drawRect optimization
  • Index(es):
    • Date
    • Thread