summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCedric BAIL <cedric@osg.samsung.com>2017-08-25 10:52:33 -0700
committerCedric BAIL <cedric@osg.samsung.com>2017-08-25 10:52:33 -0700
commit750b9d065f51133c3bba89c359b8787c7db0547c (patch)
treeb001853007677333ba833739083311d6d53b96dc
parenta5b4defdd559089bf289d4f71a4b7f015c586af9 (diff)
evas: propagate output to evas_render_mask_subrender and don't use ENDT there.
-rw-r--r--src/lib/evas/canvas/evas_render.c23
-rw-r--r--src/lib/evas/include/evas_private.h1
2 files changed, 15 insertions, 9 deletions
diff --git a/src/lib/evas/canvas/evas_render.c b/src/lib/evas/canvas/evas_render.c
index f5485c4838..f9206439d3 100644
--- a/src/lib/evas/canvas/evas_render.c
+++ b/src/lib/evas/canvas/evas_render.c
@@ -119,6 +119,12 @@ struct _Cutout_Margin
119 119
120static Eina_Bool 120static Eina_Bool
121evas_render_updates_internal(Evas *eo_e, unsigned char make_updates, unsigned char do_draw, Evas_Render_Done_Cb done_func, void *done_data, Eina_Bool do_async); 121evas_render_updates_internal(Evas *eo_e, unsigned char make_updates, unsigned char do_draw, Evas_Render_Done_Cb done_func, void *done_data, Eina_Bool do_async);
122static void
123evas_render_mask_subrender(Evas_Public_Data *evas,
124 void *output,
125 Evas_Object_Protected_Data *mask,
126 Evas_Object_Protected_Data *prev_mask,
127 int level, Eina_Bool do_async);
122 128
123static Eina_List *_rendering_evases = NULL; 129static Eina_List *_rendering_evases = NULL;
124 130
@@ -2049,7 +2055,7 @@ evas_render_mapped(Evas_Public_Data *evas, Evas_Object *eo_obj,
2049 redraw = EINA_TRUE; 2055 redraw = EINA_TRUE;
2050 } 2056 }
2051 if (redraw) 2057 if (redraw)
2052 evas_render_mask_subrender(evas, mask, prev_mask, level + 1, do_async); 2058 evas_render_mask_subrender(evas, ENDT, mask, prev_mask, level + 1, do_async);
2053 2059
2054 if (mask->mask->surface) 2060 if (mask->mask->surface)
2055 { 2061 {
@@ -2121,7 +2127,7 @@ evas_render_mapped(Evas_Public_Data *evas, Evas_Object *eo_obj,
2121 redraw = EINA_TRUE; 2127 redraw = EINA_TRUE;
2122 } 2128 }
2123 if (redraw) 2129 if (redraw)
2124 evas_render_mask_subrender(evas, mask, prev_mask, level + 1, do_async); 2130 evas_render_mask_subrender(evas, ENDT, mask, prev_mask, level + 1, do_async);
2125 2131
2126 if (mask->mask->surface) 2132 if (mask->mask->surface)
2127 { 2133 {
@@ -2214,7 +2220,7 @@ evas_render_mapped(Evas_Public_Data *evas, Evas_Object *eo_obj,
2214 redraw = EINA_TRUE; 2220 redraw = EINA_TRUE;
2215 } 2221 }
2216 if (redraw) 2222 if (redraw)
2217 evas_render_mask_subrender(evas, mask, prev_mask, level + 1, do_async); 2223 evas_render_mask_subrender(evas, ENDT, mask, prev_mask, level + 1, do_async);
2218 2224
2219 if (mask->mask->surface) 2225 if (mask->mask->surface)
2220 { 2226 {
@@ -2402,8 +2408,9 @@ evas_render_proxy_subrender(Evas *eo_e, void *output, Evas_Object *eo_source, Ev
2402 * In GL the target surface will be RGBA for now. TODO: Find out how to 2408 * In GL the target surface will be RGBA for now. TODO: Find out how to
2403 * render GL to alpha, if that's possible. 2409 * render GL to alpha, if that's possible.
2404 */ 2410 */
2405void 2411static void
2406evas_render_mask_subrender(Evas_Public_Data *evas, 2412evas_render_mask_subrender(Evas_Public_Data *evas,
2413 void *output,
2407 Evas_Object_Protected_Data *mask, 2414 Evas_Object_Protected_Data *mask,
2408 Evas_Object_Protected_Data *prev_mask, 2415 Evas_Object_Protected_Data *prev_mask,
2409 int level, Eina_Bool do_async) 2416 int level, Eina_Bool do_async)
@@ -2470,7 +2477,7 @@ evas_render_mask_subrender(Evas_Public_Data *evas,
2470 { 2477 {
2471 // Note: This is preventive code. Never seen it happen. 2478 // Note: This is preventive code. Never seen it happen.
2472 WRN("Mask render order may be invalid"); 2479 WRN("Mask render order may be invalid");
2473 evas_render_mask_subrender(evas, prev_mask, prev_mask->clip.prev_mask, level + 1, do_async); 2480 evas_render_mask_subrender(evas, output, prev_mask, prev_mask->clip.prev_mask, level + 1, do_async);
2474 } 2481 }
2475 } 2482 }
2476 2483
@@ -2546,7 +2553,7 @@ evas_render_mask_subrender(Evas_Public_Data *evas,
2546 ctx = ENFN->context_new(ENC); 2553 ctx = ENFN->context_new(ENC);
2547 ENFN->context_color_set(ENC, ctx, 0, 0, 0, 0); 2554 ENFN->context_color_set(ENC, ctx, 0, 0, 0, 0);
2548 ENFN->context_render_op_set(ENC, ctx, EVAS_RENDER_COPY); 2555 ENFN->context_render_op_set(ENC, ctx, EVAS_RENDER_COPY);
2549 ENFN->rectangle_draw(ENC, ENDT, ctx, mdata->surface, 0, 0, w, h, do_async); 2556 ENFN->rectangle_draw(ENC, output, ctx, mdata->surface, 0, 0, w, h, do_async);
2550 ENFN->context_free(ENC, ctx); 2557 ENFN->context_free(ENC, ctx);
2551 eina_evlog("-mask_rect_clear", mask->object, 0.0, NULL); 2558 eina_evlog("-mask_rect_clear", mask->object, 0.0, NULL);
2552 2559
@@ -2569,7 +2576,7 @@ evas_render_mask_subrender(Evas_Public_Data *evas,
2569 if (EINA_LIKELY(!mask->is_smart)) 2576 if (EINA_LIKELY(!mask->is_smart))
2570 { 2577 {
2571 mask->func->render(mask->object, mask, mask->private_data, 2578 mask->func->render(mask->object, mask, mask->private_data,
2572 ENC, ENDT, ctx, mdata->surface, -x, -y, do_async); 2579 ENC, output, ctx, mdata->surface, -x, -y, do_async);
2573 } 2580 }
2574 else 2581 else
2575 { 2582 {
@@ -3010,7 +3017,7 @@ evas_render_updates_internal_loop(Evas *eo_e, Evas_Public_Data *evas,
3010 Evas_Object_Protected_Data *prev_mask = obj->clip.prev_mask; 3017 Evas_Object_Protected_Data *prev_mask = obj->clip.prev_mask;
3011 3018
3012 if (mask->mask->redraw || !mask->mask->surface) 3019 if (mask->mask->redraw || !mask->mask->surface)
3013 evas_render_mask_subrender(obj->layer->evas, mask, prev_mask, 4, do_async); 3020 evas_render_mask_subrender(obj->layer->evas, ENDT, mask, prev_mask, 4, do_async);
3014 3021
3015 if (mask->mask->surface) 3022 if (mask->mask->surface)
3016 { 3023 {
diff --git a/src/lib/evas/include/evas_private.h b/src/lib/evas/include/evas_private.h
index cf43529af9..aca67b9047 100644
--- a/src/lib/evas/include/evas_private.h
+++ b/src/lib/evas/include/evas_private.h
@@ -2057,7 +2057,6 @@ Eina_Bool evas_render_mapped(Evas_Public_Data *e, Evas_Object *obj,
2057void evas_render_invalidate(Evas *e); 2057void evas_render_invalidate(Evas *e);
2058void evas_render_object_recalc(Evas_Object_Protected_Data *obj); 2058void evas_render_object_recalc(Evas_Object_Protected_Data *obj);
2059void evas_render_proxy_subrender(Evas *eo_e, void *output, Evas_Object *eo_source, Evas_Object *eo_proxy, Evas_Object_Protected_Data *proxy_obj, Eina_Bool source_clip, Eina_Bool do_async); 2059void evas_render_proxy_subrender(Evas *eo_e, void *output, Evas_Object *eo_source, Evas_Object *eo_proxy, Evas_Object_Protected_Data *proxy_obj, Eina_Bool source_clip, Eina_Bool do_async);
2060void evas_render_mask_subrender(Evas_Public_Data *e, Evas_Object_Protected_Data *mask, Evas_Object_Protected_Data *prev_mask, int level, Eina_Bool do_async);
2061 2060
2062Eina_Bool evas_map_inside_get(const Evas_Map *m, Evas_Coord x, Evas_Coord y); 2061Eina_Bool evas_map_inside_get(const Evas_Map *m, Evas_Coord x, Evas_Coord y);
2063Eina_Bool evas_map_coords_get(const Evas_Map *m, double x, double y, double *mx, double *my, int grab); 2062Eina_Bool evas_map_coords_get(const Evas_Map *m, double x, double y, double *mx, double *my, int grab);