• 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: find repaint areas?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: find repaint areas?


  • Subject: Re: find repaint areas?
  • From: Graham Cox <email@hidden>
  • Date: Thu, 8 May 2008 11:18:36 +1000

I asked much the same question a few days ago, the answer would appear to be, you can't get those rects until drawRect: time. But couldn't you send your remote update then anyway? While that would effectively synchronise your remote screen update to the event cycle of the first machine, I don't see why that would be a problem.

If you can work at the global screen level rather than view level, there is also CGWaitForScreenUpdateRects and CGWaitForScreenRefreshRects which need to be used from a secondary thread - my guess is these exist to support remote display type applications.

Alternatively you could override setNeedsDisplay: and setNeedsDisplayInRect: and gather the rects yourself. You'd need to handle all your own coalescing and calculation of the minimum resulting set of rects though.



G.

On 8 May 2008, at 7:26 am, Denis Bohm wrote:

I am trying to create a buffered window and get notified whenever areas are repainted so that I can also send those areas over the network to a custom remote bitmap display. I don't want to copy the complete buffered image on each update as that would be much too slow.

NSView has getRectsBeingDrawn which seems close. What I really want is to hook into the code that is computing those rects. I assume this is done in NSWindow displayIfNeeded. But I don't see where the damage rects are stored.

Or maybe NSWindow flushWindowIfNeeded would work. But I don't see how to get the rects that need to be copied to the screen.

Any ideas on how this could be done?

Denis
_______________________________________________

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

_______________________________________________

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: find repaint areas?
      • From: Denis Bohm <email@hidden>
References: 
 >find repaint areas? (From: Denis Bohm <email@hidden>)

  • Prev by Date: Re: offtopic: cocoa iphone
  • Next by Date: Re: Group rotation
  • Previous by thread: find repaint areas?
  • Next by thread: Re: find repaint areas?
  • Index(es):
    • Date
    • Thread