pread.data_ptr = (long) data;
if (ioctl(ec->gem_fd, DRM_IOCTL_I915_GEM_PREAD, &pread)) {
- fprintf(stderr, "gem pread failed");
+ fprintf(stderr, "gem pread failed\n");
return;
}
EGLConfig configs[64];
EGLint major, minor, count;
struct egl_compositor *ec;
- int width, height;
+ const int width = 1024, height = 768;
ec = malloc(sizeof *ec);
if (ec == NULL)
ec->base.interface = &interface;
ec->wl_display = display;
- ec->display = eglCreateDisplay(gem_device, "i965");
+ ec->display = eglCreateDisplayNative(gem_device, "i965");
if (ec->display == NULL) {
fprintf(stderr, "failed to create display\n");
return NULL;
return NULL;
}
- ec->surface = eglGetFullscreenSurface(ec->display, configs[24], &width, &height);
+ ec->surface = eglCreateSurfaceNative(ec->display, configs[24],
+ 0, 0, width, height);
if (ec->surface == NULL) {
fprintf(stderr, "failed to create surface\n");
return NULL;