Re: surface locking

Marc Strämke <[email protected]> Tue, 12 Aug 2003 16:51:36 +0200
Newsgroups gmane.comp.embedded.stk.gui.devel
Message-ID <[email protected]>
Darren Vincent Hart wrote:

> Welcome back Marc,
Great to be back actually :)
<snip>

> If we were to leave the lock(void) out of the API, then the SDL backend
> (for example) would have to override EVERY drawing routine like this:
> 
> virtual draw_routine(...)
> {
> 	SDL_LockSurface(sdl_surface_);
> 	surface_impl<surface_sdl>::draw_routine(...);
> 	SDL_UnlockSurface(sdl_surface_);
> }
> 
> Which I guess isn't terrible.  Thoughts?
it seems terrible :) but i think we can implement the locking on the 
surface_impl level with some template magic, still thinking about it, 
will let you know this evening :)