mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2025-10-29 05:40:12 -04:00
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:
parent
bcabe34a2e
commit
4dae12890f
3 changed files with 26 additions and 0 deletions
|
|
@ -10,4 +10,10 @@
|
|||
*/
|
||||
uint32_t backend_get_buffer_caps(struct wlr_backend *backend);
|
||||
|
||||
/**
|
||||
* Get the backend's allocator. Automatically creates the allocator if
|
||||
* necessary.
|
||||
*/
|
||||
struct wlr_allocator *backend_get_allocator(struct wlr_backend *backend);
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -29,6 +29,7 @@ struct wlr_backend {
|
|||
// Private state
|
||||
|
||||
struct wlr_renderer *renderer;
|
||||
struct wlr_allocator *allocator;
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue