InfoQ

InfoQ

News

My Bookmarks

Login or Register to enable bookmarks for unlimited time.

The content has been bookmarked!

There was an error bookmarking this content! Please retry.

Windows 7’s Graphics Engine Wants to be Better than Vista’s

Posted by Abel Avram on Jun 18, 2009

Sections
Development,
Architecture & Design
Topics
.NET ,
Performance & Scalability
Tags
Windows 7

The Windows 7 graphics engine changes the way DWM, introduced with Vista, works,  it also comes with new APIs, D2D and DWrite, a new Direct3D 11, and better handling of multiple output devices.

David Blythe, a senior architect in Windows Desktop and Graphics Team, explains in a Channel 9 interview what is the Desktop Window Manager (DWM) and how it works. Applications no longer draw directly on the screen but they draw on a bitmap in memory, and DWM takes care of drawing on the screen. This is used in order to apply various transformations to the graphics drawn before they appear on the screen. This is how the animated taskbar thumbnails are created or the desktop magnification works.

The problem with Vista’s DWM was its efficiency. Until Vista, an application would, for example, use the GDI to draw a picture on the screen while GDI would use the hardware graphics accelerator to do the actual job. In Vista, the GDI draws to the memory, and DWM takes that bitmap and draws it on the screen using the GPU. This resulted in having two copies of the same image. The improvement in Vista 7 means that the GDI is going to draw directly on the graphics memory and that meant reintroducing a minimum hardware acceleration layer in GDI. This change resulted in “dramatic” reduction in memory consumption and faster rendering.

Two new DirectX APIs are Direct2D and DirectWrite. According to MSDN, Direct2D is:

a hardware-accelerated, immediate-mode, 2-D graphics API that provides high performance and high quality rendering for 2-D geometry, bitmaps, and text. The Direct2D API is designed to interoperate well with GDI, GDI+, and Direct3D,

while, DirectWrite is:

DirectWrite provides high-quality text rendering, resolution-independent outline fonts, and full Unicode text and layout support. When used with Direct2D, DirectWrite is hardware-accelerated.

windows7-2

Direct3D 11 coming in Windows 7 is a superset of D3D10 and will run on D3D9 and D3D10.x hardware. Some of the new features present in D3D11 are:

  • Tessellation — to increase at runtime the number of visible polygons from a low detail polygonal model
  • Multithreaded rendering — to render to the same Direct3D device object from different threads for multi core CPUs
  • Compute shaders — which exposes the shader pipeline for non-graphical tasks such as stream processing and physics acceleration, similar in spirit to what NVIDIA CUDA achieves, and HLSL Shader Model 5 among others.

One of the features not working quite smoothly in Vista but being addressed with Windows 7 is managing multiple monitors and display devices like projectors. In order to handle the huge number of possible output devices configurations, the GDI APIs have been extended and the desired output configuration can be easily selected by pressing Win + P.

Useful links: Windows 7 Graphics Architecture Overview Part 1, Part 2 and Part 3, Windows 7: Introducing Direct2D and DirectWrite (PDC presentation), Windows 7: Unlocking the GPU with Direct3D (PDC).

Typo by Robin Clowers Posted
  1. Back to top

    Typo

    by Robin Clowers

    In the third paragraph, "The improvement in Vista 7" should probably read, "The improvement in Windows 7".

Educational Content

Jesper Boeg on Priming Kanban

In this interview, Jesper Boeg, author of the new InfoQ book – Priming Kanban, discusses the keys to using Kanban effectively, and how to get started if you are currently using other approaches.

New-age Transactional Systems - Not Your Grandpa's OLTP

John Hugg discusses high volume transaction processing applications with high and low frequency profiles, and how VoltDB can be used for that purpose.

Cool Code

Kevlin Henney examines code samples to see what can be learned from them starting from the premise that one won’t write great code unless he knows how to read it.

Collaboration: At the Extremities of Extreme

Jason Ayers share the observations he made watching a team of developers collaborating in real time on the same code base, pushing XP, pair programming and continuous integration to their extremes.

Yesod Web Framework

Michael Snoyman presents Yesod, a web framework written in Haskell and containing a web server, templating, ORM, libraries (templating, gravatar, etc.).

Transactions without Transactions

Richard Kreuter and Kyle Banker on how to avoid classical RDBMS transactional systems by using compensation mechanisms, transactional messaging or transactional procedures.

Attila Szegedi on JVM and GC Performance Tuning at Twitter

Attila Szegedi talks about performance tuning Java and Scala programs at Twitter: how to approach GC problems, the importance of asynchronous I/O, when to use MySQL/Cassandra/Redis, and much more.

10 tips on how to prevent business value risk

One category of risk that project teams need to ensure they address is business value failure – delivering a product that fails to provide value for the business investor.