render to image surface

This commit is contained in:
Florian Stecker
2018-08-18 18:27:33 +02:00
parent c3deff6d64
commit 000d8a53b9
3 changed files with 107 additions and 52 deletions

View File

@@ -12,6 +12,10 @@
#include <cairo.h>
#include <cairo-xlib.h>
#define STATUS_NOTHING 0
#define STATUS_REDRAW 1
#define STATUS_QUIT 2
typedef struct {
cairo_t *cairo;
cairo_matrix_t matrix;
@@ -33,6 +37,11 @@ typedef struct {
Atom wm_protocols;
Atom wm_delete_window;
cairo_surface_t *surface;
cairo_t *front_context;
cairo_surface_t *buffer_surface;
unsigned char *buffer;
struct timeval start_time;
unsigned long frames;
double elapsed, frametime;