summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChunEon Park <hermet@hermet.pe.kr>2014-03-27 15:47:00 +0900
committerChunEon Park <hermet@hermet.pe.kr>2014-03-27 15:52:53 +0900
commit25391697e6a16fce8ac1535b3db8375d98f8142b (patch)
tree2aa62ab3445117ac8b3533763a735d55f018a80a
parent42c7f55c2f5636ecd565157ab0957c04c14fa1e5 (diff)
evas/proxy - redraw proxy source properly.
This patch fixes the proxy drawing problem that source won't be updated in some case If the image object is the one member of the smart that has the proxy, the proxy(image part) won't be redrawed properly unless evas tries to draw the image object. This can be heppend if the image object is inactive cause of some reasone(ie. outside of the screen) So, the proxy object never can be never updated even the image part is changed. Now let try to be active if the parent is both active and source object. and revert previous change with regarded to a739716ceec531a2178ac3c0d59bc15b90bb9167, that's no more required now. @fix
-rw-r--r--src/lib/evas/canvas/evas_object_image.c52
-rw-r--r--src/lib/evas/canvas/evas_render.c23
2 files changed, 27 insertions, 48 deletions
diff --git a/src/lib/evas/canvas/evas_object_image.c b/src/lib/evas/canvas/evas_object_image.c
index 8818df9da0..6cccbddd1b 100644
--- a/src/lib/evas/canvas/evas_object_image.c
+++ b/src/lib/evas/canvas/evas_object_image.c
@@ -3788,44 +3788,6 @@ evas_object_image_render(Evas_Object *eo_obj, Evas_Object_Protected_Data *obj, v
3788 return; 3788 return;
3789 } 3789 }
3790 3790
3791 if (o->pixels->pixel_updates)
3792 {
3793 Eina_Rectangle *r;
3794 Evas_Public_Data *e = obj->layer->evas;
3795
3796 if ((o->cur->border.l == 0) &&
3797 (o->cur->border.r == 0) &&
3798 (o->cur->border.t == 0) &&
3799 (o->cur->border.b == 0) &&
3800 (o->cur->image.w > 0) &&
3801 (o->cur->image.h > 0) &&
3802 (!((obj->map->cur.map) && (obj->map->cur.usemap))))
3803 {
3804 EINA_COW_PIXEL_WRITE_BEGIN(o, pixi_write)
3805 {
3806 EINA_LIST_FREE(pixi_write->pixel_updates, r)
3807 {
3808 e->engine.func->image_dirty_region(e->engine.data.output,
3809 o->engine_data, r->x, r->y, r->w, r->h);
3810 eina_rectangle_free(r);
3811 }
3812 }
3813 EINA_COW_PIXEL_WRITE_END(o, pixi_write);
3814 }
3815 else
3816 {
3817 EINA_COW_PIXEL_WRITE_BEGIN(o, pixi_write)
3818 {
3819 EINA_LIST_FREE(pixi_write->pixel_updates, r)
3820 eina_rectangle_free(r);
3821 }
3822 EINA_COW_PIXEL_WRITE_END(o, pixi_write);
3823
3824 e->engine.func->image_dirty_region(e->engine.data.output,
3825 o->engine_data, 0, 0, o->cur->image.w, o->cur->image.h);
3826 }
3827 }
3828
3829 obj->layer->evas->engine.func->context_color_set(output, 3791 obj->layer->evas->engine.func->context_color_set(output,
3830 context, 3792 context,
3831 255, 255, 255, 255); 3793 255, 255, 255, 255);
@@ -4325,14 +4287,14 @@ evas_object_image_render_pre(Evas_Object *eo_obj,
4325 (!((obj->map->cur.map) && (obj->map->cur.usemap)))) 4287 (!((obj->map->cur.map) && (obj->map->cur.usemap))))
4326 { 4288 {
4327 Eina_Rectangle *rr; 4289 Eina_Rectangle *rr;
4328 Eina_List *l;
4329 4290
4330 EINA_COW_PIXEL_WRITE_BEGIN(o, pixi_write) 4291 EINA_COW_PIXEL_WRITE_BEGIN(o, pixi_write)
4331 { 4292 {
4332 EINA_LIST_FOREACH(pixi_write->pixel_updates, l, rr) 4293 EINA_LIST_FREE(pixi_write->pixel_updates, rr)
4333 { 4294 {
4334 Evas_Coord idw, idh, idx, idy; 4295 Evas_Coord idw, idh, idx, idy;
4335 int x, y, w, h; 4296 int x, y, w, h;
4297 e->engine.func->image_dirty_region(e->engine.data.output, o->engine_data, rr->x, rr->y, rr->w, rr->h);
4336 4298
4337 idx = evas_object_image_figure_x_fill(eo_obj, obj, o->cur->fill.x, o->cur->fill.w, &idw); 4299 idx = evas_object_image_figure_x_fill(eo_obj, obj, o->cur->fill.x, o->cur->fill.w, &idw);
4338 idy = evas_object_image_figure_y_fill(eo_obj, obj, o->cur->fill.y, o->cur->fill.h, &idh); 4300 idy = evas_object_image_figure_y_fill(eo_obj, obj, o->cur->fill.y, o->cur->fill.h, &idh);
@@ -4377,6 +4339,16 @@ evas_object_image_render_pre(Evas_Object *eo_obj,
4377 } 4339 }
4378 else 4340 else
4379 { 4341 {
4342 Eina_Rectangle *r;
4343
4344 EINA_COW_PIXEL_WRITE_BEGIN(o, pixi_write)
4345 {
4346 EINA_LIST_FREE(pixi_write->pixel_updates, r)
4347 eina_rectangle_free(r);
4348 }
4349 EINA_COW_PIXEL_WRITE_END(o, pixi_write);
4350 e->engine.func->image_dirty_region(e->engine.data.output, o->engine_data, 0, 0, o->cur->image.w, o->cur->image.h);
4351
4380 evas_object_render_pre_prev_cur_add(&e->clip_changes, eo_obj, 4352 evas_object_render_pre_prev_cur_add(&e->clip_changes, eo_obj,
4381 obj); 4353 obj);
4382 goto done; 4354 goto done;
diff --git a/src/lib/evas/canvas/evas_render.c b/src/lib/evas/canvas/evas_render.c
index 319e0afb1f..cf6f36b280 100644
--- a/src/lib/evas/canvas/evas_render.c
+++ b/src/lib/evas/canvas/evas_render.c
@@ -420,7 +420,8 @@ _evas_render_phase1_object_process(Evas_Public_Data *e, Evas_Object *eo_obj,
420 Eina_Array *render_objects, 420 Eina_Array *render_objects,
421 int restack, 421 int restack,
422 int *redraw_all, 422 int *redraw_all,
423 Eina_Bool mapped_parent 423 Eina_Bool mapped_parent,
424 Eina_Bool src_changed
424#ifdef REND_DBG 425#ifdef REND_DBG
425 , int level 426 , int level
426#endif 427#endif
@@ -446,12 +447,12 @@ _evas_render_phase1_object_process(Evas_Public_Data *e, Evas_Object *eo_obj,
446 447
447 /* build active object list */ 448 /* build active object list */
448 evas_object_clip_recalc(obj); 449 evas_object_clip_recalc(obj);
449 is_active = evas_object_is_active(eo_obj, obj);
450 obj->is_active = is_active;
451 450
451 if (src_changed) is_active = EINA_TRUE;
452 else is_active = evas_object_is_active(eo_obj, obj);
452 RDI(level); 453 RDI(level);
453 RD(" [--- PROCESS [%p", obj); 454 RD(" [--- PROCESS [%p", obj);
454 if (obj->name) 455 if (obj->name)
455 { 456 {
456 RD(":%s", obj->name); 457 RD(":%s", obj->name);
457 } 458 }
@@ -513,7 +514,8 @@ _evas_render_phase1_object_process(Evas_Public_Data *e, Evas_Object *eo_obj,
513 render_objects, 514 render_objects,
514 obj->restack, 515 obj->restack,
515 redraw_all, 516 redraw_all,
516 EINA_TRUE 517 EINA_TRUE,
518 src_changed
517#ifdef REND_DBG 519#ifdef REND_DBG
518 , level + 1 520 , level + 1
519#endif 521#endif
@@ -551,6 +553,9 @@ _evas_render_phase1_object_process(Evas_Public_Data *e, Evas_Object *eo_obj,
551 RDI(level); 553 RDI(level);
552 RD(" changed + smart - render ok\n"); 554 RD(" changed + smart - render ok\n");
553 OBJ_ARRAY_PUSH(render_objects, obj); 555 OBJ_ARRAY_PUSH(render_objects, obj);
556
557 if (!is_active && obj->proxy->proxies) src_changed = EINA_TRUE;
558
554 obj->render_pre = EINA_TRUE; 559 obj->render_pre = EINA_TRUE;
555 Evas_Object_Protected_Data *obj2; 560 Evas_Object_Protected_Data *obj2;
556 EINA_INLIST_FOREACH(evas_object_smart_members_get_direct(eo_obj), 561 EINA_INLIST_FOREACH(evas_object_smart_members_get_direct(eo_obj),
@@ -563,7 +568,8 @@ _evas_render_phase1_object_process(Evas_Public_Data *e, Evas_Object *eo_obj,
563 render_objects, 568 render_objects,
564 obj->restack, 569 obj->restack,
565 redraw_all, 570 redraw_all,
566 mapped_parent 571 mapped_parent,
572 src_changed
567#ifdef REND_DBG 573#ifdef REND_DBG
568 , level + 1 574 , level + 1
569#endif 575#endif
@@ -633,7 +639,8 @@ _evas_render_phase1_object_process(Evas_Public_Data *e, Evas_Object *eo_obj,
633 render_objects, 639 render_objects,
634 restack, 640 restack,
635 redraw_all, 641 redraw_all,
636 mapped_parent 642 mapped_parent,
643 src_changed
637#ifdef REND_DBG 644#ifdef REND_DBG
638 , level + 1 645 , level + 1
639#endif 646#endif
@@ -714,7 +721,7 @@ _evas_render_phase1_process(Evas_Public_Data *e,
714 { 721 {
715 clean_them |= _evas_render_phase1_object_process 722 clean_them |= _evas_render_phase1_object_process
716 (e, obj->object, active_objects, restack_objects, delete_objects, 723 (e, obj->object, active_objects, restack_objects, delete_objects,
717 render_objects, 0, redraw_all, EINA_FALSE 724 render_objects, 0, redraw_all, EINA_FALSE, EINA_FALSE
718#ifdef REND_DBG 725#ifdef REND_DBG
719 , 1 726 , 1
720#endif 727#endif