jpeg pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=70676a4179e20ed9e9735ede9d72cd6a8be78103
commit 70676a4179e20ed9e9735ede9d72cd6a8be78103 Author: Jean-Philippe Andre <jp.an...@samsung.com> Date: Fri Dec 16 10:44:47 2016 +0900 evas: Remove context from the evas public data It was never used, except in dubious situations (most likely a typo). A clean context is now used in the top-most call to evas_render_updates_internal_loop. --- src/lib/evas/canvas/evas_main.c | 5 ----- src/lib/evas/canvas/evas_render.c | 13 ++++++++----- src/lib/evas/include/evas_private.h | 2 -- 3 files changed, 8 insertions(+), 12 deletions(-) diff --git a/src/lib/evas/canvas/evas_main.c b/src/lib/evas/canvas/evas_main.c index 5f7698f..912760c 100644 --- a/src/lib/evas/canvas/evas_main.c +++ b/src/lib/evas/canvas/evas_main.c @@ -349,8 +349,6 @@ _evas_canvas_efl_object_destructor(Eo *eo_e, Evas_Public_Data *e) { e->engine.func->ector_destroy(e->engine.data.output, e->engine.ector); - e->engine.func->context_free(e->engine.data.output, - e->engine.data.context); e->engine.func->output_free(e->engine.data.output); e->engine.func->info_free(eo_e, e->engine.info); } @@ -454,9 +452,6 @@ _evas_canvas_engine_info_set(Eo *eo_e EINA_UNUSED, Evas_Public_Data *e, Evas_Eng e->engine.data.output = e->engine.func->setup(info, e->output.w, e->output.h); } - if (!e->engine.data.context) - e->engine.data.context = e->engine.func->context_new(e->engine.data.output); - return !!e->engine.data.output; } diff --git a/src/lib/evas/canvas/evas_render.c b/src/lib/evas/canvas/evas_render.c index 73682f3..d956ec3 100644 --- a/src/lib/evas/canvas/evas_render.c +++ b/src/lib/evas/canvas/evas_render.c @@ -74,7 +74,6 @@ rend_dbg(const char *txt) /* save typing */ #define ENFN evas->engine.func #define ENDT evas->engine.data.output -#define ENCTX evas->engine.data.context typedef struct _Render_Updates Render_Updates; struct _Render_Updates @@ -2729,7 +2728,7 @@ evas_render_updates_internal_loop(Evas *eo_e, Evas_Public_Data *evas, if (alpha) { ENFN->context_color_set(ENDT, context, 0, 0, 0, 0); - ENFN->context_multiplier_unset(ENDT, ENCTX); // XXX: Why not 'context'??? + ENFN->context_multiplier_unset(ENDT, context); ENFN->context_render_op_set(ENDT, context, EVAS_RENDER_COPY); ENFN->rectangle_draw(ENDT, context, surface, cx, cy, cw, ch, do_async); ENFN->context_cutout_clear(ENDT, context); @@ -3113,6 +3112,8 @@ evas_render_updates_internal(Evas *eo_e, &ux, &uy, &uw, &uh, &cx, &cy, &cw, &ch))) { + void *ctx; + haveup = EINA_TRUE; /* phase 6.1 render every snapshot that needs to be updated @@ -3133,7 +3134,6 @@ evas_render_updates_internal(Evas *eo_e, if (eina_rectangle_intersection(&ur, &output)) { - void *ctx; void *pseudo_canvas; unsigned int restore_offset = offset; @@ -3176,13 +3176,16 @@ evas_render_updates_internal(Evas *eo_e, eina_spinlock_release(&(e->render.lock)); } - clean_them |= evas_render_updates_internal_loop(eo_e, e, surface, ENCTX, - NULL, + ctx = ENFN->context_new(ENDT); + clean_them |= evas_render_updates_internal_loop(eo_e, e, surface, + ctx, NULL, ux, uy, uw, uh, cx, cy, cw, ch, fx, fy, alpha, do_async, &offset, 0); + ENFN->context_free(ENDT, ctx); + eina_evlog("-render_update", eo_e, 0.0, NULL); if (!do_async) { diff --git a/src/lib/evas/include/evas_private.h b/src/lib/evas/include/evas_private.h index 9fe56df..cdbf15b 100644 --- a/src/lib/evas/include/evas_private.h +++ b/src/lib/evas/include/evas_private.h @@ -864,8 +864,6 @@ struct _Evas_Public_Data Ector_Surface *ector; struct { void *output; - - void *context; } data; void *info; --