forked from enlightenment/efl
Evas: Use ENFN/ENDT in proxy subrender
Again, just a code readability change.
This commit is contained in:
parent
a56cc8a8c1
commit
5a13e97c1b
|
@ -89,6 +89,10 @@ do \
|
||||||
eina_array_flush(array); \
|
eina_array_flush(array); \
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* save typing */
|
||||||
|
#define ENFN evas->engine.func
|
||||||
|
#define ENDT evas->engine.data.output
|
||||||
|
|
||||||
typedef struct _Render_Updates Render_Updates;
|
typedef struct _Render_Updates Render_Updates;
|
||||||
struct _Render_Updates
|
struct _Render_Updates
|
||||||
{
|
{
|
||||||
|
@ -1489,7 +1493,7 @@ void
|
||||||
evas_render_proxy_subrender(Evas *eo_e, Evas_Object *eo_source, Evas_Object *eo_proxy,
|
evas_render_proxy_subrender(Evas *eo_e, Evas_Object *eo_source, Evas_Object *eo_proxy,
|
||||||
Evas_Object_Protected_Data *proxy_obj, Eina_Bool do_async)
|
Evas_Object_Protected_Data *proxy_obj, Eina_Bool do_async)
|
||||||
{
|
{
|
||||||
Evas_Public_Data *e = eo_data_scope_get(eo_e, EVAS_CANVAS_CLASS);
|
Evas_Public_Data *evas = eo_data_scope_get(eo_e, EVAS_CANVAS_CLASS);
|
||||||
Evas_Object_Protected_Data *source;
|
Evas_Object_Protected_Data *source;
|
||||||
Eina_Bool source_clip = EINA_FALSE;
|
Eina_Bool source_clip = EINA_FALSE;
|
||||||
void *ctx;
|
void *ctx;
|
||||||
|
@ -1510,8 +1514,7 @@ evas_render_proxy_subrender(Evas *eo_e, Evas_Object *eo_source, Evas_Object *eo_
|
||||||
if ((proxy_write->surface) &&
|
if ((proxy_write->surface) &&
|
||||||
((proxy_write->w != w) || (proxy_write->h != h)))
|
((proxy_write->w != w) || (proxy_write->h != h)))
|
||||||
{
|
{
|
||||||
e->engine.func->image_map_surface_free(e->engine.data.output,
|
ENFN->image_map_surface_free(ENDT, proxy_write->surface);
|
||||||
proxy_write->surface);
|
|
||||||
proxy_write->surface = NULL;
|
proxy_write->surface = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1519,24 +1522,19 @@ evas_render_proxy_subrender(Evas *eo_e, Evas_Object *eo_source, Evas_Object *eo_
|
||||||
/* FIXME (cont): Should see if the object has alpha */
|
/* FIXME (cont): Should see if the object has alpha */
|
||||||
if (!proxy_write->surface)
|
if (!proxy_write->surface)
|
||||||
{
|
{
|
||||||
proxy_write->surface = e->engine.func->image_map_surface_new
|
proxy_write->surface = ENFN->image_map_surface_new(ENDT, w, h, 1);
|
||||||
(e->engine.data.output, w, h, 1);
|
|
||||||
if (!proxy_write->surface) goto end;
|
if (!proxy_write->surface) goto end;
|
||||||
proxy_write->w = w;
|
proxy_write->w = w;
|
||||||
proxy_write->h = h;
|
proxy_write->h = h;
|
||||||
}
|
}
|
||||||
|
|
||||||
ctx = e->engine.func->context_new(e->engine.data.output);
|
ctx = ENFN->context_new(ENDT);
|
||||||
e->engine.func->context_color_set(e->engine.data.output, ctx, 0, 0,
|
ENFN->context_color_set(ENDT, ctx, 0, 0,0, 0);
|
||||||
0, 0);
|
ENFN->context_render_op_set(ENDT, ctx,EVAS_RENDER_COPY);
|
||||||
e->engine.func->context_render_op_set(e->engine.data.output, ctx,
|
ENFN->rectangle_draw(ENDT, ctx, proxy_write->surface, 0, 0, w, h, do_async);
|
||||||
EVAS_RENDER_COPY);
|
ENFN->context_free(ENDT, ctx);
|
||||||
e->engine.func->rectangle_draw(e->engine.data.output, ctx,
|
|
||||||
proxy_write->surface, 0, 0, w, h,
|
|
||||||
do_async);
|
|
||||||
e->engine.func->context_free(e->engine.data.output, ctx);
|
|
||||||
|
|
||||||
ctx = e->engine.func->context_new(e->engine.data.output);
|
ctx = ENFN->context_new(ENDT);
|
||||||
|
|
||||||
if (eo_isa(eo_proxy, EVAS_IMAGE_CLASS))
|
if (eo_isa(eo_proxy, EVAS_IMAGE_CLASS))
|
||||||
eo_do(eo_proxy, source_clip = evas_obj_image_source_clip_get());
|
eo_do(eo_proxy, source_clip = evas_obj_image_source_clip_get());
|
||||||
|
@ -1547,15 +1545,14 @@ evas_render_proxy_subrender(Evas *eo_e, Evas_Object *eo_source, Evas_Object *eo_
|
||||||
.eo_src = eo_source,
|
.eo_src = eo_source,
|
||||||
.source_clip = source_clip
|
.source_clip = source_clip
|
||||||
};
|
};
|
||||||
evas_render_mapped(e, eo_source, source, ctx, proxy_write->surface,
|
evas_render_mapped(evas, eo_source, source, ctx, proxy_write->surface,
|
||||||
-source->cur->geometry.x,
|
-source->cur->geometry.x,
|
||||||
-source->cur->geometry.y,
|
-source->cur->geometry.y,
|
||||||
1, 0, 0, e->output.w, e->output.h,
|
1, 0, 0, evas->output.w, evas->output.h,
|
||||||
&proxy_render_data, 1, EINA_TRUE, do_async);
|
&proxy_render_data, 1, EINA_TRUE, do_async);
|
||||||
|
|
||||||
e->engine.func->context_free(e->engine.data.output, ctx);
|
ENFN->context_free(ENDT, ctx);
|
||||||
proxy_write->surface = e->engine.func->image_dirty_region
|
proxy_write->surface = ENFN->image_dirty_region(ENDT, proxy_write->surface, 0, 0, w, h);
|
||||||
(e->engine.data.output, proxy_write->surface, 0, 0, w, h);
|
|
||||||
}
|
}
|
||||||
end:
|
end:
|
||||||
EINA_COW_WRITE_END(evas_object_proxy_cow, source->proxy, proxy_write);
|
EINA_COW_WRITE_END(evas_object_proxy_cow, source->proxy, proxy_write);
|
||||||
|
|
Loading…
Reference in New Issue