Commit Graph

31130 Commits

Author SHA1 Message Date
Peter Hutterer
01f78c0451 backends/native: Pass the axes down to the relative clutter motion event
Otherwise we get a happy segfault when we're trying broadcast_axis()
during the tablet event handling.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3410>
2023-12-15 14:36:19 +00:00
Peter Hutterer
9e781545aa backends/native: Set the tool for relative events
Otherwise a tablet in relative mode will never have a tool set and
nothing happens on motion events - meta_wayland_tablet_seat_update()
simply exits early for tablet proximity, button or motion events.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3410>
2023-12-15 14:36:19 +00:00
Peter Hutterer
baafec089a backends/x11: Fix tab/space indentation issue
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3410>
2023-12-15 14:36:19 +00:00
Florian Müllner
d16ddc42ce x11: Remove icon cache
We stopped reading window icons, so there's nothing to cache
anymore.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3452>
2023-12-15 14:14:33 +00:00
Florian Müllner
5fc6ff19fa wayland/xwayland: Include x11-display-private
The include is currently satisfied by

window-x11-private → iconcache → x11-display-private

The icon cache is about to be removed, so add the missing include
directly.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3452>
2023-12-15 14:14:33 +00:00
Florian Müllner
25d6e4524c window: Remove window icon properties
Window icons are X11 specific, and gnome-shell stopped using them
even as fallback.

Time for some cleanup …

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3452>
2023-12-15 14:14:33 +00:00
Sebastian Wick
7458907360 shaped-texture: Reset pipelines when texture format changes
Changing the MultiTexture may require a different set of pipelines when
the texture format is different. We keep track of the attached
MultiTextureFormat just like we do for the width and height.

This fixes misrendering when a client attaches buffers with different
MultiTextureFormats to the same surface.

Fixes: 3dd9f15eb ("shaped-texture: Start using MetaMultiTexture")
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3456>
2023-12-15 11:48:32 +01:00
Daniel van Vugt
85f173d0d7 clutter: Pass 'radius' to public blur APIs instead of 'sigma'
Although they're in the same units, `radius` is easier to understand than
`sigma` and makes the public API independent of the blur algorithm used
behind the scenes. We now only keep the `sigma` terminology where the
implementation is Gaussian-specific.

The assumption that `sigma = radius / 2.0` is actually not new here. We
just move it from `_st_create_shadow_pipeline` (gnome-shell!1905) into
`clutter_blur_new`.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1908>
2023-12-14 18:12:55 +00:00
Olivier Fourdan
a191af1f3d remote-desktop/eis: Fix ConnectToEIS device-types
The change to the device types in xdg-desktop-portal-gnome needs to be
reflected in mutter as well, otherwise the device types are not properly
passed along.

As a result, input emulation fails.

Closes: https://gitlab.gnome.org/GNOME/mutter/-/issues/3194
See-also: https://gitlab.gnome.org/GNOME/xdg-desktop-portal-gnome/-/merge_requests/108/diffs?commit_id=2b3163a
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3447>
2023-12-13 17:22:10 +00:00
Bilal Elmoussaoui
90cff013a5 clutter: Remove unused enums
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3437>
2023-12-13 11:20:04 +00:00
Bilal Elmoussaoui
580d62b9b6 clutter: Remove unused Path related types
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3437>
2023-12-13 11:20:04 +00:00
Bilal Elmoussaoui
05cd7bc6cb cogl: Remove unused Buffer:usage-hint
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3437>
2023-12-13 11:20:04 +00:00
Bilal Elmoussaoui
bc44d2855b cogl: Initialize first_index_to_prune
I don't know how come that the compiler wasn't complaining about it till now

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3437>
2023-12-13 11:20:04 +00:00
Bilal Elmoussaoui
6b29371db3 cogl: Remove unused private functions
The commit also moves certain functions from the private header
as they are not used anywhere else and removes COGL_EXPORT
when the function is supposed to be private and is not used outside of
cogl

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3437>
2023-12-13 11:20:04 +00:00
Bilal Elmoussaoui
5d9e9707dd cogl: Remove unused CoglPipelineEvalFlags
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3437>
2023-12-13 11:20:04 +00:00
Bilal Elmoussaoui
893e6e49b1 clutter: Drop unused private functions/defines
The commit also stops defining certain functions in a private header
when they are only used in the same file.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3437>
2023-12-13 11:20:04 +00:00
Bilal Elmoussaoui
4b7a29377b clutter: Drop remaining params nick/blurbs
Also the i18n macros from clutter as they are no longer used

