[prev in list] [next in list] [prev in thread] [next in thread] 

List:       enlightenment-devel
Subject:    Re: [E-devel] E SVN: barbieri trunk/efl/src/lib/evas/common
From:       Cedric BAIL <cedric.bail () free ! fr>
Date:       2012-11-29 12:31:06
Message-ID: CAGv1asUs8+q2g-AhLfzvfCqtUi9epY05c0Gd2Zp35GMrAzAVPg () mail ! gmail ! com
[Download RAW message or body]

On Thu, Nov 29, 2012 at 9:10 PM, Gustavo Sverzut Barbieri
<barbieri@profusion.mobi> wrote:
> On Thursday, November 29, 2012, Cedric BAIL wrote:
>> On Thu, Nov 29, 2012 at 4:24 AM, Gustavo Sverzut Barbieri
>> <barbieri@profusion.mobi <javascript:;>> wrote:
>> > On Wed, Nov 28, 2012 at 5:17 PM, Enlightenment SVN
>> > <no-reply@enlightenment.org <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
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic