There is a new article on MSDN describing Avalon’s Media Integration Layer. The article provides insight into some of the key architectural features that differentiate it from other technologies. Earlier this month, Ian Griffiths also wrote about this layer in his Graphical Composition in Avalon article, focusing on composition. Ian’s article led to a discussion on the differences between Apple’s Quartz model and the Avalon model. The MSDN article provides more insight into the differences that Ian described. Given my experience in Mac development and my limited experience with Avalon, a couple of differences jump out at me.


One of the key differences is that Quartz renders to bitmaps and then does compositing and transformations on those bitmaps. Avalon retains the drawing instructions so that it can rerender content as needed with full fidelity. For example, the Macintosh has a function to zoom in on the screen for accessibility. However, you just get a zoomed desktop. I can imagine that on Longhorn you could get a full fidelity zoom (does this already exist?). It also means that you can do things like animations completely within the MIL layer – the client code does not have to install a timer and rerender.


The other key difference I find interesting is deeper support throughout the OS for resolution independence. At the lowest layer, Quartz is resolution independent, but if you were to run Mac OS X on a 200 DPI monitor, everything would be tiny. There’s no way for an application to know that it’s running on a 200 DPI monitor, and there’s no way it can make things like window titles or standard controls larger. The size of Avalon controls are all specified in real world measurements, not pixels. I remember being disappointed that Apple did not solve this problem when moving to Mac OS X. I think it would have been the perfect opportunity to make this jump and update the APIs. If you’ve ever worked with small Japanese text on today’s monitors, you’d really appreciate the need for higher resolution monitors.