mirror of
https://github.com/brl/mutter.git
synced 2024-11-25 01:20:42 -05:00
clutter: Add vblank duration to ClutterStageView
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1762>
This commit is contained in:
parent
2d939754b1
commit
d10567ea3e
@ -43,6 +43,7 @@ enum
|
||||
PROP_USE_SHADOWFB,
|
||||
PROP_SCALE,
|
||||
PROP_REFRESH_RATE,
|
||||
PROP_VBLANK_DURATION_US,
|
||||
|
||||
PROP_LAST
|
||||
};
|
||||
@ -79,6 +80,7 @@ typedef struct _ClutterStageViewPrivate
|
||||
cairo_region_t *redraw_clip;
|
||||
|
||||
float refresh_rate;
|
||||
int64_t vblank_duration_us;
|
||||
ClutterFrameClock *frame_clock;
|
||||
|
||||
struct {
|
||||
@ -1298,6 +1300,9 @@ clutter_stage_view_get_property (GObject *object,
|
||||
case PROP_REFRESH_RATE:
|
||||
g_value_set_float (value, priv->refresh_rate);
|
||||
break;
|
||||
case PROP_VBLANK_DURATION_US:
|
||||
g_value_set_int64 (value, priv->vblank_duration_us);
|
||||
break;
|
||||
default:
|
||||
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
|
||||
}
|
||||
@ -1341,6 +1346,9 @@ clutter_stage_view_set_property (GObject *object,
|
||||
case PROP_REFRESH_RATE:
|
||||
priv->refresh_rate = g_value_get_float (value);
|
||||
break;
|
||||
case PROP_VBLANK_DURATION_US:
|
||||
priv->vblank_duration_us = g_value_get_int64 (value);
|
||||
break;
|
||||
default:
|
||||
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
|
||||
}
|
||||
@ -1500,5 +1508,14 @@ clutter_stage_view_class_init (ClutterStageViewClass *klass)
|
||||
G_PARAM_CONSTRUCT |
|
||||
G_PARAM_STATIC_STRINGS);
|
||||
|
||||
obj_props[PROP_VBLANK_DURATION_US] =
|
||||
g_param_spec_int64 ("vblank-duration-us",
|
||||
"Vblank duration (µs)",
|
||||
"The vblank duration",
|
||||
0, G_MAXINT64, 0,
|
||||
G_PARAM_READWRITE |
|
||||
G_PARAM_CONSTRUCT_ONLY |
|
||||
G_PARAM_STATIC_STRINGS);
|
||||
|
||||
g_object_class_install_properties (object_class, PROP_LAST, obj_props);
|
||||
}
|
||||
|
@ -1217,6 +1217,7 @@ meta_renderer_native_create_view (MetaRenderer *renderer,
|
||||
"use-shadowfb", use_shadowfb,
|
||||
"transform", view_transform,
|
||||
"refresh-rate", crtc_mode_info->refresh_rate,
|
||||
"vblank-duration-us", crtc_mode_info->vblank_duration_us,
|
||||
NULL);
|
||||
|
||||
if (META_IS_ONSCREEN_NATIVE (framebuffer))
|
||||
|
Loading…
Reference in New Issue
Block a user