56ddaaa380
When making a new surface/context pair current, mesa may want to flush the old context. Make sure we don't try to flush any freed memory by unmaking a surface/context pair current before freeing it. Not doing this results in the following valgrind warnings: ==15986== Invalid read of size 8 ==15986== at 0x69A6D80: dri_flush_front_buffer (gbm_dri.c:92) ==15986== by 0x1750D458: intel_flush_front (brw_context.c:251) ==15986== by 0x1750D4BB: intel_glFlush (brw_context.c:296) ==15986== by 0x1739D8DD: dri2_make_current (egl_dri2.c:1461) ==15986== by 0x17393A3A: eglMakeCurrent (eglapi.c:869) ==15986== by 0x54381FB: InternalMakeCurrentVendor (in /home/jonas/Dev/gnome/install/lib/libEGL.so.1.1.0) ==15986== by 0x5438515: eglMakeCurrent (in /home/jonas/Dev/gnome/install/lib/libEGL.so.1.1.0) ==15986== by 0x522A782: _cogl_winsys_egl_make_current (cogl-winsys-egl.c:303) ==15986== by 0x49B64C8: meta_renderer_native_create_view (meta-renderer-native.c:3076) ==15986== by 0x48D26E7: meta_renderer_create_view (meta-renderer.c:78) ==15986== by 0x48D277A: meta_renderer_rebuild_views (meta-renderer.c:111) ==15986== by 0x49BF46E: meta_stage_native_rebuild_views (meta-stage-native.c:142) ==15986== Address 0x1b076600 is 0 bytes inside a block of size 48 free'd ==15986== at 0x4839A0C: free (vg_replace_malloc.c:540) ==15986== by 0x49B59F3: meta_renderer_native_release_onscreen (meta-renderer-native.c:2651) ==15986== by 0x5211441: _cogl_onscreen_free (cogl-onscreen.c:167) ==15986== by 0x5210D81: _cogl_object_onscreen_indirect_free (cogl-onscreen.c:51) ==15986== by 0x51D0066: _cogl_object_default_unref (cogl-object.c:103) ==15986== by 0x520F989: _cogl_framebuffer_unref (cogl-framebuffer.c:1814) ==15986== by 0x51D00B1: cogl_object_unref (cogl-object.c:115) ==15986== by 0x536F3C7: clutter_stage_view_dispose (clutter-stage-view.c:304) ==15986== by 0x4B7DAF2: g_object_unref (gobject.c:3309) ==15986== by 0x4A9596C: g_list_foreach (glist.c:1013) ==15986== by 0x4A9599A: g_list_free_full (glist.c:223) ==15986== by 0x48D2737: meta_renderer_rebuild_views (meta-renderer.c:100) ==15986== Block was alloc'd at ==15986== at 0x483AB1A: calloc (vg_replace_malloc.c:762) ==15986== by 0x69A76B2: gbm_dri_surface_create (gbm_dri.c:1252) ==15986== by 0x69A6BFE: gbm_surface_create (gbm.c:600) ==15986== by 0x49B4E29: meta_renderer_native_create_surface_gbm (meta-renderer-native.c:2221) ==15986== by 0x49B57DB: meta_onscreen_native_allocate (meta-renderer-native.c:2569) ==15986== by 0x49B6423: meta_renderer_native_create_view (meta-renderer-native.c:3062) ==15986== by 0x48D26E7: meta_renderer_create_view (meta-renderer.c:78) ==15986== by 0x48D277A: meta_renderer_rebuild_views (meta-renderer.c:111) ==15986== by 0x49BF46E: meta_stage_native_rebuild_views (meta-stage-native.c:142) ==15986== by 0x49A75B5: meta_backend_native_update_screen_size (meta-backend-native.c:520) ==15986== by 0x48B01BB: meta_backend_sync_screen_size (meta-backend.c:224) ==15986== by 0x48B09B7: meta_backend_real_post_init (meta-backend.c:501) https://gitlab.gnome.org/GNOME/mutter/merge_requests/622 |
||
---|---|---|
.gitlab-ci | ||
clutter | ||
cogl | ||
data | ||
doc | ||
po | ||
src | ||
tools | ||
.gitignore | ||
.gitlab-ci.yml | ||
config.h.meson | ||
COPYING | ||
meson_options.txt | ||
meson.build | ||
mutter.doap | ||
NEWS | ||
README.md |
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.
The coding style used is primarily the GNU flavor of the GNOME coding
style
with some minor additions such as preferring stdint.h
types over GLib
fundamental types, and a soft 80 character line limit. However, in general,
look at the file you're editing for inspiration.
Commit messages should follow the GNOME commit message guidelines. We require an URL to either an issue or a merge request in each commit.
License
Mutter is distributed under the terms of the GNU General Public License, version 2 or later. See the COPYING file for detalis.