[AD] clipping without locking?

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


I was just wondering, the mouse drawing from the timer works like this
in principle:

acquire_bitmap
screen->clip = TRUE
/* switch occurs here */
draw
restore screen->clip
release_bitmap

But now, what if the timer thread is switched out just before draw, as
indicated above, and the main thread modifies the clipping of the
screen. Wouldn't this cause a crash? Am I overlooking something?

If not, this would be bad, maybe even explain some strange crashes
(besides the one Julien got in my modified exkeys). But I feel I'm
missing something obvious..

-- 
Elias Pschernig





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