summaryrefslogtreecommitdiff
path: root/tests/animated-resizing.c
diff options
context:
space:
mode:
authorOwen W. Taylor <otaylor@fishsoup.net>2013-02-12 15:47:38 -0500
committerOwen W. Taylor <otaylor@fishsoup.net>2013-02-14 17:19:52 -0500
commit515e5f74aadcef7d1d55f593fa16d9e3c1f3fb4b (patch)
treefd67c7de661cc0d910216dd06fe8ccbc76ea7165 /tests/animated-resizing.c
parent5f2d1654a5085fb64af96310e297db4a7c4a39c2 (diff)
downloadgtk+-515e5f74aadcef7d1d55f593fa16d9e3c1f3fb4b.tar.gz
Merge GdkFrameHistory into GdkFrameClock
Now that GdkFrameClock is a class, not interface, there's no real advantage to splitting the frame history into an aggregate object, so directly merge it into GdkFrameClock.
Diffstat (limited to 'tests/animated-resizing.c')
-rw-r--r--tests/animated-resizing.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/tests/animated-resizing.c b/tests/animated-resizing.c
index 9aaa3662cf..96aa32ae14 100644
--- a/tests/animated-resizing.c
+++ b/tests/animated-resizing.c
@@ -148,7 +148,7 @@ print_variable (const char *description,
}
static void
-handle_frame_stats (GdkFrameHistory *frame_history)
+handle_frame_stats (GdkFrameClock *frame_clock)
{
static int num_stats = 0;
static double last_print_time = 0;
@@ -192,11 +192,11 @@ handle_frame_stats (GdkFrameHistory *frame_history)
frames_since_last_print++;
for (frame_counter = last_handled_frame;
- frame_counter < gdk_frame_history_get_frame_counter (frame_history);
+ frame_counter < gdk_frame_clock_get_frame_counter (frame_clock);
frame_counter++)
{
- GdkFrameTimings *timings = gdk_frame_history_get_timings (frame_history, frame_counter);
- GdkFrameTimings *previous_timings = gdk_frame_history_get_timings (frame_history, frame_counter - 1);
+ GdkFrameTimings *timings = gdk_frame_clock_get_timings (frame_clock, frame_counter);
+ GdkFrameTimings *previous_timings = gdk_frame_clock_get_timings (frame_clock, frame_counter - 1);
if (!timings || gdk_frame_timings_get_complete (timings))
last_handled_frame = frame_counter;
@@ -220,10 +220,7 @@ on_frame (double progress)
int jitter;
if (frame_clock)
- {
- GdkFrameHistory *history = gdk_frame_clock_get_history (frame_clock);
- handle_frame_stats (history);
- }
+ handle_frame_stats (clock);
angle = 2 * M_PI * progress;
jitter = WINDOW_SIZE_JITTER * sin(angle);