Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
324 views
in Technique[技术] by (71.8m points)

c++ - BitBlt performance with Aero enabled

I'd like to get more performance out of BitBlt for capturing the screen. When Aero remains enabled, capturing only a 400x400 pixel area of the screen reduces capture time from an average of 50ms (full 1920x1200) to about 33ms (for 400x400) on my machine. This is a disappointingly low improvement.

Is my only option disabling Aero? I do know that i can get a blinding fast 3ms capture on the full screen when Aero is disabled.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

A screen capture in Aero mode is very expensive because it requires synchronization with the DWM (think about waiting for everyone not blink their eyes to take a group photo), and locking the entire GPU pipe on Vista. On Windows 7 GDI performance is improved by accelerate common GDI operations and reduce GDI locking)

There are attempts of either using undocumented DWM functions or hooks to get the shared surface used by DWM. But you still need to pay the price to move data from video memory to system RAM via the sometimes slow FSB if you plan to process the image data (e.g. send to a network or save to file).


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...