Compositing manager
A compositing manager, or compositor, is software that provides applications with an off-screen buffer for each window, then composites these window buffers into an image representing the screen and writes the result into the display memory. A compositing window manager is a window manager that is also a compositing manager.
Compositing managers may perform additional processing on buffered windows, applying 2D and 3D animated effects such as blending, fading, scaling, rotation, duplication, bending and contortion, shuffling, blurring, redirecting applications, and translating windows into one of a number of displays and virtual desktops. Computer graphics technology allows for visual effects to be rendered in real time such as drop shadows, live previews, and complex animation.
Since the screen is double buffered, it does not flicker during updates.
The most commonly used compositing managers and compositing window managers include:
- for Linux, BSD, Hurd and OpenSolaris using the X Window System: The 'X server' traditionally performs compositing from numerous networked sources at high speed but stylistic preferences may require compositing duties to be performed by a co-compositor with varying effects on visual qualities, capabilities and performance factors. Some examples are Compiz, KWin, Xfwm, Enlightenment, Muffin, and Mutter compositing window managers and the xcompmgr and picom compositors;
- for Linux and BSD using Wayland: the Weston, KWin, and Mutter compositing window managers;
- for Windows: the Desktop Window Manager; and
- for macOS: the Quartz Compositor.
Contrast with stacking window managers
With a stacking manager, the repainting process can become corrupted when a program that is slow, unresponsive or buggy does not respond to messages in a timely manner. A malicious program can cause the system to appear unstable by simply neglecting to repaint its window. Then, one or more of the following conditions may result:
- a clipped window does not repaint uncovered regions, resulting in either blank spaces or a "trail" left behind from another window
- portions of windows are left behind and not properly painted over
- the mouse pointer is corrupted
- the entire screen freezes until the program either responds or is terminated
History
One of the first systems with a compositing windowing system was the Commodore Amiga, released in 1985. Applications could first request a region of memory outside the current display region for use as bitmap. The Amiga windowing system would then use a series of bit blits using the system's hardware blitter to build a composite of these applications' bitmaps - along with buttons and sliders - in display memory, without requiring these applications to redraw any of their bitmaps.File:Gnome-2.20-screenshot.png|thumb|Metacity window manager, part of GNOME 2
On March 24, 2001, Mac OS X v10.0 became the first mainstream operating system to feature software-based 3D compositing and effects, provided by its Quartz component. With the release of Mac OS X v10.2 and Quartz Extreme, the job of compositing could move to dedicated graphics hardware.
In 2003 Sun Microsystems demonstrated an ambitious 3D graphics system called Project Looking Glass to layer on top of its Swing toolkit. It was first shown at the 2003 LinuxWorld Expo. Although Apple threatened to sue Sun for breach of intellectual-property rights, other window managers have implemented some of the functionality in Looking Glass. By 2006 development was discontinued by Sun, whose primary business was transitioning from graphically oriented Unix workstations to selling enterprise mainframes.
Microsoft first presented the Desktop Window Manager in Project Longhorn to the 2003 Windows Hardware Engineering Conference, demonstrating wobbly windows. Severe delays in the development of Longhorn caused Microsoft not to debut its 3D-compositing window-manager until the release of Windows Vista in January 2007.
Implementing compositing under the X Window System required some redesign, which took place incrementally. Metacity 2.8.4 was released in August 2004. However, the first widely publicized compositing window manager for X was Xfwm, released in January 2005. On 26 January 2005 Compiz was released, introducing fully accelerated 3D-compositing to the Linux platform.
KDE's KWin also supports compositing.
Compositing and 3D effects in operating systems
In compositing, 3D effects could be applied on windows to provide 3D desktop effects. Modern compositing window managers use 3D hardware acceleration. Compositing window manager software communicates with graphics hardware via programming interfaces such as OpenGL or Direct3D.The earliest widespread implementations using this technique were released for the Mac in Mac OS X 10.2, and for Linux in a Luminocity prototype. Currently, window managers using OpenGL include Compiz, KWin, and the Quartz Compositor, while Desktop Window Manager currently uses DirectX 9. OpenGL is still not fully supported in hardware, so performance of OpenGL-based compositing should continue to improve as hardware improves.
X11 and Wayland
Stacking window managers running on the X Window System required a chroma keying or green screening extension. Compositing was introduced by way of the Composite Extension. Compositing managers use hardware acceleration through this extension, if available.Under X11, the ability to do full 3D-accelerated compositing required fundamental changes to the window system protocol in order to use hardware acceleration. Originally, a number of modified X11 implementations designed around OpenGL began to appear, including Xgl. The introduction of AIGLX would eliminate the need to use Xgl, and allow window managers to do 3D accelerated compositing on a standard X server, while still allowing for direct rendering. Currently, NVIDIA, Intel, and ATI cards support AIGLX.
Compiz introduced a cube effect, which allows the user to see up to 6 virtual desktops at once. Each desktop is converted into a surface texture of the cube, which can be rotated at will. Compiz displays a wide array of 2D and 3D effects and has relatively low hardware requirements. In 2012, Compiz was included in Ubuntu Linux, and was enabled automatically when supported hardware and drivers were available and the user had not selected 2D Mode.
Mutter has replaced Metacity as the default window manager for GNOME. It is featured in the GNOME Shell component of GNOME 3.0. It uses the display engine Clutter, which has been ported to all major operating systems, netbooks and smartphones.
Since version 4, KDE's window manager KWin has compositing capabilities. KWin features much of the same functionality also present in Compiz.
With the Wayland protocol, a compositing window manager is also a display server; there is no display server separate from the window manager. The combined window manager/display server is called a Wayland compositor. Weston is a reference implementation of a Wayland compositor; KWin and Mutter are also Wayland compositors as well as being X11 compositing window managers.
Java
Project Looking Glass was a window manager combining 3D rendering and the cross-platform Java programming language. It is now inactive and released under the GNU General Public License. The Granular Linux live CD distribution includes Looking Glass as an optional window manager.In the aftermath of it being discontinued, some of its features, such as cover switching and thumbnail live previews, have found their way onto other window managers. Its more original features included window tilting, two-sided window frames and parallax scrolling backgrounds.
AmigaOS 4 and MorphOS
While they are able to run on 3D-capable hardware, AmigaOS 4 and MorphOS are designed to run on old legacy Amiga computers, starting with the Amiga 1200. As such, their window managers have mostly planar rendering capabilities that include composite layering, alpha blending, gradients, high resolution and multiple desktops that can partially clip one another.Microsoft Windows
While the window manager in Windows 2000 does perform compositing, it does not perform transformations such as a per-pixel alpha. Few commercial applications took advantage of alpha blending; freeware programs were among the first to experiment with it, albeit through optional settings. Compositing was introduced with Desktop Window Manager in Windows Vista.Windows Vista and Windows 7 allow the user to disable Desktop Window Manager by selecting the Windows Basic appearance settings. In addition, it is automatically disabled by Windows in order to perform hardware overlay through the Overlay Mixer Filter.