wip: initial multithreaded renderer

This commit is contained in:
Daniel Eklöf 2019-07-29 20:13:26 +02:00
parent d1b88f67e4
commit c531795b83
No known key found for this signature in database
GPG key ID: 5BBD4992C116573F
8 changed files with 287 additions and 89 deletions

View file

@ -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 */