Xlib does not perform any graphics. If you are talking about server-side primitives, they are usually quite fast these days, but they are also quite limited (lines, rectangles, polygons, ellipses, trapezoids, solid color fills) and, as a rule, do not get any special acceleration by the graphics drivers .
Honestly, you should not directly program Xlib or xcb. Instead, use a toolbox such as Qt, GTK + or FLTK (or wxWindows, or, or ....). They provide the foundation for building applications, and abstract X details in an easy-to-use API.
source
share