PresentationTime QML Type

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

import 语句: import QtWayland.Compositor.PresentationTime
Since: Qt 6.3
实例化: QWaylandPresentationTime

方法

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

详细描述

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 接口。

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
    }
}
					

方法文档编制

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.