Pekka Paalanen [Thu, 28 May 2020 08:34:04 +0000 (11:34 +0300)]
timeline: convert vblank timestamp to MONOTONIC
All timeline event timestamps are in CLOCK_MONOTONIC already. DRM KMS
timestamps are practically guaranteed to be CLOCK_MONOTONIC too, even though
presentation clock could theoretically be something else. For other backends,
the presentation clock is likely CLOCK_MONOTONIC_RAW due to
weston_compositor_set_presentation_clock_software().
This patch ensures that the recorded vblank timestamp is in CLOCK_MONOTONIC.
Otherwise interpreting the timeline traces might be difficult to do accurately,
since it would be hard to recover the relationship between the presentation
clock and timeline event timestamps.
The time conversion routine is the simplest possible, I don't think we need any
more accurate conversion for timeline purposes. Besides, DRM-backend is the
only backend where the timings actually matter, the other backends are
software-timed anyway.
Since the clock domain of the "vblank" attribute potentially changes, the
attribute is renamed. Wesgr never used this attribute.
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
Michael Olbrich [Wed, 27 Nov 2019 13:11:05 +0000 (14:11 +0100)]
gl-renderer: query EGL to determine if GL_TEXTURE_EXTERNAL_OES should be used
Using the number of planes to determine if GL_TEXTURE_EXTERNAL_OES should be
used is incorrect with some modifiers: For example RGBA with a
I915_FORMAT_MOD_Y_TILED_CCS modifier has two planes.
Use eglQueryDmaBufModifiersEXT() to query if the current format/modifier only
supports GL_TEXTURE_EXTERNAL_OES.
Use the current code as fallback of modifiers are not supported.
Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
Alexandros Frantzis [Wed, 13 May 2020 13:33:03 +0000 (16:33 +0300)]
xdg-shell: Allow fullscreen surfaces to not cover the whole screen
The wording of the xdg-shell protocol allows surfaces to not cover the
whole screen when they are made fullscreen. From the description of the
fullscreen state in xdg-shell:
The window geometry specified in the configure event is a maximum; the
client cannot resize beyond it. For a surface to cover the whole
fullscreened area, the geometry dimensions must be obeyed by the
client.
The last sentence is the condition for fullscreen coverage, not a
requirement.
This commit updates the code to not flag size mismatches for fullscreen
surfaces as a protocol error when the surface fits within the screen. In
such cases, the shell is responsible for centering surfaces
appropriately and also for obscuring other screen content as described
in the xdg_toplevel.set_fullscreen request description (and, indeed,
desktop-shell does all this).
For reference, contrast with the corresponding, stricter wording in the
obsolete xdg-shell-unstable-v6 protocol for the fullscreen state:
The window geometry specified in the configure event must be obeyed by
the client.
Signed-off-by: Alexandros Frantzis <alexandros.frantzis@collabora.com>
Peter Hutterer [Wed, 13 May 2020 05:24:27 +0000 (15:24 +1000)]
libweston: replace 0 with the enum value for the xkb init flags
No functional changes, this is cosmetics only.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Ken C [Sat, 11 Apr 2020 22:05:59 +0000 (15:05 -0700)]
set SURFACE_BITS_COMMAND cmdType explicitly
Peter Hutterer [Thu, 7 May 2020 21:33:57 +0000 (07:33 +1000)]
gitlab CI: update to recent fdo ci-templates
Make use of the templating structure the templates provide. No
functional changes in the end, container-build's default behavior is the
previously called container-if-not-exists template.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Thu, 7 May 2020 21:25:48 +0000 (07:25 +1000)]
gitlab ci: switch to freedesktop ci-templates
The project was moved a while ago to make it look less waylandy. Same
sha, so no actual changes here.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Michael Olbrich [Wed, 29 Apr 2020 07:03:15 +0000 (09:03 +0200)]
compositor: fix endless recursion in scene-graph printing
If a surface has subsurfaces then the surface itself is in the subsurface
list. To avoid printing it again there is a check to skip the child view,
if it is the same as the current view.
However, this fails when a surface with subsurfaces has two (or more) views:
The check to skip the parent fails for the other view and the two views are
printed again and again until a stack overflow occurs.
So instead check if the parent view of the subsurface view is the current
view. This way, any view that does not belong to a real subsurface is
skipped.
As a side effect, this ensures that each view of the subsurfaces is only
printed once at the correct place in the hierarchy.
Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
Paul Menzel [Sun, 5 Apr 2020 20:19:49 +0000 (22:19 +0200)]
man/weston-drm: Use third person singular conjugation
Signed-off-by: Paul Menzel <pmenzel@molgen.mpg.de>
Tomohito Esaki [Mon, 30 Mar 2020 08:10:54 +0000 (17:10 +0900)]
drm: change timing to set color format for primary plane without universal plane
Without universal plane, the weston crashes with null pointer access in
set_gbm_format function because that function called before output
enable function. By changing timing to set color format for primary
plane in this case, this issue fixes.
Signed-off-by: Tomohito Esaki <etom@igel.co.jp>
Daniel Stone [Fri, 6 Mar 2020 12:46:30 +0000 (12:46 +0000)]
pixman-renderer: Replace output-create flags with struct
pixman_renderer_output_create currently takes a flags enum bitmask for
its options. Switch this to using a structure, so we can introduce other
non-boolean options.
Signed-off-by: Daniel Stone <daniels@collabora.com>
Daniel Stone [Fri, 6 Mar 2020 13:04:18 +0000 (13:04 +0000)]
gl-renderer: Replace pbuffer-create args with struct
gl_rendererer's output_pbuffer_create has a lot of arguments now. Add a
structure for the options to make it more clear what is what.
This is in preparation for adding bare-integer arguments which are ripe
for confusion when passing positional arguments.
Signed-off-by: Daniel Stone <daniels@collabora.com>
Daniel Stone [Fri, 6 Mar 2020 13:04:18 +0000 (13:04 +0000)]
gl-renderer: Replace window-create args with struct
gl_rendererer's output_window_create has a lot of arguments now. Add a
structure for the options to make it more clear what is what.
This is in preparation for adding bare-integer arguments which are ripe
for confusion when passing positional arguments.
Signed-off-by: Daniel Stone <daniels@collabora.com>
Daniel Stone [Fri, 6 Mar 2020 13:04:18 +0000 (13:04 +0000)]
gl-renderer: Replace display-create args with struct
gl_rendererer's output_create has a lot of arguments now. Add a
structure for the options to make it more clear what is what.
This is in preparation for adding bare-integer arguments which are ripe
for confusion when passing positional arguments.
Signed-off-by: Daniel Stone <daniels@collabora.com>
Daniel Stone [Fri, 6 Mar 2020 11:07:15 +0000 (11:07 +0000)]
drm: Get renderer buffer size from drm_fb
The renderer buffer size is usually the same size as the current mode,
so we were taking the dimensions from the currently-set mode. However,
using current_mode is quite confusing in places when it comes to scale,
and it also hampers our ability to do mode switches, as well as to
introduce a future option which will let the renderer use a smaller
buffer than the output and display scaled.
Simply take the dimensions of the renderer's output buffer from the
buffer itself.
Signed-off-by: Daniel Stone <daniels@collabora.com>
Daniel Stone [Fri, 6 Mar 2020 11:03:14 +0000 (11:03 +0000)]
drm: Remove unnecessary condition in drm_output_render reuse
This condition inside drm_output_render() checks if we can reuse the
existing renderer buffer for the primary plane; this occurs in
mixed-mode composition where a client buffer promoted to a plane has
changed, but the primary plane is unchanged.
We accomplish this by checking if there is no damage on the
primary/renderer plane, and then if there is already a renderer buffer
active on the primary plane: in that case, we can reuse the buffer we
already have.
There was a further condition checking if the width and height were
identical. This was designed to prevent against issues on mode changes.
However, runtime mode changes are already quite broken, and a mode
change will also cause damage on the full plane. We can simply remove
this condition.
Signed-off-by: Daniel Stone <daniels@collabora.com>
Daniel Stone [Fri, 6 Mar 2020 11:03:01 +0000 (11:03 +0000)]
drm: Remove trailing whitespace
Signed-off-by: Daniel Stone <daniels@collabora.com>
Daniel Stone [Fri, 6 Mar 2020 13:11:41 +0000 (13:11 +0000)]
x11: Remove unnecessary NULL checks
Output and mode can never be NULL.
Signed-off-by: Daniel Stone <daniels@collabora.com>
Daniel Stone [Fri, 20 Mar 2020 14:50:52 +0000 (14:50 +0000)]
xdg-shell: More helpful surface-state-mismatch error
When libweston-desktop kills an xdg-shell client because it has failed
to configure its surface as demanded, be more helpful by explaining
exactly what the error is.
Signed-off-by: Daniel Stone <daniels@collabora.com>
Daniel Stone [Tue, 17 Mar 2020 21:52:28 +0000 (21:52 +0000)]
wayland-backend: Fully damage initial SHM buffer
In order to start the repaint loop, the Wayland backend tries to damage
the full SHM buffer, but doesn't actually damage the full area if we
have a frame.
Store the buffer's width and height alongside the buffer itself, so we
can damage the full area when required.
Signed-off-by: Daniel Stone <daniels@collabora.com>
Pekka Paalanen [Wed, 11 Mar 2020 15:43:44 +0000 (17:43 +0200)]
tests: add viewport test for repeat mode
This test ensures that
"pixman-renderer: half-fix bilinear sampling on edges"
keeps on working.
Unlike in the original report
https://gitlab.freedesktop.org/wayland/weston/issues/373, here we use buffer
scale 2 instead of output scale 2 to trigger bilinear filter. The effect is the
same, the actual resulting image in the failing case is just a little
different. This is so that it will be easy to add more viewport screenshooting
tests in this program in the future.
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
Pekka Paalanen [Wed, 11 Mar 2020 15:24:47 +0000 (17:24 +0200)]
tests: move fill_color into helpers
There will be a new test program that wants to share this code.
No behavioral changes.
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
Pekka Paalanen [Wed, 11 Mar 2020 15:11:03 +0000 (17:11 +0200)]
tests: move viewport creation into helpers
There will be a new test program using viewports and would like to share this
bit of code.
There are two behavioral changes:
- Compositor wp_viewporter interface version is no longer checked.
- client_create_viewport() does not leak the viewporter object.
test_viewporter_double_create needs to call bind_to_singleton_global() itself
so that the viewporter object still exists when the error event arrives.
Otherwise error verification fails.
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
Pekka Paalanen [Wed, 11 Mar 2020 13:21:04 +0000 (15:21 +0200)]
pixman-renderer: half-fix bilinear sampling on edges
When weston-desktop-shell uses a solid color for the wallpaper, it creates a
1x1 buffer and uses wp_viewport to scale that up to fullscreen. It's a very
nice memory saving optimization.
If you also have output scale != buffer scale, it means pixman-renderer chooses
bilinear filter. Arguably pixman-renderer should choose bilinear filter also
when wp_viewport implies scaling, but it does not. As w-d-s always sets buffer
scale from output scale, triggering the bilinear filter needs some effort.
What happens when you sample with bilinear filter from a 1x1 buffer, stretching
it to cover a big area? Depends on the repeat mode. The default repeat mode is
NONE, which means that samples outside of the buffer come out as (0,0,0,0).
Bilinear filter makes it so that every sampling point on the 1x1 buffer except
the very center is actually a mixture of the pixel value and (0,0,0,0). The
resulting color is no longer opaque, but the renderer and damage tracking
assume it is. This leads to the issue 373.
Fix half of the issue by using repeat mode PAD which corresponds to OpenGL
CLAMP_TO_EDGE. GL-renderer already uses CLAMP_TO_EDGE always.
This is only a half-fix, because composite_clipped() cannot actually be fixed.
It relies on repeat mode NONE to work. It would need a whole different approach
to rendering potentially non-axis-aligned regions exactly like GL-renderer.
Fixes: https://gitlab.freedesktop.org/wayland/weston/issues/373
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
Daniel Stone [Mon, 9 Mar 2020 16:26:34 +0000 (16:26 +0000)]
compositor: Fail on invalid transform for headless
As in
aaf35586f471, we want to fail when we are passed an invalid
transform name, not just blindly configure on using the normal
transform. The previous commit missed the callsite from the headless
backend's command-line parsing.
Fix this so that headless fails when an invalid transform is specified
on the command line.
Signed-off-by: Daniel Stone <daniels@collabora.com>
Pekka Paalanen [Thu, 5 Mar 2020 14:11:33 +0000 (16:11 +0200)]
tests: print image difference statistics
When a test fails and it produces a difference image, also compute the min/max
per-channel signed difference statistics. These numbers can be used to adjust
the fuzz needed for fuzzy_match_pixels() to pass. Otherwise one would have to
manually inspect the reference and result images and figure out the values.
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
Daniel Stone [Mon, 25 Nov 2019 23:41:04 +0000 (23:41 +0000)]
compositor: Use weston_head transform for output default
If the output only has a single weston_head attached to it, take its
declared transform as the default transform.
With the previous patches, this allows a device declaring the KMS 'panel
orientation' property (e.g. through DeviceTree) to autoconfigure to the
correct display rotation when running Weston.
Signed-off-by: Daniel Stone <daniels@collabora.com>
Lucas Stach [Mon, 25 Nov 2019 23:31:57 +0000 (23:31 +0000)]
backend-drm: Parse KMS panel orientation property, apply to weston_head
The KMS 'panel orientation' property allows the driver to statically
declare a fixed rotation of an output device. Now that weston_head has a
transform member, plumb the KMS property through to weston_head so the
compositor can make a smarter choice out of the box.
Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
[daniels: Extracted from one of Lucas's patches]
Signed-off-by: Daniel Stone <daniels@collabora.com>
Lucas Stach [Mon, 25 Nov 2019 23:29:31 +0000 (23:29 +0000)]
libweston: Add transform to weston_head
Like physical size, subpixel arrangement, etc, transform advises of a
physical transform of a head, if present.
This commit adds the transform member and setter to weston_head, however
it is currently unused.
Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
[daniels: Extracted from one of Lucas's patches.]
Signed-off-by: Daniel Stone <daniels@collabora.com>
Daniel Stone [Fri, 6 Mar 2020 21:45:50 +0000 (21:45 +0000)]
compositor: Fail output configuration on invalid transform
If an invalid transformation is provided for an output, fail the output
configuration rather than continuing on using whatever we chose as the
default transform.
After !383, this will result in configurations using the old definition
failing and exiting, rather than continuing on the wrong way around.
Signed-off-by: Daniel Stone <daniels@collabora.com>
Daniel Stone [Mon, 25 Nov 2019 23:35:36 +0000 (23:35 +0000)]
compositor: Fix default transforms when output section declared
Regardless of the default transform passed in, weston_parse_transform
would always return 'normal' if there was an output section. This is
because, if a section was declared for that output, it would ask
weston_config for the transform, with the default being 'normal'.
Fix it so we return the passed-in default transform when we have a
matching output section without a transform key. If the transform is
declared but invalid, we can remove the line resetting to the default
transform, because we've already set the default transform up top.
Signed-off-by: Daniel Stone <daniels@collabora.com>
Guillaume Champagne [Mon, 10 Feb 2020 16:35:21 +0000 (11:35 -0500)]
backend-rdp: enable undefined functions errors.
b_lundef was overriden for the RDP backend since it triggered linking
errors due to functions that were defined in a missing dependency. This
issue was fixed, so the override is removed. The global project's
linker parameters are now applied to the RDP backend.
Signed-off-by: Guillaume Champagne <champagne.guillaume.c@gmail.com>
Guillaume Champagne [Mon, 10 Feb 2020 16:34:25 +0000 (11:34 -0500)]
backend-rdp: fix unresolved symbols errors
The RDP backend uses functions defined by the Windows Portable Runtime
library (WinPR). The library's code is contained within FreeRDP
repository, but it is packaged as its own library (seperate pkg-config
file).
WinPR is added as a dependency to the RDP backend. The version 2.0 is
choosen as the version to on since the backend depends on FreeRDP 2.0.
Signed-off-by: Guillaume Champagne <champagne.guillaume.c@gmail.com>
Pekka Paalanen [Thu, 27 Feb 2020 15:04:45 +0000 (17:04 +0200)]
tests: add buffer transform tests
This patch continues the buffer and output transforms testing by iterating
through a representative selection of buffer transforms and scales.
For more details, see the previous patch "tests: add output transform tests".
https://gitlab.freedesktop.org/wayland/weston/issues/52
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
Pekka Paalanen [Tue, 21 Jan 2020 10:00:28 +0000 (12:00 +0200)]
tests: add output transform tests
This goes through all output transforms with two different buffer transforms
and verifies the visual output against reference images.
This commit introduces a new test input image 'basic-test-card.png'. It is a
small image with deliberately odd and indivisible dimensions to provoke bad
assumptions about image sizes. It contains red, green and blue areas which are
actually text that makes it very obvious if you have e.g. color channels
swapped. It has a white thick circle to highlight aspect ratio issues, and an
orange cross to show a mixed color. The white border is for contrast and a 1px
wide detail. The whole design makes it clear if the image happens to be rotated
or flipped in any way.
The image has one pixel wide transparent border so that bilinear sampling
filter near the edges of the image would produce the same colors with both
Pixman- and GL-renderers which handle the out-of-image samples fundamentally
differently: Pixman assumes (0, 0, 0, 0) samples outside of the image, while
GL-renderer clamps sample coordinates to the edge essentially repeating the
edge pixels.
It would have been "easy" to create a full matrix of
every output scale & transform x every buffer scale & transform, but that
would have resulted in 2 renderers * 8 output transforms * 3 output scales *
8 buffer transforms * 3 buffer scales = 1152 test cases that would have all
ran strictly serially because our test harness has no parallelism inside one
test program. That would have been slow to run, and need a lot more reference
images too.
Instead, I chose to iterate separately through all output scales & transforms
(this patch) and all buffer scales & transforms (next patch). This limits the
number of test cases in this patch to 56, and allows the two test programs to
run in parallel.
I did not even pick all possible scale & transform combinations here, but just
what I think is a representative sub-set to hopefully exercise all the code
paths.
https://gitlab.freedesktop.org/wayland/weston/issues/52
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
Pekka Paalanen [Wed, 19 Feb 2020 14:18:22 +0000 (16:18 +0200)]
tests: expand allowed pixel fuzz for GL
Running with Mesa 20.1.0-devel (git-
c7617d8908) GL renderer:
Radeon RX 550 Series (POLARIS11, DRM 3.27.0, 4.19.0-2-amd64, LLVM 8.0.1)
I found output-tranform test (a future patch) to produce exactly this much more
difference between Pixman and GL rendererers.
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
Pekka Paalanen [Fri, 24 Jan 2020 11:14:27 +0000 (13:14 +0200)]
tests: implement client_destroy()
It turns out that if the client is not explicitly destroyed, it will remain
connected until the compositor shuts down because there is no more a client
process that would terminate.
Usually this is not a problem, but if a test file has multiple screenshooting
tests, the windows from earlier tests in the file will remain on screen. That
is not wanted, hence implement client destruction.
To properly destroy a client, we also need a list of outputs. They used to be
simply leaked. This does not fix wl_registry.global_remove for wl_outputs, that
is left for a time when a test will actually need that.
This patch makes only ivi-shell-app test use the new client_destroy() to show
that it actually works. The added log scopes prove it: destroy requests get
sent. Sprinkling client_destroy() around in all other tests is left for a time
when it is actually necessary.
ivi-shell-app is a nicely simple test doing little else, hence I picked it.
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
Pekka Paalanen [Wed, 26 Feb 2020 11:04:48 +0000 (13:04 +0200)]
tests: re-order test naming pattern
The string from get_test_name() can be used for writing screenshot files and
others. Starting the name with the fixture number makes an alphabetized listing
of output files look unorganized.
Let's change the test name to begin with the test (source) name with fixture
and element numbers as suffixes. That makes a file listing easier to look
through, when you have multiple tests each saving multiple screenshot files.
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
Pekka Paalanen [Wed, 22 Jan 2020 11:37:20 +0000 (13:37 +0200)]
tests: add get_test_fixture_index()
A future test wants to access the fixture data array for the currently running
fixture index to log the test description. This patch provides access to the
array index.
Rather than adding more gloabl variables, I changed the type of the existing
one which feels slightly cleaner.
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
Pekka Paalanen [Wed, 22 Jan 2020 09:53:12 +0000 (11:53 +0200)]
tests: add scale and transform compositor options
With these, a test can initialize the headless-backend with non-default scale
and transform which allows testing output scales and transforms.
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
Pekka Paalanen [Wed, 22 Jan 2020 09:33:34 +0000 (11:33 +0200)]
compositor: add scale cmdline option for headless
The test suite wants to start using different output scales, and this is the
easiest API to configure it.
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
Pekka Paalanen [Wed, 22 Jan 2020 12:20:46 +0000 (14:20 +0200)]
tests: allow verify_screen_content() w/o ref image
Allow the reference image to be NULL or missing so that it does not even
attempt to load a reference image or compare it. You cannot just point the
reference image to an arbitrary image because the comparison functions can
abort due to size mismatch. This makes bootstrapping new tests easier when you
do not yet have a reference image.
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
Pekka Paalanen [Tue, 21 Jan 2020 13:37:14 +0000 (15:37 +0200)]
tests: rename check_screen() to verify_screen_content() + doc
The old name felt too... short.
The return type is changed to bool; fits better for a success/failure.
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
Pekka Paalanen [Wed, 22 Jan 2020 14:34:01 +0000 (16:34 +0200)]
tests: move check_screen() into client helpers
This will be useful in more tests.
No changes to the code, aside from dropping one 'static'.
Copyright 2017 is taken from git-blame of the moved code.
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
Pekka Paalanen [Thu, 6 Feb 2020 13:27:54 +0000 (15:27 +0200)]
Redefine output rotations
It was discovered in issue #99 that the implementations of the 90 and 270
degree rotations were actually the inverse of what the Wayland specification
spelled out. This patch fixes the libweston implementation to follow the
specification.
As a result, the behaviour of the the weston.ini transform key also changes. To
force all users to re-think their configuration, the transform key values are
also changed. Since Weston and libweston change their behaviour, the handling
of clients' buffer transform changes too.
All the functions had their 90/270 cases simply swapped, probably due to
confusion of whether WL_OUTPUT_TRANSFORM_* refers to rotating the monitor or
the content.
Hint: a key to understanding weston_matrix_rotate_xy(m, c, s) is that the
rotation matrix is formed as
c -s
s c
that is, it's column-major. This fooled me at first.
Fixing window.c fixes weston-terminal and weston-transformed.
In simple-damage, window_get_transformed_ball() is fixed to follow the proper
transform definitions, but the fix to the viewport path in redraw() is purely
mechanical. The viewport path looks broken to me in the presence of any
transform, but it is not this patch's job to fix it.
Screen-share fix just repeats the general code fix pattern, I did not even try
to understand that bit.
https://gitlab.freedesktop.org/wayland/weston/issues/99
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
Pekka Paalanen [Fri, 14 Feb 2020 12:50:03 +0000 (14:50 +0200)]
libweston: document weston_transformed_*()
Clarifies which direction the transformation happens. All exported function
need documentation.
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
Pekka Paalanen [Fri, 14 Feb 2020 12:20:05 +0000 (14:20 +0200)]
clients: transformed does not recognize -d
It has no such command line option.
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
Veeresh Kadasani [Thu, 6 Feb 2020 02:00:21 +0000 (11:00 +0900)]
ivi-application: fix grammar
Signed-off-by: Veeresh Kadasani <external.vkadasani@jp.adit-jv.com>
ahe [Wed, 19 Feb 2020 18:43:52 +0000 (19:43 +0100)]
fullscreen-shell/fullscreen-shell.c: prevent seat_created() from being called with l == NULL
Pekka Paalanen [Mon, 17 Feb 2020 15:30:41 +0000 (17:30 +0200)]
Revert "CI: do not attempt to test GL-renderer"
This reverts commit
1eae54714fd2ae38756b24ddc58a7d55bec5d14d.
We install a fixed Mesa into the CI image, so these tests can pass now.
Fixes: https://gitlab.freedesktop.org/wayland/weston/issues/358
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
Pekka Paalanen [Mon, 17 Feb 2020 13:32:18 +0000 (15:32 +0200)]
CI: build a Mesa shapshot for getImage/putImage on pbuffer swrast
https://gitlab.freedesktop.org/mesa/mesa/commit/
c7617d8908a970124321ce731b43d5996c3c5775
is necessary for running GL-renderer with llvmpipe in Gitlab CI.
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
Scott Anderson [Fri, 20 Dec 2019 02:07:43 +0000 (15:07 +1300)]
gl-renderer: Move EGL display creation to egl-glue.c
It makes more sense for it to be there instead.
Signed-off-by: Scott Anderson <scott.anderson@collabora.com>
Scott Anderson [Fri, 20 Dec 2019 01:55:39 +0000 (14:55 +1300)]
gl-renderer: Move platform extension checks to EGL client setup
This removes the duplicate checks for EGL_EXT_platform_base.
Signed-off-by: Scott Anderson <scott.anderson@collabora.com>
Scott Anderson [Fri, 20 Dec 2019 01:39:38 +0000 (14:39 +1300)]
gl-renderer: Move get_platform_display to EGL client setup
This is to put more of the EGL client extension handling in the same
place. This also adds a boolean to check if EGL_EXT_platform_base is
supported, similar to other extensions we check.
Signed-off-by: Scott Anderson <scott.anderson@collabora.com>
Scott Anderson [Fri, 20 Dec 2019 01:28:44 +0000 (14:28 +1300)]
gl-renderer: Move EGL client extension handling earlier
EGL client extensions are not tied to the EGLDisplay we create, and have
an effect on how we create the EGLDisplay. Since we're using this to
look for EGL_EXT_platform_base, it makes more sense for this to be near
the start of the GL renderer initialization.
Signed-off-by: Scott Anderson <scott.anderson@collabora.com>
Simon Ser [Mon, 10 Feb 2020 14:49:20 +0000 (15:49 +0100)]
clients/window: fail earlier when frame_create fails
This adds a new NULL check to fail earlier when frame_create fails. This can
happen because PNG files couldn't be loaded from the data directory.
Signed-off-by: Simon Ser <contact@emersion.fr>
Leandro Ribeiro [Tue, 4 Feb 2020 02:45:59 +0000 (23:45 -0300)]
weston-log-wayland: make stream_destroy() use weston_log_subscriber_release()
Make stream_destroy() use weston_log_subscriber_release().
This avoids code duplication and allow us to destroy
weston_log_subscriber_get_only_subscription(), since it's
being used only in this case and it's internal.
Calls for weson_log_subscriber_release() leads to
weston_log_debug_wayland_to_destroy(), which should not
send an error event when the stream has already been closed.
Also, stream_destroy() shouldn't lead to an event error, as
it is a wl_resource destroy handler. So close the stream before
calling weston_log_subscriber_release() in stream_destroy()
Signed-off-by: Leandro Ribeiro <leandrohr@riseup.net>
Leandro Ribeiro [Tue, 4 Feb 2020 03:05:47 +0000 (00:05 -0300)]
compositor: destroy log context only after the destruction of subscribers
Before commit "weston-log: destroy subscriptions with
destruction of subscribers", we had to destroy subscribers
before the log context. Currently there's no required order,
both are valid.
But since we've created log context before the subscribers,
we can destroy it after them. This is a style change and
also a prove that now this order is valid as well.
Signed-off-by: Leandro Ribeiro <leandrohr@riseup.net>
Leandro Ribeiro [Fri, 7 Feb 2020 19:06:19 +0000 (16:06 -0300)]
weston-log: share code between weston_log_scope_destroy() and weston_log_subscriber_release()
Both weston_log_scope_destroy() and weston_log_subscriber_release()
have calls for destroy_subscription(). We can move this call to
weston_log_subscription_destroy() without losing anything and
avoiding repetition.
Signed-off-by: Leandro Ribeiro <leandrohr@riseup.net>
Leandro Ribeiro [Tue, 4 Feb 2020 01:59:16 +0000 (22:59 -0300)]
weston-log: destroy subscriptions with destruction of subscribers
The subscription is directly related to both the log scope and
the subscriber. It makes no sense to destroy one of them and
keep the subscriptions living.
We only had code to destroy subscription with
the destruction of log scopes. Add code to destroy
subscriptions with destruction of subscribers.
Signed-off-by: Leandro Ribeiro <leandrohr@riseup.net>
Leandro Ribeiro [Thu, 6 Feb 2020 19:43:51 +0000 (16:43 -0300)]
weston-log: merge functions that destroy different types of subscribers
Log subscriber API is not type-safe. File and flight recorder
subscribers are created with functions that return
weston_log_subscriber objects. But there's a problem: to destroy
these objects you have to call the right function for each type
of subscriber, and a user calling the wrong destroy function
wouldn't get a warning.
Merge functions that destroy different types of subscribers, making
the log subscriber API type-safe.
Signed-off-by: Leandro Ribeiro <leandrohr@riseup.net>
Leandro Ribeiro [Thu, 6 Feb 2020 18:41:32 +0000 (15:41 -0300)]
weston-log: rename weston_log_subscriber::destroy to destroy_subscription
weston_log_subscriber has a member named destroy. There are
other structs (weston_output, for instance) that have this
member, and by convention it is a pointer to a function
that destroys the struct.
In weston_log_subscriber it is being used to destroy
subscriptions of the debug protocol, and not the subscriber,
so this name is misleading. Rename it to destroy_subscription.
Signed-off-by: Leandro Ribeiro <leandrohr@riseup.net>
Philipp Zabel [Tue, 4 Feb 2020 23:40:01 +0000 (00:40 +0100)]
build: add rpath to modules that use symbols from libexec_weston
The cms-static, desktop-shell, hmi-controller, ivi-shell, and screen-share
modules use symbols from libexec_weston, e.g.:
$ ldd /usr/lib/x86_64-linux-gnu/weston/desktop-shell.so | grep "not found"
libexec_weston.so.0 => not found
Loading these modules from weston happens to work because the weston executable
itself links against libexec_weston, and has an rpath set. Still, these modules
depend on a library in a non-standard location. Adding an rpath could help
static checkers to make sure all shared objects' dependencies are present.
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Pekka Paalanen [Mon, 25 Nov 2019 13:17:56 +0000 (15:17 +0200)]
tests: run subsurface-shot on GL too
This adds the necessary fuzz to image matching to let GL-renderer pass.
The difference is due to rounding. weston-test-desktop-shell.c uses
weston_surface_set_color(dts->background_surface, 0.16, 0.32, 0.48, 1.);
to set the background color. Pixman-renderer will truncate those to uint8, but
GL-renderer seems to round instead, which causes the +1 in background color
channel values.
0.16 * 255 = 40.8
0.32 * 255 = 81.6
0.48 * 255 = 122.4
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
Pekka Paalanen [Tue, 4 Feb 2020 15:03:07 +0000 (17:03 +0200)]
CI: do not attempt to test GL-renderer
Because of https://gitlab.freedesktop.org/mesa/mesa/issues/2219 it would crash,
so disable GL-renderer.
https://gitlab.freedesktop.org/wayland/weston/issues/358 shall revert this.
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
Pekka Paalanen [Tue, 4 Feb 2020 14:59:59 +0000 (16:59 +0200)]
build: add test-gl-renderer option
This shall be used by CI due to https://gitlab.freedesktop.org/mesa/mesa/issues/2219
It defaults to true, meaning that people by default will be running the
GL-renderer tests. It works fine on hardware drivers, just not llvmpipe.
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
Pekka Paalanen [Mon, 25 Nov 2019 12:54:06 +0000 (14:54 +0200)]
tests: add range argument for fuzzy image matching
The fuzzy range will be used with GL-renderer testing, as it may produce
slightly different images than Pixman-renderer yet still correct results.
Such allowed differences are due to different rounding.
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
Pekka Paalanen [Fri, 13 Dec 2019 09:47:18 +0000 (11:47 +0200)]
weston-log-flight-rec: allow re-running a compositor
weston_primary_flight_recorder_ring_buffer needs to be cleared on destruction
of the subscriber it was assigned from so that a compositor and be re-executed
in-process (static variables do not get re-initialized automatically).
This will be used by the test harness when it will execute wet_main() multiple
times in the same process. Otherwise it would hit the assert in
weston_log_subscriber_create_flight_rec().
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
Sebastian Wick [Wed, 5 Feb 2020 09:27:23 +0000 (10:27 +0100)]
shared: guard all the seal logic behind HAVE_MEMFD_CREATE
The initial version of os_ro_anonymous_file missed two guards around the
seal logic which leads to a compilation error on older systems.
Also make the check for a read-only file symmetric in
os_ro_anonymous_file_get_fd and os_ro_anonymous_file_put_fd.
Signed-off-by: Sebastian Wick <sebastian@sebastianwick.net>
Guillaume Champagne [Mon, 3 Feb 2020 00:59:52 +0000 (19:59 -0500)]
tests: release resources on compositor destruction
Releases touch devices and seat if they were allocated, clean up the
layers and free the weston_test structure.
Signed-off-by: Guillaume Champagne <champagne.guillaume.c@gmail.com>
Guillaume Champagne [Mon, 3 Feb 2020 00:45:36 +0000 (19:45 -0500)]
headless: fix uninitialized variable
`no_outputs` is declared on the stack and left uninitialized if no
weston option changing its value is provided.
Signed-off-by: Guillaume Champagne <champagne.guillaume.c@gmail.com>
Daniel Stone [Mon, 3 Feb 2020 20:01:21 +0000 (20:01 +0000)]
gl-renderer: Avoid double-free on init failure
If gl-renderer fails its initialisation, we return to compositor
teardown, which will try to free the renderer if ec->renderer was set.
This is unfortunate when we've already torn it down whilst failing
gl-renderer init, so just clear the renderer member so we don't try to
tear down twice.
Signed-off-by: Daniel Stone <daniels@collabora.com>
Reported-by: Emil Velikov <emil.velikov@collabora.com>
Daniel Stone [Mon, 3 Feb 2020 20:00:54 +0000 (20:00 +0000)]
gl-renderer: Fail earlier if shader compilation fails
If we can't compile our shaders, there's no point trying to link them.
Signed-off-by: Daniel Stone <daniels@collabora.com>
James Hilliard [Sun, 2 Feb 2020 03:02:29 +0000 (20:02 -0700)]
unconditionally include sys/mman.h in os-compatibility.c
Fixes:
../shared/os-compatibility.c:273:25: error: ‘PROT_READ’ undeclared (first use in this function); did you mean ‘LOCK_READ’?
map = mmap(NULL, size, PROT_READ | PROT_WRITE, MAP_SHARED, file->fd, 0);
^~~~~~~~~
LOCK_READ
Signed-off-by: James Hilliard <james.hilliard1@gmail.com>
Stefan Agner [Thu, 14 Nov 2019 22:55:35 +0000 (23:55 +0100)]
launcher-weston-launch: avoid race condition when switching VT merge
When using weston-launch launcher deactivating the VT is sometimes
racy and leads to Weston still being displayed. The launcher-direct.c
backend makes sure that the session signal is emitted first, then DRM
master is dropped and finally the VT switch is acknowledged via
VT_RELDISP.
However, in the weston-launch case the session signal is emitted via
a socket message to the weston process, which might get handled a bit
later. This leads to dropping DRM master and acknowledging the VT
switch prematurely.
Add a socket message which allows weston to notify weston-launch that
the signal has been emitted and deactivating can be proceeded.
Signed-off-by: Stefan Agner <stefan@agner.ch>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Stefan Agner [Wed, 22 Jan 2020 21:40:19 +0000 (22:40 +0100)]
launcher-weston-launch: move send loop into separate function
Create a separate function handling the send loop. This allows to reuse
the same code later on.
Signed-off-by: Stefan Agner <stefan@agner.ch>
Stefan Agner [Thu, 14 Nov 2019 22:39:40 +0000 (23:39 +0100)]
weston-launch: reset tty properly
On weston-launch exit we see errors such as:
failed to restore keyboard mode: Invalid argument
failed to set KD_TEXT mode on tty: Invalid argument
This has been resolved by making sure the tty file descriptor
does not get closed. However, the ioctrl's KDSKBMODE/KDSETMODE
and VT_SETMODE still fail with -EIO:
failed to restore keyboard mode: Input/output error
failed to set KD_TEXT mode on tty: Input/output error
It turns out the reason for this lies in some very particular
behavior of the kernel, the separation of weston-launch/weston
and the fact that we restore the tty only after the weston
process quits: When the controlling process for a TTY exits,
all open file descriptors for that TTY are put in a hung-up
state! For more details see this systemd-logind issue:
https://github.com/systemd/systemd/issues/989
We can work around by reopening the particular TTY. This allows
to properly restore the TTY settings such that a successive VT
switch will show text terminals fine again.
Signed-off-by: Stefan Agner <stefan@agner.ch>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Stefan Agner [Wed, 22 Jan 2020 21:23:07 +0000 (22:23 +0100)]
weston-launch: check string truncation
Since weston-launch is a setuid-root program we should be extra careful:
Check for a potential string trunction. Move the check in a separate
function and return with error in case trunction has happened.
Signed-off-by: Stefan Agner <stefan@agner.ch>
Stefan Agner [Thu, 14 Nov 2019 22:29:09 +0000 (23:29 +0100)]
weston-launch: make sure weston-launch activates the VT
Currently weston-launch does not activate the VT when opening the
terminal directly (e.g. using --tty=/dev/tty7). Weston takes full
control over the terminal by switching it to graphical mode etc.
However, the old VT stays active as can be seen when looking at
sysfs:
# cat /sys/class/tty/tty0/active
tty1
Always switch to the new VT to make sure the correct VT is active.
This aligns with how TTY setup is implemented in launcher-direct.c.
Signed-off-by: Stefan Agner <stefan@agner.ch>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Stefan Agner [Wed, 22 Jan 2020 23:53:31 +0000 (00:53 +0100)]
weston-launch: fix newline in error message
Add newline character at the end of the error message to make sure we
get a new line after this error has been printed.
Fixes:
a1450a8a71ef ("make error() portable")
Signed-off-by: Stefan Agner <stefan@agner.ch>
Stefan Agner [Wed, 22 Jan 2020 23:37:16 +0000 (00:37 +0100)]
weston-launch: get ttynr also when no user is given
In case an user is given but no tty, the code opens tty0 to allocate a
new tty. With that ttynr is known.
In case a tty name is given the user must be given too. In this case
we later recover the ttynr by using stat on the file tty file descriptor
which allows as to find the ttynr by looking at the devices minor number.
However, the third case, when no user and no tty name is given, we do
not get the ttynr.
This hasn't been a problem in practise since ttynr has not been used.
However, it makes sense to get the ttynr always for consistency. Also
upcomming fixes will start to make use of ttynr.
Fixes:
636156d5f693 ("weston-launch: Don't start new session unless -u is given")
Signed-off-by: Stefan Agner <stefan@agner.ch>
Stefan Agner [Thu, 14 Nov 2019 21:07:27 +0000 (22:07 +0100)]
weston-launch: do not close tty prematurely
The tty file descriptor is used in signal handling (when switching
VT via SIGUSR1/SIGUSR2 for the VT_RELDISP ioctrl) and in quit() when
weston-launch exits for the KDSKBMUTE/KDSKBMODE/KDSETMODE/VT_SETMODE
ioctrls.
This fixes VT switching when using weston-launch from a non-VT shell
(e.g. ssh or from within a container).
Signed-off-by: Stefan Agner <stefan@agner.ch>
Pekka Paalanen [Wed, 13 Nov 2019 14:47:40 +0000 (16:47 +0200)]
tests: remove tests_weston and WESTON_TEST_CLIENT_PATH
This test category is empty, so it and all the supporting code can go.
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
Pekka Paalanen [Wed, 13 Nov 2019 14:41:46 +0000 (16:41 +0200)]
tests: migrate xwayland
Move xwayland test to the new harness.
This is the only test that can actually skip. It does it by exit(77) and that
is fine, because there is only one test case in the file so far. To get rid of
the exit() calls we need to return a value from the TEST() function but that is
a big surgery for another time.
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
Pekka Paalanen [Wed, 13 Nov 2019 14:28:20 +0000 (16:28 +0200)]
tests: migrate linux-explicit-synchronization
Moved to the new test harness.
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
Pekka Paalanen [Wed, 13 Nov 2019 13:45:10 +0000 (15:45 +0200)]
tests: migrate client tests
This migrates all the client tests that have nothing special in them to the new
test harness.
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
Pekka Paalanen [Wed, 13 Nov 2019 13:35:22 +0000 (15:35 +0200)]
tests: migrate devices
The devices test was actually using the defaults instead of
weston-test-desktop-shell in meson.build, so this patch keeps it that way.
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
Pekka Paalanen [Wed, 13 Nov 2019 12:39:22 +0000 (14:39 +0200)]
meson: remove tests_weston_plugin
All plugin tests have been converted to the new harness, so the old definition
can be removed.
The one remaining test surface-screenshot is a manual test, the plugin only
installs a debug key binding. Hence it is open-coded as a normal plugin, not as
a test.
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
Pekka Paalanen [Wed, 13 Nov 2019 12:20:45 +0000 (14:20 +0200)]
tests: migrate surface, surface-global
These are normal plugin tests, moved to the new harness.
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
Pekka Paalanen [Mon, 11 Nov 2019 15:29:41 +0000 (17:29 +0200)]
tests: migrate internal-screenshot
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
Pekka Paalanen [Mon, 11 Nov 2019 15:17:57 +0000 (17:17 +0200)]
tests: migrate ivi-shell-app
Moving to the new test harness.
Carrying the test ini file still just to keep it the same even though I
accidentally noticed the test succeeds also with --no-config.
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
Pekka Paalanen [Mon, 11 Nov 2019 14:28:28 +0000 (16:28 +0200)]
tests: migrate ivi-layout-internal
Moving to the new harness.
It would be possible to convert every case here into a separate PLUGIN_TEST,
but I did not see the value in that at this time.
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
Pekka Paalanen [Mon, 11 Nov 2019 13:30:07 +0000 (15:30 +0200)]
tests: migrate ivi-layout-test
The ivi-layout-test comprises of two halves: the client and the plugin. This
migrates the test to the new test harness.
In the old harness, the plugin was built as the test in meson.build and it fork
& exec'd the client part. In the new harness client tests start from the client
program which sets up the compositor in-process, so now the client is built as
the test in meson.build and the plugin is just an additional file.
Therefore there is not need for the plugin for fork & exec anything anymore, so
all that code is removed.
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
Pekka Paalanen [Thu, 7 Nov 2019 10:59:30 +0000 (12:59 +0200)]
tests: migrate string and vertex-clip
These are the only remaining standalone non-ZUC tests. They do not need any
changes to be built with the new harness - in fact they have already been
running through the new harness.
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
Pekka Paalanen [Mon, 18 Nov 2019 14:13:19 +0000 (16:13 +0200)]
doc: overview of the test suite
This should lower the barrier to entry for writing more tests.
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
Pekka Paalanen [Fri, 1 Nov 2019 13:39:30 +0000 (15:39 +0200)]
tests: stop relying on environment in the new harness
Instead of relying on Meson setting up environment so that Weston and tests
find all their files, build those values into the tests. This way one can
execute a test program successfully wihtout Meson, simply by running it.
The old environment variables are still honoured if set. This might change in
the future.
Baking the source or build directory paths into the tests should not regress
reproducible builds, because the binaries where test-config.h values are used
will not be installed.
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
Pekka Paalanen [Fri, 1 Nov 2019 12:02:15 +0000 (14:02 +0200)]
tests: thread-based client harness
This replaces the old test harness with a new one.
The old harness relied on fork()'ing each test which makes tests independent,
but makes debugging them harder. The new harness runs client code in a thread
instead of a new process. A side-effect of not fork()'ing anymore is that any
failure will stop running a test series short. Fortunately we do not have any
tests that are expected to crash or fail.
The old harness executed 'weston' from Meson, with lots of setup as both
command line options and environment variables. The new harness executes
wet_main() instead: the test program itself calls the compositor main function
to execute the compositor in-process. Command line arguments are configured in
the test program itself, not in meson.build. Environment variables aside, you
are able to run a test by simply executing the test program, even if it is a
plugin test.
The new harness adds a new type of iteration: fixtures. For now, fixtures are
used to set up the compositor for tests that need a compositor. If necessary, a
fixture setup may include a data array of arbitrary type for executing the test
series for each element in the array. This will be most useful for running
screenshooting tests with both Pixman- and GL-renderers.
The new harness outputs TAP formatted results into stdout. Meson is not
switched to consume TAP yet though, because it would require a Meson version
requirement bump and would not have any benefits at this time. OTOH outputting
TAP is trivial and sets up a clear precedent of random test chatter belonging
to stderr.
This commit migrates only few tests to actually make use of the new features:
roles is a basic client test, subsurface-shot is a client test that
demonstrates the fixture array, and plugin-registry is a plugin test. The rest
of the tests will be migrated later.
Once all tests are migrated, we can remove the test-specific setup from
meson.build, leaving only the actual build instructions in there.
The not migrated tests and stand-alone tests suffer only a minor change: they
no longer fork() for each TEST(), otherwise they keep running as before.
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
Pekka Paalanen [Thu, 31 Oct 2019 15:20:17 +0000 (17:20 +0200)]
tests: move exit() from run_test()
I will be able to re-use this function if it does not call exit() itself.
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
Pekka Paalanen [Fri, 25 Oct 2019 10:57:10 +0000 (13:57 +0300)]
compositor: add test suite data
Allow to set and get one opaque pointer. The test suite will then use this to
pass data from the test runner to the test plugin, so that the plugin can then
run what it needs to. This is useful when the test runner calls wet_main()
directly instead of forking a compositor.
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
Leandro Ribeiro [Mon, 27 Jan 2020 22:12:01 +0000 (19:12 -0300)]
libweston: fold weston_compositor_tear_down() into weston_compositor_destroy()
The only reason why we have both weston_compositor_tear_down() and
weston_compositor_destroy() is that the only we had to destroy
the log context was keeping weston_compositor alive and calling
weston_log_ctx_compositor_destroy().
After commit "weston-log: replace weston_log_ctx_compositor_destroy()
by weston_log_ctx_destroy()", it's not necessary to keep a zombie
weston_compositor just to be able to call
weston_log_ctx_compositor_destroy().
Fold weston_compositor_tear_down() into weston_compositor_destroy(),
as this split is useless now.
Signed-off-by: Leandro Ribeiro <leandrohr@riseup.net>