[AD] [WIN] GDI driver patch

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


I've been trying for some days to solve the mouse cursor speed problem with
the GDI driver. I've basically followed Henrik's idea of handling the mouse
cursor separately from the double buffer, which leads to sort of a hardware
cursor emulation.

But it turned out that such a solution needs (again !) a strong
synchronization between the mouse thread and the screen updating thread. And
the original message-based updating mechanism was simply too inefficient.

Therefore I've also changed the updating mechanism to a direct (non-message
based) pseudo dirty rectangles mechanism, using a synchronization scheme
borrowed from the one Isaac built for the DirectX windowed driver. Moreover,
the GDI driver now stops working when it is switched out if SWITCH_PAUSE is
selected.

The result is rather good when the screen is idle. When things are being
drawn onto the screen, there are slowdowns.

The patch needs to be tested on various machines, regarding its performance
and possible synchronization issues.

I've also made minor modifications to the DirectX windowed driver.

--
Eric Botcazou
ebotcazou@xxxxxxxxxx

Attachment: wgdi.zip
Description: Zip compressed data



Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/