Cairo Graphics and Quartz

So it seems that Mozilla.org is serious about using Cairo as its graphics library. That being the case, I figured I should probably start on a Quartz backend for Cairo. I didn’t have too much time today, but in an hour or so I was able to read some docs, compile the Cairo libraries, and build a Cocoa test app. My test app is just a window that Cairo can draw into so I can test things easily. I only got far enough to get Cairo drawing shapes and whatnot into my test app, but it was still a gratifying feeling to see Cairo actually draw something for the first time on my system. What it draws now is not done through a proper Quartz backend, but I hope to fix that.

I’m really looking forward to doing this because I have never written much in the way of graphics code. It should be an awesome learning experience. I hope Pav and Vlad don’t get annoyed with my wandering over to ask them lots of questions…

This is the beginning of the end for Quickdraw in Mozilla.org products. Thank God.

9 thoughts on “Cairo Graphics and Quartz

  1. With QuickDraw gone, the speed boosts in Tiger are going to be something to write home about! Did you see the Quartz/QuickDraw comparisons per OSX version in the ArsTechnica review? Quite staggering.

  2. The the article mentionned is http://arstechnica.com/reviews/os/macosx-10.4.ars/14.

    The speed improvements for Tiger are indeed dramatic however, users still on pather will take a speed hit!

    ALso some coding practices need to be met, Form the article
    “This is why an application that discards all of its graphics data references as soon as it’s done with them may actually get slightly slower when running under Quartz 2D Extreme.”

  3. Roc: The backend in Cairo right now basically just dumps a software-rendered bitmap down the quartz pipeline. It isn’t much of a backend, it is only enough to get it to work.

  4. Well, QuickDraw is not gone yet, perhaps it won’t be gone in Leopard either, although it has been deprecated.

    The speed boosts mentioned in the ars technica article are also partially misleading, sure the numbers are correct but they are comparing just line drawing and frankly give no real information about the test setup.

    Sure Quartz is again faster than in previous revision the real gains are not as big as in line drawing benchmark. One should also note that the Quartz 2D Extreme is not enabled by default, at least not yet. Also the possible speed gains using it require a Bad Ass ™ gfx-chip.

    But anyway, this is great news. Cairo is the way to go and having a good Quartz backend for it would be cool. Go for it!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s