mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2025-10-31 22:25:21 -04:00
render/shm_allocator: make wlr_shm_allocator_create return a wlr_allocator
This commit is contained in:
parent
c75aa71816
commit
a8c91fbac9
4 changed files with 12 additions and 15 deletions
|
|
@ -98,12 +98,13 @@ static const struct wlr_allocator_interface allocator_impl = {
|
|||
.create_buffer = allocator_create_buffer,
|
||||
};
|
||||
|
||||
struct wlr_shm_allocator *wlr_shm_allocator_create(void) {
|
||||
struct wlr_allocator *wlr_shm_allocator_create(void) {
|
||||
struct wlr_shm_allocator *allocator = calloc(1, sizeof(*allocator));
|
||||
if (allocator == NULL) {
|
||||
return NULL;
|
||||
}
|
||||
wlr_allocator_init(&allocator->base, &allocator_impl);
|
||||
|
||||
return allocator;
|
||||
wlr_log(WLR_DEBUG, "Created shm allocator");
|
||||
return &allocator->base;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue