mirror of
https://github.com/brl/mutter.git
synced 2025-07-06 02:49:52 +00:00
Add cogl_get_clock_time()
Add an API to get the current time in the time system that Cogl is reporting timestamps. This is to be used to convert timestamps into a different time system. Reviewed-by: Robert Bragg <robert@linux.intel.com> (cherry picked from commit 9f3735a0c37adcfcffa485f81699b53a4cc0caf8)
This commit is contained in:

committed by
Robert Bragg

parent
d12f39d0e6
commit
98e3b57d0d
@ -756,4 +756,16 @@ _cogl_context_get_gl_version (CoglContext *context)
|
||||
return _cogl_config_override_gl_version;
|
||||
else
|
||||
return (const char *) context->glGetString (GL_VERSION);
|
||||
|
||||
}
|
||||
|
||||
int64_t
|
||||
cogl_get_clock_time (CoglContext *context)
|
||||
{
|
||||
const CoglWinsysVtable *winsys = _cogl_context_get_winsys (context);
|
||||
|
||||
if (winsys->context_get_clock_time)
|
||||
return winsys->context_get_clock_time (context);
|
||||
else
|
||||
return 0;
|
||||
}
|
||||
|
Reference in New Issue
Block a user