summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChunEon Park <hermet@hermet.pe.kr>2014-02-17 23:05:36 +0900
committerChunEon Park <hermet@hermet.pe.kr>2014-02-17 23:05:36 +0900
commita739716ceec531a2178ac3c0d59bc15b90bb9167 (patch)
treee7d05459e21f385afed0be17759b6addb36f1efb
parentfcfa7041491e50b1658042903d4b7f18da897ebe (diff)
evas/image - update dirty region in the render time.
this fixes the proxy rendering that sub object of the source couldn't be dirty region set. since the object could be invisible nor won't be pre-rendered neither. Im supposing the mapped(proxy) object rendering sequence should be totally refactored that should be separated with the normal rendering sequence. Until that, this change will be alternative solution.
-rw-r--r--src/lib/evas/canvas/evas_object_image.c63
1 files changed, 45 insertions, 18 deletions
diff --git a/src/lib/evas/canvas/evas_object_image.c b/src/lib/evas/canvas/evas_object_image.c
index 4524768ac9..8818df9da0 100644
--- a/src/lib/evas/canvas/evas_object_image.c
+++ b/src/lib/evas/canvas/evas_object_image.c
@@ -3788,6 +3788,44 @@ 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
3791 obj->layer->evas->engine.func->context_color_set(output, 3829 obj->layer->evas->engine.func->context_color_set(output,
3792 context, 3830 context,
3793 255, 255, 255, 255); 3831 255, 255, 255, 255);
@@ -4287,16 +4325,15 @@ evas_object_image_render_pre(Evas_Object *eo_obj,
4287 (!((obj->map->cur.map) && (obj->map->cur.usemap)))) 4325 (!((obj->map->cur.map) && (obj->map->cur.usemap))))
4288 { 4326 {
4289 Eina_Rectangle *rr; 4327 Eina_Rectangle *rr;
4328 Eina_List *l;
4290 4329
4291 EINA_COW_PIXEL_WRITE_BEGIN(o, pixi_write) 4330 EINA_COW_PIXEL_WRITE_BEGIN(o, pixi_write)
4292 { 4331 {
4293 EINA_LIST_FREE(pixi_write->pixel_updates, rr) 4332 EINA_LIST_FOREACH(pixi_write->pixel_updates, l, rr)
4294 { 4333 {
4295 Evas_Coord idw, idh, idx, idy; 4334 Evas_Coord idw, idh, idx, idy;
4296 int x, y, w, h; 4335 int x, y, w, h;
4297 4336
4298 e->engine.func->image_dirty_region(e->engine.data.output, o->engine_data, rr->x, rr->y, rr->w, rr->h);
4299
4300 idx = evas_object_image_figure_x_fill(eo_obj, obj, o->cur->fill.x, o->cur->fill.w, &idw); 4337 idx = evas_object_image_figure_x_fill(eo_obj, obj, o->cur->fill.x, o->cur->fill.w, &idw);
4301 idy = evas_object_image_figure_y_fill(eo_obj, obj, o->cur->fill.y, o->cur->fill.h, &idh); 4338 idy = evas_object_image_figure_y_fill(eo_obj, obj, o->cur->fill.y, o->cur->fill.h, &idh);
4302 4339
@@ -4333,7 +4370,6 @@ evas_object_image_render_pre(Evas_Object *eo_obj,
4333 idx += idw; 4370 idx += idw;
4334 idy = ydy; 4371 idy = ydy;
4335 } 4372 }
4336 eina_rectangle_free(rr);
4337 } 4373 }
4338 } 4374 }
4339 EINA_COW_PIXEL_WRITE_END(o, pixi_write); 4375 EINA_COW_PIXEL_WRITE_END(o, pixi_write);
@@ -4341,20 +4377,11 @@ evas_object_image_render_pre(Evas_Object *eo_obj,
4341 } 4377 }
4342 else 4378 else
4343 { 4379 {
4344 Eina_Rectangle *r; 4380 evas_object_render_pre_prev_cur_add(&e->clip_changes, eo_obj,
4345 4381 obj);
4346 EINA_COW_PIXEL_WRITE_BEGIN(o, pixi_write) 4382 goto done;
4347 { 4383 }
4348 EINA_LIST_FREE(pixi_write->pixel_updates, r) 4384 }
4349 eina_rectangle_free(r);
4350 }
4351 EINA_COW_PIXEL_WRITE_END(o, pixi_write);
4352
4353 e->engine.func->image_dirty_region(e->engine.data.output, o->engine_data, 0, 0, o->cur->image.w, o->cur->image.h);
4354 evas_object_render_pre_prev_cur_add(&e->clip_changes, eo_obj, obj);
4355 goto done;
4356 }
4357 }
4358 } 4385 }
4359 /* it obviously didn't change - add a NO obscure - this "unupdates" this */ 4386 /* it obviously didn't change - add a NO obscure - this "unupdates" this */
4360 /* area so if there were updates for it they get wiped. don't do it if we */ 4387 /* area so if there were updates for it they get wiped. don't do it if we */