unique id for wayland objects

Pekka Paalanen ppaalanen at gmail.com
Wed May 2 08:59:39 UTC 2018

On Wed, 2 May 2018 16:33:43 +0800
zou lan <nancy.lan.zou at gmail.com> wrote:

> Add to wayland mail list.
> Hi pekka
> I used to consider the time line and presentation protocol. But they are
> all focus on surface, not buffer. The test want to know the buffer latency,
> although they are the same as surface's on
> most cases. Applications think maybe some buffers doesn't display and used
> again.
> By the way, could add a event to wl_buffer's protocol achieve the
> requirement? Thank you.

Hi Nancy,

when a client creates a wp_presentation_feedback object, that object
tracks the particular wl_surface.commit carrying an attached wl_buffer.
So it is specific to the particular commit, not just to the surface
or even to the buffer (buffers get re-used or could theoretically be
used on multiple surfaces).

Can you not have the client record both the current time at sending
wl_surface.commit and the corresponding timestamp it gets from
wp_presentation_feedback? Why would this not be enough?

Please, see clients/presentation-shm.c in the Weston repository for an
example that tracks this kind of presentation latencies.


> ---------- Forwarded message ----------
> From: Pekka Paalanen <ppaalanen at gmail.com>
> Date: 2018-05-02 15:48 GMT+08:00
> Subject: Re: unique id for wayland objects
> To: zou lan <nancy.lan.zou at gmail.com>
> On Wed, 2 May 2018 10:57:17 +0800
> zou lan <nancy.lan.zou at gmail.com> wrote:
> > Hi pekka
> >
> > I want to get the accurate buffer latency from a buffer commit by client  
> to
> > display on the screen. The client can get the timestamp when buffer commit
> > and release. So weston only need to give a
> > timestamp when call on_pageflip.
> >
> > When do the real time analysis, there are many clients,  I want to use one
> > unique id to distinguish from each other quickly.  
> Hi,
> is there any reason you don't use presentation_feedback interface? To
> me it sounds like that would provide exactly what you need.
> https://cgit.freedesktop.org/wayland/wayland-protocols/
> tree/stable/presentation-time
> Also, could we have this coversation on the mailing list, please?
> Thanks,
> pq

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <https://lists.freedesktop.org/archives/wayland-devel/attachments/20180502/4e80ec47/attachment.sig>

More information about the wayland-devel mailing list