Go to index / Go to protocols

tearing_control_v1 ↗

tearing_control_v1
wp_tearing_control_manager_v1

Version 1
Compositor Support
Version 1
hyprland 0.52.1
jay 1.14.0
kwin 6.7
labwc 0.20.2
louvre 2.14.1
river 0.3.13
sway 1.11
weston 15.0.1

protocol for tearing control

For some use cases like games or drawing tablets it can make sense to reduce latency by accepting tearing with the use of asynchronous page flips. This global is a factory interface, allowing clients to inform which type of presentation the content of their surfaces is suitable for.

Graphics APIs like EGL or Vulkan, that manage the buffer queue and commits of a wl_surface themselves, are likely to be using this extension internally. If a client is using such an API for a wl_surface, it should not directly use this extension on that surface, to avoid raising a tearing_control_exists protocol error.

Warning! The protocol described in this file is currently in the testing phase. Backward compatible changes may be added together with the corresponding interface version bump. Backward incompatible changes can only be done by creating a new major version of the extension.

wp_tearing_control_manager_v1
request destroy()
Destructor

    destroy tearing control factory object

    Destroy this tearing control factory object. Other objects, including wp_tearing_control_v1 objects created by this factory, are not affected by this request.

    wp_tearing_control_manager_v1
    enum error {
        tearing_control_exists = 0,
    }
    • tearing_control_exists — the surface already has a tearing object associated
    wp_tearing_control_manager_v1
    request get_tearing_control(
        id: new_id<wp_tearing_control_v1>,
        surface: object<wl_surface>,
    )

      extend surface interface for tearing control

      Instantiate an interface extension for the given wl_surface to request asynchronous page flips for presentation.

      If the given wl_surface already has a wp_tearing_control_v1 object associated, the tearing_control_exists protocol error is raised.

      tearing_control_v1
      wp_tearing_control_v1

      Version 1

      per-surface tearing control interface

      An additional interface to a wl_surface object, which allows the client to hint to the compositor if the content on the surface is suitable for presentation with tearing. The default presentation hint is vsync. See presentation_hint for more details.

      If the associated wl_surface is destroyed, this object becomes inert and should be destroyed.

      wp_tearing_control_v1
      enum presentation_hint {
          vsync = 0,
          async = 1,
      }
      • vsync

        tearing-free presentation

        The content of this surface is meant to be synchronized to the vertical blanking period. This should not result in visible tearing and may result in a delay before a surface commit is presented.

      • async

        asynchronous presentation

        The content of this surface is meant to be presented with minimal latency and tearing is acceptable.

      presentation hint values

      This enum provides information for if submitted frames from the client may be presented with tearing.

      wp_tearing_control_v1
      request set_presentation_hint(
          hint: uint<presentation_hint>,
      )

        set presentation hint

        Set the presentation hint for the associated wl_surface. This state is double-buffered, see wl_surface.commit.

        The compositor is free to dynamically respect or ignore this hint based on various conditions like hardware capabilities, surface state and user preferences.

        wp_tearing_control_v1
        request destroy()
        Destructor

          destroy tearing control object

          Destroy this surface tearing object and revert the presentation hint to vsync. The change will be applied on the next wl_surface.commit.