Leftover from https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3101

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3437>
2023-12-13 11:20:04 +00:00
Bilal Elmoussaoui
3f09a86e7a clutter: Drop CLUTTER_PARAM_* defines
They are not used every where making the codebase very incosistent
So just drop the current usages

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3437>
2023-12-13 11:20:04 +00:00
Peter Hutterer
ef8b2f2893 ci: Mark our git clone as a safe directory
fatal: detected dubious ownership in repository at '/builds/whot/mutter'
To add an exception for this directory, call:
	git config --global --add safe.directory /builds/whot/mutter

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3434>
2023-12-13 11:09:32 +00:00
Sebastian Wick
c8191920e8 tests/wayland: Create native backends for KVM/tty tests
Run the wayland tests also in the KVM and tty tests suits. Change some
of the tests to also use a native backend via VKMS.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3350>
2023-12-13 10:43:31 +00:00
Sebastian Wick
13bbc4bc43 tests/wayland: Move virtual output to lowest VKMS resolution
We want to run those tests in VKMS later with the same reference image.
To make the tests as close to each other as possible we use the same
resolution for the VKMS and the virtual output which is 640x480.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3350>
2023-12-13 10:43:31 +00:00
Sebastian Wick
8f687ed98d tests/wayland/buffer-transform: Draw the buffer with the right size
This test currently only works because the monitor has the same width
and height. Generalize it to arbitrary monitor sizes by taking into
account that width and hight are swapped for some rotations.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3350>
2023-12-13 10:43:31 +00:00
Sebastian Wick
d4b9e72440 tests/wayland/dma-buf-scanout: Use WaylandBuffer
WaylandBuffer supports dma-bufs now, even ones which can be scanned out.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3350>
2023-12-13 10:43:31 +00:00
Sebastian Wick
6f4da83b36 tests/wayland-test-clients: Remove unused create_shm_buffer
We moved the last user of `create_shm_buffer` and can now get rid of it.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3350>
2023-12-13 10:43:31 +00:00
Sebastian Wick
2c23a94be0 tests/wayland-test-clients: Use WaylandBuffer in draw_surcace
Most tests use the draw_surface function to draw a solid color to a
surface. This moves it from the shm-only path to WaylandBuffer which
makes all of those tests usable via dma-buf.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3350>
2023-12-13 10:43:31 +00:00
Sebastian Wick
d842fe601d tests/wayland/buffer-transform: Use WaylandBuffer
The custom drawing requires adjusting the test. Instead of poking at
memory directly, we can just draw a color at certain coordinates which
makes it independent of the pixel format used.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3350>
2023-12-13 10:43:31 +00:00
Sebastian Wick
145649538a tests/wayland-test-clients: Add a WaylandBuffer for shm and dma-buf
It abstracts away the kind of buffer so clients can be tested with both
shm and dma-buf paths. We'll make use of it in the future by adding the
wayland tests to the TTY and KVM test suits.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3350>
2023-12-13 10:43:31 +00:00
Sebastian Wick
63f84fedd9 tests/wayland-test-clients: Keep track of advertised modifiers
We will need to check against them for figuring out if we can import a
specific dma-buf.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3350>
2023-12-13 10:43:31 +00:00
Sebastian Wick
24ef34f680 tests/wayland-test-clients: Add gbm_device to WaylandDisplay
We'll use this later to allocate dma-bufs from.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3350>
2023-12-13 10:43:31 +00:00
Sebastian Wick
8e7600322b tests/wayland-test-clients: Make WaylandSurface a GObject
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3350>
2023-12-13 10:43:31 +00:00
Sebastian Wick
cceccc0f68 tests/wayland-test-clients: Add missing WAYLAND_TYPE_DISPLAY define
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3350>
2023-12-13 10:43:31 +00:00
Sebastian Wick
2993462700 tests/ref-test: Inhibit direct scanout for ref-tests
When capturing the view we have to make sure the stage is actually
updated. In direct scanout mode the stage is unmodified and we can't
find the content we want to test.

