Commit Graph

198 Commits

Author SHA1 Message Date
Jason Ekstrand
7744f71550 compositor-wayland: Add an actual frame around the compositor window
This adds a window frame with a close button.  Similar to the X11 backend,
The window supports dragging but not resizing.

Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
2013-11-07 16:34:10 -08:00
Jonas Ådahl
b8e62d9cdb configure.ac: Report if built with XCB-XKB or not
Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
2013-10-28 14:38:31 -07:00
Tomeu Vizoso
96dc9e4f1f rpi: Remove create_view and destroy_view implementations
And also remove the vfunc definitions from the compositor as they
are unused now.
2013-10-28 14:36:26 -07:00
Kristian Høgsberg
9b8e1b17fe configure.ac: Require wayland >= 1.3.91 2013-10-25 16:18:17 -07:00
Kristian Høgsberg
3742434cfd configure.ac: Require at least version 0.3.0 of xkbcommon
https://bugs.freedesktop.org/show_bug.cgi?id=70870
2013-10-25 12:49:00 -07:00
Peter Hutterer
64db37e53c protocol: hook up xmllint to check validity 2013-10-25 10:58:15 -07:00
Kristian Høgsberg
5d380c3c5f configure.ac: Bump version to 1.3.90 for the master branch 2013-10-23 09:30:48 -07:00
David Herrmann
cc5b2ed2b8 launcher: add logind backend
Instead of connecting to weston-launch from launcher-util, we now try to
connect to logind first. If logind provides session-devices, we use them.
If not, we fall back to the old weston-launch facility.
2013-10-21 16:23:58 -07:00
David Herrmann
59ab90049f Add optional dbus helpers
This adds optional libdbus integration for weston. If libdbus is available
and not disabled via --disable-dbus during weston build, we now provide
basic DBusConnection main-loop integration for weston.

The dbus.c file provides a new helper to integrate any DBusConnection
object into a wl_event_loop object. This avoids any glib/qt/..
dependencies but instead only uses the low-level libdbus library.

Note that we do not provide dummy fallbacks for dbus helpers in case
dbus-support is disabled. The reason for that is that you need dbus/dbus.h
for nearly any operation you want to do via dbus. Therefore, only the most
basic helpers which can be used independently provide a "static inline"
dummy fallback to avoid #ifdef all over the code.
2013-10-21 16:06:22 -07:00
Ander Conselvan de Oliveira
97f2952bca gl-renderer: Build as a loadable module
The time spent loading EGL and GLES libraries from disk can be a
considerable hit in some embedded use cases. If Weston is compiled
with EGL support, the binary will depend on those libraries, even if
a software renderer is in use.

This patch splits the GL renderer into a separate loadable module,
and moves the dependency on EGL and GLES to it. The backends still
need the EGL headers for the native types and EGLint. The function
load_module() is renamed to weston_load_module() and exported, so
that it can be used by the backends.

The gl renderer interface is changed so that there is only one symbol
that needs to be dlsym()'d. This symbol contains pointers to all the
functions and data necessary to interact with the renderer. As a side
effect, this change simplifies gl-renderer.h a great deal.
2013-10-14 15:02:20 -07:00
Ander Conselvan de Oliveira
70e2e684fa build: Add dependency between libdrm and compositor for drm backend
The compositor uses libdrm in launcher-util.c if the drm backend is
built, but there was no explicit requirement in the build. egl brings
libdrm implicity so the build doesn't fail.

