1
0
Fork 0
mutter-performance-source/src
Jonas Ådahl 60a998bdbc onscreen/native: Release buffer before destroying EGLSurface
Destroying the EGLSurface frees the underlying container structs. When
we call gbm_surface_release_buffer() with a gbm_surface the EGLSurface
was created from, doing that after the EGLSurface was destroyed results
in attempts to access freed memory. Fix this by releasing any buffer
first, followed by destroying the EGLSurface, and lastly, the
gbm_surface.

This was not a problem prior to CoglOnscreen turning into a GObject, as
in that case, the dispose-chain was not setup correctly, and the
EGLSurface destruction was done in the native backend implementation.

This also changes a g_return_if_fail() to a g_warn_if_fail(), as if we
hit the unexpected case, we still need to call up to the parent dispose
vfunc to not cause critical issues.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1803>
2021-04-14 17:42:32 +00:00
..
backends onscreen/native: Release buffer before destroying EGLSurface 2021-04-14 17:42:32 +00:00
compositor shaped-texture: Expose ensure_size_valid() API 2021-03-29 15:47:25 +00:00
core core: Drop X11 error trap from pointer warping code 2021-03-29 13:54:06 +02:00
meta core: Drop "volatile" from static GTypes in manual registration 2021-03-22 10:47:51 +00:00
tests tests: Add persistent virtual monitor test 2021-03-12 15:09:45 +00:00
ui frame: Fix crash when clicking below titlebar with broken gtk themes 2021-03-08 21:16:09 +00:00
wayland Revert "wayland/window: Correct detection whether to send configure" 2021-04-14 06:36:09 +00:00
x11 window/x11: Keep buffer size if resize is not allowed 2021-04-14 16:51:21 +00:00
libmutter.pc.in build: Fix libs and cflags in autotools .pc file 2018-11-10 16:20:46 +00:00
meson.build launcher: Use gnome.gdbusgen and add prefix to generated API 2021-04-14 12:53:25 +00:00
meta-private-enum-types.c.in core: Drop "volatile" from static GTypes in manual registration 2021-03-22 10:47:51 +00:00
meta-private-enum-types.h.in screen-cast: Add screen cast flag to streams 2020-07-30 09:51:16 +02:00
org.freedesktop.login1.xml MetaLauncher: Don't g_error() on failure 2015-11-06 17:03:59 -05:00
org.gnome.Mutter.DisplayConfig.xml x11: Support the CTM (color transform matrix) RandR property 2021-01-11 13:44:54 +00:00
org.gnome.Mutter.IdleMonitor.xml idle-monitor: Add ResetIdletime API, for testing purposes 2018-04-16 13:28:03 +02:00
org.gnome.Mutter.RemoteDesktop.xml remote-desktop/session: Add CapsLockState and NumLockState properties 2021-03-04 17:39:08 +00:00
org.gnome.Mutter.ScreenCast.xml screen-cast/session: Introduce RecordVirtual D-Bus API 2021-03-12 15:09:45 +00:00