On Thu, Nov 29, 2012 at 4:24 AM, Gustavo Sverzut Barbieri <barbi...@profusion.mobi> wrote: > On Wed, Nov 28, 2012 at 5:17 PM, Enlightenment SVN > <no-re...@enlightenment.org> wrote: >> >> Log: >> evas/rectangle: Refactor common code for rectangle drawing >> >> This patch refactors common code for rectangle draws - so that it can be >> used by other engines and *threaded* X11. >> > > This patch that saves clipper, apply cutouts and then call a function > for every rectangle to actually do something is very common pattern in > the engines. GL has it replicated, I recall I replicated this for > 16bpp engine... > > We'll try to do more of those, then we can move engines to use this > instead of similar codes as GL do. > > End goal is to dispatch all the small commands to a queue that the > thread engine will consume and paint (the thread engine is under heavy > dev, may hit the list in few days for further comments).
I don't know your intended use for evas_common_rectangle_draw_cb, but be careful if you want to use it in a thread. It use a static variable and his clearly not thread safe. evas_common_rectangle_draw_do is intended to be thread safe and used in that kind of context. -- Cedric BAIL ------------------------------------------------------------------------------ Keep yourself connected to Go Parallel: VERIFY Test and improve your parallel project with help from experts and peers. http://goparallel.sourceforge.net _______________________________________________ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel