Commit Graph

5732 Commits

Author SHA1 Message Date
Bryce Harrington 4c4f13d0e9 configure.ac: bump to version 2.0.0 for the official release 2017-02-24 16:19:03 -08:00
Bryce Harrington 12e6dbbd48 releasing: Should only publish publican docs for actual releases 2017-02-21 14:34:10 -08:00
Bryce Harrington 38306650ac configure.ac: bump to version 1.99.94 for the RC2 release 2017-02-21 12:56:48 -08:00
Emmanuel Gil Peyrot a1d214bb39 config-parser: Export weston_config_next_section
This symbol wasn’t exported from the weston binary, most likely due to
an oversight in 6e2c12496b, and because
internal modules can link against libshared.la directly it hasn’t been
found ever since.

This commit makes it possible for external modules to iterate over the
configuration file.

Signed-off-by: Emmanuel Gil Peyrot <emmanuel.peyrot@collabora.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Acked-by: Bryce Harrington <bryce@osg.samsung.com>
2017-02-21 12:55:15 -08:00
Daniel Stone 4b341a8b33 clients: Fix build without Cairo/GLES2
If we're building with EGL support generally, but without Cairo/GLESv2,
building the clients fail, because window.c defines the EGL native
types, however platform.h also brings these in.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Cc: Emil Velikov <emil.velikov@collabora.com>
Cc: Bryce Harrington <brycef@osg.samsung.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Tested-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Acked-by: Bryce Harrington <bryce@osg.samsung.com>
2017-02-21 12:33:04 -08:00
Daniel Stone f589dac2b0 screen-share: Use wl_list_for_each_safe on destroy
Destroying the shared seat removes the link from so->seat_list.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Acked-by: Bryce Harrington <bryce@osg.samsung.com>
2017-02-21 12:28:15 -08:00
Daniel Stone f81959e39d screen-share: Avoid NULL dereference
Don't try to dereference the seat if it's NULL.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
2017-02-21 12:27:08 -08:00
Bryce Harrington a62d0468da configure.ac: bump to version 1.99.93 for the RC1 release 2017-02-14 13:02:45 -08:00
Yong Bakos 53361535be (multiple): Use standard permission notice
A handful of source files were not using the MIT Expat text in
COPYING. Update these files to bring them inline with the rest,
standardizing on the MIT Expat text.

Signed-off-by: Yong Bakos <ybakos@humanoriented.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
Acked-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2017-02-13 21:45:12 +00:00
Armin Krezović 9bcf4c55e0 compositor-drm: Mark eDP connection as internal
Signed-off-by: Armin Krezović <krezovic.armin@gmail.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
2017-02-13 21:28:27 +00:00
Armin Krezović e6b7136641
compositor: Improve xwayland warning message
And fix formatting.

Signed-off-by: Armin Krezović <krezovic.armin@gmail.com>
Reviewed-by: Quentin Glidic <sardemff7+git@sardemff7.net>
2017-02-09 21:51:30 +01:00
Daniel Stone efc2b1d4db compositor-drm: Remove connector_allocator
Remove the last usage of connector_allocator, which was to check for
displays which have been hot-unplugged, and replace it with an array
which doesn't rely on the connector IDs remaining below 32 (or 64).

Signed-off-by: Daniel Stone <daniels@collabora.com>
Reviewed-by: Quentin Glidic <sardemff7+git@sardemff7.net>
Reported-by: Peter Senna Tschudin <peter.senna@collabora.com>
2017-02-09 18:05:04 +00:00
Daniel Stone c0ec75919a compositor-drm: Avoid connector_allocator for hotplugs
Rather than using connector_allocator to determine whether an output is
newly connected or not, use a list walk across all outputs instead.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Reviewed-by: Quentin Glidic <sardemff7+git@sardemff7.net>
Reported-by: Peter Senna Tschudin <peter.senna@collabora.com>
2017-02-09 17:39:17 +00:00
Daniel Stone 72c0e1b821 compositor-drm: Remove crtc_allocator
crtc_allocator was used as a bitmask of CRTC IDs, so we didn't try to
use the same CRTC for multiple outputs. Unfortunately, this only works
to the extent that CRTC object IDs fit within the bitmask; though they
were previously, they are not guaranteed to be under 32 or even 64.

