summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDerek Foreman <derekf@osg.samsung.com>2016-06-28 14:16:07 -0500
committerDerek Foreman <derekf@osg.samsung.com>2016-06-28 14:46:08 -0500
commit40822c3dd889cb45f671512d17fba7c249d53dbc (patch)
tree8ea8284f88e2989a6887db9125b257a88d8bf05f
parent2dfc30728381aeeb88df0f510196e279444241b1 (diff)
downloadenlightenment-devs/derekf/32bit.tar.gz
Add a pixel get callback for mirrorsdevs/derekf/32bit
Mirrors can be rendered independently of what they're mirroring, which (at least under wayland) can result in a situation where the mirror is rendered before the parent sets up their image pointers properly. We give mirrors their own callback to prevent that from causing a crash.
-rw-r--r--src/bin/e_comp_object.c27
1 files changed, 21 insertions, 6 deletions
diff --git a/src/bin/e_comp_object.c b/src/bin/e_comp_object.c
index c235816e41..b99c2cc42a 100644
--- a/src/bin/e_comp_object.c
+++ b/src/bin/e_comp_object.c
@@ -915,6 +915,26 @@ _e_comp_object_setup(E_Comp_Object *cw)
}
}
+static void
+_e_comp_object_mirror_pixels_get(void *data, Evas_Object *obj)
+{
+ E_Comp_Object *cw = data;
+ E_Client *ec = cw->ec;
+ int pw, ph;
+
+ if ((!ec->pixmap) || (!e_pixmap_size_get(ec->pixmap, &pw, &ph)))
+ {
+ evas_object_image_data_set(obj, NULL);
+ return;
+ }
+
+ if (cw->native) return;
+
+ evas_object_image_data_set(obj, e_pixmap_image_data_get(cw->ec->pixmap));
+ evas_object_image_alpha_set(obj, evas_object_image_alpha_get(cw->obj));
+ evas_object_image_pixels_dirty_set(obj, EINA_FALSE);
+}
+
/////////////////////////////////////////////
/* for fast path evas rendering; only called during render */
@@ -3935,12 +3955,6 @@ e_comp_object_render(Evas_Object *obj)
end:
evas_object_image_data_set(cw->obj, cw->blanked ? NULL : pix);
_e_comp_object_alpha_set(cw);
- EINA_LIST_FOREACH(cw->obj_mirror, l, o)
- {
- evas_object_image_data_set(o, pix);
- evas_object_image_alpha_set(o, evas_object_image_alpha_get(cw->obj));
- evas_object_image_pixels_dirty_set(o, EINA_FALSE);
- }
E_FREE_FUNC(cw->pending_updates, eina_tiler_free);
if (ret)
@@ -4044,6 +4058,7 @@ e_comp_object_util_mirror_add(Evas_Object *obj)
if (dirty)
evas_object_image_data_update_add(o, 0, 0, w, h);
}
+ evas_object_image_pixels_get_callback_set(o, _e_comp_object_mirror_pixels_get, cw);
return o;
}