raster pushed a commit to branch master.
commit a1e01907254953f565cf8b67d6431298ba942b05
Author: Carsten Haitzler (Rasterman) <[email protected]>
Date: Tue Apr 9 16:52:49 2013 +0900
add a little code to alloc engine info in outs.. but we need a new
engine api for this... i guess we have no choice... it's time for a new
engine api anyway...
---
src/lib/evas/canvas/evas_out.c | 16 +++++++++-------
1 file changed, 9 insertions(+), 7 deletions(-)
diff --git a/src/lib/evas/canvas/evas_out.c b/src/lib/evas/canvas/evas_out.c
index e764bc3..d03aeb7 100644
--- a/src/lib/evas/canvas/evas_out.c
+++ b/src/lib/evas/canvas/evas_out.c
@@ -12,8 +12,7 @@ EAPI Eo_Op EVAS_OUT_BASE_ID = EO_NOOP;
typedef struct _Evas_Out_Public_Data Evas_Out_Public_Data;
struct _Evas_Out_Public_Data
{
- int dummy;
- Evas_Engine_Info *info;
+ void *info;/*, *context, *output;*/
Evas_Coord x, y, w, h;
};
@@ -36,10 +35,11 @@ _constructor(Eo *eo_obj, void *_pd, va_list *list
EINA_UNUSED)
Evas_Public_Data *e = eo_data_get(eo_parent, EVAS_CLASS);
eo_do_super(eo_obj, MY_CLASS, eo_constructor());
if (!e) return;
- eo_dat->dummy = 7;
e->outputs = eina_list_append(e->outputs, eo_obj);
- // XXX: create eo_dat->info from current engine
- // XXX: ensure on evas free e->outputs are unreffed
+ if (e->engine.func->info) eo_dat->info = e->engine.func->info(eo_parent);
+ // XXX: context and output are currently held in the core engine and are
+ // allocated by engine specific internal code. this all needs a new engine
+ // api to make it work
}
EAPI void
@@ -54,8 +54,10 @@ _destructor(Eo *eo_obj, void *_pd, va_list *list EINA_UNUSED)
Evas_Out_Public_Data *eo_dat = _pd;
Eo *eo_parent = eo_parent_get(eo_obj);
Evas_Public_Data *e = eo_data_get(eo_parent, EVAS_CLASS);
- // XXX: delete eo_dat->info and tell engine
- eo_dat->dummy = -7;
+ // XXX: need to free output and context one they get allocated one day
+ // e->engine.func->context_free(eo_dat->output, eo_dat->context);
+ // e->engine.func->output_free(eo_dat->output);
+ e->engine.func->info_free(eo_parent, eo_dat->info);
if (e)
{
e->outputs = eina_list_remove(e->outputs, eo_obj);
--
------------------------------------------------------------------------------
Precog is a next-generation analytics platform capable of advanced
analytics on semi-structured data. The platform includes APIs for building
apps and a phenomenal toolset for data science. Developers can use
our toolset for easy data analysis & visualization. Get a free account!
http://www2.precog.com/precogplatform/slashdotnewsletter