• 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: Preventing flicker on moving NSView to a different superview
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Preventing flicker on moving NSView to a different superview


  • Subject: Re: Preventing flicker on moving NSView to a different superview
  • From: Troy Stephens <email@hidden>
  • Date: Fri, 15 Jul 2005 13:23:53 -0700

On Jul 15, 2005, at 11:49 AM, Jonathan del Strother wrote:
I've got a normal Cocoa window containing a large OpenGL-based NSView. I'm creating a new, borderless window on top of the original window, and moving the NSView from the old one to the new one. (The intention here is to expand the new window to give a zoom effect on entering fullscreen, like Quicktime Pro does)

Here's the code that my NSView uses :

fsWindow = [[NSWindow alloc] initWithContentRect:screenViewFrame
styleMask:NSBorderlessWindowMask
backing:NSBackingStoreBuffered
defer:NO];


    [fsWindow setContentView:self];
    [fsWindow setHasShadow: NO];
    [fsWindow makeKeyAndOrderFront:fsWindow];


However, there's an annoying flicker that appears, as if it's displaying a flash of the blank fsWindow before it gets filled in with the NSView. Any ideas on removing this?

The flash you're seeing is either uninitialized window backing store or uninitialized OpenGL framebuffer contents.


On Tiger, try adding the following before you order the window forward:

    [fsWindow disableScreenUpdatesUntilFlush];

This helps synchronize compositing of the hardware surface with the rest of the window content.

If app needs to run on pre-Tiger systems as well, you can make the above conditional on an [fsWindow respondsToSelector:...] check. Then the problem won't appear on Tiger at least.

--
Troy Stephens
Cocoa Frameworks
Apple Computer, Inc.


_______________________________________________ Do not post admin requests to the list. They will be ignored. Cocoa-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
  • Follow-Ups:
    • Re: Preventing flicker on moving NSView to a different superview
      • From: Jonathan del Strother <email@hidden>
References: 
 >Preventing flicker on moving NSView to a different superview (From: Jonathan del Strother <email@hidden>)

  • Prev by Date: How to get NSScriptObjectSpecifier from NSAppleEventDescriptor?
  • Next by Date: Re: Seeking advice: which "Design Patterns" book is best
  • Previous by thread: Preventing flicker on moving NSView to a different superview
  • Next by thread: Re: Preventing flicker on moving NSView to a different superview
  • Index(es):
    • Date
    • Thread