Great Article: Under the Hood of the Desktop Window Manager

Discussion in 'Audio & Video' started by Jason, Mar 28, 2007.

  1. Jason

    Jason

    Joined:
    Sep 26, 2005
    Messages:
    2,081
    Likes Received:
    0
    Location:
    Chicago,IL
    <H2>Under the Hood of the Desktop Window Manager</H2>I've made a grand total of one post in about the last 21 months. What have I been doing during this time? Why, working on the new Desktop Window Manager for Windows Vista, of course! The Desktop Window Manager (DWM) is one of the more visible features and changes to Windows coming out with the upcoming Windows Vista release.

    Does this mean that I've abandoned Windows Presentation Foundation (Avalon) to work on the DWM? By no means. The DWM is built upon the core graphics layer of Avalon, and is being developed by the same team responsible for Avalon.

    We've been heads down on design, development, and testing for quite some time, but now that there's an end in sight, I figured I'd come up for air and describe a bit about what we've done and the technical underpinnings of this visible feature. There's lots and lots that can potentially be discussed, so I'm going to keep this first post fairly broad and high level, and will be interested in feedback if there are other specific areas of interest that readers would like to delve further into. So please do comment with your thoughts!<H3>The public face of the Desktop Window Manager</H3>

    The DWM is of course just part of Windows Vista and not considered distinct from it. Its features are exclusively available in the Windows Vista Aero experience. I'm pulling out some of the more recognizable features here.<TABLE id=table1 cellSpacing=0 cellPadding=0 width=637 border=1><TBODY><TR><TD width=258>This is "Aero Glass", the semi-transparent look that Aero provides, with the blurry content behind the window frames, designed to allow the user to focus on the window itself, and not on what lies behind. </TD><TD>[​IMG]</TD></TR><TR><TD width=258>Here are the live thumbnail views provided on the Windows Vista taskbar. </TD><TD>[​IMG]</TD></TR><TR><TD width=258>And here are Windows Flip and Windows Flip3D -- the updated Windows Vista experiences invoked by Alt-Tab and Windows-Tab, respectively, for navigating between and selecting windows. </TD><TD>[​IMG]

    [​IMG]</TD></TR></TBODY></TABLE><H3>Desktop Composition</H3>

    By far the largest change to Windows Vista in the way that windows are presented is the introduction of "desktop composition". This underlies everything that is done by the DWM. The primary takeaway for desktop composition: the way an application gets pixels on the screen has fundamentally changed.

    In all versions of Windows, up until Windows XP, applications were asked by Windows to paint their visible region, and they would paint directly to the buffer that was to be displayed by the video card. With Windows Vista, applications are asked by Windows to paint their entire surface to an offscreen surface (alternatively known as a bitmap, buffer, or texture), and it's up to the DWM to take all of these offscreen surfaces, and "compose" them together to the onscreen buffer.

    Read the previous paragraph again. From a windowing system display perspective, this has profound implications in terms of the features that can be implemented, and the quality that can be achieved. Some examples:<UL><LI>Access to windows - now that applications are rendered offscreen, those offscreen representations can be used in other places. This is precisely how the Flip, Flip3D, and thumbnail features work, and other features can be built that take advantage of this as well.
    <LI>Don't involve background applications in window operations - when a window moves across the screen in XP and before, the portions of backgro
     
    Jason, Mar 28, 2007
    #1
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.