• 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: white screen windows at first
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: white screen windows at first


  • Subject: Re: white screen windows at first
  • From: vincent habchi <email@hidden>
  • Date: Thu, 29 Apr 2010 09:47:59 +0200

Le 28 avr. 2010 à 20:29, Bill Appleton a écrit :

> this appears to only work from inside the drawRect routine, if i get here from some other event it doesn't work
>
> so is it "legal" to draw on an NSWindow from some other event?
> if not, what the heck does QDEndCGContext do that makes it work?

If I remember correctly what David Duncan said here a while ago, graphics rendering in Core graphics, and maybe also in Cocoa, is heavily dependent on the Run loop. Normally, when you want to recache and redraw a layer, you set needsDisplay to YES (or just call - setNeedsDisplay: on a CALayer), and -drawRect or -drawInContext: gets called when the current event finishes and the Run loop regains control. I am not sure it is legal to draw outside this window. That's why if you want to redraw in background under the control of a "display" thread, that thread must set up a run loop of its own, or nothing gets drawn at all.

Vincent_______________________________________________

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: 
 >white screen windows at first (From: Bill Appleton <email@hidden>)
 >Re: white screen windows at first (From: "Paul Sanders" <email@hidden>)
 >Re: white screen windows at first (From: Bill Appleton <email@hidden>)
 >Re: white screen windows at first (From: Uli Kusterer <email@hidden>)
 >Re: white screen windows at first (From: Bill Appleton <email@hidden>)
 >Re: white screen windows at first (From: "Paul Sanders" <email@hidden>)
 >Re: white screen windows at first (From: vincent habchi <email@hidden>)
 >Re: white screen windows at first (From: Bill Appleton <email@hidden>)

  • Prev by Date: Re: Change management using CFRunLoopObserver
  • Next by Date: How to clone a CALayer?
  • Previous by thread: Re: white screen windows at first
  • Next by thread: Re: white screen windows at first
  • Index(es):
    • Date
    • Thread