Merge branch 'vrr' into 'main'

RFC: Add zwp_vrr_v1

See merge request wayland/wayland-protocols!44
This commit is contained in:
Alexandros Frantzis 2026-02-03 23:20:39 +00:00
commit 8abd7f5f61
2 changed files with 107 additions and 0 deletions

4
unstable/vrr/README Normal file
View file

@ -0,0 +1,4 @@
Variable refresh rate protocol
Maintainers:
Alexandros Frantzis <alexandros.frantzis@collabora.com>

View file

@ -0,0 +1,103 @@
<?xml version="1.0" encoding="UTF-8"?>
<protocol name="zwp_vrr_unstable_v1">
<copyright>
Copyright 2020 Collabora, Ltd
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
to deal in the Software without restriction, including without limitation
the rights to use, copy, modify, merge, publish, distribute, sublicense,
and/or sell copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice (including the next
paragraph) shall be included in all copies or substantial portions of the
Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.
</copyright>
<interface name="zwp_vrr_v1" version="1">
<description summary="protocol for variable refresh rate">
This global is a factory interface, allowing clients to request
variable refresh rate (VRR) support on a per-surface basis.
Variable refresh rate mechanisms allow outputs to vary their frame
timings in order to optimally accommodate frame submissions that
occur at irregular rates, or rates that don't match the configured
rate of the these outputs.
Warning! The protocol described in this file is experimental and
backward incompatible changes may be made. Backward compatible changes
may be added together with the corresponding interface version bump.
Backward incompatible changes are done by bumping the version number in
the protocol and interface names and resetting the interface version.
Once the protocol is to be declared stable, the 'z' prefix and the
version number in the protocol and interface names are removed and the
interface version number is reset.
</description>
<request name="destroy" type="destructor">
<description summary="destroy explicit synchronization factory object">
Destroy this VRR factory object. Other objects, including
zwp_surface_vrr_v1 objects created by this factory, shall not
be affected by this request.
</description>
</request>
<enum name="error">
<entry name="vrr_exists" value="0"
summary="the surface already has a VRR object associated"/>
</enum>
<request name="get_vrr">
<description summary="extend surface interface for VRR">
Instantiate an interface extension for the given wl_surface to
provide VRR support.
If the given wl_surface already has a VRR object associated, the
vrr_exists protocol error is raised.
</description>
<arg name="id" type="new_id"
interface="zwp_surface_vrr_v1"
summary="the new surface VRR interface id"/>
<arg name="surface" type="object" interface="wl_surface"
summary="the surface"/>
</request>
</interface>
<interface name="zwp_surface_vrr_v1" version="1">
<description summary="per-surface VRR support">
The existence of this object is a hint to the compositor to employ
a variable refresh rate mechanism to optimize frame presentations
for the associated surface, when possible. This is typically useful
when frame submissions on the associated surface may be irregular,
or regular at a rate different from the configured refresh rate of
the output they are presented on.
The compositor is free to dynamically respect or ignore this hint
during the lifetime of this object based on various conditions,
including display capabilities and surface window state.
The existence of this object additionally implies that the client
is able to handle irregular frame timings that may result from
the employment of a variable refresh rate mechanism.
</description>
<request name="destroy" type="destructor">
<description summary="destroy synchronization object">
Destroy this surface VRR object and remove all hints and
implications that are described in the interface description.
</description>
</request>
</interface>
</protocol>