The MASM Forum

General => The Workshop => Topic started by: jj2007 on February 01, 2016, 02:14:07 AM

Title: How fast is BitBlt?
Post by: jj2007 on February 01, 2016, 02:14:07 AM
This code takes one second:
push 999
.Repeat
invoke BitBlt, ebx, 0, 0, APs.apRectG.right, APs.apRectG.bottom, PtDC, 0, 0, SRCCOPY
dec stack
.Until Sign?
pop edx


One millisecond for a full 1366*768 bitblt, is that a reasonable value?

Graphics card is a GeForce 610M from NVIDIA.
Title: Re: How fast is BitBlt?
Post by: dedndave on February 01, 2016, 03:42:33 AM
BitBlt to memory is very fast
BitBlt to a physical device is somewhat slow

StretchBlt to memory is also very fast - not as fast as BitBlt, though
StretchBlt to a physical device is very slow, especially if the stretching mode is set to COLORONCOLOR

https://msdn.microsoft.com/en-us/library/dd145089%28v=vs.85%29.aspx (https://msdn.microsoft.com/en-us/library/dd145089%28v=vs.85%29.aspx)
Title: Re: How fast is BitBlt?
Post by: dedndave on February 01, 2016, 03:45:12 AM
i would say 1 mS is reasonable
that allows for 1000 updates per second - far more than should be necessary
20 to 40 frames per second are reasonable update rates