#include <xcb/shm.h>
#include <xcb/xcb_aux.h>
#include <xcb/xcb_image.h>
+#define XCB_ALL_PLANES ~0
#include <xcb/xcb_icccm.h>
/* some defines for the flame */
}
}
xcb_image_put (f->xcb.c, f->xcb.draw, f->xcb.gc, image,
- 0, 0, 0, 0, BG_W, BG_H);
+ 0, 0, 0);
xcb_image_destroy (image);
}
#include <xcb/shm.h>
#include <xcb/xcb_aux.h>
#include <xcb/xcb_image.h>
+#define XCB_ALL_PLANES ~0
#include "julia.h"
}
xcb_image_put (datap->conn, datap->draw, datap->gc, datap->image,
- 0, 0, 0, 0, W_W, W_H);
+ 0, 0, 0);
}
int
#include <xcb/shm.h>
#include <xcb/xcb_aux.h>
#include <xcb/xcb_image.h>
+#define XCB_ALL_PLANES ~0
#include "lissajoux.h"
else
{
xcb_image_put (datap->conn, datap->draw, datap->gc, datap->image,
- 0, 0, 0, 0, W_W, W_H);
+ 0, 0, 0);
xcb_image_destroy (datap->image);
}
}
printf("FRAME COUNT..: %i frames\n", loop_count);
printf("TIME.........: %3.3f seconds\n", t);
printf("AVERAGE FPS..: %3.3f fps\n", (double)loop_count / t);
- if (do_shm)
- xcb_image_shm_destroy (datap->image);
xcb_disconnect (datap->conn);
exit(0);
}
format = rep->pixmap_format;
else
format = 0;
- datap->image = xcb_image_shm_create (datap->conn, datap->depth,
- format, NULL, W_W, W_H);
+ datap->image = xcb_image_create_native (datap->conn, W_W, W_H,
+ format, datap->depth, NULL, ~0, NULL);
assert(datap->image);
shminfo.shmid = shmget (IPC_PRIVATE,
- datap->image->bytes_per_line*datap->image->height,
+ datap->image->stride*datap->image->height,
IPC_CREAT | 0777);
assert(shminfo.shmid != -1);
shminfo.shmaddr = shmat (shminfo.shmid, 0, 0);