PDA

View Full Version : qpixmap: windows vs linux speed



dombe
15th December 2014, 23:28
I work on a project where I draw different 2D objects 10000 times on a qpixmap and then I set it on a label of my widget.
I noticed that there is a significant difference in drawing speed between windows(8.1) and linux(mint 17.1) in favor of latter.
Can someone explain why is my program slower when running in windows? Thank you.

wysota
16th December 2014, 00:55
I work on a project where I draw different 2D objects 10000 times on a qpixmap and then I set it on a label of my widget.
I noticed that there is a significant difference in drawing speed between windows(8.1) and linux(mint 17.1) in favor of latter.
Can someone explain why is my program slower when running in windows? Thank you.

How exactly did you perform the measurement? Linux might be faster as the pixmaps are already uploaded to the X server and just need to be assembled there. However I'm quite surprised the different would be significant. How do you draw items on the pixmap?

dombe
16th December 2014, 08:00
I didn't perform any exact measurements, but when I'm drawing in a loop, (every time drawing different objects(size, color, shape ) on a new pixmap), in mint label is changed roughly every 2 seconds and in windows every 6-8 seconds,sometimes even more(I also run it on a different machine(same linux and win) - same thing)
I'm drawing with a painter like this:


QPainter painter( &pixmap );
.......
painter.draw___();

ui->label->setPixmap(pixmap);