PresentationTime QML Type
提供对帧在屏幕上显示时机的跟踪功能。更多...
| Import Statement: | import QtWayland.Compositor.PresentationTime |
| Since: | Qt 6.3 |
方法
- void sendFeedback(Window window, int sequence, int sec, int nsec)
详细说明
PresentationTime 扩展提供了一种跟踪表面渲染时序的方法。客户端可以请求与某个表面相关的反馈,然后合成器会发送反馈事件,其中包含该表面在屏幕上呈现的时间。
PresentationTime 对应于 Wayland 的wp_presentation 接口。
要在合成器中实现 PresentationTime 扩展的功能,请创建 PresentationTime 组件的实例,并将其添加到合成器支持的扩展列表中:
随后,当表面在屏幕上呈现时,调用 `sendFeedback()`。通常,可以通过 DRM 页面翻转事件获取该时间。
import QtWayland.Compositor.PresentationTime
WaylandCompositor {
PresentationTime {
id: presentationTime
}
}方法文档
void sendFeedback(Window window, int sequence, int sec, int nsec)
用于通过 `window` 通知帧已在屏幕上显示的接口。如果您的平台支持 DRM 事件,则 `page_flip_handler ` 是发送该事件的合适时机。`sequence ` 是刷新计数器。`sec ` 和 `nsec ` 分别存储显示时间戳的秒和纳秒部分。
© 2026 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.