On Thu, Nov 29, 2012 at 9:10 PM, Gustavo Sverzut Barbieri <[email protected]> wrote: > 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?
Creating and destroying them all the time cost a lot. Recycling them is an optimisation that does help. -- 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] https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
