Blit () Performance depends on screen rotation

I am developing an application for a WinCE 6.0 device in which there is a need to rotate the screen, so we use a typical API ChangeDisplaySettingsEx(). and also I draw something on the view.

When blitting from memDCto the main DC, it takes 20 ms for 700x300 pixels in landscape mode, but in portrait mode blitting a 450x450 block takes 50 ms.

I can’t determine why this is happening. Here is the device configuration: - Resolution 800x480. I use the regular API for this Blt().

Any suggestion would be helpful

+5
source share
3 answers

WinCE, , .

a . , .

. , .

+2

, . 480 . - 800 . .

0

I ran into the same problem and my solution was to collapse my own routine raster blit routine directly into the display buffer. BitBlt and StretchBlt are poorly written and have not changed since the mid-1980s (I saw the source code for Windows GDI). It will still be slower to hit in the "wrong" direction, but it should not be so slow. The problem is that a small processor cache is knocked out by writing to memory not sequentially.

0
source

All Articles