tests/clutter/timeline-interpolate: Assorted style cleanups
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1751>
This commit is contained in:
parent
b155063227
commit
0d3840b056
@ -25,23 +25,23 @@ typedef struct _TestState
|
|||||||
{
|
{
|
||||||
ClutterTimeline *timeline;
|
ClutterTimeline *timeline;
|
||||||
int64_t start_time;
|
int64_t start_time;
|
||||||
guint new_frame_counter;
|
int new_frame_counter;
|
||||||
gint expected_frame;
|
int expected_frame;
|
||||||
gint completion_count;
|
int completion_count;
|
||||||
gboolean passed;
|
gboolean passed;
|
||||||
} TestState;
|
} TestState;
|
||||||
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
new_frame_cb (ClutterTimeline *timeline,
|
new_frame_cb (ClutterTimeline *timeline,
|
||||||
gint frame_num,
|
int frame_num,
|
||||||
TestState *state)
|
TestState *state)
|
||||||
{
|
{
|
||||||
int64_t current_time;
|
int64_t current_time;
|
||||||
gint current_frame;
|
int current_frame;
|
||||||
glong msec_diff;
|
long msec_diff;
|
||||||
gint loop_overflow = 0;
|
int loop_overflow = 0;
|
||||||
static gint step = 1;
|
static int step = 1;
|
||||||
|
|
||||||
current_time = g_get_real_time ();
|
current_time = g_get_real_time ();
|
||||||
|
|
||||||
@ -114,7 +114,6 @@ new_frame_cb (ClutterTimeline *timeline,
|
|||||||
step = -step;
|
step = -step;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
completed_cb (ClutterTimeline *timeline,
|
completed_cb (ClutterTimeline *timeline,
|
||||||
TestState *state)
|
TestState *state)
|
||||||
@ -141,11 +140,11 @@ timeline_interpolation (void)
|
|||||||
state.timeline =
|
state.timeline =
|
||||||
clutter_timeline_new_for_actor (stage, TEST_TIMELINE_DURATION);
|
clutter_timeline_new_for_actor (stage, TEST_TIMELINE_DURATION);
|
||||||
clutter_timeline_set_repeat_count (state.timeline, -1);
|
clutter_timeline_set_repeat_count (state.timeline, -1);
|
||||||
g_signal_connect (G_OBJECT(state.timeline),
|
g_signal_connect (state.timeline,
|
||||||
"new-frame",
|
"new-frame",
|
||||||
G_CALLBACK (new_frame_cb),
|
G_CALLBACK (new_frame_cb),
|
||||||
&state);
|
&state);
|
||||||
g_signal_connect (G_OBJECT(state.timeline),
|
g_signal_connect (state.timeline,
|
||||||
"completed",
|
"completed",
|
||||||
G_CALLBACK (completed_cb),
|
G_CALLBACK (completed_cb),
|
||||||
&state);
|
&state);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user