Move threads array and the cairo surface

This commit is contained in:
Petar Kapriš 2025-10-13 21:11:44 +02:00
parent 7f73925769
commit 94176c8d7c

10
visor.c
View file

@ -26,10 +26,6 @@ struct threadInfo {
bool complete; // marks if the drawing that it was supposed to bool complete; // marks if the drawing that it was supposed to
}; };
struct threadInfo threads[MAX_THREADS]; // this will store an array with status info for all the threads
cairo_surface_t *surface = NULL;
/* /*
* Concurrency model explained: * Concurrency model explained:
* One reader thread (the GUI thread) of the pixel buffer, along with many * One reader thread (the GUI thread) of the pixel buffer, along with many
@ -45,6 +41,12 @@ cairo_surface_t *surface = NULL;
pthread_mutex_t pixmapMutex; pthread_mutex_t pixmapMutex;
pthread_cond_t pixmapCond; pthread_cond_t pixmapCond;
struct threadInfo threads[MAX_THREADS];
// this will store an array with status info for all the threads
cairo_surface_t *surface = NULL;
bool pixmapAvailable = false; bool pixmapAvailable = false;
unsigned char *pixmap; unsigned char *pixmap;
struct planeView { struct planeView {