Send a request to Screen to destroy the buffer of the specified pixmap


#include <screen/screen.h>
int screen_destroy_pixmap_buffer(screen_pixmap_t pix)


The handle of the pixmap whose buffer is to be destroyed.




Function Type: Flushing Execution

This function releases the buffer that was allocated for a pixmap, without destroying the pixmap. If the buffer was created with screen_create_pixmap_buffer(), the memory is released and can be used for other window or pixmap buffers. If the buffer was attached using screen_attach_pixmap_buffer(), the buffer is destroyed but no memory is actually released. In this case the application is responsible for freeing the memory after calling screen_destroy_pixmap_buffer(). Once a pixmap buffer has been destroyed, you can change the format, usage and buffer size before creating a new buffer again. The memory that's released by this call is not reserved and can be used for any subsequent buffer allocation by Screen.


0 if successful, or -1 if an error occurred (errno is set; refer to errno.h for more details).