Navigation Menu

Skip to content

Commit

Permalink
gbm: add gbm_bo_get_device() function
Browse files Browse the repository at this point in the history
  • Loading branch information
Ander Conselvan de Oliveira authored and krh committed Apr 30, 2012
1 parent 55aab92 commit 6c84f29
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/gbm/main/gbm.c
Expand Up @@ -231,6 +231,17 @@ gbm_bo_get_handle(struct gbm_bo *bo)
return bo->handle;
}

/** Get the gbm device used to create the buffer object
*
* \param bo The buffer object
* \return Returns the gbm device with which the buffer object was created
*/
GBM_EXPORT struct gbm_device *
gbm_bo_get_device(struct gbm_bo *bo)
{
return bo->gbm;
}

/** Set the user data associated with a buffer object
*
* \param bo The buffer object
Expand Down
3 changes: 3 additions & 0 deletions src/gbm/main/gbm.h
Expand Up @@ -242,6 +242,9 @@ gbm_bo_get_pitch(struct gbm_bo *bo);
uint32_t
gbm_bo_get_format(struct gbm_bo *bo);

struct gbm_device *
gbm_bo_get_device(struct gbm_bo *bo);

union gbm_bo_handle
gbm_bo_get_handle(struct gbm_bo *bo);

Expand Down

0 comments on commit 6c84f29

Please sign in to comment.