• 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: Denis Bohm <email@hidden>
  • Date: Wed, 7 May 2008 19:27:36 -0700

Thanks for the CGWaitForScreen tip. I hadn't seen those and will take a look.

Overriding drawRect on a top level view sounds promising also.

I had thought about overriding setNeedsDisplay on a top level view in the window, but it wasn't clear that would catch calls to child views.

On May 7, 2008, at 6:18 PM, Graham Cox wrote:

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


References: 
 >find repaint areas? (From: Denis Bohm <email@hidden>)
 >Re: find repaint areas? (From: Graham Cox <email@hidden>)

  • Prev by Date: Re: Saving only required files in a file wrapper?
  • Next by Date: Re: Saving only required files in a file wrapper?
  • Previous by thread: Re: find repaint areas?
  • Next by thread: Any way to filter an NSTreeController?
  • Index(es):
    • Date
    • Thread