Skip to content

cboyer/openvg-rpi

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

OpenVG tests with Raspberry Pi

Experimentations with OpenVG for hardware accelerated 2D drawing on Raspberry Pi.
Compares direct on-screen rendering, PbufferSurface and PbufferFromClientBuffer.
Relies on Freetype2 library for text drawing with TrueType fonts.
Pictures are saved to PNG files with stb library.

Performances

Raspberry Pi Zero W with Raspbian GNU/Linux 10 (buster), kernel 4.19.97.
Image size: 1920x1080.
Draws: ellipse + round rectangle + 2 strings.
A transformation matrix is applied to reverse pixels order according to stbi_write_png() reading order.

Without pixels copy [1]With pixels copy [2]
VgFinishVgFlushVgFinishVgFlush
onscreen.c93.75 i/s, 9.5% CPU166.66 i/s, 29% CPU24.19 i/s, 39% CPU25.21 i/s, 40% CPU
PbufferSurface.c96.77 i/s, 10.5% CPU176.47 i/s, 30% CPU20.68 i/s, 26.5% CPU23.07 i/s, 33% CPU
PbufferFromClientBuffer.c63.49 i/s, 6.5% CPU76.92 i/s, 7.8% CPU16.39 i/s, 23% CPU17.24 i/s, 19% CPU

[1]: Pictures are only generated.
[2]: Pictures are generated and pixels are stored in memory (vgReadPixels() for onscreen/PbufferSurface and vgGetImageSubData() for PbufferFromClientBuffer), stbi_write_png() is not used in these results.

Compilation

gcc PbufferSurface.c -O2 -Wall -Werror -L/opt/vc/lib -lbrcmEGL -lbrcmGLESv2 -lbcm_host -I/opt/vc/include -I/opt/vc/include/interface/vmcs_host/linux -I/opt/vc/include/interface/vcos/pthreads  -I/usr/include/stb -lstb -I/usr/include/freetype2 -lfreetype -I/usr/include/glib-2.0 -I/usr/lib/arm-linux-gnueabihf/glib-2.0/include -lglib-2.0

Official documentation

OpenVG Specifications
OpenVG quick reference

About

OpenVG tests on Raspberry Pi

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages