 |
 |
Buffered vs. Unbuffered windows
|
 |
|
 |
|
Mac Enthusiast
Join Date: Feb 2000
Location: Storrs,Connecticut, USA
Status:
Offline
|
|
I was wondering if someone could explain to me exactly what the difference between NSBackingStoreBuffered, NSBackingStoreRetained and NSBackingStoreNonretained windows are. I have an idea but I am not completely sure if it is correct since Apple's description is "forthcoming".
|
|
|
| |
|
|
|
 |
|
 |
|
Admin Emeritus 
Join Date: Oct 2000
Location: Boston, MA
Status:
Offline
|
|
From NSWindow documentation:
A window device's backing store type is set when the NSWindow is initialized and can be one of three types. A buffered window device renders all drawing into a display buffer and then flushes it to the screen. Always drawing to the buffer produces very smooth display, but can require significant amounts of memory. Buffered windows are best for displaying material that must be redrawn often, such as text. A retained window device also uses a buffer, but draws directly to the screen where possible and to the buffer for any portions that are obscured. A nonretained window device has no buffer at all, and must redraw portions as they're exposed. Further, this redrawing is suspended when the NSWindow's display mechanism is preempted. For example, if the user drags a window across a nonretained window, the nonretained window is "erased" and isn't redrawn until the user releases the mouse. Both retained and nonretained windows are also subject to a flashing effect as individual drawing operations are performed, but their results do get to the screen more quickly than those of buffered windows. You can change the backing store type between buffered and retained after initialization using the setBackingType method.
|
|
"Against stupidity, the gods themselves contend in vain" (Schiller)
|
| |
|
|
|
 |
|
 |
|
Mac Enthusiast
Join Date: Feb 2000
Location: Storrs,Connecticut, USA
Status:
Offline
|
|
Thanks. I guess that I just never noticed that part of the documentation.
|
|
|
| |
|
|
|
 |
|
 |
|
Dedicated MacNNer
Join Date: Jun 2000
Location: Dundas, Ontario, Canada
Status:
Offline
|
|
This is also helpful if you tend to over-drive some of your applications to the point where they crash more often than you would like them too <grin>. For example, if OmniWeb crashes on me, I go into the application and select any visible windows to copy down their URL or some other information that I might need and not easily recreate if I re-launch it. Since the window server is a separate process from the app itself, buffered windows will work (as in moving where you want them to and displaying data). This can be a really sweet feature with some newer, unstable, applications. If the contents of said window could only be selectable (I don't expect to see this happen because there could be events tied to interface elements that would lock the window server waiting for response) we would be really set.
Just something I noticed,
Jeff.
|
|
|
| |
|
|
|
 |
 |
|
 |
|
|
|
|
|

|
|
 |
Forum Rules
|
 |
 |
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
|
HTML code is Off
|
|
|
|
|
|
 |
 |
 |
 |
|
 |
|