PocketMatrix forums

A read-only archive of the PocketMatrix forums (2001–2014). Posting and accounts are closed.

BitBlt vs PatBlt

Which one is faster and safer to use when clearing the screen or backbuffer?

Thanks.
Pejo Software - Per · 09 Apr 2004, 18:42 UTC
I have no idea, but why not just test!
http://www.pocket-g.com uses PatBlt on his tutorials. While others uses Bitblt .

These made me curious and I'm wondering if other developers have tried it.
joshbu [MSFT] · 09 Apr 2004, 23:31 UTC
Both calls end out in the same place in the display driver. I would expect 0 difference in performance between the two.
GeorgeA · 10 Apr 2004, 22:16 UTC — BitBlt
joshbu [MSFT] wrote:Both calls end out in the same place in the display driver. I would expect 0 difference in performance between the two.


This is incorrect. Although both end up in the DrvBitBlt callback in the display driver, they both have different implementations. Pattern blitting is not always even supported on some hardware and has to be punted back to GDI to be done in software.

A BitBlt with a solid color pattern (ROP FF00, if I misremember it incorrectly :) ) is the best, that one ends in DrvCopyBits, which is the fastest way to clear a GDI surface.
joshbu [MSFT] · 11 Apr 2004, 19:13 UTC
GeorgeA":3fg8vajm][quote="joshbu [MSFT] wrote:Both calls end out in the same place in the display driver. I would expect 0 difference in performance between the two.


This is incorrect. Although both end up in the DrvBitBlt callback in the display driver, they both have different implementations. Pattern blitting is not always even supported on some hardware and has to be punted back to GDI to be done in software.

A BitBlt with a solid color pattern (ROP FF00, if I misremember it incorrectly :) ) is the best, that one ends in DrvCopyBits, which is the fastest way to clear a GDI surface.

What operating system are you talking about? I assumed the question was pertaining to Windows CE. Windows CE has no concept of "punting back to GDI." Plus, in nearly all PocketPC and Smartphone devices, there is no hardware.

Trust me. A solid brush PatBlt and the equivilant BitBlt call are handled exactly the same.
What operating system are you talking about? I assumed the question was pertaining to Windows CE.


Well, were on ppc forum I guess ;-)