[mutter] meta-window-actor: Fix offset calculation in queue_send_frame_messages_timeout
- From: Adel Gadllah <agadllah src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter] meta-window-actor: Fix offset calculation in queue_send_frame_messages_timeout
- Date: Mon, 7 Oct 2013 18:24:24 +0000 (UTC)
commit 36be0846552d08fd093dda01a6860cb92387f1b9
Author: Adel Gadllah <adel gadllah gmail com>
Date: Mon Oct 7 17:51:12 2013 +0200
meta-window-actor: Fix offset calculation in queue_send_frame_messages_timeout
The current time offset calculation is wrong. It is supposed to calculate
the offset between the current time and the
"time where it message should be sent" (last_time + interval).
Fix the math to actually do that.
https://bugzilla.gnome.org/show_bug.cgi?id=709340
src/compositor/meta-window-actor.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/src/compositor/meta-window-actor.c b/src/compositor/meta-window-actor.c
index 7dc8bf0..77a0f25 100644
--- a/src/compositor/meta-window-actor.c
+++ b/src/compositor/meta-window-actor.c
@@ -973,7 +973,7 @@ queue_send_frame_messages_timeout (MetaWindowActor *self)
}
interval = (int)(1000000 / refresh_rate) * 6;
- offset = MAX (0, current_time - priv->frame_drawn_time + interval) / 1000;
+ offset = MAX (0, priv->frame_drawn_time + interval - current_time) / 1000;
/* The clutter master clock source has already been added with META_PRIORITY_REDRAW,
* so the timer will run *after* the clutter frame handling, if a frame is ready
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]