PresentationTime QML Type

Provides tracking the timing when a frame is presented on screen. More...

Import Statement: import QtWayland.Compositor.PresentationTime
Since: Qt 6.3
Instantiates: QWaylandPresentationTime

Methods

  • void sendFeedback(Window window, int sequence, int sec, int nsec)

Detailed Description

The PresentationTime extension provides a way to track rendering timing for a surface. Client can request feedbacks associated with a surface, then compositor send events for the feedback with the time when the surface is presented on-screen.

PresentationTime corresponds to the Wayland wp_presentation interface.

To provide the functionality of the presentationtime extension in a compositor, create an instance of the PresentationTime component and add it to the list of extensions supported by the compositor:

Then, call sendFeedback() when a surface is presented on screen. Usually, the timing can be obtained from drm page flip event.

import QtWayland.Compositor.PresentationTime

WaylandCompositor {
    PresentationTime {
        id: presentationTime
    }
}

Method Documentation

void sendFeedback(Window window, int sequence, int sec, int nsec)

Interface to notify that a frame is presented on screen using window. If your platform supports DRM events, page_flip_handler is the proper timing to send it. The sequence is the refresh counter. sec and nsec hold the seconds and nanoseconds parts of the presentation timestamp, respectively.


© 2024 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.