TakefiveInteractive / TedkOS

Operating System - ECE 391 Takefive Interactive Team
GNU General Public License v2.0
96 stars 17 forks source link

GUI lag #72

Open markzyu opened 8 years ago

markzyu commented 8 years ago

Using trees in GUI code seems too much.

markzyu commented 8 years ago

And we could also consider hardware acceleration: http://wiki.osdev.org/Accelerated_Graphic_Cards

But QEMU defaults to emulate "cirrus" graphics card, without much support for acceleration... It must be our drawing algorithm that could be enhanced.

After some experiments, I found that making better use of cache might help. But that requires nested loops.

I am working on loop exchange techniques in Compositor::drawSingle

markzyu commented 8 years ago

Faster in fded70cc4c796943e65e7f1c2017f2582b1a6114

Now the lag seems to be due to long critical sections.

Also after exchanging the loops, some new bugs appear in compositor (redrawing mouse will affect the windows beneath it).

Maybe we should not exchange the loops but check the conditions in advance, and use a temporary list of elements to draw.