summaryrefslogtreecommitdiffstats
path: root/gralloc_drm.h
diff options
context:
space:
mode:
Diffstat (limited to 'gralloc_drm.h')
-rw-r--r--gralloc_drm.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/gralloc_drm.h b/gralloc_drm.h
index 67f3598..3907dfd 100644
--- a/gralloc_drm.h
+++ b/gralloc_drm.h
@@ -69,9 +69,16 @@ static inline int gralloc_drm_get_bpp(int format)
}
struct gralloc_drm_bo_t *gralloc_drm_bo_create(struct gralloc_drm_t *drm, int width, int height, int format, int usage);
-struct gralloc_drm_bo_t *gralloc_drm_bo_validate(struct gralloc_drm_t *drm, buffer_handle_t handle);
void gralloc_drm_bo_destroy(struct gralloc_drm_bo_t *bo);
+struct gralloc_drm_bo_t *gralloc_drm_bo_register(struct gralloc_drm_t *drm, buffer_handle_t handle, int create);
+void gralloc_drm_bo_unregister(struct gralloc_drm_bo_t *bo);
+
+static inline struct gralloc_drm_bo_t *gralloc_drm_bo_validate(struct gralloc_drm_t *drm, buffer_handle_t handle)
+{
+ return gralloc_drm_bo_register(drm, handle, 0);
+}
+
int gralloc_drm_bo_map(struct gralloc_drm_bo_t *bo, int x, int y, int w, int h, int enable_write, void **addr);
void gralloc_drm_bo_unmap(struct gralloc_drm_bo_t *bo);
buffer_handle_t gralloc_drm_bo_get_handle(struct gralloc_drm_bo_t *bo, int *stride);