Re: [AD] Locking Behaviour

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


On Sat, November 22, 2008 11:08 pm, Paul Suntsov said:
> How about if the routine finds the buffer already locked, then it
> will leave it locked? If it finds it unlocked, then it will unlock
> it after it is done with it. If it is locked but does not encompass
> the region the routine wants to draw to/from, then the call will
> fail. This means that any user-set locks will persist, and utilized
> for as long as possible (you can lock the entire destination bitmap,
> and then draw multiple images on it before unlocking it again,
> something you can't do now). I guess we can force the user to
> manually unlock the bitmaps as well as per the current API. So, to
> me, it appears that this sort of strategy will lead to the same API
> and the same output, but with some potential speed gains.
>
> The lock_region function, thus, can remain unchanged, and we'd need
> to recode the drawing routines a bit so they check whether the
> regions are already locked.

Yeah, I think that would be good. That's how put/get_pixel work
already. It will take some work on memblit* and memdraw. I'm fairly
busy right now to do it, so it should probably be filed as a bug so
someone remembers to do it, unless you plan to.

Trent :{)>




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