From 5a001b1759445c1461341c7d1e069ac74e411f04 Mon Sep 17 00:00:00 2001 From: Mike Blumenkrantz Date: Fri, 17 Jul 2015 15:23:34 -0400 Subject: [PATCH] enforce image border/size/pixels_dirty setting on comp mirrors during create this should provide a more accurate first-render for mirrors as they are added --- src/bin/e_comp_object.c | 25 ++++++++++++++++++------- 1 file changed, 18 insertions(+), 7 deletions(-) diff --git a/src/bin/e_comp_object.c b/src/bin/e_comp_object.c index ac1402010..752689e95 100644 --- a/src/bin/e_comp_object.c +++ b/src/bin/e_comp_object.c @@ -3574,13 +3574,24 @@ e_comp_object_util_mirror_add(Evas_Object *obj) pix = evas_object_image_data_get(cw->obj, EINA_FALSE); } } - if (pix) - { - evas_object_image_data_set(o, pix); - if (!argb) - evas_object_image_data_set(cw->obj, pix); - } - evas_object_image_data_update_add(o, 0, 0, w, h); + { + Eina_Bool dirty; + int bx, by, bxx, byy; + + dirty = evas_object_image_pixels_dirty_get(cw->obj); + evas_object_image_pixels_dirty_set(o, dirty); + e_pixmap_image_opaque_get(cw->ec->pixmap, &bx, &by, &bxx, &byy); + if (bxx && byy) + bxx = cw->ec->client.w - (bx + bxx), byy = cw->ec->client.h - (by + byy); + else + bx = by = bxx = byy = 0; + evas_object_image_border_set(o, bx, by, bxx, byy); + if (dirty) + evas_object_image_data_update_add(o, 0, 0, w, h); + evas_object_image_data_set(o, pix); + if (!argb) + evas_object_image_data_set(cw->obj, pix); + } return o; }