PDA

View Full Version : Don't redraw desktop, use a screenshot instead.



danciac
8th September 2010, 08:34
Hey everybody!

I am trying to build a simple application in Qt. It is supposed to show a message every x ms.

In order to increase speed, (it's really discomforting as it is right now) i thought of taking a screenshot before makinng my message visible, and then (and that's the part i don't know how to implement) i want to somehow tell Windows(and also Ubuntu) not to redraw the desktop but use my screenshot instead.

Any ideas?

Thanks a lot.

wysota
8th September 2010, 09:09
You can make a full screen widget and place the screenshot as its background but then:
1. changes to the desktop will not be visible
2. I don't think you will gain any speed as parts of the widget will still have to be redrawn

The desktop should redraw only this part of itself which is obscured by your "message". I suggest you profile your application to see why a slowdown occurs.

danciac
8th September 2010, 11:40
Thanks for the tips. I'll look more into profiling.