aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--shm.c7
-rw-r--r--shm.h1
2 files changed, 8 insertions, 0 deletions
diff --git a/shm.c b/shm.c
index b9cc325c..59dcb2ac 100644
--- a/shm.c
+++ b/shm.c
@@ -281,8 +281,15 @@ shm_fini(void)
}
bool
+shm_can_scroll(void)
+{
+ return can_punch_hole;
+}
+
+bool
shm_scroll(struct wl_shm *shm, struct buffer *buf, int rows)
{
+ assert(can_punch_hole);
assert(buf->busy);
assert(buf->pix);
assert(buf->wl_buf);
diff --git a/shm.h b/shm.h
index 2b3a9b19..6801ed93 100644
--- a/shm.h
+++ b/shm.h
@@ -32,6 +32,7 @@ struct buffer *shm_get_buffer(
struct wl_shm *shm, int width, int height, unsigned long cookie);
void shm_fini(void);
+bool shm_can_scroll(void);
bool shm_scroll(struct wl_shm *shm, struct buffer *buf, int rows);
void shm_purge(struct wl_shm *shm, unsigned long cookie);