Commit e8c27603 authored by Daniel van Vugt's avatar Daniel van Vugt Committed by Jonas Ådahl
Browse files

renderer-native: Advertise _FEATURE_SWAP_THROTTLE

Because it is implemented and always on. By advertising this fact
the master clock is able to sync to the native refresh rate instead
of always using the fallback of 60.00Hz.
parent e9e4b2b7
Pipeline #42262 passed with stages
in 3 minutes and 48 seconds
......@@ -2082,6 +2082,13 @@ meta_renderer_native_init_egl_context (CoglContext *cogl_context,
/* COGL_WINSYS_FEATURE_SWAP_THROTTLE is always true for this renderer
* because we have the call to wait_for_pending_flips on every frame.
COGL_FLAGS_SET (cogl_context->winsys_features,
if (renderer_gpu_data->mode == META_RENDERER_NATIVE_MODE_EGL_DEVICE)
COGL_FLAGS_SET (cogl_context->features,
......@@ -2717,8 +2724,12 @@ meta_renderer_native_create_onscreen (MetaRendererNative *renderer_native,
onscreen = cogl_onscreen_new (context, width, height);
cogl_onscreen_set_swap_throttled (onscreen,
_clutter_get_sync_to_vblank ());
/* We have wait_for_pending_flips hardcoded, so throttling always. */
cogl_onscreen_set_swap_throttled (onscreen, TRUE);
if (!_clutter_get_sync_to_vblank ())
g_warning ("Request to disable sync-to-vblank is being ignored. "
"MetaRendererNative does not support disabling it.");
if (!cogl_framebuffer_allocate (COGL_FRAMEBUFFER (onscreen), error))
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment