mutter/src/backends
Jonas Ådahl d9fb11b043 renderer/native: Fix EGLSurface destruction order
Make sure to destroy the EGL surface after releasing held buffers,
otherwise we'll get the following valgrind warnings:

==24016== Invalid read of size 8
==24016==    at 0x1739943F: release_buffer (platform_drm.c:73)
==24016==    by 0x49AC355: meta_drm_buffer_gbm_finalize (meta-drm-buffer-gbm.c:213)
==24016==    by 0x4B75B61: g_object_unref (gobject.c:3346)
==24016==    by 0x49B4B41: free_current_bo (meta-renderer-native.c:991)
==24016==    by 0x49B816F: meta_renderer_native_release_onscreen (meta-renderer-native.c:2971)
==24016==    by 0x5209441: _cogl_onscreen_free (cogl-onscreen.c:167)
==24016==    by 0x5208D81: _cogl_object_onscreen_indirect_free (cogl-onscreen.c:51)
==24016==    by 0x51C8066: _cogl_object_default_unref (cogl-object.c:103)
==24016==    by 0x5207989: _cogl_framebuffer_unref (cogl-framebuffer.c:1814)
==24016==    by 0x51C80B1: cogl_object_unref (cogl-object.c:115)
==24016==    by 0x53673C7: clutter_stage_view_dispose (clutter-stage-view.c:304)
==24016==    by 0x4B75AF2: g_object_unref (gobject.c:3309)
==24016==  Address 0x18e742a8 is 536 bytes inside a block of size 784 free'd
==24016==    at 0x4839A0C: free (vg_replace_malloc.c:540)
==24016==    by 0x17399764: dri2_drm_destroy_surface (platform_drm.c:231)
==24016==    by 0x1738550A: eglDestroySurface (eglapi.c:1145)
==24016==    by 0x5440286: eglDestroySurface (in /home/jonas/Dev/gnome/install/lib/libEGL.so.1.1.0)
==24016==    by 0x49613A5: meta_egl_destroy_surface (meta-egl.c:432)
==24016==    by 0x49B80F9: meta_renderer_native_release_onscreen (meta-renderer-native.c:2954)
==24016==    by 0x5209441: _cogl_onscreen_free (cogl-onscreen.c:167)
==24016==    by 0x5208D81: _cogl_object_onscreen_indirect_free (cogl-onscreen.c:51)
==24016==    by 0x51C8066: _cogl_object_default_unref (cogl-object.c:103)
==24016==    by 0x5207989: _cogl_framebuffer_unref (cogl-framebuffer.c:1814)
==24016==    by 0x51C80B1: cogl_object_unref (cogl-object.c:115)
==24016==    by 0x53673C7: clutter_stage_view_dispose (clutter-stage-view.c:304)
==24016==  Block was alloc'd at
==24016==    at 0x483AB1A: calloc (vg_replace_malloc.c:762)
==24016==    by 0x173997AE: dri2_drm_create_window_surface (platform_drm.c:145)
==24016==    by 0x17388906: _eglCreateWindowSurfaceCommon (eglapi.c:929)
==24016==    by 0x5440197: eglCreateWindowSurface (in /home/jonas/Dev/gnome/install/lib/libEGL.so.1.1.0)
==24016==    by 0x49612FF: meta_egl_create_window_surface (meta-egl.c:396)
==24016==    by 0x49B752E: meta_renderer_native_create_surface_gbm (meta-renderer-native.c:2538)
==24016==    by 0x49B7E6C: meta_onscreen_native_allocate (meta-renderer-native.c:2870)
==24016==    by 0x49B8BCF: meta_renderer_native_create_view (meta-renderer-native.c:3387)
==24016==    by 0x48D274B: meta_renderer_create_view (meta-renderer.c:78)
==24016==    by 0x48D27DE: meta_renderer_rebuild_views (meta-renderer.c:111)
==24016==    by 0x49BB4FB: meta_stage_native_rebuild_views (meta-stage-native.c:142)
==24016==    by 0x49A733C: meta_backend_native_update_screen_size (meta-backend-native.c:517)

