summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCedric BAIL <cedric@osg.samsung.com>2017-08-25 10:52:38 -0700
committerCedric BAIL <cedric@osg.samsung.com>2017-08-25 10:52:38 -0700
commit79ed7a0cc2f9a8bb4bb36b22d5c6e909c2d63491 (patch)
tree6d9435532708cefd5b9ab5725ad813f1d6b19846
parent750b9d065f51133c3bba89c359b8787c7db0547c (diff)
evas: enable handling multi output in evas_render_mapped.
-rw-r--r--src/lib/evas/canvas/evas_canvas3d_texture.c4
-rw-r--r--src/lib/evas/canvas/evas_render.c34
-rw-r--r--src/lib/evas/include/evas_private.h3
3 files changed, 24 insertions, 17 deletions
diff --git a/src/lib/evas/canvas/evas_canvas3d_texture.c b/src/lib/evas/canvas/evas_canvas3d_texture.c
index 566ab41c32..2876364591 100644
--- a/src/lib/evas/canvas/evas_canvas3d_texture.c
+++ b/src/lib/evas/canvas/evas_canvas3d_texture.c
@@ -141,7 +141,9 @@ _texture_proxy_subrender(Evas_Canvas3D_Texture *obj, void *engine)
141 .source_clip = EINA_FALSE 141 .source_clip = EINA_FALSE
142 }; 142 };
143 143
144 evas_render_mapped(e, pd->source, source, ctx, proxy_write->surface, 144 evas_render_mapped(e, pd->source, source, ctx,
145 _evas_default_output_get(e),
146 proxy_write->surface,
145 -source->cur->geometry.x, 147 -source->cur->geometry.x,
146 -source->cur->geometry.y, 148 -source->cur->geometry.y,
147 2, 0, 0, e->output.w, e->output.h, 149 2, 0, 0, e->output.w, e->output.h,
diff --git a/src/lib/evas/canvas/evas_render.c b/src/lib/evas/canvas/evas_render.c
index f9206439d3..8ef8bc1cda 100644
--- a/src/lib/evas/canvas/evas_render.c
+++ b/src/lib/evas/canvas/evas_render.c
@@ -1723,7 +1723,8 @@ _evas_render_mapped_context_clip_set(Evas_Public_Data *evas, Evas_Object *eo_obj
1723Eina_Bool 1723Eina_Bool
1724evas_render_mapped(Evas_Public_Data *evas, Evas_Object *eo_obj, 1724evas_render_mapped(Evas_Public_Data *evas, Evas_Object *eo_obj,
1725 Evas_Object_Protected_Data *obj, void *context, 1725 Evas_Object_Protected_Data *obj, void *context,
1726 void *surface, int off_x, int off_y, int mapped, int ecx, 1726 void *output, void *surface,
1727 int off_x, int off_y, int mapped, int ecx,
1727 int ecy, int ecw, int ech, 1728 int ecy, int ecw, int ech,
1728 Evas_Proxy_Render_Data *proxy_render_data, int level, 1729 Evas_Proxy_Render_Data *proxy_render_data, int level,
1729 Eina_Bool do_async) 1730 Eina_Bool do_async)
@@ -1943,7 +1944,7 @@ evas_render_mapped(Evas_Public_Data *evas, Evas_Object *eo_obj,
1943 ctx = ENFN->context_new(ENC); 1944 ctx = ENFN->context_new(ENC);
1944 ENFN->context_color_set(ENC, ctx, 0, 0, 0, 0); 1945 ENFN->context_color_set(ENC, ctx, 0, 0, 0, 0);
1945 ENFN->context_render_op_set(ENC, ctx, EVAS_RENDER_COPY); 1946 ENFN->context_render_op_set(ENC, ctx, EVAS_RENDER_COPY);
1946 ENFN->rectangle_draw(ENC, ENDT, ctx, obj->map->surface, 1947 ENFN->rectangle_draw(ENC, output, ctx, obj->map->surface,
1947 0, 0, obj->map->surface_w, obj->map->surface_h, 1948 0, 0, obj->map->surface_w, obj->map->surface_h,
1948 EINA_FALSE); 1949 EINA_FALSE);
1949 ENFN->context_free(ENC, ctx); 1950 ENFN->context_free(ENC, ctx);
@@ -1958,7 +1959,7 @@ evas_render_mapped(Evas_Public_Data *evas, Evas_Object *eo_obj,
1958 { 1959 {
1959 clean_them |= evas_render_mapped(evas, obj2->object, 1960 clean_them |= evas_render_mapped(evas, obj2->object,
1960 obj2, ctx, 1961 obj2, ctx,
1961 obj->map->surface, 1962 output, obj->map->surface,
1962 off_x2, off_y2, 1, 1963 off_x2, off_y2, 1,
1963 ecx, ecy, ecw, ech, 1964 ecx, ecy, ecw, ech,
1964 proxy_render_data, 1965 proxy_render_data,
@@ -1992,7 +1993,7 @@ evas_render_mapped(Evas_Public_Data *evas, Evas_Object *eo_obj,
1992#endif 1993#endif
1993 // FIXME: Should this really be sync render? 1994 // FIXME: Should this really be sync render?
1994 obj->func->render(eo_obj, obj, obj->private_data, 1995 obj->func->render(eo_obj, obj, obj->private_data,
1995 ENC, ENDT, ctx, 1996 ENC, output, ctx,
1996 obj->map->surface, off_x2, off_y2, 1997 obj->map->surface, off_x2, off_y2,
1997 EINA_FALSE); 1998 EINA_FALSE);
1998 } 1999 }
@@ -2055,7 +2056,7 @@ evas_render_mapped(Evas_Public_Data *evas, Evas_Object *eo_obj,
2055 redraw = EINA_TRUE; 2056 redraw = EINA_TRUE;
2056 } 2057 }
2057 if (redraw) 2058 if (redraw)
2058 evas_render_mask_subrender(evas, ENDT, mask, prev_mask, level + 1, do_async); 2059 evas_render_mask_subrender(evas, output, mask, prev_mask, level + 1, do_async);
2059 2060
2060 if (mask->mask->surface) 2061 if (mask->mask->surface)
2061 { 2062 {
@@ -2086,7 +2087,7 @@ evas_render_mapped(Evas_Public_Data *evas, Evas_Object *eo_obj,
2086 RD(level, " draw image map(clip: [%d] %d,%d %dx%d)\n", _c, _cx, _cy, _cw, _ch); 2087 RD(level, " draw image map(clip: [%d] %d,%d %dx%d)\n", _c, _cx, _cy, _cw, _ch);
2087#endif 2088#endif
2088 evas_draw_image_map_async_check 2089 evas_draw_image_map_async_check
2089 (obj, ENC, ENDT, ctx, surface, 2090 (obj, ENC, output, ctx, surface,
2090 obj->map->surface, obj->map->spans, 2091 obj->map->surface, obj->map->spans,
2091 obj->map->cur.map->smooth, 0, do_async); 2092 obj->map->cur.map->smooth, 0, do_async);
2092 } 2093 }
@@ -2127,7 +2128,7 @@ evas_render_mapped(Evas_Public_Data *evas, Evas_Object *eo_obj,
2127 redraw = EINA_TRUE; 2128 redraw = EINA_TRUE;
2128 } 2129 }
2129 if (redraw) 2130 if (redraw)
2130 evas_render_mask_subrender(evas, ENDT, mask, prev_mask, level + 1, do_async); 2131 evas_render_mask_subrender(evas, output, mask, prev_mask, level + 1, do_async);
2131 2132
2132 if (mask->mask->surface) 2133 if (mask->mask->surface)
2133 { 2134 {
@@ -2155,7 +2156,8 @@ evas_render_mapped(Evas_Public_Data *evas, Evas_Object *eo_obj,
2155 (evas_object_smart_members_get_direct(eo_obj), obj2) 2156 (evas_object_smart_members_get_direct(eo_obj), obj2)
2156 { 2157 {
2157 clean_them |= evas_render_mapped(evas, obj2->object, 2158 clean_them |= evas_render_mapped(evas, obj2->object,
2158 obj2, ctx, surface, 2159 obj2, ctx,
2160 output, surface,
2159 off_x, off_y, mapped + 1, 2161 off_x, off_y, mapped + 1,
2160 ecx, ecy, ecw, ech, 2162 ecx, ecy, ecw, ech,
2161 proxy_render_data, 2163 proxy_render_data,
@@ -2220,7 +2222,7 @@ evas_render_mapped(Evas_Public_Data *evas, Evas_Object *eo_obj,
2220 redraw = EINA_TRUE; 2222 redraw = EINA_TRUE;
2221 } 2223 }
2222 if (redraw) 2224 if (redraw)
2223 evas_render_mask_subrender(evas, ENDT, mask, prev_mask, level + 1, do_async); 2225 evas_render_mask_subrender(evas, output, mask, prev_mask, level + 1, do_async);
2224 2226
2225 if (mask->mask->surface) 2227 if (mask->mask->surface)
2226 { 2228 {
@@ -2240,7 +2242,7 @@ evas_render_mapped(Evas_Public_Data *evas, Evas_Object *eo_obj,
2240#endif 2242#endif
2241 2243
2242 obj->func->render(eo_obj, obj, obj->private_data, 2244 obj->func->render(eo_obj, obj, obj->private_data,
2243 ENC, ENDT, ctx, surface, off_x, off_y, EINA_FALSE); 2245 ENC, output, ctx, surface, off_x, off_y, EINA_FALSE);
2244 } 2246 }
2245 } 2247 }
2246 else if (!obj->is_smart) 2248 else if (!obj->is_smart)
@@ -2292,7 +2294,7 @@ evas_render_mapped(Evas_Public_Data *evas, Evas_Object *eo_obj,
2292#endif 2294#endif
2293 2295
2294 obj->func->render(eo_obj, obj, obj->private_data, 2296 obj->func->render(eo_obj, obj, obj->private_data,
2295 ENC, ENDT, ctx, surface, 2297 ENC, output, ctx, surface,
2296 off_x, off_y, do_async); 2298 off_x, off_y, do_async);
2297 } 2299 }
2298 if (obj->changed_map) clean_them = EINA_TRUE; 2300 if (obj->changed_map) clean_them = EINA_TRUE;
@@ -2385,7 +2387,8 @@ evas_render_proxy_subrender(Evas *eo_e, void *output, Evas_Object *eo_source, Ev
2385 evas_event_freeze(evas->evas); 2387 evas_event_freeze(evas->evas);
2386 2388
2387 ctx = ENFN->context_new(ENC); 2389 ctx = ENFN->context_new(ENC);
2388 evas_render_mapped(evas, eo_source, source, ctx, proxy_write->surface, 2390 evas_render_mapped(evas, eo_source, source, ctx,
2391 output, proxy_write->surface,
2389 -source->cur->geometry.x, 2392 -source->cur->geometry.x,
2390 -source->cur->geometry.y, 2393 -source->cur->geometry.y,
2391 level + 1, 0, 0, evas->output.w, evas->output.h, 2394 level + 1, 0, 0, evas->output.w, evas->output.h,
@@ -2581,7 +2584,8 @@ evas_render_mask_subrender(Evas_Public_Data *evas,
2581 else 2584 else
2582 { 2585 {
2583 // Unreachable code until we implement support for smart masks 2586 // Unreachable code until we implement support for smart masks
2584 evas_render_mapped(evas, mask->object, mask, ctx, mdata->surface, 2587 evas_render_mapped(evas, mask->object, mask, ctx,
2588 output, mdata->surface,
2585 -x, -y, 2, 0, 0, evas->output.w, evas->output.h, 2589 -x, -y, 2, 0, 0, evas->output.w, evas->output.h,
2586 NULL, level, do_async); 2590 NULL, level, do_async);
2587 } 2591 }
@@ -3069,8 +3073,8 @@ evas_render_updates_internal_loop(Evas *eo_e, Evas_Public_Data *evas,
3069 obj->cur->cache.clip.h); 3073 obj->cur->cache.clip.h);
3070 eina_evlog("-cutouts_add", obj->object, 0.0, NULL); 3074 eina_evlog("-cutouts_add", obj->object, 0.0, NULL);
3071 clean_them |= evas_render_mapped(evas, eo_obj, obj, context, 3075 clean_them |= evas_render_mapped(evas, eo_obj, obj, context,
3072 surface, off_x + fx, 3076 ENDT, surface,
3073 off_y + fy, 0, 3077 off_x + fx, off_y + fy, 0,
3074 cx, cy, cw, ch, 3078 cx, cy, cw, ch,
3075 NULL, level + 3, do_async); 3079 NULL, level + 3, do_async);
3076 ENFN->context_cutout_clear(ENC, context); 3080 ENFN->context_cutout_clear(ENC, context);
diff --git a/src/lib/evas/include/evas_private.h b/src/lib/evas/include/evas_private.h
index aca67b9047..849a7d5917 100644
--- a/src/lib/evas/include/evas_private.h
+++ b/src/lib/evas/include/evas_private.h
@@ -2050,7 +2050,8 @@ EAPI void _evas_canvas_image_data_regenerate(Eina_List *list);
2050 2050
2051Eina_Bool evas_render_mapped(Evas_Public_Data *e, Evas_Object *obj, 2051Eina_Bool evas_render_mapped(Evas_Public_Data *e, Evas_Object *obj,
2052 Evas_Object_Protected_Data *source_pd, 2052 Evas_Object_Protected_Data *source_pd,
2053 void *context, void *surface, int off_x, int off_y, 2053 void *context, void *output, void *surface,
2054 int off_x, int off_y,
2054 int mapped, int ecx, int ecy, int ecw, int ech, 2055 int mapped, int ecx, int ecy, int ecw, int ech,
2055 Evas_Proxy_Render_Data *proxy_render_data, 2056 Evas_Proxy_Render_Data *proxy_render_data,
2056 int level, Eina_Bool do_async); 2057 int level, Eina_Bool do_async);