Replace the only use of crtc_allocator with a list walk across outputs.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Reviewed-by: Quentin Glidic <sardemff7+git@sardemff7.net>
Reported-by: Peter Senna Tschudin <peter.senna@collabora.com>
2017-02-09 17:39:06 +00:00
Bryce Harrington 2155c47532 configure.ac: bump to version 1.99.92 for the beta release 2017-02-08 11:45:13 -08:00
Daniel Stone d5fa090904 Revert "clients: teach simple-dmabuf-v4l to deal with flipped input"
This reverts commit 0fee977c46.

This commit introduces a requirement on v4l2_query_ext_ctrl and
VIDIOC_QUERY_EXT_CTRL, which were introduced in kernel 3.17. Some Ubuntu
LTS releases ship with much older kernels (and, significantly, UAPI),
which don't have these.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Acked-by: Pekka Paalanen <pekka.paalanen@collabora.com>
Acked-by: Derek Foreman <derekf@osg.samsung.com>
2017-02-08 12:02:03 +00:00
Giulio Camuffo a32986ecf5 launcher: don't try to switch to weston's vt
Signed-off-by: Giulio Camuffo <giuliocamuffo@gmail.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2017-02-07 16:20:28 +02:00
Ucan, Emre (ADITG/SW1) 7fe0bb2580 ivi-shell: Damage view below after unmapping
If ivilayer or ivisurf of ivi_view is made invisible in the
commit_changes call, we have to damage the weston_view below this
ivi_view. Otherwise content of this ivi_view will stay visible.

Signed-off-by: Emre Ucan <eucan@de.adit-jv.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2017-02-07 15:03:10 +02:00
Pekka Paalanen 19222b4c89 tests: doc iterating in the runner
The iteration counter cannot be used to detect non-iterated tests
defined with TEST and FAIL_TEST.

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-by: Quentin Glidic <sardemff7+git@sardemff7.net>
2017-02-07 14:25:27 +02:00
Emilio Pozuelo Monfort 4f3cad7828 compositor: damage pending subsurfaces when committing them
When a client changes the subsurfaces state, we need to damage
them so the result is visible. We do that by flagging the surfaces
when the state changes and causing damage when committing the
state. This prevents normal repaints from considering these changes
until a commit has happened, and allows the client to atomically
schedule several changes.

This fixes the subsurface_z_order test, which is now marked as expected
to succeed.

Signed-off-by: Emilio Pozuelo Monfort <emilio.pozuelo@collabora.co.uk>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-by: Micah Fedke <micah.fedke@collabora.co.uk>
2017-02-07 14:25:27 +02:00
Pekka Paalanen e7c6aa6af4 tests: add subsurface-shot test
This is marked as a FAIL_TEST, because the last image comparison fails
due to a bug in Weston.

Jointly authored by Pekka and Emilio.

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Signed-off-by: Emilio Pozuelo Monfort <emilio.pozuelo@collabora.co.uk>
Reviewed-by: Micah Fedke <micah.fedke@collabora.co.uk>
[Pekka: move weston-tests-env as terminator to EXTRA_DIST, change
ok/FAIL to PASS/FAIL, write diff image only on fail.]
Acked-by: Quentin Glidic <sardemff7+git@sardemff7.net>
2017-02-07 14:25:27 +02:00
Pekka Paalanen 50b7b70835 tests: put screenshots to ./logs by default
Logs is where we write all our custom test logs, let's also put the
screenshots in the same place by default from cluttering the base
directory.

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-by: Emilio Pozuelo Monfort <emilio.pozuelo@collabora.co.uk>
Reviewed-by: Micah Fedke <micah.fedke@collabora.co.uk>
Reviewed-by: Quentin Glidic <sardemff7+git@sardemff7.net>
2017-02-07 14:25:27 +02:00
Pekka Paalanen b581783b79 tests: implement get_test_name()
Screenshot tests often want to use the test name for writing out images.
This is a helper to get the test name without writing it multiple times
in the source.

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-by: Emilio Pozuelo Monfort <emilio.pozuelo@collabora.co.uk>
Reviewed-by: Micah Fedke <micah.fedke@collabora.co.uk>
Reviewed-by: Quentin Glidic <sardemff7+git@sardemff7.net>
2017-02-07 14:25:12 +02:00
Pekka Paalanen a21b5ebf85 tests/shell: change background color
Pick the color 0xCC336699 as AARRGGBB, as if blended on black. This is
the color used with developing the sub-surface shot tests.

