Buffers (screen.h)

A buffer is memory where pixels can be drawn to or read from.

The information and state variables associated with each buffer is stored in memory allocated when the buffer is created with screen_create_buffer() Note that memory is allocated to store all information pertaining to the buffer, but not for the buffer itself. When buffers are created by the composited windowing system through calls to screen_create_window_buffers() and screen_create_pixmap_buffer(), it isn't necessary to create buffer objects with screen_create_buffer(). screen_create_buffer() is used to create buffers which must be attached to windows or pixmaps.

Usage flags are used when allocating buffers. Depending on the usage, different constraints such as width, height, stride granularity or special alignment must be observed. The usage is also valuable in determining the amount of caching that can be set on a particular buffer.

Depending on which function was called, the buffers can be queried using the SCREEN_PROPERTY_RENDER_BUFFERS property with either screen_get_window_property() or screen_get_pixmap_property() API functions.

Last modified: 2014-05-14



Got questions about leaving a comment? Get answers from our Disqus FAQ.

comments powered by Disqus