Cast fd's to intptr_t before casting to EGLNativeDisplay

Fixes warnings on 64bit.

Also use wlsc_compositor::destroy_image in compositor-openwfd.
dev
Benjamin Franzke 14 years ago committed by Kristian Høgsberg
parent 80492e220a
commit e5b3b2601c
  1. 2
      compositor/compositor-drm.c
  2. 4
      compositor/compositor-openwfd.c
  3. 2
      compositor/compositor.h

@ -264,7 +264,7 @@ init_egl(struct drm_compositor *ec, struct udev_device *device)
}
ec->drm.fd = fd;
ec->base.display = eglGetDisplay((EGLNativeDisplayType) ec->drm.fd);
ec->base.display = eglGetDisplay(FD_TO_EGL_NATIVE_DPY(ec->drm.fd));
if (ec->base.display == NULL) {
fprintf(stderr, "failed to create display\n");
return -1;

@ -116,7 +116,7 @@ init_egl(struct wfd_compositor *ec)
return -1;
ec->wfd_fd = fd;
ec->base.display = eglGetDRMDisplayMESA(ec->wfd_fd);
ec->base.display = eglGetDisplay(FD_TO_EGL_NATIVE_DPY(ec->wfd_fd));
if (ec->base.display == NULL) {
fprintf(stderr, "failed to create display\n");
return -1;
@ -374,7 +374,7 @@ destroy_output(struct wfd_output *output)
glDeleteRenderbuffers(2, output->rbo);
for (i = 0; i < 2; i++) {
eglDestroyImageKHR(ec->base.display, output->image[i]);
ec->base.destroy_image(ec->base.display, output->image[i]);
wfdDestroySource(ec->dev, output->source[i]);
}

@ -31,6 +31,8 @@
#define ARRAY_LENGTH(a) (sizeof (a) / sizeof (a)[0])
#define FD_TO_EGL_NATIVE_DPY(fd) ((EGLNativeDisplayType)(intptr_t)(fd))
struct wlsc_matrix {
GLfloat d[16];
};

Loading…
Cancel
Save