Lines Matching refs:gbm

44 #include "gbm.h"
48 /** Returns the file description for the gbm device
53 gbm_device_get_fd(struct gbm_device *gbm)
55 return gbm->fd;
58 /** Get the backend name for the given gbm device
64 gbm_device_get_backend_name(struct gbm_device *gbm)
66 return gbm->name;
71 * \param gbm The created buffer manager
82 gbm_device_is_format_supported(struct gbm_device *gbm,
85 return gbm->is_format_supported(gbm, format, usage);
90 * \param gbm The gbm device returned from gbm_create_device()
95 gbm_device_get_format_modifier_plane_count(struct gbm_device *gbm,
99 return gbm->get_format_modifier_plane_count(gbm, format, modifier);
102 /** Destroy the gbm device and free all resources associated with it.
104 * \param gbm The device created using gbm_create_device()
107 gbm_device_destroy(struct gbm_device *gbm)
109 gbm->refcount--;
110 if (gbm->refcount == 0)
111 gbm->destroy(gbm);
114 /** Create a gbm device for allocating buffers
129 struct gbm_device *gbm = NULL;
137 gbm = _gbm_create_device(fd);
138 if (gbm == NULL)
141 gbm->dummy = gbm_create_device;
142 gbm->stat = buf;
143 gbm->refcount = 1;
145 return gbm;
195 return bo->gbm->bo_get_stride(bo, plane);
289 return bo->gbm->bo_get_offset(bo, plane);
292 /** Get the gbm device used to create the buffer object
295 * \return Returns the gbm device with which the buffer object was created
300 return bo->gbm;
331 return bo->gbm->bo_get_fd(bo);
342 return bo->gbm->bo_get_planes(bo);
360 return bo->gbm->bo_get_handle(bo, plane);
379 return bo->gbm->bo_get_modifier(bo);
398 return bo->gbm->bo_write(bo, buf, count);
442 bo->gbm->bo_destroy(bo);
448 * \param gbm The gbm device returned from gbm_create_device()
462 gbm_bo_create(struct gbm_device *gbm,
471 return gbm->bo_create(gbm, width, height, format, usage, NULL, 0);
475 gbm_bo_create_with_modifiers(struct gbm_device *gbm,
491 return gbm->bo_create(gbm, width, height, format, 0, modifiers, count);
495 * Create a gbm buffer object from a foreign object
497 * This function imports a foreign object and creates a new gbm bo for it.
507 * The gbm bo shares the underlying pixels but its life-time is
510 * \param gbm The gbm device returned from gbm_create_device()
522 gbm_bo_import(struct gbm_device *gbm,
525 return gbm->bo_import(gbm, type, buffer, usage);
529 * Map a region of a gbm buffer object for cpu access
531 * This function maps a region of a gbm bo for cpu read and/or write
562 return bo->gbm->bo_map(bo, x, y, width, height,
567 * Unmap a previously mapped region of a gbm buffer object
569 * This function unmaps a region of a gbm bo for cpu read and/or write
578 bo->gbm->bo_unmap(bo, map_data);
584 * \param gbm The gbm device returned from gbm_create_device()
596 gbm_surface_create(struct gbm_device *gbm,
600 return gbm->surface_create(gbm, width, height, format, flags, NULL, 0);
604 gbm_surface_create_with_modifiers(struct gbm_device *gbm,
615 return gbm->surface_create(gbm, width, height, format, 0,
631 surf->gbm->surface_destroy(surf);
658 return surf->gbm->surface_lock_front_buffer(surf);
664 * Returns the underlying buffer to the gbm surface. Releasing a bo
676 surf->gbm->surface_release_buffer(surf, bo);
683 * available for rendering. Initially, a gbm surface will have a free
698 return surf->gbm->surface_has_free_buffers(surf);