summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
authorChunEon Park <hermet@hermet.pe.kr>2013-10-31 17:01:41 +0900
committerChunEon Park <hermet@hermet.pe.kr>2013-10-31 17:04:23 +0900
commit69077d19d71983e1c9fcd47607ebc1508207cf87 (patch)
tree765ee675c61492badbcd7cf20d6ceb84dcb0b416 /src/lib
parent8f97de91a346af8692d9e292a5ff73b75f820992 (diff)
evas/proxy - decide the proxy updation in the main render process.
because the proxy updation is decided in the proxy rendering time, it couldn't be updated at the time if the source is changed before.
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/evas/canvas/evas_object_image.c68
-rw-r--r--src/lib/evas/canvas/evas_render.c29
2 files changed, 49 insertions, 48 deletions
diff --git a/src/lib/evas/canvas/evas_object_image.c b/src/lib/evas/canvas/evas_object_image.c
index 4e5cd3d391..af42860ba2 100644
--- a/src/lib/evas/canvas/evas_object_image.c
+++ b/src/lib/evas/canvas/evas_object_image.c
@@ -3311,7 +3311,6 @@ _proxy_subrender(Evas *eo_e, Evas_Object *eo_source, Evas_Object *eo_proxy, Evas
3311 Evas_Object_Protected_Data *source; 3311 Evas_Object_Protected_Data *source;
3312 void *ctx; 3312 void *ctx;
3313 int w, h; 3313 int w, h;
3314 Eina_Bool src_redraw = EINA_FALSE;
3315 3314
3316 if (!eo_source) return; 3315 if (!eo_source) return;
3317 source = eo_data_scope_get(eo_source, EVAS_OBJ_CLASS); 3316 source = eo_data_scope_get(eo_source, EVAS_OBJ_CLASS);
@@ -3341,49 +3340,42 @@ _proxy_subrender(Evas *eo_e, Evas_Object *eo_source, Evas_Object *eo_proxy, Evas
3341 if (!proxy_write->surface) goto end; 3340 if (!proxy_write->surface) goto end;
3342 proxy_write->w = w; 3341 proxy_write->w = w;
3343 proxy_write->h = h; 3342 proxy_write->h = h;
3344 src_redraw = EINA_TRUE;
3345 } 3343 }
3346 3344
3347 if (!src_redraw) 3345 ctx = e->engine.func->context_new(e->engine.data.output);
3348 src_redraw = evas_object_smart_changed_get(eo_source); 3346 e->engine.func->context_color_set(e->engine.data.output, ctx, 0, 0,
3349 3347 0, 0);
3350 if (src_redraw) 3348 e->engine.func->context_render_op_set(e->engine.data.output, ctx,
3351 { 3349 EVAS_RENDER_COPY);
3352 ctx = e->engine.func->context_new(e->engine.data.output); 3350 e->engine.func->rectangle_draw(e->engine.data.output, ctx,
3353 e->engine.func->context_color_set(e->engine.data.output, ctx, 0, 0, 3351 proxy_write->surface, 0, 0, w, h,
3354 0, 0); 3352 do_async);
3355 e->engine.func->context_render_op_set(e->engine.data.output, ctx, 3353 e->engine.func->context_free(e->engine.data.output, ctx);
3356 EVAS_RENDER_COPY); 3354
3357 e->engine.func->rectangle_draw(e->engine.data.output, ctx, 3355 ctx = e->engine.func->context_new(e->engine.data.output);
3358 proxy_write->surface, 0, 0, w, h, 3356
3359 do_async); 3357 Eina_Bool source_clip;
3360 e->engine.func->context_free(e->engine.data.output, ctx); 3358 eo_do(eo_proxy, evas_obj_image_source_clip_get(&source_clip));
3361 3359
3362 ctx = e->engine.func->context_new(e->engine.data.output); 3360 Evas_Proxy_Render_Data proxy_render_data = {
3363 3361 .eo_proxy = eo_proxy,
3364 Eina_Bool source_clip; 3362 .proxy_obj = proxy_obj,
3365 eo_do(eo_proxy, evas_obj_image_source_clip_get(&source_clip)); 3363 .eo_src = eo_source,
3366 3364 .source_clip = source_clip
3367 Evas_Proxy_Render_Data proxy_render_data = { 3365 };
3368 .eo_proxy = eo_proxy, 3366 evas_render_mapped(e, eo_source, source, ctx, proxy_write->surface,
3369 .proxy_obj = proxy_obj, 3367 -source->cur->geometry.x,
3370 .eo_src = eo_source, 3368 -source->cur->geometry.y,
3371 .source_clip = source_clip 3369 1, 0, 0, e->output.w, e->output.h,
3372 }; 3370 &proxy_render_data
3373 evas_render_mapped(e, eo_source, source, ctx, proxy_write->surface,
3374 -source->cur->geometry.x,
3375 -source->cur->geometry.y,
3376 1, 0, 0, e->output.w, e->output.h,
3377 &proxy_render_data
3378#ifdef REND_DBG 3371#ifdef REND_DBG
3379 , 1 3372 , 1
3380#endif 3373#endif
3381 , do_async); 3374 , do_async);
3382 3375
3383 e->engine.func->context_free(e->engine.data.output, ctx); 3376 e->engine.func->context_free(e->engine.data.output, ctx);
3384 }
3385 proxy_write->surface = e->engine.func->image_dirty_region 3377 proxy_write->surface = e->engine.func->image_dirty_region
3386 (e->engine.data.output, proxy_write->surface, 0, 0, w, h); 3378 (e->engine.data.output, proxy_write->surface, 0, 0, w, h);
3387/* 3379/*
3388 ctx = e->engine.func->context_new(e->engine.data.output); 3380 ctx = e->engine.func->context_new(e->engine.data.output);
3389 if (eo_isa(source, EVAS_OBJ_SMART_CLASS)) 3381 if (eo_isa(source, EVAS_OBJ_SMART_CLASS))
diff --git a/src/lib/evas/canvas/evas_render.c b/src/lib/evas/canvas/evas_render.c
index 2ceca4da56..3b14c28bda 100644
--- a/src/lib/evas/canvas/evas_render.c
+++ b/src/lib/evas/canvas/evas_render.c
@@ -293,25 +293,34 @@ _evas_render_phase1_direct(Evas_Public_Data *e,
293 unsigned int i; 293 unsigned int i;
294 Eina_List *l; 294 Eina_List *l;
295 Evas_Object *eo_proxy; 295 Evas_Object *eo_proxy;
296 Eina_Bool changed;
296 297
297 RD(" [--- PHASE 1 DIRECT\n"); 298 RD(" [--- PHASE 1 DIRECT\n");
298 for (i = 0; i < active_objects->count; i++) 299 for (i = 0; i < active_objects->count; i++)
299 { 300 {
300 Evas_Object_Protected_Data *obj = eina_array_data_get(active_objects, i); 301 Evas_Object_Protected_Data *obj =
302 eina_array_data_get(active_objects, i);
301 303
302 if (obj->changed) 304 if (obj->changed) evas_object_clip_recalc(obj);
305 if (!obj->proxy->proxies) continue;
306
307 if (obj->smart.smart)
308 changed = evas_object_smart_changed_get(obj->object);
309 else changed = obj->changed;
310
311 if (changed)
303 { 312 {
304 /* Flag need redraw on proxy too */ 313 /* Flag need redraw on proxy too */
305 evas_object_clip_recalc(obj);
306 EINA_LIST_FOREACH(obj->proxy->proxies, l, eo_proxy) 314 EINA_LIST_FOREACH(obj->proxy->proxies, l, eo_proxy)
307 { 315 {
308 Evas_Object_Protected_Data *proxy; 316 Evas_Object_Protected_Data *proxy;
309 317 proxy = eo_data_scope_get(eo_proxy, EVAS_OBJ_CLASS);
310 proxy = eo_data_scope_get(eo_proxy, EVAS_OBJ_CLASS); 318
311 319 EINA_COW_WRITE_BEGIN(evas_object_proxy_cow, proxy->proxy,
312 EINA_COW_WRITE_BEGIN(evas_object_proxy_cow, proxy->proxy, Evas_Object_Proxy_Data, proxy_write) 320 Evas_Object_Proxy_Data, proxy_write)
313 proxy_write->redraw = EINA_TRUE; 321 proxy_write->redraw = EINA_TRUE;
314 EINA_COW_WRITE_END(evas_object_proxy_cow, proxy->proxy, proxy_write); 322 EINA_COW_WRITE_END(evas_object_proxy_cow, proxy->proxy,
323 proxy_write);
315 } 324 }
316 } 325 }
317 } 326 }