aboutsummaryrefslogtreecommitdiff
path: root/render
diff options
context:
space:
mode:
authorSimon Ser <contact@emersion.fr>2021-08-25 09:33:19 +0200
committerSimon Zeni <simon@bl4ckb0ne.ca>2021-08-25 09:57:20 -0400
commit3ce2ea9e16fcd1bfab4ec9d5994fa721c5d58dcd (patch)
tree1bce6445158968c4d73cd73be30c141468dbc84c /render
parentb37731cdbbef4dc52033c2d26b04d2329720fa07 (diff)
Move allocator stuff into new directory
Add render/allocator/ and include/render/allocator/ to hold everything allocator-related.
Diffstat (limited to 'render')
-rw-r--r--render/allocator/allocator.c (renamed from render/allocator.c)8
-rw-r--r--render/allocator/drm_dumb.c (renamed from render/drm_dumb_allocator.c)2
-rw-r--r--render/allocator/gbm.c (renamed from render/gbm_allocator.c)2
-rw-r--r--render/allocator/meson.build9
-rw-r--r--render/allocator/shm.c (renamed from render/shm_allocator.c)2
-rw-r--r--render/meson.build9
-rw-r--r--render/swapchain.c2
7 files changed, 19 insertions, 15 deletions
diff --git a/render/allocator.c b/render/allocator/allocator.c
index 5b7e27ff..8664202f 100644
--- a/render/allocator.c
+++ b/render/allocator/allocator.c
@@ -3,10 +3,10 @@
#include <wlr/util/log.h>
#include <xf86drm.h>
#include "backend/backend.h"
-#include "render/allocator.h"
-#include "render/gbm_allocator.h"
-#include "render/shm_allocator.h"
-#include "render/drm_dumb_allocator.h"
+#include "render/allocator/allocator.h"
+#include "render/allocator/drm_dumb.h"
+#include "render/allocator/gbm.h"
+#include "render/allocator/shm.h"
#include "render/wlr_renderer.h"
void wlr_allocator_init(struct wlr_allocator *alloc,
diff --git a/render/drm_dumb_allocator.c b/render/allocator/drm_dumb.c
index c0038dff..a47df624 100644
--- a/render/drm_dumb_allocator.c
+++ b/render/allocator/drm_dumb.c
@@ -13,7 +13,7 @@
#include <wlr/backend.h>
#include <wlr/backend/session.h>
-#include "render/drm_dumb_allocator.h"
+#include "render/allocator/drm_dumb.h"
#include "render/pixel_format.h"
static const struct wlr_buffer_impl buffer_impl;
diff --git a/render/gbm_allocator.c b/render/allocator/gbm.c
index 154e5137..ace7ca68 100644
--- a/render/gbm_allocator.c
+++ b/render/allocator/gbm.c
@@ -6,7 +6,7 @@
#include <unistd.h>
#include <wlr/util/log.h>
#include <xf86drm.h>
-#include "render/gbm_allocator.h"
+#include "render/allocator/gbm.h"
static const struct wlr_buffer_impl buffer_impl;
diff --git a/render/allocator/meson.build b/render/allocator/meson.build
new file mode 100644
index 00000000..db17ccb2
--- /dev/null
+++ b/render/allocator/meson.build
@@ -0,0 +1,9 @@
+wlr_files += files(
+ 'allocator.c',
+ 'gbm.c',
+ 'shm.c',
+ 'drm_dumb.c',
+)
+
+has = cc.has_function('gbm_bo_get_fd_for_plane', dependencies: [gbm])
+add_project_arguments('-DHAS_GBM_BO_GET_FD_FOR_PLANE=@0@'.format(has.to_int()), language: 'c')
diff --git a/render/shm_allocator.c b/render/allocator/shm.c
index 1797433f..7b32cf8d 100644
--- a/render/shm_allocator.c
+++ b/render/allocator/shm.c
@@ -5,7 +5,7 @@
#include <unistd.h>
#include <wlr/util/log.h>
#include "render/pixel_format.h"
-#include "render/shm_allocator.h"
+#include "render/allocator/shm.h"
#include "util/shm.h"
static const struct wlr_buffer_impl buffer_impl;
diff --git a/render/meson.build b/render/meson.build
index 8c1793f1..b35ba7c9 100644
--- a/render/meson.build
+++ b/render/meson.build
@@ -6,21 +6,14 @@ elif 'auto' in renderers and get_option('auto_features').disabled()
endif
wlr_files += files(
- 'allocator.c',
'dmabuf.c',
'drm_format_set.c',
- 'gbm_allocator.c',
'pixel_format.c',
- 'shm_allocator.c',
'swapchain.c',
'wlr_renderer.c',
'wlr_texture.c',
- 'drm_dumb_allocator.c',
)
-has = cc.has_function('gbm_bo_get_fd_for_plane', dependencies: [gbm])
-add_project_arguments('-DHAS_GBM_BO_GET_FD_FOR_PLANE=@0@'.format(has.to_int()), language: 'c')
-
egl = dependency('egl', required: 'gles2' in renderers)
if egl.found()
wlr_deps += egl
@@ -32,3 +25,5 @@ if 'gles2' in renderers or 'auto' in renderers
endif
subdir('pixman')
+
+subdir('allocator')
diff --git a/render/swapchain.c b/render/swapchain.c
index fd9f8725..8d3b55f0 100644
--- a/render/swapchain.c
+++ b/render/swapchain.c
@@ -2,7 +2,7 @@
#include <stdlib.h>
#include <wlr/util/log.h>
#include <wlr/types/wlr_buffer.h>
-#include "render/allocator.h"
+#include "render/allocator/allocator.h"
#include "render/drm_format_set.h"
#include "render/swapchain.h"