[gtk+/wip/frame-synchronization: 853/857] GdkFrameTimings: strip down to a minimal public API
- From: Owen Taylor <otaylor src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/wip/frame-synchronization: 853/857] GdkFrameTimings: strip down to a minimal public API
- Date: Wed, 13 Feb 2013 06:15:14 +0000 (UTC)
commit 7f59f340035541525a58a14f6a462f9a4706822a
Author: Owen W. Taylor <otaylor fishsoup net>
Date: Tue Feb 12 16:14:24 2013 -0500
GdkFrameTimings: strip down to a minimal public API
Since we're not exporting the ability to create your own frame
clock for now, remove the setters for GdkFrameTimings fields.
Also remove all setters and getters for fields that are more
about implementation than about quantities that are meaningful
to the applcation and just access the fields directly within
GDK.
gdk/gdkframeclock.c | 51 +++++--------
gdk/gdkframeclockidle.c | 14 ++--
gdk/gdkframeclockprivate.h | 24 ++++++
gdk/gdkframetimings.c | 176 +-------------------------------------------
gdk/gdkframetimings.h | 25 ------
gdk/gdkinternals.h | 18 -----
gdk/x11/gdkdisplay-x11.c | 14 ++--
gdk/x11/gdkwindow-x11.c | 28 +++----
8 files changed, 70 insertions(+), 280 deletions(-)
---
diff --git a/gdk/gdkframeclock.c b/gdk/gdkframeclock.c
index c77127f..b8ab15c 100644
--- a/gdk/gdkframeclock.c
+++ b/gdk/gdkframeclock.c
@@ -420,7 +420,7 @@ _gdk_frame_clock_begin_frame (GdkFrameClock *clock)
gdk_frame_timings_unref(priv->timings[priv->current]);
}
- priv->timings[priv->current] = gdk_frame_timings_new (priv->frame_counter);
+ priv->timings[priv->current] = _gdk_frame_timings_new (priv->frame_counter);
}
GdkFrameTimings *
@@ -471,7 +471,7 @@ gdk_frame_clock_get_last_complete (GdkFrameClock *clock)
for (i = 0; i < priv->n_timings; i++)
{
gint pos = ((priv->current - i) + FRAME_HISTORY_MAX_LENGTH) % FRAME_HISTORY_MAX_LENGTH;
- if (gdk_frame_timings_get_complete (priv->timings[pos]))
+ if (priv->timings[pos]->complete)
return priv->timings[pos];
}
@@ -483,40 +483,31 @@ void
_gdk_frame_clock_debug_print_timings (GdkFrameClock *clock,
GdkFrameTimings *timings)
{
- gint64 frame_counter = gdk_frame_timings_get_frame_counter (timings);
- gint64 layout_start_time = _gdk_frame_timings_get_layout_start_time (timings);
- gint64 paint_start_time = _gdk_frame_timings_get_paint_start_time (timings);
- gint64 frame_end_time = _gdk_frame_timings_get_frame_end_time (timings);
- gint64 frame_time = gdk_frame_timings_get_frame_time (timings);
- gint64 presentation_time = gdk_frame_timings_get_presentation_time (timings);
- gint64 predicted_presentation_time = gdk_frame_timings_get_predicted_presentation_time (timings);
- gint64 refresh_interval = gdk_frame_timings_get_refresh_interval (timings);
gint64 previous_frame_time = 0;
- gboolean slept_before = gdk_frame_timings_get_slept_before (timings);
GdkFrameTimings *previous_timings = gdk_frame_clock_get_timings (clock,
- frame_counter - 1);
+ timings->frame_counter - 1);
if (previous_timings != NULL)
- previous_frame_time = gdk_frame_timings_get_frame_time (previous_timings);
+ previous_frame_time = previous_timings->frame_time;
- g_print ("%5" G_GINT64_FORMAT ":", frame_counter);
+ g_print ("%5" G_GINT64_FORMAT ":", timings->frame_counter);
if (previous_frame_time != 0)
{
- g_print (" interval=%-4.1f", (frame_time - previous_frame_time) / 1000.);
- g_print (slept_before ? " (sleep)" : " ");
+ g_print (" interval=%-4.1f", (timings->frame_time - previous_frame_time) / 1000.);
+ g_print (timings->slept_before ? " (sleep)" : " ");
}
- if (layout_start_time != 0)
- g_print (" layout_start=%-4.1f", (layout_start_time - frame_time) / 1000.);
- if (paint_start_time != 0)
- g_print (" paint_start=%-4.1f", (paint_start_time - frame_time) / 1000.);
- if (frame_end_time != 0)
- g_print (" frame_end=%-4.1f", (frame_end_time - frame_time) / 1000.);
- if (presentation_time != 0)
- g_print (" present=%-4.1f", (presentation_time - frame_time) / 1000.);
- if (predicted_presentation_time != 0)
- g_print (" predicted=%-4.1f", (predicted_presentation_time - frame_time) / 1000.);
- if (refresh_interval != 0)
- g_print (" refresh_interval=%-4.1f", refresh_interval / 1000.);
+ if (timings->layout_start_time != 0)
+ g_print (" layout_start=%-4.1f", (timings->layout_start_time - timings->frame_time) / 1000.);
+ if (timings->paint_start_time != 0)
+ g_print (" paint_start=%-4.1f", (timings->paint_start_time - timings->frame_time) / 1000.);
+ if (timings->frame_end_time != 0)
+ g_print (" frame_end=%-4.1f", (timings->frame_end_time - timings->frame_time) / 1000.);
+ if (timings->presentation_time != 0)
+ g_print (" present=%-4.1f", (timings->presentation_time - timings->frame_time) / 1000.);
+ if (timings->predicted_presentation_time != 0)
+ g_print (" predicted=%-4.1f", (timings->predicted_presentation_time - timings->frame_time) / 1000.);
+ if (timings->refresh_interval != 0)
+ g_print (" refresh_interval=%-4.1f", timings->refresh_interval / 1000.);
g_print ("\n");
}
#endif /* G_ENABLE_DEBUG */
@@ -550,8 +541,8 @@ gdk_frame_clock_get_refresh_info (GdkFrameClock *clock,
if (timings == NULL)
return;
- refresh_interval = gdk_frame_timings_get_refresh_interval (timings);
- presentation_time = gdk_frame_timings_get_presentation_time (timings);
+ refresh_interval = timings->refresh_interval;
+ presentation_time = timings->presentation_time;
if (presentation_time != 0)
{
diff --git a/gdk/gdkframeclockidle.c b/gdk/gdkframeclockidle.c
index da05a96..afb9430 100644
--- a/gdk/gdkframeclockidle.c
+++ b/gdk/gdkframeclockidle.c
@@ -304,10 +304,8 @@ gdk_frame_clock_paint_idle (void *data)
_gdk_frame_clock_begin_frame (clock);
timings = gdk_frame_clock_get_current_frame_timings (clock);
- gdk_frame_timings_set_frame_time (timings, priv->frame_time);
-
- gdk_frame_timings_set_slept_before (timings,
- priv->sleep_serial != get_sleep_serial ());
+ timings->frame_time = priv->frame_time;
+ timings->slept_before = priv->sleep_serial != get_sleep_serial ();
priv->phase = GDK_FRAME_CLOCK_PHASE_BEFORE_PAINT;
@@ -336,7 +334,7 @@ gdk_frame_clock_paint_idle (void *data)
{
if (priv->phase != GDK_FRAME_CLOCK_PHASE_LAYOUT &&
(priv->requested & GDK_FRAME_CLOCK_PHASE_LAYOUT))
- _gdk_frame_timings_set_layout_start_time (timings, g_get_monotonic_time ());
+ timings->layout_start_time = g_get_monotonic_time ();
}
#endif /* G_ENABLE_DEBUG */
@@ -355,7 +353,7 @@ gdk_frame_clock_paint_idle (void *data)
{
if (priv->phase != GDK_FRAME_CLOCK_PHASE_PAINT &&
(priv->requested & GDK_FRAME_CLOCK_PHASE_PAINT))
- _gdk_frame_timings_set_paint_start_time (timings, g_get_monotonic_time ());
+ timings->paint_start_time = g_get_monotonic_time ();
}
#endif /* G_ENABLE_DEBUG */
@@ -377,7 +375,7 @@ gdk_frame_clock_paint_idle (void *data)
#ifdef G_ENABLE_DEBUG
if ((_gdk_debug_flags & GDK_DEBUG_FRAMES) != 0)
- _gdk_frame_timings_set_frame_end_time (timings, g_get_monotonic_time ());
+ timings->frame_end_time = g_get_monotonic_time ();
#endif /* G_ENABLE_DEBUG */
}
case GDK_FRAME_CLOCK_PHASE_RESUME_EVENTS:
@@ -388,7 +386,7 @@ gdk_frame_clock_paint_idle (void *data)
#ifdef G_ENABLE_DEBUG
if ((_gdk_debug_flags & GDK_DEBUG_FRAMES) != 0)
{
- if (gdk_frame_timings_get_complete (timings))
+ if (timings->complete)
_gdk_frame_clock_debug_print_timings (clock, timings);
}
#endif /* G_ENABLE_DEBUG */
diff --git a/gdk/gdkframeclockprivate.h b/gdk/gdkframeclockprivate.h
index 63e2d7e..c924550 100644
--- a/gdk/gdkframeclockprivate.h
+++ b/gdk/gdkframeclockprivate.h
@@ -67,10 +67,34 @@ struct _GdkFrameClockClass
/* void (* resume_events) (GdkFrameClock *clock); */
};
+struct _GdkFrameTimings
+{
+ guint ref_count;
+
+ gint64 frame_counter;
+ guint64 cookie;
+ gint64 frame_time;
+ gint64 drawn_time;
+ gint64 presentation_time;
+ gint64 refresh_interval;
+ gint64 predicted_presentation_time;
+
+#ifdef G_ENABLE_DEBUG
+ gint64 layout_start_time;
+ gint64 paint_start_time;
+ gint64 frame_end_time;
+#endif /* G_ENABLE_DEBUG */
+
+ guint complete : 1;
+ guint slept_before : 1;
+};
+
void _gdk_frame_clock_begin_frame (GdkFrameClock *clock);
void _gdk_frame_clock_debug_print_timings (GdkFrameClock *clock,
GdkFrameTimings *timings);
+GdkFrameTimings *_gdk_frame_timings_new (gint64 frame_counter);
+
G_END_DECLS
#endif /* __GDK_FRAME_CLOCK_PRIVATE_H__ */
diff --git a/gdk/gdkframetimings.c b/gdk/gdkframetimings.c
index ad9ec2e..deb2932 100644
--- a/gdk/gdkframetimings.c
+++ b/gdk/gdkframetimings.c
@@ -17,36 +17,14 @@
#include "config.h"
-#include "gdkframetimings.h"
-
-struct _GdkFrameTimings
-{
- guint ref_count;
-
- gint64 frame_counter;
- guint64 cookie;
- gint64 frame_time;
- gint64 drawn_time;
- gint64 presentation_time;
- gint64 refresh_interval;
- gint64 predicted_presentation_time;
-
-#ifdef G_ENABLE_DEBUG
- gint64 layout_start_time;
- gint64 paint_start_time;
- gint64 frame_end_time;
-#endif /* G_ENABLE_DEBUG */
-
- guint complete : 1;
- guint slept_before : 1;
-};
+#include "gdkframeclockprivate.h"
G_DEFINE_BOXED_TYPE (GdkFrameTimings, gdk_frame_timings,
gdk_frame_timings_ref,
gdk_frame_timings_unref)
GdkFrameTimings *
-gdk_frame_timings_new (gint64 frame_counter)
+_gdk_frame_timings_new (gint64 frame_counter)
{
GdkFrameTimings *timings;
@@ -86,23 +64,6 @@ gdk_frame_timings_get_frame_counter (GdkFrameTimings *timings)
return timings->frame_counter;
}
-guint64
-gdk_frame_timings_get_cookie (GdkFrameTimings *timings)
-{
- g_return_val_if_fail (timings != NULL, 0);
-
- return timings->cookie;
-}
-
-void
-gdk_frame_timings_set_cookie (GdkFrameTimings *timings,
- guint64 cookie)
-{
- g_return_if_fail (timings != NULL);
-
- timings->cookie = cookie;
-}
-
gboolean
gdk_frame_timings_get_complete (GdkFrameTimings *timings)
{
@@ -111,32 +72,6 @@ gdk_frame_timings_get_complete (GdkFrameTimings *timings)
return timings->complete;
}
-void
-gdk_frame_timings_set_complete (GdkFrameTimings *timings,
- gboolean complete)
-{
- g_return_if_fail (timings != NULL);
-
- timings->complete = complete;
-}
-
-gboolean
-gdk_frame_timings_get_slept_before (GdkFrameTimings *timings)
-{
- g_return_val_if_fail (timings != NULL, FALSE);
-
- return timings->slept_before;
-}
-
-void
-gdk_frame_timings_set_slept_before (GdkFrameTimings *timings,
- gboolean slept_before)
-{
- g_return_if_fail (timings != NULL);
-
- timings->slept_before = slept_before;
-}
-
gint64
gdk_frame_timings_get_frame_time (GdkFrameTimings *timings)
{
@@ -145,32 +80,6 @@ gdk_frame_timings_get_frame_time (GdkFrameTimings *timings)
return timings->frame_time;
}
-void
-gdk_frame_timings_set_frame_time (GdkFrameTimings *timings,
- gint64 frame_time)
-{
- g_return_if_fail (timings != NULL);
-
- timings->frame_time = frame_time;
-}
-
-gint64
-gdk_frame_timings_get_drawn_time (GdkFrameTimings *timings)
-{
- g_return_val_if_fail (timings != NULL, 0);
-
- return timings->drawn_time;
-}
-
-void
-gdk_frame_timings_set_drawn_time (GdkFrameTimings *timings,
- gint64 drawn_time)
-{
- g_return_if_fail (timings != NULL);
-
- timings->drawn_time = drawn_time;
-}
-
gint64
gdk_frame_timings_get_presentation_time (GdkFrameTimings *timings)
{
@@ -179,15 +88,6 @@ gdk_frame_timings_get_presentation_time (GdkFrameTimings *timings)
return timings->presentation_time;
}
-void
-gdk_frame_timings_set_presentation_time (GdkFrameTimings *timings,
- gint64 presentation_time)
-{
- g_return_if_fail (timings != NULL);
-
- timings->presentation_time = presentation_time;
-}
-
gint64
gdk_frame_timings_get_predicted_presentation_time (GdkFrameTimings *timings)
{
@@ -196,15 +96,6 @@ gdk_frame_timings_get_predicted_presentation_time (GdkFrameTimings *timings)
return timings->predicted_presentation_time;
}
-void
-gdk_frame_timings_set_predicted_presentation_time (GdkFrameTimings *timings,
- gint64 predicted_presentation_time)
-{
- g_return_if_fail (timings != NULL);
-
- timings->predicted_presentation_time = predicted_presentation_time;
-}
-
gint64
gdk_frame_timings_get_refresh_interval (GdkFrameTimings *timings)
{
@@ -212,66 +103,3 @@ gdk_frame_timings_get_refresh_interval (GdkFrameTimings *timings)
return timings->refresh_interval;
}
-
-void
-gdk_frame_timings_set_refresh_interval (GdkFrameTimings *timings,
- gint64 refresh_interval)
-{
- g_return_if_fail (timings != NULL);
-
- timings->refresh_interval = refresh_interval;
-}
-
-#ifdef G_ENABLE_DEBUG
-gint64
-_gdk_frame_timings_get_layout_start_time (GdkFrameTimings *timings)
-{
- g_return_val_if_fail (timings != NULL, 0);
-
- return timings->layout_start_time;
-}
-
-void
-_gdk_frame_timings_set_layout_start_time (GdkFrameTimings *timings,
- gint64 layout_start_time)
-{
- g_return_if_fail (timings != NULL);
-
- timings->layout_start_time = layout_start_time;
-}
-
-gint64
-_gdk_frame_timings_get_paint_start_time (GdkFrameTimings *timings)
-{
- g_return_val_if_fail (timings != NULL, 0);
-
- return timings->paint_start_time;
-}
-
-void
-_gdk_frame_timings_set_paint_start_time (GdkFrameTimings *timings,
- gint64 paint_start_time)
-{
- g_return_if_fail (timings != NULL);
-
- timings->paint_start_time = paint_start_time;
-}
-
-gint64
-_gdk_frame_timings_get_frame_end_time (GdkFrameTimings *timings)
-{
- g_return_val_if_fail (timings != NULL, 0);
-
- return timings->frame_end_time;
-}
-
-void
-_gdk_frame_timings_set_frame_end_time (GdkFrameTimings *timings,
- gint64 frame_end_time)
-{
- g_return_if_fail (timings != NULL);
-
- timings->frame_end_time = frame_end_time;
-}
-
-#endif /* G_ENABLE_DEBUG */
diff --git a/gdk/gdkframetimings.h b/gdk/gdkframetimings.h
index 8e86c6e..0fb1e20 100644
--- a/gdk/gdkframetimings.h
+++ b/gdk/gdkframetimings.h
@@ -30,41 +30,16 @@ typedef struct _GdkFrameTimings GdkFrameTimings;
GType gdk_frame_timings_get_type (void) G_GNUC_CONST;
-GdkFrameTimings *gdk_frame_timings_new (gint64 frame_counter);
-
GdkFrameTimings *gdk_frame_timings_ref (GdkFrameTimings *timings);
void gdk_frame_timings_unref (GdkFrameTimings *timings);
gint64 gdk_frame_timings_get_frame_counter (GdkFrameTimings *timings);
-
-guint64 gdk_frame_timings_get_cookie (GdkFrameTimings *timings);
-void gdk_frame_timings_set_cookie (GdkFrameTimings *timings,
- guint64 cookie);
-
gboolean gdk_frame_timings_get_complete (GdkFrameTimings *timings);
-void gdk_frame_timings_set_complete (GdkFrameTimings *timings,
- gboolean complete);
-
-gboolean gdk_frame_timings_get_slept_before (GdkFrameTimings *timings);
-void gdk_frame_timings_set_slept_before (GdkFrameTimings *timings,
- gboolean slept_before);
-
gint64 gdk_frame_timings_get_frame_time (GdkFrameTimings *timings);
-void gdk_frame_timings_set_frame_time (GdkFrameTimings *timings,
- gint64 frame_time);
-gint64 gdk_frame_timings_get_drawn_time (GdkFrameTimings *timings);
-void gdk_frame_timings_set_drawn_time (GdkFrameTimings *timings,
- gint64 frame_time);
gint64 gdk_frame_timings_get_presentation_time (GdkFrameTimings *timings);
-void gdk_frame_timings_set_presentation_time (GdkFrameTimings *timings,
- gint64 presentation_time);
gint64 gdk_frame_timings_get_refresh_interval (GdkFrameTimings *timings);
-void gdk_frame_timings_set_refresh_interval (GdkFrameTimings *timings,
- gint64 refresh_interval);
gint64 gdk_frame_timings_get_predicted_presentation_time (GdkFrameTimings *timings);
-void gdk_frame_timings_set_predicted_presentation_time (GdkFrameTimings *timings,
- gint64 predicted_presentation_time);
G_END_DECLS
diff --git a/gdk/gdkinternals.h b/gdk/gdkinternals.h
index 61ebc19..4a91b77 100644
--- a/gdk/gdkinternals.h
+++ b/gdk/gdkinternals.h
@@ -429,24 +429,6 @@ cairo_surface_t * _gdk_offscreen_window_create_surface (GdkWindow *window,
gint width,
gint height);
-/********************************
- * Debug-only frame statistics *
- ********************************/
-
-#ifdef G_ENABLE_DEBUG
-
-gint64 _gdk_frame_timings_get_layout_start_time (GdkFrameTimings *timings);
-void _gdk_frame_timings_set_layout_start_time (GdkFrameTimings *timings,
- gint64 layout_start_time);
-gint64 _gdk_frame_timings_get_paint_start_time (GdkFrameTimings *timings);
-void _gdk_frame_timings_set_paint_start_time (GdkFrameTimings *timings,
- gint64 paint_time);
-gint64 _gdk_frame_timings_get_frame_end_time (GdkFrameTimings *timings);
-void _gdk_frame_timings_set_frame_end_time (GdkFrameTimings *timings,
- gint64 frame_end_time);
-
-#endif /* G_ENABLE_DEBUG */
-
G_END_DECLS
#endif /* __GDK_INTERNALS_H__ */
diff --git a/gdk/x11/gdkdisplay-x11.c b/gdk/x11/gdkdisplay-x11.c
index 8f6fe2b..90a2eca 100644
--- a/gdk/x11/gdkdisplay-x11.c
+++ b/gdk/x11/gdkdisplay-x11.c
@@ -1070,7 +1070,7 @@ find_frame_timings (GdkFrameClock *clock,
{
GdkFrameTimings *timings = gdk_frame_clock_get_timings (clock, i);
- if (gdk_frame_timings_get_cookie (timings) == serial)
+ if (timings->cookie == serial)
return timings;
}
@@ -1116,7 +1116,7 @@ _gdk_wm_protocols_filter (GdkXEvent *xev,
GdkFrameTimings *timings = find_frame_timings (clock, serial);
if (timings)
- gdk_frame_timings_set_drawn_time (timings, frame_drawn_time);
+ timings->drawn_time = frame_drawn_time;
if (window_impl->toplevel->frame_pending)
{
@@ -1153,18 +1153,16 @@ _gdk_wm_protocols_filter (GdkXEvent *xev,
if (timings)
{
- gint64 drawn_time = gdk_frame_timings_get_drawn_time (timings);
gint32 presentation_time_offset = (gint32)d2;
gint32 refresh_interval = d3;
- if (drawn_time && presentation_time_offset)
- gdk_frame_timings_set_presentation_time (timings,
- drawn_time + presentation_time_offset);
+ if (timings->drawn_time && presentation_time_offset)
+ timings->presentation_time = timings->drawn_time + presentation_time_offset;
if (refresh_interval)
- gdk_frame_timings_set_refresh_interval (timings, refresh_interval);
+ timings->refresh_interval = refresh_interval;
- gdk_frame_timings_set_complete (timings, TRUE);
+ timings->complete = TRUE;
#ifdef G_ENABLE_DEBUG
if ((_gdk_debug_flags & GDK_DEBUG_FRAMES) != 0)
_gdk_frame_clock_debug_print_timings (clock, timings);
diff --git a/gdk/x11/gdkwindow-x11.c b/gdk/x11/gdkwindow-x11.c
index 6bb1ee2..edb8591 100644
--- a/gdk/x11/gdkwindow-x11.c
+++ b/gdk/x11/gdkwindow-x11.c
@@ -32,6 +32,7 @@
#include "gdkvisualprivate.h"
#include "gdkinternals.h"
#include "gdkdeviceprivate.h"
+#include "gdkframeclockprivate.h"
#include "gdkasync.h"
#include "gdkeventsource.h"
#include "gdkdisplay-x11.h"
@@ -282,10 +283,8 @@ gdk_x11_window_predict_presentation_time (GdkWindow *window)
GdkWindowImplX11 *impl = GDK_WINDOW_IMPL_X11 (window->impl);
GdkFrameClock *clock;
GdkFrameTimings *timings;
- gint64 frame_time;
gint64 presentation_time;
gint64 refresh_interval;
- gboolean slept_before;
if (!WINDOW_IS_TOPLEVEL (window))
return;
@@ -293,39 +292,35 @@ gdk_x11_window_predict_presentation_time (GdkWindow *window)
clock = gdk_window_get_frame_clock (window);
timings = gdk_frame_clock_get_current_frame_timings (clock);
- frame_time = gdk_frame_timings_get_frame_time (timings);
- slept_before = gdk_frame_timings_get_slept_before (timings);
gdk_frame_clock_get_refresh_info (clock,
- frame_time,
+ timings->frame_time,
&refresh_interval, &presentation_time);
if (presentation_time != 0)
{
- if (slept_before)
+ if (timings->slept_before)
{
presentation_time += refresh_interval;
}
else
{
- if (presentation_time < frame_time + refresh_interval / 2)
+ if (presentation_time < timings->frame_time + refresh_interval / 2)
presentation_time += refresh_interval;
}
}
else
{
- if (slept_before)
- presentation_time = frame_time + refresh_interval + refresh_interval / 2;
+ if (timings->slept_before)
+ presentation_time = timings->frame_time + refresh_interval + refresh_interval / 2;
else
- presentation_time = frame_time + refresh_interval;
+ presentation_time = timings->frame_time + refresh_interval;
}
if (presentation_time < impl->toplevel->throttled_presentation_time)
presentation_time = impl->toplevel->throttled_presentation_time;
- gdk_frame_timings_set_predicted_presentation_time (timings,
- presentation_time);
-
+ timings->predicted_presentation_time = presentation_time;
}
static void
@@ -399,7 +394,7 @@ gdk_x11_window_end_frame (GdkWindow *window)
* but rather at a particular time. This can trigger different handling from
* the compositor.
*/
- if (gdk_frame_timings_get_slept_before (timings))
+ if (timings->slept_before)
impl->toplevel->current_counter_value += 3;
else
impl->toplevel->current_counter_value += 1;
@@ -413,8 +408,7 @@ gdk_x11_window_end_frame (GdkWindow *window)
{
impl->toplevel->frame_pending = TRUE;
gdk_frame_clock_freeze (gdk_window_get_frame_clock (window));
- gdk_frame_timings_set_cookie (timings,
- impl->toplevel->current_counter_value);
+ timings->cookie = impl->toplevel->current_counter_value;
}
}
@@ -431,7 +425,7 @@ gdk_x11_window_end_frame (GdkWindow *window)
}
if (!impl->toplevel->frame_pending)
- gdk_frame_timings_set_complete (timings, TRUE);
+ timings->complete = TRUE;
}
/*****************************************************
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]