mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-03-12 05:34:01 -04:00
wip: initial multithreaded renderer
This commit is contained in:
parent
d1b88f67e4
commit
c531795b83
8 changed files with 287 additions and 89 deletions
18
terminal.h
18
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 */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue