Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Graphics
  4. GDI+ under Windows 7

GDI+ under Windows 7

Scheduled Pinned Locked Moved Graphics
graphicsc++winformsquestion
4 Posts 4 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • L Offline
    L Offline
    Leslie Sanford
    wrote on last edited by
    #1

    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.

    C 1 Reply Last reply
    0
    • L Leslie Sanford

      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.

      C Offline
      C Offline
      clawton
      wrote on last edited by
      #2

      A out of date graphics driver for the Win 7 machine can cause software rendering to kick in and thus be much slower.

      Z D 2 Replies Last reply
      0
      • C clawton

        A out of date graphics driver for the Win 7 machine can cause software rendering to kick in and thus be much slower.

        Z Offline
        Z Offline
        ZTransform
        wrote on last edited by
        #3

        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

        1 Reply Last reply
        0
        • C clawton

          A out of date graphics driver for the Win 7 machine can cause software rendering to kick in and thus be much slower.

          D Offline
          D Offline
          Dan Mos
          wrote on last edited by
          #4

          Also this article has some insights on the W7 and GDI/GDI+/2D rendering.

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups