• 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: Window backing store types
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Window backing store types


  • Subject: Re: Window backing store types
  • From: Mike Paquette <email@hidden>
  • Date: Thu, 27 Jan 2005 11:43:45 -0800

On Jan 27, 2005, at 11:25 AM, Mike Vannorsdel wrote:

Do the retained and non-retained backing store types work? When I try and use a retained backing store, I just get a white window. When using a non-retained backing store, the window contents act as if buffered while the title bar behaves oddly. Quartz debug reports my non-retained windows as being retained.

As a side, why don't NSCachedImageReps use retained BS windows? It seems like a waste to use double buffered windows for image caches (windows which won't be displayed).

There may be some misunderstanding as to what these window types do.

In general, you should stick with buffered windows.

Nonretained windows exist only in the framebuffer. A nonretained window cannot have alpha, or transparency, as there's just no alpha storage in the destination framebuffer. Writes to nonretained windows are very slow compared to other window types, as the application code finds itself doing programmed I/O to a PCI card. Quartz, the drawing engine under Cocoa and the Appearance Manager that draws the title bar, cannot draw directly to nonretained windows for a variety of technical reasons, and when aimed at a nonretained window will promote that window to a retained window.

A retained window is an odd beast. When completely unobscured, a retained window draws directly to framebuffer memory, with all the drawbacks that result. If obscured in any way, a buffer is created, and all drawing is redirected to that buffer, which is then automatically flushed. Because retained windows may be directly drawn to the framebuffer, again alpha channel data is not supported.

NSCachedImageReps, if set to use retained windows, would still require a buffer, as the window is off-screen, but would lose support for alpha channel data and cached data in formats other than the display format.

The use of window types other than buffered windows is strongly discouraged. These window typed exist primarily to support backward compatibility with very old code, or specialty environments such as Classic. Their use may result in marked performance degradation. Buffered windows are designed to work well with Quartz, and the Quartz Extreme acceleration path.

_______________________________________________
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


References: 
 >Window backing store types (From: Mike Vannorsdel <email@hidden>)

  • Prev by Date: Re: Problems with custom NSView subclass, IBPalette, and bindings support
  • Next by Date: A Question about cocoa-text.
  • Previous by thread: Window backing store types
  • Next by thread: A Question about cocoa-text.
  • Index(es):
    • Date
    • Thread