No other big reason than it should not be black to have better chances
of catching blending problems.

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-by: Micah Fedke <micah.fedke@collabora.co.uk>
Reviewed-by: Quentin Glidic <sardemff7+git@sardemff7.net>
2017-02-07 13:26:26 +02:00
Pekka Paalanen 7bcec20cc3 tests/shell: get rid of static variables
Stop using static variables and clean up when we're done.

[Emilio: update to latest weston_layer API]

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Signed-off-by: Emilio Pozuelo Monfort <emilio.pozuelo@collabora.co.uk>
Reviewed-by: Micah Fedke <micah.fedke@collabora.co.uk>
Reviewed-by: Quentin Glidic <sardemff7+git@sardemff7.net>
[Pekka: fix build after previous commit's fix]
2017-02-07 13:26:06 +02:00
Quentin Glidic 642bcaf387 tests: add test-desktop-shell
This is a new desktop shell plugin, specifically written for tests. It
implements the bare minimum of a WM with predictable window positioning.
It offers a known static background without forking any helper clients
and therefore avoids any races with executing screenshot-based tests.
Not forking unused helper clients also reduces the load during a test
run.

The code was written by Quentin as a part of a much larger private
patch. Pekka, following Emilio's example, extracted just the shell
plugin parts as a stand-alone patch and wrote the commit message.

[Emilio: update to latest weston_layer and shell_init API]

Signed-off-by: Quentin Glidic <sardemff7+git@sardemff7.net>
Signed-off-by: Emilio Pozuelo Monfort <emilio.pozuelo@collabora.co.uk>
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-by: Micah Fedke <micah.fedke@collabora.co.uk>
[Pekka: fix build]
2017-02-07 12:10:50 +02:00
Micah Fedke 0fee977c46 clients: teach simple-dmabuf-v4l to deal with flipped input
The v4l2 API can be queried to detect if the input video image is
horizontally or vertically flipped. If the image is y-flipped, we can
set the ZWP_LINUX_BUFFER_PARAMS_V1_FLAGS_Y_INVERT flag to notify the
compositor.  If the image is h-flipped, we can only print a warning
since linux_buffer_params_v1 does not support horizontal flipping.

Signed-off-by: Micah Fedke <micah.fedke@collabora.co.uk>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2017-02-07 11:47:10 +02:00
Ucan, Emre (ADITG/SW1) 9a200d7559 compositor-drm: don't pass option_connector to create_outputs
The connector option is a part of drm_backend struct.
Therefore, it is not needed to pass it as an argument
to create_outputs function.

Signed-off-by: Emre Ucan <eucan@de.adit-jv.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Acked-by: Daniel Stone <daniels@collabora.com>
2017-02-07 11:33:16 +02:00
Ucan, Emre (ADITG/SW1) 21e4944178 compositor-drm: update connectors with connector config
weston can be started with --connector option to be initialized
with a particular output. But in the update_outputs this option
is not considered and output is created for all the available
connectors. This patch fixes this issue by considering
the option for connectors in the update_outputs.

Signed-off-by: Emre Ucan <eucan@de.adit-jv.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Acked-by: Daniel Stone <daniels@collabora.com>
2017-02-07 11:33:16 +02:00
Micah Fedke c8890125ad compositor-drm: don't put y-inverted / interlaced / bottom-first dmabufs on overlays
This patch checks the attribute flags on incoming dmabufs and refuses to
put them overlays if they have any of the flags set (currently:
ZWP_LINUX_BUFFER_PARAMS_V1_FLAGS_Y_INVERT,
ZWP_LINUX_BUFFER_PARAMS_V1_FLAGS_INTERLACED and
ZWP_LINUX_BUFFER_PARAMS_V1_FLAGS_BOTTOM_FIRST), instead defaulting to
the gl-renderer which can handle some of the flags.

This check should be superceded by buffer transforms, when they become
available.

Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2017-02-06 13:43:40 +02:00
Ucan, Emre (ADITG/SW1) 27799355a9 ivi-shell: simplify commit_changes function
It is a better idea to use one for loop instead
of using three nested for loops.

We do not need to update the transformation of
views according to the scenegraph. The important
thing is that every visible view is updated before
commit_changes function returns.

The first if statement checks, if the view is on
the currently rendered scenegraph. The second if
statement checks, if the view's layer or surface
is visible. These checks ensure that we do not
update the transformation matrix of a view, which
is not visible on the screen.

Signed-off-by: Emre Ucan <eucan@de.adit-jv.com>
[Pekka: minor whitespace fix]
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2017-02-06 12:11:33 +02:00
Ucan, Emre (ADITG/SW1) 1b92ba20ac ivi-shell: pass only ivi_view to update_prop
We can get ivisurf, ivilayer and iviscreen
easily from ivi_view. Then, we do not need
to check, if ivi_view's layer is the same
as the given ivilayer.

Signed-off-by: Emre Ucan <eucan@de.adit-jv.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2017-02-06 12:10:56 +02:00
Bryce Harrington 819824d605 releasing: Copyedits 2017-02-03 17:23:24 -08:00
Bryce Harrington 7c1fb3ff51 libweston: grammar fix to recent comment 2017-02-03 17:01:59 -08:00
Daniel Stone 4938f93f57 tests: Remove buffer-count
buffer-count was introduced in line with a Mesa change which forced
an earlier block on frame events to try to enforce double-buffering
where available.

The Mesa change has since been reverted (Mesa commit 9ca6711faa), as
this had unpleasant interactions with buffer_age in particular, so this
test is no longer valid.

Additionally, it only worked on backends which initialised EGL (not
headless-backend, where tests generally run), which can be flaky due to
initialisation races. Not only that, but on the DRM backend, we can
legitimately enter triple-buffering due to promoting the surface to a
hardware plane, skipping GPU composition.

In light of all this, just remove the test.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Reviewed-by: Derek Foreman <derekf@osg.samsung.com>
2017-01-30 18:56:50 +00:00
Daniel Stone ffff92d592 Move weston-egl-ext.h to shared
Given that it's used by clients, it's really the very definition of
shared.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Reviewed-by: Derek Foreman <derekf@osg.samsung.com>
2017-01-30 16:45:19 +00:00
Daniel Stone cd1a1c34f8 Add comments and whitespace to repaint machinery
repaint_needed / repaint_scheduled are surprisingly subtle. Explode the
conditional with side-effects into more obvious separate calls, and
document what they do.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2017-01-30 16:45:19 +00:00
Ucan, Emre (ADITG/SW1) 1298073b5a systemd: fix Wincompatible-pointer-type
The parameter is passed in safe_strtoint function.
The function expects its parameters in int32_t
data type. Therefore, c compiler throws a
-Wincompatible-pointer-type warning.

This patch changes data type of the parameter
to int32_t.

Signed-off-by: Emre Ucan <eucan@de.adit-jv.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2017-01-27 17:25:11 +02:00
Ucan, Emre (ADITG/SW1) fbce2f5dd9 ivi-shell: add screen_add_layers test
Test adds 3 layers in a screen's render order list.
First, it adds in the order which layers are created.
Later, test cleans the render order list,
and adds layers in reverse order.

Signed-off-by: Emre Ucan <eucan@de.adit-jv.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2017-01-27 16:43:47 +02:00
Ucan, Emre (ADITG/SW1) 5d6aa9ba30 ivi-shell: add layer_add_surfaces test
Test adds 3 surfaces in a layer's render order list.
First, it adds in the order which surfaces are created.
Later, test cleans the render order list, and adds surfaces in reverse
order.

Signed-off-by: Emre Ucan <eucan@de.adit-jv.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2017-01-27 16:43:47 +02:00
Ucan, Emre (ADITG/SW1) 847c32d34b ivi-shell: don't check layer is already on the screen
If a layer is removed from a screen's render order list, but the
changes are not commited. Then, the layer could not be added to the
same screen. Because on_screen property of the layer is only changed
in ivi_layout_commit_changes API, when active render order of the screen
is changed.

It is not possible to change the order of layers in a screen without
clearing and commiting the changes before. This patch fixes this issue.

After this patch, the pending render order list of a screen is always
modified regardless of its active render order list.

Signed-off-by: Emre Ucan <eucan@de.adit-jv.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2017-01-27 16:43:47 +02:00
Ucan, Emre (ADITG/SW1) 67ed902f4b ivi-shell: don't check view is rendered before adding surface
If a surface is removed from a layer's render order list, but the
changes are not commited. Then, the surface could not be added to the
same layer. Because ivi_view of the surface is still in the render order
list of the layer.

It is not possible to change the order of surfaces in a layer without
clearing and commiting the changes before. This patch fixes this issue.

After this patch, the pending render order list of a layer is always
modified regardless of its active render order list.

Signed-off-by: Emre Ucan <eucan@de.adit-jv.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2017-01-27 16:43:46 +02:00
Ucan, Emre (ADITG/SW1) 6660252274 ivi-shell: fix typo in layer_destroy API
Signed-off-by: Emre Ucan <eucan@de.adit-jv.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2017-01-27 16:39:43 +02:00
Daniel Stone cb3f1b0105 compositor-rdp: Fix build with freerdp2, take 2
Hi Pekka,

On 23 January 2017 at 14:15, Pekka Paalanen <ppaalanen@gmail.com> wrote:
> On Fri, 20 Jan 2017 11:31:08 +0100
> Emilio Pozuelo Monfort <pochu@debian.org> wrote:
>> This version works for me...
>
> Hi guys,
>
> I found another guest to the party. Using net-misc/freerdp-2.0.0_pre20160722
> Weston master fails to build with:
>
>
> In file included from /usr/include/freerdp2/freerdp/codecs.h:25:0,
>                  from /usr/include/freerdp2/freerdp/freerdp.h:46,
>                  from /home/pq/git/weston/libweston/compositor-rdp.c:69:
> /home/pq/git/weston/libweston/compositor-rdp.c: In function ‘rdp_peer_context_new’:
> /usr/include/freerdp2/freerdp/codec/color.h:85:72: error: ‘FREERDP_PIXEL_FORMAT_TYPE_BGRA’ undeclared (first use in this function)
> [... snip ...]
>
> However, updating to net-misc/freerdp-2.0.0_pre20161219 allows things
> to build for me again. There is just one warning:

How about this fixup?

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2017-01-27 12:23:08 +02:00
Armin Krezović 605ac8e685 compositor-drm: Restore use-current-mode functionality
It got lost during the porting to the config API.

Signed-off-by: Armin Krezović <krezovic.armin@gmail.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
2017-01-26 14:14:14 +00:00
Bryce Harrington e23697f593 releasing: Drop extraneous word in docs 2017-01-24 21:54:41 -08:00
Bryce Harrington e28d275191 configure.ac: bump to version 1.99.91 for the alpha release 2017-01-24 18:13:28 -08:00
Yann E. MORIN 20f30e1ae9 tests: add missing include
The int32_t type is defined in stdint.h.

The musl C library is very conservative in the headers that it
internally includes, and stdint.h is not included by any other header,
unlike with glibc or uClibc, which breaks the build.

Add the missing header.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Reviewed-by: Yong Bakos <ybakos@humanoriented.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2017-01-23 14:12:06 +02:00
Pekka Paalanen c560a398c3 gitignore: version headers are in libweston/
Switching back and forth to e.g. weston 1.11 branch can leave
these files in src/. Fix the gitignores to not hide them from
git-status.

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2017-01-23 14:06:49 +02:00
Emilio Pozuelo Monfort beec77e9b9 compositor-rdp: Fix build with freerdp2
Based on a patch from John Moser <john.r.moser@gmail.com>

https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=850658

Signed-off-by: Emilio Pozuelo Monfort <pochu@debian.org>
Reviewed-by: Daniel Stone <daniels@collabora.com>
2017-01-20 11:53:34 +00:00