libweston: export weston_linux_sync_file_read_timestamp()
This is an internal export for GL-renderer, so that it does not need to build linux-sync-file.c a second time. This follows the example of linux-explicit-synchronization.c which is also used by GL-renderer. Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
This commit is contained in:
parent
4e952328ca
commit
4b5727375c
|
@ -339,7 +339,8 @@ timeline_render_point_handler(int fd, uint32_t mask, void *data)
|
|||
if (mask & WL_EVENT_READABLE) {
|
||||
struct timespec tspec = { 0 };
|
||||
|
||||
if (linux_sync_file_read_timestamp(trp->fd, &tspec) == 0) {
|
||||
if (weston_linux_sync_file_read_timestamp(trp->fd,
|
||||
&tspec) == 0) {
|
||||
TL_POINT(tp_name, TLP_GPU(&tspec),
|
||||
TLP_OUTPUT(trp->output), TLP_END);
|
||||
}
|
||||
|
|
|
@ -30,6 +30,7 @@
|
|||
#include <poll.h>
|
||||
#include <stddef.h>
|
||||
#include <sys/ioctl.h>
|
||||
#include <wayland-server-core.h>
|
||||
|
||||
#ifdef HAVE_LINUX_SYNC_FILE_H
|
||||
#include <linux/sync_file.h>
|
||||
|
@ -62,8 +63,8 @@ linux_sync_file_is_valid(int fd)
|
|||
* \param ts[out] the timespec struct to fill with the timestamp
|
||||
* \return 0 if a timestamp was read, -1 on error
|
||||
*/
|
||||
int
|
||||
linux_sync_file_read_timestamp(int fd, struct timespec *ts)
|
||||
WL_EXPORT int
|
||||
weston_linux_sync_file_read_timestamp(int fd, struct timespec *ts)
|
||||
{
|
||||
struct sync_file_info file_info = { { 0 } };
|
||||
struct sync_fence_info fence_info = { { 0 } };
|
||||
|
|
|
@ -33,6 +33,6 @@ bool
|
|||
linux_sync_file_is_valid(int fd);
|
||||
|
||||
int
|
||||
linux_sync_file_read_timestamp(int fd, struct timespec *ts);
|
||||
weston_linux_sync_file_read_timestamp(int fd, struct timespec *ts);
|
||||
|
||||
#endif /* WESTON_LINUX_SYNC_FILE_H */
|
||||
|
|
|
@ -443,7 +443,6 @@ if get_option('renderer-gl')
|
|||
|
||||
srcs_renderer_gl = [
|
||||
'gl-renderer.c',
|
||||
'linux-sync-file.c',
|
||||
'../shared/matrix.c',
|
||||
linux_dmabuf_unstable_v1_protocol_c,
|
||||
linux_dmabuf_unstable_v1_server_protocol_h,
|
||||
|
|
Loading…
Reference in New Issue