cairo/examples
Alberto Ruiz a1cef62f43 Add GBM vs image-surface EGL benchmark example
Add examples/gbm-egl-benchmark.c, a headless benchmark that compares
the display-path cost of uploading Cairo-rendered content to a GL
texture via two methods:

  Image surface:  glTexSubImage2D  (CPU → GPU memcpy)
  GBM surface:    EGL DMA-BUF import  (zero-copy)

The benchmark renders an animated Cairo scene at the requested
resolution, then measures only the upload/import step per frame.
It runs entirely on a DRM render node with no window system required.

Typical results on AMD Radeon RX 580:
  1080p (7.9 MB/frame):  ~24x faster with GBM  (1.42 ms → 0.06 ms)
  4K   (31.6 MB/frame):  ~80x faster with GBM  (5.18 ms → 0.07 ms)

Built automatically when gbm, egl, and glesv2 are all available.
2026-03-23 23:05:56 +00:00
..
gbm-egl-benchmark.c Add GBM vs image-surface EGL benchmark example 2026-03-23 23:05:56 +00:00
meson.build Add GBM vs image-surface EGL benchmark example 2026-03-23 23:05:56 +00:00