summaryrefslogtreecommitdiff
path: root/cogl/cogl-types.h
diff options
context:
space:
mode:
authorOwen W. Taylor <otaylor@fishsoup.net>2012-11-12 11:58:10 -0500
committerRobert Bragg <robert@linux.intel.com>2013-01-30 20:09:49 +0000
commit24733abf68ba326e415c6a17c0c1e59c3d303003 (patch)
tree5bd72440a72560dafaf764fc15c98018c3eea2a1 /cogl/cogl-types.h
parent5ce058c0e5cdbccdbfc4bff5b41023951ba549ab (diff)
downloadcogl-24733abf68ba326e415c6a17c0c1e59c3d303003.tar.gz
onscreen: Add CoglFrameInfo and _add_frame_callback() api
Add a CoglFrameInfo object that tracks timing information for frames that are drawn. We track a frame counter and frame timing information for each CoglOnscreen. Internally a CoglFrameInfo is automatically created for each frame, delimited by cogl_onscreen_swap_buffers() or cogl_onscreen_swap_region() calls. CoglFrameInfos are delivered to applications via frame event callbacks that can be registered with a new cogl_onscreen_add_frame_callback() api. Two initial event types (dispatched on all platforms) have been defined; a _SYNC event used for throttling the frame rate of applications and a _COMPLETE event used so signify the end of a frame. Note: This new _add_frame_callback() api makes the cogl_onscreen_add_swap_complete_callback() api redundant and so it should be considered deprecated. Since the _add_swap_complete_callback() api is still experimental api, we will be looking to quickly migrate users to the new api so we can remove the old api. Reviewed-by: Robert Bragg <robert@linux.intel.com> (cherry picked from commit 700401667db2522045e4623d78797b17f9184501)
Diffstat (limited to 'cogl/cogl-types.h')
-rw-r--r--cogl/cogl-types.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/cogl/cogl-types.h b/cogl/cogl-types.h
index f1f281da..227b7ec8 100644
--- a/cogl/cogl-types.h
+++ b/cogl/cogl-types.h
@@ -832,6 +832,9 @@ typedef enum _CoglWinsysFeature
/* Avaiable if the age of the back buffer can be queried */
COGL_WINSYS_FEATURE_BUFFER_AGE,
+ /* Avaiable if the winsys directly handles _SYNC and _COMPLETE events */
+ COGL_WINSYS_FEATURE_SYNC_AND_COMPLETE_EVENT,
+
COGL_WINSYS_FEATURE_N_FEATURES
} CoglWinsysFeature;