• 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: Dirty rects getting merged together makes for inefficient drawing
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Dirty rects getting merged together makes for inefficient drawing


  • Subject: Re: Dirty rects getting merged together makes for inefficient drawing
  • From: Uli Kusterer <email@hidden>
  • Date: Tue, 20 Oct 2009 12:54:54 +0200


On 19.10.2009, at 23:58, Ben Haller wrote:

On 19-Oct-09, at 5:27 PM, Dave Keck wrote:

Would NSView's -getRectsBeingDrawn:count: help?

Well, I'm already using it in my own code where appropriate. (Or actually I'm using -needsToDrawRect:). But the problem is that a whole bunch of NSTableView cells are getting drawn that never got invalidated.

That's like saying: "I'm using the setter, why would I need to use the getter?"


The dirtyRect parameter passed to drawRect: is the union of all redraw rectangles. So, it's the smallest rect that encloses all the dirty rects. drawRect: does not get called for each redraw rect. If you want the individual sub-rects, use getRectsBeingDrawn:count: and loop over all those rects and draw the individual parts.

Cheers,
-- Uli Kusterer
"The witnesses of TeachText are everywhere..."



_______________________________________________

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


  • Follow-Ups:
    • Re: Dirty rects getting merged together makes for inefficient drawing
      • From: Ben Haller <email@hidden>
References: 
 >Dirty rects getting merged together makes for inefficient drawing (From: Ben Haller <email@hidden>)
 >Re: Dirty rects getting merged together makes for inefficient drawing (From: Dave Keck <email@hidden>)
 >Re: Dirty rects getting merged together makes for inefficient drawing (From: Ben Haller <email@hidden>)

  • Prev by Date: Re: how to make cocoa application run as a command line tool?
  • Next by Date: Re: Dirty rects getting merged together makes for inefficient drawing
  • Previous by thread: Re: Dirty rects getting merged together makes for inefficient drawing
  • Next by thread: Re: Dirty rects getting merged together makes for inefficient drawing
  • Index(es):
    • Date
    • Thread