Gustavo wrote:
> Attached is a patch (txt so gmail/firefox don't think it's an
> octet-stream and is removed by mailman) to add pre_render() to
> Evas_Smart_Class. This patch applies on e17/libs and hacks edje and
> emotion so we can test.
>
> CAUTION: if you compile and install Evas with this patch, it will
> change the EVAS_SMART_CLASS_VERSION, making ALL existing binaries
> incompatible, so if you do this and your E or other Evas-dependent
> application crashes, it will not restart until you reverse the patch,
> compile and install the old (non-patched) Evas.
>
> USE CASE:
>
> Most users of smart objects end with nasty freeze/thaw to avoid heavy
> computations, this can be seen in many places, including Edje. It
> would be lot better if we could avoid this if we know when we need to
> compute, recalc, reconfigure, ... things. And we know: before drawing!
> So why not make this automatic?
>
> IMPLEMENTATION:
>
> I don't know this part of Evas internals that much, but I hacked it as
> a walk of all objects (layers, then its objects) and checking if
> object changed and if it is a smart and if it has the new pre_render
> callback. In this case, call this function.   This is done BEFORE any
> other stuff, before obscure, dirty, etc... calcs, so it will not
> impact existing evas_render code at all.
>   

      Well, you really need both pre-render and post-render smart class funcs.
This is in case you want to track state (say in the smart data) via cur/prev
states.
      You don't need to walk a new list - all evas objects have internal
render-pre and render-post fucntions which are called before and after
the actual obj rendering calls (during evas render). Smart objects have
these too, and are called.. it's just they don't do much right now.

      All you have to do is go to the "evas_object_smart.c" file (in the 
src/lib/
canvas dir), and at the very bottom of that file there are these two functions:

static void
evas_object_smart_render_pre(Evas_Object *obj)

static void
evas_object_smart_render_post(Evas_Object *obj)

      In those functions, simply add calls to the corresponding smart obj's
new class functions. :)


>     In order to mark smart objects dirty without doing any operation,
> I added evas_object_smart_changed(), that will call
> evas_object_changed(). Maybe something better could be done?
>
> Edje was changed and _edje_recalc() just calls
> evas_object_smart_changed(), while _edje_recalc_do() will do the
> actual work. THIS IS A TEMPORARY HACK.
>
> Emotion has no callback, so pre_render = NULL, just to make it compile.
>
>
>
> NEXT STEPS:
>
> If this proves to be correct, we need to patch all uses of
> Evas_Smart_Class. This is about 50 on current cvs e17.
>
>   
____________________________________________________________
Save on Emergency Alert Systems. Click here.
http://thirdpartyoffers.juno.com/TGL2141/fc/Ioyw6i3mXtZ5hGjGOwlcDdAwMiDJvQslzo7CyCPi8FlBgEWoO6P0b6/

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
enlightenment-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Reply via email to