mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2026-04-17 06:46:39 -04:00
render/allocator: add DMA-BUF heap allocator
This commit is contained in:
parent
ab118042ea
commit
aa6d72f904
5 changed files with 156 additions and 2 deletions
24
include/render/allocator/dma_heap.h
Normal file
24
include/render/allocator/dma_heap.h
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
#ifndef RENDER_ALLOCATOR_DMA_HEAP_H
|
||||
#define RENDER_ALLOCATOR_DMA_HEAP_H
|
||||
|
||||
#include <wlr/types/wlr_buffer.h>
|
||||
#include "render/allocator/allocator.h"
|
||||
|
||||
struct wlr_dma_heap_buffer {
|
||||
struct wlr_buffer base;
|
||||
struct wlr_dmabuf_attributes dmabuf;
|
||||
};
|
||||
|
||||
struct wlr_dma_heap_allocator {
|
||||
struct wlr_allocator base;
|
||||
int fd;
|
||||
};
|
||||
|
||||
/**
|
||||
* Create a new DMA-BUF heap memory allocator.
|
||||
*
|
||||
* Takes ownership over the FD.
|
||||
*/
|
||||
struct wlr_allocator *wlr_dma_heap_allocator_create(int heap_fd);
|
||||
|
||||
#endif
|
||||
Loading…
Add table
Add a link
Reference in a new issue