Low Performance of LineTo on WinCE7 IMX6

One cusomer is porting their application from WinCE7 IMX535 to our Colibri IMX6 with WinCE7.The project is attached. link text

During test customer finds LineTo and MoveTo take quite long time. When commenting them, it gets quick. Is it because these two functions is not HW accelerated?

	for (int i=0;i<m_Num-1;i++)
	{
		//pDC->MoveTo(mPoints[i]);
		//pDC->LineTo(mPoints[i+1]);
	}

.

The two functions are probably not hardware accelerated, and the default Microsoft implementation is not too well optimized for performance.

The configured bit depth can have a significant impact on performance - 16bpp requires a read-modify-write operation for each pixel that gets updated, with 32bpp simple write operations can be used.

So I recommend you test with the settings

[HKLM\Drivers\Display\Colibri]
"Bpp"=0x00000020

(Refer to the article Display Driver Registry Settings).

Don’t forget to save the registry before rebooting.

Regards, Andy

HI Andy, I check the Bpp in registry. By default, it is 0x20.

@andy.tx , on this thread, it is suggested to use Polyline. Does it make sense ?

Dear @benjamin.tx

Do you have more information about the actual usecase (long / short lines, horizontal or any-angle?)
The performance is quite different, as some of the usecases are optimized.

We found that disabling hardware acceleration could speed up the drawing, especially for horizontal / vertical lines:

[HKEY_LOCAL_MACHINE\Drivers\BuiltIn\Clock]
"Enable2D3D"=dword:0 ; GPU will not be powered-up at boot

[HKEY_LOCAL_MACHINE\Drivers\BuiltIn\GCHAL\]
"Dll"="_libGALCore.dll" ; prevent GPU driver loading

This is described in the article

Probably LineTo() and MoveTo() are both calling Polyline() to execute the drawing, so I don’t expect any performance difference. However, it is worth a try.

Regards, Andy

Thanks Andy. Disabling GPU acceleration does improve drawing.