[PATCH weston v2 2/6] compositors: Wrap clock_gettime() usage

Derek Foreman derekf at osg.samsung.com
Wed Mar 18 12:55:19 PDT 2015


On 18/03/15 03:14 AM, Pekka Paalanen wrote:
> On Mon, 22 Dec 2014 16:09:15 -0600
> Derek Foreman <derekf at osg.samsung.com> wrote:
> 
>> In preparation for a future patch which allows test clients to control
>> the presentation clock, we wrap any clock_gettime() of the presentation
>> clock in weston_compositor_presentation_clock_gettime().
>>
>> Signed-off-by: Derek Foreman <derekf at osg.samsung.com>
> 
> Hi,
> 
> yeah, this patch looks good.
> 
> I'm finishing the repaint scheduling patches right now, and I'd want to
> make this wrapping part of that series. Bikeshedding a bit, I'd like to
> call this function weston_compositor_read_presentation_clock() to go
> with weston_compositor_set_presentation_clock() etc.

I went with weston_compositor_clock_gettime() to look more like the API
it was wrapping.

What will we call the equivalent to clock_settime() later?
weston_compositor_write_presentation_clock() seems ok to me.

> I also need to drop the test mode parts, so we'll get a patch which
> only wraps the stuff into a new function but doesn't change any
> behaviour.
> 
> That said, I do wonder how we're going to deal with the repaint delay
> timer that is intended to wait a time period measured in the
> presentation clock, when you expose a test protocol to set the
> presentation clock time...

Hopefully this won't be too terrible - the timer code can attempt to
wait the correct amount of time, get a false wake-up, check what the
time really is, and realize it has to go back to sleep?

> Anything I should take into account right now?

I really don't think so.

> 
> Thanks,
> pq
> 
>> ---
>>  src/compositor-drm.c      |  2 +-
>>  src/compositor-fbdev.c    |  2 +-
>>  src/compositor-headless.c |  2 +-
>>  src/compositor-rdp.c      |  2 +-
>>  src/compositor-x11.c      |  2 +-
>>  src/compositor.c          | 22 ++++++++++++++++++++++
>>  src/compositor.h          |  5 +++++
>>  7 files changed, 32 insertions(+), 5 deletions(-)
> _______________________________________________
> wayland-devel mailing list
> wayland-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/wayland-devel
> 



More information about the wayland-devel mailing list