Commit Graph

2871 Commits

Author SHA1 Message Date
Scott Moreau
1224514f5b Add --version option 2013-02-02 10:28:50 -05:00
Kristian Høgsberg
d92c09c770 compositor-drm: Use matrix type to test for drm plane compatibility
The drm planes (sprites) only support translation and scaling.  Now that
we have matrix.type, we can just look there to see if the transform is
compatible with kms.
2013-01-29 16:56:15 -05:00
Kristian Høgsberg
272d243e00 weston-launch: Clear environment and set it up from scratch
With recent systemd[1] XDG_VTNR will leak through to pam, which ends up
setting a vtnr pam argument with the wrong value.  The fix is to clear
XDG_VTNR first, but what we should have been doing all along is resetting
the environment.

Thanks to Ray Strode for helping debug this.

[1] http://cgit.freedesktop.org/systemd/systemd/commit/?id=a8573ccc35a4efe8900be5d48c6c803670540c2b
2013-01-29 14:19:14 -05:00
Quentin Glidic
c0d79ce2ba shell: Whitespaces cleanup
Signed-off-by: Quentin Glidic <sardemff7+git@sardemff7.net>
2013-01-29 09:26:43 -05:00
Vasily Khoruzhick
031fc8751c pixman renderer: respect output position
Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com>
2013-01-29 09:26:29 -05:00
Vasily Khoruzhick
f4a457fe0f pixman-renderer: handle surface transform matrix properly
Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com>
2013-01-28 16:10:13 -05:00
Vasily Khoruzhick
1bbf372e31 matrix: track transform type
Introduce several matrix transform types and track type for matrix.
Could be usefull for activating some fastpath that depends on some
transform type.

Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com>
2013-01-28 16:10:03 -05:00
Kristian Høgsberg
15336e8b5c toytoolkit: Remove left-over pixman dependency
toytoolkit doesn't use pixman.  Remove the pixman.h include and the
LDADD.

https://bugs.freedesktop.org/show_bug.cgi?id=57812
2013-01-28 16:05:06 -05:00
Kristian Høgsberg
3c2360ff9d Add new shared/image-loader.h to separate include dependencies
Before, cairo-util.h would combine pixman and cairo includes.  X11 and
Wayland compositors uses this to load an image as a pixman_image_t but are
forced to include cairo headers.  Clients use load_cairo_surface to
load images as cairo_surface_t's, but are forced to include pixman.h.

We move the load_image pixman prototype to its own header, so compositors
can get at the pixman prototype without including cairo.h and clients
can include the cairo based function without including pixman.h.
2013-01-28 16:02:04 -05:00
Kristian Høgsberg
78fd32b7a2 clients: Make libtoytoolkit a libtool library
This way libtool will remember the libtoytoolkit LIBADD libraries.
We can drop the toolkit_libs hack and just link to libtoytoolkit.la and
libtool will add the dependencies.
2013-01-28 16:02:04 -05:00
Dima Ryazanov
d20fd4db60 terminal: Handle the window close event
There may be multiple windows open, so destroy the terminal instead of exiting.

Signed-off-by: Dima Ryazanov <dima@gmail.com>
2013-01-28 12:26:54 -05:00
Ander Conselvan de Oliveira
23e72b867a pixman-renderer: Don't unreference NULL hw_buffer image
If the buffer for an output was never set, or was reset to NULL at some
point, destroying the renderer output private would cause a crash.
2013-01-27 14:33:08 -05:00
Ander Conselvan de Oliveira
5fb44141bf compositor-drm: Add support for using the pixman renderer
If --use-pixman is passed as command line option to weston, the drm
backend will use the pixman renderer instead of the gl one.
2013-01-27 14:32:17 -05:00
Ander Conselvan de Oliveira
1d41ad4054 compositor-drm: Support creating drm_fb backed by dumb buffers 2013-01-27 14:27:47 -05:00
Ander Conselvan de Oliveira
526d46118e compositor-drm: Put logic of destroy/releasing bo's in its own function
We have this duplicated in a few places.
2013-01-27 14:25:47 -05:00
Ander Conselvan de Oliveira
229291789a compositor-drm: Split kms initialization out of init_egl() 2013-01-27 14:24:53 -05:00
Ander Conselvan de Oliveira
936effddeb pixman-renderer: Move shadow buffer into renderer
The X11 backend uses a shadow buffer to be able to support transformed
outputs. However, this belongs in the renderer, since otherwise this
code would have to be copied into every backend that uses the pixman
renderer and supports transformed outputs.
2013-01-27 14:24:34 -05:00
Ander Conselvan de Oliveira
8792ef12b6 pixman-renderer: Add repaint debugging feature
Add 'R' as a debug shortcut that highlights repainted regions.
2013-01-27 14:23:57 -05:00
Martin Minarik
edc51c0f9c Weston: weston.ini.man page
changes:
 - launcher path, passing environment variables and parameter
 - indent modeline example
