1
0
Fork 0
A repository that has original sources for patches used in the Arch User Repository package called "mutter-performance". https://aur.archlinux.org/packages/mutter-performance
Find a file
Aaron Plattner cf8efb5827 x11: Skip sending redundant CTM change requests
The X server generates a property change notification whenever it processes a
property change request, even if the value of the property is not changing. This
triggers libgdk to probe all display outputs, which can be slow depending on
which display driver and hardware are in use.

 #0  0x00007f8e4d5e91a0 in XRRUpdateConfiguration () at /usr/lib/libXrandr.so.2
 #1  0x00007f8e505208da in _gdk_x11_screen_size_changed (screen=0x5566e4b7e080, event=0x7ffe0e44bd60) at ../gdk/x11/gdkscreen-x11.c:1199
 #2  0x00007f8e505066d1 in gdk_x11_display_translate_event (translator=0x5566e4b5b110, display=0x5566e4b5b110, event=0x7f8dec001b20, xevent=0x7ffe0e44bd60) at ../gdk/x11/gdkdisplay-x11.c:1201
 #3  0x00007f8e505135a0 in _gdk_x11_event_translator_translate (translator=0x5566e4b5b110, display=0x5566e4b5b110, xevent=0x7ffe0e44bd60) at ../gdk/x11/gdkeventtranslator.c:51
 #4  0x00007f8e50512c97 in gdk_event_source_translate_event (event_source=0x5566e4b764a0, xevent=0x7ffe0e44bd60) at ../gdk/x11/gdkeventsource.c:243
 #5  0x00007f8e50512f57 in _gdk_x11_display_queue_events (display=0x5566e4b5b110) at ../gdk/x11/gdkeventsource.c:341
 #6  0x00007f8e50497644 in gdk_display_get_event (display=0x5566e4b5b110) at ../gdk/gdkdisplay.c:442
 #7  0x00007f8e5051301f in gdk_event_source_dispatch (source=0x5566e4b764a0, callback=0x0, user_data=0x0) at ../gdk/x11/gdkeventsource.c:363
 #8  0x00007f8e516ecf9c in g_main_context_dispatch () at /usr/lib/libglib-2.0.so.0
 #9  0x00007f8e51740a49 in  () at /usr/lib/libglib-2.0.so.0
 #10 0x00007f8e516ec503 in g_main_loop_run () at /usr/lib/libglib-2.0.so.0
 #11 0x00007f8e508ef5fd in meta_run_main_loop () at ../src/core/main.c:928
 #12 0x00007f8e508ef60e in meta_run () at ../src/core/main.c:943
 #13 0x00005566e450842a in  ()
 #14 0x00007f8e50649b25 in __libc_start_main () at /usr/lib/libc.so.6

When GNOME is animating a display fade when the night light feature is toggled
on or off, it sends a lot of change requests for the CTM property in the
process, which triggers a lot of display probes from gdk. In the case of the
night light feature, the CTM itself is not actually changing, so these requests
are redundant. Fix this by caching the CTM value in the MetaOutputXrandr and
skipping the server requests if it's not being changed.

