backend: automatically create allocator

Introduce a new backend_get_allocator function that automatically
creates an allocator for the backend if the backend has a renderer.
This commit is contained in:
Simon Ser 2021-04-28 23:39:36 +02:00 committed by Kenny Levinsen
parent bcabe34a2e
commit 4dae12890f
3 changed files with 26 additions and 0 deletions

View file

@ -29,6 +29,7 @@ struct wlr_backend {
// Private state
struct wlr_renderer *renderer;
struct wlr_allocator *allocator;
};
/**