Currently the ref-tests are all running on non-native setups where
direct scanout is impossible but we will change that soon!

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3350>
2023-12-13 10:43:31 +00:00
Sebastian Wick
e42c5dbd79 tests/ref-test: Go directly from Crtc to Backend
This avoids going through the GPU which can be NULL in some cases.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3350>
2023-12-13 10:43:31 +00:00
Sebastian Wick
1069085612 tests/test-utils: Allow calling set_custom_monitor_config outside tests
by using g_test_build_filename instead of g_test_get_filename.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3350>
2023-12-13 10:43:31 +00:00
Robert Mader
7454287d3b cogl/gles: Fix GL_OES_rgb8_rgba8 check
Fixes: bbf2d83e94 ("cogl/gles: Require OES_rgb8_rgba8 to have color-renderable 8bpc formats")
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3451>
2023-12-11 23:28:24 +01:00
Artur S0
25fb7f7fba Update Russian translation 2023-12-11 12:16:42 +00:00
Florian Müllner
5291be8f30 clutter/actor: Allow specifying the layout manager for an actor type
Some actors have a well-defined layout manager other than FixedLayout.

If they do, we can handle the layout manager creation at the
ClutterActor instantiation, like GTK does for widget layout managers.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3445>
2023-12-07 18:02:11 +00:00
Sebastian Wick
289e511c1a cogl/tests: Add fp16 offscreen texture format store/paint tests
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3441>
2023-12-06 23:01:02 +01:00
Sebastian Wick
60c082caaf cogl/bitmap-conversion: Support packing fp16 formats
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3441>
2023-12-06 23:01:02 +01:00
Sebastian Wick
e6eed4f32c cogl: Add a fp32 format for pixel read-back
We will also require GL_OES_texture_half_float and GLES 3.0 to enable
COGL_FEATURE_ID_TEXTURE_HALF_FLOAT. This gives us float types and makes
it possible to read pixels from framebuffers with internal floating
point formats (into float, half is never supported).

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3441>
2023-12-06 23:00:49 +01:00
Jonas Ådahl
568506ecbe cogl: Add half float implementation
This implementation is copied from mesa.

It uses x86_64 assembler on CPUs where it's supported, otherwise falls
back on a software implementation (cogl-soft-float.c). It's intended to
be used for packing and unpacking f16 format bitmaps.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3441>
2023-12-06 21:18:11 +01:00
Jonas Ådahl
3bf6de60bb cogl: Add CPU capability detection helper
This will be needed to support the fast half float implementations.
Copied from mesa and adapted.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3441>
2023-12-06 21:18:11 +01:00
Jonas Ådahl
8420692d3e cogl: Add soft-float software implementation
The implementation comes from mesa, which came from Berkeley SoftFloat
3e Library.

The software float implementation will be used to convert from and to
half floating point pixel format bitmaps, when no the CPU isn't capable
of the conversion.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3441>
2023-12-06 21:18:11 +01:00
Jonas Ådahl
68788d0e75 cogl/bitmap-conversion: Use enum for medium type
The type of the intermediate medium for storing pixel channels is
changed from "is 8 or 16 bit" to an enum, and switch cases. This doesn't
add support for anything, but will make adding a "float" medium type
less intrusive.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3441>
2023-12-06 21:18:11 +01:00
Sebastian Wick
64f4415f28 cogl/gl: Use CPU packing/unpacking for opaque fp16 formats
There is no internal fp16 format which has no alpha which means we would
get garbage alpha when reading the framebuffer directly. We have to use
the packing/unpacking to always get the alpha of 1.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3441>
2023-12-06 21:18:11 +01:00
Sebastian Wick
9c219db9fe cogl/pixel-format: Re-order pixel formats to be consistent
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3441>
2023-12-06 21:18:11 +01:00
Sebastian Wick
d90c2ab2a0 cogl: Determine glReadPixels format based on framebuffer format
Which gltype and glformat are allowed for a given gl framebuffer depends
on the internal gl framebuffer format. Either the format we want to read
into matches the gltype, glformat and doesn't need CPU packing from
another format or we have to use a tmp buffer with a format that matches
the GL requirements.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3441>
2023-12-06 21:18:11 +01:00
Sebastian Wick
07bfb24312 cogl/gles2: Only support rgba1010102 on little endian systems
We already check for this in various places but we still advertised this
feature when it's not actually supported.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3441>
2023-12-06 21:07:29 +01:00
Sebastian Wick
dc3866adf4 cogl/bitmap-conversion: Fix packing 8bpc opaque alpha
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3441>
2023-12-06 21:07:29 +01:00
Jonas Ådahl
80daaac438 cogl/build: Sort source files
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3441>
2023-12-06 21:07:29 +01:00