Flush all the blits issued
#include <screen/screen.h>
int screen_flush_blits(screen_context_t ctx, int flags)
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().
0 if successful, or -1 if an error occurred (errno is set; refer to errno.h for more details).