framebuffer: Adds experimental _finish() API

This adds a new experimental function, cogl_framebuffer_finish(), which
can be used to explicitly synchronize the CPU with the GPU. It's rare
that this level of explicit synchronization is desirable but for example
it can be useful during performance analysys to make sure measurements
reflect the working time of the GPU not just the time to queue commands.

Reviewed-by: Neil Roberts <neil@linux.intel.com>
This commit is contained in:
Robert Bragg
2011-09-28 15:19:38 +01:00
parent 405cacabe2
commit a8efe6af06
3 changed files with 27 additions and 0 deletions

View File

@ -2018,6 +2018,13 @@ cogl_framebuffer_remove_swap_buffers_callback (CoglFramebuffer *framebuffer,
winsys->onscreen_remove_swap_buffers_callback (onscreen, id);
}
void
cogl_framebuffer_finish (CoglFramebuffer *framebuffer)
{
_cogl_framebuffer_flush_journal (framebuffer);
GE (framebuffer->context, glFinish ());
}
void
cogl_onscreen_set_swap_throttled (CoglOnscreen *onscreen,
gboolean throttled)