GDI+ under Windows 7
-
I have a set of products that were written in C++ and use GDI+ to render the graphics. This approach works well enough on my 7 year old P4 running Windows XP, i.e. the graphics are rendered quickly without any problems. But now some of my customers are moving to Windows 7. They are experiencing tremendous lags in graphics rendering with my software. Could someone clue me in as to some possible reasons this is happening? I'm puzzled as to why my old computer is actually faster at rendering graphics with GDI+ than a newer computer running Windows 7.
-
I have a set of products that were written in C++ and use GDI+ to render the graphics. This approach works well enough on my 7 year old P4 running Windows XP, i.e. the graphics are rendered quickly without any problems. But now some of my customers are moving to Windows 7. They are experiencing tremendous lags in graphics rendering with my software. Could someone clue me in as to some possible reasons this is happening? I'm puzzled as to why my old computer is actually faster at rendering graphics with GDI+ than a newer computer running Windows 7.
-
A out of date graphics driver for the Win 7 machine can cause software rendering to kick in and thus be much slower.
Check out this link... http://blogs.msdn.com/directx/archive/2009/09/29/comparing-direct2d-and-gdi.aspx[^] Specifically.. the first reader comment: "For whatever reason GDI+ slows so down in Windows 7, it is not understandable.... Reply: "Husker, the problem with GDI+ that you describe is related to new support for device bitmaps in Win7, and there's a workaround. In Vista, Microsoft stopped using XP Driver Model (XPDM) display drivers in scenarios in which the Desktop Window Manager (DWM) is running. Because of this, it meant that all GDI operations – which used to be hardware accelerated by XPDM drivers – became software-only (meaning, not hardware accelerated). Applications render via GDI to a software buffer, which is then blt’d via the DWM. In Windows 7, Microsoft modified the use of GDI in a couple important ways. First, the GDI back buffer maintained by DWM was moved from system memory into hardware aperature memory. This improves blt speed. Second, WDDM 1.1 drivers can hardware-accelerate a certain number of limited GDI operations (eg. solid color fill, etc). So, as long as you have a WDDM 1.1 driver, GDI is sort-of “reaccelerated”. The degree to which WDDM 1.1 cards can hardware accelerate depends on fill rate, etc. There’s a bug in GDI+ (which you’re describing above) that causes it to do readback from the hardware in a certain number of scenarios. The best way to use GDI+ in Windows 7 is to render with GDI+ to a DIB section and then blt the final result. You might want to give that a try before doing anything else. Tom
-
A out of date graphics driver for the Win 7 machine can cause software rendering to kick in and thus be much slower.