diff options
author | Chia-I Wu <olvaffe@gmail.com> | 2011-07-31 16:35:21 +0900 |
---|---|---|
committer | Chia-I Wu <olvaffe@gmail.com> | 2011-07-31 17:59:01 +0900 |
commit | 8542de3915e6b8a88232a1f0f991a425e9289a96 (patch) | |
tree | aeadde9fb536352611dbd151300c8cfb8e5b4b33 /gralloc_drm.h | |
parent | d5c39c961b11b314b6d13e79036e740cdefee67b (diff) | |
download | external_drm_gralloc-8542de3915e6b8a88232a1f0f991a425e9289a96.zip external_drm_gralloc-8542de3915e6b8a88232a1f0f991a425e9289a96.tar.gz external_drm_gralloc-8542de3915e6b8a88232a1f0f991a425e9289a96.tar.bz2 |
revise gralloc_drm bo interface
Make it more intuitive to use.
Diffstat (limited to 'gralloc_drm.h')
-rw-r--r-- | gralloc_drm.h | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/gralloc_drm.h b/gralloc_drm.h index 6d3aa1f..b9c0de8 100644 --- a/gralloc_drm.h +++ b/gralloc_drm.h @@ -71,20 +71,17 @@ static inline int gralloc_drm_get_bpp(int format) return bpp; } +int gralloc_drm_handle_register(buffer_handle_t handle, struct gralloc_drm_t *drm); +int gralloc_drm_handle_unregister(buffer_handle_t handle); + struct gralloc_drm_bo_t *gralloc_drm_bo_create(struct gralloc_drm_t *drm, int width, int height, int format, int usage); 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); -} +struct gralloc_drm_bo_t *gralloc_drm_bo_from_handle(buffer_handle_t handle); +buffer_handle_t gralloc_drm_bo_get_handle(struct gralloc_drm_bo_t *bo, int *stride); int gralloc_drm_bo_lock(struct gralloc_drm_bo_t *bo, int x, int y, int w, int h, int enable_write, void **addr); void gralloc_drm_bo_unlock(struct gralloc_drm_bo_t *bo); -buffer_handle_t gralloc_drm_bo_get_handle(struct gralloc_drm_bo_t *bo, int *stride); int gralloc_drm_bo_need_fb(const struct gralloc_drm_bo_t *bo); int gralloc_drm_bo_add_fb(struct gralloc_drm_bo_t *bo); |