[ Thread Index |
Date Index
| More lists.liballeg.org/allegro-developers Archives
]
Elias Pschernig wrote:
I think I see. Is support for acquire_bitmap new in the X11 port? Or why
would it work before?
Yeah. acquire_bitmap was a NULL-op before.
While X is locked durring drawing operations, it allows the X server to
better buffer the drawing operations, resulting in a nice speedup.
Makes sense. XLOCK already did that though, right?
Not really. There were XLOCKs around the individual X calls, but with
them tied to acquire/release_bitmap it holds the lock for all the gfx
calls. So, not only was it locking/unlocking alot (a major slowdown
source), it also gave plenty of holes for other threads to get a lock in
between gfx calls.
Hm, don't know. I'll try to find out what part of my freezing program
causes the lock-up - it doesn't use any video bitmaps or acquire_bitmap
calls.. but it draws to the screen from different threads.
Yes, this is a bad idea and a possible source of the problem. Don't
forget, Allegro implicitly calls acquire_bitmap(screen) when you draw to
the screen.. and since you can nest acquire_bitmap calls, the code will
happily let two threads write to the screen at the same time.. which
would be a nice source for Xlib async errors.
- Kitty Cat