ONJava.com -- The Independent Source for Enterprise Java
oreilly.comSafari Books Online.Conferences.

advertisement

AddThis Social Bookmark Button
Article:
  Graphical Composition in Avalon
Subject:   macos x already works like this
Date:   2004-03-12 00:28:19
From:   igriffiths
Response to: macos x already works like this

It's not that graphics cards are incapable of accelerating vector drawing operations. They are wholly capable of doing so, it's simply that neither Windows XP nor Mac OS X currently exploit that in their 2D drawing architectures. In the Windows world this is mostly because the focus of the graphics card companies has been on 3D performance, because gaming is the main application that drives their sales. I don't know why Mac OS X doesn't do it, but I would guess it was simply a case of Apple prioritising their development - it was more important for them to fix the compositor performance first.


Re: vector support, that wasn't quite what I said. I simply said that Quartz didn't *catch up* with GDI+ until 10.2. Specifically, I was thinking of all the gradient fill functionality wasn't there prior to 10.2. (Which is surprising when you first see Aqua as it looks like it's using that all over the place. Then you realise it's all done with bitmaps.) Prior to 10.2, Quartz's vector functionality was a subset of GDI+.


Yes, Quartz does now support compositing with a window, but last time I checked, the documentation tells you to avoid using this if possible, because the way Quartz does its composition means that it's pretty heavy on the memory consumption. (For the reasons I described in my previous entry.)


By 'context shearing' I assume your acquaintance is referring to non-linear transforms. (Avalon does support shearing, but that's a linear transform. You couldn't use it to do the genie effect, because that uses a non-linear transform.) In today's builds of Avalon (which Microsoft describe as a pre-alpha developer preview, remember) it's true that only linear transforms are available. These include scaling, rotation, translation, and shearing. However, future builds of Longhorn are very likely to support other effects. For example, perspective transforms (which are non-linear) have been explicitly mentioned as something they want to add. And given the way that Avalon's architecture works, there's no reason for them not to support these transforms, it's just that the current bits don't happen to do so. So the person is correct for the current very early preview build of Avalon, but that is going to change.


Vector drawing is demonstrably fast enough: all modern 3D games use vector-based drawing and composition to build their displays, using increasingly large numbers of elements. (There are texture bitmaps of course, but a typical frame from a 3D game contains very large numbers of vectors.) These routinely achieve high redraw rates - games would be unplayable if they didn't. So if the GPU is exploited properly, it is clear that vectors definitely can be fast enough. It's just that neither Windows nor Quartz currently have the right architecture - GDI+ and Quartz 2D are both relatively slow at drawing vectors. But DirectX and OpenGL performance indicates that given the right approach to acceleration, vectors can be plenty fast enough. Faster than bitmap-based approaches in many cases.


1 to 1 of 1
  1. macos x already works like this
    2004-03-14 10:23:25  mweiher [View]

    • Ian Griffiths photo macos x already works like this
      2004-03-15 05:51:48  Ian Griffiths | O'Reilly Author [View]

      • macos x already works like this
        2004-04-06 06:17:25  musnat [View]

      • Ian Griffiths photo macos x already works like this
        2004-03-17 04:33:50  Ian Griffiths | O'Reilly Author [View]

      • macos x already works like this
        2004-03-15 13:58:01  mweiher [View]

        • macos x already works like this
          2004-04-06 06:16:16  musnat [View]

        • Ian Griffiths photo macos x already works like this
          2004-03-17 04:29:36  Ian Griffiths | O'Reilly Author [View]

        • Ian Griffiths photo macos x already works like this
          2004-03-16 04:43:14  Ian Griffiths | O'Reilly Author [View]

          • macos x already works like this
            2004-03-19 17:33:59  mweiher [View]

            • Ian Griffiths photo macos x already works like this
              2004-03-21 11:57:47  Ian Griffiths | O'Reilly Author [View]

              • macos x already works like this
                2004-03-22 12:32:11  mweiher [View]

          • macos x already works like this
            2004-03-18 16:28:15  mweiher [View]

            • Ian Griffiths photo macos x already works like this
              2004-03-21 14:39:30  Ian Griffiths | O'Reilly Author [View]

              • macos x already works like this
                2004-05-23 22:06:41  glenlow [View]

              • macos x already works like this
                2004-03-22 15:32:48  mweiher [View]

            • macos x already works like this
              2004-03-19 20:59:37  rosyna [View]

              • Ian Griffiths photo macos x already works like this
                2004-03-21 12:50:03  Ian Griffiths | O'Reilly Author [View]

                • macos x already works like this
                  2004-03-22 12:20:26  rosyna [View]

1 to 1 of 1