diff options
author | Ander Conselvan de Oliveira <[email protected]> | 2012-01-25 16:24:14 +0200 |
---|---|---|
committer | Kristian Høgsberg <[email protected]> | 2012-03-28 22:14:34 -0400 |
commit | 0d1ef1f57f9011fd2bc3354d60fb19db29af7363 (patch) | |
tree | 101590eab7d5ee8654d093393431983974c85ee5 /src/gbm/main/gbm.h | |
parent | 7f16246acef4089570abca76a59580691ec6cf68 (diff) |
gbm: Add gbm_surface interface
The idea here is to be able to create an egl window surface from a
gbm_surface. This avoids the need for the surfaceless extension and
lets the EGL platform handle buffer allocation, while keeping the user
in charge of somehow presenting the buffers (using kms page flipping,
for example).
gbm_surface_lock_front_buffer() locks a surface's front buffer and
returns a gbm bo representing it. This bo should later be returned
to the gbm surface using gbm_surface_release_buffer().
Diffstat (limited to 'src/gbm/main/gbm.h')
-rw-r--r-- | src/gbm/main/gbm.h | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/gbm/main/gbm.h b/src/gbm/main/gbm.h index ecebf11f7b9..6748752d8f1 100644 --- a/src/gbm/main/gbm.h +++ b/src/gbm/main/gbm.h @@ -44,6 +44,7 @@ extern "C" { struct gbm_device; struct gbm_bo; +struct gbm_surface; /** * \mainpage The Generic Buffer Manager @@ -247,6 +248,23 @@ gbm_bo_get_handle(struct gbm_bo *bo); void gbm_bo_destroy(struct gbm_bo *bo); +struct gbm_surface * +gbm_surface_create(struct gbm_device *gbm, + uint32_t width, uint32_t height, + uint32_t format, uint32_t flags); + +struct gbm_bo * +gbm_surface_lock_front_buffer(struct gbm_surface *surface); + +void +gbm_surface_release_buffer(struct gbm_surface *surface, struct gbm_bo *bo); + +int +gbm_surface_has_free_buffers(struct gbm_surface *surface); + +void +gbm_surface_destroy(struct gbm_surface *surface); + #ifdef __cplusplus } #endif |