Jonas Ådahl
4b6631338e
util: Add 'backend' debug topic
...
Meant for backend things that are not large enough to warrant their own
topic.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1931 >
2021-07-16 18:17:04 +02:00
Jonas Ådahl
b65555a958
renderer/native: Include error message in log entries
...
We had a GError handed to us, where we logged a warning, but didn't log
the message from the error. Do that so it becomes easier to find out
what might have failed.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1931 >
2021-07-16 18:10:56 +02:00
Jonas Ådahl
58f053d437
drm-buffer/dumb: Return TRUE when init succeeded
...
Returning FALSE means it failed, but we returned FALSE even when it
succeeded, meaning it would never succeed.
Fixes: 10c4bc6e3f
Closes: https://gitlab.gnome.org/GNOME/mutter/-/issues/1880
Closes: https://gitlab.gnome.org/GNOME/mutter/-/issues/1888
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1932 >
2021-07-16 17:18:55 +02:00
Jonas Ådahl
8a4aa92a54
context: Move the signal handling and dir management to user
...
Signals and changing current directory is a process global action, thus
isn't that suitable for a library. Thus, move that responsibility to
gnome-shell.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1861 >
2021-07-15 13:40:34 +02:00
Jonas Ådahl
9cda0bd719
tests: Make common test code a shared library
...
This will require some symbol exporting, but the benefit is that have
better control of what external test cases can do in terms of creating
more testing specific contexts.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1861 >
2021-07-15 13:40:34 +02:00
Jonas Ådahl
d8107027ef
tests/test-utils: Move test client path ensure helper to private header
...
It's only used from the test context, and the main test utils header
file will be used to export helper functionality, so move it out,
preparing for that.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1861 >
2021-07-15 11:42:40 +02:00
Jonas Ådahl
724a7eee74
tests: Move 'wait-for-X11-display' helper to MetaContextTest
...
Gets rid of a un-prefixed helper function relying on a global singleton.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1861 >
2021-07-15 11:42:40 +02:00
Jonas Ådahl
e8742be568
tests/test-utils: Remove unused init function
...
This is now dealt with by MetaContextTest.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1861 >
2021-07-15 11:42:40 +02:00
Jonas Ådahl
3d5a2b2ffb
context/test: Make type derivable
...
This makes it possible to declare the type in an installed header (so
that e.g. META_CONTEXT_TEST(context) works), but without having to
expose the MetaContextClass struct.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1861 >
2021-07-15 11:42:40 +02:00
Jonas Ådahl
acb0a44224
tests: Prefix test plugin name getter with meta_
...
It'll be used via the new shared library, so prefix it.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1861 >
2021-07-15 11:42:40 +02:00
Jonas Ådahl
9f1f3139b8
tests/utils: Prefix AsyncWaiter with Meta
...
This too will be used by test cases via a shared library.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1861 >
2021-07-15 11:42:40 +02:00
Jonas Ådahl
4a6e22311a
tests/utils: Prefix TestClient with Meta
...
Soon we'll expose it via a libmutter-test library.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1861 >
2021-07-15 11:42:40 +02:00
Jonas Ådahl
f74d311d61
tests: Rename test-utils.c/h to meta-test-utils.c/h
...
Otherwise it'll conflict with other files with identical filenames,
if one would add src/tests/ to the include path, which will happen in a
later commit.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1861 >
2021-07-15 11:42:39 +02:00
Jonas Ådahl
ff0afb186a
context: Move 'replace-current-wm' tracking to the context
...
This move yet another scattered global static variable into the
context's control.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1861 >
2021-07-15 11:34:37 +02:00
Jonas Ådahl
50ed027b6f
context: Move X11 display policy under the context
...
The context implementations already effectively dictate the policy, so
let them do it more directly instead of going indirectly via global
variables.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1861 >
2021-07-15 11:34:37 +02:00
Jonas Ådahl
e62f7e2910
context: Allow controlled destruction
...
Add a method meta_context_destroy() that both runs dispose and unrefs
the context. Tear down is moved to dispose() so that things owned by the
context are destroyed when calling meta_context_destroy(), or when the
last reference is released.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1861 >
2021-07-15 11:34:37 +02:00
Jonas Ådahl
2deb751fd9
context: Add explicit state tracking
...
This will help finding out when things happen in the wrong order.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1861 >
2021-07-15 11:34:37 +02:00
Jonas Ådahl
c1beb204c2
x11-display: Get _GNOME_WM_KEYBINDINGS from the context
...
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1861 >
2021-07-15 11:34:37 +02:00
Jonas Ådahl
7d0aaa14d1
x11-display: Get _NET_WM_NAME from context
...
It's equivalent to the name that was passed when the context was
created.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1861 >
2021-07-15 11:34:37 +02:00
Jonas Ådahl
d3b7d8df0d
wayland: Initialize in a single step
...
Before we first created the MetaWaylandCompositor instance, which would
repare Clutter/Cogl so they could initialize and turn on Wayland display
server features, then later to initialize the rest. Now that part is
done by the Wayland infrastructure itself, so we don't need the early
initialization. Simplify things a bit by centralizing it all into a
single meta_wayland_compositor_new() call.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1861 >
2021-07-15 11:34:37 +02:00
Jonas Ådahl
0330ce1f15
context: Make the context own MetaWaylandCompositor
...
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1861 >
2021-07-15 11:34:37 +02:00
Jonas Ådahl
6768b509ea
Remove meta_quit()
...
It is no longer used, so remove it. This also removes the intermediate
MetaContext global singleton, as it is no longer needed.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1861 >
2021-07-15 11:34:37 +02:00
Jonas Ådahl
122aa94642
x11/session: Use MetaContext to terminate instead of meta_quit()
...
This is done by keeping around a pointer to MetaContext as
"client_pointer" (which is practically the same as "user_pointer"
elsewhere), as well as creating a `MetaIceConnection` wrapper for ICE
connections.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1861 >
2021-07-15 11:34:37 +02:00
Jonas Ådahl
9523120241
x11/events: Use MetaContext to terminate instead of meta_quit()
...
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1861 >
2021-07-15 11:34:37 +02:00
Jonas Ådahl
e8af5fd398
display: Keep pointer to the context
...
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1861 >
2021-07-15 11:34:37 +02:00
Jonas Ådahl
4be9bc9db4
stage/x11: Terminate using MetaContext instead of meta_quit()
...
Done for the nested backend when clicking the close button.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1861 >
2021-07-15 11:34:37 +02:00
Jonas Ådahl
7d116bee0f
main: Move MetaX11DisplayPolicy to a new meta-private-enums.h
...
As with the compositor type enum, also have the X11 display policy enum,
as it's also effectively part of the context configuration. But as with
the compositor type, move it to a header file for enums only, and since
this is a private one, create a private variant meta-enums.h.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1861 >
2021-07-15 11:34:36 +02:00
Jonas Ådahl
68b376a944
context: Make context owner of MetaDisplay
...
It may still be closed from elsewhere, e.g. when being replaced, but the
reference is owned by MetaContext instead of itself.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1861 >
2021-07-15 11:25:21 +02:00
Jonas Ådahl
b1c643eeaa
context: Make the context owner of the backend
...
There is still the `_backend` singleton still, as there are still the
`meta_get_backend()` that needs to work for now.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1861 >
2021-07-15 11:25:21 +02:00
Jonas Ådahl
1972d4ec90
main: Remove now unused functions used for running mutter
...
The way to do this now is using a MetaContext.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1861 >
2021-07-15 11:25:21 +02:00
Jonas Ådahl
ed53dd90f3
context: Add way to add custom option group
...
This will be used by gnome-shell.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1861 >
2021-07-15 11:25:21 +02:00
Jonas Ådahl
d76743736f
context: Add way to set plugin GType instead of name
...
Will be used by gnome-shell.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1861 >
2021-07-15 11:25:21 +02:00
Jonas Ådahl
fe0ce2814e
main: Remove meta_test_init()
...
This was the last user of the configuration override API, so that goes
as well.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1861 >
2021-07-15 11:25:21 +02:00
Jonas Ådahl
1d4224ab07
tests/persistent-virtual-monitor: Port to MetaContext
...
Since this tests the `--virtual-monitor` command line argument, it uses
the `MetaContextMain` variant of the context, as it's there that command
line argument is handled.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1861 >
2021-07-15 11:25:21 +02:00
Jonas Ådahl
725510ea29
mutter: Port to MetaContext
...
Uses the new MetaContextMain, replacing piece by piece "real display
server" setup done using mostly main.c functions.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1861 >
2021-07-15 11:25:21 +02:00
Jonas Ådahl
aa306ac3ca
Introduce MetaContextMain
...
This object intends to replace the scattered functions that are used to
make up what is effectively a "mutter context". It takes care of the
command line arguments that is now done in main.c, persistant virtual
monitors, and the like.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1861 >
2021-07-15 11:25:21 +02:00
Jonas Ådahl
2ac262f138
tests/clutter: Port to MetaContext
...
The clutter tests neeed to start and stop, thus uses their own main loop
instead of the one in MetaContext. Shouldn't matter, since nothing
in mutter should happen that makes the test self-terminate from inside
mutter.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1861 >
2021-07-15 11:25:21 +02:00
Jonas Ådahl
2f19a5f28d
context/test: Add 'no-x11' and 'test-client' constructor flags
...
The 'no-x11' one will inhibit Xwayland from starting, and 'test-client'
will make sure the test client path is properly discovered.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1861 >
2021-07-15 11:25:21 +02:00
Jonas Ådahl
07384e18c5
clutter: Remove clutter_init_with_args()
...
Not used anymore.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1861 >
2021-07-15 11:25:21 +02:00
Jonas Ådahl
2712555c71
display: Don't include sn.h from display-private.h
...
It has some annoying macro requirement to not nag about API stability;
try to limit its exposure.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1861 >
2021-07-15 11:25:21 +02:00
Jonas Ådahl
383392f963
tests/stage-view-tests: Port to MetaContext
...
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1861 >
2021-07-15 11:25:21 +02:00
Jonas Ådahl
648a8b9861
tests/ref-test-sanity: Port to MetaContext
...
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1861 >
2021-07-15 11:25:21 +02:00
Jonas Ådahl
f8465906dd
tests/headless-start: Port to MetaContext
...
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1861 >
2021-07-15 11:25:21 +02:00
Jonas Ådahl
fbc00a60cf
tests/headless-start: Stop ignoring the missed frame warnings
...
They don't seem to happen anymore.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1861 >
2021-07-15 11:25:21 +02:00
Jonas Ådahl
d6ae8e7873
tests/test-runner: Port to MetaContext
...
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1861 >
2021-07-15 11:25:21 +02:00
Jonas Ådahl
54c9ca7d06
monitor-manager/test: Add default fall back initial config
...
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1861 >
2021-07-15 11:25:21 +02:00
Jonas Ådahl
f61c1a1be1
context/test: Add 'run-tests' signal that can replace g_test_run()
...
For tests that doesn't use g_test_run().
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1861 >
2021-07-15 11:25:21 +02:00
Jonas Ådahl
03242a4e2a
tests/test-runner: Assorted style cleanup
...
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1861 >
2021-07-15 11:25:21 +02:00
Jonas Ådahl
e09de6787f
context: Handle dealing with option entries
...
Users can add option entries, and it'll be part of the configuration
phase.
Create the main group manually to be able to set a user_data pointer;
this will be required to not have to rely on globals when parsing
options using a callback.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1861 >
2021-07-15 11:25:21 +02:00
Jonas Ådahl
3d2160b473
tests/unit-tests: Port to MetaContext
...
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1861 >
2021-07-15 11:25:20 +02:00
Jonas Ådahl
ccd8da336f
context/test: Add 'before-tests' and 'after-tests' signals
...
Will be used to set up and tear down test infrastructure.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1861 >
2021-07-15 10:59:40 +02:00
Jonas Ådahl
bccd93a598
tests/native-headless: Port to MetaContext
...
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1861 >
2021-07-15 10:59:40 +02:00
Jonas Ådahl
82d9dda08a
context/test: Add helper to run a test session
...
Takes care of setup, starting, running, and terminating, as well as
running the GLib test suite.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1861 >
2021-07-15 10:59:40 +02:00
Jonas Ådahl
6732e3e585
main: Temporarily tie meta_quit() to meta_context_terminate*()
...
Makes it possible for mutter internally to use meta_quit() both if we're
running using a MetaContext or the scattered functions.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1861 >
2021-07-15 10:59:40 +02:00
Jonas Ådahl
2e784e23a2
context: Add 'notify_ready()' vfunc and method
...
This intends to replace the call to `meta_register_with_session()` that
deals with X11 session management, and is called when the user is
"ready". In thet test context, doing that makes no sense, so make it a
no-op.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1861 >
2021-07-15 10:59:40 +02:00
Jonas Ådahl
4cd1154b3d
context/test: Respect MUTTER_SYNC envvar
...
It just calls meta_set_syncing() accordingly. Is currently done by
meta_init() either when the env var is set, or when a command line
argument is passed.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1861 >
2021-07-15 10:59:40 +02:00
Jonas Ådahl
fddc631599
context/test: Enable 'scale-monitor-framebuffer' backend setting
...
This is done in all tests, so make life easier by doing it here.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1861 >
2021-07-15 10:59:40 +02:00
Jonas Ådahl
8bf7d5c155
context: Init debug utils during setup phase
...
Is currently done during meta_init().
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1861 >
2021-07-15 10:59:40 +02:00
Jonas Ådahl
ecc40e7b23
context: Init introspection paths during setup
...
This is currently done during meta_init().
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1861 >
2021-07-15 10:59:40 +02:00
Jonas Ådahl
a32b005848
context: Change to home directory during setup
...
Is currently done during meta_init().
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1861 >
2021-07-15 10:59:40 +02:00
Jonas Ådahl
6f4b973329
context: Initialize signal handlers during setup
...
Is currently done during meta_init().
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1861 >
2021-07-15 10:59:40 +02:00
Jonas Ådahl
8ace1bf3ea
context: Init prefs when starting
...
Is currently done by meta_start().
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1861 >
2021-07-15 10:59:40 +02:00
Jonas Ådahl
02176eab83
context: Add start/run/terminate phases
...
The start phase creates the MetaDisplay object, and initializes Wayland, and
creates the main loop.
The run phase runs the main loop and handles returning an error if the
context was terminated with an error.
The terminate phase terminates the main loop, with or without an error.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1861 >
2021-07-15 10:59:40 +02:00
Jonas Ådahl
fe652518af
context: Load plugin during setup phase
...
The plugin must be configured by the context implementation during the
configure phase.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1861 >
2021-07-15 10:59:40 +02:00
Jonas Ådahl
75f9085ab9
context: Add setup phase
...
During this phase, the backend is created and configured. Currently only
configured, but will gain more logic that currently main.c does with
various helpers.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1861 >
2021-07-15 10:59:40 +02:00
Jonas Ådahl
df8074c636
util: Export meta_set_syncing() symbol
...
Will be set by MetaContextTest, until we can move away from the function
completely.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1861 >
2021-07-15 10:59:40 +02:00
Jonas Ådahl
c45a1619f5
context: Set up locale on init
...
Taken from main.c, which does that when getting the main option context,
which happens to happen early in a process's lifetime.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1861 >
2021-07-15 10:59:40 +02:00
Jonas Ådahl
6e4d3e0f85
context: Add create_backend() vfunc
...
This lets the context implementation create a backend. Will later be
used in a 'setup' phase.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1861 >
2021-07-15 10:59:40 +02:00
Jonas Ådahl
434f5e5b7b
context/test: Add test context type enum
...
A test context type will later determine what kind of backend the test
case should use; i.e. whether the nested or headless backend should be
used.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1861 >
2021-07-15 10:43:28 +02:00
Jonas Ådahl
8cb177499d
context/test: Configure test setup during configuration
...
This includes setting up the GLib test framework, overriding the X11
and Wayland display names.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1861 >
2021-07-15 10:43:28 +02:00
Jonas Ådahl
bbf6d88d54
test-utils: Expose helper for ensuring client path
...
Will be used by the test context to reduce boiler plate.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1861 >
2021-07-15 10:43:28 +02:00
Jonas Ådahl
6c6b5b9a48
context: Add entry points for context configuration
...
Configuration is the first step of the lifetime of a context, after
creation; it's here where argc/argv is processed, and it's determined
what kind of compositor, etc, it is going to be.
The tests always run as Wayand compositors, so the configuration is
quite simple, but will involve more steps later on.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1861 >
2021-07-15 10:43:28 +02:00
Jonas Ådahl
bf84b2423d
main: Move MetaCompositorType to a new meta-enums.h
...
It'll be part of and owned by MetaContext, intending to replace
`meta_is_wayland_compositor()`, but place it in a new file for public
enums so that it can be used from wherever.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1861 >
2021-07-15 10:43:28 +02:00
Jonas Ådahl
e17bf88d5e
tests: Introduce MetaContextTest
...
This introduces a MetaContext implementation aimed to be used for test
cases, with as little boiler plate as possible needed in the test.
It currently doesn't do anything, just fills out the GObject boiler
plate and sets a name.
Build it into every core test, for compilation, even though it isn't
used anywhere yet.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1861 >
2021-07-15 10:43:28 +02:00
Jonas Ådahl
e020fdfddf
Introduce mostly empty MetaContext type
...
This type is intended to replace the scattered functions used to
configure how the Mutter compositor is run. It currently doesn't do
anything, and only has a human readable name, intended to be set to e.g.
"GNOME Shell".
It's an abstract type, and is intended to be used via either a future
`MetaContextMain` for real display server use cases, and a
`MetaContextTest` for test cases.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1861 >
2021-07-15 10:43:28 +02:00
Jonas Ådahl
23b79f33fa
launcher: Remove open/close restricted file API
...
It has since some time been replaced with MetaDevicePool, and isn't used
by anything anymore, so remove it.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1929 >
2021-07-13 12:19:14 +00:00
Ivan Molodetskikh
1116b14f38
backends/native: Get rendering and swap timings during scanout
...
Scanout doesn't go through the usual path of compositing and doing
eglSwapBuffers, therefore it doesn't hit the timestamp query placed in
that path. Instead, get the timings by binding the scanout buffer to an
FBO and doing a timestamp query on the FBO.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1762 >
2021-07-13 08:09:42 +00:00
Ivan Molodetskikh
5a0d3ed4dd
backends/native: Remove unneeded NULL check
...
There seems to be no way to construct this type with an invalid bo.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1762 >
2021-07-13 08:09:42 +00:00
Ivan Molodetskikh
8c258d1de1
cogl: Add CPU swap time and GPU rendering query to CoglFrameInfo
...
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1762 >
2021-07-13 08:09:42 +00:00
Ivan Molodetskikh
3aa0e3074f
clutter: Store vblank duration in ClutterFrameClock
...
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1762 >
2021-07-13 08:09:42 +00:00
Ivan Molodetskikh
d10567ea3e
clutter: Add vblank duration to ClutterStageView
...
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1762 >
2021-07-13 08:09:42 +00:00
Ivan Molodetskikh
2d939754b1
crtc-mode-info: Add vblank duration field
...
Only populated for KMS backed modes, as that's where it's relevant.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1762 >
2021-07-13 08:09:42 +00:00
Ivan Molodetskikh
e40ff9d8b7
backends/native: Add meta_calculate_drm_mode_vblank_duration_us()
...
Computes the vblank duration from mode timings.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1762 >
2021-07-13 08:09:42 +00:00
Daniel van Vugt
9f492a0ee0
kms: Add fixed point formatting to MUTTER_DEBUG=kms printing
...
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1923 >
2021-07-13 15:29:14 +08:00
Daniel van Vugt
b59c5386b9
kms: Add a trivial meta_fixed_16_to_double conversion function
...
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1923 >
2021-07-13 15:26:43 +08:00
Daniel van Vugt
ea75ea0b73
kms: Add an internal MetaKmsPropType to distinguish fixed point values
...
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1923 >
2021-07-13 15:26:43 +08:00
Jonas Ådahl
c2c41bbf0a
tests/kms-utils: Add some basic 16:16 fixed tests
...
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1927 >
2021-07-09 22:40:06 +00:00
Jonas Ådahl
021a401bc8
tests: Move out KMS utils unit tests to its own executable
...
Better to split things up a bit, so one can with more ease run a
specific test.
In the KMS utils case, we don't even need a mutter context, making it
much lighter.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1927 >
2021-07-09 22:40:05 +00:00
Carlos Garnacho
ec390b68c5
wayland: Implement the xdg-activation protocol
...
This protocol implements the IPC necessary to focus application
windows across launcher/launchee. Add support for it.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1845 >
2021-07-09 09:34:28 +00:00
Carlos Garnacho
665081d268
core: Add ::timeout signal to MetaStartupSequence
...
These objects are missing explicit notifications about when they
are going away by themselves, add one.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1845 >
2021-07-09 09:34:28 +00:00
Carlos Garnacho
2115debd09
build: Add xdg-activation to build
...
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1845 >
2021-07-09 09:34:28 +00:00
Carlos Garnacho
256939cb84
build: Add support for "staging" wayland protocols
...
These come in a different folder, with no stable/unstable nomenclature.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1845 >
2021-07-09 09:34:28 +00:00
Daniel van Vugt
d996319cf9
kms: Add a missing g_set_error on error
...
So the GError is not left NULL and then dereferenced.
Fix provided by Jonas Ådahl <jadahl@gmail.com>
Closes: https://gitlab.gnome.org/GNOME/mutter/-/issues/1878
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1925 >
2021-07-09 16:26:11 +08:00
Florian Müllner
357c506ee7
events: Only support super+scroll on wayland
...
On Xorg, the event only reaches us when the pointer is within the
stage input region. That makes the feature more confusing than
useful, so make it wayland-only.
https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/3759
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1922 >
2021-07-08 00:02:41 +02:00
Jonas Ådahl
ce5a5789bb
native: Release output device files that are unused
...
In order to make it possible to e.g. unload an unused DRM device, we
need to make sure that we don't keep the file descriptor open if we
don't need it; otherwise we block anyone from unloading the
corresponding module.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1828 >
2021-07-07 21:10:30 +02:00
Jonas Ådahl
3c47661b78
egl: Add eglBindAPI helper
...
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1828 >
2021-07-07 21:03:26 +02:00
Jonas Ådahl
173d895d53
kms: Remove now unused API to get file descriptor
...
The last user switched to using MetaDeviceFile, so time to clean up.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1828 >
2021-07-07 21:03:26 +02:00
Jonas Ådahl
10c4bc6e3f
drm-buffer: Create from MetaDeviceFile instead of MetaKmsDevice
...
The DRM buffers aren't really tied to mode setting, so they shouldn't
need to have an associated mode setting device. Now that we have a
device file level object that can fill this role, port over
MetaDrmBuffer and friends away from MetaKmsDevice to MetaDeviceFile.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1828 >
2021-07-07 21:03:26 +02:00
Jonas Ådahl
6613463f58
renderer/native: Decouple device file from MetaKmsDevice
...
Keep a private MetaDeviceFile instance for the GPU's managed by the
renderer. This is a step towards decoupling rendering from mode setting,
as well as on-demand holding of device file descriptors.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1828 >
2021-07-07 21:03:26 +02:00
Jonas Ådahl
e567cb972d
renderer/native: Get 'uses-monotonic' state from MetaKmsDevice
...
It's better suited to be handled by the MetaKmsDevice abstraction.
This eliminates the last caller of drmGetCaps() from outside
MetaKmsImplDevice.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1828 >
2021-07-07 21:03:26 +02:00