main: Deprecate clutter_set_default_frame_rate()

Setting the default frame rate does not do anything even remotely
useful, unless synchronization to the vertical refresh rate is also
disabled - which can only be done through environment variable or
through configuration file. Having a programmatic way to change the
default frame rate is, thus, completely pointless.

Changing the default frame rate through environment variable and
configuration file is still allowed.
This commit is contained in:
Emmanuele Bassi 2011-11-07 20:24:13 +00:00
parent e0bfdbfeba
commit 67d5a4993c
3 changed files with 9 additions and 12 deletions

View File

@ -2701,19 +2701,14 @@ clutter_get_default_frame_rate (void)
* is possible, this value is ignored. * is possible, this value is ignored.
* *
* Since: 0.6 * Since: 0.6
*
* Deprecated: 1.10: This function does not do anything any more.
*/ */
void void
clutter_set_default_frame_rate (guint frames_per_sec) clutter_set_default_frame_rate (guint frames_per_sec)
{ {
ClutterMainContext *context;
context = _clutter_context_get_default ();
if (context->frame_rate != frames_per_sec)
context->frame_rate = frames_per_sec;
} }
static void static void
on_grab_actor_destroy (ClutterActor *actor, on_grab_actor_destroy (ClutterActor *actor,
ClutterInputDevice *device) ClutterInputDevice *device)

View File

@ -127,9 +127,6 @@ guint clutter_threads_add_repaint_func (GSourceFunc
GDestroyNotify notify); GDestroyNotify notify);
void clutter_threads_remove_repaint_func (guint handle_id); void clutter_threads_remove_repaint_func (guint handle_id);
void clutter_set_default_frame_rate (guint frames_per_sec);
guint clutter_get_default_frame_rate (void);
void clutter_grab_pointer (ClutterActor *actor); void clutter_grab_pointer (ClutterActor *actor);
void clutter_ungrab_pointer (void); void clutter_ungrab_pointer (void);
ClutterActor * clutter_get_pointer_grab (void); ClutterActor * clutter_get_pointer_grab (void);
@ -141,6 +138,8 @@ PangoFontMap * clutter_get_font_map (void);
ClutterTextDirection clutter_get_default_text_direction (void); ClutterTextDirection clutter_get_default_text_direction (void);
guint clutter_get_default_frame_rate (void);
G_END_DECLS G_END_DECLS
#endif /* _CLUTTER_MAIN_H__ */ #endif /* _CLUTTER_MAIN_H__ */

View File

@ -48,6 +48,9 @@ void clutter_grab_pointer_for_device (ClutterActor
CLUTTER_DEPRECATED_FOR(clutter_input_device_ungrab) CLUTTER_DEPRECATED_FOR(clutter_input_device_ungrab)
void clutter_ungrab_pointer_for_device (gint id_); void clutter_ungrab_pointer_for_device (gint id_);
CLUTTER_DEPRECATED
void clutter_set_default_frame_rate (guint frames_per_sec);
G_END_DECLS G_END_DECLS
#endif /* __CLUTTER_MAIN_DEPRECATED_H__ */ #endif /* __CLUTTER_MAIN_DEPRECATED_H__ */