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->v0.fd;
58 /** Get the backend name for the given gbm device
64 gbm_device_get_backend_name(struct gbm_device *gbm)
66 return gbm->v0.name;
71 * \param gbm The created buffer manager
82 gbm_device_is_format_supported(struct gbm_device *gbm,
85 return gbm->v0.is_format_supported(gbm, format, flags);
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->v0.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_device_destroy(gbm);
112 /** Create a gbm device for allocating buffers
127 struct gbm_device *gbm = NULL;
135 gbm = _gbm_create_device(fd);
136 if (gbm == NULL)
139 gbm->dummy = gbm_create_device;
141 return gbm;
191 return bo->gbm->v0.bo_get_stride(bo, plane);
288 return bo->gbm->v0.bo_get_offset(bo, plane);
291 /** Get the gbm device used to create the buffer object
294 * \return Returns the gbm device with which the buffer object was created
299 return bo->gbm;
330 return bo->gbm->v0.bo_get_fd(bo);
341 return bo->gbm->v0.bo_get_planes(bo);
359 return bo->gbm->v0.bo_get_handle(bo, plane);
379 return bo->gbm->v0.bo_get_plane_fd(bo, plane);
398 return bo->gbm->v0.bo_get_modifier(bo);
417 return bo->gbm->v0.bo_write(bo, buf, count);
461 bo->gbm->v0.bo_destroy(bo);
467 * \param gbm The gbm device returned from gbm_create_device()
481 gbm_bo_create(struct gbm_device *gbm,
490 return gbm->v0.bo_create(gbm, width, height, format, flags, NULL, 0);
494 gbm_bo_create_with_modifiers(struct gbm_device *gbm,
510 if (gbm->v0.backend_version >= 1) {
514 return gbm_bo_create_with_modifiers2(gbm, width, height, format, modifiers,
519 gbm_bo_create_with_modifiers2(struct gbm_device *gbm,
541 return gbm->v0.bo_create(gbm, width, height, format, flags, modifiers, count);
545 * Create a gbm buffer object from a foreign object
547 * This function imports a foreign object and creates a new gbm bo for it.
557 * The gbm bo shares the underlying pixels but its life-time is
560 * \param gbm The gbm device returned from gbm_create_device()
572 gbm_bo_import(struct gbm_device *gbm,
575 return gbm->v0.bo_import(gbm, type, buffer, flags);
579 * Map a region of a gbm buffer object for cpu access
581 * This function maps a region of a gbm bo for cpu read and/or write
617 return bo->gbm->v0.bo_map(bo, x, y, width, height,
622 * Unmap a previously mapped region of a gbm buffer object
624 * This function unmaps a region of a gbm bo for cpu read and/or write
633 bo->gbm->v0.bo_unmap(bo, map_data);
639 * \param gbm The gbm device returned from gbm_create_device()
651 gbm_surface_create(struct gbm_device *gbm,
655 return gbm->v0.surface_create(gbm, width, height, format, flags, NULL, 0);
659 gbm_surface_create_with_modifiers(struct gbm_device *gbm,
675 if (gbm->v0.backend_version >= 1) {
679 return gbm_surface_create_with_modifiers2(gbm, width, height, format,
685 gbm_surface_create_with_modifiers2(struct gbm_device *gbm,
702 return gbm->v0.surface_create(gbm, width, height, format, flags,
718 surf->gbm->v0.surface_destroy(surf);
745 return surf->gbm->v0.surface_lock_front_buffer(surf);
751 * Returns the underlying buffer to the gbm surface. Releasing a bo
763 surf->gbm->v0.surface_release_buffer(surf, bo);
770 * available for rendering. Initially, a gbm surface will have a free
785 return surf->gbm->v0.surface_has_free_buffers(surf);