mutter/src/backends
Jonas Ådahl 252e64a0ea wayland: Move surface texture ownership to MetaWaylandSurface
Prior to this commit, MetaWaylandSurface held a reference to
MetaWaylandBuffer, who owned the texture drawn by the surface. When
switching buffer, the texture change with it.

This is problematic when dealing with SHM buffer damage management, as
when having one texture per buffer, damaged regions uploaded to one,
will not follow along to the next one attached. It also wasted GPU
memory as there would be one texture per buffer, instead of one one
texture per surface.

Instead, move the texture ownership to MetaWaylandSurface, and have the
SHM buffer damage management update the surface texture. This ensures
damage is processed properly, and that we won't end up with stale
texture content when doing partial texture uploads. If the same SHM
buffer is attached to multiple surfaces, each surface will get their own
copy, and damage is tracked and uploaded separately.

Non-SHM types of buffers still has their own texture reference, as the
texture is just a representation of the GPU memory associated with the
buffer. When such a buffer is attached to a surface, instead the surface
just gets a reference to that texture, instead of a separately allocated
one.

Fixes: https://gitlab.gnome.org/GNOME/mutter/issues/199
2019-02-25 15:35:38 +00:00
..
native cursor-renderer/native: Clear active CRTC gbm_bo when destroyed 2019-02-25 15:35:38 +00:00
x11 Fix builds with G_DISABLE_ASSERT 2019-01-25 09:43:06 +01: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 meta, startup-notification: Make type declarations public 2019-01-24 16:38:09 +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 screen-cast: Add getters to fetch object owners 2019-01-16 17:09:51 +00: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 x11: Require XInput 2.3 at build time 2018-11-06 17:17:36 +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: Add API to allow inhibiting HW cursor 2019-01-16 17:09:51 +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 cursor-tracker: Emit cursor-changed after renderer was updated 2019-01-16 17:09:51 +00: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 Remove trailing whitespace 2014-05-02 09:34:48 -04: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 Clean up include macros mess 2018-11-06 17:17:36 +01: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: Use g_auto to free a string array 2019-02-11 15:42:16 +01:00
meta-input-settings-private.h Clean up include macros mess 2018-11-06 17:17:36 +01:00
meta-input-settings.c MonitorManager: Use composition instead of inheriting from dbus skeleton 2019-01-23 14:12:07 +01: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 monitor-config-manager: respect other outputs' CRTC 2019-02-21 17:23:38 +02:00
meta-monitor-config-manager.h meta: Hide libmutter symbols by default and selectively export them 2019-01-23 14:18:13 +01: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: Keep track of disabled monitors for stored configs 2017-10-02 15:34:24 -04: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-manager-dummy: Allow to pass extra monitor specs via env 2018-12-05 10:34:22 +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: Don't use wacky physical dimensions in display name 2019-02-04 17:41:36 +01:00
meta-monitor-manager.c monitor-manager: Provide proper contexts for translators 2019-02-04 18:41:05 +01: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-manager: Don't use wacky physical dimensions in display name 2019-02-04 17:41:36 +01:00
meta-monitor.h meta: Hide libmutter symbols by default and selectively export them 2019-01-23 14:18:13 +01: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-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: Fix monitor recording on HiDPI 2019-01-26 16:18:45 +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-stream: Don't broadcast PipeWireStreamAdded signal 2019-01-30 17:14:47 +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: Add 'cursor-mode' to allow decoupled cursor updates 2019-01-16 17:09:51 +00:00
meta-screen-cast-stream-src.h screen-cast: Add 'cursor-mode' to allow decoupled cursor updates 2019-01-16 17:09:51 +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: Add 'cursor-mode' to allow decoupled cursor updates 2019-01-16 17:09:51 +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: Add getters to fetch object owners 2019-01-16 17:09:51 +00:00
meta-screen-cast-window-stream.h screen-cast: Add getters to fetch object owners 2019-01-16 17:09:51 +00:00
meta-screen-cast-window.c screen-cast: Add screen-cast-window interface 2018-12-14 13:26:16 +01:00
meta-screen-cast-window.h screen-cast: Add screen-cast-window interface 2018-12-14 13:26:16 +01:00
meta-screen-cast.c screen-cast: Add getters to fetch object owners 2019-01-16 17:09:51 +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 meta: Hide libmutter symbols by default and selectively export them 2019-01-23 14:18:13 +01:00
meta-settings.c settings: Remove confused comment 2018-06-07 12:57:52 +00:00
meta-stage-private.h backends/stage: Remove unused function declaration 2018-11-09 11:16:30 +01:00
meta-stage.c backends/stage: Emit signal between painting actors and overlays 2019-01-16 17:09:51 +00:00