mirror of
https://github.com/mpv-player/mpv
synced 2024-12-30 11:02:10 +00:00
879824a47f
This protocol is pretty important since it finally lets us solve the longstanding issue of fractional scaling in wayland (no more mpv doing rendering over the target resolution and then being scaled down). This protocol also can completely replace the buffer_scale usage that we are currently using for integer scaling so hopefully this can be removed sometime in the future. Note that vo_dmabuf_wayland is omitted from the fractional scale handling because we want the compositor to handle all the scaling for that VO. Fixes #9443.
48 lines
2.1 KiB
Meson
48 lines
2.1 KiB
Meson
wl_protocol_dir = wayland['deps'][2].get_variable(pkgconfig: 'pkgdatadir', internal: 'pkgdatadir')
|
|
protocols = [[wl_protocol_dir, 'stable/presentation-time/presentation-time.xml'],
|
|
[wl_protocol_dir, 'stable/viewporter/viewporter.xml'],
|
|
[wl_protocol_dir, 'stable/xdg-shell/xdg-shell.xml'],
|
|
[wl_protocol_dir, 'unstable/idle-inhibit/idle-inhibit-unstable-v1.xml'],
|
|
[wl_protocol_dir, 'unstable/linux-dmabuf/linux-dmabuf-unstable-v1.xml'],
|
|
[wl_protocol_dir, 'unstable/xdg-decoration/xdg-decoration-unstable-v1.xml']]
|
|
wl_protocols_source = []
|
|
wl_protocols_headers = []
|
|
|
|
features += {'wayland_protocols_1_24': wayland['deps'][2].version().version_compare('>=1.24')}
|
|
|
|
features += {'wayland_protocols_1_27': wayland['deps'][2].version().version_compare('>=1.27')}
|
|
if features['wayland_protocols_1_27']
|
|
protocols += [[wl_protocol_dir, 'staging/content-type/content-type-v1.xml'],
|
|
[wl_protocol_dir, 'staging/single-pixel-buffer/single-pixel-buffer-v1.xml']]
|
|
endif
|
|
|
|
features += {'wayland_protocols_1_31': wayland['deps'][2].version().version_compare('>=1.31')}
|
|
if features['wayland_protocols_1_31']
|
|
protocols += [[wl_protocol_dir, 'staging/fractional-scale/fractional-scale-v1.xml']]
|
|
endif
|
|
|
|
foreach p: protocols
|
|
xml = join_paths(p)
|
|
wl_protocols_source += custom_target(xml.underscorify() + '_c',
|
|
input: xml,
|
|
output: '@BASENAME@.c',
|
|
command: [wayland['scanner'], 'private-code', '@INPUT@', '@OUTPUT@'],
|
|
)
|
|
wl_protocols_headers += custom_target(xml.underscorify() + '_h',
|
|
input: xml,
|
|
output: '@BASENAME@.h',
|
|
command: [wayland['scanner'], 'client-header', '@INPUT@', '@OUTPUT@'],
|
|
)
|
|
endforeach
|
|
|
|
lib_client_protocols = static_library('protocols',
|
|
wl_protocols_source + wl_protocols_headers,
|
|
dependencies: wayland['deps'][0])
|
|
|
|
client_protocols = declare_dependency(link_with: lib_client_protocols,
|
|
sources: wl_protocols_headers)
|
|
|
|
dependencies += [client_protocols, wayland['deps']]
|
|
|
|
sources += ['video/out/wayland_common.c']
|