请问Tina Linux 移植Qt怎么用上G2D加速呢
离线
我只对接了g2d旋转
离线
请问Tina Linux 移植Qt怎么用上G2D加速呢
内核和设备树配置
Device Drivers -> SUNXI G2D Driver -> sunxi g2d ratate module
Device Drivers -> Graphics support -> Frame buffer Devices -> DISP2 Framebuffer rotation support -> Hardware(G2D) rotation support
设备树
disp_rotation_used = <1>;
degree0 = <3>; // 1,2,3
fb0_format = <0>;
fb0_width = <800>;
fb0_height = <480>;
修改qt源码重新编译:
qlinuxfbscreen.cpp里面QRegion QLinuxFbScreen::doRedraw()
调用FBIOPAN_DISPLAY,相当于调用内核G2D函数; 添加代码如下
------------
struct fb_var_screeninfo vinfo;
if(ioctl(fp, FBIOGET_VSCREENINFO, &vinfo)){
printf("Error reading variable information/n");
exit(3);
}
ioctl(fbfd, FBIOPAN_DISPLAY, &vinfo);
---------------
其他参考
https://www.cnblogs.com/liamyi/p/18539667
https://www.cnblogs.com/hylife/p/17496308.html
最近编辑记录 zdw84 (今天 09:04:55)
离线
qt 好像没有直接支持 2D 加速。
离线