weston/protocol/meson.build

80 lines
2.4 KiB
Meson
Raw Normal View History

dep_scanner = dependency('wayland-scanner', native: true)
prog_scanner = find_program(dep_scanner.get_pkgconfig_variable('wayland_scanner'))
dep_wp = dependency('wayland-protocols', version: '>= 1.24',
fallback: ['wayland-protocols', 'wayland_protocols'])
dir_wp_base = dep_wp.get_variable(pkgconfig: 'pkgdatadir', internal: 'pkgdatadir')
install_data(
[
'weston-content-protection.xml',
'weston-debug.xml',
'weston-direct-display.xml',
],
install_dir: join_paths(dir_data, dir_protocol_libweston)
)
generated_protocols = [
[ 'input-method', 'v1' ],
[ 'input-timestamps', 'v1' ],
[ 'ivi-application', 'internal' ],
[ 'ivi-hmi-controller', 'internal' ],
[ 'fullscreen-shell', 'v1' ],
[ 'linux-dmabuf', 'v1' ],
libweston: Introduce zwp_linux_explicit_synchronization_v1 Introduce support for the zwp_linux_explicit_synchronization_unstable_v1 protocol with an implementation of the zwp_linux_explicit_synchronization_v1 interface. Explicit synchronization provides a more versatile notification mechanism for buffer readiness and availability, and can be used to improve efficiency by integrating with related functionality in display and graphics APIs. In addition, the per-commit nature of the release events provided by this protocol potentially offers a solution to a deficiency of the wl_buffer.release event (see https://gitlab.freedesktop.org/wayland/wayland/issues/46). Support for this protocol depends on the capabilities of the backend, so we don't register it by default but provide a function which each backend will need to call. In this commit only the headless backend when using the noop renderer supports this to enable testing. Note that the zwp_surface_synchronization_v1 interface, which contains the core functionality of the protocol, is not implemented in this commit. Support for it will be added in future commits. Changes in v7: - Added some information in the commit message about the benefits of the explicit sync protocol. Changes in v6: - Fall back to advertising minor version 1 of the explicit sync protocol, although we support minor version 2 features, until the new wayland-protocols version is released. Changes in v5: - Meson support. - Advertise minor version 2 of the explicit sync protocol. Changes in v4: - Enable explicit sync support in the headless backend for all renderers. Changes in v3: - Use wl_resource_get_version() instead of hardcoding version 1. - Use updated protocol interface names. - Use correct format specifier for resource id. - Change test name to 'linux-explicit-synchronization.weston' (s/_/-/g). Changes in v2: - Move implementation to separate file so protocol can be registered on demand by backends. - Register protocol in headless+noop backend for testing purposes. Signed-off-by: Alexandros Frantzis <alexandros.frantzis@collabora.com>
2018-10-19 12:14:11 +03:00
[ 'linux-explicit-synchronization', 'v1' ],
[ 'presentation-time', 'stable' ],
[ 'pointer-constraints', 'v1' ],
[ 'relative-pointer', 'v1' ],
[ 'tablet', 'v2' ],
[ 'text-cursor-position', 'internal' ],
[ 'text-input', 'v1' ],
[ 'viewporter', 'stable' ],
[ 'weston-debug', 'internal' ],
[ 'weston-desktop-shell', 'internal' ],
[ 'weston-screenshooter', 'internal' ],
[ 'weston-content-protection', 'internal' ],
[ 'weston-test', 'internal' ],
[ 'weston-touch-calibration', 'internal' ],
[ 'weston-direct-display', 'internal' ],
[ 'xdg-output', 'v1' ],
[ 'xdg-shell', 'v6' ],
[ 'xdg-shell', 'stable' ],
]
foreach proto: generated_protocols
proto_name = proto[0]
if proto[1] == 'internal'
base_file = proto_name
xml_path = '@0@.xml'.format(proto_name)
elif proto[1] == 'stable'
base_file = proto_name
xml_path = '@0@/stable/@1@/@1@.xml'.format(dir_wp_base, base_file)
else
base_file = '@0@-unstable-@1@'.format(proto_name, proto[1])
xml_path = '@0@/unstable/@1@/@2@.xml'.format(dir_wp_base, proto_name, base_file)
endif
foreach output_type: [ 'client-header', 'server-header', 'private-code' ]
if output_type == 'client-header'
output_file = '@0@-client-protocol.h'.format(base_file)
elif output_type == 'server-header'
output_file = '@0@-server-protocol.h'.format(base_file)
else
output_file = '@0@-protocol.c'.format(base_file)
if dep_scanner.version().version_compare('< 1.14.91')
output_type = 'code'
endif
endif
var_name = output_file.underscorify()
target = custom_target(
'@0@ @1@'.format(base_file, output_type),
command: [ prog_scanner, output_type, '@INPUT@', '@OUTPUT@' ],
input: xml_path,
output: output_file,
)
set_variable(var_name, target)
endforeach
endforeach