Merge remote branch 'nobled/fixes2'

dev
Kristian Høgsberg 14 years ago
commit 4e63c6313b
  1. 7
      clients/gears.c
  2. 5
      clients/window.c
  3. 2
      clients/window.h

@ -222,10 +222,13 @@ allocate_buffer(struct gears *gears)
window_draw(gears->window); window_draw(gears->window);
gears->surface[gears->current] = window_get_surface(gears->window); gears->surface[gears->current] = window_get_surface(gears->window);
#ifdef HAVE_CAIRO_GL
image = display_get_image_for_drm_surface(gears->display, image = display_get_image_for_drm_surface(gears->display,
gears->surface[gears->current]); gears->surface[gears->current]);
#else /* XXX: hack to make Wayland compile, even if this example doesn't run */
die("gears cannot allocate buffer: it was compiled without cairo-gl");
return;
#endif
if (!eglMakeCurrent(gears->display, NULL, NULL, gears->context)) if (!eglMakeCurrent(gears->display, NULL, NULL, gears->context))
die("faile to make context current\n"); die("faile to make context current\n");

@ -536,8 +536,13 @@ display_get_pointer_surface(struct display *display, int pointer,
cairo_surface_t *surface; cairo_surface_t *surface;
surface = display->pointer_surfaces[pointer]; surface = display->pointer_surfaces[pointer];
#if HAVE_CAIRO_GL
*width = cairo_gl_surface_get_width(surface); *width = cairo_gl_surface_get_width(surface);
*height = cairo_gl_surface_get_height(surface); *height = cairo_gl_surface_get_height(surface);
#else
*width = cairo_image_surface_get_width(surface);
*height = cairo_image_surface_get_height(surface);
#endif
*hotspot_x = pointer_images[pointer].hotspot_x; *hotspot_x = pointer_images[pointer].hotspot_x;
*hotspot_y = pointer_images[pointer].hotspot_y; *hotspot_y = pointer_images[pointer].hotspot_y;

@ -51,10 +51,12 @@ display_get_compositor(struct display *display);
EGLDisplay EGLDisplay
display_get_egl_display(struct display *d); display_get_egl_display(struct display *d);
#ifdef HAVE_CAIRO_GL
EGLImageKHR EGLImageKHR
display_get_image_for_drm_surface(struct display *display, display_get_image_for_drm_surface(struct display *display,
cairo_surface_t *surface); cairo_surface_t *surface);
#endif #endif
#endif
cairo_surface_t * cairo_surface_t *
display_create_surface(struct display *display, display_create_surface(struct display *display,

Loading…
Cancel
Save