clutter: Remove ability to externally set sync-to-vblank

Externally setting the sync-to-vblank setting was a feature
added as a workaround to old Intel and ATI graphic cards, and
is not needed anymore. Furthermore, it doesn't make sense to
change it on a compositor whatsoever.

This commit removes all the ways to externally change this
setting, as well as the now unused API.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/191
This commit is contained in:
Georges Basile Stavracas Neto 2018-08-08 14:05:31 -03:00
parent fe0a394e69
commit ae4d3bc27d
4 changed files with 1 additions and 28 deletions

View File

@ -255,16 +255,6 @@ clutter_config_read_from_key_file (GKeyFile *keyfile)
else else
clutter_enable_accessibility = bool_value; clutter_enable_accessibility = bool_value;
bool_value =
g_key_file_get_boolean (keyfile, ENVIRONMENT_GROUP,
"SyncToVblank",
&key_error);
if (key_error != NULL)
g_clear_error (&key_error);
else
clutter_sync_to_vblank = bool_value;
int_value = int_value =
g_key_file_get_integer (keyfile, ENVIRONMENT_GROUP, g_key_file_get_integer (keyfile, ENVIRONMENT_GROUP,
"DefaultFps", "DefaultFps",
@ -1491,10 +1481,6 @@ pre_parse_hook (GOptionContext *context,
if (env_string) if (env_string)
clutter_use_fuzzy_picking = TRUE; clutter_use_fuzzy_picking = TRUE;
env_string = g_getenv ("CLUTTER_VBLANK");
if (g_strcmp0 (env_string, "none") == 0)
clutter_sync_to_vblank = FALSE;
return _clutter_backend_pre_parse (backend, error); return _clutter_backend_pre_parse (backend, error);
} }
@ -3635,12 +3621,6 @@ _clutter_set_sync_to_vblank (gboolean sync_to_vblank)
clutter_sync_to_vblank = !!sync_to_vblank; clutter_sync_to_vblank = !!sync_to_vblank;
} }
gboolean
_clutter_get_sync_to_vblank (void)
{
return clutter_sync_to_vblank;
}
void void
_clutter_debug_messagev (const char *format, _clutter_debug_messagev (const char *format,
va_list var_args) va_list var_args)

View File

@ -34,9 +34,6 @@
CLUTTER_EXPORT CLUTTER_EXPORT
void clutter_set_custom_backend_func (ClutterBackend *(* func) (void)); void clutter_set_custom_backend_func (ClutterBackend *(* func) (void));
CLUTTER_EXPORT
gboolean _clutter_get_sync_to_vblank (void);
CLUTTER_EXPORT CLUTTER_EXPORT
int64_t clutter_stage_get_frame_counter (ClutterStage *stage); int64_t clutter_stage_get_frame_counter (ClutterStage *stage);

View File

@ -631,8 +631,7 @@ clutter_stage_x11_realize (ClutterStageWindow *stage_window)
stage_x11->onscreen = cogl_onscreen_new (backend->cogl_context, width, height); stage_x11->onscreen = cogl_onscreen_new (backend->cogl_context, width, height);
cogl_onscreen_set_swap_throttled (stage_x11->onscreen, cogl_onscreen_set_swap_throttled (stage_x11->onscreen, TRUE);
_clutter_get_sync_to_vblank ());
stage_x11->frame_closure = stage_x11->frame_closure =
cogl_onscreen_add_frame_callback (stage_x11->onscreen, cogl_onscreen_add_frame_callback (stage_x11->onscreen,
frame_cb, frame_cb,

View File

@ -2729,9 +2729,6 @@ meta_renderer_native_create_onscreen (MetaRendererNative *renderer_native,
/* We have wait_for_pending_flips hardcoded, so throttling always. */ /* We have wait_for_pending_flips hardcoded, so throttling always. */
cogl_onscreen_set_swap_throttled (onscreen, TRUE); 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)) if (!cogl_framebuffer_allocate (COGL_FRAMEBUFFER (onscreen), error))
{ {