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