If you look at this profile you can see 36ms being spent doing this copy. http://people.mozilla.com/~bgirard/cleopatra/?report=c14148bc43065cdfbe10b678cdd3c01ef195e2f6 Not sure why this is happening, but I somewhat suspect ExtendPad is to blame.
Nope. Turns out we're drawing to a ARGB32 DC, on which we try to do a SOURCE operation which isn't supported.
To be specific this is a RGB24 source on to a ARGB32 destination.
Created attachment 659004 [details] [diff] [review] Proof of concept This seems to fix the problem. I'll try to measure the improvement.
It looks like an average improvement of about 23x. That should be fine.
Created attachment 659822 [details] [diff] [review] Use BitBlt to do SOURCE from RGB24 to ARGB32
Created attachment 660199 [details] [diff] [review] Use BitBlt to do SOURCE from RGB24 to ARGB32 The correct patch