screen_flush_blits()

Flush all the blits issued

Synopsis:

#include <screen/screen.h>
int screen_flush_blits(screen_context_t ctx,
                       int flags)

Arguments:

ctx
A connection to Screen
flags
The indication of how you want this function to behave. Valid values for this parameter are:
  • SCREEN_WAIT_IDLE: When you use SCREEN_WAIT_IDLE, this function blocks, and returns only after Screen has completed all blits.
  • 0: When you use 0, this function returns immediately; blits may not be completed.

Library:

libscreen

Description:

Function Type: Flushing Execution

This function flushes all delayed blits and fills made since the last call to either this function, screen_post_window() or screen_post_stream(). Note that this is a flush of delayed blits and does not imply a flush of the command buffer. The blits will start executing shortly after you call the function. The blits may not be complete when the function returns, unless the SCREEN_WAIT_IDLE flag is set. This function has no effect on other non-blit delayed calls. The screen_post_window() and screen_post_stream() functions perform an implicit flush of any pending blits. The content that is to be presented via the call to screen_post_window() or screen_post_stream() is most likely the result of any pending blit operations completing.

The connection to Screen must have been acquired with the function screen_create_context().

Returns:

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