mutter/src/compositor
Robert Mader 5772c27e04 shaped-texture: Expose ensure_size_valid() API
When the texture size is invalidated using `invalidate_size()`, the new
size will only get calculated the next time `update_size()` is
called. This happens e.g. in `meta_shaped_texture_get_preferred_size()`
via `ensure_size_valid()`.

`update_size()` can chain up to `clutter_content_invalidate_size()`
as well as emitting a `size-changed` signal. If this happens during
layout, the result is a 'change the layout conditions during layout'
issue, causing heavy breakage in e.g. the Shell overview.

To fix this, expose `ensure_size_valid()` as API so callers can make
sure the texture has a valid size without creating redundant size
invalidations calls.

Note that if a buffer with a new size is attached we already trigger
`update_size()` explicitely, avoiding such situations.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1799>
2021-03-29 15:47:25 +00:00
..
plugins plugins/default: Initialize background color in a predictable manner 2021-03-12 15:09:45 +00:00
clutter-utils.c
clutter-utils.h
cogl-utils.c
cogl-utils.h
compositor-private.h compositor: Refactor backend-specific code into MetaCompositor vfuncs 2021-02-14 13:23:29 +00:00
compositor.c cogl: Make presentation time always MONOTONIC 2021-03-08 09:48:11 +00:00
meta-background-actor-private.h
meta-background-actor.c
meta-background-content-private.h
meta-background-content.c background-content: Optimize rounded clipping shader a bit 2021-03-11 22:59:07 +01:00
meta-background-group.c
meta-background-image.c
meta-background-private.h
meta-background.c
meta-compositor-native.c
meta-compositor-native.h
meta-compositor-server.c compositor: Refactor backend-specific code into MetaCompositor vfuncs 2021-02-14 13:23:29 +00:00
meta-compositor-server.h
meta-compositor-x11.c compositor/x11: Notify the sync ring about frames on updates 2021-03-09 17:42:58 +00:00
meta-compositor-x11.h
meta-cullable.c
meta-cullable.h
meta-dnd-actor-private.h
meta-dnd-actor.c
meta-dnd.c
meta-feedback-actor-private.h
meta-feedback-actor.c
meta-later-private.h
meta-later.c later: Handle gracefully calls with unset display 2021-03-13 15:12:36 +00:00
meta-module.c
meta-module.h
meta-plugin-manager.c
meta-plugin-manager.h
meta-plugin.c
meta-shadow-factory.c src: Stop using GSlice 2021-02-22 13:52:27 +01:00
meta-shaped-texture-private.h shaped-texture: Expose ensure_size_valid() API 2021-03-29 15:47:25 +00:00
meta-shaped-texture.c shaped-texture: Expose ensure_size_valid() API 2021-03-29 15:47:25 +00:00
meta-surface-actor-wayland.c surface-actor-wayland: Handle Xwayland vanishing gracefully 2021-02-09 19:06:22 +00:00
meta-surface-actor-wayland.h
meta-surface-actor-x11.c
meta-surface-actor-x11.h
meta-surface-actor.c
meta-surface-actor.h
meta-sync-ring.c
meta-sync-ring.h
meta-texture-tower.c src: Stop using GSlice 2021-02-22 13:52:27 +01:00
meta-texture-tower.h
meta-window-actor-private.h
meta-window-actor-wayland.c
meta-window-actor-wayland.h
meta-window-actor-x11.c window-actor/x11: Queue full actor redraw when redraw queued 2021-03-09 17:42:58 +00:00
meta-window-actor-x11.h
meta-window-actor.c
meta-window-group-private.h
meta-window-group.c
meta-window-shape.c src: Stop using GSlice 2021-02-22 13:52:27 +01:00
README
region-utils.c region-utils: Fix typo in crop_and_scale() fastpath 2021-03-29 15:17:48 +00:00
region-utils.h

Intro
=====

In general, the compositor splits the window from the contents of
the window from the shape of the window. In other words, a window
has contents, and the contents of the window have a shape. This is
represented by the actor hierarchy:

 +--------------------------------------+
 | MetaWindowActor                      |
 | +----------------------------------+ |
 | | MetaSurfaceActor                 | |
 | | +------------------------------+ | |
 | | | MetaShapedTexture            | | |
 | | |                              | | |
 | | |                              | | |
 | | |                              | | |
 | | |                              | | |
 | | +------------------------------+ | |
 | +----------------------------------+ |
 +--------------------------------------+

Surfaces may also contain subsurfaces. The MetaWindowActor and
MetaSurfaceActor subclasses that will be created depend on the client
type, and the display server type.

## Subsurfaces

Additionally, there is also the case of subsurfaces: surfaces that
are child of other surfaces. That is also represented in the actor
hierarchy by having one or many MetaSurfaceActors (the subsurfaces)
added as children of a parent MetaSurfaceActor. There are no limits
to how many subsurfaces a surface may have. With subsurfaces, the
actor hierarchy looks like this:

 MetaWindowActor
  ↳ MetaSurfaceActor (surface)
     ↳ MetaShapedTexture
     ↳ MetaSurfaceActor (subsurface)
        ↳ MetaShapedTexture
        ↳ MetaSurfaceActor (sub-subsurface)
           ↳ MetaShapedTexture
     ↳ MetaSurfaceActor (subsurface)
        ↳ MetaShapedTexture

In this example, the main surface has 2 subsurfaces. One of these
subsurfaces contains a subsurface as well.

All MetaWindowActors contain at least one MetaSurfaceActor, and all
MetaSurfaceActors contain a MetaShapedTexture.

## Client and compositor

MetaWindowActor and its subclasses represent the client window's
type. A X11 client will have a MetaWindowActorX11 representing it,
and a Wayland client will have a MetaWindowActorWayland.

On the compositor side, the surface where the contents of the window
are drawn into are represented by MetaSurfaceActor subclasses. On a
Wayland session, windows are backed by a MetaSurfaceActorWayland
surface, whereas on X11 sessions, by MetaSurfaceActorX11.

XWayland windows are X11 client windows (MetaWindowActorX11) backed
by Wayland surfaces (MetaWindowActorWayland).


Env Vars
========

MUTTER_DISABLE_MIPMAPS - set to disable use of mipmaped windows.