Fixes: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/3978
Signed-off-by: Aaron Plattner <aplattner@nvidia.com>
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1816>
2021-04-14 18:03:35 -07:00
.gitlab/issue_templates gitlab: Add missing < in markdown comment tag 2020-02-14 03:10:28 +00:00
.gitlab-ci ci: Enable native backend and screen cast tests 2021-03-12 15:09:45 +00:00
clutter clutter/actor: Update all last_paint_volumes before painting 2021-04-12 15:18:31 +00:00
cogl cogl: Drop "volatile" from static GTypes in manual registration 2021-03-22 10:47:51 +00:00
data backend/native: Disable KMS modifiers for amdgpu and nouveau as well 2021-04-14 07:14:24 +00:00
doc Add MetaGravity and replace X11 equivalent with it 2020-02-29 21:01:50 +00:00
meson build: Add postinstall script 2019-08-27 09:57:54 +00:00
po Update Dutch translation 2021-04-01 19:20:37 +00:00
src x11: Skip sending redundant CTM change requests 2021-04-14 18:03:35 -07:00
subprojects build: bump ABI to sysprof-capture-4 2020-07-28 11:13:30 -07:00
tools tools: Remove obsolete ppa-magic.py 2018-11-30 11:12:12 +08:00
.gitignore build: bump ABI to sysprof-capture-4 2020-07-28 11:13:30 -07:00
.gitlab-ci.yml ci: Enable native backend and screen cast tests 2021-03-12 15:09:45 +00:00
config.h.meson xwayland: Check for listenfd option 2021-01-22 11:40:30 +01:00
COPYING Updated obsolete FSF postal address in COPYING 2014-01-12 08:44:30 +07:00
meson.build Post-release version bump 2021-03-20 13:41:19 +01:00
meson_options.txt tests: Add headless native backend test 2021-03-12 15:09:45 +00:00
mutter.doap mutter.doap: Add marge-bot as a maintainer 2020-11-16 11:59:45 +01:00
NEWS Tag release 40.0 2021-03-20 13:09:44 +01:00
README.md README: Fix list paragraphs 2021-03-10 09:01:50 +03:00

Mutter

Mutter is a Wayland display server and X11 window manager and compositor library.

When used as a Wayland display server, it runs on top of KMS and libinput. It implements the compositor side of the Wayland core protocol as well as various protocol extensions. It also has functionality related to running X11 applications using Xwayland.

When used on top of Xorg it acts as a X11 window manager and compositing manager.

It contains functionality related to, among other things, window management, window compositing, focus tracking, workspace management, keybindings and monitor configuration.

Internally it uses a fork of Cogl, a hardware acceleration abstraction library used to simplify usage of OpenGL pipelines, as well as a fork af Clutter, a scene graph and user interface toolkit.

Mutter is used by, for example, GNOME Shell, the GNOME core user interface, and by Gala, elementary OS's window manager. It can also be run standalone, using the command "mutter", but just running plain mutter is only intended for debugging purposes.

Contributing

To contribute, open merge requests at https://gitlab.gnome.org/GNOME/mutter.

It can be useful to look at the documentation available at the Wiki.

Coding style and conventions

The coding style used is primarily the GNU flavor of the GNOME coding style with some additions:

  • Use regular C types and stdint.h types instead of GLib fundamental types, except for gboolean, and guint/gulong for GSource ids and signal handler ids. That means e.g. uint64_t instead of guint64, int instead of gint, unsigned int instead of guint if unsignedness is of importance, uint8_t instead of guchar, and so on.

  • Try to to limit line length to 80 characters, although it's not a strict limit.

  • Usage of g_autofree and g_autoptr are encouraged. The style used is

      g_autofree char *text = NULL;
      g_autoptr (MetaSomeThing) thing = NULL;
    
      text = g_strdup_printf ("The text: %d", a_number);
      thing = g_object_new (META_TYPE_SOME_THING,
                            "text", text,
                            NULL);
      thinger_use_thing (rocket, thing);
    
  • Declare variables at the top of the block they are used, but avoid non-trivial logic among variable declarations. Non-trivial logic can be getting a pointer that may be NULL, any kind of math, or anything that may have side effects.

  • Instead of boolean arguments in functions, prefer enums or flags when they're more expressive. The naming convention for flags is

    typedef _MetaSomeThingFlags
    {
      META_SOME_THING_FLAG_NONE = 0,
      META_SOME_THING_FLAG_ALTER_REALITY = 1 << 0,
      META_SOME_THING_FLAG_MANIPULATE_PERCEPTION = 1 << 1,
    } MetaSomeThingFlags;
    
  • Use g_new0() etc instead of g_slice_new0().

  • Initialize and assign floating point variables (i.e. float or double) using the form floating_point = 3.14159 or ratio = 2.0.

Git messages

Commit messages should follow the GNOME commit message guidelines. We require an URL to either an issue or a merge request in each commit. Try to always prefix commit subjects with a relevant topic, such as compositor: or clutter/actor:, and it's always better to write too much in the commit message body than too little.

License

Mutter is distributed under the terms of the GNU General Public License, version 2 or later. See the COPYING file for detalis.