This patch adds an explicit dependency between the compositor and
libdrm if the drm backend is built, so that changes to the compositor
modules don't cause build failures.
2013-10-14 14:56:26 -07:00
Kristian Høgsberg
bcfd07b70a xwm: Redirect root window subwindows
xwayland no longer does this for us, we have to request it now
2013-10-11 16:48:19 -07:00
Kristian Høgsberg
95659c0321 configure.ac: Bump version to 1.3 2013-10-09 16:20:50 -07:00
Kristian Høgsberg
8d7bef2673 configure.ac: Bump version to 1.2.92 2013-10-02 22:14:23 -07:00
Adrian Negreanu
7b8e970ad1 compositor-fbdev: drop dependency on libdrm
Signed-off-by: Adrian Negreanu <adrian.m.negreanu@intel.com>
2013-09-26 16:18:13 -07:00
Kristian Høgsberg
779938596d configure.ac: Update version to 1.2.91 2013-09-22 14:28:38 -07:00
Kristian Høgsberg
edb6a3bd0a configure.ac: Only enable enable_simple_egl_clients if enable_egl is yes
This simplifies a few checks and makes sure we only build the
subsurfaces client if EGL is enabled.

https://bugs.freedesktop.org/show_bug.cgi?id=68727
2013-09-03 22:59:17 -07:00
Kristian Høgsberg
1f7ce6e3d5 configure.ac: Only build libva recorder if we found libva
The automatic detection failed to disable the build if it didn't
find libva.

https://bugs.freedesktop.org/show_bug.cgi?id=68908
2013-09-03 22:46:02 -07:00
Kristian Høgsberg
c940dcdb38 configure: Require wayland-server 1.2.90
Make sure we look for a recent enough version of wayland-server for
the new wl_seat release requests.
2013-08-30 15:00:01 -07:00
Kristian Høgsberg
0eac34ab28 configure.ac: Auto-enable vaapi recorder, but allow overrides
If libva is available and recent, we'll enable the vaapi recorder feature,
but it can also be forced on or off by --enable/disable-vaapi-recorder.
2013-08-30 14:29:03 -07:00
Ander Conselvan de Oliveira
6aae4d39d5 compositor-drm: Add hardware accelerated capture of screen using libva
This patch adds a feature to the DRM backend that uses libva for
encoding the screen contents in H.264. Screen recording can be
activated by pressing mod-shift-space q. A file named capture.h264
will be created in the current directory, which can be muxed into
an MP4 file with gstreamer using

gst-launch filesrc location=capture.h264 ! h264parse ! mp4mux ! \
           filesink location=file.mp4

This is limitted to the DRM compositor in order to avoid a copy when
submitting the front buffer to libva. The code in vaapi-recorder.c
takes a dma_buf fd referencing it, does a colorspace conversion using
the video post processing pipeline and then uses that as input to the
encoder.

I'm sending this now so I get comments, but this is not ready for
prime time yet. I have a somewhat consistent GPU hang when using
i915 with SandyBridge. Sometimes a page flip never completes. If you
want to try this anyway and your system get stuck, you might need to
run the following:

  # echo 1 > /sys/kernel/debug/dri/0/i915_wedged

After that, alt-sysrq [rv] should work.

Once that's fixed it would also be good to make the parameters used by
the encoder more flexible. For now the QP parameter is hardcoded to 0
and we have only I and P frames (no B frames), which causes the
resulting files to be very large.
2013-08-30 13:44:40 -07:00
Quentin Glidic
9f43cb48aa autotools: Fix AC_PATH_PROG call
Signed-off-by: Quentin Glidic <sardemff7+git@sardemff7.net>
2013-08-30 13:01:15 -07:00
Samuel Iglesias Gonsalvez
f66f99d9db configure.ac: fix broken compilation when configure with --disable-egl option
Fix bug 67561: "configure with --disable-egl option breaks fbdev backend
compilation"

https://bugs.freedesktop.org/show_bug.cgi?id=67561