2013-01-24 19:44:00 -05:00
Pekka Paalanen
0eab05d2a7 clients: add global_remove handler stubs
All the clients here were missing the global_remove handler. Because
window.c did not have it, weston-desktop-shell and weston-keyboard
segfaulted on compositor exit, as they received some
wl_registry.global_remove events.

Add more or less stub global_remove handlers, so that clients do not
crash on such events. Toytoolkit and all applications would need a lot
more code to properly handle the global object removal.

Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
2013-01-24 16:42:38 -05:00
Scott Moreau
cc9acfc75e weston-launch: Use "weston-launch" for --help instead of "weston".
The output of weston-launch --help was "Usage: weston [args...] ...".
This changes it to read "Usage: weston-launch [args...] ...".
2013-01-24 16:41:18 -05:00
Pekka Paalanen
a95efd3bb7 configure: remove C++ support
With the Android backend gone, there is no C++ code anymore. Remove
support for C++ in the build.

Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
2013-01-24 16:30:08 -05:00
Pekka Paalanen
a87ccdc993 compositor: remove android backend
The Android backend has been fairly unused, since we do not have
projects actively using it. It gets basic build testing as part of the
normal build, but runtime testing it takes a considerable effort, and so
I have not done that in a long time. The code is slowly rotting, and
with new emerging backends it starts to be a burden, since it cannot use
udev, but needs evdev.

Therefore to ease Weston going forward, remove the Android backend. If
someone misses it, it can still be found in the stable 1.0 branch, and
of course resurrected from git history if someone wants to put in the
effort and maintain it.

Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
2013-01-24 16:30:04 -05:00
Pekka Paalanen
585c27c717 tests: make signal other than ABRT a hard failure
We handle FAIL_TEST tests by simply inverting the success flag. The
problem with this is, that if a FAIL_TEST fails by a SIGSEGV, it will be
interpreted as passed. However, no code should ever cause a SEGV, or any
other signal than ABRT. And even ABRT only in the case of an assert()
that is meant to fail. We would probably need more sophistication for the
FAIL_TEST cases.

For now, just interpret any other signal than ABRT as a hard failure,
regardless whether it is a TEST or FAIL_TEST. At least segfaults do not
cause false passes anymore.

Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
2013-01-24 16:24:22 -05:00
Pekka Paalanen
3a1d07d5e7 shell: remove remnants of screensaver surface list
The list became stale probably when the lock_layer was introduced. Now
one less (ab)user of weston_surface::link.

