Linux显示:基于Framebuffer的图形框架和测试工具
Linux Framebuffer子系统是传统的内核显示框架。有很多基于Frambuffer的用户空间形式框架,以及针对Framebuffer的测试工具。
1. Linux Framebuffer
Linux FrameBuffer相关的开源资源《fosdem_2020_nicolas_caramelli_linux_framebuffer.pdf》。
2. 基于FrameBuffer的图形框架
2.1 Mesa 3D
OpenGL(Open Graphics Library)是用于渲染2D、3D矢量图形的跨语言、跨平台的应用程序编程接口(API)。
OpenGL ES (OpenGL for Embedded Systems) 是 OpenGL 三维图形 API 的子集,针对手机、PDA和游戏主机等嵌入式设备而设计。
OpenVG(Open Vector Graphics),OpenVG™ 是针对诸如Flash和SVG的矢量图形算法库提供底层硬件加速界面的免授权费、跨平台应用程序接口API。
EGL是OpenGL ES和底层Native平台视窗系统之间的接口。更多参考《EGL Overview - The Khronos Group Inc》。
Mesa 3D是OpenGL的一个开源本的实现,支持3D硬件加速。Mesa实现了多种图形API,包括OpenGL ES、OpenCLK、OpenMAX、EGL等。Mesa 3D能够完全借助CPU和Linux Framebuffer(GLFBDEV(OpenGL Extension to the Linux Framebuffer)和EGL )实现OpenGL和OpenGL EL渲染。
2.2 DirectFB
DirectFB是基于fbdev的一系列图形API接口。
2.3 QT LinuxFB插件
《QT显示插件(LinuxFB)及其依赖的驱动(DRM/framebuffer)记录》
3 基于FrameBuffer的测试工具
3.1 fb-test-app
3.1.1 fb-test
通过fbtest可以指定framebuffer显示r/g/b/white/patter。
fb-test 1.1.0 (rosetta)
Usage: fb-test -f fbnum -r -g -b -w -p pattern
Where -f fbnum = framebuffer device number
-r = fill framebuffer with red
-g = fill framebuffer with green
-b = fill framebuffer with blue
-w = fill framebuffer with white
-p pattern = fill framebuffer with pattern number
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
例如fb-test -f 0 -p 0:
3.1.2 fb-test-rect
在framebuffer上随机画不同大小和颜色矩形。
3.2 fbdump
将当前framebuffer快照以ppm格式导出到文件中。
fbdump -fb /dev/fb0 > fb0.ppm
- 1
3.3 fbgrab
fbgrab也是获取framebuffer快照并保存成文件,不过是保存成png文件,同时配置选项相对于fbdump也更多。
Possible options:
-b n force use of n bits/pixel, required when reading from file
-C n grab from console n, for slower framebuffers
-c n grab from console n
-d dev use framebuffer device dev instead of default
-f file read from file instead of framebuffer
-h n set height to n pixels, required when reading from file
can be used to force height when reading from framebuffer
-i turns on interlacing in PNG
-s n sleep n seconds before making screenshot
-v verbose, print debug information.
-w n set width to n pixels, required when reading from file
can be used to force width when reading from framebuffer
-z n PNG compression level: 0 (fast) .. 9 (best)
-? print this usage information
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 11
- 12
- 13
- 14
- 15
例如:fbgrab -d /dev/fb0 fb.png。
3.4 fbset
fbset是一个显示或者设置framebuffer设备的工具。
Usage: fbset [options] [mode]
Valid options:
General options:
-h, --help : display this usage information
--test : don't change, just test whether the mode is valid
-s, --show : display video mode settings
-i, --info : display all frame buffer information
-v, --verbose : verbose mode
-V, --version : print version information
-x, --xfree86 : XFree86 compatibility mode
-a, --all : change all virtual consoles on this device
Frame buffer special device nodes:
-fb <device> : processed frame buffer device
(default is /dev/fb0)
Video mode database:
-db <file> : video mode database file
(default is /etc/fb.modes)
Display geometry:
-xres <value> : horizontal resolution (in pixels)
-yres <value> : vertical resolution (in pixels)
-vxres <value> : virtual horizontal resolution (in pixels)
-vyres <value> : virtual vertical resolution (in pixels)
-depth <value> : display depth (in bits per pixel)
-nonstd <value> : select nonstandard video mode
-g, --geometry ... : set all geometry parameters at once
-match : set virtual vertical resolution by virtual resolution
Display timings:
-pixclock <value> : pixel clock (in picoseconds)
-left <value> : left margin (in pixels)
-right <value> : right margin (in pixels)
-upper <value> : upper margin (in pixel lines)
-lower <value> : lower margin (in pixel lines)
-hslen <value> : horizontal sync length (in pixels)
-vslen <value> : vertical sync length (in pixel lines)
-t, --timings ... : set all timing parameters at once
Display flags:
-accel <value> : hardware text acceleration enable (false or true)
-hsync <value> : horizontal sync polarity (low or high)
-vsync <value> : vertical sync polarity (low or high)
-csync <value> : composite sync polarity (low or high)
-gsync <value> : synch on green (false or true)
-extsync <value> : external sync enable (false or true)
-bcast <value> : broadcast enable (false or true)
-laced <value> : interlace enable (false or true)
-double <value> : doublescan enable (false or true)
-rgba <r,g,b,a> : recommended length of color entries
-grayscale <value> : grayscale enable (false or true)
Display positioning:
-move <direction> : move the visible part (left, right, up or down)
-step <value> : step increment (in pixels or pixel lines)
(default is 8 horizontal, 2 vertical)
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
- 26
- 27
- 28
- 29
- 30
- 31
- 32
- 33
- 34
- 35
- 36
- 37
- 38
- 39
- 40
- 41
- 42
- 43
- 44
- 45
- 46
- 47
- 48
- 49
- 50
- 51
- 52
3.5 fbterm
fbterm:一个基于framebuffer的终端模拟器。
3.6 fbv
fbv:一个基于framebuffer的显示gif/jpeg/png/bmp文件的工具。
- 分享
- 举报

-
浏览量:2987次2020-05-14 17:30:06
-
浏览量:1947次2020-09-23 16:09:26
-
浏览量:1185次2023-10-25 14:45:27
-
浏览量:86次2025-04-16 17:12:31
-
浏览量:2112次2023-11-23 15:47:07
-
浏览量:4520次2023-04-12 17:43:32
-
浏览量:4727次2020-07-31 13:45:09
-
浏览量:3040次2020-08-24 21:15:42
-
浏览量:2762次2020-07-09 09:39:40
-
浏览量:2228次2021-11-22 10:05:45
-
浏览量:5057次2021-08-06 15:29:06
-
浏览量:1109次2023-09-27 09:50:04
-
浏览量:163次2025-02-05 13:22:59
-
浏览量:2309次2019-01-21 21:17:04
-
浏览量:3049次2020-11-10 14:23:32
-
2021-02-25 14:00:02
-
浏览量:1072次2023-02-15 15:42:15
-
浏览量:1847次2018-10-08 13:40:42
-
浏览量:927次2024-01-09 08:52:25
-
广告/SPAM
-
恶意灌水
-
违规内容
-
文不对题
-
重复发帖

JQ






举报类型
- 内容涉黄/赌/毒
- 内容侵权/抄袭
- 政治相关
- 涉嫌广告
- 侮辱谩骂
- 其他
详细说明