Signed-off-by: Samuel Iglesias Gonsalvez <siglesias@igalia.com>
2013-08-28 22:21:11 -07:00
Kristian Høgsberg
c4a4c6b152 configure.ac: Bump configure.ac version to 1.2.90
We usually do this when we branch off the stable branch, better late than
never.
2013-08-28 22:16:10 -07:00
Kristian Høgsberg
7e105f9a91 configure.ac: Add AC_SYS_LARGEFILE for mmap()ing dumb GEM buffers
We're mmap()ing buffers with 64 bit offsets coming from the
DRM_IOCTL_MODE_MAP_DUMB ioctl and need to make sure mmap accepts
those.
2013-08-21 15:44:57 -07:00
Daiki Ueno
3e9df07269 autotools: Don't use wayland-scanner.m4 2013-08-20 11:15:19 -07:00
Armin K
0a8461b95e autotools: Add configure summary 2013-08-13 20:46:23 -07:00
Rob Bradford
4c1a9bc684 build: Allow more control over cairo use in the clients
Previously the configure script would silently disable the use of
accelerated cairo in the clients if cairo-gl could not be found (or
cairo-glesv2 if that was requested.) Conversely the use of cairo-gl
would be automatically enabled if it was found with no way to disable
that feature

This change adds --with-cairo which takes one of "image", "gl" or
"glesv2" (defaulting to "image"). If "gl" or "glesv2" is specified
cairo-egl is checked for as well as the specified renderer. If the check
fails then the configure process errors out.
2013-08-12 22:18:34 -07:00
Peter Hutterer
499d8a4046 configure.ac: check for wayland scanner macro 2013-08-08 21:54:53 -07:00
Armin K
aac6021bc0 autotools: Add an option to install demo clients
This patch adds a configure option which will enable
user to install demo clients if desired. It is disabled
by default.

v2: Remove AC_DEFINE as it is not necesary
2013-07-29 10:51:19 -07:00
Kristian Høgsberg
a684b5a3d5 Bump version to 1.2.0 2013-07-13 01:30:00 -04:00
Yanko Kaneti
9b78adfe9d configure.ac: Set automake conditional after testing for colord pkg 2013-07-10 12:09:45 -04:00
Kristian Høgsberg
46cb4a9513 Bump versionto 1.1.91 2013-07-09 19:51:54 -04:00
Hardening
c077a8435d Document RDP compositor options
Help was missing for the RDP compositor, this patch gives details
about available options.
2013-07-08 13:16:36 -04:00
Quentin Glidic
735302ea2d weston-launch: Set all groups for user
Signed-off-by: Quentin Glidic <sardemff7+git@sardemff7.net>

https://bugs.freedesktop.org/show_bug.cgi?id=65933
2013-07-08 12:56:24 -04:00
Rob Bradford
382ff46ffb build: Make libxkbcommon build-time optional in the compositor
v2: Incorporate review feedback from Daniel Stone - improved configure
message about the purpose of this option and reorganisation of #ifdefs.
2013-06-28 19:56:41 -04:00
Daniel Stone
c228e23b05 configure.ac: Enable AC_USE_SYSTEM_EXTENSIONS
AC_USE_SYSTEM_EXTENSIONS enables _XOPEN_SOURCE, _GNU_SOURCE and similar
macros to expose the largest extent of functionality supported by the
underlying system.  This is required since these macros are often
limiting rather than merely additive, e.g. _XOPEN_SOURCE will actually
on some systems hide declarations which are not part of the X/Open spec.

Since this goes into config.h rather than the command line, ensure all
source is consistently including config.h before anything else,
including system libraries.  This doesn't need to be guarded by a
HAVE_CONFIG_H ifdef, which was only ever a hangover from the X.Org
modular transition.

Signed-off-by: Daniel Stone <daniel@fooishbar.org>

[pq: rebased and converted more files]
2013-06-05 01:16:34 -04:00
Armin K
a94e285be7 clients/nested: Fix compilation 2013-06-04 23:50:41 -04:00
Rob Bradford
5a4cea9a9c build: Add declaration checks to check for required syscall flags
The required flags are relatively new and some older enterprise
distributions do not feature them.

https://bugs.freedesktop.org/show_bug.cgi?id=63360
2013-06-04 23:11:42 -04:00
Armin K
49c36c6804 Don't fail if colord or libunwind are not present
This patch adds auto detection for presence of
the colord and libunwind packages.
2013-06-04 00:31:23 -04:00
Louis-Francis Ratté-Boulianne
6cd1de33ba toytoolkit: Make the window resizing optimization optional
Whether or not a shm pool is used for resizing is now configurable at
build time (--disable-resize-optimization).

