diff options
author | Pekka Paalanen <pekka.paalanen@collabora.co.uk> | 2015-03-18 12:17:26 +0200 |
---|---|---|
committer | Pekka Paalanen <pekka.paalanen@collabora.co.uk> | 2015-03-20 12:19:29 +0200 |
commit | 662f384e6a184d6249b01de8437c9cd4027af069 (patch) | |
tree | 087a528e0e294e42a3b95211d5a3646dcc3315c1 /src/compositor-rdp.c | |
parent | b407024ea18fe225f6db7ae01400f57abd7cf850 (diff) |
compositor, backends: weston_compositor_read_presentation_clock
Create a new function weston_compositor_read_presentation_clock() to
wrap the clock_gettime() call for the Presentation clock.
Reading the presentation clock is never supposed to fail, but if it
does, this will notify about it. I have not seen it fail yet, though.
This prepares for new testing features in the future that might allow
controlling the presentation clock. Right now it is just a convenience
function for clock_gettime().
All presentation clock readers are converted to call this new function
except rpi-backend's rpi_flippipe_update_complete(), because it gets its
clock id via a thread-safe mechanism. There shouldn't be anything really
thread-unsafe in weston_compositor_read_presentation_clock() at the
moment, but might be in the future, and weston core is not expected to
need to be thread-safe.
This is based on the original patch by
Cc: Derek Foreman <derekf@osg.samsung.com>
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-By: Derek Foreman <derekf@osg.samsung.com>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
Diffstat (limited to 'src/compositor-rdp.c')
-rw-r--r-- | src/compositor-rdp.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/compositor-rdp.c b/src/compositor-rdp.c index 1c3f9889..6955d493 100644 --- a/src/compositor-rdp.c +++ b/src/compositor-rdp.c @@ -307,7 +307,7 @@ rdp_output_start_repaint_loop(struct weston_output *output) { struct timespec ts; - clock_gettime(output->compositor->presentation_clock, &ts); + weston_compositor_read_presentation_clock(output->compositor, &ts); weston_output_finish_frame(output, &ts, PRESENTATION_FEEDBACK_INVALID); } @@ -353,7 +353,7 @@ finish_frame_handler(void *data) struct rdp_output *output = data; struct timespec ts; - clock_gettime(output->base.compositor->presentation_clock, &ts); + weston_compositor_read_presentation_clock(output->base.compositor, &ts); weston_output_finish_frame(&output->base, &ts, 0); return 1; |