{
struct display *display = window->display;
struct wl_buffer *buffer;
+#ifdef HAVE_CAIRO_EGL
struct egl_window_surface_data *data;
+#endif
int32_t x, y;
switch (window->buffer_type) {
+#ifdef HAVE_CAIRO_EGL
case WINDOW_BUFFER_TYPE_EGL_WINDOW:
data = cairo_surface_get_user_data(window->cairo_surface,
&surface_data_key);
&window->server_allocation.height);
break;
case WINDOW_BUFFER_TYPE_EGL_IMAGE:
+#endif
case WINDOW_BUFFER_TYPE_SHM:
window_get_resize_dx_dy(window, &x, &y);
wl_display_sync_callback(display->display, free_surface,
window);
break;
+ default:
+ return;
}
if (window->fullscreen)
window->cairo_surface = surface;
}
+#ifdef HAVE_CAIRO_EGL
static void
window_resize_cairo_window_surface(struct window *window)
{
window->allocation.width,
window->allocation.height);
}
+#endif
void
window_create_surface(struct window *window)
window->transparent = 1;
if (display->dpy)
+#ifdef HAVE_CAIRO_EGL
/* FIXME: make TYPE_EGL_IMAGE choosable for testing */
window->buffer_type = WINDOW_BUFFER_TYPE_EGL_WINDOW;
+#else
+ window->buffer_type = WINDOW_BUFFER_TYPE_SHM;
+#endif
else
window->buffer_type = WINDOW_BUFFER_TYPE_SHM;
struct window *window,
EGLContext ctx)
{
+#ifdef HAVE_CAIRO_EGL
struct egl_window_surface_data *data;
if (!window->cairo_surface)
cairo_device_acquire(display->device);
if (!eglMakeCurrent(display->dpy, data->surf, data->surf, ctx))
fprintf(stderr, "failed to make surface current\n");
+#endif
}
void
PKG_CHECK_MODULES(CAIRO_EGL, [cairo-egl >= 1.11.3],
[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])])
+ [AC_DEFINE([HAVE_CAIRO_EGL], [1], [Have cairo-egl])],
+ [AC_MSG_WARN([Cairo-EGL not found - clients will use cairo image])])
fi
AM_CONDITIONAL(HAVE_POPPLER, test "x$have_poppler" = "xyes")