https://gitlab.gnome.org/GNOME/mutter/merge_requests/622
2019-06-18 11:12:03 +02:00
..
native renderer/native: Fix EGLSurface destruction order 2019-06-18 11:12:03 +02:00
x11 renderer-x11-nested: Fix copy-and-paste error 2019-05-28 14:34:32 +00:00
edid-parse.c Clean up include macros mess 2018-11-06 17:17:36 +01:00
edid.h edid: Remove unused declarations 2014-09-12 11:55:08 -06:00
gsm-inhibitor-flag.h idle-monitor: Take idle inhibition into account 2018-04-16 13:28:03 +02:00
meta-backend-private.h backend: Add API to freeze/thaw frame clock 2019-04-02 13:49:59 +00:00
meta-backend-types.h screen-cast: Add getters to fetch object owners 2019-01-16 17:09:51 +00:00
meta-backend.c backend: Conditionally compile MetaProfiler 2019-05-31 12:54:13 -03:00
meta-barrier-private.h Use G_DECLARE_DERIVABLE/FINAL_TYPE on some types 2018-12-21 19:48:50 +00:00
meta-barrier.c Use a consistent style for enum braces 2019-02-28 09:31:01 +01:00
meta-crtc.c backends: Split out CRTC/output management to MetaGpu 2017-10-05 18:05:20 -04:00
meta-crtc.h meta: Hide libmutter symbols by default and selectively export them 2019-01-23 14:18:13 +01:00
meta-cursor-renderer.c cursor-renderer: Align OpenGL cursor rect to physical pixel grid 2019-06-07 19:11:34 +00:00
meta-cursor-renderer.h cursor-renderer: Add API to allow inhibiting HW cursor 2019-01-16 17:09:51 +00:00
meta-cursor-sprite-xcursor.c cursor-renderer/native: Let the backend realize cursor sprite itself 2018-06-15 19:09:55 +00:00
meta-cursor-sprite-xcursor.h cursor-renderer: Fetch instead of pass Xcursor image when realizing 2018-06-15 19:09:52 +00:00
meta-cursor-tracker-private.h Use G_DECLARE_DERIVABLE/FINAL_TYPE on some types 2018-12-21 19:48:50 +00:00
meta-cursor-tracker.c Use a consistent style for enum braces 2019-02-28 09:31:01 +01:00
meta-cursor.c wayland: Move surface texture ownership to MetaWaylandSurface 2019-02-25 15:35:38 +00:00
meta-cursor.h Clean up include macros mess 2018-11-06 17:17:36 +01:00
meta-dbus-session-watcher.c Add remote desktop and screen cast functionality 2017-08-29 14:39:04 +08:00
meta-dbus-session-watcher.h Add remote desktop and screen cast functionality 2017-08-29 14:39:04 +08:00
meta-display-config-shared.h Use a consistent style for enum braces 2019-02-28 09:31:01 +01:00
meta-dnd-private.h Clean up include macros mess 2018-11-06 17:17:36 +01:00
meta-egl-ext.h egl: Add EGL_RESOURCE_BUSY_EXT error 2017-03-04 18:34:17 +08:00
meta-egl.c Fix const qualifier usage 2019-01-22 18:31:53 +01:00
meta-egl.h Fix const qualifier usage 2019-01-22 18:31:53 +01:00
meta-gles3-table.h backends: Add OpenGL ES 3 abstraction layer 2017-10-05 18:17:26 -04:00
meta-gles3.c Fix const qualifier usage 2019-01-22 18:31:53 +01:00
meta-gles3.h Fix const qualifier usage 2019-01-22 18:31:53 +01:00
meta-gpu.c backends: Split out CRTC/output management to MetaGpu 2017-10-05 18:05:20 -04:00
meta-gpu.h gpu: Remove unimplemented ::get_kms_file_path() 2019-02-15 09:17:07 +01:00
meta-idle-monitor-dbus.c idle-monitor: Fix duplicate return value of ResetIdletime call 2019-02-25 14:42:03 +00:00
meta-idle-monitor-dbus.h Start molding out a new src/backends/ dir 2014-03-31 22:11:00 -04:00
meta-idle-monitor-private.h Clean up include macros mess 2018-11-06 17:17:36 +01:00
meta-idle-monitor.c idle-monitor: Postpone dispatching of idle timeout if not ready 2019-05-02 23:46:43 +00:00
meta-input-mapper-private.h backends: Add MetaInputMapper method to lookup devices from outputs 2018-12-06 14:44:46 +00:00
meta-input-mapper.c input-mapper: Remove unnecessary return value 2019-05-28 14:34:32 +00:00
meta-input-settings-private.h Clean up include macros mess 2018-11-06 17:17:36 +01:00
meta-input-settings.c backends: Add mouse accessibility settings 2019-06-06 13:04:50 +02:00
meta-logical-monitor.c Add some gtk-doc comments. 2019-01-06 21:57:16 +01:00
meta-logical-monitor.h meta: Hide libmutter symbols by default and selectively export them 2019-01-23 14:18:13 +01:00
meta-monitor-config-manager.c boxes: Fix spelling in API 2019-03-17 14:12:40 +00:00
meta-monitor-config-manager.h monitor-config-store: Read system wide config files 2019-02-26 21:04:27 +00:00
meta-monitor-config-migration.c monitor-config-migration: Discard if configured mode is missing 2017-10-04 09:45:02 -04:00
meta-monitor-config-migration.h meta: Hide libmutter symbols by default and selectively export them 2019-01-23 14:18:13 +01:00
meta-monitor-config-store.c monitor-config-store: Read system wide config files 2019-02-26 21:04:27 +00:00
meta-monitor-config-store.h meta: Hide libmutter symbols by default and selectively export them 2019-01-23 14:18:13 +01:00
meta-monitor-manager-dummy.c monitor: Fix indentation style on calculate_supported_scales and friends 2019-03-12 00:15:42 +00:00
meta-monitor-manager-dummy.h Clean up include macros mess 2018-11-06 17:17:36 +01:00
meta-monitor-manager-private.h monitor-manager: Clean up DPMS state tracking 2019-04-02 13:49:59 +00:00
meta-monitor-manager.c monitor-manager: Clean up DPMS state tracking 2019-04-02 13:49:59 +00:00
meta-monitor-transform.c Fix builds with G_DISABLE_ASSERT 2019-01-25 09:43:06 +01:00
meta-monitor-transform.h monitor-transform: Add helper function transform_invert() 2019-01-05 14:18:02 +01:00
meta-monitor.c monitor: Assign monitor layout directly by crtc rect 2019-05-21 08:50:09 +00:00
meta-monitor.h monitor: Fix indentation style on foreach functions 2019-03-12 00:15:43 +00:00
meta-orientation-manager.c Clean up include macros mess 2018-11-06 17:17:36 +01:00
meta-orientation-manager.h Clean up include macros mess 2018-11-06 17:17:36 +01:00
meta-output.c backends: Add logical monitor -> monitor -> output -> crtc ref chain 2018-06-28 13:42:15 +02:00
meta-output.h meta: Hide libmutter symbols by default and selectively export them 2019-01-23 14:18:13 +01:00
meta-pointer-constraint.c Add some gtk-doc comments. 2019-01-06 21:57:16 +01:00
meta-pointer-constraint.h Add some gtk-doc comments. 2019-01-06 21:57:16 +01:00
meta-profiler.c cogl/trace: Add user-visible group name 2019-05-31 11:57:09 -03:00
meta-profiler.h profile: Add a Sysprof-based profiler 2019-05-31 11:57:07 -03:00
meta-remote-access-controller-private.h Add remote access controller API 2018-07-20 16:49:49 +02:00
meta-remote-access-controller.c Add remote access controller API 2018-07-20 16:49:49 +02:00
meta-remote-desktop-session.c Fix builds with G_DISABLE_ASSERT 2019-01-25 09:43:06 +01:00
meta-remote-desktop-session.h Add remote access controller API 2018-07-20 16:49:49 +02:00
meta-remote-desktop.c Pass -D_GNU_SOURCE instead of defining it in source 2018-11-06 17:17:36 +01:00
meta-remote-desktop.h Clean up include macros mess 2018-11-06 17:17:36 +01:00
meta-renderer-view.c Add some gtk-doc comments. 2019-01-06 21:57:16 +01:00
meta-renderer-view.h renderer-view: Add view transform getter 2017-04-07 22:30:49 +08:00
meta-renderer.c renderer: Add API to get view from logical monitor 2019-01-16 17:09:51 +00:00
meta-renderer.h meta: Hide libmutter symbols by default and selectively export them 2019-01-23 14:18:13 +01:00
meta-screen-cast-monitor-stream-src.c screen-cast: Move cursor metadata setting to generic source 2019-02-26 13:39:11 +00:00
meta-screen-cast-monitor-stream-src.h ScreenCast: Pass PipeWire stream node ID directly 2017-08-29 14:39:04 +08:00
meta-screen-cast-monitor-stream.c screen-cast: Add 'cursor-mode' to allow decoupled cursor updates 2019-01-16 17:09:51 +00:00
meta-screen-cast-monitor-stream.h screen-cast: Add 'cursor-mode' to allow decoupled cursor updates 2019-01-16 17:09:51 +00:00
meta-screen-cast-session.c screen-cast-window-stream: Add support for cursor modes 2019-02-26 13:39:11 +00:00
meta-screen-cast-session.h screen-cast-stream: Don't broadcast PipeWireStreamAdded signal 2019-01-30 17:14:47 +00:00
meta-screen-cast-stream-src.c screen-cast-src: Add helper to draw cursor sprite into pixel buffer 2019-02-26 13:39:11 +00:00
meta-screen-cast-stream-src.h screen-cast-src: Add helper to draw cursor sprite into pixel buffer 2019-02-26 13:39:11 +00:00
meta-screen-cast-stream.c screen-cast-stream: Don't broadcast PipeWireStreamAdded signal 2019-01-30 17:14:47 +00:00
meta-screen-cast-stream.h screen-cast: Add 'cursor-mode' to allow decoupled cursor updates 2019-01-16 17:09:51 +00:00
meta-screen-cast-window-stream-src.c screen-cast-window-stream: Add support for cursor modes 2019-02-26 13:39:11 +00:00
meta-screen-cast-window-stream-src.h screen-cast-session: Add screen-cast window mode 2018-12-14 13:26:16 +01:00
meta-screen-cast-window-stream.c screen-cast-window-stream: Add support for cursor modes 2019-02-26 13:39:11 +00:00
meta-screen-cast-window-stream.h screen-cast-window-stream: Add support for cursor modes 2019-02-26 13:39:11 +00:00
meta-screen-cast-window.c screen-cast-window: Add API to check if content has damage 2019-02-26 13:39:11 +00:00
meta-screen-cast-window.h screen-cast-window: Add API to check if content has damage 2019-02-26 13:39:11 +00:00
meta-screen-cast.c screen-cast: Bump API version to 2 2019-02-26 13:39:11 +00:00
meta-screen-cast.h screen-cast: Add 'cursor-mode' to allow decoupled cursor updates 2019-01-16 17:09:51 +00:00
meta-settings-private.h settings: Remove space characters 2019-06-03 09:34:31 +02:00
meta-settings.c settings: Remove space characters 2019-06-03 09:34:31 +02:00
meta-stage-private.h renderer-native: Fake page flipping slower when power saving 2019-04-02 13:49:59 +00:00
meta-stage.c clutter: Remove ability to be user resizable 2019-06-13 14:28:46 +00:00