Re: [AD] X-windows screen updates |
[ Thread Index |
Date Index
| More lists.liballeg.org/allegro-developers Archives
]
From: "Peter Wang" <tjaden@xxxxxxxxxx>
Sent: Sunday, March 11, 2001 2:18 AM
> I used the "Profile screen" function in the `test' program, and
> found that while the patch did make some improvements in some areas,
> in other areas it was a lot worse.
[snip]
It looks like the Windows version issue : the "profile screen" function
acquire/release the screen once per line (or triangle or circle ....) and
since acquire/release are slow operations (because of the
_xwin_update_screen) it slows down the whole loop. Nevertheless, if we add
'acquire_screen()' before the loop and 'release_screen()' after the loop I
think the test should give some better results.
>
> I think it is because of this `_xwin_update_screen' line, which,
> AFAICT, updates the entire screen every time it is unacquired. If
> instead we marked a "dirty lines" array and only update those lines
> during the unacquisition, I think it would be faster.
I agree this may be the best way to speed things up. However, my initial
idea was to allow the user to draw directly to the screen by encapsulating
his/her graphics routines between explicit calls to acquire_screen /
release_screen in order to prevent the screen (or the window) to be updated
each time he/she calls an Allegro graphic function.
Bertrand.
PS : Sorry for not answering e-mails for a while but I have had some major
issues with my computer (graphic card dead...). Anyway, I'm back :-)