diff --git a/clutter/cogl/clutter-backend-cogl.h b/clutter/cogl/clutter-backend-cogl.h index 2467d9d9e..483b6cec9 100644 --- a/clutter/cogl/clutter-backend-cogl.h +++ b/clutter/cogl/clutter-backend-cogl.h @@ -63,8 +63,6 @@ struct _ClutterBackendCoglClass GType _clutter_backend_cogl_get_type (void) G_GNUC_CONST; -const gchar *_clutter_backend_cogl_get_vblank (void); - G_END_DECLS #endif /* __CLUTTER_BACKEND_COGL_H__ */ diff --git a/clutter/cogl/clutter-stage-cogl.c b/clutter/cogl/clutter-stage-cogl.c index 84b2022b5..fe600c056 100644 --- a/clutter/cogl/clutter-stage-cogl.c +++ b/clutter/cogl/clutter-stage-cogl.c @@ -102,7 +102,6 @@ clutter_stage_cogl_realize (ClutterStageWindow *stage_window) GError *error = NULL; gfloat width = 800; gfloat height = 600; - const char *clutter_vblank; CLUTTER_NOTE (BACKEND, "Realizing stage '%s' [%p]", G_OBJECT_TYPE_NAME (stage_cogl), @@ -116,9 +115,8 @@ clutter_stage_cogl_realize (ClutterStageWindow *stage_window) width, height); } - clutter_vblank = _clutter_backend_cogl_get_vblank (); - if (clutter_vblank && strcmp (clutter_vblank, "none") == 0) - cogl_onscreen_set_swap_throttled (stage_cogl->onscreen, FALSE); + cogl_onscreen_set_swap_throttled (stage_cogl->onscreen, + _clutter_get_sync_to_vblank ()); framebuffer = COGL_FRAMEBUFFER (stage_cogl->onscreen); if (!cogl_framebuffer_allocate (framebuffer, &error)) diff --git a/clutter/win32/clutter-backend-win32.c b/clutter/win32/clutter-backend-win32.c index 3d9a2d2db..4d5165a13 100644 --- a/clutter/win32/clutter-backend-win32.c +++ b/clutter/win32/clutter-backend-win32.c @@ -47,34 +47,11 @@ typedef int (WINAPI * SwapIntervalProc) (int interval); /* singleton object */ static ClutterBackendWin32 *backend_singleton = NULL; -static gchar *clutter_vblank_name = NULL; - static HINSTANCE clutter_hinst = NULL; /* various flags corresponding to pre init setup calls */ static gboolean _no_event_retrieval = FALSE; -const gchar * -_clutter_backend_win32_get_vblank (void) -{ - if (clutter_vblank_name && strcmp (clutter_vblank_name, "0") == 0) - return "none"; - else - return clutter_vblank_name; -} - -gboolean -clutter_backend_win32_pre_parse (ClutterBackend *backend, - GError **error) -{ - const gchar *env_string; - - if ((env_string = g_getenv ("CLUTTER_VBLANK"))) - clutter_vblank_name = g_strdup (env_string); - - return TRUE; -} - static void clutter_backend_win32_init_events (ClutterBackend *backend) { @@ -259,7 +236,6 @@ clutter_backend_win32_class_init (ClutterBackendWin32Class *klass) gobject_class->dispose = clutter_backend_win32_dispose; gobject_class->finalize = clutter_backend_win32_finalize; - backend_class->pre_parse = clutter_backend_win32_pre_parse; backend_class->init_events = clutter_backend_win32_init_events; backend_class->create_stage = clutter_backend_win32_create_stage; backend_class->add_options = clutter_backend_win32_add_options; diff --git a/clutter/win32/clutter-backend-win32.h b/clutter/win32/clutter-backend-win32.h index 2bd365b74..da5ac9c17 100644 --- a/clutter/win32/clutter-backend-win32.h +++ b/clutter/win32/clutter-backend-win32.h @@ -72,8 +72,6 @@ clutter_backend_win32_get_features (ClutterBackend *backend); HCURSOR _clutter_backend_win32_get_invisible_cursor (ClutterBackend *backend); -const gchar *_clutter_backend_win32_get_vblank (void); - G_END_DECLS #endif /* __CLUTTER_BACKEND_WIN32_H__ */ diff --git a/clutter/win32/clutter-stage-win32.c b/clutter/win32/clutter-stage-win32.c index d2b2cb55a..f57f73be6 100644 --- a/clutter/win32/clutter-stage-win32.c +++ b/clutter/win32/clutter-stage-win32.c @@ -398,7 +398,6 @@ clutter_stage_win32_realize (ClutterStageWindow *stage_window) gfloat width; gfloat height; GError *error = NULL; - const char *clutter_vblank; CLUTTER_NOTE (MISC, "Realizing main stage"); @@ -470,9 +469,8 @@ clutter_stage_win32_realize (ClutterStageWindow *stage_window) cogl_win32_onscreen_set_foreign_window (stage_win32->onscreen, stage_win32->hwnd); - clutter_vblank = _clutter_backend_win32_get_vblank (); - if (clutter_vblank && strcmp (clutter_vblank, "none") == 0) - cogl_onscreen_set_swap_throttled (stage_win32->onscreen, FALSE); + cogl_onscreen_set_swap_throttled (stage_win32->onscreen, + _clutter_get_sync_to_vblank ()); framebuffer = COGL_FRAMEBUFFER (stage_win32->onscreen); if (!cogl_framebuffer_allocate (framebuffer, &error)) diff --git a/clutter/x11/clutter-backend-x11.c b/clutter/x11/clutter-backend-x11.c index 753eb0ccc..8b5a519a7 100644 --- a/clutter/x11/clutter-backend-x11.c +++ b/clutter/x11/clutter-backend-x11.c @@ -331,8 +331,7 @@ _clutter_backend_x11_pre_parse (ClutterBackend *backend, env_string = NULL; } - return CLUTTER_BACKEND_CLASS (clutter_backend_x11_parent_class)->pre_parse (backend, - error); + return TRUE; } gboolean @@ -451,8 +450,7 @@ _clutter_backend_x11_post_parse (ClutterBackend *backend, (unsigned int) backend_x11->xwin_root, clutter_backend_get_resolution (backend)); - return CLUTTER_BACKEND_CLASS (clutter_backend_x11_parent_class)->post_parse (backend, - error); + return TRUE; } void