1
0
Fork 0
Commit graph

32463 commits

Author SHA1 Message Date
Bilal Elmoussaoui
aa0600bf27 cogl: Remove Framebuffer:stereo-mode
Nothing was setting it

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3806>
2024-06-14 12:12:33 +02:00
Bilal Elmoussaoui
9097deb69d cogl: Remove various Framebuffer functions
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3806>
2024-06-14 12:12:33 +02:00
Bilal Elmoussaoui
2c996a1b16 build/cogl: Simplify debug c-args
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3806>
2024-06-14 12:12:33 +02:00
Bilal Elmoussaoui
e79f460eb8 cogl: Remove FrameBuffer CoglObject leftover
Fixes: eb14da387 ("cogl: Turn CoglFramebuffer, CoglOffscreen and
CoglOnscreen into GObjects")

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3806>
2024-06-14 12:12:33 +02:00
Daniel van Vugt
e951265806 backends: Handle null views instead of creating dummy views
If view initialization fails then don't add the view, rather than
adding a dummy offscreen view. This avoids flooding the log with
offscreen frame clock confusion:

Before:
```
libmutter-WARNING **: 15:47:27.763: Failed to allocate onscreen framebuffer for /dev/dri/card0: Failed to allocate surface: Function not implemented
Clutter-WARNING **: 15:47:28.557: (../clutter/clutter/clutter-frame-clock.c:419):clutter_frame_clock_notify_presented: code should not be reached
Clutter-WARNING **: 15:47:28.563: (../clutter/clutter/clutter-frame-clock.c:419):clutter_frame_clock_notify_presented: code should not be reached
Clutter-WARNING **: 15:47:28.567: (../clutter/clutter/clutter-frame-clock.c:419):clutter_frame_clock_notify_presented: code should not be reached
(repeats forever)

```

After:
```
libmutter-WARNING **: 16:09:04.945: Failed to create view for Unknown 46" on None-1: Failed to allocate onscreen framebuffer for /dev/dri/card0: Failed to allocate surface: Function not implemented
```

Relates to:
https://launchpad.net/bugs/1967707
https://gitlab.gnome.org/GNOME/mutter/-/issues/2489
https://gitlab.gnome.org/GNOME/mutter/-/issues/2295

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3115>
2024-06-14 16:12:52 +08:00
Daniel van Vugt
b684b5cf05 build: Compile schemas locally for use in build tests
So they don't need to be installed system-wide before build testing
can work.

Closes: https://gitlab.gnome.org/GNOME/mutter/-/issues/3368
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3800>
2024-06-13 22:14:51 +00:00
Marco Trevisan (Treviño)
3b3feefcd5 ci: Save gnome-shell meson logs artifacts on failure
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3793>
2024-06-13 21:21:49 +00:00
Marco Trevisan (Treviño)
3e6cf75eec tests/cogl/read-texture-formats: Do not skip any test when using AMD
All the tests are correctly passing with an AMD card, so let's enable
them all in such case, so we can catch when the test will regress even
there

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3793>
2024-06-13 21:21:49 +00:00
Marco Trevisan (Treviño)
18fa5bd81e tests/cogl/journal: Use different behavior when running in AMD
AMD driver is buggy when it comes to generate textures of 1px height [1]
while this is not a mutter problem, we should not block on that either.

So, given that the test purpose is to check the journal flushing during
unref more than its behavior, we can still check this in all the drivers
keeping a warning in the AMD case.

See: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11269
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3793>
2024-06-13 21:21:49 +00:00
Marco Trevisan (Treviño)
03ef333937 cogl/context: Add test util function to get the GL/GLES driver vendor
Some tests sadly behaves differently depending on the driver in use.
While this shouldn't happen we can't block on these driver issues, so
add a test utils private function to get the driver information so that
we can adapt test behavior depending on this.

This will allow to disable / enable tests at runtime instead of failing
in all the implementations, which is still better for catching
regressions in the parts we may be ignoring otherwise.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3793>
2024-06-13 21:21:49 +00:00
Marco Trevisan (Treviño)
615fe1e703 tests/cogl/conform: Skip known failing tests parts in undefined mode
When running the tests in non-undefined mode we should skip the known
failing tests instead of the whole suite, so mark them as such so that
we can still run the tests partially checking the things that still
work, avoiding to regress on them too.

We also run the tests in normal mode so that we can ensure that the
failures are still happening in that way.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3793>
2024-06-13 21:21:49 +00:00
Marco Trevisan (Treviño)
ed35ff72e0 tests/cogl/conform: Run known failures tests in no-undefined mode
In this way we can just skip the single test cases that are failing

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3793>
2024-06-13 21:21:49 +00:00
Marco Trevisan (Treviño)
9c181e2407 tests/cogl/read-texture-formats: Split tests by cases to improve logging
Use multiple test cases for each format test so that it's easier to
understand what's failing and in case just skip a single test.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3793>
2024-06-13 21:21:49 +00:00
Marco Trevisan (Treviño)
bce00cb9f4 tests/cogl: Add cogl winsys debug info when running tests
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3793>
2024-06-13 21:21:49 +00:00
Marco Trevisan (Treviño)
504e0386cc ci: Do not run create runtime dir on script setup
We do this per each test now.

As per this we need to ensure that one exists when running the virtme
tests

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3793>
2024-06-13 21:21:49 +00:00
Marco Trevisan (Treviño)
fec38819ac tests/dbusrunner: Use separate HOME, Temp and XDG Runtime dirs
We need to use a different $XDG_RUNTIME_DIR path to be able to start most
tests in parallel, and we can use a temporary directory for that which python
cleans up when done.

Also, given that most of settings are stored in HOME use temporary one
for that too, to prevent mutter to fail because it may load some local
configuration (e.g. monitors.xml) that don't meet the expectations or
that may change the test behavior in an unexpected way.

As per this, CI needs to be adapted for new args handling

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3793>
2024-06-13 21:21:49 +00:00
Marco Trevisan (Treviño)
adc43ba001 ci: Launch pipewire through the meta-dbus-runner
We can just launch pipewire first and then wireplumber so that the test
script can be simplified

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3793>
2024-06-13 21:21:49 +00:00
Marco Trevisan (Treviño)
d01d153f56 tests/dbusrunner: Print the subprocess PID that has been launched
It can be useful for debugging purposes

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3793>
2024-06-13 21:21:49 +00:00
Marco Trevisan (Treviño)
c6631077d7 backend/native: Ignore not found errors when adding drm device in headless
When testing mutter using `META_DBUS_RUNNER_WRAPPER=rr` we may get a
not found-device error, given that it's not a case we support, we can
ignore it as we do with permission denied one, limiting this to the RR
case.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3793>
2024-06-13 21:21:49 +00:00
Marco Trevisan (Treviño)
2a1cc195a3 tests/dbusrunner: Add shortcut for recording with rr
RR now supports mutter, as per some upstream fixes [1], so we can add a
simple shortcut for the recorder

[1] https://github.com/rr-debugger/rr/pull/3140/

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3793>
2024-06-13 21:21:49 +00:00
Bilal Elmoussaoui
3e363a5421 cogl/pipeline-debug: Use Color helper to get a string representation
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3544>
2024-06-13 21:19:54 +02:00
Bilal Elmoussaoui
730783b670 clutter: Remove Color type
As it is no longer used now

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3544>
2024-06-13 15:25:40 +02:00
Bilal Elmoussaoui
531072d482 clutter: Implement interval progress for CoglColor
For that, rename clutter-graphene and use that C file to define all the
progress functions

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3544>
2024-06-13 15:25:40 +02:00
Bilal Elmoussaoui
99415aad4b cogl/tests: Try harder to avoid floating points issues
Comes from the conversions between floats and integers all over Color usage.
Although, those changes should simplify a future change of the Color API to floats.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3544>
2024-06-13 15:25:40 +02:00
Bilal Elmoussaoui
e93fe16241 tests: Move color conform tests from clutter
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3544>
2024-06-13 14:45:53 +02:00
Bilal Elmoussaoui
93ded65b7d cogl: Make sure alpha is correctly set for hsla Colors
As the color is initiallized with init_from_hls which always sets
alpha to 1.0

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3544>
2024-06-13 14:45:53 +02:00
Bilal Elmoussaoui
dc52ccc75a cleanup: Port from ClutterColor to CoglColor
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3544>
2024-06-13 14:45:53 +02:00
Bilal Elmoussaoui
5851738db4 cogl: Stop hardcoding Color size
Especially that the fields are public now and with a potential
migration to floats.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3544>
2024-06-13 14:45:53 +02:00
Bilal Elmoussaoui
5f22fddc26 cogl: Make Color fields public
To simplify the porting to CoglColor in the future as ClutterColor
fields are public

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3544>
2024-06-13 14:45:53 +02:00
Bilal Elmoussaoui
a12e707324 cogl: Implement transform from/to string for CoglColor values
Same as previous commits

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3544>
2024-06-13 14:45:53 +02:00
Bilal Elmoussaoui
28f702ce1a cogl: Copy ColorParamSpec from clutter
Follow up of previous commit

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3544>
2024-06-13 14:45:53 +02:00
Bilal Elmoussaoui
ac3aa35489 cogl: Add missing functions from ClutterColor to CoglColor
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3544>
2024-06-13 14:45:53 +02:00
Sebastian Wick
8709fc5353 wayland: Bump connection buffer size to 1MB
Let's increase the connection buffer size a bit to avoid killing
clients which stall just for a few ms when they receive high
frequency input updates.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3693>
2024-06-13 11:58:14 +00:00
Jonas Dreßler
530659c643 tests/clutter/conform: Wait for stage update right after showing stage
Showing the stage always results in an initial update being queued. If the
virtual input events from the test ends up being dispatched after that, the
`wait_for_update()` checks gets out of sync, as the first update ended up
waiting for the initial update, not the one from the input event.

Fix the gesture test by adding another call to `wait_stage_updated()` right
after `clutter_actor_show()`.

Closes: https://gitlab.gnome.org/GNOME/mutter/-/issues/3521
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3795>
2024-06-12 18:45:29 +00:00
Bilal Elmoussaoui
408cb6ee57 clutter: Drop Color.to_pixel
Keep the function around as Color.hash

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3802>
2024-06-12 16:25:18 +00:00
Bilal Elmoussaoui
74ece2ad92 clutter: Drop various Color constructors
The fields are writable, there is no need to provide a custom constructor.
This shapes the Color API to be similar to GdkRGBA

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3802>
2024-06-12 16:25:18 +00:00
Bilal Elmoussaoui
04842393aa clutter: Drop Color.from_pixel
Goes along with https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3367
Helps https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3544

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3802>
2024-06-12 16:25:18 +00:00
Jonas Ådahl
9d11cc679e screen-cast/window: Only record cursor updates if anything changed
If we're doing a cursor-only update, only actually do it if anything
changed relative to the stream itself.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3803>
2024-06-12 15:11:04 +00:00
Jonas Ådahl
897c535bd8 screen-cast/monitor: Only record cursor updates if anything changed
If we're doing a cursor-only update, only actually do it if anything
changed relative to the stream itself.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3803>
2024-06-12 15:11:04 +00:00
Jonas Ådahl
dd8a503f3d screen-cast/area: Only record cursor updates if anything changed
If we're doing a cursor-only update, only actually do it if anything
changed relative to the stream itself.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3803>
2024-06-12 15:11:04 +00:00
Jonas Ådahl
bbd59ab9e6 screen-cast/virtual: Only record cursor updates if anything changed
If we're doing a cursor-only update, only actually do it if anything
changed relative to the stream itself.

Closes: https://gitlab.gnome.org/GNOME/mutter/-/issues/3220
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3803>
2024-06-12 15:11:04 +00:00
Jonas Ådahl
91d43bfbe1 screen-cast/src: Allow dropping cursor-frame if nothing changed
Allow a screen cast stream source to say that nothing changed in terms
of cursor metadata, and treat this together with a cursor-only frame as
we not recording anything.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3803>
2024-06-12 15:11:04 +00:00
Jonas Ådahl
f19f8fcb16 clutter/frame-clock: Only update immediately after idle if vsynced
If the presentation time isn't known, e.g. if the monitor is virtual and
the actual presentation happens far away, the presentation time we
actually received tends to be the time a frame was presented to the next
layer, meaning practically immediately after painting.

When scheduling another update after that, don't assume that if the next
calculated update is not the immediate next update, schedule an update
sooner, as that will in such cases always be true, meaning we ended up
busy looping with constant frame updates being scheduled.

Fix this by only triggering that logic if the last presentation time was
actually vsync:ed.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3803>
2024-06-12 15:11:04 +00:00
Bilal Elmoussaoui
27ecc9d1cd clutter/color: Stop falling back to PangoColor for X11 colors
As we don't really make use of that feature anyways. The
ClutterColor.from_string API is used by gnome-shell to retrieve the
following settings: cross-hairs-color, primary-color, secondary-color
which are always set in their hex representationby gnome-control-center.

Helps https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3544

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3796>
2024-06-12 14:32:14 +00:00
Jonas Ådahl
5bca761148 kms: Don't use kernel thread when headless
We're not doing anything significant in the KMS thread anyway, so don't
make it a kernel thread, and don't ask to be real time scheduled (which
we wouldn't be anyway, but for clarity).

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3805>
2024-06-12 11:06:54 +00:00
Jonas Ådahl
6bd2fd6a74 backend/native: Find render node directly via udev
Don't try to find the card, and then the render node from it, just ask
udev to list the render nodes directly. This avoids running into
permission errors when the user cannot open /dev/dri/card* even without
mode setting capabilities.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3805>
2024-06-12 11:06:54 +00:00
Bilal Elmoussaoui
014ea91a9d cogl: Remove various DepthState functions
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3804>
2024-06-12 00:42:45 +00:00
Bilal Elmoussaoui
bb29fa68fe cogl: Remove AtlasTexture.new_from_data
Nothing uses it, allows to drop the corresponding test case as well

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3804>
2024-06-12 00:42:45 +00:00
Bilal Elmoussaoui
94c2c41b66 cogl: Remove unused features functions
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3804>
2024-06-12 00:42:45 +00:00
Bilal Elmoussaoui
ed0ee25843 cogl: Remove header-only Pipeline functions
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3804>
2024-06-12 00:42:45 +00:00