summaryrefslogtreecommitdiff
path: root/render
diff options
context:
space:
mode:
authorAdam Jackson <ajax@redhat.com>2017-10-26 13:53:06 -0400
committerAdam Jackson <ajax@redhat.com>2018-01-08 14:36:49 -0500
commitcc3241a712684f8c7147f5688e9ee3ecb5a93b87 (patch)
treed10cf7a3e62811e900f2eebb604f7c8e2c905ec8 /render
parent3abbdb7318018584a27220737bd92081ce8ee67c (diff)
animcur: Return the next interval directly from the timer callback
If the return value is non-zero here, DoTimer() will automatically rearm the timer for the new (relative) delay. 'soonest' is in absolute time, so subtract off 'now' and return that. Reviewed-by: Robert Morell <rmorell@nvidia.com> Tested-by: Robert Morell <rmorell@nvidia.com> Signed-off-by: Adam Jackson <ajax@redhat.com>
Diffstat (limited to 'render')
-rw-r--r--render/animcur.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/render/animcur.c b/render/animcur.c
index 3f85f9a4f..26a6026ae 100644
--- a/render/animcur.c
+++ b/render/animcur.c
@@ -169,10 +169,9 @@ AnimCurTimerNotify(OsTimerPtr timer, CARD32 now, void *arg)
}
if (activeDevice)
- TimerSet(as->timer, TimerAbsolute, soonest, AnimCurTimerNotify, pScreen);
- else
- as->timer_set = FALSE;
+ return soonest - now;
+ as->timer_set = FALSE;
return 0;
}