gbm: add gbm_bo_get_device() function
authorAnder Conselvan de Oliveira <ander.conselvan.de.oliveira@intel.com>
Mon, 30 Apr 2012 10:27:53 +0000 (13:27 +0300)
committerKristian Høgsberg <krh@bitplanet.net>
Mon, 30 Apr 2012 17:09:39 +0000 (13:09 -0400)
src/gbm/main/gbm.c
src/gbm/main/gbm.h

index 0b5b9ff..987e965 100644 (file)
@@ -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
index 16489f3..cf3d475 100644 (file)
@@ -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);