[pq: removed an unnecessary hunk from the patch]
2013-05-22 18:07:30 -04:00
Pekka Paalanen
e31e053369 rpi: switch to rpi-renderer
Replace the GL renderer with the new rpi-renderer on the Raspberry Pi
backend. This makes Weston on rpi not use EGL or GL anymore, at all.

The weston_plane feature is disabled, since the rpi-renderer does the
same, but better.

Add a command line option to select the output transform. It is not a
weston.ini option for now, since the rpi backend does not read the
configuration file yet. Hopefully that will be done later with some
shared code.

Add the rpi options to 'weston --help' output.

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2013-05-22 18:06:01 -04:00
Mun Gwan-gyeong
fe097f95a3 configure.ac: colord version to 0.1.27 2013-05-20 17:29:28 -04:00
Richard Hughes
be7c4dd2a0 Add a colord implementation of a CMS plugin for weston
This allows users to change the assigned display profile in GNOME (using
gnome-control-center) or KDE (using colord-kde) and also allows the profiling
tools to correctly inhibit the calibration state whilst measuring the native
screen response.
2013-05-14 10:15:39 -04:00
Pekka Paalanen
7ff7a80007 clients: add subsurfaces demo
Add a demo program with:
- a main surface (green)
- a Cairo-image sub-surface (red)
- a raw GLESv2 widget (triangle)

Sub-surface input region is set empty to avoid problems in toytoolkit.

If Cairo links to libGL, then we will end up with also libGLESv2 linked
to subsurfaces program, and both libs getting really used, which leads
to disaster.

Do not build subsurfaces demo, if Cairo links to libGL and cairo-egl is
usable.

The GL rendering loop is not tied to the toytoolkit or the widget, but
runs directly from its own frame callback. Therefore it runs
independent of the rest of the application. This also relies on one of
two things:
- eglSwapInterval(0) is implemented, and therefore eglSwapBuffers never
  blocks indefinitely, or
- toytoolkit has a workaround, that guarantees that eglSwapBuffers will
  return soon, when we force a repaint on resize.
Otherwise the demo will deadlock.

The code is separated into three sections:

1. The library component, using only EGL, GLESv2, and libwayland-client
   APIs, and not aware of any toolkit details of the parent application.
   This runs independently until the parent application tells otherwise.

2. The glue code: a toytoolkit application widget, who has its own
   rendering machinery.

3. The application written in toytoolkit.

This patch also adds new toytoolkit interfaces:
- widget_get_wl_surface()
- widget_get_last_time()
- widget_input_region_add()

Toytoolkit applications have not had a possibility to change the input
region. The frame widget (decorations) set the input region on its own
when used, otherwise the default input region of everything has been
used. If a window does not have a frame widget, it can now use
widget_input_region_add() to set a custom input region.

These are not window methods, because a widget may lie on a different
wl_surface (sub-surface) than the window.

Changes in v3:
- replace set_commit_mode with set_sync and set_desync

Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
2013-05-10 14:35:53 -04:00
Richard Hughes
b24e48e2ff Add initial color management framework code
ICC profiles can now be specified in weston.ini for each output, or a CMS
implementation can optionally loaded from a pluggable module.
2013-05-10 12:51:08 -04:00
Kristian Høgsberg
2158a889a1 Import input structs and helper functions from wayland 2013-05-06 21:40:32 -04:00
Kristian Høgsberg
93c76fe4b1 configure.ac: Bump to 1.1.90 to open master for 1.2 work 2013-04-29 16:33:32 -04:00
Kristian Høgsberg
c08bc364fc configure.ac: Bump version to 1.1.0 2013-04-15 21:51:35 -04:00
Quentin Glidic
5daccc373e autotools: Add a libunwind configure switch
Signed-off-by: Quentin Glidic <sardemff7+git@sardemff7.net>
2013-04-03 14:31:44 -04:00