+// TODO: uncomment when I find how to use intelfb instead of i915 GRRRR.-
+ fb_vblank vblank;
+ if(ioctl(dev_fd, FBIOGET_VBLANK, &vblank) == -1) {
+// fprintf(stderr, "FBIOGET_VBLANK error: %s\n", strerror(errno));
+ }
+/*
+ else {
+ printf("flags: %x\n", vblank.flags);
+ printf("count: %d\n", vblank.count);
+ printf("beam position: %d, %d\n", vblank.hcount, vblank.vcount);
+ }
+*/
+
+ if(!(gfx->pixmap = (Pixmap*)sh_malloc(sizeof(Pixmap)))) {
+ fprintf(stderr, "Failed to allocate pixmap.\n");
+ return false;
+ }
+
+ gfx->pixmap->width = gfx->screen_rect.width;
+ gfx->pixmap->height = gfx->screen_rect.height;
+
+ int fbsize = gfx->pixmap->width * gfx->pixmap->height * gfx->color_depth / 8;
+ if(!(gfx->pixmap->pixels = (unsigned char*)sh_malloc(fbsize))) {
+ fprintf(stderr, "failed to allocate the pixmap framebuffer.\n");
+ return false;
+ }
+