On Thursday, November 29, 2012, Cedric BAIL wrote: > On Thu, Nov 29, 2012 at 4:24 AM, Gustavo Sverzut Barbieri > <[email protected] <javascript:;>> wrote: > > On Wed, Nov 28, 2012 at 5:17 PM, Enlightenment SVN > > <[email protected] <javascript:;>> 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 won't. Just from main thread, to get the areas to send to the thread (queue) to paint. > It use a static variable > and his clearly not thread safe. I'm looking at that and trying to figure out why is that static. Makes absolutely no sense to me, do you know? > evas_common_rectangle_draw_do is > intended to be thread safe and used in that kind of context. It's a different approach, we can't use it as well. Why don't we use prepare + do to implement the _draw(). Seen like dangerous code duplication as they are slightly different but should do the same. > 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 > [email protected] <javascript:;> > https://lists.sourceforge.net/lists/listinfo/enlightenment-devel > -- Gustavo Sverzut Barbieri http://profusion.mobi embedded systems -------------------------------------- MSN: [email protected] Skype: gsbarbieri Mobile: +55 (19) 9225-2202 ------------------------------------------------------------------------------ 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 [email protected] https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
