Quartz (graphics layer)

From ArticleWorld


Quartz is Mac OS X's graphics layer, sitting at the base of the Aqua graphical user interface. Quartz allows the creation of the user interface itself, including anti-aliasing support and on-the-fly rendering.

Components

There are two main components of Quartz:

  • Quartz Compositor. This is a compositing windowing system, which handles and composites off-screen bitmaps and windows. It is also responsible for event routing and managing windows.
  • Quartz 2D. This is a PDF-based graphics library, used to draw 2D text and graphics. It is the successor of QuickDraw, but it is different from it in many areas (it is vector-based instead of pixel-based, it supports PS-like paths and is based of PDF).

Quartz Extreme is an extension of Quartz Compositor. If the necessary hardware is available (at least 16 MB of VRAM), Quartz Extreme will use OpenGL to display the screen contents. Quartz Extreme does this by presenting the screen contents as a texture in an OpenGL context. A similar effort is in development for Quartz 2D. Several extensions are provided in Mac OS X Tiger, including Core Image and Core Video. They both take advantage of Altivec, if present.

The Non-X11

Some debate appeared as to whether Apple should have used X11 instead of developing their own windowing system. In a Slashdot post that became quite famous, Mike Paquette, one of the main developers of Quartz, explained Apple's choice. Mike Paquette explained that a lot of features had to be implemented by Apple to an already very complex architecture. This wouldn't have allowed most applications that relied on the added code to run on other X servers, making Apple's effort useless. The effort itself would have been considerable, as X11's architecture is considered to be very fragile and bloated.