[mutter/wip/carlosg/performance-improvements: 9/23] wayland: Collect frame completion time once for all surfaces
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter/wip/carlosg/performance-improvements: 9/23] wayland: Collect frame completion time once for all surfaces
- Date: Tue, 9 May 2017 10:08:01 +0000 (UTC)
commit 3ced67d91806e29bd99a2e96f62e5668a317269d
Author: Carlos Garnacho <carlosg gnome org>
Date: Sun Apr 30 20:49:26 2017 +0200
wayland: Collect frame completion time once for all surfaces
Dispatch all surface frames with the same monotonic time to avoid
querying it too often.
https://bugzilla.gnome.org/show_bug.cgi?id=782344
src/wayland/meta-wayland.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/src/wayland/meta-wayland.c b/src/wayland/meta-wayland.c
index 03cccdb..7bbd096 100644
--- a/src/wayland/meta-wayland.c
+++ b/src/wayland/meta-wayland.c
@@ -179,12 +179,14 @@ meta_wayland_compositor_update (MetaWaylandCompositor *compositor,
void
meta_wayland_compositor_paint_finished (MetaWaylandCompositor *compositor)
{
+ gint64 current_time = g_get_monotonic_time ();
+
while (!wl_list_empty (&compositor->frame_callbacks))
{
MetaWaylandFrameCallback *callback =
wl_container_of (compositor->frame_callbacks.next, callback, link);
- wl_callback_send_done (callback->resource, g_get_monotonic_time () / 1000);
+ wl_callback_send_done (callback->resource, current_time / 1000);
wl_resource_destroy (callback->resource);
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]