Jump to content
  • Advertisement
Sign in to follow this  
samson77

BlitBlt() slow on Win7 64bit

This topic is 2999 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi there, I have written an application to do a real time screen capture and save it as a video (MFC, C++) and it works like a charm under Windows XP. Calling BlitBlt() takes about 2ms.
However, when I run my app under Win7 64bit the BlitBlt() call takes at least 50ms.
Any idea what's going on there?

Share this post


Link to post
Share on other sites
Advertisement
My first hunch would be that this is related to the hardware acceleration introduced in Vista; I would guess that doing a full-screen BitBlt transparently forces all windows to update and composite on the hardware, then does a read-back from the video memory. This is all going to inherently be painfully slow.

I did some fast googling around on the DWM (Vista's new rendering engine) and came across this hack. It's done in C# with SlimDX but it should be pretty easy to port into C++ if you want. Overall as near as I can tell the only way to get really performant captures on Vista/7 is to do some dirty work with the DWM.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!