Also add a comment on screensaver_configure(), that it is (and has been)
broken for pre-started screensavers.

Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
2013-01-24 16:18:32 -05:00
Vasily Khoruzhick
26def5ca8e gl-renderer: make EGL typedefs similar to EGL/egl.h when building without EGL support
Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com>
2013-01-15 16:00:16 -05:00
Jonas Ådahl
a178f70965 shell: Don't lower fullscreen layer on activate
To be able to have a fullscreen surface on one output, and interact with
surfaces on another output, don't lower the fullscreen layer on
activate.

Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
2013-01-15 15:57:45 -05:00
Jonas Ådahl
33619a4955 shell: Set input region of the black fullscreen surface
The input region of the black surface placed under the fullscreen shell
surface did not have a specified input region. Because the initial input
region of a surface is infinity, no other surface on any other output
could get any focus.

Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
2013-01-15 15:35:34 -05:00
Rob Bradford
aa521bd1bc 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.
2013-01-10 16:08:08 -05:00
Rob Bradford
23d330ec9d backlight: Avoid passing an invalid fd into close() 2013-01-10 16:07:42 -05:00
Rob Bradford
409f79a2c7 image: Free allocated memory on error path 2013-01-10 16:07:23 -05:00
Rob Bradford
f0a1af9f02 window: Free allocated memory on error path 2013-01-10 16:07:18 -05:00
Rob Bradford
c59a33a1e2 tests/setbacklight: Close filedescriptor on return paths 2013-01-10 16:07:08 -05:00
Rob Bradford
e6675c28b5 screenshooter: Free allocated memory where missing from some return paths 2013-01-10 16:06:51 -05:00
Pekka Paalanen
fe4eacf6ad 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>
2013-01-10 16:06:06 -05:00
Kristian Høgsberg
f82a80675c configure.ac: Indent --disable-egl option correctly 2013-01-09 13:36:39 -05:00
Vasily Khoruzhick
1bfe2e6f4b Make EGL/GLESv2 dependencies optional
Introduce --disable-egl switch for configure to disable
EGL/GLESv2 support.

Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com>
2013-01-08 15:32:00 -05:00
Vasily Khoruzhick
52cfd61cdb renderer: introduce destroy callback
Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com>
2013-01-08 15:31:08 -05:00
Vasily Khoruzhick
94c1dfb012 Add missing pixman-renderer.h to Makefile.am
Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com>
2013-01-08 15:30:39 -05:00
Kristian Høgsberg
efaca34bc5 Document --use-pixman option 2013-01-07 15:52:44 -05:00
Kristian Høgsberg
4e51b44c53 window: Fall back to cairo image when cairo EGL isn't available 2013-01-07 15:47:47 -05:00
Vasily Khoruzhick
d894351707 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>
2013-01-07 15:33:25 -05:00
Vasily Khoruzhick
b3add192ed 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>
2013-01-07 13:03:41 -05:00
Vasily Khoruzhick
71c2dd3c44 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>
2013-01-07 13:03:38 -05:00
Vasily Khoruzhick
2617185b74 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>
2013-01-07 09:40:42 -05:00
Vasily Khoruzhick
094ca1d1ed screenshoter: don't use hardcoded bpp value
Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com>
2013-01-07 09:40:42 -05:00
Kristian Høgsberg
e565b40569 tests: Pass --backend so the test suite runs with the right modules
Without this we try to load the installed backends, which is nasty for
regular runs, and just doesn't work for make distcheck, which sets
prefix to $PWD/_inst.  This makes sure we load the right backend
and make distcheck pass.  Other modules (xwayland, shells etc) just don't
get loaded for distcheck and for make check we still try to load the
installed modules.
2012-12-14 16:34:00 -05:00
Ander Conselvan de Oliveira
6c01c9c51f compositor-drm: Reduce code duplication on drm_output_switch_mode()
Call drm_output_init_egl() instead of duplicating the gbm surface and
gl renderer state initialization code.

Note that this makes error handling a bit worse. Before, if we failed
to allocate a gbm surface we could still recover. Failing the renderer
state creation would lead to inconsisten state. Now we end up in
inconsistent state on both cases.
2012-12-14 11:27:58 -05:00
Ander Conselvan de Oliveira
475cf154b1 compositor-drm: Move output gl state initialization to own function 2012-12-14 11:27:55 -05:00
Ander Conselvan de Oliveira
f1c38a7426 compositor-drm: Don't do a mode set on drm_output_switch_mode()
At this point, we reallocated the gbm surface, but we don't have an
fb with the right size to use. If we're going to a larger mode, the fb
would be too small and the mode set would fail. Besides, the repaint
logic will already do a mode set if necessary, so rely on that instead.
2012-12-14 11:27:53 -05:00