From 94176c8d7c39064719e56c5b7e23d8745b9bea87 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petar=20Kapri=C5=A1?= Date: Mon, 13 Oct 2025 21:11:44 +0200 Subject: [PATCH] Move threads array and the cairo surface --- visor.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/visor.c b/visor.c index c5527b1..ee2b43a 100644 --- a/visor.c +++ b/visor.c @@ -26,10 +26,6 @@ struct threadInfo { 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: * 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_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; unsigned char *pixmap; struct planeView {