screenshoter: don't use hardcoded bpp value

Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com>
screenshoter: add cases for x8r8g8b8 and x8b8g8r8 formats

These formats are used by pixman renderer for framebuffer surface, without
this patch screenshoter produces empty image.

Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com>
Implement pixman renderer

This renderer could be used when there's no graphic accelerator available,
for example in (future) KMS and fbdev backends.

Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com>
x11 backend: add option to use pixman renderer

When --use-shm is passed to weston and x11 backend is active,
it will use SHM surfaces with pixman renderer instead of EGL

Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com>
compositor-x11: rename use-shm to use-pixman

So it could be reused with other backends and not be easily confused
with wl_shm

Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com>
window: Fall back to cairo image when cairo EGL isn't available
Document --use-pixman option
Add missing pixman-renderer.h to Makefile.am

Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com>
renderer: introduce destroy callback

Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com>
Make EGL/GLESv2 dependencies optional

Introduce --disable-egl switch for configure to disable
EGL/GLESv2 support.

Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com>
configure.ac: Indent --disable-egl option correctly
gl: fix read-back format reporting in the log

weston_compositor::read_format is in Pixman values now, so comparing to
a GL value does not work. Compare to the right value.

This fix affects only the log output of the GL renderer.

Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
screenshooter: Free allocated memory where missing from some return paths
tests/setbacklight: Close filedescriptor on return paths
window: Free allocated memory on error path
image: Free allocated memory on error path
backlight: Avoid passing an invalid fd into close()
xwayland/window-manager: Avoid doing work for unknown window

In particular if the hash table lookup fails and returns NULL then that value
would be passed into weston_wm_window_schedule_repaint which does not accept a
NULL value.