mutter/src/meta
Jonas Dreßler 5527b6e483 background-content: Add support for rounded clipping when drawing
We're going to round the workspace backgrounds in the new overview for
gnome-shell 40.

So far corner-rounding was only possible for StWidgets because the
rounded clipping was done using cairo drawing. We now need rounded
clipping for ClutterActors too because backgrounds are drawn using
ClutterActors (or more specifically a ClutterContent). To implement
that, first a ClutterOffscreenEffect subclass together with a fragment
shader from GSK (see gskSetOutputColor() [1] in the GSK GL renderer
code) was investigated, and while that was generic and worked quite
well, it was extremely slow for the case of drawing wallpapers because
of all the FBOs that had to be allocated.

This is the new, more performant approach: Use the same fragment shader,
but perform the rounded clipping right in MetaBackgroundContent while
we're painting the wallpaper. This has almost no performance impact,
with the downside of not being a generic solution.

To allow for rounded clipping not only at the edges of the wallpaper,
but using any given bounding rectangle, the API exposes not only the
radius, but also a bounding rect.

[1] https://gitlab.gnome.org/GNOME/gtk/-/blob/master/gsk/resources/glsl/preamble.fs.glsl

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1717>
2021-02-18 20:26:42 +00:00
..
barrier.h Use a consistent style for enum braces 2019-02-28 09:31:01 +01:00
boxes.h meta: Hide libmutter symbols by default and selectively export them 2019-01-23 14:18:13 +01:00
common.h *: Fix spelling mistakes found by codespell 2020-08-29 09:10:31 +00:00
compositor-mutter.h compositor/x11: Move stage input region setting to MetaX11Display 2019-08-19 08:44:58 +00:00
compositor.h compositor: Let MetaDisplay choose the correct compositor type 2019-08-19 08:44:58 +00:00
display.h display: Expose window_grab_modifiers 2021-02-04 19:26:18 +00:00
group.h meta: Hide libmutter symbols by default and selectively export them 2019-01-23 14:18:13 +01:00
keybindings.h meta: Hide libmutter symbols by default and selectively export them 2019-01-23 14:18:13 +01:00
main.h meta: Remave meta_activate_session() 2021-01-28 20:05:23 +00:00
meson.build plugin: Drop version information 2020-10-06 15:14:34 +02:00
meta-backend.h renderer: Add API to check whether renderer is hardware accelerated 2020-02-20 10:40:42 +00:00
meta-background-actor.h Include the pkgconfig-specified gdesktop-enums.h 2020-07-13 17:30:20 +08:00
meta-background-content.h background-content: Add support for rounded clipping when drawing 2021-02-18 20:26:42 +00:00
meta-background-group.h meta: Make MetaBackgroundGroup derivable 2019-06-24 13:49:31 +00:00
meta-background-image.h meta: Hide libmutter symbols by default and selectively export them 2019-01-23 14:18:13 +01:00
meta-background.h Include the pkgconfig-specified gdesktop-enums.h 2020-07-13 17:30:20 +08:00
meta-close-dialog.h meta: Hide libmutter symbols by default and selectively export them 2019-01-23 14:18:13 +01:00
meta-cursor-tracker.h backends: Use graphene_point_t on meta_cursor_tracker_get_pointer() 2020-10-06 21:33:10 +02:00
meta-dnd.h meta: Hide libmutter symbols by default and selectively export them 2019-01-23 14:18:13 +01:00
meta-enum-types.c.in Move meta-enum-type.*.in into meta/ 2018-11-06 17:17:36 +01:00
meta-enum-types.h.in enum-types: Use @basename@ in header comment 2019-06-12 18:01:36 +02:00
meta-idle-monitor.h backends: Drop meta_idle_monitor_get_for_device() 2020-02-12 22:07:55 +00:00
meta-inhibit-shortcuts-dialog.h meta: Hide libmutter symbols by default and selectively export them 2019-01-23 14:18:13 +01:00
meta-later.h later: Make MetaCompositor the owner of the MetaLaters state 2020-04-16 15:05:52 +02:00
meta-launch-context.h meta: Hide libmutter symbols by default and selectively export them 2019-01-23 14:18:13 +01:00
meta-monitor-manager.h backends: Centralize panel autorotation in a DisplayConfig property 2020-09-05 07:25:02 +00:00
meta-plugin.h plugin: Drop version information 2020-10-06 15:14:34 +02:00
meta-remote-access-controller.h remote-access-controller: Allow inhibiting remote access 2020-04-27 14:31:06 +00:00
meta-selection-source-memory.h Make MetaSelection, MetaSelectionSource and MetaMemorySelectionSource public 2019-05-02 16:31:45 +02:00
meta-selection-source.h Make MetaSelection, MetaSelectionSource and MetaMemorySelectionSource public 2019-05-02 16:31:45 +02:00
meta-selection.h Make MetaSelection, MetaSelectionSource and MetaMemorySelectionSource public 2019-05-02 16:31:45 +02:00
meta-settings.h meta: Hide libmutter symbols by default and selectively export them 2019-01-23 14:18:13 +01:00
meta-shadow-factory.h meta: Hide libmutter symbols by default and selectively export them 2019-01-23 14:18:13 +01:00
meta-shaped-texture.h shaped-texture: Make set_opaque_region() private 2020-06-29 12:57:55 +02:00
meta-sound-player.h meta: Hide libmutter symbols by default and selectively export them 2019-01-23 14:18:13 +01:00
meta-stage.h meta: Hide libmutter symbols by default and selectively export them 2019-01-23 14:18:13 +01:00
meta-startup-notification.h meta, startup-notification: Make type declarations public 2019-01-24 16:38:09 +00:00
meta-wayland-client.h wayland: Add API to launch trusted clients 2020-08-04 08:42:29 +00:00
meta-window-actor.h window-actor: Make freezing and thawing of actor updates public API 2020-06-15 13:10:16 +00:00
meta-window-group.h meta: Hide libmutter symbols by default and selectively export them 2019-01-23 14:18:13 +01:00
meta-window-shape.h meta: Hide libmutter symbols by default and selectively export them 2019-01-23 14:18:13 +01:00
meta-workspace-manager.h meta: Add missing display.h to meta-workspace-manager.h 2020-01-29 11:30:24 +01:00
meta-x11-display.h compositor/x11: Move stage input region setting to MetaX11Display 2019-08-19 08:44:58 +00:00
meta-x11-errors.h meta: Hide libmutter symbols by default and selectively export them 2019-01-23 14:18:13 +01:00
prefs.h display: Make check-alive timeout configureable 2020-02-23 17:28:57 +00:00
theme.h meta: Hide libmutter symbols by default and selectively export them 2019-01-23 14:18:13 +01:00
types.h Make MetaSelection, MetaSelectionSource and MetaMemorySelectionSource public 2019-05-02 16:31:45 +02:00
util.h util: Add 'remote-desktop' debug topic 2021-02-05 16:44:27 +00:00
window.h window: Return pid_t in meta_window_get_pid() 2020-05-21 23:10:23 +00:00
workspace.h meta: Hide libmutter symbols by default and selectively export them 2019-01-23 14:18:13 +01:00