Hardware accelerated graphics

I'm a C++ programmer working on a cross-platform application that runs on Linux, Windows and Mac. It's a similar product to Pro Tools, Logic, Cuebase etc. The app has a "scrolling" display, similar to a multitrack tape (as is common with this kind of app). Graphical window elements are provided by the GTK+ library on all 3 platforms.

Under Windows and Linux the scrolling display is smooth. But under OS-X it's horribly jerky and has a very 'klunky' look to it. I happen to be looking at it on a Mac Mini but other people have seen the same effect with more powerful machines. It isn't a processor problem because the cpu usage rarely gets higher than about 30 percent (and even then, only when there's a lot of stuff to scroll).

Can anyone suggest why the performance might be so bad under OS-X (Snow Leopard)? Yesterday I read an article which suggested that the Quartz window compositing engine (used by OS-X) doesn't make use of hardware acceleration (or at least it does - but only for certain chipsets). If that's true, it would definitely explain what I'm seeing.

How can I find out if my Mac Mini is making use of hardware acceleration? My chipset is the Nvidia GeForce 9400 and I thought that I might get a clue by looking in *About this Mac->More info->Graphics & Displays*. But that doesn't seem to tell me... 😟

Mac Mini, Mac OS X (10.6.2), Nvidia GeForce 9400

Posted on Jul 27, 2010 12:07 AM

Reply
5 replies

Jul 27, 2010 1:01 AM in response to johne53

*Some more information....* I've just come across this Wikipedia article:-

http://en.wikipedia.org/wiki/Quartz_Compositor

which suggests that the 'hardware accelerated' version of Quartz is called Quartz Extreme (although another Wikipedia article said that it was later renamed to QuartzGL). Either way, it's only enabled for systems with an AGP or PCI Express video bus (my Mac Mini looks as if it has PCI Express) but even then, only for Nvidia GeForce2 MX processors or better.

So does my GeForce 9400 GPU count as "better" than GeForce2 MX or not? Anyone heppen to know?

Jul 27, 2010 11:08 AM in response to johne53

The GeForce 9400 is good enough. I took a look at the GTK+ website and saw the Quartz backend for the Mac version had several bugs with regard to performance. With that information my best guess is your poor performance is caused by the Mac version of GTK+ being worse than the Linux and Windows versions. But I would suggest profiling your application with Instruments, which comes with the Xcode Tools. Profiling would give you more information about why your app performs badly on Mac OS X.

Jul 27, 2010 3:17 PM in response to Mark Szymczyk

Thanks Mark. As it happens, I posted the same question earlier today in the GTK+ developer mailing list. Hopefully it might ring a bell with someone there. I'm not sure whether profiling would be appropriate at this stage though because of my suspicion that the problem is mostly due to the simple lack of hardware aceleration. That Wikipedia article suggested that even if my graphics chip is supported, 2D acceleration is disabled by default in all versions of OS-X. I think that I'll first need to enable it somehow and then see if the problem still exists.

Aug 6, 2010 6:45 AM in response to johne53

I came across a forum post (somewhere else) which said that typing this command into a terminal will enable 2d acceleration:-

sudo defaults write /Library/Preferences/com.apple.windowserver Quartz2DExtremeEnabled -boolean YES


So I just tried it but it made no difference at all to the scrolling performance 😟 So I then looked in /Library/Preferences but I couldn't find any document called com.apple.windowserver

I don't mind installing the Quartz Debug app if that's the only way to test this but does anyone know if there's an easier way? (or why I don't have that document on my system?)

Aug 7, 2010 12:12 AM in response to johne53

Yesterday I installed the Quartz Debug App and spent some time experimenting with it (which was actually quite revealing). In the meantime some new information came to light in the form of this wikipedia article:-

http://en.wikipedia.org/wiki/Quartz_(graphics_layer)

(type the whole lot into your browser - otherwise you'll get the wrong page). If you read between the lines it's basically saying that Apple's QuartzGL driver is crap - or to put it more politely, that QuartzGL (formerly Quartz 2D Extreme) actually degrades 2D performance in many cases, rather than improving it. That definitely ties in with the results I was seeing from the Quartz Debug app. 2D performance was unbelievably bad when acceleration was enabled. Perhaps Apple should rename the driver "Quartz 2D Extremely Poor!"

It astonishes me that a company charging the kind of prices that Apple charges, should be releasing drivers that actually do the opposite of what they're designed to do. And that customers in this day and age should be expected to run their Macs without the hardware acceleration that's built into their graphics chips.

Windows developers would be taking up arms if Microsoft released such sloppy work. How does Apple get away with this???

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Hardware accelerated graphics

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.