Fall back to cairo image backend and shm surface if we don't have cairo gl

parent 6866856d
This diff is collapsed.
......@@ -138,6 +138,10 @@ window_schedule_redraw(struct window *window);
void
window_move(struct window *window, int32_t x, int32_t y);
void
window_damage(struct window *window, int32_t x, int32_t y,
int32_t width, int32_t height);
cairo_surface_t *
window_get_surface(struct window *window);
......@@ -149,6 +153,14 @@ window_copy_surface(struct window *window,
void
window_flush(struct window *window);
enum window_buffer_type {
WINDOW_BUFFER_TYPE_DRM,
WINDOW_BUFFER_TYPE_SHM,
};
void
window_set_buffer_type(struct window *window, enum window_buffer_type type);
void
window_set_fullscreen(struct window *window, int fullscreen);
......
......@@ -52,6 +52,12 @@ shm_buffer_attach(struct wl_buffer *buffer_base, struct wl_surface *surface)
(struct wlsc_shm_buffer *) buffer_base;
glBindTexture(GL_TEXTURE_2D, es->texture);
/* Unbind any EGLImage texture that may be bound, so we don't
* overwrite it.*/
glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA,
0, 0, 0, GL_BGRA_EXT, GL_UNSIGNED_BYTE, NULL);
glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA,
buffer->base.width, buffer->base.height, 0,
GL_BGRA_EXT, GL_UNSIGNED_BYTE, buffer->data);
......
......@@ -3,6 +3,7 @@ AM_INIT_AUTOMAKE([foreign dist-bzip2])
AC_PROG_CC
AC_PROG_LIBTOOL
AC_CONFIG_MACRO_DIR([m4])
AC_CONFIG_HEADERS([config.h])
AM_SILENT_RULES([yes])
PKG_PROG_PKG_CONFIG()
......@@ -10,8 +11,12 @@ PKG_CHECK_MODULES(FFI, [libffi])
PKG_CHECK_MODULES(COMPOSITOR,
[egl glesv2 gdk-pixbuf-2.0 libudev >= 136 libdrm >= 2.4.17] xcb-dri2 xcb-xfixes)
PKG_CHECK_MODULES(CLIENT, [egl gl cairo-gl gdk-pixbuf-2.0 glib-2.0 gobject-2.0 xkbcommon libdrm])
PKG_CHECK_MODULES(CLIENT, [egl gl cairo gdk-pixbuf-2.0 glib-2.0 gobject-2.0 xkbcommon libdrm])
PKG_CHECK_MODULES(POPPLER, [poppler-glib gdk-2.0])
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])])
if test $CC = gcc; then
GCC_CFLAGS="-Wall -g -Wstrict-prototypes -Wmissing-prototypes -fvisibility=hidden"
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment