aboutsummaryrefslogtreecommitdiff
path: root/terminal.h
diff options
context:
space:
mode:
authorDaniel Eklöf <daniel@ekloef.se>2019-07-29 18:13:26 +0000
committerDaniel Eklöf <daniel@ekloef.se>2019-07-29 18:13:26 +0000
commitc531795b8372eb0e69aa874476f3e96cd7c09dfc (patch)
tree56c2cc2ff9476038d81e34c4c186e7d6562103c8 /terminal.h
parentMerge branch 'use-freetype-to-render-glyphs' (diff)
wip: initial multithreaded renderer
Diffstat (limited to 'terminal.h')
-rw-r--r--terminal.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/terminal.h b/terminal.h
index 86b92d17..de359576 100644
--- a/terminal.h
+++ b/terminal.h
@@ -5,9 +5,11 @@
#include <stddef.h>
#include <threads.h>
+#include <semaphore.h>
#include <ft2build.h>
#include FT_FREETYPE_H
+#include FT_LCD_FILTER_H
#include <cairo.h>
#include <wayland-client.h>
@@ -211,6 +213,11 @@ struct glyph {
cairo_surface_t *surf;
int left;
int top;
+
+ int format;
+ int width;
+ int height;
+ int stride;
};
struct font {
@@ -341,6 +348,17 @@ struct terminal {
struct {
struct wl_callback *frame_callback;
+ struct {
+ size_t count;
+ sem_t start;
+ sem_t done;
+ cnd_t cond;
+ mtx_t lock;
+ tll(int) queue;
+ thrd_t *threads;
+ struct buffer *buf;
+ } workers;
+
/* Last rendered cursor position */
struct {
struct coord actual; /* Absolute */