Re: Dirty rects getting merged together makes for inefficient drawing
Re: Dirty rects getting merged together makes for inefficient drawing
- Subject: Re: Dirty rects getting merged together makes for inefficient drawing
- From: Graham Cox <email@hidden>
- Date: Tue, 20 Oct 2009 22:51:10 +1100
On 20/10/2009, at 10:42 PM, Ben Haller wrote:
So whether -needsToDrawRect or -getRectsBeingDrawn:count: is a
better solution depends mostly upon taste, and a little bit on how
many tests you intend to do in your draw method (i.e. efficiency to
testing). For my purposes, doing a total of two tests, -
needsToDrawRect is fine.
Yes, it's fine. -needsToDrawRect: is intended for when you have a
simple list of objects that need drawing. The other is better suited
when you have some form of spatial database storing the things to be
drawn, so you can extract those directly from the database based on
the dirty rects without iterating a (potentially very large) list.
--Graham
_______________________________________________
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