Re: [AD] acquire_bitmap weirdness

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


On Sunday 01 January 2006 12:06, Robert Ohannessian wrote:
> The real solution is d): deprecate acquire/release_bitmap, make them do
> nothing in Windows (what about on X11?), then implement all the Allegro
> functions using the DDraw portion of the API that does not require
> locking.

In X, acquire/release_bitmap on video bitmaps map to mutex's. This is needed 
because the X input stuff is done from a different thread from the X graphics 
stuff and can cause Xlib async errors if two calls happen at the same time. 
When it was first implemented, it was shown to provide a significant 
performance boost to lock once during multiple drawing operations on the 
"video" surface (which is really a memory bitmap but with special vtables to 
draw to the real X surface at the same time).




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