Quartz Compositor

From Mac Guides

Jump to: navigation, search

Quartz Compositor is the windowing system that is responsible for the user interface in Mac OS X. On a Mac OS X system, the Quartz Compositor can be seen in a process list as Window Manager or, in more recent versions, WindowServer.

Quartz Compositor performs two main functions:

  • maintaining and compositing windows
  • event routing

Each window in Mac OS X is stored as a bitmap associated with positioning (including z-index positioning), transparency and anti-aliasing information. The application that owns the window draws the window contents to the appropriate bitmap, using any of the supported drawing modes (for example Quartz 2D, QuickDraw, OpenGL). Quartz Compositor then takes each window bitmap and composites them together using the associated information to create a display.

This allows the Mac OS X windowing system to be "agnostic in terms of a drawing model" and gives it the ability to create impressive visual effects, such as the genie effect as a window is minimized to the Dock.

Quartz Compositor in its role as window manager, also has an event queue which receives events (key strokes, mouse clicks, etc) from the I/O Kit. The Quartz Compositor takes the events from the queue, determines which process owns the window where the event occurred and passes the event on to the process's own event queue.

Quartz Extreme

Starting with Mac OS X v10.2, Quartz Compositor was extended by Quartz Extreme, which uses OpenGL to render screen displays faster by presenting them as textures within a 3D OpenGL context. This permits faster compositing of screen images using 3D hardware acceleration.

To use Quartz Extreme, the Macintosh must have an AGP graphics card with support for arbitrary texture dimensions and a minimum of 16 MB of VRAM. In practice, this means either any nVidia, an ATI Radeon, or better.

With Mac OS X v10.4 Apple introduced Quartz Extreme 2D, and with it speeded up the actual drawing operations as well, so that as much of the compositing and drawing was taken over by the graphics card as possible. Note that QE2D is not enabled by default, possibly due to instability. In order to enable QE2D, use the Quartz Debug tool included with Apple's XCode 2 Developer Tools. QE2D will most likely be enabled permanently in a later edition of Mac OS X.

External links

This article includes material taken from Wikipedia under the terms of the GFDL. Please note: as a derivative of a GFDL-licensed work, contributions to this article are also made available under the terms of the GFDL.