mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2026-04-17 06:46:39 -04:00
render/allocator/gbm: add _with_drm_fd to create function name
Reserve wlr_gbm_allocator_create() for a potential future function which takes an already-existing gbm_device as input.
This commit is contained in:
parent
b992930ebe
commit
bf75706555
3 changed files with 3 additions and 3 deletions
|
|
@ -29,6 +29,6 @@ struct wlr_gbm_allocator {
|
|||
*
|
||||
* Takes ownership over the FD.
|
||||
*/
|
||||
struct wlr_allocator *wlr_gbm_allocator_create(int drm_fd);
|
||||
struct wlr_allocator *wlr_gbm_allocator_create_with_drm_fd(int drm_fd);
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -109,7 +109,7 @@ struct wlr_allocator *allocator_autocreate_with_drm_fd(
|
|||
if (gbm_fd < 0) {
|
||||
return NULL;
|
||||
}
|
||||
if ((alloc = wlr_gbm_allocator_create(gbm_fd)) != NULL) {
|
||||
if ((alloc = wlr_gbm_allocator_create_with_drm_fd(gbm_fd)) != NULL) {
|
||||
return alloc;
|
||||
}
|
||||
close(gbm_fd);
|
||||
|
|
|
|||
|
|
@ -192,7 +192,7 @@ static struct wlr_gbm_allocator *get_gbm_alloc_from_alloc(
|
|||
return alloc;
|
||||
}
|
||||
|
||||
struct wlr_allocator *wlr_gbm_allocator_create(int fd) {
|
||||
struct wlr_allocator *wlr_gbm_allocator_create_with_drm_fd(int fd) {
|
||||
uint64_t cap;
|
||||
if (drmGetCap(fd, DRM_CAP_PRIME, &cap) ||
|
||||
!(cap & DRM_PRIME_CAP_EXPORT)) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue