Check for cairo-egl instead of just cairo-gl
authorKristian Høgsberg <krh@bitplanet.net>
Fri, 14 Jan 2011 22:41:33 +0000 (17:41 -0500)
committerKristian Høgsberg <krh@bitplanet.net>
Fri, 14 Jan 2011 22:42:50 +0000 (17:42 -0500)
clients/gears.c
clients/window.c
clients/window.h
configure.ac

index b8e6cca..f2eae9c 100644 (file)
@@ -212,7 +212,7 @@ allocate_buffer(struct gears *gears)
        window_draw(gears->window);
 
        gears->surface[gears->current] = window_get_surface(gears->window);
-#ifdef HAVE_CAIRO_GL
+#ifdef HAVE_CAIRO_EGL
        image = display_get_image_for_drm_surface(gears->display,
                                                  gears->surface[gears->current]);
 #else /* XXX: hack to make Wayland compile, even if this example doesn't run */
index efd8fa4..84d0418 100644 (file)
@@ -43,7 +43,7 @@
 #include <EGL/egl.h>
 #include <EGL/eglext.h>
 
-#ifdef HAVE_CAIRO_GL
+#ifdef HAVE_CAIRO_EGL
 #include <cairo-gl.h>
 #endif
 
@@ -181,7 +181,7 @@ struct surface_data {
 #define MULT(_d,c,a,t) \
        do { t = c * a + 0x7f; _d = ((t >> 8) + t) >> 8; } while (0)
 
-#ifdef HAVE_CAIRO_GL
+#ifdef HAVE_CAIRO_EGL
 
 struct drm_surface_data {
        struct surface_data data;
@@ -469,7 +469,7 @@ cairo_surface_t *
 display_create_surface(struct display *display,
                       struct rectangle *rectangle)
 {
-#ifdef HAVE_CAIRO_GL
+#ifdef HAVE_CAIRO_EGL
        if (display->drm) {
                return display_create_drm_surface(display, rectangle);
        }
@@ -482,7 +482,7 @@ display_create_surface_from_file(struct display *display,
                                 const char *filename,
                                 struct rectangle *rectangle)
 {
-#ifdef HAVE_CAIRO_GL
+#ifdef HAVE_CAIRO_EGL
        if (display->drm) {
                return display_create_drm_surface_from_file(display, filename, rectangle);
        }
@@ -536,7 +536,7 @@ display_get_pointer_surface(struct display *display, int pointer,
        cairo_surface_t *surface;
 
        surface = display->pointer_surfaces[pointer];
-#if HAVE_CAIRO_GL
+#if HAVE_CAIRO_EGL
        *width = cairo_gl_surface_get_width(surface);
        *height = cairo_gl_surface_get_height(surface);
 #else
@@ -630,7 +630,7 @@ window_create_surface(struct window *window)
        cairo_surface_t *surface;
 
        switch (window->buffer_type) {
-#ifdef HAVE_CAIRO_GL
+#ifdef HAVE_CAIRO_EGL
        case WINDOW_BUFFER_TYPE_DRM:
                surface = display_create_surface(window->display,
                                                 &window->allocation);
@@ -1439,7 +1439,7 @@ init_drm(struct display *d)
                return -1;
        }
 
-#ifdef HAVE_CAIRO_GL
+#ifdef HAVE_CAIRO_EGL
        d->device = cairo_egl_device_create(d->dpy, d->ctx);
        if (d->device == NULL) {
                fprintf(stderr, "failed to get cairo drm device\n");
index e775127..2709917 100644 (file)
@@ -51,7 +51,7 @@ display_get_compositor(struct display *display);
 EGLDisplay
 display_get_egl_display(struct display *d);
 
-#ifdef HAVE_CAIRO_GL
+#ifdef HAVE_CAIRO_EGL
 EGLImageKHR
 display_get_image_for_drm_surface(struct display *display,
                                  cairo_surface_t *surface);
index e3c3336..8ff535f 100644 (file)
@@ -54,10 +54,10 @@ if test x$enable_wayland_compositor == xyes; then
 fi
 
 
-PKG_CHECK_MODULES(CAIRO_GL, [cairo-gl],
-                 [have_cairo_gl=yes], [have_cairo_gl=no])
-AS_IF([test "x$have_cairo_gl" = "xyes"],
-      [AC_DEFINE([HAVE_CAIRO_GL], [1], [Have cairo-gl])])
+PKG_CHECK_MODULES(CAIRO_EGL, [cairo-egl],
+                 [have_cairo_egl=yes], [have_cairo_egl=no])
+AS_IF([test "x$have_cairo_egl" = "xyes"],
+      [AC_DEFINE([HAVE_CAIRO_EGL], [1], [Have cairo-egl])])
 
 if test $CC = gcc; then
        GCC_CFLAGS="-Wall -g -Wstrict-prototypes -Wmissing-prototypes -fvisibility=hidden"