Home » Community » U++ community news and announcements » Painter improvements
Re: Painter improvements [message #60386 is a reply to message #60385] |
Wed, 27 December 2023 16:47   |
Tom1
Messages: 1305 Registered: March 2007
|
Ultimate Contributor |
|
|
Mirek,
It seems that the rendering speed has decreased to about half on my hardware:
Processor 12th Gen Intel(R) Core(TM) i9-12900K 3.20 GHz
Installed RAM 32,0 GB (31,7 GB usable)
System type 64-bit operating system, x64-based processor
I will send you a download link to the Sample50k.Painting (a vector based map as a Painting) file separately.
Here's the code for testing:
#include <CtrlLib/CtrlLib.h>
#include <Painter/Painter.h>
using namespace Upp;
struct MyApp : TopWindow {
Painting painting;
MyApp(){
Maximize();
LoadFromFile(painting, GetDesktopFolder() + DIR_SEPS + "Sample50k.Painting");
}
virtual void Paint(Draw& dw)
{
Size sz = GetSize();
ImageBuffer ib(sz);
BufferPainter painter(ib);
painter.Co(true);
painter.Clear(White());
int64 t0=usecs();
painter.Paint(painting);
painter.Finish();
Title(Format("Render took %lld usecs",usecs(t0)));
Image im(ib);
dw.DrawImage(0,0,im);
}
bool Key(dword key, int count){
switch(key){
case K_SPACE:
Refresh();
return true;
}
return false;
}
};
GUI_APP_MAIN
{
MyApp app;
app.MaximizeBox().MinimizeBox().Sizeable();
app.Run();
}
I'm getting about 30 milliseconds for the old (17045) Painter and about 60 milliseconds for the new one.
Hope you're using an UHD/4k or larger display.
Best regards,
Tom
|
|
|
Goto Forum:
Current Time: Thu Jul 17 23:57:09 CEST 2025
Total time taken to generate the page: 0.05014 seconds
|