/** Format of the allocated buffer */
enum gbm_bo_format {
/** RGB with 8 bits per channel in a 32 bit value */
- GBM_BO_FORMAT_XRGB8888,
+ GBM_BO_FORMAT_XRGB8888,
/** ARGB with 8 bits per channel in a 32 bit value */
GBM_BO_FORMAT_ARGB8888
};
*/
GBM_BO_USE_RENDERING = (1 << 2),
/**
- * Buffer can be used for gbm_bo_write. This is guaranteed to work
- * with GBM_BO_USE_CURSOR. but may not work for other combinations.
+ * Deprecated
*/
GBM_BO_USE_WRITE = (1 << 3),
+ /**
+ * Buffer is guaranteed to be laid out linearly in memory. That is, the
+ * buffer is laid out as an array with 'height' blocks, each block with
+ * length 'stride'. Each stride is in the same order as the rows of the
+ * buffer.
+ */
+ GBM_BO_USE_LINEAR = (1 << 4),
};
int
int
gbm_bo_get_fd(struct gbm_bo *bo);
+size_t
+gbm_bo_get_num_planes(struct gbm_bo *bo);
+
+union gbm_bo_handle
+gbm_bo_get_plane_handle(struct gbm_bo *bo, size_t plane);
+
int
-gbm_bo_write(struct gbm_bo *bo, const void *buf, size_t count);
+gbm_bo_get_plane_fd(struct gbm_bo *bo, size_t plane);
+
+uint32_t
+gbm_bo_get_plane_offset(struct gbm_bo *bo, size_t plane);
+
+uint32_t
+gbm_bo_get_plane_size(struct gbm_bo *bo, size_t plane);
+
+uint32_t
+gbm_bo_get_plane_stride(struct gbm_bo *bo, size_t plane);
void
gbm_bo_set_user_data(struct gbm_bo *bo, void *data,