Background

In Mac OS X 10.1, nearly all graphics appearing on a screen were a product of Quartz. Quartz was the underlying graphics system, which allowed OS X to have translucent menus, throbbing blue buttons, anti-aliased fonts, and all sorts of Aqua-y goodness.

Problem

Nearly all of the computations required to draw graphics were performed by the CPU. Unfortunately, a CPU is not really designed to do the computations required to draw graphics. The heavy load, in some situations, made OS X slighly sluggish while the CPU figured out how to draw everything pretty-like.

Solution

Announced as a new feature of Mac OS 10.2 (“Jaguar”), Quartz Extreme is an overhaul of Quartz. The most notable thing about Quartz Extreme is that, assuming you have a compatible graphics card*, the calculations needed to render the desktop (a three-dimensional scene with textures) are handled by the GPU**. Along with a number of other small tweaks, Quartz Extreme is perhaps the single most important technology responsible for speeding up OS X.

Apple's symbol for Quartz Extreme is a two-color Q, silver and dark blue.




*Apple recommends a graphics card with 32 MB of VRAM; however, it should be noted that the newer iBooks (which have 16 MB cards) CAN take advantage of QE.

** For those with a more technical background, this load-shifting is accomplished by pipelining Quartz through OpenGL to the GPU.

Apple states that you need an AGP-based graphics card with at least 16MB VRAM for Quartz Extreme (QE) to take effect. Apple lists the NVIDIA GeForce2 MX, GeForce3, Geforce4MX, or GeForce4 Ti, or any AGP-based ATI Radeon as compatible graphics cards.

What about users who have a PCI PowerMac, with a PCI graphics card which has 32MB VRAM? Apple does not enable QE by default, however, a third-party hack enables it. It is called PCI Extreme, made by a small company called Dangerous Wares. It is available for download here (http://www.versiontracker.com/moreinfo.fcgi?id=16006&db=VT).

I have a PowerMac G3 Rev A, with a Radeon Mac Edition (32MB DDR). PCI Extreme installed without any problems. I verified that QE was enabled with a utility called 'Quartz Extreme Check', available here (http://versiontracker.com/moreinfo.fcgi?id=15911&db=mac).

Apple chose not to enable QE on PCI machines because of potential performance problems. The PCI bus is much slower than the AGP bus, hence, throughput is much less. When doing operations involving the OS X window server, performance increases greatly. However, when doing CPU-intensive operations, performance may degrade on slower machines.

As the above writeups explain, Quartz Extreme is Apple's name for a technology that uses OpenGL to accelerate parts of Quartz.

There are a lot of misconceptions about what exactly Quartz Extreme accelerates. Quartz is Mac OS X's 2D graphics layer and some people assume that Quartz Extreme accelerates all of it.

What Quartz Extreme doesn't do

  • 3D Graphics: These are already handled by OpenGL. This may seem obvious, but at the Paris Apple Expo I saw an Apple employee point to a machine running an OpenGL demo, with all sorts of fancy textures, transparencies and so on, and say that this was possible thanks to Quartz Extreme.
  • 2D Graphics: Quartz Extreme does not accelerate drawing. Your antialiased bezier curve or text takes the same amount of time to draw. However starting with 10.4, Quartz 2D Extreme can accelerate this kind of task (although it is currently disabled).
  • Window resizing: Slow window resizing has been a common complaint and some people thought that Quartz Extreme would speed this up. Although Finder window resizing is faster in Jaguar, this is because of improvements to the Finder, not to Quartz Extreme. The bottleneck in window resizing is the application shuffling around all its controls (which is often done in an inefficient way) and deciding what it wants to redraw.

What does Quartz Extreme do then?

One thing (but it's a big thing) : compositing. In Classic Mac OS, applications basically drew straight to the screen. In Mac OS X it is not so. All the drawing is done by a process known as the Window Server. The window server has a list of all windows and access to the pixel data in them. When it decides it's time to draw it goes through its list of windows, calculating things like where they intersect, checking the Z-ordering of windows to see which windows are on top. The eye-candy in Mac OS X can make this expensive. In Mac OS X, windows cast shadows, which need to be calculated. Some elements, like the Dock, menus or the titlebars of inactive windows are partially transparent. It takes time to calculate all these transparencies. This process of combining all the windows and graphical elements into a set of pixels is known as compositing.

Your fancy 3D graphics card is good at all these kind of things. When you play quake, all of these things are happening at the same time: flashes from your plasma gun, smoke from the rocket launcher, players being hidden by walls and so on. By comparison, a handful of planes with some textures on them are easy.

When Quartz Extreme is activated, the compositing phase is done in OpenGL, by your graphics card. The objects you see on scene become textured planes. This explains Apple's system requirements. Graphics cards like the Rage 128 cannot deal with textures whose size is not a power of 2. There are going to be a fair amount of textures sloshing around and the memory on board the graphics card will fill up fairly quickly (unless you are one of the lucky owners of a GeForce 4 Ti complete with 128 Mb of VRAM). The AGP specification allows for graphics cards to quickly fetch textures from the computer's main memory.

How do I tell if Quartz Extreme is activated ?

If you have the right hardware (i.e. and ATI card similar or better than the ATI Radeon, on AGP 2x bus or any nVidia card) Quartz Extreme will automatically be on. An easy way to check is to look at the mouse pointer. If Quartz Extreme is on, it will cast a shadow. Yet more useless eye-candy. At least now it's more or less for free. Update: arcanis tells me that with some video cards you will get the shadow even if QE is off. To be on the safe side, just call CGDisplayUsesOpenGLAcceleration (from the Core Graphics framework).

The ultimate Quartz Extreme test is to play a DVD "through" some transparent terminal windows. If you had tried this on previous versions of Mac OS X (where a program such as TinkerTool was necessary in order to make terminal windows transparent) you would have taken a noticeable performance hit. Calculating all those transparencies on a picture updating many times a second didn't come cheap. With Quartz Extreme you can have a dozen or more such transparent windows with no noticeable slowdown. This is true even on a machine like mine which does not have a particularly beefy graphics card (ATI Radeon Mobility).

While this is not particularly useful, it highlights the power of the system. More and more applications are taking of advantage of this by displaying status information in transparent windows, thus keeping information close to hand but without filling up the screen, like some sort of HUD. It should also be noted that a totally transparent background is also transparent to events: clicks on the window's background will go through it and hit the window underneath. For example I have a cpu/network/disk load indicator parked in the corner of my screen that doesn't waste any screen space because of its transparency. I hope to see many more applications take advantage of this.

Log in or register to write something here or to contact authors.