mirror of
https://github.com/brl/mutter.git
synced 2024-11-22 08:00:42 -05:00
cogl/onscreen/egl: Record CPU time only when GPU time can be queried
These are only useful together at the moment. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3080>
This commit is contained in:
parent
e7a210d963
commit
b43fb9fd98
@ -313,13 +313,9 @@ cogl_onscreen_egl_swap_buffers_with_damage (CoglOnscreen *onscreen,
|
||||
{
|
||||
info->gpu_time_before_buffer_swap_ns =
|
||||
cogl_context_get_gpu_time_ns (context);
|
||||
}
|
||||
|
||||
info->cpu_time_before_buffer_swap_us = g_get_monotonic_time ();
|
||||
|
||||
/* Set up a timestamp query for when all rendering will be finished. */
|
||||
if (cogl_has_feature (context, COGL_FEATURE_ID_TIMESTAMP_QUERY))
|
||||
{
|
||||
info->timestamp_query =
|
||||
cogl_framebuffer_create_timestamp_query (COGL_FRAMEBUFFER (onscreen));
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user