diff options
author | Vito Caputo <vcaputo@pengaru.com> | 2017-12-31 11:38:20 -0800 |
---|---|---|
committer | Vito Caputo <vcaputo@pengaru.com> | 2018-01-01 22:27:40 -0800 |
commit | 9e5f4de8ecc1408fe8b65f5eee442a38322b8ac8 (patch) | |
tree | 5568744c3e1c3069b959420034223c780e4909bb /src | |
parent | 0b7361bb55d91b49dea75dd332294c6b75c501e7 (diff) |
fb: introduce fb_ops_t
Hooks for fb acquire/release, page allocate, free, and flip.
This should encompass everything currently needed for the drm backend,
which will move behind this abstraction in a later commit.
Diffstat (limited to 'src')
-rw-r--r-- | src/fb.h | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -28,6 +28,15 @@ typedef struct fb_page_t { fb_fragment_t fragment; } fb_page_t; +/* Supply this struct to fb_new() with the appropriate context */ +typedef struct fb_ops_t { + int (*acquire)(void *context, void *page); + void (*release)(void *context); + void * (*page_alloc)(void *context, fb_page_t *res_page); + int (*page_free)(void *context, void *page); + int (*page_flip)(void *context, void *page); +} fb_ops_t; + typedef struct fb_t fb_t; fb_page_t * fb_page_get(fb_t *fb); |