Bilal Elmoussaoui
ab85aa74eb
cogl/gl: Share context_init implementation between GL/GLES
...
By using GObject features instead of calling the function manually.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/4132 >
2024-12-12 09:11:37 +01:00
Bilal Elmoussaoui
71381c2e7f
cogl: Create a common GL driver
...
Both the GL3 & GLES2 inherit from it to avoid overriding the same vfuncs
multiple times.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/4132 >
2024-12-12 09:11:37 +01:00
Bilal Elmoussaoui
2e36f80914
cogl: Turn Driver into an abstract object
...
In the next commit, we will add a DriverGL that those two drivers would
inherit from to share the common infrastructure.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/4132 >
2024-12-12 09:11:37 +01:00
Bilal Elmoussaoui
0103288739
cogl: Rename Driver to DriverID
...
As we will be having a CoglDriver abstract class in the next commit.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/4132 >
2024-12-12 09:11:33 +01:00
Bilal Elmoussaoui
1131c3b634
cogl: Make driver header private
...
Along with formatting of the various vtable fields as we will turn it to
an abstract GObject next.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/4132 >
2024-12-11 20:52:16 +01:00
Bilal Elmoussaoui
1d7740d537
compositor: Move various functions to their correct namespace
...
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/4131 >
2024-12-11 18:29:31 +01:00
Bilal Elmoussaoui
38a4b2e102
compositor: Drop get_stage_for_display helper
...
As one can get that from the backend/compositor directly.
Expose the necessary functions to allow doing so.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/4131 >
2024-12-11 18:28:57 +01:00
Bilal Elmoussaoui
1152326ac0
cursor-tracker: Drop helper
...
As the tracker can be retrieved from the backend anyway.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/4131 >
2024-12-11 18:28:57 +01:00
Bilal Elmoussaoui
e06592d3df
util: Drop duplicated Clutter debug flags helpers
...
Clutter exposes those functions already.
So there is literally 0 point in duplicating them.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/4131 >
2024-12-11 18:28:57 +01:00
Bilal Elmoussaoui
265a541b65
x11: Mark meta_XFree macro as private
...
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/4131 >
2024-12-11 18:28:57 +01:00
Jonas Ådahl
5a31b4e7b8
tests/cursor: Add test for transform cursor surfaces
...
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3859 >
2024-12-11 16:22:57 +00:00
Jonas Ådahl
8c2e39323f
mtk/monitor-transform: Add to/from string helpers
...
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3859 >
2024-12-11 16:22:57 +00:00
Jonas Ådahl
5e4821d9fc
tests/cursors: Test viewport based cropping
...
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3859 >
2024-12-11 16:22:57 +00:00
Jonas Ådahl
a9a4923c03
tests/cursor-tests: Also test cursor rendering in screen casting
...
This uses the ref test infrastructure inside the cursor tests screen
cast client, and verifies the content on the screen cast matches the
content of the compositor, both when using the 'embedded' cursor mode,
and the 'metadata' cursor mode.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3859 >
2024-12-11 16:22:57 +00:00
Jonas Ådahl
bcb52960db
tests/cursor: Test Wayland client using wp_viewport for scaling
...
This test doesn't use a separate reference image, but verifies the
result is identical to that of the built in cursor.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3859 >
2024-12-11 16:22:57 +00:00
Jonas Ådahl
3d45345789
tests/cursor-tests: Also test a couple of fractional scales
...
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3859 >
2024-12-11 16:22:57 +00:00
Jonas Ådahl
35cbea59cc
tests/remote-desktop-utils: Add monitor recording helpers
...
Will be used in tests for recording existing monitors.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3859 >
2024-12-11 16:22:57 +00:00
Jonas Ådahl
8cf41761a9
tests/screen-cast: Move executable launching into helper
...
It doesn't contain anything screen cast specific, except the
XDG_RUNTIME_DIR, so make it usable from elsewhere. While at it, prepare
it for being able to run the glib test functionality.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3859 >
2024-12-11 16:22:57 +00:00
Jonas Ådahl
acd7fa7f50
tests/utils: Rename test runner executable path variable
...
We'll have more "test clients", so make it a bit more explicit to avoid
shadowing variables.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3859 >
2024-12-11 16:22:57 +00:00
Jonas Ådahl
228be80164
tests/monitor-test-utils: Make it explicit when scale should be dynamic
...
This also avoids loosing precision since the float won't be casted to an
int before being used to configure the test output.
Currently there is only one test that expects the scale to be calculated
dynamically, all the other always assume scale ending up being 1.0
unless explicitly configured in some way.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3859 >
2024-12-11 16:22:57 +00:00
Jonas Ådahl
967be91c92
tests/remote-desktop-utils: Allow screen cast only sessions
...
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3859 >
2024-12-11 16:22:57 +00:00
Jonas Ådahl
92f6f2e8fd
tests/remote-desktop-utils: Make cursor mode explicit
...
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3859 >
2024-12-11 16:22:57 +00:00
Jonas Ådahl
a4380075a6
tests/remote-desktop-utils: Keep track of current buffer
...
This will be useful later on when we actually look at the buffer in
places other than when it's actively processed.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3859 >
2024-12-11 16:22:57 +00:00
Jonas Ådahl
2386976f5e
tests/remote-desktop-utils: Narrow buffer scope
...
Only actively test MemFd, and don't ever ask for or expect MemPtr, since
we don't support those anyway. Also, for convenience, ask the buffers to
be automatically mmap:ed.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3859 >
2024-12-11 16:22:57 +00:00
Jonas Ådahl
9c4e93b055
tests/screen-cast: Split out generic parts to utils file
...
This will make it easier to add more screen cast / remote desktop test
cases.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3859 >
2024-12-11 16:22:57 +00:00
Robert Mader
e580453df9
screen-cast: Implement viewport support
...
[jadahl] Rework hotspot calculations
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3859 >
2024-12-11 16:22:57 +00:00
Jonas Ådahl
f77d8e2a12
display: Fix cursor sprite sizes with fractional scales
...
This makes the cursor size match the expectation given by the theme
size. It also means the sprite size now matches GTK4 provided cursor
surfaces using wp_viewport.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3859 >
2024-12-11 16:22:57 +00:00
Jonas Ådahl
8fc1bddf3b
cursor-renderer/native: Handle early cursor texture changes
...
We create the cursor view data when we update the cursor, but allow the
texture to be realized earlier than that. The texture change listener
invalidates the hw cursor validity state, but since it's initialized to
invalid, the hardware cursor will still be correctly handled.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3859 >
2024-12-11 16:22:57 +00:00
Robert Mader
35e5ae718a
cursor-renderer: Add viewport support
...
This makes the overlay code work which is notably used for screen
sharing and recording if the client doesn't support meta-data cursors.
[jadahl] Changed the approach the way coordinates are scaled.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3859 >
2024-12-11 16:22:57 +00:00
Jonas Ådahl
01f2f40475
cursor-renderer: Pass renderer when finding highest scale monitor
...
Do this instead of going via the backend, since we don't need anything
other from the backend.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3859 >
2024-12-11 16:22:57 +00:00
Robert Mader
19669a3d9d
cursor-renderer/native: Add support for viewports
...
[jadahl] Rework hotspot calculations
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3859 >
2024-12-11 16:22:57 +00:00
Robert Mader
e674c7e454
cursor-sprite: Add API for viewports
...
[jadahl] Rework hotspot calculations.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3859 >
2024-12-11 16:22:57 +00:00
Robert Mader
e402eaa950
shaped-texture: Use pipeline matrix helper
...
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3859 >
2024-12-11 16:22:57 +00:00
Robert Mader
2ae0fcfc5c
mtk: Add mtk_compute_viewport_matrix helper
...
It'll be used to calculate a CoglPipeline layer matrix given viewport
data.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3859 >
2024-12-11 16:22:57 +00:00
Jonas Ådahl
996678cfef
mtk/build: Sort files alphabetically
...
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3859 >
2024-12-11 16:22:57 +00:00
Jonas Ådahl
e9475b2190
tests: Add basic ref-test based cursor sprite test case
...
It currently contains some basic tests using the built in cursor as well
as traditional buffer scale using Wayland client in different monitor
configurations.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3859 >
2024-12-11 16:22:57 +00:00
Jonas Ådahl
129ead488b
tests/ref-test: Allow updating only non-existing reference images
...
This makes it a bit more reliable to add more reference images, but be
sure not to touch any existing ones.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3859 >
2024-12-11 16:22:57 +00:00
Jonas Ådahl
9cc5bec0a3
tests/ref-test: Split out image processing bits
...
This allows it to be used in processes that doesn't have a stage view
etc, e.g. screen cast clients.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3859 >
2024-12-11 16:22:57 +00:00
Jonas Ådahl
aeeb710d93
tests/utils: Make wait-for-window helper more generic
...
It took a MetaTestClient, which wasn't used. To allow it be used for windows
that doesn't come from a MetaTestClient, remove the MetaTestClient
namespace, and update the callers.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3859 >
2024-12-11 16:22:57 +00:00
Jonas Ådahl
c280af08c2
tests/wayland/test-client-utils: Add boilerplate for pointer input
...
This adds wl_seat and wl_pointer boilerplate, and a pointer-entered
signal on the surface helper struct. It's intended to be used by a
future cursor test case client.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3859 >
2024-12-11 16:22:57 +00:00
Jonas Ådahl
08147d0c9b
tests/wayland: Add int property type to test driver
...
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3859 >
2024-12-11 16:22:57 +00:00
Jonas Ådahl
a0877dc071
tests/wayland: Make test driver properties table multi typed
...
Store values as GVariant's. This will allow to add other types property
types than strings.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3859 >
2024-12-11 16:22:57 +00:00
Jonas Ådahl
29850b7345
tests/utils: Return GTask after flushing input
...
This silences a debug warning from glib.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3859 >
2024-12-11 16:22:57 +00:00
Jonas Ådahl
ff2c329074
tests: Disable animations with context flag instead of env var
...
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3859 >
2024-12-11 16:22:57 +00:00
Jonas Ådahl
1f3dd65594
tests/shell: Allow configuring the background color
...
This will be used to create background colors that will match fullscreen
window colors, so they can share the same ref test reference image.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3859 >
2024-12-11 16:22:57 +00:00
Jonas Ådahl
ea9e8bff2d
debug-control: Add InhibitHwCursor property
...
Inhibits the hardware cursor globally when true.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3859 >
2024-12-11 16:22:57 +00:00
Jonas Ådahl
b97516edb9
backend: Add simple HW cursor inhibit API
...
The existing is meant to allow more complex inhibitation, but sometimes
it's useful to inhibit globally, e.g. for debugging purposes. Add API to
achieve this.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3859 >
2024-12-11 16:22:57 +00:00
Jonas Ådahl
da0fa12f1f
cursor-sprite/xcursor: Assume pixels are premultiplied
...
This makes the built in cursors and cursors from Wayland clients look
the same.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3859 >
2024-12-11 16:22:57 +00:00
Bilal Elmoussaoui
aa7e963422
ci: Adapt to updated release module template
...
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/4176 >
2024-12-11 13:57:31 +01:00
Bilal Elmoussaoui
54f48349b6
Revert "ci: Use meson introspect
to generate artifact path"
...
This reverts commit bcfbc7fa17c189306788bd708409b1e68740c890.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/4176 >
2024-12-11 13:43:36 +01:00