QML渲染引擎:帧刷新事件 [英] QML Rendering Engine: frame refresh event

查看:90
本文介绍了QML渲染引擎:帧刷新事件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

性能注意事项和建议文章说:

作为应用程序开发人员,您必须努力允许渲染引擎以实现稳定的每秒60帧刷新率.60FPS意味着每个之间大约有16毫秒可以进行处理的框架,其中包括处理需要将绘图图元上载到图形硬件.

As an application developer, you must strive to allow the rendering engine to achieve a consistent 60 frames-per-second refresh rate. 60 FPS means that there is approximately 16 milliseconds between each frame in which processing can be done, which includes the processing required to upload the draw primitives to the graphics hardware.

是否存在事件或信号或任何形式的回调,以使代码在刷新后被调用?

Is there an event or signal or any form of callback to make the code be called with that refresh?

目标是消除处理UI线程插槽中来自渲染线程的信号的需要.如果新数据到达,则将对其进行绘制或标记,以进行下一次刷新绘制(通过 update()调用).

The goal is to eliminate the need for handling the signal from the rendering thread in the UI thread slot. If the new data arrived then it will be drawn or marked for the next refresh to be drawn (with update() call).

推荐答案

QQuickWindow 具有大量用于同步的信号- beforeRendering()afterRendering() beforeSynchronizing() afterSynchronizing() frameSwapped().随便挑.

QQuickWindow has a bunch of signals for the purpose of synchronization - beforeRendering(), afterRendering(), beforeSynchronizing(), afterSynchronizing(), frameSwapped(). Take your pick.

这篇关于QML渲染引擎:帧刷新事件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