return -1;
}
+ weston_log("using %s\n", filename);
+
ec->drm.fd = fd;
ec->gbm = gbm_create_device(ec->drm.fd);
ec->base.display = eglGetDisplay(ec->gbm);
output->base.set_dpms = drm_set_dpms;
output->base.switch_mode = drm_output_switch_mode;
+ weston_log("kms connector %d, crtc %d at mode %dx%d@%.1f\n",
+ output->connector_id, output->crtc_id,
+ output->base.current->width,
+ output->base.current->height,
+ output->base.current->refresh / 1000.0);
+
return 0;
err_surface:
struct wl_event_loop *loop;
uint32_t key;
+ weston_log("initializing drm backend\n");
+
ec = malloc(sizeof *ec);
if (ec == NULL)
return NULL;
wl_list_insert(c->base.output_list.prev, &output->base.link);
+ weston_log("x11 output %dx%d, window id %d\n",
+ width, height, output->window);
+
return 0;
}
xcb_screen_iterator_t s;
int i, x;
+ weston_log("initializing x11 backend\n");
+
c = malloc(sizeof *c);
if (c == NULL)
return NULL;
#include <setjmp.h>
#include <sys/time.h>
#include <time.h>
+#include <ctype.h>
#include <wayland-server.h>
#include "compositor.h"
&compositor_interface, id, compositor);
}
+static void
+log_extensions(const char *name, const char *extensions)
+{
+ const char *p, *end;
+ int l;
+
+ l = weston_log("%s:", name);
+ p = extensions;
+ while (*p) {
+ end = strchrnul(p, ' ');
+ if (l + (end - p) > 78)
+ l = weston_log_continue("\n %.*s", end - p, p);
+ else
+ l += weston_log_continue(" %.*s", end - p, p);
+ for (p = end; isspace(*p); p++)
+ ;
+ }
+ weston_log_continue("\n");
+}
+
WL_EXPORT int
weston_compositor_init(struct weston_compositor *ec,
struct wl_display *display,
wl_display_init_shm(display);
+ weston_log("egl vendor: %s\n",
+ eglQueryString(ec->display, EGL_VENDOR));
+ log_extensions("egl extensions",
+ eglQueryString(ec->display, EGL_EXTENSIONS));
+
ec->image_target_texture_2d =
(void *) eglGetProcAddress("glEGLImageTargetTexture2DOES");
ec->image_target_renderbuffer_storage = (void *)
return -1;
}
+ log_extensions("gles2 extensions", extensions);
+
if (!strstr(extensions, "GL_EXT_texture_format_BGRA8888")) {
weston_log("GL_EXT_texture_format_BGRA8888 not available\n");
return -1;