-
Notifications
You must be signed in to change notification settings - Fork 49
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
AWTK程序的界面刷新率只有LCD时序帧率的一半 #88
Comments
双缓冲需要等垂直同步, 如果每帧渲染时间都超出16ms, 则帧率只有一半, 三缓冲可以得到一定的缓解 https://www.bilibili.com/video/BV1FK4y1x7bk?spm_id_from=333.999.0.0 |
双缓冲需不需要进行垂直同步,要看实现方式:如果硬件本身支持双缓冲就不需要垂直同步;如果硬件不支持双缓冲即双缓冲是由软件实现的才需要垂直同步。 |
太专业了,什么是垂直同步? |
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
LCD接口是RGB,驱动类型是fbdev,用
window_manager_set_show_fps(window_manager(), TRUE)
显示程序刷新帧率发现在没有更新内容的界面上其FPS只有LCD时序帧率的一半:粗略看了下源码,发现宏
__FB_WAIT_VSYNC
默认为1
即刷新时默认会调用ioctl(fb->fd, FBIO_WAITFORVSYNC, &dummy);
来等待垂直同步信号,个人认为:在双缓存的fbdev设备上是不需要等待垂直同步的。于是,我将文件
awtk-port/lcd_linux/lcd_linux_fb.c
的宏__FB_WAIT_VSYNC
定义改为#define __FB_WAIT_VSYNC 0
后程序的最大帧率达到了LCD时序帧率。测试过程也没发现有界面撕裂的情况。The text was updated successfully, but these errors were encountered: