blob: c0ebb11726c307c04652cfc76ba3d0ab9c4cde7b [file] [edit]
From b35737e5840e5327bfba5253250b7e193f4fd5d0 Mon Sep 17 00:00:00 2001
From: David Reveman <reveman@chromium.org>
Date: Sat, 4 Nov 2017 14:51:56 +0000
Subject: [PATCH] wayland cursor pre allocate 2mb
---
cursor/wayland-cursor.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/cursor/wayland-cursor.c b/cursor/wayland-cursor.c
index d40c5c8..631f175 100644
--- a/cursor/wayland-cursor.c
+++ b/cursor/wayland-cursor.c
@@ -57,6 +57,9 @@ shm_pool_create(struct wl_shm *shm, int size)
if (!pool)
return NULL;
+#define MIN_SIZE (2 * 1024 * 1024)
+ size = size < MIN_SIZE ? MIN_SIZE : size;
+
pool->fd = os_create_anonymous_file(size);
if (pool->fd < 0)
goto err_free;
--
2.11.0